=== modified file 'ca/ca.admin.inc'
--- ca/ca.admin.inc	2010-02-02 18:20:36 +0000
+++ ca/ca.admin.inc	2010-02-03 20:37:44 +0000
@@ -47,26 +47,26 @@
   // Build the header for the predicate tables based on the grouping type.
   if ($groupby == 'trigger') {
     $header = array(
-      array('data' => t('Title'), 'class' => 'col-title'),
+      array('data' => t('Title'), 'class' => array('col-title')),
       t('Class'),
       t('Status'),
       t('Weight'),
       t('Operations'),
     );
 
-    $table_class = 'ca-predicate-trigger';
+    $table_class = array('ca-predicate-trigger');
     $table_label = '<strong>'. t('Trigger') .':</strong> ';
   }
   elseif ($groupby == 'class') {
     $header = array(
-      array('data' => t('Title'), 'class' => 'col-title'),
+      array('data' => t('Title'), 'class' => array('col-title')),
       t('Trigger'),
       t('Status'),
       t('Weight'),
       t('Operations'),
     );
 
-    $table_class = 'ca-predicate-class';
+    $table_class = array('ca-predicate-class');
     $table_label = '<strong>'. t('Class') .':</strong> ';
   }
 
@@ -94,8 +94,8 @@
         check_plain($value['#title']),
         strpos($value['#class'], 'custom') === 0 ? check_plain(substr($value['#class'], 7)) : $value['#class'],
         $value['#status'] == 0 ? t('Disabled') : t('Enabled'),
-        array('data' => $value['#weight'], 'class' => 'ca-predicate-table-weight'),
-        array('data' => implode(' ', $ops), 'class' => 'ca-predicate-table-ops'),
+        array('data' => $value['#weight'], 'class' => array('ca-predicate-table-weight')),
+        array('data' => implode(' ', $ops), 'class' => array('ca-predicate-table-ops')),
       );
     }
     elseif ($groupby == 'class') {
@@ -105,8 +105,8 @@
         check_plain($value['#title']),
         check_plain($triggers[$value['#trigger']]['#title']),
         $value['#status'] == 0 ? t('Disabled') : t('Enabled'),
-        array('data' => $value['#weight'], 'class' => 'ca-predicate-table-weight'),
-        array('data' => implode(' ', $ops), 'class' => 'ca-predicate-table-ops'),
+        array('data' => $value['#weight'], 'class' => array('ca-predicate-table-weight')),
+        array('data' => implode(' ', $ops), 'class' => array('ca-predicate-table-ops')),
       );
     }
   }
@@ -448,7 +448,7 @@
         '#value' => t('Remove this action'),
         '#name' => 'ca_remove_action_'. $i,
         '#submit' => array('ca_actions_form_remove_action_submit'),
-        '#attributes' => array('class' => 'ca-remove-confirm'),
+        '#attributes' => array('class' => array('ca-remove-confirm')),
       );
 
       $i++;
@@ -733,7 +733,7 @@
       '#type' => 'submit',
       '#value' => t('Remove group'),
       '#submit' => array('ca_conditions_form_remove_condition_group_submit'),
-      '#attributes' => array('class' => 'ca-remove-confirm'),
+      '#attributes' => array('class' => array('ca-remove-confirm')),
       '#name' => 'remove_condition_group_'. $level,
     );
 
@@ -845,7 +845,7 @@
     '#type' => 'submit',
     '#value' => t('Remove this condition'),
     '#submit' => array('ca_conditions_form_remove_condition_submit'),
-    '#attributes' => array('class' => 'ca-remove-confirm'),
+    '#attributes' => array('class' => array('ca-remove-confirm')),
     '#name' => 'remove_condition_group_'. $identifier++,
   );
 

=== modified file 'ca/ca.ca.inc'
--- ca/ca.ca.inc	2010-02-02 18:30:52 +0000
+++ ca/ca.ca.inc	2010-02-02 20:30:50 +0000
@@ -491,7 +491,7 @@
     '#type' => 'fieldset',
     '#title' => t('Available PHP variables'),
     '#description' => t('You may use these variables in your custom PHP.')
-                    . theme('table', $header, $rows),
+                    . theme('table', array('header' => $header, 'rows' => $rows)),
     '#collapsible' => TRUE,
   );
 

=== modified file 'payment/uc_credit/uc_credit.module'
--- payment/uc_credit/uc_credit.module	2010-02-02 18:30:52 +0000
+++ payment/uc_credit/uc_credit.module	2010-02-03 19:13:11 +0000
@@ -75,7 +75,7 @@
 function uc_credit_theme() {
   return array(
     'uc_payment_method_credit_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
   );
 }
@@ -1061,7 +1061,9 @@
 }
 
 // Themes the form to be in a compact table.
-function theme_uc_payment_method_credit_form($form) {
+function theme_uc_payment_method_credit_form($variables) {
+  $form = $variables['form'];
+
   // Comment out this function to just straight display the form.
   $form['cc_number']['#title'] = '';
   $form['cc_start_month']['#title'] = '';

=== modified file 'payment/uc_cybersource/uc_cybersource.module'
--- payment/uc_cybersource/uc_cybersource.module	2010-01-25 16:37:01 +0000
+++ payment/uc_cybersource/uc_cybersource.module	2010-02-02 20:31:23 +0000
@@ -711,7 +711,7 @@
     $items[] = t('No taxes returned for this order.');
   }
 
-  return theme('item_list', $items);
+  return theme('item_list', array('items' => $items));
 }
 
 /**

=== modified file 'payment/uc_google_checkout/uc_google_checkout.admin.inc'
--- payment/uc_google_checkout/uc_google_checkout.admin.inc	2009-07-11 19:04:32 +0000
+++ payment/uc_google_checkout/uc_google_checkout.admin.inc	2010-02-03 21:35:40 +0000
@@ -156,7 +156,9 @@
   return $form;
 }
 
-function theme_uc_google_checkout_shipping_settings($form) {
+function theme_uc_google_checkout_shipping_settings($variables) {
+  $form = $variables['form'];
+
   $header = array(t('Enable'), t('Service'), t('Default price'), t('Pickup type'), t('Handling charge'), t('Percentage markup/discount'));
 
   $companies = uc_google_checkout_shipping_companies();
@@ -174,7 +176,7 @@
     }
     $rows[] = $row;
   }
-  $output = theme('table', $header, $rows) . drupal_render($form);
+  $output = theme('table', array('header' => $header, 'rows' => $rows)) . drupal_render_children($form);
 
   return $output;
 }
@@ -252,7 +254,9 @@
   return $form;
 }
 
-function theme_uc_google_checkout_taxes_settings($form) {
+function theme_uc_google_checkout_taxes_settings($variables) {
+  $form = $variables['form'];
+
   $header = array(t('Delete'), uc_get_field_name('zone'), t('Rate'), t('Tax shipping?'));
 
   $rows = array();
@@ -271,8 +275,8 @@
     $rows[] = $row;
   }
 
-  $output = theme('table', $header, $rows);
-  $output .= drupal_render($form);
+  $output = theme('table', array('header' => $header, 'rows' => $rows));
+  $output .= drupal_render_children($form);
 
   return $output;
 }

=== modified file 'payment/uc_google_checkout/uc_google_checkout.module'
--- payment/uc_google_checkout/uc_google_checkout.module	2010-02-02 19:12:45 +0000
+++ payment/uc_google_checkout/uc_google_checkout.module	2010-02-03 20:37:44 +0000
@@ -106,11 +106,11 @@
 function uc_google_checkout_theme() {
   return array(
     'uc_google_checkout_shipping_settings' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_google_checkout.admin.inc',
     ),
     'uc_google_checkout_taxes_settings' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_google_checkout.admin.inc',
     ),
   );

=== modified file 'payment/uc_payment/uc_payment.admin.inc'
--- payment/uc_payment/uc_payment.admin.inc	2009-07-11 19:04:32 +0000
+++ payment/uc_payment/uc_payment.admin.inc	2010-02-03 20:08:04 +0000
@@ -11,7 +11,7 @@
 // Displays an overview of the payment settings.
 function uc_payment_settings_overview() {
   // Theme all the pages beneath this path into summary overviews.
-  return theme('summary_overview', summarize_child_form_pages('admin/store/settings/payment/edit'));
+  return theme('summary_overview', array('summaries' => summarize_child_form_pages('admin/store/settings/payment/edit')));
 }
 
 function uc_payment_settings_form() {
@@ -138,7 +138,9 @@
   return system_settings_form($form);
 }
 
-function theme_uc_payment_method_table($form) {
+function theme_uc_payment_method_table($variables) {
+  $form = $variables['form'];
+
   $header = array(t('Enabled'), t('Payment method'), t('List position'), t('Default gateway'));
 
   foreach (element_children($form) as $method) {
@@ -156,7 +158,7 @@
     );
   }
 
-  return theme('table', $header, $rows);
+  return theme('table', array('header' => $header, 'rows' => $rows));
 }
 
 function uc_payment_gateways_form() {
@@ -390,7 +392,9 @@
   return $form;
 }
 
-function theme_uc_payment_by_order_form($form) {
+function theme_uc_payment_by_order_form($variables) {
+  $form = $variables['form'];
+
   $output = '<p><strong>'. t('Order total:') .'</strong> '. drupal_render($form['order_total'])
            .'<br /><strong>'. t('Current balance:') .'</strong> '
           . drupal_render($form['balance']) .'</p>';

=== modified file 'payment/uc_payment/uc_payment.module'
--- payment/uc_payment/uc_payment.module	2010-02-02 18:30:52 +0000
+++ payment/uc_payment/uc_payment.module	2010-02-03 20:37:44 +0000
@@ -192,15 +192,15 @@
 function uc_payment_theme() {
   return array(
     'uc_payment_method_table' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_payment.admin.inc',
     ),
     'uc_payment_by_order_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_payment.admin.inc',
     ),
     'uc_payment_method_select' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
   );
 }

=== modified file 'payment/uc_payment/uc_payment_checkout_pane.inc'
--- payment/uc_payment/uc_payment_checkout_pane.inc	2009-09-21 14:13:04 +0000
+++ payment/uc_payment/uc_payment_checkout_pane.inc	2010-02-03 21:35:40 +0000
@@ -150,7 +150,9 @@
  * the default or available payment methods... we need the JS to grab the right
  * default payment details.
  */
-function theme_uc_payment_method_select($form) {
+function theme_uc_payment_method_select($variables) {
+  $form = $variables['form'];
+
   if (empty($form['#options'])) {
     drupal_set_message(t('Checkout cannot be completed without any payment methods enabled. Please contact an administrator to resolve the issue.'), 'error');
     return;
@@ -160,5 +162,5 @@
   // default payment method to a JS variable or use a selector.  -RS
   drupal_add_js(array('ucDefaultPayment' => $form['#default_value']), 'setting');
 
-  return drupal_render($form);
+  return drupal_render_children($form);
 }

=== modified file 'payment/uc_payment_pack/uc_payment_pack.admin.inc'
--- payment/uc_payment_pack/uc_payment_pack.admin.inc	2010-02-02 18:30:52 +0000
+++ payment/uc_payment_pack/uc_payment_pack.admin.inc	2010-02-03 21:35:40 +0000
@@ -66,13 +66,15 @@
   return $form;
 }
 
-function theme_uc_payment_pack_receive_check_form($form) {
+function theme_uc_payment_pack_receive_check_form($variables) {
+  $form = $variables['form'];
+
   drupal_add_js(drupal_get_path('module', 'uc_payment') .'/uc_payment.js');
 
   $output = '<p>'. t('Use the form to enter the check into the payments system and set the expected clear date.') .'</p>';
   $output .= '<p><strong>'. t('Order balance:') .'</strong> '. drupal_render($form['balance']) .'</p>';
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
 
   return $output;
 }

=== modified file 'payment/uc_payment_pack/uc_payment_pack.module'
--- payment/uc_payment_pack/uc_payment_pack.module	2010-02-02 18:30:52 +0000
+++ payment/uc_payment_pack/uc_payment_pack.module	2010-02-03 19:15:20 +0000
@@ -25,10 +25,10 @@
 function uc_payment_pack_theme() {
   return array(
     'uc_payment_method_other_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_payment_pack_receive_check_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_payment_pack.admin.inc',
     ),
   );
@@ -128,7 +128,9 @@
   return $form;
 }
 
-function theme_uc_payment_method_other_form($form) {
+function theme_uc_payment_method_other_form($variables) {
+  $form = $variables['form'];
+
   $output = '<table class="order-edit-table"><tr><td class="oet-label">'
           . t('Description:') .'</td><td>'
           . drupal_render($form['pm_other_description'])

=== modified file 'payment/uc_paypal/uc_paypal.pages.inc'
--- payment/uc_paypal/uc_paypal.pages.inc	2010-02-02 18:45:39 +0000
+++ payment/uc_paypal/uc_paypal.pages.inc	2010-02-02 20:34:14 +0000
@@ -372,7 +372,7 @@
   }
 
   drupal_add_css(drupal_get_path('module', 'uc_cart') .'/uc_cart.css');
-  $output = '<div>'. theme('cart_review_table', FALSE) .'</div>';
+  $output = '<div>'. theme('cart_review_table', array('show_subtotal' => FALSE)) .'</div>';
   $output .= uc_order_pane_line_items('customer', $order);
   $output .= '<p>'. t("Your order is not complete until you click the 'Submit order' button below. Your PayPal account will be charged for the amount shown above once your order is placed. You will receive confirmation once your payment is complete.") .'</p>';
   $output .= drupal_get_form('uc_paypal_ec_submit_form');

=== modified file 'shipping/uc_flatrate/uc_flatrate.admin.inc'
--- shipping/uc_flatrate/uc_flatrate.admin.inc	2009-08-14 19:10:32 +0000
+++ shipping/uc_flatrate/uc_flatrate.admin.inc	2010-02-02 20:34:28 +0000
@@ -33,7 +33,7 @@
   }
   if (count($rows)) {
     $header = array(t('Title'), t('Label'), t('Base rate'), t('Default product rate'), array('data' => t('Operations'), 'colspan' => 2));
-    $output .= theme('table', $header, $rows);
+    $output .= theme('table', array('header' => $header, 'rows' => $rows));
   }
   $output .= l(t('Add a new flat rate shipping method.'), 'admin/store/settings/quotes/methods/flatrate/add');
   return $output;

=== modified file 'shipping/uc_quote/uc_quote.admin.inc'
--- shipping/uc_quote/uc_quote.admin.inc	2009-07-21 14:29:21 +0000
+++ shipping/uc_quote/uc_quote.admin.inc	2010-02-03 21:35:40 +0000
@@ -17,7 +17,7 @@
   $summaries = array_merge($summaries, summarize_child_form_pages('admin/store/settings/quotes/methods', FALSE, TRUE));
 
   // Theme it all up in a summaries overview.
-  return theme('summary_overview', $summaries);
+  return theme('summary_overview', array('summaries' => $summaries));
 }
 
 /**
@@ -250,7 +250,9 @@
  * @ingroup themeable
  * @see uc_quote_method_settings()
  */
-function theme_uc_quote_method_settings($form) {
+function theme_uc_quote_method_settings($variables) {
+  $form = $variables['form'];
+
   $methods = uc_quote_shipping_method_options();
   $output = '';
 
@@ -263,9 +265,9 @@
     $row[] = drupal_render($form['methods'][$method]['uc_quote_method_weight']);
     $rows[] = $row;
   }
-  $output .= theme('table', $header, $rows);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
   return $output;
 }
 

=== modified file 'shipping/uc_quote/uc_quote.module'
--- shipping/uc_quote/uc_quote.module	2010-01-25 16:37:01 +0000
+++ shipping/uc_quote/uc_quote.module	2010-02-03 21:35:40 +0000
@@ -92,11 +92,11 @@
 function uc_quote_theme() {
   return array(
     'uc_quote_method_settings' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_quote.admin.inc',
     ),
     'uc_cart_pane_quotes' => array(
-      'arguments' => array('items' => NULL),
+      'render element' => 'form',
     ),
   );
 }
@@ -176,7 +176,7 @@
       '#title' => t('Shipping settings'),
       '#collapsible' => TRUE,
       '#weight' => module_exists('content') ? content_extra_field_weight($form['#node']->type, 'shipping') : 0,
-      '#attributes' => array('class' => 'product-shipping'),
+      '#attributes' => array('class' => array('product-shipping')),
     );
 
     // Build the options for the default shipping type.
@@ -742,14 +742,16 @@
  *
  * @ingroup themeable
  */
