diff options
26 files changed, 90 insertions, 90 deletions
diff --git a/modules/blog/blog.pages.inc b/modules/blog/blog.pages.inc index b12904bf1..35556008e 100644 --- a/modules/blog/blog.pages.inc +++ b/modules/blog/blog.pages.inc @@ -44,7 +44,7 @@ function blog_page_user($account) { if (!empty($nids)) { $nodes = node_load_multiple($nids); - $build += node_build_multiple($nodes); + $build += node_view_multiple($nodes); $build['pager'] = array( '#theme' => 'pager', '#weight' => 5, @@ -84,7 +84,7 @@ function blog_page_last() { if (!empty($nids)) { $nodes = node_load_multiple($nids); - $build += node_build_multiple($nodes); + $build += node_view_multiple($nodes); $build['pager'] = array( '#theme' => 'pager', '#weight' => 5, diff --git a/modules/book/book.module b/modules/book/book.module index dda0d12fb..496b68afe 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -1110,7 +1110,7 @@ function book_export_traverse($tree, $visit_func) { * The HTML generated for the given node. */ function book_node_export($node, $children = '') { - $build = node_build($node, 'print'); + $build = node_view($node, 'print'); unset($build['#theme']); // @todo Rendering should happen in the template using render(). $node->rendered = drupal_render($build); diff --git a/modules/comment/comment.api.php b/modules/comment/comment.api.php index c9b8da1a3..1eb3a891e 100644 --- a/modules/comment/comment.api.php +++ b/modules/comment/comment.api.php @@ -87,9 +87,9 @@ function hook_comment_view($comment) { * @param $build * A renderable array representing the comment. * - * @see comment_build() + * @see comment_view() */ -function hook_comment_build_alter($build) { +function hook_comment_view_alter($build) { // Check for the existence of a field added by another module. if ($build['#build_mode'] == 'full' && isset($build['an_additional_field'])) { // Change its weight. diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 9f018dba8..f12c8008f 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -602,7 +602,7 @@ function comment_node_page_additions($node) { if ($cids = comment_get_thread($node, $mode, $comments_per_page)) { $comments = comment_load_multiple($cids); comment_prepare_thread($comments); - $build = comment_build_multiple($comments, $node); + $build = comment_view_multiple($comments, $node); $build['#attached']['css'][] = drupal_get_path('module', 'comment') . '/comment.css'; $build['pager']['#theme'] = 'pager'; $additions['comments'] = $build; @@ -785,7 +785,7 @@ function comment_prepare_thread(&$comments) { * @return * An array as expected by drupal_render(). */ -function comment_build($comment, $node, $build_mode = 'full') { +function comment_view($comment, $node, $build_mode = 'full') { // Populate $comment->content with a render() array. comment_build_content($comment, $node, $build_mode); @@ -823,7 +823,7 @@ function comment_build($comment, $node, $build_mode = 'full') { } // Allow modules to modify the structured comment. - drupal_alter('comment_build', $build); + drupal_alter('comment_view', $build); return $build; } @@ -941,14 +941,14 @@ function comment_links($comment, $node) { * @return * An array in the format expected by drupal_render(). */ -function comment_build_multiple($comments, $node, $build_mode = 'full', $weight = 0) { +function comment_view_multiple($comments, $node, $build_mode = 'full', $weight = 0) { field_attach_prepare_view('comment', $comments, $build_mode); $build = array( '#sorted' => TRUE, ); foreach ($comments as $comment) { - $build[$comment->cid] = comment_build($comment, $node, $build_mode); + $build[$comment->cid] = comment_view($comment, $node, $build_mode); $build[$comment->cid]['#weight'] = $weight; $weight++; } @@ -1315,7 +1315,7 @@ function comment_save($comment) { } else { // Add the comment to database. This next section builds the thread field. - // Also see the documentation for comment_build(). + // Also see the documentation for comment_view(). if ($comment->pid == 0) { // This is a comment with no parent comment (depth 0): we start // by retrieving the maximum thread level. @@ -1628,7 +1628,7 @@ function comment_get_display_ordinal($cid, $node_type) { else { // For threaded comments, the c.thread column is used for ordering. We can // use the vancode for comparison, but must remove the trailing slash. - // @see comment_build_multiple(). + // @see comment_view_multiple(). $query->where('SUBSTRING(c1.thread, 1, (LENGTH(c1.thread) -1)) < SUBSTRING(c2.thread, 1, (LENGTH(c2.thread) -1))'); } @@ -1904,7 +1904,7 @@ function comment_preview($comment) { $comment->created = !empty($comment->created) ? $comment->created : REQUEST_TIME; $comment->changed = REQUEST_TIME; $comment->in_preview = TRUE; - $comment_build = comment_build($comment, $node); + $comment_build = comment_view($comment, $node); $comment_build += array( '#weight' => -100, '#prefix' => '<div class="preview">', @@ -1918,11 +1918,11 @@ function comment_preview($comment) { $build = array(); if ($comments = comment_load_multiple(array($comment->pid), array('status' => COMMENT_PUBLISHED))) { $parent_comment = $comments[$comment->pid]; - $build = comment_build($parent_comment, $node); + $build = comment_view($parent_comment, $node); } } else { - $build = node_build($node); + $build = node_view($node); } $form['comment_output_below'] = $build; diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc index b3b36f6a3..345b9ceb7 100644 --- a/modules/comment/comment.pages.inc +++ b/modules/comment/comment.pages.inc @@ -65,7 +65,7 @@ function comment_reply($node, $pid = NULL) { $comment->node_type = 'comment_node_' . $node->type; field_attach_load('comment', array($comment->cid => $comment)); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; - $build['comment_parent'] = comment_build($comment, $node); + $build['comment_parent'] = comment_view($comment, $node); } else { drupal_set_message(t('The comment you are replying to does not exist.'), 'error'); @@ -74,7 +74,7 @@ function comment_reply($node, $pid = NULL) { } // This is the case where the comment is in response to a node. Display the node. elseif (user_access('access content')) { - $build['comment_node'] = node_build($node); + $build['comment_node'] = node_view($node); } // Should we show the reply box? diff --git a/modules/contextual/contextual.module b/modules/contextual/contextual.module index e414eb3d6..080cf0d3a 100644 --- a/modules/contextual/contextual.module +++ b/modules/contextual/contextual.module @@ -59,7 +59,7 @@ function contextual_library() { /** * Template variable preprocessor for contextual links. * - * @see contextual_links_build() + * @see contextual_links_view() */ function contextual_preprocess(&$variables, $hook) { static $hooks; @@ -89,7 +89,7 @@ function contextual_preprocess(&$variables, $hook) { } if (isset($element) && is_array($element) && !empty($element['#contextual_links'])) { - $variables['contextual_links'] = contextual_links_build($element); + $variables['contextual_links'] = contextual_links_view($element); if (!empty($variables['contextual_links'])) { $variables['classes_array'][] = 'contextual-links-region'; } @@ -116,7 +116,7 @@ function contextual_preprocess(&$variables, $hook) { * * @see menu_contextual_links() */ -function contextual_links_build($element) { +function contextual_links_view($element) { static $destination; // Retrieve contextual menu links. diff --git a/modules/field/field.api.php b/modules/field/field.api.php index ae4f91c34..46bdfe91b 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -525,7 +525,7 @@ function hook_field_is_empty($item, $field) { * Widget hooks are typically called by the Field Attach API during the * creation of the field form structure with field_attach_form(). * @see hook_field_widget_info_alter(). - * @see hook_field_widget(). + * @see hook_field_widget_form(). * @see hook_field_widget_error(). * * @return @@ -649,7 +649,7 @@ function hook_field_widget_info_alter(&$info) { * @return * The form elements for a single widget for this field. */ -function hook_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { +function hook_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { $element += array( '#type' => $instance['widget']['type'], '#default_value' => isset($items[$delta]) ? $items[$delta] : '', @@ -684,7 +684,7 @@ function hook_field_widget_error($element, $error) { * * @see hook_field_formatter_info(). * @see hook_field_formatter_info_alter(). - * @see hook_field_formatter(). + * @see hook_field_formatter_view(). * @see hook_field_formatter_prepare_view(). * * @return @@ -816,7 +816,7 @@ function hook_field_formatter_prepare_view($obj_type, $objects, $field, $instanc * A renderable array for the $items, as an array of child elements keyed * by numeric indexes starting from 0. */ -function hook_field_formatter($obj_type, $object, $field, $instance, $langcode, $items, $display) { +function hook_field_formatter_view($obj_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); $settings = $display['settings']; diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc index d87ac3a1a..ef26af253 100644 --- a/modules/field/field.attach.inc +++ b/modules/field/field.attach.inc @@ -1144,7 +1144,7 @@ function field_attach_prepare_view($obj_type, $objects, $build_mode = 'full') { * '#formatter' => the name of the formatter, * '#items' => the field values being displayed, * // The element's children are the formatted values returned by - * // hook_field_formatter(). + * // hook_field_formatter_view(). * ), * ); * @endcode diff --git a/modules/field/field.default.inc b/modules/field/field.default.inc index 4e7dca6cb..2914abc1e 100644 --- a/modules/field/field.default.inc +++ b/modules/field/field.default.inc @@ -187,7 +187,7 @@ function field_default_view($obj_type, $object, $field, $instance, $langcode, $i // Calling the formatter function through module_invoke() can have a // performance impact on pages with many fields and values. - $function = $display['module'] . '_field_formatter'; + $function = $display['module'] . '_field_formatter_view'; if (function_exists($function)) { $elements = $function($obj_type, $object, $field, $instance, $langcode, $items, $display); } diff --git a/modules/field/field.form.inc b/modules/field/field.form.inc index 287604119..0970c1a6a 100644 --- a/modules/field/field.form.inc +++ b/modules/field/field.form.inc @@ -47,7 +47,7 @@ function field_default_form($obj_type, $object, $field, $instance, $langcode, $i // make it the $delta value. else { $delta = isset($get_delta) ? $get_delta : 0; - $function = $instance['widget']['module'] . '_field_widget'; + $function = $instance['widget']['module'] . '_field_widget_form'; if (function_exists($function)) { $element = array( '#object_type' => $instance['object_type'], @@ -161,7 +161,7 @@ function field_multiple_value_form($field, $instance, $langcode, $items, &$form, $wrapper_id = drupal_html_class($field_name) . '-wrapper'; $field_elements = array(); - $function = $instance['widget']['module'] . '_field_widget'; + $function = $instance['widget']['module'] . '_field_widget_form'; if (function_exists($function)) { for ($delta = 0; $delta <= $max; $delta++) { $multiple = $field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED; diff --git a/modules/field/modules/list/list.module b/modules/field/modules/list/list.module index 29e4ea4d2..c5fe39110 100644 --- a/modules/field/modules/list/list.module +++ b/modules/field/modules/list/list.module @@ -330,9 +330,9 @@ function list_field_formatter_info() { } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function list_field_formatter($object_type, $object, $field, $instance, $langcode, $items, $display) { +function list_field_formatter_view($object_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); switch ($display['type']) { diff --git a/modules/field/modules/number/number.module b/modules/field/modules/number/number.module index 88db4eb3e..25bff0316 100644 --- a/modules/field/modules/number/number.module +++ b/modules/field/modules/number/number.module @@ -253,9 +253,9 @@ function number_field_formatter_info() { } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function number_field_formatter($object_type, $object, $field, $instance, $langcode, $items, $display) { +function number_field_formatter_view($object_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); $settings = $display['settings']; @@ -298,9 +298,9 @@ function number_field_widget_info() { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function number_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { +function number_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { $value = isset($items[$delta]['value']) ? $items[$delta]['value'] : ''; // Substitute the decimal separator. if ($field['type'] == 'number_decimal' || $field['type'] == 'number_float') { diff --git a/modules/field/modules/options/options.module b/modules/field/modules/options/options.module index 78a32e2ca..d4c6c8f9e 100644 --- a/modules/field/modules/options/options.module +++ b/modules/field/modules/options/options.module @@ -66,9 +66,9 @@ function options_field_widget_info() { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function options_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { +function options_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { // Abstract over the actual field columns, to allow different field types to // reuse those widgets. $value_key = key($field['columns']); diff --git a/modules/field/modules/text/text.module b/modules/field/modules/text/text.module index 68a197005..7feacb1dd 100644 --- a/modules/field/modules/text/text.module +++ b/modules/field/modules/text/text.module @@ -199,7 +199,7 @@ function text_field_validate($obj_type, $object, $field, $instance, $langcode, $ * Where possible, generate the sanitized version of each field early so that * it is cached in the field cache. This avoids looking up from the filter cache * separately. - * @see text_field_formatter(). + * @see text_field_formatter_view(). */ function text_field_load($obj_type, $objects, $field, $instances, $langcode, &$items) { foreach ($objects as $id => $object) { @@ -262,9 +262,9 @@ function text_field_formatter_info() { } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function text_field_formatter($object_type, $object, $field, $instance, $langcode, $items, $display) { +function text_field_formatter_view($object_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); switch ($display['type']) { @@ -508,9 +508,9 @@ function text_field_widget_settings_form($field, $instance) { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function text_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) { +function text_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) { $element = $base; switch ($instance['widget']['type']) { diff --git a/modules/field/tests/field_test.field.inc b/modules/field/tests/field_test.field.inc index 8db03401c..a66273a19 100644 --- a/modules/field/tests/field_test.field.inc +++ b/modules/field/tests/field_test.field.inc @@ -154,9 +154,9 @@ function field_test_field_widget_info() { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function field_test_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { +function field_test_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { switch ($instance['widget']['type']) { case 'test_field_widget': $element += array( @@ -277,9 +277,9 @@ function field_test_field_formatter_prepare_view($obj_type, $objects, $field, $i } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function field_test_field_formatter($object_type, $object, $field, $instance, $langcode, $items, $display) { +function field_test_field_formatter_view($object_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); $settings = $display['settings']; diff --git a/modules/file/file.field.inc b/modules/file/file.field.inc index cdd853f28..ee32b5c54 100644 --- a/modules/file/file.field.inc +++ b/modules/file/file.field.inc @@ -425,9 +425,9 @@ function file_field_widget_settings_form($field, $instance) { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function file_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { +function file_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { $form['#attributes'] = array('enctype' => 'multipart/form-data'); $defaults = array( @@ -842,9 +842,9 @@ function theme_file_upload_help($variables) { } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function file_field_formatter($obj_type, $object, $field, $instance, $langcode, $items, $display) { +function file_field_formatter_view($obj_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); switch ($display['type']) { diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc index 08bb41b0c..f7bb499de 100644 --- a/modules/image/image.field.inc +++ b/modules/image/image.field.inc @@ -305,10 +305,10 @@ function image_field_widget_settings_form($field, $instance) { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function image_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { - $elements = file_field_widget($form, $form_state, $field, $instance, $langcode, $items, $delta, $element); +function image_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { + $elements = file_field_widget_form($form, $form_state, $field, $instance, $langcode, $items, $delta, $element); $settings = $instance['settings']; foreach (element_children($elements) as $delta) { @@ -450,9 +450,9 @@ function image_field_formatter_info() { } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function image_field_formatter($obj_type, $object, $field, $instance, $langcode, $items, $display) { +function image_field_formatter_view($obj_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); // Check if the formatter involves a particular image style. diff --git a/modules/node/node.api.php b/modules/node/node.api.php index 6553dab6f..0ec37f42a 100644 --- a/modules/node/node.api.php +++ b/modules/node/node.api.php @@ -445,7 +445,7 @@ function hook_node_prepare_translation($node) { * Act on a node being displayed as a search result. * * This hook is invoked from node_search_execute(), after node_load() - * and node_build() have been called. + * and node_view() have been called. * * @param $node * The node being displayed in a search result. @@ -497,7 +497,7 @@ function hook_node_update($node) { * Act on a node being indexed for searching. * * This hook is invoked during search indexing, after node_load(), and after - * the result of node_build() is added as $node->rendered to the node object. + * the result of node_view() is added as $node->rendered to the node object. * * @param $node * The node being indexed. @@ -563,7 +563,7 @@ function hook_node_validate($node, $form) { * @param $node * The node that is being assembled for rendering. * @param $build_mode - * The $build_mode parameter from node_build(). + * The $build_mode parameter from node_view(). */ function hook_node_view($node, $build_mode) { $node->content['my_additional_field'] = array( @@ -574,7 +574,7 @@ function hook_node_view($node, $build_mode) { } /** - * Alter the results of node_build(). + * Alter the results of node_view(). * * This hook is called after the content has been assembled in a structured * array and may be used for doing processing which requires that the complete @@ -588,9 +588,9 @@ function hook_node_view($node, $build_mode) { * @param $build * A renderable array representing the node content. * - * @see node_build() + * @see node_view() */ -function hook_node_build_alter($build) { +function hook_node_view_alter($build) { if ($build['#build_mode'] == 'full' && isset($build['an_additional_field'])) { // Change its weight. $build['an_additional_field']['#weight'] = -10; @@ -990,9 +990,9 @@ function hook_validate($node, &$form) { * by assembling a structured array, formatted as in the Form API, in * $node->content. As with Form API arrays, the #weight property can be * used to control the relative positions of added elements. After this - * hook is invoked, node_build() calls field_attach_view() to add field + * hook is invoked, node_view() calls field_attach_view() to add field * views to $node->content, and then invokes hook_node_view() and - * hook_node_build_alter(), so if you want to affect the final + * hook_node_view_alter(), so if you want to affect the final * view of the node, you might consider implementing one of these hooks * instead. * diff --git a/modules/node/node.module b/modules/node/node.module index a55fd039a..b0ed0c736 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1173,7 +1173,7 @@ function node_revision_delete($revision_id) { * @return * An array as expected by drupal_render(). */ -function node_build($node, $build_mode = 'full') { +function node_view($node, $build_mode = 'full') { // Populate $node->content with a render() array. node_build_content($node, $build_mode); @@ -1191,7 +1191,7 @@ function node_build($node, $build_mode = 'full') { $build['#contextual_links']['node'] = array('node', array($node->nid)); // Allow modules to modify the structured node. - drupal_alter('node_build', $build); + drupal_alter('node_view', $build); return $build; } @@ -1232,7 +1232,7 @@ function node_build_content($node, $build_mode = 'full') { } // Build fields content. - // @todo field_attach_prepare_view() is only invoked by node_build_multiple(), + // @todo field_attach_prepare_view() is only invoked by node_view_multiple(), // all other entities invoke it _here_. //field_attach_prepare_view('node', array($node->nid => $node), $build_mode); $node->content += field_attach_view('node', $node, $build_mode); @@ -1321,8 +1321,8 @@ function node_show($node, $message = FALSE) { // Update the history table, stating that this user viewed this node. node_tag_new($node->nid); - // For markup consistency with other pages, use node_build_multiple() rather than node_build(). - return node_build_multiple(array($node->nid => $node), 'full'); + // For markup consistency with other pages, use node_view_multiple() rather than node_view(). + return node_view_multiple(array($node->nid => $node), 'full'); } /** @@ -1582,7 +1582,7 @@ function node_search_execute($keys = NULL) { foreach ($find as $item) { // Render the node. $node = node_load($item->sid); - $build = node_build($node, 'search_result'); + $build = node_view($node, 'search_result'); unset($build['#theme']); $node->rendered = drupal_render($build); @@ -2089,7 +2089,7 @@ function node_feed($nids = FALSE, $channel = array()) { // The node gets built and modules add to or modify $node->rss_elements // and $node->rss_namespaces. - $build = node_build($node, 'rss'); + $build = node_view($node, 'rss'); unset($build['#theme']); if (!empty($node->rss_namespaces)) { @@ -2136,11 +2136,11 @@ function node_feed($nids = FALSE, $channel = array()) { * @return * An array in the format expected by drupal_render(). */ -function node_build_multiple($nodes, $build_mode = 'teaser', $weight = 0) { +function node_view_multiple($nodes, $build_mode = 'teaser', $weight = 0) { field_attach_prepare_view('node', $nodes, $build_mode); $build = array(); foreach ($nodes as $node) { - $build['nodes'][$node->nid] = node_build($node, $build_mode); + $build['nodes'][$node->nid] = node_view($node, $build_mode); $build['nodes'][$node->nid]['#weight'] = $weight; $weight++; } @@ -2166,7 +2166,7 @@ function node_page_default() { if (!empty($nids)) { $nodes = node_load_multiple($nids); - $build = node_build_multiple($nodes); + $build = node_view_multiple($nodes); $feed_url = url('rss.xml', array('absolute' => TRUE)); drupal_add_feed($feed_url, variable_get('site_name', 'Drupal') . ' ' . t('RSS')); @@ -2247,7 +2247,7 @@ function _node_index_node($node) { variable_set('node_cron_last', $node->changed); // Render the node. - $build = node_build($node, 'search_index'); + $build = node_view($node, 'search_index'); unset($build['#theme']); $node->rendered = drupal_render($build); @@ -3215,7 +3215,7 @@ function node_unpublish_by_keyword_action_submit($form, $form_state) { */ function node_unpublish_by_keyword_action($node, $context) { foreach ($context['keywords'] as $keyword) { - if (strpos(drupal_render(node_build(clone $node)), $keyword) !== FALSE || strpos($node->title, $keyword) !== FALSE) { + if (strpos(drupal_render(node_view(clone $node)), $keyword) !== FALSE || strpos($node->title, $keyword) !== FALSE) { $node->status = NODE_NOT_PUBLISHED; watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_type_get_name($node), '%title' => $node->title[LANGUAGE_NONE][0]['value'])); break; diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index 01f540002..63d818a5f 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -397,8 +397,8 @@ function theme_node_preview($variables) { $preview_trimmed_version = FALSE; - $trimmed = drupal_render(node_build(clone $node, 'teaser')); - $full = drupal_render(node_build($node, 'full')); + $trimmed = drupal_render(node_view(clone $node, 'teaser')); + $full = drupal_render(node_view($node, 'full')); // Do we need to preview trimmed version of post as well as full version? if ($trimmed != $full) { diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module index 73a2ec03a..e6eef8fd1 100644 --- a/modules/rdf/rdf.module +++ b/modules/rdf/rdf.module @@ -584,7 +584,7 @@ function rdf_field_attach_view_alter(&$output, $context) { $element = &$output[$field_name]; if ($element['#field_type'] == 'taxonomy_term' && $element['#formatter'] == 'taxonomy_term_link') { foreach ($element['#items'] as $delta => $item) { - // @todo Remove this when "node_build() does not call + // @todo Remove this when "node_view() does not call // field_attach_prepare_view()" bug is fixed. // See http://drupal.org/node/493314. if (!isset($item['taxonomy_term'])) { diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index a96132c37..f886366a6 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1080,15 +1080,15 @@ function taxonomy_field_formatter_info() { } /** - * Implements hook_field_formatter(). + * Implements hook_field_formatter_view(). */ -function taxonomy_field_formatter($object_type, $object, $field, $instance, $langcode, $items, $display) { +function taxonomy_field_formatter_view($object_type, $object, $field, $instance, $langcode, $items, $display) { $element = array(); switch ($display['type']) { case 'taxonomy_term_link': foreach ($items as $delta => $item) { - // @todo Remove this when "node_build() does not call + // @todo Remove this when "node_view() does not call // field_attach_prepare_view()" bug is fixed. // See http://drupal.org/node/493314. if (!isset($item['taxonomy_term'])) { @@ -1228,9 +1228,9 @@ function taxonomy_term_title($term) { } /** - * Implements hook_field_widget(). + * Implements hook_field_widget_form(). */ -function taxonomy_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { +function taxonomy_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { $tags = array(); foreach ($items as $item) { $tags[$item['tid']] = isset($item['taxonomy_term']) ? $item['taxonomy_term'] : taxonomy_term_load($item['tid']); diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index 83c9c9870..999a2131a 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -41,7 +41,7 @@ function taxonomy_term_page($term) { ); if ($nids = taxonomy_select_nodes($term->tid, TRUE, variable_get('default_nodes_main', 10))) { $nodes = node_load_multiple($nids); - $build += node_build_multiple($nodes); + $build += node_view_multiple($nodes); $build['pager'] = array( '#markup' => theme('pager', array('tags' => NULL)), '#weight' => 5, diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module index 5b8527128..ca0fc2dc7 100644 --- a/modules/toolbar/toolbar.module +++ b/modules/toolbar/toolbar.module @@ -132,7 +132,7 @@ function toolbar_page_build(&$page) { * rendering to ensure that it is built only if it will be displayed. */ function toolbar_pre_render($toolbar) { - $toolbar = array_merge($toolbar, toolbar_build()); + $toolbar = array_merge($toolbar, toolbar_view()); return $toolbar; } @@ -166,7 +166,7 @@ function toolbar_system_info_alter(&$info, $file, $type) { /** * Build the admin menu as a structured array ready for drupal_render(). */ -function toolbar_build() { +function toolbar_view() { global $user; $module_path = drupal_get_path('module', 'toolbar'); diff --git a/modules/user/user.api.php b/modules/user/user.api.php index 40be80bdc..72608ecfa 100644 --- a/modules/user/user.api.php +++ b/modules/user/user.api.php @@ -343,9 +343,9 @@ function hook_user_view($account, $build_mode) { * @param $build * A renderable array representing the user. * - * @see user_build() + * @see user_view() */ -function hook_user_build_alter($build) { +function hook_user_view_alter($build) { // Check for the existence of a field added by another module. if (isset($build['an_additional_field'])) { // Change its weight. diff --git a/modules/user/user.module b/modules/user/user.module index f56bbe29b..716780030 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1525,7 +1525,7 @@ function user_menu() { 'title' => 'My account', 'title callback' => 'user_page_title', 'title arguments' => array(1), - 'page callback' => 'user_build', + 'page callback' => 'user_view', 'page arguments' => array(1), 'access callback' => 'user_view_access', 'access arguments' => array(1), @@ -2135,7 +2135,7 @@ function _user_cancel($edit, $account, $method) { * @return * An array as expected by drupal_render(). */ -function user_build($account, $build_mode = 'full') { +function user_view($account, $build_mode = 'full') { // Retrieve all profile fields and attach to $account->content. user_build_content($account, $build_mode); @@ -2150,7 +2150,7 @@ function user_build($account, $build_mode = 'full') { ); // Allow modules to modify the structured user. - drupal_alter('user_build', $build); + drupal_alter('user_view', $build); return $build; } |