Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2016 at 14:35 UTC
Updated:
2 Dec 2016 at 05:59 UTC
Jump to comment: Most recent
Comments
Comment #2
David_Rothstein commentedJust to clarify, this isn't a new hook - it's always been something that theme engines could implement if they needed to (even though core didn't implement it itself).
So I think we should actually document all the theme engine hooks in this issue? Which I believe are:
- hook_extension()
- hook_render_template()
- hook_init()
The first two can be backported from Drupal 8. The third is more complicated since it's a theme-engine-specific "hook" which shares a name with a regular Drupal core hook, but isn't the same thing. Also Drupal 8 doesn't seem to document that one. So maybe we can leave "hook_init" for a separate issue.
The hook_init() problem does make me wonder whether "hook" is even the right terminology for any of these. We have "callback" also (https://www.drupal.org/docs/develop/coding-standards/api-documentation-a...) which I think is closer, although that's not exactly right either. We don't really have a good standard for how to document things for theme engines.