-function theme_uc_cart_pane_quotes($form) {
+function theme_uc_cart_pane_quotes($variables) {
+  $form = $variables['form'];
+
   $output = '<div class="solid-border">';
   $output .= '<strong>'. t('Estimated shipping cost:') .'</strong>';
   $output .= drupal_render($form['delivery_country']);
   $output .= drupal_render($form['delivery_zone']);
   $output .= drupal_render($form['delivery_postal_code']);
   $output .= drupal_render($form['get_quote']);
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
   $output .= '</div>';
 
   return $output;
@@ -948,7 +950,7 @@
       $form['quotes']['add_quote'] = array(
         '#type' => 'submit',
         '#value' => t('Apply to order'),
-        '#attributes' => array('class' => 'save-button'),
+        '#attributes' => array('class' => array('save-button')),
         '#disabled' => TRUE,
       );
 

=== modified file 'shipping/uc_shipping/uc_shipping.admin.inc'
--- shipping/uc_shipping/uc_shipping.admin.inc	2010-01-27 22:15:38 +0000
+++ shipping/uc_shipping/uc_shipping.admin.inc	2010-02-03 21:35:40 +0000
@@ -29,7 +29,16 @@
     if ($package->sid && $package->label_image) {
       $method = db_result(db_query("SELECT shipping_method FROM {uc_shipments} WHERE sid = %d", $package->sid));
     }
-    $row[] = isset($package->label_image) ? l(theme('imagecache', 'uc_thumbnail', $package->label_image, t('Shipping Label'), t('Shipping Label')), 'admin/store/orders/'. $order->order_id .'/shipments/labels/'. $method .'/'. $package->label_image, array('html' => TRUE)) : '';
+    $row[] = isset($package->label_image)
+      ? l(theme('image_style', array(
+          'style_name' => 'uc_thumbnail',
+          'path' => $package->label_image,
+          'alt' => t('Shipping Label'),
+          'title' => t('Shipping Label'),
+        )),
+        'admin/store/orders/'. $order->order_id .'/shipments/labels/'. $method .'/'. $package->label_image,
+        array('html' => TRUE))
+      : '';
     $row[] = l(t('edit'), 'admin/store/orders/'. $order->order_id .'/packages/'. $package->package_id .'/edit');
     $row[] = l(t('delete'), 'admin/store/orders/'. $order->order_id .'/packages/'. $package->package_id .'/delete');
     if ($package->sid) {
@@ -44,7 +53,7 @@
   if (empty($rows)) {
     $rows[][] = array('data' => t("This order's products have not been organized into packages."), 'colspan' => 10);
   }
-  $output = theme('table', $header, $rows);
+  $output = theme('table', array('header' => $header, 'rows' => $rows));
   $result = db_query("SELECT op.order_product_id, CASE WHEN COUNT(pp.qty) = 0 THEN 0 ELSE SUM(op.qty) / COUNT(pp.qty) END AS total, SUM(pp.qty) AS packaged FROM {uc_order_products} AS op LEFT JOIN {uc_packaged_products} AS pp ON op.order_product_id = pp.order_product_id WHERE op.order_id = %d AND op.data LIKE '%%%s%%' GROUP BY op.order_product_id HAVING SUM(pp.qty) IS NULL OR CASE WHEN COUNT(pp.qty) = 0 THEN 0 ELSE SUM(op.qty) / COUNT(pp.qty) END > SUM(pp.qty)", $order->order_id, 's:9:"shippable";s:1:"1";');
   if (db_fetch_object($result)) {
     $output .= l(t('Create packages.'), 'admin/store/orders/'. $order->order_id .'/packages/new');
@@ -133,7 +142,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_shipping_new_package_fieldset($fieldset) {
+function theme_uc_shipping_new_package_fieldset($variables) {
+  $fieldset = $variables['fieldset'];
+
   $output = '';
   $header = array(theme('table_select_header_cell'), t('SKU'), t('Title'), t('Qty'), t('Package'));
   $rows = array();
@@ -146,8 +157,9 @@
     $row[] = drupal_render($fieldset[$op_id]['package']);
     $rows[] = $row;
   }
-  $output .= theme('table', $header, $rows);
-  $output .= drupal_render($fieldset);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+  $output .= drupal_render_children($fieldset);
+
   return $output;
 }
 
@@ -291,7 +303,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_shipping_edit_package_fieldset($fieldset) {
+function theme_uc_shipping_edit_package_fieldset($varibles) {
+  $fieldset = $variables['fieldset'];
+
   $output = '';
   $header = array(theme('table_select_header_cell'), t('SKU'), t('Title'), t('Qty'));
   $rows = array();
@@ -303,8 +317,9 @@
     $row[] = drupal_render($fieldset[$op_id]['qty']);
     $rows[] = $row;
   }
-  $output .= theme('table', $header, $rows);
-  $output .= drupal_render($fieldset);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+  $output .= drupal_render_children($fieldset);
+
   return $output;
 }
 
@@ -412,7 +427,7 @@
   if (empty($rows)) {
     $rows[] = array(array('data' => t('No shipments have been made for this order.'), 'colspan' => 11));
   }
-  $output = theme('table', $header, $rows);
+  $output = theme('table', array('header' => $header, 'rows' => $rows));
   $packages = db_result(db_query("SELECT COUNT(*) FROM {uc_packages} WHERE order_id = %d AND sid IS NULL", $order->order_id));
   if ($packages) {
     $output .= l(t('Make a new shipment'), 'admin/store/orders/'. $order->order_id .'/shipments/new');
@@ -513,7 +528,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_shipping_new_shipment($form) {
+function theme_uc_shipping_new_shipment($variables) {
+  $form = $variables['form'];
+
   $output = '';
   $header = array(theme('table_select_header_cell'), t('Package'), t('Products'), t('Weight'));
   foreach (element_children($form) as $shipping_type) {
@@ -527,11 +544,11 @@
       $rows[] = $row;
     }
     if (count($rows)) {
-      $form[$shipping_type]['packages']['table'] = array('#value' => theme('table', $header, $rows));
+      $form[$shipping_type]['packages']['table'] = array('#value' => theme('table', array('header' => $header, 'rows' => $rows)));
     }
     //$output .= drupal_render($form[$shipping_type]['methods']);
   }
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
   return $output;
 }
 
@@ -578,7 +595,7 @@
   $rows = array();
   $rows[] = array(t('Ship date:'), format_date($shipment->ship_date, 'custom', 'D, '. variable_get('uc_date_format_default', 'm/d/Y')));
   $rows[] = array(t('Expected delivery:'), format_date($shipment->expected_delivery, 'custom', 'D, '. variable_get('uc_date_format_default', 'm/d/Y')));
-  $output .= theme('table', array(), $rows, array('style' => 'width: auto'));
+  $output .= theme('table', array('rows' => $rows, 'attributes' => array('style' => 'width: auto')));
   $output .= '</div>';
   $output .= '<div class="order-pane abs-left"><div class="order-pane-title">'. t('Shipment Details:') .'</div>';
   $rows = array();
@@ -602,7 +619,7 @@
     'type' => 'amount',
   );
   $rows[] = array(t('Cost:'), uc_price($shipment->cost, $context, array('label' => FALSE)));
-  $output .= theme('table', array(), $rows, array('style' => 'width:auto'));
+  $output .= theme('table', array('rows' => $rows, 'attributes' => array('style' => 'width:auto')));
   $output .= '</div>';
   foreach ($shipment->packages as $package) {
     $output .= uc_shipping_package_view($package);
@@ -658,7 +675,7 @@
       '#title' => t('Package @id', array('@id' => $id)),
       '#collapsible' => TRUE,
     );
-    $form['packages'][$id]['products'] = array('#value' => theme('item_list', $product_list));
+    $form['packages'][$id]['products'] = array('#value' => theme('item_list', array('items' => $product_list)));
     $form['packages'][$id]['pkg_type'] = array('#type' => 'textfield',
       '#title' => t('Package type'),
       '#default_value' => $package->pkg_type,
@@ -840,9 +857,23 @@
 }
 
 /**
+ * Show a printer-friendly version of a shipment.
+ */
+function uc_shipping_shipment_print($order, $shipment) {
+  return array(
+    '#theme' => 'uc_shipping_shipment_print',
+    '#order' => $order,
+    '#shipment' => $shipment,
+  );
+}
+
+/**
  * Display the packing slip and shipping labels for printing.
  */
-function theme_uc_shipping_shipment_print($order, $shipment) {
+function theme_uc_shipping_shipment_print($variables) {
+  $order = $variables['order'];
+  $shipment = $variables['shipment'];
+
   $language = $GLOBALS['language'];
   $output = <<<EOHTML
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -858,14 +889,18 @@
 <body>
 EOHTML;
 
-  $output .= theme('uc_packing_slip', $order, $shipment);
+  $output .= theme('uc_packing_slip', array('order' => $order, 'shipment' => $shipment));
 
   foreach ($shipment->packages as $id => $package) {
     if ($package->label_image && ($path = file_create_path($package->label_image)) && file_exists($path)) {
       // TODO: Find a way to store these magic numbers specifically for UPS.
       list($width, $height) = array(672, 392);
       $output .= '<br class="page-break" />' . "\n";;
-      $output .= theme('image', file_create_url($package->label_image), '', '', array('width' => $width, 'height' => $height), FALSE) ."\n";
+      $output .= theme('image', array(
+        'path' => file_create_url($package->label_image),
+        'attributes' => array('width' => $width, 'height' => $height),
+        'getsize' => FALSE,
+      )) ."\n";
     }
   }
 

=== modified file 'shipping/uc_shipping/uc_shipping.module'
--- shipping/uc_shipping/uc_shipping.module	2010-01-27 22:15:38 +0000
+++ shipping/uc_shipping/uc_shipping.module	2010-02-03 21:35:40 +0000
@@ -112,8 +112,8 @@
   );
   $items['admin/store/orders/%uc_order/shipments/%uc_shipping_shipment/print'] = array(
     'title' => 'Print',
-    'page callback' => 'theme',
-    'page arguments' => array('uc_shipping_shipment_print', 3, 5),
+    'page callback' => 'uc_shipping_shipment_print',
+    'page arguments' => array(3, 5),
     'access callback' => 'uc_shipping_order_access',
     'access arguments' => array(3),
     'type' => MENU_LOCAL_TASK,
@@ -168,28 +168,28 @@
 function uc_shipping_theme() {
   return array(
     'uc_shipping_new_package_fieldset' => array(
-      'arguments' => array('fieldset' => NULL),
+      'render element' => 'fieldset',
       'file' => 'uc_shipping.admin.inc',
     ),
     'uc_shipping_edit_package_fieldset' => array(
-      'arguments' => array('fieldset' => NULL),
+      'render element' => 'fieldset',
       'file' => 'uc_shipping.admin.inc',
     ),
     'uc_shipping_new_shipment' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_shipping.admin.inc',
     ),
     'uc_shipping_package_dimensions' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_shipping_address' => array(
-      'arguments' => array('address' => NULL),
+      'render element' => 'address',
     ),
     'uc_shipping_shipment_print' => array(
-      'arguments' => array('order' => NULL, 'shipment' => NULL),
+      'variables' => array('order' => NULL, 'shipment' => NULL),
     ),
     'uc_packing_slip' => array(
-      'arguments' => array('order' => NULL, 'shipment' => NULL),
+      'variables' => array('order' => NULL, 'shipment' => NULL),
       'template' => 'uc-packing-slip',
     ),
   );
@@ -313,7 +313,7 @@
   else {
     $rows[] = array(t('Label:'), t('n/a'));
   }
-  $output .= theme('table', array(), $rows, array('style' => 'width:auto;'));
+  $output .= theme('table', array('rows' => $rows, 'attributes' => array('style' => 'width:auto;')));
   $output .= '</div>';
 
   return $output;
@@ -324,14 +324,15 @@
  *
  * @ingroup themeable
  */
-function theme_uc_shipping_package_dimensions($form) {
-  $output = '';
+function theme_uc_shipping_package_dimensions($variables) {
+  $form = $variables['form'];
+
   $row = array();
   foreach (element_children($form) as $dimension) {
     $row[] = drupal_render($form[$dimension]);
   }
-  $output .= theme('table', array(), array($row));
-  return $output;
+
+  return theme('table', array('rows' => array($row)));
 }
 
 /**
@@ -339,7 +340,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_shipping_address($address) {
+function theme_uc_shipping_address($variables) {
+  $address = $variables['address'];
+
   drupal_add_css(drupal_get_path('module', 'uc_cart') .'/uc_cart.css');
   if ($address['#collapsed']) {
     $collapsed = ' collapsed';
@@ -369,9 +372,8 @@
   }
   $output .= '</table>';
 
-  foreach (element_children($address) as $element) {
-    $output .= drupal_render($address[$element]);
-  }
+  $output .= drupal_render_children($address);
+
   return $output;
 }
 
@@ -598,7 +600,7 @@
       }
       $output = '';
       foreach ($tracking as $carrier => $item) {
-        $output .= '<strong>'. $carrier .':</strong>'. theme('item_list', $item);
+        $output .= '<strong>'. $carrier .':</strong>'. theme('item_list', array('items' => $item));
       }
       return $output;
     break;

=== modified file 'shipping/uc_ups/uc_ups.admin.inc'
--- shipping/uc_ups/uc_ups.admin.inc	2010-02-02 18:45:39 +0000
+++ shipping/uc_ups/uc_ups.admin.inc	2010-02-03 21:35:40 +0000
@@ -176,10 +176,10 @@
  * @ingroup themeable
  * @see uc_ups_confirm_shipment()
  */
-function theme_uc_ups_confirm_shipment($form) {
-  $output = '';
+function theme_uc_ups_confirm_shipment($variables) {
+  $form = $variables['form'];
 
-  $output .= '<div class="shipping-address"><b>'. t('Ship from:') .'</b><br />';
+  $output = '<div class="shipping-address"><b>'. t('Ship from:') .'</b><br />';
   $output .= uc_address_format(
     check_plain($_SESSION['ups']['origin']->first_name),
     check_plain($_SESSION['ups']['origin']->last_name),
@@ -221,7 +221,8 @@
   $exp_delivery = $_SESSION['ups']['expected_delivery'];
   $output .= '<br />Expected delivery: '. format_date(gmmktime(12, 0, 0, $exp_delivery['month'], $exp_delivery['day'], $exp_delivery['year']), 'custom', variable_get('uc_date_format_default', 'm/d/Y'));
   $output .= "</div>\n<br style=\"clear: both;\" />";
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
+
   return $output;
 }
 
@@ -351,8 +352,12 @@
  * @ingroup themeable
  */
 function theme_uc_ups_label_image() {
-  $args = func_get_args();
-  $image_path = file_create_url(implode('/', $args));
+  $args = explode('/', $_GET['q'], 7);
+  if (count($args) != 7) {
+    return MENU_NOT_FOUND;
+  }
+
+  $image_path = file_create_url($args[6]);
 
   $output = <<<EOLABEL
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">

=== modified file 'shipping/uc_ups/uc_ups.module'
--- shipping/uc_ups/uc_ups.module	2010-02-02 18:45:39 +0000
+++ shipping/uc_ups/uc_ups.module	2010-02-03 19:19:42 +0000
@@ -57,15 +57,15 @@
 function uc_ups_theme() {
   return array(
     'uc_ups_confirm_shipment' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_ups.admin.inc',
     ),
     'uc_ups_label_image' => array(
-      'arguments' => array(),
+      'variables' => array(),
       'file' => 'uc_ups.admin.inc',
     ),
     'uc_ups_option_label' => array(
-      'arguments' => array('service' => NULL),
+      'variables' => array('service' => NULL),
     ),
   );
 }
@@ -851,7 +851,7 @@
       $quotes[$key]['rate'] = uc_price($quote['rate'], $context);
       $context['revision'] = 'formatted';
       $quotes[$key]['format'] = uc_price($quote['rate'], $context);
-      $quotes[$key]['option_label'] = theme('uc_ups_option_label', $method['ups']['quote']['accessorials'][$key]);
+      $quotes[$key]['option_label'] = theme('uc_ups_option_label', array('service' => $method['ups']['quote']['accessorials'][$key]));
     }
   }
 
@@ -887,7 +887,9 @@
  *   The UPS service name.
  * @ingroup themeable
  */
-function theme_uc_ups_option_label($service) {
+function theme_uc_ups_option_label($variables) {
+  $service = $variables['service'];
+
   // Start with logo as required by the UPS terms of service.
   $output = '<img class="ups-logo" src="'. url(drupal_get_path('module', 'uc_ups')) .'/uc_ups_logo.gif" alt="'. t('UPS Logo') .'" /> ';
 
@@ -938,7 +940,7 @@
       $pkg_form = array('#type' => 'fieldset',
         '#title' => t('Package !id', array('!id' => $id)),
       );
-      $pkg_form['products'] = array('#value' => theme('item_list', $product_list));
+      $pkg_form['products'] = array('#value' => theme('item_list', array('items' => $product_list)));
       $pkg_form['package_id'] = array('#type' => 'hidden', '#value' => $id);
       $pkg_form['pkg_type'] = array('#type' => 'select',
         '#title' => t('Package type'),
@@ -954,7 +956,7 @@
       $pkg_type['dimensions'] = array('#type' => 'fieldset',
         '#title' => t('Dimensions'),
         '#description' => t('Physical dimensions of the package.'),
-        '#theme' => 'uc_ups_dimensions',
+        '#theme' => 'uc_shipping_package_dimensions',
       );
       $pkg_form['dimensions']['units'] = array('#type' => 'select',
         '#title' => t('Units of measurement'),

=== modified file 'shipping/uc_usps/uc_usps.module'
--- shipping/uc_usps/uc_usps.module	2010-02-02 18:45:39 +0000
+++ shipping/uc_usps/uc_usps.module	2010-02-03 19:20:13 +0000
@@ -35,7 +35,7 @@
 function uc_usps_theme() {
   return array(
     'uc_usps_option_label' => array(
-      'arguments' => array('service' => NULL),
+      'variables' => array('service' => NULL),
     ),
   );
 }
@@ -430,7 +430,7 @@
       $services[$key]['rate'] = uc_price($quote['rate'], $context);
       $context['revision'] = 'formatted';
       $services[$key]['format'] = uc_price($quote['rate'], $context);
-      $services[$key]['option_label'] = theme('uc_usps_option_label', $quote['label']);
+      $services[$key]['option_label'] = theme('uc_usps_option_label', array('service' => $quote['label']));
     }
   }
 
@@ -447,7 +447,9 @@
  *   The USPS service name.
  * @ingroup themeable
  */
-function theme_uc_usps_option_label($service) {
+function theme_uc_usps_option_label($variables) {
+  $service = $variables['service'];
+
   // Start with logo
   $output = '<img class="usps-logo" src="'. url(drupal_get_path('module', 'uc_usps')) .'/uc_usps_logo.gif" alt="'. t('USPS Logo') .'" /> ';
 

=== modified file 'shipping/uc_weightquote/uc_weightquote.admin.inc'
--- shipping/uc_weightquote/uc_weightquote.admin.inc	2009-08-24 19:20:57 +0000
+++ shipping/uc_weightquote/uc_weightquote.admin.inc	2010-02-02 20:55:32 +0000
@@ -36,7 +36,7 @@
   }
   if (count($rows)) {
     $header = array(t('Title'), t('Label'), t('Base rate'), t('Default product rate'), array('data' => t('Operations'), 'colspan' => 2));
-    $output .= theme('table', $header, $rows);
+    $output .= theme('table', array('header' => $header, 'rows' => $rows));
   }
   $output .= l(t('Add a new weight quote shipping method.'), 'admin/store/settings/quotes/methods/weightquote/add');
   return $output;

=== modified file 'uc_attribute/uc_attribute.admin.inc'
--- uc_attribute/uc_attribute.admin.inc	2010-01-13 20:24:25 +0000
+++ uc_attribute/uc_attribute.admin.inc	2010-02-03 21:35:40 +0000
@@ -50,7 +50,7 @@
     );
   }
 
-  $output = theme('table', $header, $rows) . theme('pager', NULL, 30)
+  $output = theme('table', array('header' => $header, 'rows' => $rows)) . theme('pager')
           . l(t('Add an attribute'), 'admin/store/attributes/add');
 
   return $output;
@@ -242,7 +242,7 @@
         '#type' => 'weight',
         '#delta' => 50,
         '#default_value' => $data->ordering,
-        '#attributes' => array('class' => 'uc-attribute-option-table-ordering'),
+        '#attributes' => array('class' => array('uc-attribute-option-table-ordering')),
       ),
       'ops' => array(
         '#value' => l(t('edit'), 'admin/store/attributes/'. $attribute->aid .'/options/'. $key .'/edit') .' '.
@@ -284,7 +284,8 @@
  *
  * @ingroup themeable
  */
-function theme_uc_attribute_options_form($form) {
+function theme_uc_attribute_options_form($variables) {
+  $form = $variables['form'];
 
   $header = array(t('Name'), t('Default cost'), t('Default price'), t('Default weight'), array('data' => t('List position'), 'sort' => 'asc'), t('Operations'));
 
@@ -301,7 +302,7 @@
 
       $rows[] = array(
         'data' => $row,
-        'class' => 'draggable',
+        'class' => array('draggable'),
       );
     }
   }
@@ -313,9 +314,9 @@
 
   drupal_add_tabledrag('uc-attribute-option-table', 'order', 'sibling', 'uc-attribute-option-table-ordering');
 
-  $output = theme('table', $header, $rows, array('id' => 'uc-attribute-option-table'));
+  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'uc-attribute-option-table')));
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
 
   $output .= l(t('Add an option'), 'admin/store/attributes/'. $form['aid']['#value'] .'/options/add');
 
@@ -551,7 +552,7 @@
           'ordering' => array(
             '#type' => 'weight',
             '#default_value' => $attribute->ordering,
-            '#attributes' => array('class' => 'uc-attribute-table-weight'),
+            '#attributes' => array('class' => array('uc-attribute-table-weight')),
           ),
           'display' => array(
             '#type' => 'select',
@@ -617,7 +618,9 @@
  * @ingroup themeable
  * @see uc_object_attributes_form()
  */
-function theme_uc_object_attributes_form($form) {
+function theme_uc_object_attributes_form($variables) {
+  $form = $variables['form'];
+
   $output = '';
 
   if ($form['view']['#value'] == 'overview') {
@@ -637,7 +640,7 @@
 
         $rows[] = array(
           'data' => $row,
-          'class' => 'draggable',
+          'class' => array('draggable'),
         );
       }
     }
@@ -648,7 +651,7 @@
     }
 
     drupal_add_tabledrag('uc-attribute-table', 'order', 'sibling', 'uc-attribute-table-weight');
-    $output = theme('table', $header, $rows, array('id' => 'uc-attribute-table'));
+    $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'uc-attribute-table')));
   }
   else {
     $output = '<div class="uc-attributes-add-link">';
@@ -656,7 +659,7 @@
     $output .= '</div>';
   }
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
 
   return $output;
 }
