Commit a440f52c authored by jhodgdon's avatar jhodgdon

Issue #1443202 by TravisCarden, tim.plunkett, xjm: Make sure hook_preprocess...

Issue #1443202 by TravisCarden, tim.plunkett, xjm: Make sure hook_preprocess documentation points to real funcions
parent 3b571146
...@@ -789,7 +789,7 @@ function _aggregator_items($count) { ...@@ -789,7 +789,7 @@ function _aggregator_items($count) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function aggregator_preprocess_block(&$variables) { function aggregator_preprocess_block(&$variables) {
if ($variables['block']->module == 'aggregator') { if ($variables['block']->module == 'aggregator') {
......
...@@ -1065,7 +1065,7 @@ function _book_link_defaults($nid) { ...@@ -1065,7 +1065,7 @@ function _book_link_defaults($nid) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function book_preprocess_block(&$variables) { function book_preprocess_block(&$variables) {
if ($variables['block']-> module == 'book') { if ($variables['block']-> module == 'book') {
......
...@@ -85,8 +85,9 @@ function hook_comment_view(Drupal\comment\Comment $comment, $view_mode, $langcod ...@@ -85,8 +85,9 @@ function hook_comment_view(Drupal\comment\Comment $comment, $view_mode, $langcod
* *
* If the module wishes to act on the rendered HTML of the comment rather than * If the module wishes to act on the rendered HTML of the comment rather than
* the structured content array, it may use this hook to add a #post_render * the structured content array, it may use this hook to add a #post_render
* callback. Alternatively, it could also implement hook_preprocess_comment(). * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
* See drupal_render() and theme() documentation respectively for details. * comment.tpl.php. See drupal_render() and theme() documentation respectively
* for details.
* *
* @param $build * @param $build
* A renderable array representing the comment. * A renderable array representing the comment.
......
...@@ -2099,7 +2099,7 @@ function comment_form_submit($form, &$form_state) { ...@@ -2099,7 +2099,7 @@ function comment_form_submit($form, &$form_state) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function comment_preprocess_block(&$variables) { function comment_preprocess_block(&$variables) {
if ($variables['block']->module == 'comment') { if ($variables['block']->module == 'comment') {
......
...@@ -400,7 +400,8 @@ function hook_entity_view($entity, $type, $view_mode, $langcode) { ...@@ -400,7 +400,8 @@ function hook_entity_view($entity, $type, $view_mode, $langcode) {
* *
* If a module wishes to act on the rendered HTML of the entity rather than the * If a module wishes to act on the rendered HTML of the entity rather than the
* structured content array, it may use this hook to add a #post_render * structured content array, it may use this hook to add a #post_render
* callback. Alternatively, it could also implement hook_preprocess_ENTITY(). * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
* the particular entity type template, if there is one (e.g., node.tpl.php).
* See drupal_render() and theme() for details. * See drupal_render() and theme() for details.
* *
* @param $build * @param $build
......
...@@ -982,7 +982,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { ...@@ -982,7 +982,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function forum_preprocess_block(&$variables) { function forum_preprocess_block(&$variables) {
if ($variables['block']->module == 'forum') { if ($variables['block']->module == 'forum') {
......
...@@ -66,7 +66,7 @@ function help_help($path, $arg) { ...@@ -66,7 +66,7 @@ function help_help($path, $arg) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function help_preprocess_block(&$variables) { function help_preprocess_block(&$variables) {
if ($variables['block']->module == 'system' && $variables['block']->delta == 'help') { if ($variables['block']->module == 'system' && $variables['block']->delta == 'help') {
......
...@@ -477,7 +477,7 @@ function language_block_view($type) { ...@@ -477,7 +477,7 @@ function language_block_view($type) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function language_preprocess_block(&$variables) { function language_preprocess_block(&$variables) {
if ($variables['block']->module == 'language') { if ($variables['block']->module == 'language') {
......
...@@ -781,7 +781,7 @@ function locale_form_system_file_system_settings_alter(&$form, $form_state) { ...@@ -781,7 +781,7 @@ function locale_form_system_file_system_settings_alter(&$form, $form_state) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for node.tpl.php.
*/ */
function locale_preprocess_node(&$variables) { function locale_preprocess_node(&$variables) {
if ($variables['langcode'] != LANGUAGE_NOT_SPECIFIED) { if ($variables['langcode'] != LANGUAGE_NOT_SPECIFIED) {
......
...@@ -796,7 +796,7 @@ function menu_get_menus($all = TRUE) { ...@@ -796,7 +796,7 @@ function menu_get_menus($all = TRUE) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function menu_preprocess_block(&$variables) { function menu_preprocess_block(&$variables) {
if ($variables['block']->module == 'menu') { if ($variables['block']->module == 'menu') {
......
...@@ -834,8 +834,9 @@ function hook_node_view(Drupal\node\Node $node, $view_mode, $langcode) { ...@@ -834,8 +834,9 @@ function hook_node_view(Drupal\node\Node $node, $view_mode, $langcode) {
* *
* If the module wishes to act on the rendered HTML of the node rather than the * If the module wishes to act on the rendered HTML of the node rather than the
* structured content array, it may use this hook to add a #post_render * structured content array, it may use this hook to add a #post_render
* callback. Alternatively, it could also implement hook_preprocess_node(). See * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
* drupal_render() and theme() documentation respectively for details. * node.tpl.php. See drupal_render() and theme() documentation respectively
* for details.
* *
* @param $build * @param $build
* A renderable array representing the node content. * A renderable array representing the node content.
......
...@@ -1302,7 +1302,7 @@ function node_is_page(Node $node) { ...@@ -1302,7 +1302,7 @@ function node_is_page(Node $node) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function node_preprocess_block(&$variables) { function node_preprocess_block(&$variables) {
if ($variables['block']->module == 'node') { if ($variables['block']->module == 'node') {
......
...@@ -445,7 +445,7 @@ function overlay_system_info_alter(&$info, $file, $type) { ...@@ -445,7 +445,7 @@ function overlay_system_info_alter(&$info, $file, $type) {
} }
/** /**
* Implements hook_preprocess_html(). * Implements hook_preprocess_HOOK() for html.tpl.php.
* *
* If the current page request is inside the overlay, add appropriate classes * If the current page request is inside the overlay, add appropriate classes
* to the <body> element, and simplify the page title. * to the <body> element, and simplify the page title.
...@@ -460,12 +460,10 @@ function overlay_preprocess_html(&$variables) { ...@@ -460,12 +460,10 @@ function overlay_preprocess_html(&$variables) {
} }
/** /**
* Implements hook_preprocess_maintenance_page(). * Implements hook_preprocess_HOOK() for maintenance-page.tpl.php.
* *
* If the current page request is inside the overlay, add appropriate classes * If the current page request is inside the overlay, add appropriate classes
* to the <body> element, and simplify the page title. * to the <body> element, and simplify the page title.
*
* @see overlay_preprocess_maintenance_page()
*/ */
function overlay_preprocess_maintenance_page(&$variables) { function overlay_preprocess_maintenance_page(&$variables) {
overlay_preprocess_html($variables); overlay_preprocess_html($variables);
...@@ -495,7 +493,7 @@ function template_process_overlay(&$variables) { ...@@ -495,7 +493,7 @@ function template_process_overlay(&$variables) {
} }
/** /**
* Implements hook_preprocess_page(). * Implements hook_preprocess_HOOK() for page.tpl.php.
* *
* Hide tabs inside the overlay. * Hide tabs inside the overlay.
* *
......
...@@ -775,7 +775,7 @@ function poll_vote($form, &$form_state) { ...@@ -775,7 +775,7 @@ function poll_vote($form, &$form_state) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function poll_preprocess_block(&$variables) { function poll_preprocess_block(&$variables) {
if ($variables['block']->module == 'poll') { if ($variables['block']->module == 'poll') {
......
...@@ -461,7 +461,7 @@ function rdf_process(&$variables, $hook) { ...@@ -461,7 +461,7 @@ function rdf_process(&$variables, $hook) {
} }
/** /**
* Implements MODULE_preprocess_HOOK() * Implements hook_preprocess_HOOK() for html.tpl.php.
*/ */
function rdf_preprocess_html(&$variables) { function rdf_preprocess_html(&$variables) {
// Adds RDF namespace prefix bindings in the form of an RDFa 1.1 prefix // Adds RDF namespace prefix bindings in the form of an RDFa 1.1 prefix
...@@ -473,7 +473,7 @@ function rdf_preprocess_html(&$variables) { ...@@ -473,7 +473,7 @@ function rdf_preprocess_html(&$variables) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for node.tpl.php.
*/ */
function rdf_preprocess_node(&$variables) { function rdf_preprocess_node(&$variables) {
// Adds RDFa markup to the node container. The about attribute specifies the // Adds RDFa markup to the node container. The about attribute specifies the
...@@ -556,7 +556,7 @@ function rdf_preprocess_node(&$variables) { ...@@ -556,7 +556,7 @@ function rdf_preprocess_node(&$variables) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for field.tpl.php.
*/ */
function rdf_preprocess_field(&$variables) { function rdf_preprocess_field(&$variables) {
$element = $variables['element']; $element = $variables['element'];
...@@ -584,7 +584,7 @@ function rdf_preprocess_field(&$variables) { ...@@ -584,7 +584,7 @@ function rdf_preprocess_field(&$variables) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for user-profile.tpl.php.
*/ */
function rdf_preprocess_user_profile(&$variables) { function rdf_preprocess_user_profile(&$variables) {
$account = $variables['elements']['#account']; $account = $variables['elements']['#account'];
...@@ -621,7 +621,7 @@ function rdf_preprocess_user_profile(&$variables) { ...@@ -621,7 +621,7 @@ function rdf_preprocess_user_profile(&$variables) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for theme_username().
*/ */
function rdf_preprocess_username(&$variables) { function rdf_preprocess_username(&$variables) {
// Because lang is set on the HTML element that wraps the page, the // Because lang is set on the HTML element that wraps the page, the
...@@ -676,7 +676,7 @@ function rdf_preprocess_username(&$variables) { ...@@ -676,7 +676,7 @@ function rdf_preprocess_username(&$variables) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for comment.tpl.php.
*/ */
function rdf_preprocess_comment(&$variables) { function rdf_preprocess_comment(&$variables) {
$comment = $variables['comment']; $comment = $variables['comment'];
...@@ -734,7 +734,7 @@ function rdf_preprocess_comment(&$variables) { ...@@ -734,7 +734,7 @@ function rdf_preprocess_comment(&$variables) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for taxonomy-term.tpl.php.
*/ */
function rdf_preprocess_taxonomy_term(&$variables) { function rdf_preprocess_taxonomy_term(&$variables) {
// Adds the RDF type of the term and the term name in a <meta> tag. // Adds the RDF type of the term and the term name in a <meta> tag.
...@@ -778,7 +778,7 @@ function rdf_field_attach_view_alter(&$output, $context) { ...@@ -778,7 +778,7 @@ function rdf_field_attach_view_alter(&$output, $context) {
} }
/** /**
* Implements MODULE_preprocess_HOOK(). * Implements hook_preprocess_HOOK() for theme_image().
*/ */
function rdf_preprocess_image(&$variables) { function rdf_preprocess_image(&$variables) {
// Adds the RDF type for image. We cannot use the usual entity-based mapping // Adds the RDF type for image. We cannot use the usual entity-based mapping
...@@ -830,11 +830,11 @@ function rdf_preprocess_image(&$variables) { ...@@ -830,11 +830,11 @@ function rdf_preprocess_image(&$variables) {
* wrapped by a <span> tag. Modules implementing preprocess functions that * wrapped by a <span> tag. Modules implementing preprocess functions that
* set 'rdf_template_variable_attributes_array' for a particular template * set 'rdf_template_variable_attributes_array' for a particular template
* variable that might contain block level HTML must also implement * variable that might contain block level HTML must also implement
* hook_preprocess_rdf_template_variable_wrapper() and set 'inline' to FALSE * hook_preprocess_HOOK() for theme_rdf_template_variable_wrapper() and set
* for that context. Themes that render normally inline content with block * 'inline' to FALSE for that context. Themes that render normally inline
* level HTML must similarly implement * content with block level HTML must similarly implement
* hook_preprocess_rdf_template_variable_wrapper() and set 'inline' * hook_preprocess_HOOK() for theme_rdf_template_variable_wrapper() and set
* accordingly. * 'inline' accordingly.
* *
* @see rdf_process() * @see rdf_process()
* @ingroup themeable * @ingroup themeable
......
...@@ -156,7 +156,7 @@ function search_block_view($delta = '') { ...@@ -156,7 +156,7 @@ function search_block_view($delta = '') {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function search_preprocess_block(&$variables) { function search_preprocess_block(&$variables) {
if ($variables['block']->module == 'search' && $variables['block']->delta == 'form') { if ($variables['block']->module == 'search' && $variables['block']->delta == 'form') {
......
...@@ -640,7 +640,7 @@ function shortcut_renderable_links($shortcut_set = NULL) { ...@@ -640,7 +640,7 @@ function shortcut_renderable_links($shortcut_set = NULL) {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function shortcut_preprocess_block(&$variables) { function shortcut_preprocess_block(&$variables) {
if ($variables['block']->module == 'shortcut') { if ($variables['block']->module == 'shortcut') {
...@@ -649,7 +649,7 @@ function shortcut_preprocess_block(&$variables) { ...@@ -649,7 +649,7 @@ function shortcut_preprocess_block(&$variables) {
} }
/** /**
* Implements hook_preprocess_page(). * Implements hook_preprocess_HOOK() for page.tpl.php.
*/ */
function shortcut_preprocess_page(&$variables) { function shortcut_preprocess_page(&$variables) {
// Only display the shortcut link if the user has the ability to edit // Only display the shortcut link if the user has the ability to edit
......
...@@ -449,7 +449,7 @@ function statistics_update_index() { ...@@ -449,7 +449,7 @@ function statistics_update_index() {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function statistics_preprocess_block(&$variables) { function statistics_preprocess_block(&$variables) {
if ($variables['block']->module == 'statistics') { if ($variables['block']->module == 'statistics') {
......
...@@ -2118,7 +2118,7 @@ function system_block_view($delta = '') { ...@@ -2118,7 +2118,7 @@ function system_block_view($delta = '') {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function system_preprocess_block(&$variables) { function system_preprocess_block(&$variables) {
if ($variables['block']->module == 'system') { if ($variables['block']->module == 'system') {
......
...@@ -139,7 +139,7 @@ function _theme_test_suggestion() { ...@@ -139,7 +139,7 @@ function _theme_test_suggestion() {
} }
/** /**
* Implements hook_preprocess_html(). * Implements hook_preprocess_HOOK() for html.tpl.php.
*/ */
function theme_test_preprocess_html(&$variables) { function theme_test_preprocess_html(&$variables) {
$variables['html_attributes_array']['theme_test_html_attribute'] = 'theme test html attribute value'; $variables['html_attributes_array']['theme_test_html_attribute'] = 'theme test html attribute value';
......
...@@ -591,9 +591,9 @@ class ThemeHtmlTplPhpAttributesTestCase extends DrupalWebTestCase { ...@@ -591,9 +591,9 @@ class ThemeHtmlTplPhpAttributesTestCase extends DrupalWebTestCase {
function testThemeHtmlTplPhpAttributes() { function testThemeHtmlTplPhpAttributes() {
$this->drupalGet(''); $this->drupalGet('');
$attributes = $this->xpath('/html[@theme_test_html_attribute="theme test html attribute value"]'); $attributes = $this->xpath('/html[@theme_test_html_attribute="theme test html attribute value"]');
$this->assertTrue(count($attributes) == 1, t('Attribute set in the html element via hook_preprocess_html() found.')); $this->assertTrue(count($attributes) == 1, 'Attribute set in the html element via hook_preprocess_HOOK() for html.tpl.php found.');
$attributes = $this->xpath('/html/body[@theme_test_body_attribute="theme test body attribute value"]'); $attributes = $this->xpath('/html/body[@theme_test_body_attribute="theme test body attribute value"]');
$this->assertTrue(count($attributes) == 1, t('Attribute set in the body element via hook_preprocess_html() found.')); $this->assertTrue(count($attributes) == 1, 'Attribute set in the body element via hook_preprocess_HOOK() for html.tpl.php found.');
} }
} }
......
...@@ -232,8 +232,8 @@ function hook_taxonomy_term_delete(TaxonomyTerm $term) { ...@@ -232,8 +232,8 @@ function hook_taxonomy_term_delete(TaxonomyTerm $term) {
* If the module wishes to act on the rendered HTML of the term rather than the * If the module wishes to act on the rendered HTML of the term rather than the
* structured content array, it may use this hook to add a #post_render * structured content array, it may use this hook to add a #post_render
* callback. Alternatively, it could also implement * callback. Alternatively, it could also implement
* hook_preprocess_taxonomy_term(). See drupal_render() and theme() * hook_preprocess_HOOK() for taxonomy-term.tpl.php. See drupal_render() and
* documentation respectively for details. * theme() documentation respectively for details.
* *
* @param $build * @param $build
* A renderable array representing the taxonomy term content. * A renderable array representing the taxonomy term content.
......
...@@ -140,7 +140,7 @@ function toolbar_pre_render($toolbar) { ...@@ -140,7 +140,7 @@ function toolbar_pre_render($toolbar) {
} }
/** /**
* Implements hook_preprocess_html(). * Implements hook_preprocess_HOOK() for html.tpl.php.
* *
* Add some page classes, so global page theming can adjust to the toolbar. * Add some page classes, so global page theming can adjust to the toolbar.
*/ */
...@@ -154,7 +154,7 @@ function toolbar_preprocess_html(&$vars) { ...@@ -154,7 +154,7 @@ function toolbar_preprocess_html(&$vars) {
} }
/** /**
* Implements hook_preprocess_toolbar(). * Implements hook_preprocess_HOOK() for toolbar.tpl.php.
* *
* Adding the 'overlay-displace-top' class to the toolbar pushes the overlay * Adding the 'overlay-displace-top' class to the toolbar pushes the overlay
* down, so it appears below the toolbar. * down, so it appears below the toolbar.
......
...@@ -353,8 +353,9 @@ function hook_user_view($account, $view_mode, $langcode) { ...@@ -353,8 +353,9 @@ function hook_user_view($account, $view_mode, $langcode) {
* *
* If the module wishes to act on the rendered HTML of the user rather than the * If the module wishes to act on the rendered HTML of the user rather than the
* structured content array, it may use this hook to add a #post_render callback. * structured content array, it may use this hook to add a #post_render callback.
* Alternatively, it could also implement hook_preprocess_user_profile(). See * Alternatively, it could also implement hook_preprocess_HOOK() for
* drupal_render() and theme() documentation respectively for details. * user-profile.tpl.php. See drupal_render() and theme() documentation
* respectively for details.
* *
* @param $build * @param $build
* A renderable array representing the user. * A renderable array representing the user.
......
...@@ -1172,7 +1172,7 @@ function user_block_view($delta = '') { ...@@ -1172,7 +1172,7 @@ function user_block_view($delta = '') {
} }
/** /**
* Implements hook_preprocess_block(). * Implements hook_preprocess_HOOK() for block.tpl.php.
*/ */
function user_preprocess_block(&$variables) { function user_preprocess_block(&$variables) {
if ($variables['block']->module == 'user') { if ($variables['block']->module == 'user') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment