diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php index 6c34a4d..fbdbbf7 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php @@ -168,12 +168,13 @@ function render($row) { $item->link = $node->link; $item->elements = $node->rss_elements; $item->nid = $node->nid; - - return theme($this->themeFunctions(), array( - 'view' => $this->view, - 'options' => $this->options, - 'row' => $item - )); + $theme_function = array( + '#theme' => $this->themeFunctions(), + '#view' => $this->view, + '#options' => $this->options, + '#row' => $item, + ); + return drupal_render($theme_function); } } diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index 69b6b0a..a62648b 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -395,7 +395,11 @@ function _node_mass_update_batch_finished($success, $results, $operations) { else { drupal_set_message(t('An error occurred and processing did not complete.'), 'error'); $message = format_plural(count($results), '1 item successfully processed:', '@count items successfully processed:'); - $message .= theme('item_list', array('items' => $results)); + $item_list = array( + '#theme' => 'item_list', + '#items' => $results, + ); + $message .= drupal_render($item_list); drupal_set_message($message); } } @@ -537,12 +541,16 @@ function node_admin_nodes() { ); foreach ($nodes as $node) { $l_options = $node->langcode != Language::LANGCODE_NOT_SPECIFIED && isset($languages[$node->langcode]) ? array('language' => $languages[$node->langcode]) : array(); + $mark = array( + '#theme' => 'mark', + '#type' => node_mark($node->nid, $node->changed), + ); $form['nodes'][$node->nid]['title'] = array( '#type' => 'link', '#title' => $node->label(), '#href' => 'node/' . $node->nid, '#options' => $l_options, - '#suffix' => ' ' . theme('mark', array('type' => node_mark($node->nid, $node->changed))), + '#suffix' => ' ' . drupal_render($mark), ); $form['nodes'][$node->nid]['type'] = array( '#markup' => check_plain(node_get_type_label($node)), diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 2cd835f..6e3af3a 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1116,10 +1116,12 @@ function template_preprocess_node(&$variables) { $variables['date'] = format_date($node->created); // @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'), - )); + $username = array( + '#theme' => 'username', + '#account' => $node, + '#link_attributes' => array('rel' => 'author'), + ); + $variables['name'] = drupal_render($username); $uri = $node->uri(); $variables['node_url'] = url($uri['path'], $uri['options']); @@ -1370,11 +1372,15 @@ function node_search_execute($keys = NULL, $conditions = NULL) { $language = language_load($item->langcode); $uri = $node->uri(); + $username = array( + '#theme' => 'username', + '#account' => $node, + ); $results[] = array( 'link' => url($uri['path'], array_merge($uri['options'], array('absolute' => TRUE, 'language' => $language))), 'type' => check_plain(node_get_type_label($node)), 'title' => $node->label($item->langcode), - 'user' => theme('username', array('account' => $node)), + 'user' => drupal_render($username), 'date' => $node->changed, 'node' => $node, 'extra' => $extra, @@ -1500,7 +1506,12 @@ function theme_node_search_admin($variables) { $row[] = drupal_render($form['factors'][$key]); $rows[] = $row; } - $output .= theme('table', array('header' => $header, 'rows' => $rows)); + $table = array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows, + ); + $output .= drupal_render($table); $output .= drupal_render_children($form); return $output; @@ -1907,8 +1918,12 @@ function theme_node_recent_block($variables) { $l_options = array('query' => drupal_get_destination()); foreach ($variables['nodes'] as $node) { $row = array(); + $node_recent_content = array( + '#theme' => 'node_recent_content', + '#node' => $node, + ); $row[] = array( - 'data' => theme('node_recent_content', array('node' => $node)), + 'data' => drupal_render($node_recent_content), 'class' => 'title-author', ); if (node_access('update', $node)) { @@ -1927,9 +1942,18 @@ function theme_node_recent_block($variables) { } if ($rows) { - $output = theme('table', array('rows' => $rows)); + $table = array( + '#theme' => 'table', + '#rows' => $rows, + ); + $output = drupal_render($table); if (user_access('access content overview')) { - $output .= theme('more_link', array('url' => 'admin/content', 'title' => t('Show more content'))); + $more_link = array( + '#theme' => 'more_link', + '#url' => 'admin/content', + '#title' => t('Show more content'), + ); + $output .= drupal_render($more_link); } } @@ -1950,9 +1974,17 @@ function theme_node_recent_content($variables) { $output = '
'; $output .= l($node->label(), 'node/' . $node->nid); - $output .= theme('mark', array('type' => node_mark($node->nid, $node->changed))); + $mark = array( + '#theme' => 'mark', + '#type' => node_mark($node->nid, $node->changed), + ); + $output .= drupal_render($mark); $output .= '
'; - $output .= theme('username', array('account' => user_load($node->uid))); + $username = array( + '#theme' => 'username', + '#account' => user_load($node->uid), + ); + $output .= drupal_render($username); $output .= '
'; return $output; diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index 9aa4982..56b0e71 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -148,7 +148,11 @@ function node_preview(EntityInterface $node) { // Display a preview of the node. if (!form_get_errors()) { $node->in_preview = TRUE; - $output = theme('node_preview', array('node' => $node)); + $node_preview = array( + '#theme' => 'node_preview', + '#node' => $node, + ); + $output = drupal_render($node_preview); unset($node->in_preview); } @@ -265,13 +269,21 @@ function node_revision_overview($node) { $row = array(); $type = $node->type; if ($revision->current_vid > 0) { - $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->revision_timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision)))) + $username = array( + '#theme' => 'username', + '#account' => $revision, + ); + $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->revision_timestamp, 'short'), "node/$node->nid"), '!username' => drupal_render($username))) . (($revision->log != '') ? '

' . filter_xss($revision->log) . '

' : ''), 'class' => array('revision-current')); $row[] = array('data' => drupal_placeholder(t('current revision')), 'class' => array('revision-current')); } else { - $row[] = t('!date by !username', array('!date' => l(format_date($revision->revision_timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision)))) + $username = array( + '#theme' => 'username', + '#account' => $revision, + ); + $row[] = t('!date by !username', array('!date' => l(format_date($revision->revision_timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => drupal_render($username))) . (($revision->log != '') ? '

' . filter_xss($revision->log) . '

' : ''); if ($revert_permission) { $links['revert'] = array(