diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php index ececd37..dde3ff4 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php @@ -25,9 +25,7 @@ class SystemPoweredByBlock extends BlockBase { * {@inheritdoc} */ public function build() { - return array( - '#children' => theme('system_powered_by'), - ); + return array('#theme' => 'system_powered_by'); } } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index d3b3a98..efd472c 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -136,8 +136,16 @@ function system_themes_page() { uasort($theme_groups['enabled'], 'system_sort_themes'); drupal_alter('system_themes_page', $theme_groups); - $admin_form = drupal_get_form('system_themes_admin_form', $admin_theme_options); - return theme('system_themes_page', array('theme_groups' => $theme_groups, 'theme_group_titles' => $theme_group_titles)) . drupal_render($admin_form); + $build = array( + '#sorted' => TRUE, + ); + $build['system_themes_page'] = array( + '#theme' => 'system_themes_page', + '#theme_groups' => $theme_groups, + '#theme_group_titles' => $theme_group_titles, + ); + $build['admin_form'] = drupal_get_form('system_themes_admin_form', $admin_theme_options); + return $build; } /** @@ -386,7 +394,11 @@ function theme_admin_page($variables) { $container = array(); foreach ($blocks as $block) { - if ($block_output = theme('admin_block', array('block' => $block))) { + $admin_block = array( + '#theme' => 'admin_block', + '#block' => $block, + ); + if ($block_output = drupal_render($admin_block)) { if (empty($block['position'])) { // perform automatic striping. $block['position'] = ++$stripe % 2 ? 'left' : 'right'; @@ -398,8 +410,9 @@ function theme_admin_page($variables) { } } + $system_compact_link = array('#theme' => 'system_compact_link'); $output = '
'; - $output .= theme('system_compact_link'); + $output .= drupal_render($system_compact_link); foreach ($container as $id => $data) { $output .= '
'; @@ -433,13 +446,21 @@ function theme_system_admin_index($variables) { // Output links. if (count($items)) { + $admin_block_content = array( + '#theme' => 'admin_block_content', + '#content' => $items, + ); $block = array(); $block['title'] = $module; - $block['content'] = theme('admin_block_content', array('content' => $items)); + $block['content'] = drupal_render($admin_block_content); $block['description'] = t($description); $block['show'] = TRUE; - if ($block_output = theme('admin_block', array('block' => $block))) { + $admin_block = array( + '#theme' => 'admin_block', + '#block' => $block, + ); + if ($block_output = drupal_render($admin_block)) { if (!isset($block['position'])) { // Perform automatic striping. $block['position'] = $position; @@ -450,8 +471,9 @@ function theme_system_admin_index($variables) { } } + $system_compact_link = array('#theme' => 'system_compact_link'); $output = '
'; - $output .= theme('system_compact_link'); + $output .= drupal_render($system_compact_link); foreach ($container as $id => $data) { $output .= '
'; $output .= $data; @@ -599,7 +621,12 @@ function theme_system_modules_details($variables) { $rows[] = $row; } - return theme('table', array('header' => $form['#header'], 'rows' => $rows)); + $table = array( + '#theme' => 'table', + '#header' => $form['#header'], + '#rows' => $rows, + ); + return drupal_render($table); } /** @@ -658,7 +685,13 @@ function theme_system_modules_uninstall($variables) { ); } - $output = theme('table', array('header' => $header, 'rows' => $rows, 'empty' => t('No modules are available to uninstall.'))); + $table = array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows, + '#empty' => t('No modules are available to uninstall.'), + ); + $output = drupal_render($table); $output .= drupal_render_children($form); return $output; @@ -670,6 +703,7 @@ function theme_system_modules_uninstall($variables) { * @param $variables * An associative array containing: * - theme_groups: An associative array containing groups of themes. + * - theme_group_titles: An associative array containing titles of themes. * * @ingroup themeable */ @@ -852,8 +886,13 @@ function theme_system_date_format_localize_form($variables) { $rows[] = $row; } + $table = array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows, + ); $output = drupal_render($form['language']); - $output .= theme('table', array('header' => $header, 'rows' => $rows)); + $output .= drupal_render($table); $output .= drupal_render_children($form); return $output; diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 49e87a0..ca80ad4 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -410,7 +410,8 @@ function hook_css_alter(&$css) { */ function hook_ajax_render_alter($commands) { // Inject any new status messages into the content area. - $commands[] = ajax_command_prepend('#block-system-main .content', theme('status_messages')); + $status_messages = array('#theme' => 'status_messages'); + $commands[] = ajax_command_prepend('#block-system-main .content', drupal_render($status_messages)); } /** diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 7777e0c..4bcc4bb 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -127,7 +127,11 @@ function system_requirements($phase) { '@system_requirements' => 'http://drupal.org/requirements', )); - $description .= theme('item_list', array('items' => $missing_extensions)); + $item_list = array( + '#theme' => 'item_list', + '#items' => $missing_extensions, + ); + $description .= drupal_render($item_list); $requirements['php_extensions']['value'] = t('Disabled'); $requirements['php_extensions']['severity'] = REQUIREMENT_ERROR; @@ -242,7 +246,11 @@ function system_requirements($phase) { $description = $conf_errors[0]; } else { - $description = theme('item_list', array('items' => $conf_errors)); + $item_list = array( + '#theme' => 'item_list', + '#items' => $conf_errors, + ); + $description = drupal_render($item_list); } $requirements['settings.php'] = array( 'value' => t('Not protected'), diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 4f909a3..1ea545a 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -140,7 +140,10 @@ function system_help($path, $arg) { function system_theme() { return array_merge(drupal_common_theme(), array( 'system_themes_page' => array( - 'variables' => array('theme_groups' => NULL), + 'variables' => array( + 'theme_groups' => NULL, + 'theme_group_titles' => NULL, + ), 'file' => 'system.admin.inc', ), 'system_config_form' => array( @@ -3199,7 +3202,12 @@ function theme_exposed_filters($variables) { foreach (element_children($form['current']) as $key) { $items[] = $form['current'][$key]; } - $output .= theme('item_list', array('items' => $items, 'attributes' => array('class' => array('clearfix', 'current-filters')))); + $item_list = array( + '#theme' => 'item_list', + '#items' => $items, + '#attributes' => array('class' => array('clearfix', 'current-filters')), + ); + $output .= drupal_render($item_list); } $output .= drupal_render_children($form);