Skip to main content
Skip to search
Can we use first and third party cookies and web beacons to
understand our audience, and to tailor promotions you see
?
Yes, please
No, do not track me
Drupal.org home
Discover Drupal
Drupal Core
Drupal CMS
Drupal AI
Case Studies
Drupal for Government
Drupal for Higher Education
Drupal for Nonprofit
Drupal for eCommerce
Drupal for FinTech
Drupal for Healthcare
Drupal for Enterprise
Drupal for Retail
Drupal for Travel & Tourism
Build with Drupal
Download Drupal
Documentation
Getting started
Local Development Guide
Developer Resources
Drupal CMS User Guide
Drupal User Guide
API
Modules
Themes
Recipes
Site Templates
Issue queues
Security Advisories
Partners & Services
Find a Drupal Certified Partner
Become a Drupal Certified Partner
Find a Hosting Provider
Find a Migration Partner
Find Training
Drupal Steward
Community
About the Community
How to Contribute
DrupalCon
Events
Jobs / Careers
News & Blogs
Forum
Slack
Newsletters
Drupal Swag Shop
Support Drupal
The Drupal Association
Donate
Become a Partner
Become a Ripple Maker
Become a Drupal Sustaining Member
Drupal Swag Shop
Get Started
Try Drupal CMS
Try Hosting
Return to content
Search form
Search
Log in
Create account
Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Secure your ticket
Modules
Flag
Change records for Flag
Primary tabs
Published
(active tab)
Draft & review
Add new change record
Keywords
Introduced in branch
Introduced in version
Change node created
Is less than
Is less than or equal to
Is equal to
Is not equal to
Is greater than or equal to
Is greater than
Is between
Is not between
Is empty (NULL)
Is not empty (NOT NULL)
Regular expression
And
Impacts
Site builders, administrators, editors
Module developers
Themers
Site templates, recipes and distribution developers
Introduced in branch/version
Notice created
Change
8.x-4.x
03-Jun-2015
hook_flag_reset() has been replaced with the FLAG_RESET event
8.x-4.x
27-Apr-2015
Flag count API functions replaced with flag.count service methods
8.x-4.x
12-Apr-2015
flag_flag() and flag_unflag() replaced with FlagService methods flag() and unflag() methods
8.x-4.x
09-Apr-2015
hook_flag_alter() is no longer needed on D8.
7.x-3.x / 7.x-3.4
04-Mar-2014
Some Flag API functions now return up-to-date data when called from hook implementations or Rules during a flagging process
7.x-3.x / 7.x-3.4
09-Feb-2014
Flag-related tokens on entity types that are flagged now require Token module
7.x-3.x / 7.x-3.3
26-Jan-2014
Parameter for $flag has been added to hook_flag_javascript_info_alter()
7.x-3.x / 7.x-3.0-beta1
14-May-2013
handling of return value from hook_flag_access() has changed
7.x-3.x / 7.x-3.0-beta1
12-May-2013
Optional variables have been removed from $flag->theme()
7.x-3.x / 7.x-3.0-beta1
09-May-2013
Flag links can be set to appear per view mode
7.x-3.x / 7.x-3.0-beta1
09-Dec-2012
Flag template has new suggestion for link type
7.x-3.x / 7.x-3.0-alpha4
01-Nov-2012
Flag link classes changed on 'unflag denied' non-links
7.x-3.x
09-Sep-2012
Flag API version changed to 3
7.x-3.x
30-Aug-2012
flag_get_flagged_content() renamed to flag_get_flag_flagging_data()
7.x-3.x
17-Aug-2012
hook_flag_unflag() and unflagging events are invoked before flagging is deleted
7.x-3.x
16-Aug-2012
hook_flag() has been split into hook_flag_flag() and hook_flag_unflag(); added flagging parameter
7.x-3.x
16-Aug-2012
'provides form' property added to hook_flag_link_type_info()
7.x-3.x
11-Aug-2012
Flag roles have been replaced with standard user permissions
7.x-3.x
10-Aug-2012
Rules events are invoked after hook_flag_flag/unflag()
7.x-3.x
09-Aug-2012
hook_flag_definitions() and hook_flag_link_types() renamed
7.x-3.x
08-Aug-2012
factory_by_content_type() renamed to factory_by_entity_type()
7.x-3.x
08-Aug-2012
Flag methods renamed: get_content_id(), applies_to_content_object()
7.x-3.x
08-Aug-2012
Database columns 'content_type' and 'content_id' renamed to 'entity_type' and 'entity_id'
7.x-3.x
08-Aug-2012
Flag property $flag->content_type changed to $flag->entity_type
7.x-3.x
08-Aug-2012
{flags} and {flag_content} tables renamed to {flag} and {flagging}
Subscribe with RSS