core/modules/node/node.module | 36 ++--------------------
.../node/templates/field--node--created.html.twig | 18 +++++++++++
.../node/templates/field--node--uid.html.twig | 18 +++++++++++
3 files changed, 38 insertions(+), 34 deletions(-)
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 840b7fb..268dc7f 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -185,9 +185,11 @@ function node_theme() {
),
'field__node__uid' => array(
'base hook' => 'field',
+ 'template' => 'field--node--uid',
),
'field__node__created' => array(
'base hook' => 'field',
+ 'template' => 'field--node--created',
),
);
}
@@ -691,40 +693,6 @@ function template_preprocess_node(&$variables) {
}
/**
- * Returns HTML for the node 'uid' field.
- *
- * This is an override of theme_field() for the node 'uid' 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__uid($variables) {
- return '' . drupal_render($variables['items']) . '';
-}
-
-/**
- * Returns HTML for the node 'created' field.
- *
- * This is an override of theme_field() for the node 'created' 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__created($variables) {
- return '' . drupal_render($variables['items']) . '';
-}
-
-/**
* Implements hook_permission().
*/
function node_permission() {
diff --git a/core/modules/node/templates/field--node--created.html.twig b/core/modules/node/templates/field--node--created.html.twig
new file mode 100644
index 0000000..6c8a687
--- /dev/null
+++ b/core/modules/node/templates/field--node--created.html.twig
@@ -0,0 +1,18 @@
+{#
+/**
+* @file
+* Default theme implementation for the node created field.
+*
+* This is an override of field.html.twig for the node created 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 }}
diff --git a/core/modules/node/templates/field--node--uid.html.twig b/core/modules/node/templates/field--node--uid.html.twig
new file mode 100644
index 0000000..1fb0a6d
--- /dev/null
+++ b/core/modules/node/templates/field--node--uid.html.twig
@@ -0,0 +1,18 @@
+{#
+/**
+* @file
+* Default theme implementation for the node user field.
+*
+* This is an override of field.html.twig for the node user 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 }}