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.
This is probably technically a feature, but it 1) breaks no existing APIs, 2) adds something that we're starting to see needs to be there, thanks to modules like devel.module having really interesting needs to dig into the theme_registry, and 3) is only 1 line + 1 comment that provides very little in the way of risk or liability.
This patch introduces hook_theme_registry_alter(). Documentation will need to follow, obviously, but that goes in the hook documentation.
Comment | File | Size | Author |
---|---|---|---|
theme-registry-alter.patch | 621 bytes | merlinofchaos | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedI tested with the code below in devel.module and the registry did alter properly (use devel.module's theme registry link to verify).
there is no significant performance impact since a registry rebuild is an infrequent event.
Comment #2
dvessel CreditAttribution: dvessel commentedNothing to really add here but this ability was already here by going through a crazy hack and this cleans it up!
+1
Comment #3
Gábor HojtsyOK, committed.
Comment #4
(not verified) CreditAttribution: commented