@@ -817,7 +820,7 @@
           '#type' => 'weight',
           '#delta' => 50,
           '#default_value' => is_null($option->ordering) ? $option->default_ordering : $option->ordering,
-          '#attributes' => array('class' => 'uc-attribute-option-table-ordering'),
+          '#attributes' => array('class' => array('uc-attribute-option-table-ordering')),
         );
       }
 
@@ -863,7 +866,9 @@
  * @ingroup themeable
  * @see uc_object_options_form()
  */
-function theme_uc_object_options_form($form) {
+function theme_uc_object_options_form($variables) {
+  $form = $variables['form'];
+
   $header = array(array('data' => '&nbsp;&nbsp;'. t('Options')) + theme('table_select_header_cell'), t('Default'), t('Cost'), t('Price'), t('Weight'), t('List position'));
   $table_id_num = $tables = 0;
 
@@ -885,7 +890,7 @@
 
         $rows[] = array(
           'data' => $row,
-          'class' => 'draggable',
+          'class' => array('draggable'),
         );
       }
       $table_id = 'uc-attribute-option-table-'. $table_id_num++;
@@ -902,7 +907,7 @@
     }
 
 
-    $output .= theme('table', $header, $rows, array('class' => 'product_attributes', 'id' => $table_id), '<h2>'. drupal_render($form['attributes'][$key]['name']) .'</h2>');
+    $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('product_attributes'), 'id' => $table_id), 'caption' => '<h2>'. drupal_render($form['attributes'][$key]['name']) .'</h2>'));
 
     $tables++;
   }
@@ -918,7 +923,7 @@
     }
   }
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
 
   return $output;
 }
@@ -933,13 +938,15 @@
  *     #options - Array of option names
  * @return Themed set of attribute options.
  */
