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.
Problem/Motivation
We currently do not invoke this hook at any time in Flag 8.x. Furthermore, if we were to provide similar functionality, it seems like it would make more sense to go through the theme layer rather than a custom Flag hook.
Proposed resolution
Remove the hook from flag.api.php, and update #2409859: [Policy, No Patch] Where did the Flag 7.x hooks go in 8.x? accordingly.
Remaining tasks
Create patch.
User interface changes
None.
API changes
The unused hook_flag_javascript_info_alter() would be removed.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#3 | deleteJSinfoHook_2744295.3.patch | 704 bytes | socketwench |
|
Comments
Comment #2
socketwench CreditAttribution: socketwench at FFW commentedProvided that #2461107: Flag links output as fields need to be in a block-level element is committed, similar functionality could be achieved by providing a template with additional libraries. Template name suggestions would make it easy to target specific flags. Even more invasive changes could be made by providing a custom link type.
Comment #3
socketwench CreditAttribution: socketwench at FFW commentedComment #4
joachim CreditAttribution: joachim commentedCan you check the git log & find the issue to see why this was added? There'll probably be an explanation of the use case there.
Comment #5
socketwench CreditAttribution: socketwench at FFW commentedWow, that hook goes back a *loooong* way.
Comment #6
socketwench CreditAttribution: socketwench at FFW commentedReading the use cases, I can't see why we still need this hook. We could expose the flag count to the render array, making it easier to modify. We don't really have a JS API in 8.x, so there's no need to pass variables.
Comment #8
socketwench CreditAttribution: socketwench at FFW commented