diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc index 8aea2b7..c4933fd 100644 --- a/core/modules/node/content_types.inc +++ b/core/modules/node/content_types.inc @@ -75,19 +75,15 @@ function node_overview_types() { } /** - * Preprocess variables for node-admin-overview.html.twig, a node type - * description for the content type admin page. + * Prepares variables for node type description templates. * - * @param $variables + * Default template: node-admin-overview.html.twig. + * + * @param array $variables * An associative array containing: * - name: The human-readable name of the content type. * - type: An object containing the 'type' (machine name) and 'description' of * the content type. - * - * @return string - * An HTML-formatted string of the description for this node type. - * - * @ingroup themeable */ function template_preprocess_node_admin_overview(&$variables) { $variables['name'] = check_plain($variables['name']); diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 065500b..93c5f4c 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1129,19 +1129,19 @@ function node_preprocess_block(&$variables) { } /** - * Preprocess variables for node.html.twig. + * Prepares variables for node templates. + * + * Default template: node.html.twig. * * Most themes utilize their own copy of node.html.twig. The default is located * inside "core/modules/node/templates/node.html.twig". Look in there for the * full list of variables. * - * @param $variables + * @param array $variables * An associative array containing: * - elements: An array of elements to display in view mode. * - node: The node object. * - view_mode: View mode; e.g., 'full', 'teaser'... - * - * @see node.html.twig */ function template_preprocess_node(&$variables) { $variables['view_mode'] = $variables['elements']['#view_mode']; @@ -1515,15 +1515,15 @@ function node_user_predelete($account) { } /** - * Preprocess variables for node-search-admin.html.twig, the content ranking - * part of the search settings admin page. + * Prepares variables for node search admin form templates. + * + * Default template: node-search-admin.html.twig. * - * @param $variables + * @param array $variables * An associative array containing: * - form: A render element representing the form. * * @see node_search_admin() - * @ingroup themeable */ function template_preprocess_node_search_admin(&$variables) { $form = $variables['form']; @@ -1943,14 +1943,15 @@ function node_get_recent($number = 10) { } /** - * Preprocess variables for node-recent-content.html.twig, a list of recently - * created content. + * Prepares variables for list of recent content templates. * - * @param $variables + * Default template: node-recent-content.html.twig. + * + * @param array $variables * An associative array containing: * - nodes: An array of recent node entities. * - * @ingroup themeable + * @see template_preprocess_node_recent_content() */ function template_preprocess_node_recent_block(&$variables) { $rows = array(); @@ -1995,14 +1996,15 @@ function template_preprocess_node_recent_block(&$variables) { } /** - * Preprocess variables for node-recent-content.twig, a recent node to be - * displayed in the recent content block. + * Prepares variables for recently created node templates. + * + * Default template: node-recent-content.twig. * - * @param $variables + * @param array $variables * An associative array containing: * - node: A node entity. * - * @ingroup themeable + * @see template_preprocess_node_recent_block() */ function template_preprocess_node_recent_content(&$variables) { $node = $variables['node']; diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index fa2fc16..a67960d 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -56,16 +56,15 @@ function node_add_page() { } /** - * Preprocess variables for node-add-list.html.twig, a list of available node - * types for node creation. + * Prepares variables for list of available node types templates. * - * @param $variables + * Default template: node-add-list.html.twig. + * + * @param array $variables * An associative array containing: * - content: An array of content types. * * @see node_add_page() - * - * @ingroup themeable */ function template_preprocess_node_add_list(&$variables) { if (!empty($variables['content'])) { @@ -150,23 +149,22 @@ function node_preview(Node $node) { } /** - * Preprocess variables for node-preview.html.twig, a node preview for display - * during node creation and editing. + * Prepares variables for node preview templates. * - * @param $variables + * Default template: node-preview.html.twig. + * + * @param array $variables * An associative array containing: * - node: The node entity which is being previewed. * * @see NodeFormController::preview() * @see node_preview() - * - * @ingroup themeable */ function template_preprocess_node_preview(&$variables) { $node = $variables['node']; // Render trimmed teaser version of the post. - $node_teaser = node_view(clone $node, 'teaser'); + $node_teaser = node_view($node, 'teaser'); $node_teaser['#attached']['library'][] = array('node', 'drupal.node.preview'); $variables['teaser'] = $node_teaser; // Render full version of the post. diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index 9a574f2..4c708dd 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -82,7 +82,7 @@ {{ title_prefix }} {% if not page %} -