Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
All the cool modules provide alter hooks for the default definitions, flag should totally get on the bandwagon.
(I can provide more reasons if necessary).
Comment | File | Size | Author |
---|---|---|---|
#3 | flag-default-flags-alter-hook-2027091-03.patch | 2.85 KB | jhedstrom |
#1 | 2027091-flag_hook_flag_default_flags_alter-1.patch | 2.59 KB | hefox |
flag_hook_flag_default_flags_alter.patch | 2.13 KB | hefox | |
Comments
Comment #1
hefox CreditAttribution: hefox commentedadding api entry cause those are cool
Comment #2
joachim CreditAttribution: joachim commentedSeems reasonable enough -- allows things like altering Features, or flags provided by modules.
Typo: 'definition'.
Needs a @param.
That += can just be a + as we're not doing anything else with $flag_info.
Comment please -- helps find where hooks are invoked.
Comment #3
jhedstromHere's the patch with feedback from #2 incorporated.
Comment #4
jojonaloha CreditAttribution: jojonaloha commentedI'm going to be bold and mark this as RTBC. The patch in #3 still applies. I looked at the diff between the two patches and #3 fixes everything as suggested in #2, which is primarily comments. I've applied and tested the patch and it is working.
Comment #6
joachim CreditAttribution: joachim commentedCommitted. Thanks to everyone who worked on this.
Comment #8
japerryWe need to make a patch to be ported back to the 2.x branch, since this patch with the recent version of flag 2.2 causes #2283113: Default flags in most recent version causes notification page to fail on install.
Comment #9
joachim CreditAttribution: joachim commentedHow does a 3.x patch cause a bug in Flag 2.2???