diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 2e540f2..2acfe0a 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1175,7 +1175,9 @@ function template_preprocess_node(&$variables) { $node = $variables['node']; $variables['date'] = format_date($node->created); - $variables['author'] = theme('username', array( + // @todo Change 'name' to 'author' and also convert to a render array pending + // http://drupal.org/node/1941286. + $variables['name'] = theme('username', array( 'account' => $node, 'link_attributes' => array('rel' => 'author'), )); @@ -1197,7 +1199,7 @@ function template_preprocess_node(&$variables) { // Display post information only on certain node types. if (variable_get('node_submitted_' . $node->type, TRUE)) { $variables['display_submitted'] = TRUE; - $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['date'])); + $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date'])); if (theme_get_setting('toggle_node_user_picture')) { // To change user picture settings (e.g. image style), edit the 'compact' // view mode on User entity. diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index a56cd7b..f48ff88 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -9,7 +9,7 @@ * or print a subset such as {{ content.field_example }}. Use * {% hide(content.field_example) %} to temporarily suppress the printing * of a given element. - * - author: Themed username of node author output from username.html.twig. + * - name: Themed username of node author output from username.html.twig. * - user_picture: The node author's picture from user-picture.html.twig. * - node_url: Direct URL of the current node. * - display_submitted: Whether submission information should be displayed.