Inicio › API reference ›
hook_theme_registry_alter
hooks/core.php, line 1866
- Versions
- hooks
hook_theme_registry_alter(&$theme_registry)
Alter the theme registry information returned from hook_theme().
The theme registry stores information about all available theme hooks, including which callback functions those hooks will call when triggered, what template files are exposed by these hooks, and so on.
Note that this hook is only executed as the theme cache is re-built. Changes here will not be visible until the next cache clear.
The $theme_registry array is keyed by theme hook name, and contains the information returned from hook_theme(), as well as additional properties added by _theme_process_registry().
For example:
<?php
$theme_registry['user_profile'] = array(
'arguments' => array(
'account' => NULL,
),
'template' => 'modules/user/user-profile',
'file' => 'modules/user/user.pages.inc',
'type' => 'module',
'theme path' => 'modules/user',
'theme paths' => array(
0 => 'modules/user',
),
'preprocess functions' => array(
0 => 'template_preprocess',
1 => 'template_preprocess_user_profile',
),
)
);
?>
See also
@see _theme_process_registry()Parameters
$theme_registry The entire cache of theme registry information, post-processing.
Código
<?php
function hook_theme_registry_alter(&$theme_registry) {
// Kill the next/previous forum topic navigation links.
foreach ($theme_registry['forum_topic_navigation']['preprocess functions'] as $key => $value) {
if ($value = 'template_preprocess_forum_topic_navigation') {
unset($theme_registry['forum_topic_navigation']['preprocess functions'][$key]);
}
}
}
?> 
Comentarios recientes
hace 17 horas 50 mins
hace 1 día 10 horas
hace 1 semana 21 horas
hace 14 semanas 4 días
hace 19 semanas 19 horas
hace 20 semanas 2 días
hace 20 semanas 5 días
hace 20 semanas 5 días
hace 21 semanas 2 días
hace 22 semanas 1 día