-function theme_uc_product_attributes($element) {
+function theme_uc_product_attributes($variables) {
+  $attributes = $variable['attributes'];
+
   $option_rows = array();
 
-  foreach (element_children($element) as $key) {
+  foreach (element_children($attributes) as $key) {
     $optionstr = '';
 
-    foreach ((array)$element[$key]['#options'] as $option) {
+    foreach ((array)$attributes[$key]['#options'] as $option) {
       // We only need to allow translation from the second option onward
       if (empty($optionstr)) {
         $optionstr .= $option;
@@ -948,11 +955,11 @@
         $optionstr .= t(', !option', array('!option' => $option));
       }
     }
-    $option_rows[$key] = t('@attribute: @option', array('@attribute' => $element[$key]['#attribute_name'], '@option' => $optionstr));
+    $option_rows[$key] = t('@attribute: @option', array('@attribute' => $attributes[$key]['#attribute_name'], '@option' => $optionstr));
   }
 
   if (!empty($option_rows)) {
-    return theme('item_list', array_values($option_rows), NULL, 'ul', array('class' => 'product-description'));
+    return theme('item_list', array('items' => array_values($option_rows), 'attributes' => array('class' => array('product-description'))));
   }
 
   return '';

=== modified file 'uc_attribute/uc_attribute.module'
--- uc_attribute/uc_attribute.module	2010-01-25 16:37:01 +0000
+++ uc_attribute/uc_attribute.module	2010-02-03 21:35:40 +0000
@@ -251,22 +251,22 @@
 function uc_attribute_theme() {
   return array(
     'uc_attribute_add_to_cart' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_object_attributes_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_attribute.admin.inc',
     ),
     'uc_object_options_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_attribute.admin.inc',
     ),
     'uc_attribute_options_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_attribute.admin.inc',
     ),
     'uc_product_attributes' => array(
-      'arguments' => array('product' => NULL),
+      'render element' => 'attributes',
       'file' => 'uc_attribute.admin.inc',
     ),
   );
@@ -834,7 +834,9 @@
  * @ingroup themeable
  * @see _uc_attribute_alter_form()
  */
-function theme_uc_attribute_add_to_cart($form) {
+function theme_uc_attribute_add_to_cart($variables) {
+  $form = $variables['form'];
+
   $output = '<div class="attributes">';
   $stripes = array('even' => 'odd', 'odd' => 'even');
   $parity = 'even';
@@ -846,7 +848,7 @@
     $output .= '</div>';
   }
 
-  $output .= drupal_render($form) .'</div>';
+  $output .= drupal_render_children($form) .'</div>';
 
   return $output;
 }

=== modified file 'uc_cart/uc_cart.admin.inc'
--- uc_cart/uc_cart.admin.inc	2010-01-29 14:21:05 +0000
+++ uc_cart/uc_cart.admin.inc	2010-02-02 20:58:47 +0000
@@ -34,7 +34,7 @@
 
   // Theme it all up in a summaries overview.
   return array(
-    '#markup' => theme('summary_overview', $summaries),
+    '#markup' => theme('summary_overview', array('summaries' => $summaries)),
   );
 }
 
@@ -272,7 +272,7 @@
  */
 function uc_cart_checkout_settings_overview() {
   // Theme all the pages beneath this path into summary overviews.
-  return array('#markup' => theme('summary_overview', summarize_child_form_pages('admin/store/settings/checkout/edit')));
+  return array('#markup' => theme('summary_overview', array('summaries' => summarize_child_form_pages('admin/store/settings/checkout/edit'))));
 }
 
 /**

=== modified file 'uc_cart/uc_cart.module'
--- uc_cart/uc_cart.module	2010-02-03 13:57:00 +0000
+++ uc_cart/uc_cart.module	2010-02-03 21:35:40 +0000
@@ -205,48 +205,60 @@
 function uc_cart_theme() {
   return array(
     'uc_cart_block_title' => array(
-      'arguments' => array('title' => NULL, 'icon_class' => FALSE, 'collapsible' => FALSE),
+      'variables' => array('title' => NULL, 'icon_class' => 'cart-empty', 'collapsible' => TRUE),
     ),
     'uc_cart_block_title_icon' => array(
-      'arguments' => array(),
+      'variables' => array('icon_class' => NULL),
     ),
     'uc_cart_block_content_cachable' => array(
-      'arguments' => array(),
+      'variables' => array(),
     ),
     'uc_cart_block_content' => array(
-      'arguments' => array(),
+      'variables' => array(
+        'help_text' => NULL,
+        'items' => NULL,
+        'item_count' => NULL,
+        'item_text' => NULL,
+        'total' => NULL,
+        'summary_links' => NULL,
+      ),
     ),
     'uc_cart_block_items' => array(
-      'arguments' => array(),
+      'variables' => array('items' => NULL),
     ),
     'uc_cart_block_summary' => array(
-      'arguments' => array(),
+      'variables' => array(
+        'item_count' => NULL,
+        'item_text' => NULL,
+        'total' => NULL,
+        'summary_links' => NULL,
+      ),
     ),
     'uc_empty_cart' => array(
-      'arguments' => array(),
+      'variables' => array(),
     ),
     'uc_cart_view_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_cart_view_price' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'address_pane' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'cart_review_table' => array(
-      'arguments' => array('show_subtotal' => TRUE),
+      'variables' => array('show_subtotal' => TRUE),
     ),
     'uc_cart_checkout_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_cart.pages.inc',
     ),
     'uc_cart_checkout_review' => array(
-      'arguments' => array('panes' => NULL, 'form' => NULL),
+      'variables' => array('panes' => NULL, 'form' => NULL),
       'file' => 'uc_cart.pages.inc',
     ),
     'uc_cart_complete_sale' => array(
-      'arguments' => array('message' => ''),
+      'variables' => array('message' => ''),
     ),
   );
 }
@@ -461,7 +473,7 @@
           // Caching is turned on and the user is not logged in, so we should
           // deliver a block that is safe for caching.
           $block = array(
-            'subject' => theme('uc_cart_block_title', $title, $icon_class, $collapsible),
+            'subject' => theme('uc_cart_block_title', array('title' => $title, 'icon_class' => $icon_class, 'collapsible' => $collapsible)),
             'content' => theme('uc_cart_block_content_cachable'),
           );
         }
@@ -519,8 +531,8 @@
           }
 
           $block = array(
-            'subject' => theme('uc_cart_block_title', $title, $icon_class, $collapsible),
-            'content' => theme('uc_cart_block_content', $help_text, $items, $item_count, $item_text, $total, $summary_links),
+            'subject' => theme('uc_cart_block_title', array('title' => $title, 'icon_class' => $icon_class, 'collapsible' => $collapsible)),
+            'content' => theme('uc_cart_block_content', array('help_text' => $help_text, 'items' => $items, 'item_count' => $item_count, 'item_text' => $item_text, 'total' => $total, 'summary_links' => $summary_links)),
           );
         }
 
@@ -607,12 +619,16 @@
  *   TRUE or FALSE indicating whether or not the cart block is collapsible.
  * @ingroup themeable
  */
-function theme_uc_cart_block_title($title, $icon_class = 'cart-empty', $collapsible = TRUE) {
+function theme_uc_cart_block_title($variables) {
+  $title = $variables['title'];
+  $icon_class = $variables['icon_class'];
+  $collapsible = $variables['collapsible'];
+
   $output = '';
 
   // Add in the cart image if specified.
   if ($icon_class) {
-    $output .= theme('uc_cart_block_title_icon', $icon_class);
+    $output .= theme('uc_cart_block_title_icon', array('icon_class' => $icon_class));
   }
 
   // Add the main title span and text, with or without the arrow based on the
@@ -634,7 +650,9 @@
  *   Class to use for the cart icon image, either cart-full or cart-empty.
  * @ingroup themeable
  */
-function theme_uc_cart_block_title_icon($icon_class) {
+function theme_uc_cart_block_title_icon($variables) {
+  $icon_class = $variables['icon_class'];
+
   return l('<span class="'. $icon_class .'" title="'. t('View your shopping cart.') .'"></span>', 'cart', array('html' => TRUE));
 }
 
@@ -666,7 +684,14 @@
  *   An array of links used in the cart summary.
  * @ingroup themeable
  */
-function theme_uc_cart_block_content($help_text, $items, $item_count, $item_text, $total, $summary_links) {
+function theme_uc_cart_block_content($variables) {
+  $help_text = $variables['help_text'];
+  $items = $variables['items'];
+  $item_count = $variables['item_count'];
+  $item_text = $variables['item_text'];
+  $total = $variables['total'];
+  $summary_links = $variables['summary_links'];
+
   $output = '';
 
   // Add the help text if enabled.
@@ -678,12 +703,12 @@
   $output .= '<div id="cart-block-contents">';
 
   // Add a table of items in the cart or the empty message.
-  $output .= theme('uc_cart_block_items', $items);
+  $output .= theme('uc_cart_block_items', array('items' => $items));
 
   $output .= '</div>';
 
   // Add the summary section beneath the items table.
-  $output .= theme('uc_cart_block_summary', $item_count, $item_text, $total, $summary_links);
+  $output .= theme('uc_cart_block_summary', array('item_count' => $item_count, 'item_text' => $item_text, 'total' => $total, 'summary_links' => $summary_links));
 
   return $output;
 }
@@ -696,7 +721,9 @@
  *      'title', 'price', and 'desc'.
  * @ingroup themeable
  */
-function theme_uc_cart_block_items($items) {
+function theme_uc_cart_block_items($variables) {
+  $items = $variables['items'];
+
   // If there are items in the shopping cart...
   if ($items) {
     $output = '<table class="cart-block-items"><tbody>';
@@ -750,7 +777,12 @@
  *   An array of links used in the summary.
  * @ingroup themeable
  */
-function theme_uc_cart_block_summary($item_count, $item_text, $total, $summary_links) {
+function theme_uc_cart_block_summary($variables) {
+  $item_count = $variables['item_count'];
+  $item_text = $variables['item_text'];
+  $total = $variables['total'];
+  $summary_links = $variables['summary_links'];
+
   $context = array(
     'revision' => 'themed-original',
     'type' => 'amount',
@@ -765,7 +797,7 @@
   if ($item_count > 0) {
     // Add a view cart link.
     $output .= '<tr class="cart-block-summary-links"><td colspan="2">'
-             . theme('links', $summary_links) .'</td></tr>';
+             . theme('links', array('links' => $summary_links)) .'</td></tr>';
   }
 
   $output .= '</tbody></table>';
@@ -1048,7 +1080,9 @@
  * @ingroup themeable
  * @see uc_cart_view_form()
  */
-function theme_uc_cart_view_form($form) {
+function theme_uc_cart_view_form($variables) {
+  $form = $variables['form'];
+
   drupal_add_css(drupal_get_path('module', 'uc_cart') .'/uc_cart.css');
 
   $output = '<div id="cart-form-products">'
@@ -1069,16 +1103,16 @@
     // Add the element with the appropriate markup based on the display type.
     if ($type == 'link') {
       $output .= '<div id="cart-form-buttons"><div id="continue-shopping-link">'
-               . $cs_element .'</div>'. drupal_render($form) .'</div>';
+               . $cs_element .'</div>'. drupal_render_children($form) .'</div>';
     }
     elseif ($type == 'button') {
       $output .= '<div id="cart-form-buttons"><div id="update-checkout-buttons">'
-               . drupal_render($form) .'</div><div id="continue-shopping-button">'
+               . drupal_render_children($form) .'</div><div id="continue-shopping-button">'
                . $cs_element .'</div></div>';
     }
   }
   else {
-    $output .= '<div id="cart-form-buttons">'. drupal_render($form) .'</div>';
+    $output .= '<div id="cart-form-buttons">'. drupal_render_children($form) .'</div>';
   }
 
   return $output;
@@ -1090,7 +1124,9 @@
  * @ingroup themeable
  * @see uc_cart_view_form()
  */
-function theme_uc_cart_view_price($form) {
+function theme_uc_cart_view_price($variables) {
+  $form = $variables['form'];
+
   return $form['#value'];
 }
 
@@ -1126,11 +1162,11 @@
   foreach (element_children($table) as $i) {
     $subtotal += $table[$i]['#total'];
 
-    $table[$i]['remove']['#cell_attributes'] = array('align' => 'center', 'class' => 'remove');
-    $table[$i]['image']['#cell_attributes'] = array('class' => 'image');
-    $table[$i]['desc']['#cell_attributes'] = array('class' => 'desc');
-    $table[$i]['qty']['#cell_attributes'] = array('class' => 'qty');
-    $table[$i]['total']['#cell_attributes'] = array('class' => 'price');
+    $table[$i]['remove']['#cell_attributes'] = array('align' => 'center', 'class' => array('remove'));
+    $table[$i]['image']['#cell_attributes'] = array('class' => array('image'));
+    $table[$i]['desc']['#cell_attributes'] = array('class' => array('desc'));
+    $table[$i]['qty']['#cell_attributes'] = array('class' => array('qty'));
+    $table[$i]['total']['#cell_attributes'] = array('class' => array('price'));
     $table[$i]['#attributes'] = array('valign' => 'top');
   }
 
@@ -1144,7 +1180,7 @@
       '#cell_attributes' => array(
         'colspan' => 'full',
         'align' => 'right',
-        'class' => 'subtotal',
+        'class' => array('subtotal'),
       ),
     ),
   );
@@ -1288,7 +1324,7 @@
                       FALSE) .'</p>';
 
   $output_message = token_replace_multiple($output, array('global' => NULL, 'order' => $order));
-  $themed_output = theme('uc_cart_complete_sale', $output_message);
+  $themed_output = theme('uc_cart_complete_sale', array('message' => $output_message));
 
   // Move an order's status from "In Checkout" to "Pending"
   $status = db_result(db_query("SELECT order_status FROM {uc_orders} WHERE order_id = :id", array(':id' => $order->order_id)));
@@ -1315,8 +1351,8 @@
  *   Message containing order number info, account info, and link to continue shopping.
  * @ingroup themeable
  */
-function theme_uc_cart_complete_sale($message) {
-  return $message;
+function theme_uc_cart_complete_sale($variables) {
+  return $variables['message'];
 }
 
 /**

=== modified file 'uc_cart/uc_cart.pages.inc'
--- uc_cart/uc_cart.pages.inc	2010-02-03 13:57:00 +0000
+++ uc_cart/uc_cart.pages.inc	2010-02-03 21:35:40 +0000
@@ -247,7 +247,9 @@
  * @ingroup themeable
  * @see uc_cart_checkout_form()
  */
-function theme_uc_cart_checkout_form($form) {
+function theme_uc_cart_checkout_form($variables) {
+  $form = $variables['form'];
+
   drupal_add_css(drupal_get_path('module', 'uc_cart') .'/uc_cart.css');
 
   $output = '<div id="checkout-instructions">'. check_markup(variable_get('uc_checkout_instructions', ''), variable_get('uc_checkout_instructions_format', FILTER_FORMAT_DEFAULT), FALSE) .'</div>';
@@ -268,7 +270,7 @@
     }
   }
 
-  $output .= '<div id="checkout-form-bottom">'. drupal_render($form) .'</div>';
+  $output .= '<div id="checkout-form-bottom">'. drupal_render_children($form) .'</div>';
 
   return $output;
 }
@@ -417,7 +419,10 @@
  *   A string of HTML for the page contents.
  * @ingroup themeable
  */
-function theme_uc_cart_checkout_review($panes, $form) {
+function theme_uc_cart_checkout_review($variables) {
+  $panes = $variables['panes'];
+  $form = $variables['form'];
+
   drupal_add_css(drupal_get_path('module', 'uc_cart') .'/uc_cart.css');
 
   $output = check_markup(variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')), variable_get('uc_checkout_review_instructions_format', FILTER_FORMAT_DEFAULT), FALSE)
@@ -449,7 +454,7 @@
     }
   }
 
-  $output .= '<tr class="review-button-row"><td colspan="2">'. drupal_render($form)
+  $output .= '<tr class="review-button-row"><td colspan="2">'. drupal_render_children($form)
             .'</td></tr></table>';
 
   return $output;

=== modified file 'uc_cart/uc_cart_checkout_pane.inc'
--- uc_cart/uc_cart_checkout_pane.inc	2010-02-02 14:47:58 +0000
+++ uc_cart/uc_cart_checkout_pane.inc	2010-02-03 21:35:40 +0000
@@ -78,7 +78,7 @@
       if (variable_get('uc_cart_email_validation', FALSE) && !$user->uid) {
         $contents['primary_email_confirm'] = uc_textfield(t('Confirm e-mail address'), $_SESSION['email_match'] === FALSE ? '' : $email, TRUE, NULL, 64);
         if ($_SESSION['email_match'] === FALSE) {
-          $contents['primary_email_confirm']['#attributes'] = array('class' => 'error');
+          $contents['primary_email_confirm']['#attributes'] = array('class' => array('error'));
           unset($_SESSION['email_match']);
         }
       }
@@ -444,7 +444,9 @@
  *   uc_checkout_pane_delivery()
  *   uc_checkout_pane_billing()
  */
-function theme_address_pane($form) {
+function theme_address_pane($variables) {
+  $form = $variables['form'];
+
   $req = '<span class="form-required">*</span>';
 
   if (isset($form['copy_address'])) {
@@ -472,9 +474,7 @@
   }
   $output .= '</table></div>';
 
-  foreach (element_children($form) as $element) {
-    $output .= drupal_render($form[$element]);
-  }
+  $output .= drupal_render_children($form);
 
   return $output;
 }
@@ -568,14 +568,16 @@
  *
  * @ingroup themeable
  */
-function theme_cart_review_table($show_subtotal = TRUE) {
+function theme_cart_review_table($variables) {
+  $show_subtotal = $variables['show_subtotal'];
+
   $subtotal = 0;
 
   // Set up table header.
   $header = array(
-    array('data' => t('Qty'), 'class' => 'qty'),
-    array('data' => t('Products'), 'class' => 'products'),
-    array('data' => t('Price'), 'class' => 'price'),
+    array('data' => t('Qty'), 'class' => array('qty')),
+    array('data' => t('Products'), 'class' => array('products')),
+    array('data' => t('Price'), 'class' => array('price')),
   );
 
   $context = array();
@@ -606,9 +608,9 @@
     $context['type'] = 'amount';
     unset($context['subject']);
     $rows[] = array(
-      array('data' => t('@qty&times;', array('@qty' => $item->qty)), 'class' => 'qty'),
-      array('data' => $description, 'class' => 'products'),
-      array('data' => uc_price($total, $context), 'class' => 'price'),
+      array('data' => t('@qty&times;', array('@qty' => $item->qty)), 'class' => array('qty')),
+      array('data' => $description, 'class' => array('products')),
+      array('data' => uc_price($total, $context), 'class' => array('price')),
     );
   }
 
@@ -619,11 +621,11 @@
       'type' => 'amount',
     );
     $rows[] = array(
-      'data' => array(array('data' => '<span id="subtotal-title">' . t('Subtotal:') . '</span> ' . uc_price($subtotal, $context), 'colspan' => 3, 'class' => 'subtotal')),
-      'class' => 'subtotal',
+      'data' => array(array('data' => '<span id="subtotal-title">' . t('Subtotal:') . '</span> ' . uc_price($subtotal, $context), 'colspan' => 3, 'class' => array('subtotal'))),
+      'class' => array('subtotal'),
     );
   }
 
-  return theme('table', $header, $rows, array('class' => 'cart-review'));
+  return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('cart-review'))));
 }
 

=== modified file 'uc_cart_links/uc_cart_links.admin.inc'
--- uc_cart_links/uc_cart_links.admin.inc	2009-05-14 21:04:36 +0000
+++ uc_cart_links/uc_cart_links.admin.inc	2010-02-02 21:07:41 +0000
@@ -86,7 +86,7 @@
     );
   }
 
-  return theme('table', $header, $rows) . theme('pager', array(), 25, 1);
+  return theme('table', array('header' => $header, 'rows' => $rows)) . theme('pager', array('element' => 1));
 }
 
 /**
@@ -120,7 +120,7 @@
   );
 
   $output = '<div>'. t('There is currently no user interface for creating cart links, but this section includes some basic instructions.<br />Cart links are simple to form using a few actions and arguments with the following rules:')
-    .'<p>'. theme('item_list', $items) .'</p><p>'. theme('table', $header, $rows) .'</p><p>'. theme('item_list', $items2) .'</p><p>'. t('<b>Example:</b> /cart/add/e-p1_q5-imonday_special?destination=cart<br /><br />This example will empty the cart, add 5 of product 1 to the cart, track clicks with the ID "monday_special", and redirect the user to the cart. To use this on your site, simply create an HTML link to the URL you create:')
+    .'<p>'. theme('item_list', array('items' => $items)) .'</p><p>'. theme('table', array('header' => $header, 'rows' => $rows)) .'</p><p>'. theme('item_list', array('items' => $items2)) .'</p><p>'. t('<b>Example:</b> /cart/add/e-p1_q5-imonday_special?destination=cart<br /><br />This example will empty the cart, add 5 of product 1 to the cart, track clicks with the ID "monday_special", and redirect the user to the cart. To use this on your site, simply create an HTML link to the URL you create:')
     .'</p><p>&lt;a href="http://www.example.com/cart/add/e-p1_q5-imonday_special?destination=cart">'. t('Link text.') .'&lt;/a></p></div>';
 
   return $output;

=== modified file 'uc_catalog/uc_catalog.admin.inc'
--- uc_catalog/uc_catalog.admin.inc	2009-05-14 21:04:36 +0000
+++ uc_catalog/uc_catalog.admin.inc	2010-02-03 20:37:44 +0000
@@ -12,7 +12,7 @@
  */
 function uc_catalog_settings_overview() {
   // Theme all the pages beneath this path into summary overviews.
-  return theme('summary_overview', summarize_child_form_pages('admin/store/settings/catalog/edit'));
+  return theme('summary_overview', array('summaries' => summarize_child_form_pages('admin/store/settings/catalog/edit')));
 }
 
 /**
@@ -49,7 +49,7 @@
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
     '#summary callback' => 'summarize_form',
-    '#attributes' => array('class' => 'catalog-top-level'),
+    '#attributes' => array('class' => array('catalog-top-level')),
   );
   $form['catalog-top-level']['uc_catalog_vid'] = array('#type' => 'select',
     '#title' => t('Catalog vocabulary'),
@@ -97,7 +97,7 @@
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
     '#summary callback' => 'summarize_form',
-    '#attributes' => array('class' => 'catalog-products-list'),
+    '#attributes' => array('class' => array('catalog-products-list')),
   );
   $form['catalog-products-list']['uc_product_nodes_per_page'] = array(
     '#type' => 'textfield',
@@ -113,7 +113,7 @@
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
     '#summary callback' => '_uc_catalog_block_summarize',
-    '#attributes' => array('class' => 'block-display'),
+    '#attributes' => array('class' => array('block-display')),
   );
   $form['block-display']['uc_catalog_block_title'] = array(
     '#type' => 'checkbox',
@@ -235,7 +235,7 @@
   }
 
   if (count($rows) > 0) {
-    $output .= theme('item_list', $rows);
+    $output .= theme('item_list', array('items' => $rows));
   }
   else {
     $output .= '<p>'. t('All products are currently listed in the catalog.') .'</p>';

=== modified file 'uc_catalog/uc_catalog.module'
--- uc_catalog/uc_catalog.module	2010-01-25 16:37:01 +0000
+++ uc_catalog/uc_catalog.module	2010-02-03 19:39:38 +0000
@@ -67,8 +67,7 @@
   $items['catalog'] = array(
     'title callback' => 'variable_get',
     'title arguments' => array('uc_catalog_name', t('Catalog')),
-    'page callback' => 'theme',
-    'page arguments' => array('uc_catalog_browse'),
+    'page callback' => 'uc_catalog_browse',
     'access arguments' => array('view catalog'),
     'type' => MENU_SUGGESTED_ITEM,
     'file' => 'uc_catalog.pages.inc',
@@ -184,20 +183,20 @@
 function uc_catalog_theme() {
   return array(
     'uc_catalog_block' => array(
-      'arguments' => array('menu_tree' => NULL),
+      'variables' => array('menu_tree' => NULL),
     ),
     'uc_catalog_browse' => array(
-      'arguments' => array('tid' => 0),
+      'variables' => array('tid' => 0),
       'file' => 'uc_catalog.pages.inc',
     ),
     'uc_catalog_products' => array(
-      'arguments' => array('products' => NULL),
+      'variables' => array('products' => NULL),
     ),
     'uc_catalog_product_grid' => array(
-      'arguments' => array('products' => NULL),
+      'variables' => array('products' => NULL),
     ),
     'uc_catalog_item' => array(
-      'arguments' => array(
+      'variables' => array(
         'here' => NULL,
         'link' => NULL,
         'lis' => NULL,
@@ -356,10 +355,10 @@
     $imagecache = module_exists('imagecache');
     if ($image) {
       if ($imagecache) {
-        $image_display = theme('imagecache', 'uc_category', $image->filepath);
+        $image_display = theme('image_style', array('style_name' => 'uc_category', 'path' => $image->filepath));
       }
       else {
-        $image_display = theme('image', $image->filepath, t('Term image'));
+        $image_display = theme('image', array('path' => $image->filepath, 'alt' => t('Term image')));
       }
       $form['identification']['image']['remove'] = array('#type' => 'checkbox',
         '#title' => t('Remove category image: !image', array('!image' => $image_display)),
@@ -428,7 +427,7 @@
             }
 
             // Now, create a structured menu, separate from Drupal's menu.
-            $content = theme('uc_catalog_block', $menu_tree);
+            $content = theme('uc_catalog_block', array('menu_tree' => $menu_tree));
 
             $subject = variable_get('uc_catalog_name', t('Catalog'));
             if (variable_get('uc_catalog_block_title', FALSE)) {
@@ -448,7 +447,9 @@
  * @ingroup themeable
  * @see theme_uc_catalog_item()
  */
-function theme_uc_catalog_block($menu_tree) {
+function theme_uc_catalog_block($variables) {
+  $menu_tree = $variables['menu_tree'];
+
   $output = '<ul class="catalog menu">';
 
   foreach ($menu_tree->children as $branch) {
@@ -684,14 +685,16 @@
  *   An array of product nids.
  * @ingroup themeable
  */
-function theme_uc_catalog_products($products) {
+function theme_uc_catalog_products($variables) {
+  $products = $variables['products'];
+
   if (!$products) {
     $output .= '<div class="no-products">'. t('No products are available in this category.') .'</div>';
     return $output;
   }
   else {
     if (variable_get('uc_catalog_grid_display', FALSE)) {
-      return theme('uc_catalog_product_grid', $products);
+      return theme('uc_catalog_product_grid', array('products' => $products));
     }
     else {
       $table = tapir_get_table('uc_product_table', $products);
@@ -705,7 +708,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_catalog_product_grid($products) {
+function theme_uc_catalog_product_grid($variables) {
+  $products = $variables['products'];
+
   $product_table = '<div class="category-grid-products"><table>';
   $count = 0;
   $context = array(
@@ -725,7 +730,13 @@
 
     $titlelink = l($product->title, "node/$nid", array('html' => TRUE));
     if (module_exists('imagecache') && ($field = variable_get('uc_image_'. $product->type, '')) && isset($product->$field) && file_exists($product->{$field}[0]['filepath'])) {
-      $imagelink = l(theme('imagecache', 'product_list', $product->{$field}[0]['filepath'], $product->title, $product->title), "node/$nid", array('html' => TRUE));
+      $imagelink = l(theme('image_style', array(
+          'style_name' => 'product_list',
+          'path' => $product->{$field}[0]['filepath'],
+          'alt' => $product->title,
+          'title' => $product->title,
+        )),
+        "node/$nid", array('html' => TRUE));
     }
     else {
       $imagelink = '';
@@ -744,7 +755,7 @@
     }
     if (module_exists('uc_cart') && variable_get('uc_catalog_grid_display_add_to_cart', TRUE)) {
       if (variable_get('uc_catalog_grid_display_attributes', TRUE)) {
-        $product_table .= theme('uc_product_add_to_cart', $product);
+        $product_table .= theme('uc_product_add_to_cart', array('node' => $product));
       }
       else {
         $product_table .= drupal_get_form('uc_catalog_buy_it_now_form_'. $product->nid, $product);
@@ -912,7 +923,14 @@
       }
     }
   }
-  $output = theme("uc_catalog_item", $here, $link, $lis, $expand, $inpath, count($branch->children));
+  $output = theme('uc_catalog_item', array(
+    'here' => $here,
+    'link' => $link,
+    'lis' => $lis,
+    'expand' => $expand,
+    'inpath' => $inpath,
+    'count' => count($branch->children),
+  ));
 
   // Tell parent category your status, and pass on output.
   return array($inpath, $output);
@@ -923,7 +941,14 @@
  *
  * @ingroup themeable
  */
-function theme_uc_catalog_item($here, $link, $lis, $expand, $inpath, $count_children ) {
+function theme_uc_catalog_item($variables) {
+  $here = $variables['here'];
+  $link = $variables['link'];
+  $lis = $variables['lis'];
+  $expand = $variables['expand'];
+  $inpath = $variables['inpath'];
+  $count_children = $variables['count_children'];
+
   $output = '';
 
   if ($expand || $count_children) {

=== modified file 'uc_catalog/uc_catalog.pages.inc'
--- uc_catalog/uc_catalog.pages.inc	2009-07-21 14:29:21 +0000
+++ uc_catalog/uc_catalog.pages.inc	2010-02-03 20:37:44 +0000
@@ -7,6 +7,16 @@
  */
 
 /**
+ * Show the catalog page of the given category.
+ */
+function uc_catalog_browse($tid = 0) {
+  return array(
+    '#theme' => 'uc_catalog_browse',
+    '#tid' => $tid,
+  );
+}
+
+/**
  * Display a formatted catalog page.
  *
  * If the category has products in it, display them in a TAPIr table. Subcategories
@@ -19,7 +29,9 @@
  *   Formatted HTML of the catalog page.
  * @ingroup themeable
  */
-function theme_uc_catalog_browse($tid = 0) {
+function theme_uc_catalog_browse($variables) {
+  $tid = $variables['tid'];
+
   drupal_add_css(drupal_get_path('module', 'uc_catalog') .'/uc_catalog.css');
 
   $output = '';
@@ -38,10 +50,17 @@
     if (!empty($child->image)) {
       $image = '<div>';
       if (module_exists('imagecache')) {
-        $image .= l(theme('imagecache', 'uc_category', $child->image['filepath']), uc_catalog_path($child), array('html' => TRUE));
+        $image .= l(theme('image_style', array(
+            'style_name' => 'uc_category',
+            'path' => $child->image['filepath'],
+          )),
+          uc_catalog_path($child), array('html' => TRUE));
       }
       else {
-        $image .= l(theme('image', $child->image['filepath']), uc_catalog_path($child), array('html' => TRUE));
+        $image .= l(theme('image', array(
+            'path' => $child->image['filepath'],
+          )),
+          uc_catalog_path($child), array('html' => TRUE));
       }
       $image .= '</div>';
     }
@@ -60,13 +79,13 @@
         $g_child_nodes += taxonomy_term_count_nodes($grandchild->tid, $type);
       }
       if ($g_child_nodes) {
-        $grandchildren[$i] = l($grandchild->name, uc_catalog_path($grandchild), array('class' => 'subcategory'));
+        $grandchildren[$i] = l($grandchild->name, uc_catalog_path($grandchild), array('class' => array('subcategory')));
         $j++;
       }
     }
     //$grandchildren = array_slice($grandchildren, 0, intval(count($grandchildren) / 2) + 1, TRUE);
     if ($j > $max_gc_display) {
-      array_push($grandchildren, l(t('More...'), uc_catalog_path($child), array('class' => 'subcategory')));
+      array_push($grandchildren, l(t('More...'), uc_catalog_path($child), array('class' => array('subcategory'))));
     }
     if ($child->nodes) {
       $cell_link = $image .'<strong>'. l($child->name, uc_catalog_path($child)) .'</strong>';
@@ -78,10 +97,21 @@
   }
   if (!empty($catalog->image)) {
     if (module_exists('imagecache')) {
-      $output .= theme('imagecache', 'uc_thumbnail', $catalog->image['filepath'], $catalog->name, $catalog->name, array('class' => 'category'));
+      $output .= theme('image_style', array(
+        'style_name' => 'uc_thumbnail',
+        'path' => $catalog->image['filepath'],
+        'alt' => $catalog->name,
+        'title' => $catalog->name,
+        'attributes' => array('class' => array('category')),
+      ));
     }
     else {
-      $output .= theme('image', $catalog->image['filepath'], $catalog->name, $catalog->name, array('class' => 'category'));
+      $output .= theme('image', array(
+        'path' => $catalog->image['filepath'],
+        'alt' => $catalog->name,
+        'title' => $catalog->name,
+        'attributes' => array('class' => array('category')),
+      ));
     }
   }
 
@@ -121,10 +151,10 @@
   }
   if (count($catalog->products)) {
     if (count($links)) {
-      $output .= theme('links', $links, array('class' => 'links inline uc-categories')) ."<br />\n";
+      $output .= theme('links', array('links' => $links, 'attributes' => array('class' => array('links', 'inline', 'uc-categories')))) ."<br />\n";
     }
     $output .= $catalog->description;
-    $output .= theme('uc_catalog_products', $catalog->products);
+    $output .= theme('uc_catalog_products', array('products' => $catalog->products));
     $output .= theme('pager');
   }
   else {
@@ -134,7 +164,7 @@
     $row = array();
     $i = 1;
     foreach ($child_list as $cell) {
-      $row[] = array('data' => $cell, 'class' => 'category');
+      $row[] = array('data' => $cell, 'class' => array('category'));
       if ($i % $columns == 0) {
         $cat_rows[] = $row;
         $row = array();
@@ -143,12 +173,12 @@
     }
     if (count($row) > 0 && count($row) < $columns) {
       if (count($cat_rows) >= 1) {
-        $row = array_merge($row, array_fill(count($row), $columns - count($row), array('data' => '&nbsp;', 'class' => 'category')));
+        $row = array_merge($row, array_fill(count($row), $columns - count($row), array('data' => '&nbsp;', 'class' => array('category'))));
       }
       $cat_rows[] = $row;
     }
     $output .= $catalog->description;
-    $output .= theme('table', array(), $cat_rows, array('class' => 'category'));
+    $output .= theme('table', array('rows' => $cat_rows, 'attributes' => array('class' => array('category'))));
   }
 
   return $output;

=== modified file 'uc_file/uc_file.admin.inc'
--- uc_file/uc_file.admin.inc	2009-07-01 15:58:50 +0000
+++ uc_file/uc_file.admin.inc	2010-02-03 21:35:40 +0000
@@ -182,7 +182,9 @@
  * @ingroup themeable
  * @see uc_file_admin_files_form_show_files()
  */
-function theme_uc_file_admin_files_form_show($form) {
+function theme_uc_file_admin_files_form_show($variables) {
+  $form = $variables['form'];
+
   $output = '';
 
   $header = $form['#header'];
@@ -203,7 +205,7 @@
 
     $rows[] = array(
       array('data' => drupal_render($form['file_select'][$fid]['check'])),
-      array('data' => $filename, 'class' => $class),
+      array('data' => $filename, 'class' => array($class)),
       array('data' => l(drupal_render($form['file_select'][$fid]['title']), 'node/'. drupal_render($form['file_select'][$fid]['nid']))),
       array('data' => drupal_render($form['file_select'][$fid]['model']))
     );
@@ -217,9 +219,9 @@
   $output .= '<p>'. t('File downloads can be attached to any Ubercart product as a product feature. For security reasons the <a href="!download_url">file downloads directory</a> is separated from the Drupal <a href="!file_url">file system</a>. Here are the list of files (and their associated Ubercart products) that can be used for file downloads.', array('!download_url' => url('admin/store/settings/products/edit/features', array('query' => 'destination=admin/store/products/files')), '!file_url' => url('admin/settings/file-system'))) .'</p>';
   $output .= drupal_render($form['uc_file_action']);
   $output .= drupal_render($form['uc_file_select']);
-  $output .= theme('table', $header, $rows);
-  $output .= theme('pager', NULL, UC_FILE_PAGER_SIZE, 0);
-  $output .= drupal_render($form);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+  $output .= theme('pager');
+  $output .= drupal_render_children($form);
 
   return $output;
 }
@@ -270,7 +272,7 @@
       // Base files/dirs the user selected.
       $form['selected_files'] = array(
         '#type' => 'markup',
-        '#value' => theme_item_list($file_list, NULL, 'ul', array('class' => 'selected-file-name')),
+        '#value' => theme('item_list', array('items' => $file_list, 'attributes' => array('class' => array('selected-file-name')))),
       );
 
       $form = confirm_form(
@@ -292,7 +294,7 @@
         // don't have JS enabled over not defaulting to any info.
         $form['affected_files'] = array(
           '#type' => 'markup',
-          '#value' => theme_item_list($affected_list[FALSE], 'Affected file(s)', 'ul', array('class' => 'affected-file-name')),
+          '#value' => theme('item_list', array('items' => $affected_list[FALSE], 'title' => 'Affected file(s)', 'attributes' => array('class' => array('affected-file-name')))),
         );
       }
 
@@ -332,7 +334,7 @@
         '#description' => t('The maximum file size that can be uploaded is %size bytes. You will need to use a different method to upload the file to the directory (e.g. (S)FTP, SCP) if your file exceeds this size.<br />The module will automatically detect files you upload using an alternate method.', array('%size' => number_format($max_bytes))),
       );
 
-      $form['#attributes']['class'] .= 'foo';
+      $form['#attributes']['class'][] = 'foo';
       $form = confirm_form(
         $form, t('Upload file'),
         'admin/store/products/files',

=== modified file 'uc_file/uc_file.ca.inc'
--- uc_file/uc_file.ca.inc	2009-08-12 15:20:40 +0000
+++ uc_file/uc_file.ca.inc	2010-02-02 21:32:34 +0000
@@ -250,9 +250,6 @@
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
     );
-    $form['token_help'][$name]['content'] = array(
-      '#value' => theme('token_help', $name),
-    );
   }
 
   return $form;

=== modified file 'uc_file/uc_file.module'
--- uc_file/uc_file.module	2010-02-02 18:30:52 +0000
+++ uc_file/uc_file.module	2010-02-03 21:35:40 +0000
@@ -115,20 +115,20 @@
 function uc_file_theme() {
   return array(
     'uc_file_downloads_token' => array(
-      'arguments' => array('file_downloads' => NULL),
+      'variables' => array('file_downloads' => NULL),
     ),
     'uc_file_admin_files_form_show' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_file.admin.inc',
     ),
     'uc_file_hook_user_file' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_file_hook_user_file_downloads' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_file_user_downloads' => array(
-      'arguments' => array('files' => NULL),
+      'variables' => array('files' => NULL),
       'file' => 'uc_file.pages.inc',
     ),
   );
@@ -439,7 +439,7 @@
 
   drupal_add_js( "
 Drupal.behaviors.ucUserAccountFileDownload". $id ." = function(context) {
-  $('#edit-file-download-". $fid ."-time-granularity:not(.ucUserAccountFileDownload-processed)', context).addClass('ucUserAccountFileDownload-processed').change(
+  \$('#edit-file-download-". $fid ."-time-granularity:not(.ucUserAccountFileDownload-processed)', context).addClass('ucUserAccountFileDownload-processed').change(
     function() {
       _uc_file_expiration_disable_check('#edit-file-download-". $fid ."-time-granularity', '#edit-file-download-". $fid ."-time-quantity');
       _uc_file_expiration_disable_check('#edit-file-download-". $fid ."-time-granularity', '#edit-file-download-". $fid ."-time-polarity');
@@ -455,7 +455,8 @@
  *
  * @ingroup themeable
  */
-function theme_uc_file_hook_user_file_downloads($form) {
+function theme_uc_file_hook_user_file_downloads($variables) {
+  $form = $variables['form'];
 
   $header = array(
     array('data' => t('Remove'    )),
@@ -504,7 +505,7 @@
             '</div>',
         ),
       ),
-      'class' => 'download-table-row',
+      'class' => array('download-table-row'),
     );
   }
 
@@ -512,8 +513,8 @@
     $rows[] = array(array('data' => t('No files can be downloaded by this user.'), 'colspan' => 5));
   }
 
-  $output .= theme('table', $header, $rows, array('id' => 'download-table'), t('Below is a list of downloads this user can access.'));
-  $output .= drupal_render($form);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'download-table'), 'caption' => t('Below is a list of downloads this user can access.')));
+  $output .= drupal_render_children($form);
 
   return $output;
 }
@@ -523,7 +524,8 @@
  *
  * @ingroup themeable
  */
-function theme_uc_file_hook_user_file($form) {
+function theme_uc_file_hook_user_file($variables) {
+  $form = $variables['form'];
 
   // Enclose this in <p> so it won't fall out of the fieldset if there are no downloads.
   $output .= '<p>'. drupal_render($form['file_message']) .'</p>';
@@ -531,7 +533,7 @@
   // Ensure the current files are above the new file dialog.
   $output .= drupal_render($form['download']);
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
 
   return $output;
 }
@@ -680,7 +682,7 @@
   switch ($type) {
     case 'uc_file':
       if (!empty($object)) {
-        $values['file-downloads'] = theme('uc_file_downloads_token', $object);
+        $values['file-downloads'] = theme('uc_file_downloads_token', array('file_downloads' => $object));
       }
       break;
   }
@@ -693,18 +695,20 @@
  *
  * @ingroup themeable
  */
-function theme_uc_file_downloads_token($user_files) {
+function theme_uc_file_downloads_token($file_downloads) {
+  $file_downloads = $variables['file_downloads'];
+
   $output = '';
 
-  foreach ($user_files as $user_file) {
-
+  foreach ($file_downloads as $file_download) {
     // Let's only notify of them of the files, not the directories.
-    if (is_dir($user_file->filename)) {
+    if (is_dir($file_download->filename)) {
       continue;
     }
 
-    $output .= l($user_file->filename, 'download/'. $user_file->fid .'/'. $user_file->file_key, array('absolute' => TRUE)) ."\n";
+    $output .= l($file_download->filename, 'download/'. $file_download->fid .'/'. $file_download->file_key, array('absolute' => TRUE)) ."\n";
   }
+
   return $output;
 }
 

=== modified file 'uc_file/uc_file.pages.inc'
--- uc_file/uc_file.pages.inc	2010-02-02 19:20:04 +0000
+++ uc_file/uc_file.pages.inc	2010-02-03 20:37:44 +0000
@@ -32,7 +32,9 @@
  * @param $files
  *   Array of the files.
  */
-function theme_uc_file_user_downloads($files) {
+function theme_uc_file_user_downloads($variables) {
+  $files = $variables['files'];
+
   // Create a header and the pager it belongs to.
   $header = array(
     array('data' => t('Purchased'  ), 'field' => 'u.granted', 'sort' => 'asc'),
@@ -46,11 +48,11 @@
   $row = 0;
   foreach ($files as $file) {
     $rows[] = array(
-      array('data' => format_date($file['granted'], 'custom', variable_get('uc_date_format_default', 'm/d/Y')), 'class' => 'date-row', 'id' => 'date-'. $row),
-      array('data' => $file['link'], 'class' => 'filename-row', 'id' => 'filename-'. $row),
-      array('data' => $file['description'], 'class' => 'description-row', 'id' => 'description-'. $row),
-      array('data' => $file['accessed'] .'/'. ($file['download_limit'] ? $file['download_limit'] : t('Unlimited')), 'class' => 'download-row', 'id' => 'download-'. $row),
-      array('data' => count(unserialize($file['addresses'])) .'/'. ($file['address_limit'] ? $file['address_limit'] : t('Unlimited')), 'class' => 'addresses-row', 'id' => 'addresses-'. $row),
+      array('data' => format_date($file['granted'], 'custom', variable_get('uc_date_format_default', 'm/d/Y')), 'class' => array('date-row'), 'id' => 'date-'. $row),
+      array('data' => $file['link'], 'class' => array('filename-row'), 'id' => 'filename-'. $row),
+      array('data' => $file['description'], 'class' => array('description-row'), 'id' => 'description-'. $row),
+      array('data' => $file['accessed'] .'/'. ($file['download_limit'] ? $file['download_limit'] : t('Unlimited')), 'class' => array('download-row'), 'id' => 'download-'. $row),
+      array('data' => count(unserialize($file['addresses'])) .'/'. ($file['address_limit'] ? $file['address_limit'] : t('Unlimited')), 'class' => array('addresses-row'), 'id' => 'addresses-'. $row),
     );
     $row++;
   }
@@ -58,8 +60,8 @@
     $rows[] = array(array('data' => t('No downloads found'), 'colspan' => 5));
   }
 
-  $output .= theme('table', $header, $rows);
-  $output .= theme('pager', NULL, UC_FILE_PAGER_SIZE, 0);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+  $output .= theme('pager');
   $output .= '<div class="form-item"><p class="description">'.
   t('Once your download is finished, you must refresh the page to download again. (Provided you have permission)') .
   '<br />'. t('Downloads will not be counted until the file is finished transferring, even though the number may increment when you click.') .
@@ -126,7 +128,7 @@
     $row++;
   }
 
-  return theme('uc_file_user_downloads', $files);
+  return theme('uc_file_user_downloads', array('files' => $files));
 }
 
 /**

=== modified file 'uc_googleanalytics/uc_googleanalytics.module'
--- uc_googleanalytics/uc_googleanalytics.module	2009-05-14 21:04:36 +0000
+++ uc_googleanalytics/uc_googleanalytics.module	2010-02-02 20:04:13 +0000
@@ -35,7 +35,7 @@
       $script = uc_googleanalytics_ecommerce_js($order);
 
       // Add the code to the footer.
-      drupal_add_js($script, 'inline', 'footer');
+      drupal_add_js($script, array('type' => 'inline', 'scope' => 'footer'));
     }
 
     // Clean out the session variable.

=== modified file 'uc_order/uc_order.admin.inc'
--- uc_order/uc_order.admin.inc	2010-02-03 13:57:00 +0000
+++ uc_order/uc_order.admin.inc	2010-02-03 21:35:40 +0000
@@ -19,7 +19,7 @@
 
   // Theme it all up in a summaries overview.
   return array(
-    '#markup' => theme('summary_overview', $summaries),
+    '#markup' => theme('summary_overview', array('summaries' => $summaries)),
   );
 }
 
@@ -566,7 +566,7 @@
     '#theme' => 'table',
     '#header' => $header,
     '#rows' => $rows,
-    '#attributes' => array('class' => 'uc-orders-table'),
+    '#attributes' => array('class' => array('uc-orders-table')),
   );
   $build['pager'] = array(
     '#theme' => 'pager',
@@ -1159,7 +1159,7 @@
     '#theme' => 'table',
     '#header' => $header,
     '#rows' => $rows,
-    '#attributes' => array('class' => 'uc-order-history'),
+    '#attributes' => array('class' => array('uc-order-history')),
   );
   $build['pager'] = array(
     '#theme' => 'pager',
@@ -1264,7 +1264,7 @@
   $form['submit-changes'] = array(
     '#type' => 'submit',
     '#value' => t('Submit changes'),
-    '#attributes' => array('class' => 'save-button'),
+    '#attributes' => array('class' => array('save-button')),
     '#disabled' => TRUE,
   );
 
@@ -1282,7 +1282,9 @@
  * @ingroup themeable
  * @see uc_order_edit_form()
  */
-function theme_uc_order_edit_form($form) {
+function theme_uc_order_edit_form($variables) {
+  $form = $variables['form'];
+
   $panes = _order_pane_list();
   foreach ($panes as $pane) {
     if (in_array('edit', $pane['show']) &&
@@ -1589,8 +1591,8 @@
  * @ingroup themeable
  * @see uc_order_edit_products_form()
  */
-function theme_uc_order_edit_products_form($form) {
-  return drupal_render($form);
+function theme_uc_order_edit_products_form($variables) {
+  return drupal_render($variables['form']);
 }
 
 /**
@@ -1599,14 +1601,16 @@
  * @ingroup themeable
  * @see op_products_edit_table()
  */
-function theme_uc_order_remove_product($form) {
+function theme_uc_order_remove_product($variables) {
+  $form = $variables['form'];
+
   return '<img id="'. $form['#img_id'] .'" src="'
     .  base_path() . drupal_get_path('module', 'uc_store')
     .'/images/error.gif" style="padding-top: 1px; padding-left: .8em; '
     .'padding-right: 2px; float: left; cursor: pointer;" '
     .'alt="'. t('Remove this product.') .'" onclick="'
     .'remove_product_button(\''. t('Remove product from order?') .'\', this.id);" />'
-    . drupal_render($form);
+    . drupal_render_children($form);
 }
 
 /**

=== modified file 'uc_order/uc_order.ca.inc'
--- uc_order/uc_order.ca.inc	2010-02-02 14:10:43 +0000
+++ uc_order/uc_order.ca.inc	2010-02-03 15:34:17 +0000
@@ -1209,9 +1209,6 @@
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
     );
-    $form['token_help'][$name]['content'] = array(
-      '#value' => theme('token_help', $name),
-    );
   }
 
   return $form;
@@ -1293,9 +1290,6 @@
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
     );
-    $form['token_help'][$name]['content'] = array(
-      '#value' => theme('token_help', $name),
-    );
   }
 
   $form['template'] = array(

=== modified file 'uc_order/uc_order.module'
--- uc_order/uc_order.module	2010-02-03 13:57:00 +0000
+++ uc_order/uc_order.module	2010-02-03 20:37:44 +0000
@@ -318,25 +318,25 @@
 function uc_order_theme() {
   return array(
     'uc_order_state_table' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_order_status_table' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_order_edit_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_order.admin.inc',
     ),
     'uc_order_edit_products_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_order.admin.inc',
     ),
     'uc_order_remove_product' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_order.admin.inc',
     ),
     'uc_order_view_update_controls' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
   );
 }
@@ -718,7 +718,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_order_state_table($form) {
+function theme_uc_order_state_table($variables) {
+  $form = $variables['form'];
+
   $header = array(t('State'), t('Default order status'));
 
   foreach (element_children($form) as $state_id) {
@@ -728,13 +730,15 @@
     );
   }
 
-  return theme('table', $header, $rows);
+  return theme('table', array('header' => $header, 'rows' => $rows));
 }
 
 /**
  * Theme the order state table in the order workflow settings.
  */
-function theme_uc_order_status_table($form) {
+function theme_uc_order_status_table($variables) {
+  $form = $variables['form'];
+
   $header = array(t('ID'), t('Title'), t('List position'), t('State'), t('Remove'));
 
   foreach (element_children($form) as $state_id) {
@@ -752,7 +756,7 @@
     }
   }
 
-  return theme('table', $header, $rows) . $create;
+  return theme('table', array('header' => $header, 'rows' => $rows)) . $create;
 }
 
 /**
@@ -950,7 +954,7 @@
   $table = array(
     '#type' => 'tapir_table',
     '#tree' => TRUE,
-    '#attributes' => array('class' => 'order-pane-table'),
+    '#attributes' => array('class' => array('order-pane-table')),
   );
 
   $table['#columns']['remove'] = array(
@@ -1407,7 +1411,7 @@
     ->fields(array(
       'order_id' => $order_id,
       'uid' => $user->uid,
-      'changes' => theme('item_list', $items),
+      'changes' => theme('item_list', array('items' => $items)),
       'created' => REQUEST_TIME,
     ))
     ->execute();

=== modified file 'uc_order/uc_order.order_pane.inc'
--- uc_order/uc_order.order_pane.inc	2009-12-31 16:24:02 +0000
+++ uc_order/uc_order.order_pane.inc	2010-02-03 20:37:44 +0000
@@ -389,7 +389,7 @@
       $form['add_line_item']['submit'] = array(
         '#type' => 'submit',
         '#value' => t('Add line'),
-        '#attributes' => array('class' => 'save-button'),
+        '#attributes' => array('class' => array('save-button')),
         '#disabled' => TRUE,
       );
       $form['li_delete_id'] = array(
@@ -526,7 +526,7 @@
           );
         }
       }
-      $output = theme('table', $header, $rows);
+      $output = theme('table', array('header' => $header, 'rows' => $rows));
 
       return $output;
   }
@@ -564,7 +564,7 @@
       else {
         $items = array(t('No admin comments have been entered for this order.'));
       }
-      $output = theme('item_list', $items) . drupal_render($arg1['admin_comment_field']);
+      $output = theme('item_list', array('items' => $items)) . drupal_render($arg1['admin_comment_field']);
       return $output;
 
     case 'edit-process':
@@ -666,8 +666,8 @@
  * @ingroup themeable
  * @see uc_order_view_update_form()
  */
-function theme_uc_order_view_update_controls($form) {
-  return '<div class="update-controls">'. drupal_render($form) .'</div>';
+function theme_uc_order_view_update_controls($variables) {
+  return '<div class="update-controls">'. drupal_render($variables['form']) .'</div>';
 }
 
 /**
@@ -707,27 +707,27 @@
 function op_products_view_table($order) {
   $table = array(
     '#type' => 'tapir_table',
-    '#attributes' => array('class' => 'order-pane-table'),
+    '#attributes' => array('class' => array('order-pane-table')),
   );
 
   $table['#columns']['qty'] = array(
     'cell' => array(
       'data' => t('Qty'),
-      'class' => 'text-right',
+      'class' => array('text-right'),
     ),
     'weight' => 0,
   );
   $table['#columns']['product'] = array(
     'cell' => array(
       'data' => t('Product'),
-      'class' => 'header-wide',
+      'class' => array('header-wide'),
     ),
     'weight' => 1,
   );
   $table['#columns']['model'] = array(
     'cell' => array(
       'data' => t('SKU'),
-      'class' => 'text-center',
+      'class' => array('text-center'),
       'nowrap' => 'nowrap',
     ),
     'weight' => 2,
@@ -736,7 +736,7 @@
     $table['#columns']['cost'] = array(
       'cell' => array(
         'data' => t('Cost'),
-        'class' => 'text-right',
+        'class' => array('text-right'),
       ),
       'weight' => 3,
     );
@@ -744,14 +744,14 @@
   $table['#columns']['price'] = array(
     'cell' => array(
       'data' => t('Price'),
-      'class' => 'text-right',
+      'class' => array('text-right'),
     ),
     'weight' => 4,
   );
   $table['#columns']['total'] = array(
     'cell' => array(
       'data' => t('Total'),
-      'class' => 'text-right',
+      'class' => array('text-right'),
     ),
     'weight' => 5,
   );
@@ -823,27 +823,27 @@
 function op_products_customer_table($order) {
   $table = array(
     '#type' => 'tapir_table',
-    '#attributes' => array('class' => 'order-pane-table'),
+    '#attributes' => array('class' => array('order-pane-table')),
   );
 
   $table['#columns']['qty'] = array(
     'cell' => array(
       'data' => t('Qty'),
-      'class' => 'text-right',
+      'class' => array('text-right'),
     ),
     'weight' => 0,
   );
   $table['#columns']['product'] = array(
     'cell' => array(
       'data' => t('Product'),
-      'class' => 'header-wide',
+      'class' => array('header-wide'),
     ),
     'weight' => 1,
   );
   $table['#columns']['model'] = array(
     'cell' => array(
       'data' => t('SKU'),
-      'class' => 'text-center',
+      'class' => array('text-center'),
       'nowrap' => 'nowrap',
     ),
     'weight' => 2,
@@ -852,7 +852,7 @@
     $table['#columns']['cost'] = array(
       'cell' => array(
         'data' => t('Cost'),
-        'class' => 'text-right',
+        'class' => array('text-right'),
       ),
       'weight' => 3,
     );
@@ -860,14 +860,14 @@
   $table['#columns']['price'] = array(
     'cell' => array(
       'data' => t('Price'),
-      'class' => 'text-right',
+      'class' => array('text-right'),
     ),
     'weight' => 4,
   );
   $table['#columns']['total'] = array(
     'cell' => array(
       'data' => t('Total'),
-      'class' => 'text-right',
+      'class' => array('text-right'),
     ),
     'weight' => 5,
   );
@@ -938,11 +938,11 @@
 function op_order_comments_view_table($comments) {
   $table = array(
     '#type' => 'tapir_table',
-    '#attributes' => array('class' => 'order-pane-table'),
+    '#attributes' => array('class' => array('order-pane-table')),
   );
 
   $table['#columns']['date'] = array(
-    'cell' => array('data' => t('Date'), 'class' => 'text-center'),
+    'cell' => array('data' => t('Date'), 'class' => array('text-center')),
     'weight' => 0,
   );
   $table['#columns']['user'] = array(
@@ -954,7 +954,7 @@
     'weight' => 2,
   );
   $table['#columns']['status'] = array(
-    'cell' => array('data' => t('Status'), 'class' => 'text-center'),
+    'cell' => array('data' => t('Status'), 'class' => array('text-center')),
     'weight' => 3,
   );
   $table['#columns']['comment'] = array(
@@ -1006,15 +1006,15 @@
 function op_admin_comments_view_table($comments) {
   $table = array(
     '#type' => 'tapir_table',
-    '#attributes' => array('class' => 'order-pane-table'),
+    '#attributes' => array('class' => array('order-pane-table')),
   );
 
   $table['#columns']['date'] = array(
-    'cell' => array('data' => t('Date'), 'class' => 'text-center'),
+    'cell' => array('data' => t('Date'), 'class' => array('text-center')),
     'weight' => 0,
   );
   $table['#columns']['user'] = array(
-    'cell' => array('data' => t('User'), 'class' => 'text-center'),
+    'cell' => array('data' => t('User'), 'class' => array('text-center')),
     'weight' => 1,
   );
   $table['#columns']['comment'] = array(

=== modified file 'uc_product/uc_product.admin.inc'
--- uc_product/uc_product.admin.inc	2010-02-01 20:11:04 +0000
+++ uc_product/uc_product.admin.inc	2010-02-03 21:35:40 +0000
@@ -91,7 +91,7 @@
 
   // Theme it all up in a summaries overview.
   return array(
-    '#markup' => theme('summary_overview', $summaries),
+    '#markup' => theme('summary_overview', array('summaries' => $summaries)),
   );
 }
 
@@ -290,7 +290,9 @@
  * @ingroup themeable
  * @see uc_product_field_settings_form()
  */
-function theme_uc_product_field_settings_form($form) {
+function theme_uc_product_field_settings_form($variables) {
+  $form = $variables['form'];
+
   $header = array(t('Enable'), t('Product field'), t('List position'));
   $rows = array();
   foreach (element_children($form['fields']) as $field) {
@@ -300,9 +302,9 @@
     $row[] = drupal_render($form['fields'][$field]['weight']);
     $rows[] = $row;
   }
-  $output .= theme('table', $header, $rows);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
 
-  $output .= drupal_render($form);
+  $output .= drupal_render_children($form);
   return $output;
 }
 
@@ -531,9 +533,8 @@
  * @ingroup themeable
  * @see uc_product_feature_add_form()
  */
-function theme_uc_product_feature_add_form($form) {
-  $output = '<table class="add-feature"><tr><td>'. drupal_render($form) .'</td></tr></table>';
-  return $output;
+function theme_uc_product_feature_add_form($variables) {
+  return '<table class="add-feature"><tr><td>'. drupal_render_children($variables['form']) .'</td></tr></table>';
 }
 
 /**

=== modified file 'uc_product/uc_product.module'
--- uc_product/uc_product.module	2010-02-03 13:57:00 +0000
+++ uc_product/uc_product.module	2010-02-03 21:35:40 +0000
@@ -259,41 +259,41 @@
 function uc_product_theme() {
   return array(
     'uc_product_form_prices' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_product_form_weight' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_product_dimensions_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_product_field_settings_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_product.admin.inc',
     ),
     'uc_product_model' => array(
-      'arguments' => array('model' => '', 'teaser' => 0, 'page' => 0),
+      'variables' => array('model' => '', 'teaser' => 0, 'page' => 0),
     ),
     'uc_product_body' => array(
-      'arguments' => array('body' => '', 'teaser' => 0, 'page' => 0),
+      'variables' => array('body' => '', 'teaser' => 0, 'page' => 0),
     ),
     'uc_product_add_to_cart' => array(
-      'arguments' => array('node' => NULL, 'teaser' => 0, 'page' => 0),
+      'variables' => array('node' => NULL, 'teaser' => 0, 'page' => 0),
     ),
     'uc_product_price' => array(
-      'arguments' => array('price' => 0, 'context' => array(), 'options' => array()),
+      'variables' => array('price' => 0, 'context' => array(), 'options' => array()),
     ),
     'uc_product_weight' => array(
-      'arguments' => array('weight' => 0, 'unit' => NULL, 'teaser' => 0, 'page' => 0),
+      'variables' => array('weight' => 0, 'units' => NULL, 'teaser' => 0, 'page' => 0),
     ),
     'uc_product_dimensions' => array(
-      'arguments' => array('length' => 0, 'width' => 0, 'height' => 0, 'units' => NULL, 'teaser' => 0, 'page' => 0),
+      'variables' => array('length' => 0, 'width' => 0, 'height' => 0, 'units' => NULL, 'teaser' => 0, 'page' => 0),
     ),
     'uc_product_image' => array(
-      'arguments' => array('images' => array(), 'teaser' => 0, 'page' => 0),
+      'variables' => array('images' => array(), 'teaser' => 0, 'page' => 0),
     ),
     'uc_product_feature_add_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_product.admin.inc',
     ),
   );
@@ -405,7 +405,7 @@
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
     '#weight' => -1,
-    '#attributes' => array('class' => 'product-field'),
+    '#attributes' => array('class' => array('product-field')),
   );
   $form['base']['model'] = array('#type' => 'textfield',
     '#title' => t('SKU'),
@@ -545,17 +545,21 @@
 /**
  * @ingroup themeable
  */
-function theme_uc_product_form_prices($form) {
+function theme_uc_product_form_prices($variables) {
+  $form = $variables['form'];
+
   return "<table><tr><td>\n". drupal_render($form['list_price'])
     .'</td><td>'. drupal_render($form['cost'])
     .'</td><td>'. drupal_render($form['sell_price'])
-    ."</td></tr></table>\n". drupal_render($form);
+    ."</td></tr></table>\n". drupal_render_children($form);
 }
 
 /**
  * @ingroup themeable
  */
-function theme_uc_product_form_weight($form) {
+function theme_uc_product_form_weight($variables) {
+  $form = $variables['form'];
+
   return '<table><tr><td>'. drupal_render($form['weight']) .'</td><td>'
        . drupal_render($form['weight_units']) .'</td></tr></table>';
 }
@@ -565,14 +569,14 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_dimensions_form($form) {
-  $output = '';
+function theme_uc_product_dimensions_form($variables) {
+  $form = $variables['form'];
+
   $row = array();
   foreach (element_children($form) as $dimension) {
     $row[] = drupal_render($form[$dimension]);
   }
-  $output .= theme('table', array(), array($row));
-  return $output;
+  return theme('table', array('rows' => array($row)));
 }
 
 /**
@@ -704,7 +708,7 @@
   );
 
   if (module_exists('imagecache') && ($field = variable_get('uc_image_'. $node->type, '')) && isset($node->$field) && file_exists($node->{$field}[0]['filepath'])) {
-    $node->content['image'] = array('#value' => theme('uc_product_image', $node->$field, $teaser, $page),
+    $node->content['image'] = array('#value' => theme('uc_product_image', array('images' => $node->$field, 'teaser' => $teaser, 'page' => $page)),
       '#access' => $enabled['image'],
       '#weight' => $weight['image'],
     );
@@ -712,63 +716,63 @@
 
   $context['class'][1] = 'display';
   $context['field'] = 'sell_price';
-  $node->content['display_price'] = array('#value' => theme('uc_product_price', $node->sell_price, $context),
+  $node->content['display_price'] = array('#value' => theme('uc_product_price', array('price' => $node->sell_price, 'context' => $context)),
     '#access' => $enabled['display_price'],
     '#weight' => $weight['display_price'],
   );
 
   if (!$teaser) {
-    $node->content['model'] = array('#value' => theme('uc_product_model', $node->model, $teaser, $page),
+    $node->content['model'] = array('#value' => theme('uc_product_model', array('model' => $node->model, 'teaser' => $teaser, 'page' => $page)),
       '#access' => $enabled['model'],
       '#weight' => $weight['model'],
     );
-    $node->content['body']['#value'] = theme('uc_product_body', $node->body, $teaser, $page);
+    $node->content['body']['#value'] = theme('uc_product_body', array('body' => $node->body, 'teaser' => $teaser, 'page' => $page));
     $node->content['body']['#weight'] = 1;
 
     $context['class'][1] = 'list';
     $context['field'] = 'list_price';
-    $node->content['list_price'] = array('#value' => theme('uc_product_price', $node->list_price, $context),
+    $node->content['list_price'] = array('#value' => theme('uc_product_price', array('price' => $node->list_price, 'context' => $context)),
       '#access' => $enabled['list_price'],
       '#weight' => $weight['list_price'],
     );
 
     $context['class'][1] = 'cost';
     $context['field'] = 'cost';
-    $node->content['cost'] = array('#value' => theme('uc_product_price', $node->cost, $context),
+    $node->content['cost'] = array('#value' => theme('uc_product_price', array('price' => $node->cost, 'context' => $context)),
       '#access' => $enabled['cost'] && user_access('administer products'),
       '#weight' => $weight['cost'],
     );
   }
   else {
-    $node->content['body']['#value'] = theme('uc_product_body', $node->teaser, $teaser, $page);
+    $node->content['body']['#value'] = theme('uc_product_body', array('body' => $node->teaser, 'teaser' => $teaser, 'page' => $page));
     $node->content['#attributes'] = array('style' => 'display: inline');
   }
 
   $context['class'][1] = 'sell';
   $context['field'] = 'sell_price';
-  $node->content['sell_price'] = array('#value' => theme('uc_product_price', $node->sell_price, $context, array('label' => !$teaser)),
+  $node->content['sell_price'] = array('#value' => theme('uc_product_price', array('price' => $node->sell_price, 'context' => $context, 'options' => array('label' => !$teaser))),
     '#access' => $enabled['sell_price'],
     '#weight' => $weight['sell_price'],
   );
 
   if (!$teaser) {
-    $node->content['weight'] = array('#value' => theme('uc_product_weight', $node->weight, $node->weight_units, $teaser, $page),
+    $node->content['weight'] = array('#value' => theme('uc_product_weight', array('weight' => $node->weight, 'units' => $node->weight_units, 'teaser' => $teaser, 'page' => $page)),
       '#access' => $enabled['weight'],
       '#weight' => $weight['weight'],
     );
-    $node->content['dimensions'] = array('#value' => theme('uc_product_dimensions', $node->length, $node->width, $node->height, $node->length_units, $teaser, $page),
+    $node->content['dimensions'] = array('#value' => theme('uc_product_dimensions', array('length' => $node->length, 'width' => $node->width, 'height' =>$node->height, 'units' => $node->length_units, 'teaser' => $teaser, 'page' => $page)),
       '#access' => $enabled['dimensions'],
       '#weight' => $weight['dimensions'],
     );
     if (module_exists('uc_cart')) {
-      $node->content['add_to_cart'] = array('#value' => theme('uc_product_add_to_cart', $node, $teaser, $page),
+      $node->content['add_to_cart'] = array('#value' => theme('uc_product_add_to_cart', array('node' => $node, 'teaser' => $teaser, 'page' => $page)),
         '#access' => $enabled['add_to_cart'],
         '#weight' => $weight['add_to_cart'],
       );
     }
   }
   elseif (module_exists('uc_cart') && variable_get('uc_product_add_to_cart_teaser', TRUE)) {
-    $node->content['add_to_cart'] = array('#value' => theme('uc_product_add_to_cart', $node, $teaser, $page),
+    $node->content['add_to_cart'] = array('#value' => theme('uc_product_add_to_cart', array('node' => $node, 'teaser' => $teaser, 'page' => $page)),
       '#access' => $enabled['add_to_cart'],
       '#weight' => $weight['add_to_cart'],
     );
@@ -804,7 +808,7 @@
       '#title' => t('Advanced search'),
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
-      '#attributes' => array('class' => 'search-advanced'),
+      '#attributes' => array('class' => array('search-advanced')),
     );
     $form['advanced']['keywords'] = array(
       '#prefix' => '<div class="criterion">',
@@ -1125,7 +1129,7 @@
       if (!$action_check) {
         $items[] = t('Some Imagecache presets do not contain actions to perform on images. Images may be displayed in their original formats.');
       }
-      $description .= theme('item_list', $items) . t('(This action is not required and should not be taken if you do not need images or have implemented your own image support.)');
+      $description .= theme('item_list', array('items' => $items)) . t('(This action is not required and should not be taken if you do not need images or have implemented your own image support.)');
     }
   }
 
@@ -1296,7 +1300,7 @@
   $table = array(
     '#type' => 'tapir_table',
     '#attributes' => array(
-      'class' => 'category-products',
+      'class' => array('category-products'),
     ),
     '#columns' => uc_product_table_header(),
     '#rows' => array(),
@@ -1316,7 +1320,13 @@
       if (module_exists('imagecache')) {
         if (($field = variable_get('uc_image_'. $node->type, '')) && isset($node->$field) && file_exists($node->{$field}[0]['filepath'])) {
           $image = $node->{$field}[0];
-          $data['image'] = array('#value' => l(theme('imagecache', 'product_list', $image['filepath'], $image['alt'], $image['title']), 'node/'. $node->nid, array('html' => TRUE)));
+          $data['image'] = array('#value' => l(theme('image_style', array(
+              'style_name' => 'product_list',
+              'path' => $image['filepath'],
+              'alt' => $image['alt'],
+              'title' => $image['title'],
+            )),
+            'node/'. $node->nid, array('html' => TRUE)));
         }
         else {
           $data['image'] = array('#value' => t('n/a'));
@@ -1377,7 +1387,7 @@
     '#value' =>  variable_get('uc_teaser_add_to_cart_text', t('Add to cart')),
     '#id' => 'edit-submit-'. $node->nid,
     '#attributes' => array(
-      'class' => 'list-add-to-cart',
+      'class' => array('list-add-to-cart'),
     ),
   );
 
@@ -1414,10 +1424,11 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_model($model, $teaser = 0, $page = 0) {
+function theme_uc_product_model($variables) {
   $output = '<div class="product-info model">';
-  $output .= t('SKU: @sku', array('@sku' => $model));
+  $output .= t('SKU: @sku', array('@sku' => $variables['model']));
   $output .= '</div>';
+
   return $output;
 }
 
@@ -1426,10 +1437,11 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_body($body, $teaser = 0, $page = 0) {
+function theme_uc_product_body($variables) {
   $output = '<div class="product-body">';
-  $output .= $body;
+  $output .= $variables['body'];
   $output .='</div>';
+
   return $output;
 }
 /**
@@ -1437,7 +1449,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_add_to_cart($node, $teaser = 0, $page = 0) {
+function theme_uc_product_add_to_cart($variables) {
+  $node = $variables['node'];
+
   $output = '<div class="add-to-cart">';
   if ($node->nid) {
     $output .= drupal_get_form('uc_product_add_to_cart_form_'. $node->nid, $node);
@@ -1446,6 +1460,7 @@
     $output .= drupal_get_form('uc_product_add_to_cart_form', $node);
   }
   $output .= '</div>';
+
   return $output;
 }
 
@@ -1482,7 +1497,7 @@
     '#value' =>  variable_get('uc_product_add_to_cart_text', t('Add to cart')),
     '#id' => 'edit-submit-'. $node->nid,
     '#attributes' => array(
-      'class' => 'node-add-to-cart',
+      'class' => array('node-add-to-cart'),
     ),
   );
 
@@ -1531,7 +1546,11 @@
  * @ingroup themeable
  * @see uc_price()
  */
-function theme_uc_product_price($price, $context, $options = array()) {
+function theme_uc_product_price($variables) {
+  $price = $variables['price'];
+  $context = $variables['context'];
+  $options = $variables['options'];
+
   $output = '<div class="product-info '. implode(' ', (array)$context['class']) .'">';
   $output .= uc_price($price, $context, $options);
   $output .= '</div>';
@@ -1544,10 +1563,14 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_weight($weight, $unit = NULL, $teaser = 0, $page = 0) {
+function theme_uc_product_weight($variables) {
+  $weight = $variables['weight'];
+  $units = $variables['units'];
+
   $output = '<div class="product-info weight">';
-  $output .= t('Weight: !weight', array('!weight' => uc_weight_format($weight, $unit)));
+  $output .= t('Weight: !weight', array('!weight' => uc_weight_format($weight, $units)));
   $output .= '</div>';
+
   return $output;
 }
 
@@ -1556,10 +1579,16 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_dimensions($length, $width, $height, $units = NULL, $teaser = 0, $page = 0) {
+function theme_uc_product_dimensions($variables) {
+  $length = $variables['length'];
+  $width = $variables['width'];
+  $height = $variables['height'];
+  $units = $variables['units'];
+
   $output = '<div class="product-info dimensions">';
   $output .= t('Dimensions: !length × !width × !height', array('!length' => uc_length_format($length, $units), '!width' => uc_length_format($width, $units), '!height' => uc_length_format($height, $units)));
   $output .= '</div>';
+
   return $output;
 }
 
@@ -1568,8 +1597,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_product_image($images, $teaser = 0, $page = 0) {
+function theme_uc_product_image($variables) {
   static $rel_count = 0;
+  $images = $variables['images'];
 
   // Get the current product image widget.
   $image_widget = uc_product_get_image_widget();
@@ -1583,7 +1613,12 @@
     $output .= $image_widget_func($rel_count);
   }
   $output .= '>';
-  $output .= theme('imagecache', 'product', $first['filepath'], $first['alt'], $first['title']);
+  $output .= theme('image_style', array(
+    'style_name' => 'product',
+    'path' => $first['filepath'],
+    'alt' => $first['alt'],
+    'title' => $first['title'],
+  ));
   $output .= '</a></div><div class="more-product-images">';
   foreach ($images as $thumbnail) {
     // Node preview adds extra values to $images that aren't files.
@@ -1595,7 +1630,12 @@
       $output .= $image_widget_func($rel_count);
     }
     $output .= '>';
-    $output .= theme('imagecache', 'uc_thumbnail', $thumbnail['filepath'], $thumbnail['alt'], $thumbnail['title']);
+    $output .= theme('image_style', array(
+      'style_name' => 'uc_thumbnail',
+      'path' => $thumbnail['filepath'],
+      'alt' => $thumbnail['alt'],
+      'title' => $thumbnail['title'],
+    ));
     $output .= '</a>';
   }
   $output .= '</div></div>';
@@ -1754,7 +1794,12 @@
     $image = $product->{$field}[0];
     $path = $image['filepath'];
     if (file_exists($path)) {
-      $img = theme('imagecache', $format, $path, $image['alt'], $image['title']);
+      $img = theme('image_style', array(
+        'style_name' => $format,
+        'path' => $path,
+        'alt' => $image['alt'],
+        'title' => $image['title'],
+      ));
       if ($format == 'product') {
         if ($image_widget) {
           $output .= '<a title="'. $image['title'] .'" href="'. imagecache_create_url('product_full', $path) .'" '. $image_widget_func(NULL) .'>';

=== modified file 'uc_product/views/uc_product_handler_field_addtocart.inc'
--- uc_product/views/uc_product_handler_field_addtocart.inc	2009-05-07 19:52:02 +0000
+++ uc_product/views/uc_product_handler_field_addtocart.inc	2010-02-02 21:48:27 +0000
@@ -28,10 +28,10 @@
       $module = $type->module;
       $product = node_load($values->{$this->aliases['nid']});
       if (function_exists('theme_'. $module .'_add_to_cart')) {
-        return theme($module .'_add_to_cart', $product);
+        return theme($module .'_add_to_cart', array('node' => $product));
       }
       elseif (function_exists('theme_uc_product_add_to_cart')) {
-        return theme('uc_product_add_to_cart', $product);
+        return theme('uc_product_add_to_cart', array('node' => $product));
       }
     }
   }

=== modified file 'uc_product_kit/uc_product_kit.module'
--- uc_product_kit/uc_product_kit.module	2010-02-02 18:57:19 +0000
+++ uc_product_kit/uc_product_kit.module	2010-02-03 20:37:44 +0000
@@ -396,7 +396,7 @@
 function uc_product_kit_theme() {
   return array(
     'uc_product_kit_add_to_cart' => array(
-      'arguments' => array('node' => NULL),
+      'variables' => array('node' => NULL),
       ),
     );
 }
@@ -507,7 +507,7 @@
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
     '#weight' => -1,
-    '#attributes' => array('class' => 'product-field'),
+    '#attributes' => array('class' => array('product-field')) ,
   );
   $form['base']['mutable'] = array('#type' => 'radios',
     '#title' => t('How is this product kit handled by the cart?'),
@@ -653,7 +653,7 @@
   );
 
   if (module_exists('imagecache') && ($field = variable_get('uc_image_product_kit', '')) && isset($node->$field) && file_exists($node->{$field}[0]['filepath'])) {
-    $node->content['image'] = array('#value' => theme('uc_product_image', $node->$field),
+    $node->content['image'] = array('#value' => theme('uc_product_image', array('images' => $node->$field)),
       '#access' => $enabled['image'],
       '#weight' => $weight['image'],
     );
@@ -665,7 +665,7 @@
     '#weight' => $weight['display_price'],
   );
   if (!$teaser) {
-    $node->content['model'] = array('#value' => theme('uc_product_model', $node->model),
+    $node->content['model'] = array('#value' => theme('uc_product_model', array('model' => $node->model)),
       '#access' => $enabled['model'],
       '#weight' => $weight['model'],
     );
@@ -697,7 +697,7 @@
   );
 
   if (!$teaser) {
-    $node->content['weight'] = array('#value' => theme('uc_product_weight', $node->weight, $node->weight_units),
+    $node->content['weight'] = array('#value' => theme('uc_product_weight', array('weight' => $node->weight, 'units' => $node->weight_units)),
       '#access' => $enabled['weight'],
       '#weight' => $weight['weight'],
     );
@@ -718,13 +718,13 @@
       }
     }
     if (module_exists('uc_cart')) {
-      $node->content['add_to_cart'] = array('#value' => theme('uc_product_kit_add_to_cart', $node),
+      $node->content['add_to_cart'] = array('#value' => theme('uc_product_kit_add_to_cart', array('node' => $node)),
         '#weight' => 10,
       );
     }
   }
   elseif (module_exists('uc_cart') && variable_get('uc_product_add_to_cart_teaser', TRUE)) {
-    $node->content['add_to_cart'] = array('#value' => theme('uc_product_kit_add_to_cart', $node),
+    $node->content['add_to_cart'] = array('#value' => theme('uc_product_kit_add_to_cart', array('node' => $node)),
       '#weight' => 10,
     );
   }
@@ -738,6 +738,8 @@
  * @ingroup themeable
  */
 function theme_uc_product_kit_add_to_cart($node) {
+  $node = $variables['nodes'];
+
   $output = '<div class="add-to-cart" title="'. t('Click to add to cart.') .'">';
   if ($node->nid) {
     $output .= drupal_get_form('uc_product_kit_add_to_cart_form_'. $node->nid, $node);
@@ -746,6 +748,7 @@
     $output .= drupal_get_form('uc_product_kit_add_to_cart_form', $node);
   }
   $output .= '</div>';
+
   return $output;
 }
 
@@ -784,7 +787,7 @@
     '#value' =>  variable_get('uc_product_add_to_cart_text', t('Add to cart')),
     '#id' => 'edit-submit-'. $node->nid,
     '#attributes' => array(
-      'class' => 'node-add-to-cart',
+      'class' => array('node-add-to-cart'),
     ),
   );
 
@@ -838,7 +841,7 @@
     '#value' =>  variable_get('uc_teaser_add_to_cart_text', t('Add to cart')),
     '#id' => 'edit-submit-'. $node->nid,
     '#attributes' => array(
-      'class' => 'list-add-to-cart',
+      'class' => array('list-add-to-cart'),
     ),
   );
 
@@ -1106,7 +1109,7 @@
       $title = $item->title;
     }
     if ($kit->mutable == UC_PRODUCT_KIT_UNMUTABLE_WITH_LIST) {
-      $elements[$unique_id]['#extra'][] = array('data' => $item->qty .' x '. $title . $extra, 'class' => 'kit-component-cart-desc');
+      $elements[$unique_id]['#extra'][] = array('data' => $item->qty .' x '. $title . $extra, 'class' => array('kit-component-cart-desc'));
     }
 
     $context = array(
@@ -1142,7 +1145,7 @@
 
       $elements[$unique_id]['data'] = array('#type' => 'value', '#value' => serialize($elements[$unique_id]['data']));
       if ($kit->mutable == UC_PRODUCT_KIT_UNMUTABLE_WITH_LIST) {
-        $elements[$unique_id]['description']['#value'] .= theme('item_list', $elements[$unique_id]['#extra'], NULL, 'ul', array('class' => 'product-description'));
+        $elements[$unique_id]['description']['#value'] .= theme('item_list', array('items' => $elements[$unique_id]['#extra'], 'attributes' => array('class' => array('product-description'))));
       }
       $element = $elements[$unique_id];
       unset($products[$unique_id]);

=== modified file 'uc_reports/uc_reports.admin.inc'
--- uc_reports/uc_reports.admin.inc	2010-02-02 18:30:52 +0000
+++ uc_reports/uc_reports.admin.inc	2010-02-03 20:37:44 +0000
@@ -106,8 +106,8 @@
   }
   $csv_data = uc_reports_store_csv('uc_customers', $csv_rows);
 
-  $output = theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'));
-  $output .= theme_pager(NULL, $page_size);
+  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))));
+  $output .= theme('pager');
   $output .= '<div class="uc-reports-links">'. l(t('Export to CSV file.'), 'admin/store/reports/getcsv/'. $csv_data['report'] .'/'. $csv_data['user']) .'&nbsp;&nbsp;&nbsp;'. ((!is_null($_GET['nopage'])) ? l(t('Show paged records'), 'admin/store/reports/customers') : l(t('Show all records'), 'admin/store/reports/customers', array('query' => 'nopage=1'))) .'</div>';
 
   return $output;
@@ -267,8 +267,8 @@
   }
   $csv_data = uc_reports_store_csv('uc_products', $csv_rows);
 
-  $output = theme('uc_reports_product_table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'));
-  $output .= theme('pager', NULL, $page_size);
+  $output = theme('uc_reports_product_table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))));
+  $output .= theme('pager');
   $output .= '<div class="uc-reports-links">'. l(t('Export to CSV file.'), 'admin/store/reports/getcsv/'. $csv_data['report'] .'/'. $csv_data['user']) .'&nbsp;&nbsp;&nbsp;'. (!is_null($_GET['nopage']) ? l(t('Show paged records'), 'admin/store/reports/products') : l(t('Show all records'), 'admin/store/reports/products', array('query' => 'nopage=1'))) .'</div>';
   $output .= '<small>*'. t('Make sure %setting_name is set to %state in the <a href="!url">access log settings page</a> to enable views column.', array('%setting_name' => 'count content views', '%state' => 'enabled', '!url' => url('admin/reports/settings', array('query' => 'destination=admin/store/reports/products')))) .'</small>';
 
@@ -454,10 +454,10 @@
 
   // Build the page output holding the form, table, and CSV export link.
   $output = drupal_get_form('uc_reports_products_custom_form', $args, $args['status'])
-          . theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'))
+          . theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))))
            .'<div class="uc-reports-links">'. l(t('Export to CSV file.'), 'admin/store/reports/getcsv/'. $csv_data['report'] .'/'. $csv_data['user']) .'</div>';
 
-  $output .= theme('pager', NULL, $page_size);
+  $output .= theme('pager');
   $output .= '<small>*'. t('Make sure %setting_name is set to %state in the <a href="!url">access log settings page</a> to enable views column.', array('%setting_name' => 'count content views', '%state' => 'enabled', '!url' => url('admin/reports/settings', array('query' => 'destination=admin/store/reports/products/custom')))) .'</small>';
 
   return $output;
@@ -550,14 +550,18 @@
  *
  * @ingroup themeable
  */
-function theme_uc_reports_product_table($header, $rows, $attributes = array(), $caption = NULL) {
+function theme_uc_reports_product_table($variables) {
+  $header = $variables['header'];
+  $rows = $variables['rows'];
+  $attributes = $variables['attributes'];
+  $caption = $variables['caption'];
 
   // Add sticky headers, if applicable.
   if (count($header)) {
     drupal_add_js('misc/tableheader.js');
     // Add 'sticky-enabled' class to the table to identify it for JS.
     // This is needed to target tables constructed by this function.
-    $attributes['class'] = empty($attributes['class']) ? 'sticky-enabled' : ($attributes['class'] .' sticky-enabled');
+    $attributes['class'][] = 'sticky-enabled';
   }
 
   $output = '<table'. drupal_attributes($attributes) .">\n";
@@ -610,12 +614,7 @@
       }
       if (count($cells)) {
         // Add odd/even class
-        if (isset($attributes['class'])) {
-          $attributes['class'] .= ' '. $class;
-        }
-        else {
-          $attributes['class'] = $class;
-        }
+        $attributes['class'][] = $class;
 
         // Build row
         $output .= ' <tr'. drupal_attributes($attributes) .'>';
@@ -724,7 +723,7 @@
   );
 
   // Add the sales data report table to the output.
-  $output = theme('table', $header, $rows, array('class' => 'uc-sales-table'));
+  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('uc-sales-table'))));
 
   // Build the header statistics table header.
   $header = array(array('data' => t('Statistics'), 'width' => '50%'), '');
@@ -737,7 +736,7 @@
   );
 
   // Add the statistics table to the output.
-  $output .= theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'));
+  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))));
 
   // Build the total orders by status table header.
   $header = array(array('data' => t('Total orders by status'), 'width' => '50%'), '');
@@ -769,7 +768,7 @@
   }
 
   // Add the total orders by status table to the output.
-  $output .= theme('table', $header, $rows, array('class' => 'uc-sales-table'));
+  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('uc-sales-table'))));
 
   return $output;
 }
@@ -870,7 +869,7 @@
 
   // Build the page output holding the form, table, and CSV export link.
   $output = drupal_get_form('uc_reports_sales_year_form', $year)
-          . theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'))
+          . theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))))
            .'<div class="uc-reports-links">'. l(t('Export to CSV file.'), 'admin/store/reports/getcsv/'. $csv_data['report'] .'/'. $csv_data['user']) .'</div>';
 
   return $output;
@@ -1048,7 +1047,7 @@
 
   // Build the page output holding the form, table, and CSV export link.
   $output = drupal_get_form('uc_reports_sales_custom_form', $args, $args['status'])
-          . theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'))
+          . theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))))
            .'<div class="uc-reports-links">'. l(t('Export to CSV file.'), 'admin/store/reports/getcsv/'. $csv_data['report'] .'/'. $csv_data['user']) .'</div>';
 
   return $output;

=== modified file 'uc_reports/uc_reports.module'
--- uc_reports/uc_reports.module	2010-02-02 19:12:45 +0000
+++ uc_reports/uc_reports.module	2010-02-03 17:28:29 +0000
@@ -184,7 +184,7 @@
 function uc_reports_theme() {
   return array(
     'uc_reports_product_table' => array(
-      'arguments' => array('header' => NULL, 'rows' => NULL, 'attributes' => array(), 'caption' => NULL),
+      'variables' => array('header' => NULL, 'rows' => NULL, 'attributes' => array(), 'caption' => NULL),
     ),
   );
 }

=== modified file 'uc_roles/uc_roles.admin.inc'
--- uc_roles/uc_roles.admin.inc	2009-05-14 21:04:36 +0000
+++ uc_roles/uc_roles.admin.inc	2010-02-03 21:35:40 +0000
@@ -32,7 +32,9 @@
 
   // Stick the expirations into the form.
   while ($row = db_fetch_object($result)) {
-    $form['name'][$row->uid .' '. $row->rid] = array('#value' => theme('username', $row));
+    $account = user_load($row->uid);
+    $name = check_plain(format_username($account));
+    $form['name'][$row->uid .' '. $row->rid] = array('#value' => theme('username', array('account' => $account, 'name' => $name)));
     $form['role'][$row->uid .' '. $row->rid] = array('#value' => _uc_roles_get_name($row->rid));
     $form['expiration'][$row->uid .' '. $row->rid] = array('#value' => format_date($row->expiration, 'small'));
     $form['operations'][$row->uid .' '. $row->rid] = array('#value' => l(t('delete'), 'admin/user/user/expiration/delete/'. $row->uid .'/'. $row->rid) .' '. l(t('edit'), 'user/'. $row->uid .'/edit', array('fragment' => 'role-expiration-'. $row->rid, 'query' => 'destination=admin%2Fuser%2Fuser%2Fexpiration')));
@@ -46,7 +48,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_roles_expiration($form) {
+function theme_uc_roles_expiration($variables) {
+  $form = $variables['form'];
+
   $header = _uc_roles_expiration_header();
 
   if (is_array($form['name'])) {
@@ -64,9 +68,9 @@
   }
 
   // Render everything.
-  $output .= theme('table', $header, $rows);
-  $output .= theme('pager', NULL, 50, 0);
-  $output .= drupal_render($form);
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+  $output .= theme('pager');
+  $output .= drupal_render_children($form);
 
   return $output;
 }

=== modified file 'uc_roles/uc_roles.ca.inc'
--- uc_roles/uc_roles.ca.inc	2009-10-20 17:13:46 +0000
+++ uc_roles/uc_roles.ca.inc	2010-02-02 21:58:29 +0000
@@ -429,9 +429,6 @@
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
     );
-    $form['token_help'][$name]['content'] = array(
-      '#value' => theme('token_help', $name),
-    );
   }
 
   return $form;

=== modified file 'uc_roles/uc_roles.module'
--- uc_roles/uc_roles.module	2010-02-02 18:30:52 +0000
+++ uc_roles/uc_roles.module	2010-02-03 21:35:40 +0000
@@ -138,14 +138,14 @@
 function uc_roles_theme() {
   return array(
     'uc_roles_expiration' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
       'file' => 'uc_roles.admin.inc',
     ),
     'uc_roles_user_expiration' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_roles_user_new' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
   );
 }
@@ -279,11 +279,11 @@
 /**
  * Theme the roles dialog on the account edit page.
  */
-function theme_uc_roles_user_new($form) {
-  $output = '';
+function theme_uc_roles_user_new($variables) {
+  $form = $variables['form'];
 
   // Render the expiration tables first.
-  $output .= drupal_render($form['expirations']);
+  $output = drupal_render($form['expirations']);
 
   $output .= '<div class="expiration">';
   $output .=   drupal_render($form['new_role']);
@@ -301,8 +301,8 @@
  *
  * @ingroup themeable
  */
-function theme_uc_roles_user_expiration($form) {
-  $output = '';
+function theme_uc_roles_user_expiration($variables) {
+  $form = $variables['form'];
 
   $header = array(
     array('data' => t('Make permanent')),
@@ -340,8 +340,8 @@
     );
   }
 
-  $output .= theme('table', $header, $rows, array(), t('Below you can add or remove time to the expiration dates of the following roles.'));
-  $output .= drupal_render($form);
+  $output = theme('table', array('header' => $header, 'rows' => $rows, 'caption' => t('Below you can add or remove time to the expiration dates of the following roles.')));
+  $output .= drupal_render_children($form);
 
   return $output;
 }

=== modified file 'uc_stock/uc_stock.admin.inc'
--- uc_stock/uc_stock.admin.inc	2009-05-14 21:04:36 +0000
+++ uc_stock/uc_stock.admin.inc	2010-02-03 21:35:40 +0000
@@ -85,7 +85,7 @@
         array('data' => $stock->threshold),
         array('data' => implode(' ', $op)),
       ),
-      'class' => ($stock->threshold >= $stock->stock) ? 'uc-stock-below-threshold' : 'uc-stock-above-threshold',
+      'class' => array(($stock->threshold >= $stock->stock) ? 'uc-stock-below-threshold' : 'uc-stock-above-threshold'),
     );
 
     // Add the data to the CSV contents for export.
@@ -95,8 +95,8 @@
   $csv_data = uc_reports_store_csv('uc_stock', $csv_rows);
 
   $output = drupal_get_form('uc_stock_report_form')
-          . theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-stock-table'))
-          . theme_pager(NULL, $page_size);
+          . theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-stock-table'))))
+          . theme('pager');
   $output .= '<div class="uc-reports-links">'. l(t('Export to CSV file'), 'admin/store/reports/getcsv/'. $csv_data['report'] .'/'. $csv_data['user']) .'&nbsp;&nbsp;&nbsp;'. ((!is_null($_GET['nopage'])) ? l(t('Show paged records'), 'admin/store/reports/stock') : l(t('Show all records'), 'admin/store/reports/stock', $options = array('query' => 'nopage=1'))) .'</div>';
   return $output;
 }
@@ -213,7 +213,9 @@
  * @ingroup themeable
  * @see uc_stock_edit_form()
  */
-function theme_uc_stock_edit_form($form) {
+function theme_uc_stock_edit_form($variables) {
+  $form = $variables['form'];
+
   $header = array(
     array('data' => t('Active')),
     array('data' => t('SKU')),
@@ -230,7 +232,7 @@
     );
   }
 
-  return theme('table', $header, $rows) . drupal_render($form);
+  return theme('table', array('header' => $header, 'rows' => $rows)) . drupal_render_children($form);
 }
 
 /**

=== modified file 'uc_stock/uc_stock.module'
--- uc_stock/uc_stock.module	2009-09-23 17:59:16 +0000
+++ uc_stock/uc_stock.module	2010-02-03 17:11:53 +0000
@@ -93,7 +93,7 @@
 function uc_stock_theme() {
   return array(
     'uc_stock_edit_form' => array(
-      'arguments' => array('content' => NULL),
+      'render element' => 'form',
       'file' => 'uc_stock.admin.inc',
     ),
   );

=== modified file 'uc_store/includes/summaries.inc'
--- uc_store/includes/summaries.inc	2009-08-11 20:29:39 +0000
+++ uc_store/includes/summaries.inc	2010-02-03 20:03:58 +0000
@@ -242,7 +242,10 @@
  *   The HTML output of the summary.
  * @ingroup themeable
  */
-function theme_summary_overview($summaries, $link = TRUE) {
+function theme_summary_overview($variables) {
+  $summaries = $variables['summaries'];
+  $link = $variables['link'];
+
   // Add some Ubercart specific JS for modifying summaries.
   drupal_add_js(drupal_get_path('module', 'uc_store') .'/includes/summaries.js');
   drupal_add_js(array('editIconPath' => base_path() . drupal_get_path('module', 'uc_store') .'/images/order_edit.gif'), 'setting');
@@ -265,7 +268,7 @@
     $output .= '</div>';
 
     // Add in the list for the summary items.
-    $output .= theme('item_list', $summary['items']);
+    $output .= theme('item_list', array('items' => $summary['items']));
 
     // Close out the summary overview div.
     $output .= '</div>';

=== modified file 'uc_store/includes/tapir.inc'
--- uc_store/includes/tapir.inc	2009-05-14 21:04:36 +0000
+++ uc_store/includes/tapir.inc	2010-02-03 21:35:40 +0000
@@ -65,7 +65,9 @@
  *   The table output rendered in HTML.
  * @ingroup themeable
  */
-function theme_tapir_table($element) {
+function theme_tapir_table($variables) {
+  $element = $variables['element'];
+
   $header = array();
   $rows = array();
 
@@ -128,7 +130,7 @@
   }
 
   // Return the rendered table.
-  return theme('table', $header, $rows, (array)$element['#attributes'], $element['#title']) . (isset($element['#children']) ? $element['#children'] : '');
+  return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => (array)$element['#attributes'], 'caption' => $element['#title'])) . drupal_render_children($element);
 }
 
 /**

=== modified file 'uc_store/includes/uc_price.inc'
--- uc_store/includes/uc_price.inc	2009-08-17 21:21:34 +0000
+++ uc_store/includes/uc_price.inc	2010-02-02 22:02:23 +0000
@@ -157,8 +157,8 @@
     }
 
     // Theme the price.
-    $values['themed-original'] = theme('uc_price', $values['formatted-original'], $context, $options);
-    $values['themed'] = theme('uc_price', $values['formatted'], $context, $options);
+    $values['themed-original'] = theme('uc_price', array('value' => $values['formatted-original'], 'context' => $context, 'options' => $options));
+    $values['themed'] = theme('uc_price', array('value' => $values['formatted'], 'context' => $context, 'options' => $options));
 
     // Cache this price values.
     // TODO: Determine if we can safely cache these things...

=== modified file 'uc_store/uc_store.admin.inc'
--- uc_store/uc_store.admin.inc	2010-02-02 14:10:31 +0000
+++ uc_store/uc_store.admin.inc	2010-02-03 21:35:40 +0000
@@ -18,12 +18,12 @@
     $content = system_admin_menu_block((array)$main_menu);
 
     $build['dashboard'] = array(
-      '#markup' => theme('admin_block_content', $content),
+      '#markup' => theme('admin_block_content', array('content' => $content)),
     );
   }
   else {
     $build['dashboard'] = array(
-      '#markup' => theme('uc_admin_dashboard', $type, $tree),
+      '#markup' => theme('uc_admin_dashboard', array('type' => $type, 'menus' => $tree)),
     );
   }
 
@@ -135,7 +135,7 @@
     '#theme' => 'table',
     '#header' => $header,
     '#rows' => $rows,
-    '#attributes' => array('width' => '100%', 'class' => 'uc-customer-table'),
+    '#attributes' => array('width' => '100%', 'class' => array('uc-customer-table')),
   );
   $build['pager'] = array(
     '#theme' => 'pager',
@@ -323,7 +323,7 @@
     '#markup' => (module_exists('uc_reports')) ? t('Various reports generated by Ubercart modules can be found here. Click the links below to view the reports.') : t('Various reports generated by Ubercart modules can be found here. Click the links below to view the reports. To view core Ubercart statistics enable the <strong>Reports</strong> module on the <a href="!url">module administration page</a>', array('!url' => url('admin/build/modules'))),
   );
   $build['menu'] = array(
-    '#markup' => theme('admin_block_content', $content),
+    '#markup' => theme('admin_block_content', array('content' => $content)),
     '#weight' => 5,
   );
 
@@ -338,7 +338,7 @@
   $content = system_admin_menu_block($menu);
 
   $build['menu'] = array(
-    '#markup' => theme('admin_block_content', $content),
+    '#markup' => theme('admin_block_content', array('content' => $content)),
   );
 
   return $build;
@@ -374,10 +374,6 @@
     '#markup' => '<p>'. t('Tokens are bracketed phrases you can use in certain text fields and boxes as placeholders for some other text. Tokens represent things like store variables, links to certain pages, order information, etc.  Tokens are used by including the token listed below in a text field that uses them.  The description for the textfields will alert you to which groups of tokens listed below may be used.') .'</p>',
   );
 
-  $build['token_help'] = array(
-    '#markup' => theme('token_help', 'ubercart'),
-  );
-
   return $build;
 }
 
@@ -387,7 +383,7 @@
 function uc_country_settings_overview() {
   // Theme all the pages beneath this path into summary overviews.
   return array(
-    '#markup' => theme('summary_overview', summarize_child_form_pages('admin/store/settings/countries/edit')),
+    '#markup' => theme('summary_overview', array('summaries' => summarize_child_form_pages('admin/store/settings/countries/edit'))),
   );
 }
 
@@ -467,7 +463,7 @@
     '#disabled' => !is_array($import_list),
   );
   $form['country_table'] = array(
-    '#value' => theme('table', $header, $rows),
+    '#value' => theme('table', array('header' => $header, 'rows' => $rows)),
   );
 
   return $form;
@@ -545,7 +541,7 @@
   );
   $form['instructions']['text'] = array(
     '#value' => '<div>'. t('The following variables should be used in configuring addresses for the countries you ship to:') .'<p>'
-              . theme('table', $header, $rows) .'</p><p>'. t('*Adding _if to any country variable will make it only display for addresses<br />whose country is different than the default store country.') .'</div>',
+              . theme('table', array('header' => $header, 'rows' => $rows)) .'</p><p>'. t('*Adding _if to any country variable will make it only display for addresses<br />whose country is different than the default store country.') .'</div>',
   );
 
   $countries = db_query("SELECT * FROM {uc_countries} ORDER BY country_name ASC")->fetchAll();
@@ -596,7 +592,7 @@
 function uc_store_store_settings_overview() {
   // Theme all the pages beneath this path into summary overviews.
   return array(
-    '#markup' => theme('summary_overview', summarize_child_form_pages('admin/store/settings/store/edit')),
+    '#markup' => theme('summary_overview', array('summaries' => summarize_child_form_pages('admin/store/settings/store/edit'))),
   );
 }
 
@@ -1039,7 +1035,7 @@
     '#theme' => 'table',
     '#header' => $header,
     '#rows' => $rows,
-    '#attributes' => array('width' => '100%', 'class' => 'uc-cust-orders-table'),
+    '#attributes' => array('width' => '100%', 'class' => array('uc-cust-orders-table')),
   );
   $build['pager'] = array(
     '#theme' => 'pager',
@@ -1235,7 +1231,7 @@
       $form['uc_price_alterers'][$module]['weight'] = array(
         '#type' => 'weight',
         '#default_value' => $data['weight'],
-        '#attributes' => array('class' => 'uc-price-handler-table-weight'),
+        '#attributes' => array('class' => array('uc-price-handler-table-weight')),
       );
     }
 
@@ -1287,7 +1283,9 @@
  * @ingroup themeable
  * @see uc_price_settings_form()
  */
-function theme_uc_price_settings_form($form) {
+function theme_uc_price_settings_form($variables) {
+  $form = $variables['form'];
+
   // Add the tabledrag to the alterer table.
   drupal_add_tabledrag('uc-price-handler-table', 'order', 'sibling', 'uc-price-handler-table-weight');
 
@@ -1303,13 +1301,13 @@
 
       $rows[] = array(
         'data' => $row,
-        'class' => 'draggable',
+        'class' => array('draggable'),
       );
     }
   }
 
-  $output = theme('table', $header, $rows, array('id' => 'uc-price-handler-table'))
-          . drupal_render($form);
+  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'uc-price-handler-table')))
+          . drupal_render_children($form);
 
   return $output;
 }

