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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

socketwench created an issue. See original summary.

socketwench’s picture

Provided 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.

socketwench’s picture

Status: Active » Needs review
FileSize
704 bytes
joachim’s picture

Can 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.

socketwench’s picture

Wow, that hook goes back a *loooong* way.

socketwench’s picture

Reading 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.

  • socketwench committed 79355ae on 8.x-4.x
    Issue #2744295 by socketwench: Deleted hook_flag_javascript_info_alter...
socketwench’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.