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.

Files: 
CommentFileSizeAuthor
theme-registry-alter.patch621 bytesmerlinofchaos

Comments

Status:Needs review» Reviewed & tested by the community

I tested with the code below in devel.module and the registry did alter properly (use devel.module's theme registry link to verify).

<?php
function devel_theme_registry_alter(&$cache) {
 
$cache['color_scheme_form']['arguments']['form'] = 'foo';
}
?>

there is no significant performance impact since a registry rebuild is an infrequent event.

Nothing to really add here but this ability was already here by going through a crazy hack and this cleans it up!

+1

Status:Reviewed & tested by the community» Fixed

OK, committed.

Status:Fixed» Closed (fixed)