=== modified file 'uc_store/uc_store.module'
--- uc_store/uc_store.module	2010-02-03 13:57:00 +0000
+++ uc_store/uc_store.module	2010-02-03 21:35:40 +0000
@@ -362,6 +362,7 @@
     '#tree' => TRUE,
     '#value' => NULL,
     '#pre_render' => array('tapir_gather_rows'),
+    '#theme' => 'tapir_table',
     '#process' => 'form_process_ahah',
   );
 
@@ -381,28 +382,28 @@
 function uc_store_theme() {
   return array(
     'uc_admin_dashboard' => array(
-      'arguments' => array('type' => NULL, 'menus' => NULL),
+      'variables' => array('type' => NULL, 'menus' => NULL),
     ),
     'uc_store_footer' => array(
-      'arguments' => array('message' => ''),
+      'variables' => array('message' => ''),
     ),
     'uc_store_address_fields_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'uc_pane_sort_table' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'tapir_table' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'element',
     ),
     'uc_price_settings_form' => array(
-      'arguments' => array('form' => NULL),
+      'render element' => 'form',
     ),
     'summary_overview' => array(
-      'arguments' => array(),
+      'variables' => array('summaries' => NULL, 'link' => TRUE),
     ),
     'uc_price' => array(
-      'arguments' => array('value' => 0, 'context' => array(), 'options' => array()),
+      'variables' => array('value' => 0, 'context' => array(), 'options' => array()),
     ),
   );
 }
@@ -561,7 +562,7 @@
 
       $page['page_bottom']['ubercart_footer']= array(
         '#type' => 'markup',
-        '#markup' => theme('uc_store_footer', $message),
+        '#markup' => theme('uc_store_footer', array('message' => $message)),
       );
   }
 }
@@ -603,7 +604,11 @@
  *
  * @ingroup themeable
  */
-function theme_uc_price($value, $context, $options) {
+function theme_uc_price($variables) {
+  $value = $variables['value'];
+  $context = $variables['context'];
+  $options = $variables['options'];
+
   // Fixup class names.
   if (!is_array($context['class'])) {
     $context['class'] = array();
@@ -635,6 +640,9 @@
  * @ingroup themeable
  */
 function theme_uc_admin_dashboard($type, $menus) {
+  $type = $variables['type'];
+  $menu = $variables['menus'];
+
   if ($type == 1) {
     drupal_add_js(drupal_get_path('module', 'uc_store') .'/uc_store.js', 'module');
     drupal_add_js(array('ucTextShow' => t('- Show links -'), 'ucTextHide' => t('- Hide links -')), 'setting');
@@ -654,7 +662,7 @@
         $panel_links = '';
       }
       else {
-        $panel_links = theme('admin_block_content', system_admin_menu_block(menu_get_item($menu['href'])));
+        $panel_links = theme('admin_block_content', array('content' => system_admin_menu_block(menu_get_item($menu['href']))));
       }
       $panel_table = '<table width="100%"><tr>'
                     .'<td>'. l(uc_store_get_icon($menu['href']), $menu['href'],
@@ -703,8 +711,8 @@
  *
  * @ingroup themeable
  */
-function theme_uc_store_footer($message) {
-  return '<div id="store-footer">'. $message .'</div>';
+function theme_uc_store_footer($variables) {
+  return '<div id="store-footer">'. $variables['message'] .'</div>';
 }
 
 /**
@@ -788,7 +796,9 @@
  * @ingroup themeable
  * @see uc_store_address_fields_form()
  */
-function theme_uc_store_address_fields_form($form) {
+function theme_uc_store_address_fields_form($variables) {
+  $form = $variables['form'];
+
   $header = array(t('Enabled'), t('Field'), t('Title'), t('Required'));
 
   foreach (element_children($form['fields']) as $field) {
@@ -800,7 +810,7 @@
     );
   }
 
-  $output = theme('table', $header, $rows) .'<br />'. drupal_render($form);
+  $output = theme('table', array('header' => $header, 'rows' => $rows)) .'<br />'. drupal_render_children($form);
 
   return $output;
 }
@@ -860,7 +870,7 @@
       $select['#parents'] = array();
       $match = array('`<[/]*div[^>]*>`', '`<[/]*select[^>]*>`', '`\n|\r`');
       $replace = array('', '', '');
-      $output = preg_replace($match, $replace, theme('select', $select));
+      $output = preg_replace($match, $replace, theme('select', array('element' => $select)));
   }
 
   print $output;
@@ -1632,7 +1642,9 @@
  *
  * @ingroup themeable
  */
-function theme_uc_pane_sort_table($form) {
+function theme_uc_pane_sort_table($variables) {
+  $form = $variables['form'];
+
   $prefix = $form['#pane_prefix'];
   if (isset($form['#table_attributes']) && is_array($form['#table_attributes'])) {
     $attributes = $form['#table_attributes'];
@@ -1654,7 +1666,7 @@
     );
   }
 
-  return theme('table', $header, $rows, $attributes) .'<br />';
+  return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)) .'<br />';
 }
 
 /**
@@ -1962,7 +1974,7 @@
     foreach ($crypt->errors as $message) {
       $items[] = $message;
     }
-    watchdog('encryption', 'Encryption failed. !messages', array('!messages' => theme('item_list', $items)), WATCHDOG_ERROR);
+    watchdog('encryption', 'Encryption failed. !messages', array('!messages' => theme('item_list', array('items' => $items))), WATCHDOG_ERROR);
   }
 }
 

=== modified file 'uc_tax_report/uc_tax_report.module'
--- uc_tax_report/uc_tax_report.module	2010-02-02 18:30:52 +0000
+++ uc_tax_report/uc_tax_report.module	2010-02-03 20:37:44 +0000
@@ -170,7 +170,7 @@
 
   // Build the page output holding the form, table, and CSV export link.
   $output = drupal_get_form('uc_tax_report_params_form', $args, $args['status']);
-  $output .= theme('table', $header, $rows, array('width' => '100%', 'class' => 'uc-sales-table'));
+  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('width' => '100%', 'class' => array('uc-sales-table'))));
   if ($star_legend) {
     $output .= '<div class="uc-reports-note"><p>' . $star_legend . '</p></div>';
   }

=== modified file 'uc_taxes/uc_taxes.admin.inc'
--- uc_taxes/uc_taxes.admin.inc	2009-07-21 14:29:21 +0000
+++ uc_taxes/uc_taxes.admin.inc	2010-02-02 22:06:46 +0000
@@ -42,7 +42,7 @@
   }
 
   // Build the output including the table and a link to add a new rate.
-  $output = theme('table', $header, $rows)
+  $output = theme('table', array('header' => $header, 'rows' => $rows))
           . l(t('Add a tax rate'), 'admin/store/settings/taxes/add');
 
   return $output;

