Token hooks -- hook_token_info(), hook_tokens() etc -- can be in a MODULE.token.inc file.

This removes the need to have a "if (module_exists('token'))" wrapped around the function declarations.

Comments

hansfn’s picture

Assigned: Unassigned » hansfn
Status: Active » Postponed

Sure, that is a good idea, but maybe it should just wait for #2072415: restore use of VBO, but as an operation plugin? However, if it helps you in your work there, I can make the change now.

  • hansfn committed 33cd387 on 7.x-1.x
    Issue #2072437: Move token hooks to .inc file
    
hansfn’s picture

Issue summary: View changes
Status: Postponed » Fixed

I finally moved the hooks. I also realized that I never needed the "if (module_exists('token'))" since these hooks are defined by Drupal core. Anyway, thanks for the suggestion.

Status: Fixed » Closed (fixed)

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