diff --git a/core/modules/node/node.module b/core/modules/node/node.module index b05fc2c..41b02b1 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -174,6 +174,7 @@ function node_theme() { ), 'field__node__title' => array( 'base hook' => 'field', + 'template' => 'field--node--title', ), ); } @@ -705,23 +706,6 @@ function template_preprocess_node(&$variables) { } /** - * Returns HTML for the node title field. - * - * This is an override of theme_field() for the node title field. See that - * function for documentation about its details and overrides. - * - * @param array $variables - * An associative array. See theme_field() for details. - * - * @see theme_field() - * - * @ingroup themeable - */ -function theme_field__node__title($variables) { - return '' . drupal_render($variables['items']) . ''; -} - -/** * Implements hook_permission(). */ function node_permission() { diff --git a/core/modules/node/templates/field--node--title.html.twig b/core/modules/node/templates/field--node--title.html.twig new file mode 100644 index 0000000..25432c0 --- /dev/null +++ b/core/modules/node/templates/field--node--title.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Default theme implementation for the node title field. + * + * This is an override of field.html.twig for the node title field. See that + * template for documentation about its details and overrides. + * + * Available variables: + * - attributes: HTML attributes for the containing span element. + * - items: List of all the field items. + * + * @see field.html.twig + * + * @ingroup themeable + */ +#} +{{ items }}