';
@@ -1030,13 +1055,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;
@@ -1047,8 +1080,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;
@@ -1198,7 +1232,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);
}
/**
@@ -1257,7 +1296,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;
@@ -1269,6 +1314,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
*/
@@ -1376,7 +1422,12 @@ function system_date_format_language_overview_page() {
$rows[] = $row;
}
- return theme('table', array('header' => $header, 'rows' => $rows));
+ $table = array(
+ '#theme' => 'table',
+ '#header' => $header,
+ '#rows' => $rows,
+ );
+ return drupal_render($table);
}
/**
@@ -1484,8 +1535,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 a8dcd13..c92de4e 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 69d0325..e439375 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -132,7 +132,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;
@@ -247,7 +251,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 ac42ea3..4f4fb74 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -139,7 +139,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(
@@ -161,7 +164,7 @@ function system_theme() {
'file' => 'system.admin.inc',
),
'status_report' => array(
- 'render element' => 'requirements',
+ 'variables' => array('requirements' => NULL),
'file' => 'system.admin.inc',
),
'admin_page' => array(
@@ -3469,7 +3472,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);
diff --git a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
index bea8b13..3bfe755 100644
--- a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
+++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
@@ -34,7 +34,12 @@ public function onRequest(GetResponseEvent $event) {
// theme_test_request_listener_page_callback() to test that even when the
// theme system is initialized this early, it is still capable of
// returning output and theming the page as a whole.
- $GLOBALS['theme_test_output'] = theme('more_link', array('url' => 'user', 'title' => 'Themed output generated in a KernelEvents::REQUEST listener'));
+ $more_link = array(
+ '#theme' => 'more_link',
+ '#url' => 'user',
+ '#title' => 'Themed output generated in a KernelEvents::REQUEST listener',
+ );
+ $GLOBALS['theme_test_output'] = drupal_render($more_link);
}
if (strpos($current_path, 'user/autocomplete') === 0) {
// Register a fake registry loading callback. If it gets called by
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module
index 51cb6d3..cf18f3e 100644
--- a/core/modules/system/tests/modules/theme_test/theme_test.module
+++ b/core/modules/system/tests/modules/theme_test/theme_test.module
@@ -100,7 +100,8 @@ function theme_test_request_listener_page_callback() {
* Menu callback for testing template overridding based on filename.
*/
function theme_test_template_test_page_callback() {
- return theme('theme_test_template_test');
+ $theme_test_template_test = array('#theme' => 'theme_test_template_test');
+ return drupal_render($theme_test_template_test);
}
/**
@@ -146,7 +147,8 @@ function _theme_test_alter() {
* Page callback, calls a theme hook suggestion.
*/
function _theme_test_suggestion() {
- return theme(array('theme_test__suggestion', 'theme_test'), array());
+ $theme_test = array('#theme' => array('theme_test__suggestion', 'theme_test'));
+ return drupal_render($theme_test);
}
/**
diff --git a/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php b/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php
index ef5fb70..5299481 100644
--- a/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php
+++ b/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php
@@ -26,7 +26,8 @@ public static function create(ContainerInterface $container) {
* Menu callback for testing PHP variables in a Twig template.
*/
public function phpVariablesRender() {
- return theme('twig_theme_test_php_variables');
+ $twig_theme_test_php_variables = array('#theme' => 'twig_theme_test_php_variables');
+ return drupal_render($twig_theme_test_php_variables);
}
}
diff --git a/core/modules/system/theme.api.php b/core/modules/system/theme.api.php
index aedc6b0..169e1aa 100644
--- a/core/modules/system/theme.api.php
+++ b/core/modules/system/theme.api.php
@@ -186,7 +186,13 @@ function hook_process(&$variables, $hook) {
'variable_name' => $variable_name,
'variables' => $variables,
);
- $variables[$variable_name] = theme('rdf_template_variable_wrapper', array('content' => $variables[$variable_name], 'attributes' => $attributes, 'context' => $context));
+ $rdf_template_variable_wrapper = array(
+ '#theme' => 'rdf_template_variable_manager',
+ '#content' => $variables[$variable_name],
+ '#attributes' => $attributes,
+ '#context' => $context,
+ );
+ $variables[$variable_name] = drupal_render($rdf_template_variable_wrapper);
}
}
}