From fa4ddffe3c04fa47be8c6cca3f2428e02cf5a06b Mon Sep 17 00:00:00 2001
From: TravisCarden <TravisCarden@236758.no-reply.drupal.org>
Date: Mon, 26 Mar 2012 22:03:52 -0500
Subject: [PATCH] Issue #1443202: Applied documentation standards for hook_preprocess_HOOK().

---
 core/modules/aggregator/aggregator.module       |    2 +-
 core/modules/book/book.module                   |    2 +-
 core/modules/comment/comment.api.php            |    5 +++--
 core/modules/comment/comment.module             |    2 +-
 core/modules/entity/entity.api.php              |    4 ++--
 core/modules/forum/forum.module                 |    2 +-
 core/modules/help/help.module                   |    2 +-
 core/modules/locale/locale.module               |    2 +-
 core/modules/menu/menu.module                   |    2 +-
 core/modules/node/node.api.php                  |    5 +++--
 core/modules/node/node.module                   |    2 +-
 core/modules/overlay/overlay.module             |    8 +++-----
 core/modules/poll/poll.module                   |    2 +-
 core/modules/rdf/rdf.module                     |   10 +++++-----
 core/modules/search/search.module               |    2 +-
 core/modules/shortcut/shortcut.module           |    4 ++--
 core/modules/simpletest/tests/theme.test        |    4 ++--
 core/modules/simpletest/tests/theme_test.module |    2 +-
 core/modules/statistics/statistics.module       |    2 +-
 core/modules/system/system.module               |    2 +-
 core/modules/taxonomy/taxonomy.api.php          |    4 ++--
 core/modules/toolbar/toolbar.module             |    4 ++--
 core/modules/user/user.api.php                  |    5 +++--
 core/modules/user/user.module                   |    2 +-
 core/themes/bartik/template.php                 |    2 +-
 25 files changed, 42 insertions(+), 41 deletions(-)

diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index fec4f0b..33d3464 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -782,7 +782,7 @@ function _aggregator_items($count) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function aggregator_preprocess_block(&$variables) {
   if ($variables['block']->module == 'aggregator') {
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index a6ac5c4..33f1b82 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -1067,7 +1067,7 @@ function _book_link_defaults($nid) {
 }
 
  /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function book_preprocess_block(&$variables) {
   if ($variables['block']-> module == 'book') {
diff --git a/core/modules/comment/comment.api.php b/core/modules/comment/comment.api.php
index f270aad..d334216 100644
--- a/core/modules/comment/comment.api.php
+++ b/core/modules/comment/comment.api.php
@@ -85,8 +85,9 @@ function hook_comment_view($comment, $view_mode, $langcode) {
  *
  * 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
- * callback. Alternatively, it could also implement hook_preprocess_comment().
- * See drupal_render() and theme() documentation respectively for details.
+ * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
+ * theme_comment(). See drupal_render() and theme() documentation respectively
+ * for details.
  *
  * @param $build
  *   A renderable array representing the comment.
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 1a3580f..7581918 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -2100,7 +2100,7 @@ function comment_form_submit($form, &$form_state) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function comment_preprocess_block(&$variables) {
   if ($variables['block']->module == 'comment') {
diff --git a/core/modules/entity/entity.api.php b/core/modules/entity/entity.api.php
index e983778..f647b68 100644
--- a/core/modules/entity/entity.api.php
+++ b/core/modules/entity/entity.api.php
@@ -399,8 +399,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
  * structured content array, it may use this hook to add a #post_render
- * callback. Alternatively, it could also implement hook_preprocess_ENTITY().
- * See drupal_render() and theme() for details.
+ * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
+ * theme_ENTITY(). See drupal_render() and theme() for details.
  *
  * @param $build
  *   A renderable array representing the entity content.
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 4c12c41..6f2672d 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -962,7 +962,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function forum_preprocess_block(&$variables) {
   if ($variables['block']->module == 'forum') {
diff --git a/core/modules/help/help.module b/core/modules/help/help.module
index 9e74751..a43720e 100644
--- a/core/modules/help/help.module
+++ b/core/modules/help/help.module
@@ -66,7 +66,7 @@ function help_help($path, $arg) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function help_preprocess_block(&$variables) {
   if ($variables['block']->module == 'help') {
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 6d3ded0..67cd50b 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -937,7 +937,7 @@ function locale_block_view($type) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function locale_preprocess_block(&$variables) {
   if ($variables['block']->module == 'locale') {
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 6862eae..08cff8b 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -795,7 +795,7 @@ function menu_get_menus($all = TRUE) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function menu_preprocess_block(&$variables) {
   if ($variables['block']->module == 'menu') {
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index 2324b47..bbba9c5 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -834,8 +834,9 @@ function hook_node_view($node, $view_mode, $langcode) {
  *
  * 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
- * callback.  Alternatively, it could also implement hook_preprocess_node(). See
- * drupal_render() and theme() documentation respectively for details.
+ * callback.  Alternatively, it could also implement hook_preprocess_HOOK() for
+ * theme_node(). See  * drupal_render() and theme() documentation respectively
+ * for details.
  *
  * @param $build
  *   A renderable array representing the node content.
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index be60e48..19d69ed 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -1491,7 +1491,7 @@ function node_is_page($node) {
 }
 
  /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function node_preprocess_block(&$variables) {
   if ($variables['block']->module == 'node') {
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index 58dcbab..5c7bb8d 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -443,7 +443,7 @@ function overlay_system_info_alter(&$info, $file, $type) {
 }
 
 /**
- * Implements hook_preprocess_html().
+ * Implements hook_preprocess_HOOK() for theme_html().
  *
  * If the current page request is inside the overlay, add appropriate classes
  * to the <body> element, and simplify the page title.
@@ -458,12 +458,10 @@ function overlay_preprocess_html(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_maintenance_page().
+ * Implements hook_preprocess_HOOK() for theme_maintenance_page().
  *
  * If the current page request is inside the overlay, add appropriate classes
  * to the <body> element, and simplify the page title.
- *
- * @see overlay_preprocess_maintenance_page()
  */
 function overlay_preprocess_maintenance_page(&$variables) {
   overlay_preprocess_html($variables);
@@ -493,7 +491,7 @@ function template_process_overlay(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_page().
+ * Implements hook_preprocess_HOOK() for theme_page().
  *
  * Hide tabs inside the overlay.
  *
diff --git a/core/modules/poll/poll.module b/core/modules/poll/poll.module
index 154db55..bf30ab4 100644
--- a/core/modules/poll/poll.module
+++ b/core/modules/poll/poll.module
@@ -776,7 +776,7 @@ function poll_vote($form, &$form_state) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function poll_preprocess_block(&$variables) {
   if ($variables['block']->module == 'poll') {
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 8f9c025..78dad18 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -830,11 +830,11 @@ function rdf_preprocess_image(&$variables) {
  *     wrapped by a <span> tag. Modules implementing preprocess functions that
  *     set 'rdf_template_variable_attributes_array' for a particular template
  *     variable that might contain block level HTML must also implement
- *     hook_preprocess_rdf_template_variable_wrapper() and set 'inline' to FALSE
- *     for that context. Themes that render normally inline content with block
- *     level HTML must similarly implement
- *     hook_preprocess_rdf_template_variable_wrapper() and set 'inline'
- *     accordingly.
+ *     hook_preprocess_HOOK() for theme_rdf_template_variable_wrapper() and set
+ *     'inline' to FALSE for that context. Themes that render normally inline
+ *     content with block level HTML must similarly implement
+ *     hook_preprocess_HOOK() for theme_rdf_template_variable_wrapper() and set
+ *     'inline' accordingly.
  *
  * @see rdf_process()
  * @ingroup themeable
diff --git a/core/modules/search/search.module b/core/modules/search/search.module
index 22bc257..cb94c95 100644
--- a/core/modules/search/search.module
+++ b/core/modules/search/search.module
@@ -154,7 +154,7 @@ function search_block_view($delta = '') {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function search_preprocess_block(&$variables) {
   if ($variables['block']->module == 'search' && $variables['block']->delta == 'form') {
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index 3602822..20c8de2 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -640,7 +640,7 @@ function shortcut_renderable_links($shortcut_set = NULL) {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function shortcut_preprocess_block(&$variables) {
   if ($variables['block']->module == 'shortcut') {
@@ -649,7 +649,7 @@ function shortcut_preprocess_block(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_page().
+ * Implements hook_preprocess_HOOK() for theme_page().
  */
 function shortcut_preprocess_page(&$variables) {
   // Only display the shortcut link if the user has the ability to edit
diff --git a/core/modules/simpletest/tests/theme.test b/core/modules/simpletest/tests/theme.test
index 978887c..eee78d9 100644
--- a/core/modules/simpletest/tests/theme.test
+++ b/core/modules/simpletest/tests/theme.test
@@ -578,9 +578,9 @@ class ThemeHtmlTplPhpAttributesTestCase extends DrupalWebTestCase {
   function testThemeHtmlTplPhpAttributes() {
     $this->drupalGet('');
     $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, t('Attribute set in the html element via hook_preprocess_HOOK() for theme_html() found.'));
     $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, t('Attribute set in the body element via hook_preprocess_HOOK() for theme_html() found.'));
   }
 }
 
diff --git a/core/modules/simpletest/tests/theme_test.module b/core/modules/simpletest/tests/theme_test.module
index f6065f2..4a27407 100644
--- a/core/modules/simpletest/tests/theme_test.module
+++ b/core/modules/simpletest/tests/theme_test.module
@@ -136,7 +136,7 @@ function _theme_test_suggestion() {
 }
 
 /**
- * Implements hook_preprocess_html().
+ * Implements hook_preprocess_HOOK() for theme_html().
  */
 function theme_test_preprocess_html(&$variables) {
   $variables['html_attributes_array']['theme_test_html_attribute'] = 'theme test html attribute value';
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index af1f833..661fc61 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -429,7 +429,7 @@ function statistics_update_index() {
   variable_set('node_cron_views_scale', 1.0 / max(1, db_query('SELECT MAX(totalcount) FROM {node_counter}')->fetchField()));
 }
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function statistics_preprocess_block(&$variables) {
   if ($variables['block']->module == 'statistics') {
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index fd571ce..6f60099 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2110,7 +2110,7 @@ function system_block_view($delta = '') {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function system_preprocess_block(&$variables) {
   if ($variables['block']->module == 'system') {
diff --git a/core/modules/taxonomy/taxonomy.api.php b/core/modules/taxonomy/taxonomy.api.php
index 426306d..46bedfc 100644
--- a/core/modules/taxonomy/taxonomy.api.php
+++ b/core/modules/taxonomy/taxonomy.api.php
@@ -233,8 +233,8 @@ function hook_taxonomy_term_delete($term) {
  * 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
  * callback. Alternatively, it could also implement
- * hook_preprocess_taxonomy_term(). See drupal_render() and theme()
- * documentation respectively for details.
+ * hook_preprocess_HOOK() for theme_taxonomy_term(). See drupal_render() and
+ * theme() documentation respectively for details.
  *
  * @param $build
  *   A renderable array representing the node content.
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index e2bff73..5824466 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -140,7 +140,7 @@ function toolbar_pre_render($toolbar) {
 }
 
 /**
- * Implements hook_preprocess_html().
+ * Implements hook_preprocess_HOOK() for theme_html().
  *
  * Add some page classes, so global page theming can adjust to the toolbar.
  */
@@ -154,7 +154,7 @@ function toolbar_preprocess_html(&$vars) {
 }
 
 /**
- * Implements hook_preprocess_toolbar().
+ * Implements hook_preprocess_HOOK() for theme_toolbar().
  *
  * Adding the 'overlay-displace-top' class to the toolbar pushes the overlay
  * down, so it appears below the toolbar.
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index dc16906..2e1b977 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -363,8 +363,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
  * structured content array, it may use this hook to add a #post_render callback.
- * Alternatively, it could also implement hook_preprocess_user_profile(). See
- * drupal_render() and theme() documentation respectively for details.
+ * Alternatively, it could also implement hook_preprocess_HOOK() for
+ * theme_user_profile(). See drupal_render() and theme() documentation
+ * respectively for details.
  *
  * @param $build
  *   A renderable array representing the user.
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 865f17b..2e57826 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -1330,7 +1330,7 @@ function user_block_view($delta = '') {
 }
 
 /**
- * Implements hook_preprocess_block().
+ * Implements hook_preprocess_HOOK() for theme_block().
  */
 function user_preprocess_block(&$variables) {
   if ($variables['block']->module == 'user') {
diff --git a/core/themes/bartik/template.php b/core/themes/bartik/template.php
index 459a593..3c9a276 100644
--- a/core/themes/bartik/template.php
+++ b/core/themes/bartik/template.php
@@ -70,7 +70,7 @@ function bartik_process_page(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_maintenance_page().
+ * Implements hook_preprocess_HOOK() for theme_maintenance_page().
  */
 function bartik_preprocess_maintenance_page(&$variables) {
   // By default, site_name is set to Drupal if no db connection is available
-- 
1.7.4.1

