=== modified file 'includes/common.inc'
--- includes/common.inc	2009-10-18 18:32:27 +0000
+++ includes/common.inc	2009-10-19 16:35:58 +0000
@@ -5074,11 +5074,11 @@ function drupal_common_theme() {
       'arguments' => array('text' => NULL)
     ),
     'html' => array(
-      'arguments' => array('page' => NULL),
+      'renderable_elements' => array('page' => NULL),
       'template' => 'html',
     ),
     'page' => array(
-      'arguments' => array('page' => NULL),
+      'renderable_elements' => array('page' => NULL),
       'template' => 'page',
     ),
     'region' => array(
@@ -5187,7 +5187,7 @@ function drupal_common_theme() {
       'arguments' => array('element' => NULL),
     ),
     'menu_tree' => array(
-      'arguments' => array('tree' => NULL),
+      'renderable_elements' => array('tree' => NULL),
     ),
     'menu_local_task' => array(
       'arguments' => array('element' => NULL),

=== modified file 'includes/theme.inc'
--- includes/theme.inc	2009-10-19 02:06:52 +0000
+++ includes/theme.inc	2009-10-19 16:28:36 +0000
@@ -299,11 +299,15 @@ function drupal_theme_rebuild() {
  *   - 'template': The filename of the template generating output for this
  *     theme hook. The template is in the directory defined by the 'path' key of
  *     hook_theme() or defaults to $path.
- *   - 'arguments': The arguments for this theme hook as defined in
- *     hook_theme(). If there is more than one implementation and 'arguments' is
+ *   - 'variables': The variables for this theme hook as defined in
+ *     hook_theme(). If there is more than one implementation and 'variables' is
  *     not specified in a later one, then the previous definition is kept.
+ *   - 'renderable_elements': The renderable element for this theme hook as
+ *     defined in hook_theme(). If there is more than one implementation and
+ *     'renderable_elements' is not specified in a later one, then the previous
+ *     definition is kept.
  *   - 'theme paths': The paths where implementations of a theme hook can be
- *     found. Its definition is similarly inherited like 'arguments'. Each time
+ *     found. Its definition is similarly inherited like 'variables'. Each time
  *     _theme_process_registry() is called for this theme hook, either the
  *     'path' key from hook_theme() (if defined) or $path is added.
  *   - 'preprocess functions': See theme() for detailed documentation.
@@ -365,11 +369,15 @@ function _theme_process_registry(&$cache
         $result[$hook]['includes'][] = $include_file;
       }
 
-      // If 'arguments' have been defined previously, carry them forward.
+      // If 'variables' have been defined previously, carry them forward.
       // This should happen if a theme overrides a Drupal defined theme
       // function, for example.
-      if (!isset($info['arguments']) && isset($cache[$hook])) {
-        $result[$hook]['arguments'] = $cache[$hook]['arguments'];
+      if (!isset($info['variables']) && isset($cache[$hook])) {
+        $result[$hook]['variables'] = $cache[$hook]['variables'];
+      }
+      // Same for the 'renderable_elements' flag.
+      if (!isset($info['renderable_elements']) && isset($cache[$hook])) {
+        $result[$hook]['renderable_elements'] = $cache[$hook]['renderable_elements'];
       }
 
       // The following apply only to theming hooks implemented as templates.
@@ -780,30 +788,28 @@ function theme($hook, $variables = array
   }
 
   // If a renderable array is passed as $variables, then set $variables to
-  // what's expected by the theme hook. If the theme hook expects a single
-  // argument, set the renderable array as that argument. If the theme hook
-  // expects multiple arguments, set the properties of the renderable array as
-  // those arguments.
+  // the arguments expected by the theme function.
   if (isset($variables['#theme']) || isset($variables['#theme_wrappers'])) {
     $element = $variables;
     $variables = array();
-    $n = count($info['arguments']);
-    if ($n == 1) {
-      $arg_keys = array_keys($info['arguments']);
-      $variables[$arg_keys[0]] = $element;
-    }
-    elseif ($n > 1) {
-      foreach ($info['arguments'] as $name => $default) {
+    if (isset($info['variables'])) {
+      foreach (array_keys($info['variables']) as $name) {
         if (isset($element["#$name"])) {
           $variables[$name] = $element["#$name"];
         }
       }
     }
+    else {
+      $variables[$info['renderable_elements'][0]] = $element;
+    }
   }
 
   // Merge in argument defaults.
-  if (!empty($info['arguments'])) {
-    $variables += $info['arguments'];
+  if (!empty($info['variables'])) {
+    $variables += $info['variables'];
+  }
+  elseif (!empty($info['renderable_elements'])) {
+    $variables += $info['renderable_elements'];
   }
 
   // Invoke the variable processors, if any. The processors may specify
@@ -968,8 +974,7 @@ function path_to_theme() {
 }
 
 /**
- * Find overridden theme functions. Called by themes and/or theme engines to
- * easily discover theme functions.
+ * Allow themes and/or theme engines to easily discover overridden theme functions.
  *
  * @param $cache
  *   The existing cache of theme hooks to test against.
@@ -990,9 +995,10 @@ function drupal_find_theme_functions($ca
         if ($matches) {
           foreach ($matches as $match) {
             $new_hook = str_replace($prefix . '_', '', $match);
+            $arg_name = isset($info['variables']) ? 'variables' : 'renderable_elements';
             $templates[$new_hook] = array(
               'function' => $match,
-              'arguments' => $info['arguments'],
+              $arg_name => $info[$arg_name],
             );
           }
         }
@@ -1015,8 +1021,7 @@ function drupal_find_theme_functions($ca
 }
 
 /**
- * Find overridden theme templates. Called by themes and/or theme engines to
- * easily discover templates.
+ * Allow themes and/or theme engines to easily discover overridden templates.
  *
  * @param $cache
  *   The existing cache of theme hooks to test against.
@@ -1093,10 +1098,11 @@ function drupal_find_theme_templates($ca
         foreach ($matches as $match) {
           $file = substr($match, 0, strpos($match, '.'));
           // Put the underscores back in for the hook name and register this pattern.
+          $arg_name = isset($info['variables']) ? 'variables' : 'renderable_elements';
           $templates[strtr($file, '-', '_')] = array(
             'template' => $file,
             'path' => dirname($files[$match]->uri),
-            'arguments' => $info['arguments'],
+            $arg_name => $info[$arg_name],
           );
         }
       }

=== modified file 'modules/book/book.module'
--- modules/book/book.module	2009-10-15 14:07:25 +0000
+++ modules/book/book.module	2009-10-19 16:35:14 +0000
@@ -26,7 +26,7 @@ function book_theme() {
       'arguments' => array('link' => NULL),
     ),
     'book_all_books_block' => array(
-      'arguments' => array('book_menus' => array()),
+      'renderable_elements' => array('book_menus' => array()),
       'template' => 'book-all-books-block',
     ),
     'book_node_export_html' => array(

=== modified file 'modules/comment/comment.module'
--- modules/comment/comment.module	2009-10-17 05:50:27 +0000
+++ modules/comment/comment.module	2009-10-19 16:35:30 +0000
@@ -136,7 +136,7 @@ function comment_theme() {
     ),
     'comment_wrapper' => array(
       'template' => 'comment-wrapper',
-      'arguments' => array('content' => NULL),
+      'renderable_elements' => array('content' => NULL),
     ),
   );
 }

=== modified file 'modules/simpletest/simpletest.module'
--- modules/simpletest/simpletest.module	2009-10-09 00:59:53 +0000
+++ modules/simpletest/simpletest.module	2009-10-19 16:36:05 +0000
@@ -75,7 +75,7 @@ function simpletest_permission() {
 function simpletest_theme() {
   return array(
     'simpletest_test_table' => array(
-      'arguments' => array('table' => NULL),
+      'renderable_elements' => array('table' => NULL),
       'file' => 'simpletest.pages.inc',
     ),
     'simpletest_result_summary' => array(

=== modified file 'modules/system/system.api.php'
--- modules/system/system.api.php	2009-10-16 13:18:30 +0000
+++ modules/system/system.api.php	2009-10-19 15:54:13 +0000
@@ -849,12 +849,17 @@ function hook_permission() {
  * to each sub-array is the internal name of the hook, and the array contains
  * info about the hook. Each array may contain the following items:
  *
- * - arguments: (required) An array of arguments that this theme hook uses. This
- *   value allows the theme layer to properly utilize templates. The
- *   array keys represent the name of the variable, and the value will be
- *   used as the default value if not specified to the theme() function.
- *   These arguments must be in the same order that they will be given to
- *   the theme() function.
+ * - variables: (required if "renderable_element" not present) An array of
+ *   variables that this theme hook uses. This value allows the theme layer to
+ *   properly utilize templates. Each array key represents the name of the
+ *   variable and the value will be used as the default value if it is not given
+ *   when theme() is called. Template implementations receive these arguments as
+ *   variables in the template file. Function implementations are passed this
+ *   array data in the $variables parameter.
+ * - renderable_element: (required if "variables" not present) An array with
+ *   its sole item being the renderable element to pass to the theme function.
+ *   The array key represents the name of the "variable" that will hold the
+ *   renderable array inside any optional preprocess or process functions.
  * - file: The file the implementation resides in. This file will be included
  *   prior to the theme being rendered, to make sure that the function or
  *   preprocess function (as needed) is actually loaded; this makes it possible
@@ -929,16 +934,24 @@ function hook_permission() {
 function hook_theme($existing, $type, $theme, $path) {
   return array(
     'forum_display' => array(
-      'arguments' => array('forums' => NULL, 'topics' => NULL, 'parents' => NULL, 'tid' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL),
+      'variables' => array('forums' => NULL, 'topics' => NULL, 'parents' => NULL, 'tid' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL),
     ),
     'forum_list' => array(
-      'arguments' => array('forums' => NULL, 'parents' => NULL, 'tid' => NULL),
+      'variables' => array('forums' => NULL, 'parents' => NULL, 'tid' => NULL),
     ),
     'forum_topic_list' => array(
-      'arguments' => array('tid' => NULL, 'topics' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL),
+      'variables' => array('tid' => NULL, 'topics' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL),
     ),
     'forum_icon' => array(
-      'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0),
+      'variables' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0),
+    ),
+    'status_report' => array(
+      'renderable_elements' => array('requirements' => NULL),
+      'file' => 'system.admin.inc',
+    ),
+    'system_date_time_settings' => array(
+      'renderable_elements' => array('form' => NULL),
+      'file' => 'system.admin.inc',
     ),
   );
 }

=== modified file 'modules/system/system.module'
--- modules/system/system.module	2009-10-18 11:34:44 +0000
+++ modules/system/system.module	2009-10-19 14:26:29 +0000
@@ -179,7 +179,7 @@ function system_theme() {
       'file' => 'system.admin.inc',
     ),
     'status_report' => array(
-      'arguments' => array('requirements' => NULL),
+      'renderable_elements' => array('requirements' => NULL),
       'file' => 'system.admin.inc',
     ),
     'admin_page' => array(

=== modified file 'modules/toolbar/toolbar.module'
--- modules/toolbar/toolbar.module	2009-10-17 00:51:52 +0000
+++ modules/toolbar/toolbar.module	2009-10-19 14:25:53 +0000
@@ -23,7 +23,7 @@ function toolbar_permission() {
  */
 function toolbar_theme($existing, $type, $theme, $path) {
   $items['toolbar'] = array(
-    'arguments' => array('toolbar' => array()),
+    'renderable_elements' => array('toolbar' => array()),
     'template' => 'toolbar',
     'path' => drupal_get_path('module', 'toolbar'),
   );

=== modified file 'modules/update/update.report.inc'
--- modules/update/update.report.inc	2009-10-15 21:19:30 +0000
+++ modules/update/update.report.inc	2009-10-19 14:22:18 +0000
@@ -199,7 +199,7 @@ function theme_update_report($variables)
             break;
             
           default:
-            $base_themes[] = theme('placeholder', $base_theme);
+            $base_themes[] = theme('placeholder', array('text' => $base_theme));
         }
       }
       $row .= t('Depends on: !basethemes', array('!basethemes' => implode(', ', $base_themes)));

