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.
Follow up to #2407489: Remove user.pages.inc.
user.pages.inc was removed, but this is still referenced in the docblock for hook_theme_registry_alter(). Suggest giving another example which has a separate file with theme functions.
Comment | File | Size | Author |
---|---|---|---|
#3 | drupal_hook_theme_registry_alter-documentation_2408265_3.patch | 1.27 KB | wadmiraal |
Comments
Comment #1
jhodgdonYeah, probably it would be better to find an implementation of hook_theme() from another module and replace it with that example. Or better yet, make a dummy implementation of the hook, and use a debugger to look at the value you get, and take an array element from that and put it into the documentation.
Comment #2
wadmiraal CreditAttribution: wadmiraal commentedI'll have a look at it.
Comment #3
wadmiraal CreditAttribution: wadmiraal commentedActually, the array structure is quite different. Block Content has a nice example we can use:
Updated docblock in patch.
Comment #4
jhodgdonThanks! Looks good to me.
Comment #5
kim.pepperWhile there are a number of new attributes, there is no example of using the 'file' attribute, which was the reason for the original issue.
Comment #6
wadmiraal CreditAttribution: wadmiraal commentedAs far as I can see, there is no
file
attribute. It was renamedincludes
, it seems. At least, that's what a var_dump inhook_theme_registry_alter()
tells us. Inhook_theme()
, it is called file, though:Comment #8
alexpottDocs are not frozen in beta. Committed 7d80c96 and pushed to 8.0.x. Thanks!