改变现有的主题挂钩

改变现有的主题挂钩

(Issue) Hooks that are used to alter content before being displayed on the page are now available to themes. Some important ones to note are:

Note that although technically all of the alter hooks are exposed to the theme, only a given number of them will actually work due to the way the Drupal bootstrap works. If you need to use hook_menu_alter, for example, you'll have to use a module. These hooks can be exposed in template.php.

Drupal 7.x:

<?php
/**
* Implement hook_page_alter().
*/
function mytheme_page_alter(&$page) {
 
// Remove elements from the page.
}

/**
* Implement hook_css_alter().
*/
function mytheme_css_alter(&$css) {
 
// Replace some CSS files with this theme's special CSS.
}
?>

taxonomy: