diff --git a/core/modules/node/node.module b/core/modules/node/node.module index c19d2fa..2289fa4 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1143,11 +1143,11 @@ function node_preprocess_block(&$variables) { * - form: The complete node form. */ function template_preprocess_node_edit_form(&$variables) { - foreach ($variables['form'] as $key => $value) { - // Prevent recursion loop by removing '#theme' and '#theme_wrappers' keys. - // See http://drupal.org/node/1920886. - if ($key == '#theme' || $key == '#theme_wrappers') { - unset($variables['form'][$key]); + // Prevent recursion loop by removing '#theme' and '#theme_wrappers' keys. + // See http://drupal.org/node/1920886. + foreach (array('#theme', '#theme_wrappers') as $theme_key) { + if (isset($variables['form'][$theme_key])) { + unset($variables['form'][$theme_key]); } } } diff --git a/core/modules/node/templates/node-add-list.html.twig b/core/modules/node/templates/node-add-list.html.twig index 5afc11d..60b732d 100644 --- a/core/modules/node/templates/node-add-list.html.twig +++ b/core/modules/node/templates/node-add-list.html.twig @@ -3,12 +3,12 @@ * @file * Default theme implementation to list node types available for adding content. * - * This list is displayed on the add content admin page. + * This list is displayed on the Add content admin page. * * Available variables: - * - types: A list of content types. - * - type.add_link: Link to create a piece of content of this type. - * - type.description: Description of this type of content. + * - types: A list of content types, each with the following properties: + * - add_link: Link to create a piece of content of this type. + * - description: Description of this type of content. * * @see template_preprocess() * @see template_preprocess_node_add_list() diff --git a/core/modules/node/templates/node-edit-form.html.twig b/core/modules/node/templates/node-edit-form.html.twig index 842456b..dba7950 100644 --- a/core/modules/node/templates/node-edit-form.html.twig +++ b/core/modules/node/templates/node-edit-form.html.twig @@ -3,12 +3,15 @@ * @file * Two column template for the node add/edit form. * + * This template will be used when a node edit form specifies 'node_edit_form' + * as its #theme callback. Otherwise, by default, node add/edit forms will be + * themed by theme_form(). + * * Available variables: - * - form: Complete form. Use {{ form }} to print the entire form, or print a - * subset such as {{ form.actions }}. Use {% hide(form.actions) %} to - * temporarily suppress the printing of a given element. - * - form.advanced: The advanced options for the node form. - * - form.actions: The action buttons for save and delete. + * - form: The node add/edit form. + * + * @see seven_form_node_form_alter() + * @see template_preprocess_node_edit_form() * * @ingroup themable */ diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index 1c0fcf7..15fe637 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -18,8 +18,9 @@ * - display_submitted: Whether submission information should be displayed. * - submitted: Submission information created from name and date during * template_preprocess_node(). - * - attributes: Remaining HTML attributes for the containing element. - * - attributes.class: Class information, containing: + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: * - node: The current template type (also known as a "theming hook"). * - node-[type]: The current node type. For example, if the node is a * "Article" it would result in "node-article". Note that the machine @@ -39,14 +40,14 @@ * * Other variables: * - node: Full node entity. - * - node.type: Node type; for example, "page" or "article". - * - node.uid: User ID of the node author. - * - node.created: Formatted creation date. - * - node.promote: Flag for front page promotion state. - * - node.sticky: Flag for sticky post setting. - * - node.status: Flag for published status. - * - node.comment: State of comment settings for the node. - * - node.comment_count: Number of comments attached to the node. + * - type: Node type; for example, "page" or "article". + * - uid: User ID of the node author. + * - created: Formatted creation date. + * - promote: Flag for front page promotion state. + * - sticky: Flag for sticky post setting. + * - status: Flag for published status. + * - comment: State of comment settings for the node. + * - comment_count: Number of comments attached to the node. * - zebra: Outputs either "even" or "odd". Useful for zebra striping in * teaser listings. * - id: Position of the node. Increments each time it's output.