diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc index 53883d2..2ebda8d 100644 --- a/core/modules/node/content_types.inc +++ b/core/modules/node/content_types.inc @@ -92,7 +92,7 @@ function node_overview_types() { function template_preprocess_node_admin_overview(&$variables) { $variables['name'] = check_plain($variables['name']); $variables['description'] = filter_xss_admin($variables['type']->description); - $variables['machine_name'] = t('(Machine name: @type)', array('@type' => $variables['type']->type)); + $variables['machine_name'] = $variables['type']->type; } /** diff --git a/core/modules/node/node.module b/core/modules/node/node.module index c673a0c..0798c20 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1542,7 +1542,11 @@ function template_preprocess_node_search_admin(&$variables) { $rows[] = $row; } - $variables['table'] = theme('table', array('header' => $header, 'rows' => $rows)); + $variables['table'] = array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows, + ); $variables['form'] = drupal_render_children($form); } @@ -1981,12 +1985,20 @@ function template_preprocess_node_recent_block(&$variables) { $rows[] = $row; } - $variables['table'] = $rows ? theme('table', array('rows' => $rows)) : NULL; - if (user_access('access content overview') && $rows) { - $variables['more_link'] = theme('more_link', array('url' => 'admin/content', 'title' => t('Show more content'))); - } - else { - $variables['more_link'] = FALSE; + $variables['table'] = array(); + $variables['more_link'] = array(); + if ($rows) { + $variables['table'] = array( + '#theme' => 'table', + '#rows' => $rows, + ); + if (user_access('access content overview')) { + $variables['more_link'] = array( + '#theme' => 'more_link', + '#url' => 'admin/content', + '#title' => t('Show more content'), + ); + } } } @@ -2003,9 +2015,14 @@ function template_preprocess_node_recent_block(&$variables) { function template_preprocess_node_recent_content(&$variables) { $node = $variables['node']; $variables['link'] = l($node->label(), 'node/' . $node->nid); - $mark = theme('mark', array('type' => node_mark($node->nid, $node->changed))); - $variables['mark'] = !empty($mark) ? $mark : ''; - $variables['username'] = theme('username', array('account' => user_load($node->uid))); + $variables['mark'] = array( + '#theme' => 'mark', + '#type' => node_mark($node->nid, $node->changed), + ); + $variables['username'] = array( + '#theme' => 'username', + '#account' => user_load($node->uid), + ); } /** diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index 3496764..3aa900b 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -75,9 +75,6 @@ function template_preprocess_node_add_list(&$variables) { $variables['types'][$type->type]['description'] = filter_xss_admin($type->description); } } - else { - $variables['no_content_text'] = t('You have not created any content types yet. Go to the content type creation page to add a new content type.', array('@create-content' => url('admin/structure/types/add'))); - } } @@ -171,10 +168,10 @@ function template_preprocess_node_preview(&$variables) { // Render trimmed teaser version of the post. $node_teaser = node_view(clone $node, 'teaser'); $node_teaser['#attached']['library'][] = array('node', 'drupal.node.preview'); - $variables['teaser']= drupal_render($node_teaser); + $variables['teaser'] = $node_teaser; // Render full version of the post. $node_full = node_view($node, 'full'); - $variables['full'] = drupal_render($node_full); + $variables['full'] = $node_full; // Do we need to preview a trimmed teaser version of a post as well as a full // version? diff --git a/core/modules/node/templates/node-add-list.html.twig b/core/modules/node/templates/node-add-list.html.twig index df3f621..0f629ad 100644 --- a/core/modules/node/templates/node-add-list.html.twig +++ b/core/modules/node/templates/node-add-list.html.twig @@ -21,5 +21,5 @@ {% endfor %} {% else %} -
{{ no_content_text }}
+{{ 'You have not created any content types yet. Go to the content type creation page to add a new content type.'|t({'@create-content': url('admin/structure/types/add')}) }}
{% endif %} diff --git a/core/modules/node/templates/node-admin-overview.html.twig b/core/modules/node/templates/node-admin-overview.html.twig index 23f6ec2..7ea022b 100644 --- a/core/modules/node/templates/node-admin-overview.html.twig +++ b/core/modules/node/templates/node-admin-overview.html.twig @@ -15,5 +15,5 @@ * @ingroup themeable */ #} -{{ name }} {{ machine_name }} +{{ name }} {{ '(Machine name: @type)'|t({'@type': machine_name}) }}