diff --git a/core/authorize.php b/core/authorize.php
index f347ba5..803fceb 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -116,7 +116,7 @@ function authorize_access_allowed() {
       drupal_set_message($results['page_message']['message'], $results['page_message']['type']);
     }
 
-    $output = theme('authorize_report', array('messages' => $results['messages']));
+    $output = drupal_render('authorize_report', array('messages' => $results['messages']));
 
     $links = array();
     if (is_array($results['tasks'])) {
@@ -128,8 +128,13 @@ function authorize_access_allowed() {
         l(t('Front page'), '<front>'),
       ));
     }
+    $item_list = array(
+      '#theme' => 'item_list',
+      '#items' => $links,
+      '#title' => t('Next steps')
+    );
 
-    $output .= theme('item_list', array('items' => $links, 'title' => t('Next steps')));
+    $output .= drupal_render($item_list);
   }
   // If a batch is running, let it run.
   elseif (isset($_GET['batch'])) {
@@ -154,5 +159,12 @@ function authorize_access_allowed() {
 
 if (!empty($output)) {
   drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  print theme('maintenance_page', array('content' => $output, 'show_messages' => $show_messages));
+
+  $maintenance_page = array(
+    '#theme' => 'maintenance_page',
+    '#content' => $output,
+    '#show_messages' => $show_messages
+  );
+
+  print drupal_render($maintenance_page);
 }
diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc
index 94444f1..324bb79 100644
--- a/core/includes/ajax.inc
+++ b/core/includes/ajax.inc
@@ -479,7 +479,12 @@ function ajax_prepare_response($page_callback_result) {
     $commands[] = ajax_command_insert(NULL, $html);
     // Add the status messages inside the new content's wrapper element, so that
     // on subsequent Ajax requests, it is treated as old content.
-    $commands[] = ajax_command_prepend(NULL, theme('status_messages'));
+
+    $status_messages = array(
+      '#theme' => 'status_messages'
+    );
+
+    $commands[] = ajax_command_prepend(NULL, drupal_render($status_messages));
   }
 
   return $commands;
diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index 2152725..a1d0e00 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -116,7 +116,14 @@ function _batch_progress_page() {
     // the error message.
     ob_start();
     $fallback = $current_set['error_message'] . '<br />' . $batch['error_message'];
-    $fallback = theme('maintenance_page', array('content' => $fallback, 'show_messages' => FALSE));
+
+    $maintenance_page = array(
+      '#theme' => 'maintenance_page',
+      '#content' => $fallback,
+      '#show_messages' => FALSE
+    );
+
+    $fallback = drupal_render($maintenance_page);
 
     // We strip the end of the page using a marker in the template, so any
     // additional HTML output by PHP shows up inside the page rather than below
@@ -164,7 +171,13 @@ function _batch_progress_page() {
   drupal_add_js($js_setting, 'setting');
   drupal_add_library('system', 'drupal.batch');
 
-  return theme('progress_bar', array('percent' => $percentage, 'message' => $message));
+  $progress_bar = array(
+    '#theme' => 'progress_bar',
+    '#percent' => $percentage,
+    '#message' => $message
+  );
+
+  return drupal_render($progress_bar);
 }
 
 /**
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 5387f71..6467c20 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -404,7 +404,14 @@ function drupal_add_feed($url = NULL, $title = '') {
   $stored_feed_links = &drupal_static(__FUNCTION__, array());
 
   if (isset($url)) {
-    $stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
+
+    $feed_icon = array(
+      '#theme' => 'feed_icon',
+      '#url' => $url,
+      '#title' => $title
+    );
+
+    $stored_feed_links[$url] = drupal_render($feed_icon);
 
     drupal_add_html_head_link(array(
       'rel' => 'alternate',
@@ -1625,7 +1632,7 @@ function base_path() {
  * Adds a LINK tag with a distinct 'rel' attribute to the page's HEAD.
  *
  * This function can be called as long the HTML header hasn't been sent, which
- * on normal pages is up through the preprocess step of theme('html'). Adding
+ * on normal pages is up through the preprocess step of drupal_render($html). Adding
  * a link will overwrite a prior link with the exact same 'rel' and 'href'
  * attributes.
  *
@@ -3781,7 +3788,13 @@ function drupal_get_library($module, $name = NULL) {
  * into a table. The table must have an ID attribute set. If using
  * theme_table(), the ID may be set as follows:
  * @code
- * $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'my-module-table')));
+ * $table = array(
+ *  '#theme'  => 'table',
+ *  '#header' => $header,
+ *  '#rows'   => $rows,
+ *  '#attributes' => array('id' => 'my-module-table')
+ * );
+ * $output = drupal_render($table);
  * return $output;
  * @endcode
  *
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index 3fe23b7..d6899fa 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -276,7 +276,13 @@ function _drupal_log_error($error, $fatal = FALSE) {
       // We fallback to a maintenance page at this point, because the page generation
       // itself can generate errors.
       // Should not translate the string to avoid errors producing more errors.
-      $output = theme('maintenance_page', array('content' => 'The website has encountered an error. Please try again later.'));
+
+      $maintenance_page = array(
+        '#theme' => 'maintenance_page',
+        '#content' => t('The website has encountered an error. Please try again later.')
+      );
+
+      $output = drupal_render($maintenance_page);
 
       $response = new Response($output, 500);
       if ($fatal) {
diff --git a/core/includes/file.inc b/core/includes/file.inc
index 4207ab3..c3b42f4 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -1212,7 +1212,13 @@ function file_save_upload($form_field_name, $validators = array(), $destination
     if (!empty($errors)) {
       $message = t('The specified file %name could not be uploaded.', array('%name' => $file->filename));
       if (count($errors) > 1) {
-        $message .= theme('item_list', array('items' => $errors));
+
+        $item_list = array(
+          '#theme' => 'item_list',
+          '#items' => $errors
+        );
+
+        $message .= drupal_render($item_list);
       }
       else {
         $message .= ' ' . array_pop($errors);
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 90d47fb..c263874 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -3527,7 +3527,16 @@ function theme_tableselect($variables) {
       array_unshift($header, '');
     }
   }
-  return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes']));
+
+  $table = array(
+    '#theme' => 'table',
+    '#header' => $header,
+    '#rows' => $rows,
+    '#empty' => $element['#empty'],
+    '#attributes' => $element['#attributes']
+  );
+
+  return drupal_render($table);
 }
 
 /**
@@ -4802,7 +4811,8 @@ function theme_form_element_label($variables) {
   }
 
   // If the element is required, a required marker is appended to the label.
-  $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '';
+  $form_required_marker = array('#theme' => 'form_required_marker', '#element' => $element);
+  $required = !empty($element['#required']) ? drupal_render($form_required_marker) : '';
 
   $title = filter_xss_admin($element['#title']);
 
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index f798392..60799e3 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -921,9 +921,22 @@ function install_display_output($output, $install_state) {
     // Let the theming function know when every step of the installation has
     // been completed.
     $active_task = $install_state['installation_finished'] ? NULL : $install_state['active_task'];
-    drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task)));
+
+    $task_list = array(
+      '#theme' => 'task_list',
+      '#items' => install_tasks_to_display($install_state),
+      '#active' => $active_task
+    );
+
+    drupal_add_region_content('sidebar_first', drupal_render($task_list));
   }
-  print theme('install_page', array('content' => $output));
+
+  $install_page = array(
+    '#theme' => 'install_page',
+    '#content' => $output
+  );
+
+  print drupal_render($install_page);
   exit;
 }
 
@@ -2298,7 +2311,13 @@ function install_display_requirements($install_state, $requirements) {
   if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && empty($install_state['parameters']['continue']))) {
     if ($install_state['interactive']) {
       drupal_set_title(st('Requirements problem'));
-      $status_report = theme('status_report', array('requirements' => $requirements));
+
+      $s_report = array(
+        '#theme' => 'status_report',
+        '#requirements' => $requirements
+      );
+
+      $status_report = drupal_render($s_report);
       $status_report .= st('Check the messages and <a href="!url">try again</a>.', array('!url' => check_url(drupal_requirements_url($severity))));
       return $status_report;
     }
diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index 4c497ba..71b1dcf 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -200,38 +200,46 @@ function theme_pager($variables) {
 
   // Create the "first" and "previous" links if we are not on the first page.
   if ($pager_page_array[$element] > 0) {
-    $li_first = theme('pager_link__first', array(
-      'text' => (isset($tags[0]) ? $tags[0] : t('« first')),
-      'page_new' => pager_load_array(0, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'first'),
-    ));
-    $li_previous = theme('pager_link__previous', array(
-      'text' => isset($tags[1]) ? $tags[1] : t('‹ previous'),
-      'page_new' => pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'prev'),
-    ));
+    $pager_link__first = array(
+      '#theme' => 'pager_link__first',
+      '#text' => (isset($tags[0]) ? $tags[0] : t('« first')),
+      '#page_new' => pager_load_array(0, $element, $pager_page_array),
+      '#element' => $element,
+      '#parameters' => $parameters,
+      '#attributes' => array('rel' => 'first')
+    );
+    $li_first = drupal_render($pager_link__first);
+    $pager_link__previous = array(
+      '#theme' => 'pager_link__previous',
+      '#text' => isset($tags[1]) ? $tags[1] : t('‹ previous'),
+      '#page_new' => pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array),
+      '#element' => $element,
+      '#parameters' => $parameters,
+      '#attributes' => array('rel' => 'prev')
+    );
+    $li_previous = drupal_render($pager_link__previous);
   }
 
   // Create the "last" and "next" links if we are not on the last page.
   if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
-    $li_next = theme('pager_link__next', array(
-      'text' => isset($tags[3]) ? $tags[3] : t('next ›'),
-      'page_new' => pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'next'),
-    ));
-    $li_last = theme('pager_link__last', array(
-      'text' => (isset($tags[4]) ? $tags[4] : t('last »')),
-      'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'last'),
-    ));
+    $pager_link__next = array(
+      '#theme' => 'pager_link__next',
+      '#text' => isset($tags[3]) ? $tags[3] : t('next ›'),
+      '#page_new' => pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array),
+      '#element' => $element,
+      '#parameters' => $parameters,
+      '#attributes' => array('rel' => 'next')
+    );
+    $li_next = drupal_render($pager_link__next);
+    $pager_link__last = array(
+      '#theme' => 'pager_link__last',
+      '#text' => (isset($tags[4]) ? $tags[4] : t('last »')),
+      '#page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array),
+      '#element' => $element,
+      '#parameters' => $parameters,
+      '#attributes' => array('rel' => 'last')
+    );
+    $li_last = drupal_render($pager_link__last);
   }
 
   if ($pager_total[$element] > 1) {
@@ -259,15 +267,19 @@ function theme_pager($variables) {
       // Now generate the actual pager piece.
       for (; $i <= $pager_last && $i <= $pager_max; $i++) {
         if ($i < $pager_current) {
+
+          $pager_link = array(
+            '#theme' => 'pager_link',
+            '#text' => $i,
+            '#page_new' => pager_load_array($i - 1, $element, $pager_page_array),
+            '#element' => $element,
+            '#interval' => ($pager_current - $i),
+            '#parameters' => $parameters,
+          );
+
           $items[] = array(
             '#wrapper_attributes' => array('class' => array('pager-item')),
-            '#markup' => theme('pager_link', array(
-              'text' => $i,
-              'page_new' => pager_load_array($i - 1, $element, $pager_page_array),
-              'element' => $element,
-              'interval' => ($pager_current - $i),
-              'parameters' => $parameters,
-            )),
+            '#markup' => drupal_render($pager_link),
           );
         }
         if ($i == $pager_current) {
@@ -277,15 +289,19 @@ function theme_pager($variables) {
           );
         }
         if ($i > $pager_current) {
+
+          $pager_link = array(
+            '#theme' => 'pager_link',
+            '#text' => $i,
+            '#page_new' => pager_load_array($i - 1, $element, $pager_page_array),
+            '#element' => $element,
+            '#interval' => ($i - $pager_current),
+            '#parameters' => $parameters,
+          );
+
           $items[] = array(
             '#wrapper_attributes' => array('class' => array('pager-item')),
-            '#markup' => theme('pager_link', array(
-              'text' => $i,
-              'page_new' => pager_load_array($i - 1, $element, $pager_page_array),
-              'element' => $element,
-              'interval' => ($i - $pager_current),
-              'parameters' => $parameters,
-            )),
+            '#markup' => drupal_render($pager_link),
           );
         }
       }
@@ -309,10 +325,14 @@ function theme_pager($variables) {
         '#markup' => $li_last,
       );
     }
-    return '<h2 class="element-invisible">' . t('Pages') . '</h2>' . theme('item_list', array(
-      'items' => $items,
-      'attributes' => array('class' => array('pager')),
-    ));
+
+    $item_list = array(
+      '#theme' => 'item_list',
+      '#items' => $items,
+      '#attributes' => array('class' => array('pager')),
+    );
+
+    return '<h2 class="element-invisible">' . t('Pages') . '</h2>' . drupal_render($item_list);
   }
 }
 
diff --git a/core/includes/tablesort.inc b/core/includes/tablesort.inc
index c42b1f4..505b4ba 100644
--- a/core/includes/tablesort.inc
+++ b/core/includes/tablesort.inc
@@ -49,7 +49,11 @@ function tablesort_header($cell, $header, $ts) {
       $cell['aria-sort'] = ($ts['sort'] == 'asc') ? 'ascending' : 'descending';
       $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc');
       $cell['class'][] = 'active';
-      $image = theme('tablesort_indicator', array('style' => $ts['sort']));
+      $tablesort_indicator = array(
+        '#theme' => 'tablesort_indicator',
+        '#style' => $ts['sort']
+      );
+      $image = drupal_render($tablesort_indicator);
     }
     else {
       // If the user clicks a different header, we want to sort ascending initially.
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 62f2aed..cf6056a 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2257,12 +2257,18 @@ function theme_table($variables) {
  *     show.
  */
 function theme_tablesort_indicator($variables) {
-  if ($variables['style'] == "asc") {
-    return theme('image', array('uri' => 'core/misc/arrow-asc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
-  }
-  else {
-    return theme('image', array('uri' => 'core/misc/arrow-desc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort descending'), 'title' => t('sort descending')));
-  }
+
+  $image = array(
+    '#theme' => 'image',
+    '#uri' => ($variables['style'] == "asc") ? 'core/misc/arrow-asc.png' : 'core/misc/arrow-desc.png',
+    '#width' => 13,
+    '#height' => 13,
+    '#alt' => ($variables['style'] == "asc") ? t('sort ascending') : t('sort descending'),
+    '#title' => ($variables['style'] == "asc") ? t('sort ascending') : t('sort descending'),
+  );
+
+  return drupal_render($image);
+  
 }
 
 /**
@@ -2414,7 +2420,14 @@ function theme_more_help_link($variables) {
  */
 function theme_feed_icon($variables) {
   $text = t('Subscribe to !feed-title', array('!feed-title' => $variables['title']));
-  if ($image = theme('image', array('uri' => 'core/misc/feed.png', 'width' => 16, 'height' => 16, 'alt' => $text))) {
+  $theme_image = array(
+    '#theme' => 'image',
+    '#uri' => 'core/misc/feed.png',
+    '#width' => 16,
+    '#height' => 16,
+    '#alt' => $text
+  );
+  if ($image = drupal_render($theme_image)) {
     return l($image, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
   }
 }
@@ -3043,7 +3056,8 @@ function template_preprocess_maintenance_page(&$variables) {
   $variables['language']          = $language_interface;
   $variables['language']->dir     = $language_interface->direction ? 'rtl' : 'ltr';
   $variables['logo']              = theme_get_setting('logo.url');
-  $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
+  $status_messages = array('#theme' => 'status_messages');
+  $variables['messages']          = $variables['show_messages'] ? drupal_render($status_messages) : '';
   $variables['main_menu']         = array();
   $variables['secondary_menu']    = array();
   $variables['site_name']         = (theme_get_setting('features.name') ? check_plain($site_name) : '');
diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc
index b9a513c..4f47e1e 100644
--- a/core/includes/theme.maintenance.inc
+++ b/core/includes/theme.maintenance.inc
@@ -158,7 +158,11 @@ function theme_task_list($variables) {
  */
 function theme_install_page($variables) {
   drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  return theme('maintenance_page', $variables);
+  $maintenance_page = array(
+    '#theme' => 'maintenance_page',
+    '#content' => $variables['content']
+  );
+  return drupal_render($maintenance_page);
 }
 
 /**
@@ -181,9 +185,19 @@ function theme_authorize_report($variables) {
         if ($number === '#abort') {
           continue;
         }
-        $items[] = theme('authorize_message', array('message' => $log_message['message'], 'success' => $log_message['success']));
+        $authorize_message = array(
+          '#theme' => 'authorize_message',
+          '#message' => $log_message['message'],
+          '#success' => $log_message['success']
+        );
+        $items[] = drupal_render($authorize_message);
       }
-      $output .= theme('item_list',  array('items' => $items, 'title' => $heading));
+      $item_list = array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+        '#title' => $heading
+      );
+      $output .= drupal_render($item_list);
     }
     $output .= '</div>';
   }
diff --git a/core/update.php b/core/update.php
index a3dd4bb..9faa9f9 100644
--- a/core/update.php
+++ b/core/update.php
@@ -225,7 +225,7 @@ function update_results_page() {
     $output .= "<p><strong>Reminder: don't forget to set the <code>\$settings['update_free_access']</code> value in your <code>settings.php</code> file back to <code>FALSE</code>.</strong></p>";
   }
 
-  $output .= theme('links', array('links' => update_helpful_links()));
+  $output .= drupal_render('links', array('links' => update_helpful_links()));
 
   // Output a list of queries executed.
   if (!empty($_SESSION['update_results'])) {
@@ -371,7 +371,13 @@ function update_task_list($active = NULL) {
     'finished' => 'Review log',
   );
 
-  drupal_add_region_content('sidebar_first', theme('task_list', array('items' => $tasks, 'active' => $active)));
+  $task_list = array(
+    '#theme' => 'task_list',
+    '#items' => $tasks, 
+    '#active' => $active
+  );
+
+  drupal_add_region_content('sidebar_first', drupal_render($task_list));
 }
 
 /**
@@ -404,10 +410,16 @@ function update_check_requirements($skip_warnings = FALSE) {
   if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && !$skip_warnings)) {
     update_task_list('requirements');
     drupal_set_title('Requirements problem');
-    $status_report = theme('status_report', array('requirements' => $requirements));
+    $status_report = drupal_render('status_report', array('requirements' => $requirements));
     $status_report .= 'Check the messages and <a href="' . check_url(drupal_requirements_url($severity)) . '">try again</a>.';
     drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-    print theme('maintenance_page', array('content' => $status_report));
+
+    $maintenance_page = array(
+      '#theme' => 'maintenance_page',
+      '#content' => $status_report
+    );
+
+    print drupal_render($maintenance_page);
     exit();
   }
 }
@@ -544,6 +556,13 @@ function update_check_requirements($skip_warnings = FALSE) {
   }
   else {
     drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-    print theme('maintenance_page', array('content' => $output, 'show_messages' => !$progress_page));
+
+    $maintenance_page = array(
+      '#theme' => 'maintenance_page',
+      '#content' => $output, 
+      '#show_messages' => !$progress_page
+    );
+    
+    print drupal_render($maintenance_page);
   }
 }
