diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-09 01:00:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-09 01:00:08 +0000 |
commit | c05f2181dc8556cb6700e8c6bb6e6ded43273192 (patch) | |
tree | 5446facb7f5f18dfaac48aade56c0d86f1477fff /modules/system/system.module | |
parent | 48dd14a898420ae98984c951f59e8d299080bee8 (diff) | |
download | brdo-c05f2181dc8556cb6700e8c6bb6e6ded43273192.tar.gz brdo-c05f2181dc8556cb6700e8c6bb6e6ded43273192.tar.bz2 |
- Patch #572618 by effulgentsia, pwolanin, sun: all theme functions should take a single argument. Code clean-up and performance improvement. Woot.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r-- | modules/system/system.module | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 4464e6c54..c3477faf7 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1465,10 +1465,10 @@ function system_preprocess_page(&$variables) { list($version, ) = explode('.', VERSION); // Emit the META tag in the HTML HEAD section - theme('meta_generator_html', $version); + theme('meta_generator_html', array('version' => $version)); // Emit the HTTP Header too - theme('meta_generator_header', $version); + theme('meta_generator_header', array('version' => $version)); $variables['head'] = drupal_get_html_head(); } @@ -1592,7 +1592,7 @@ function system_block_configure($delta = '') { $form['wrapper']['preview'] = array( '#type' => 'item', '#title' => 'Preview', - '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => array('powered-by-preview')), FALSE), + '#markup' => theme('image', array('path' => $image_path, 'alt' => t('Powered by Drupal, an open source content management system'), 'title' => t('Powered by Drupal, an open source content management system'), 'attributes' => array('class' => array('powered-by-preview')), 'getsize' => FALSE)), ); return $form; } @@ -1625,7 +1625,7 @@ function system_block_view($delta = '') { case 'powered-by': $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png'; $block['subject'] = NULL; - $block['content'] = theme('system_powered_by', $image_path); + $block['content'] = theme('system_powered_by', array('image_path' => $image_path)); return $block; case 'help': $block['subject'] = NULL; @@ -2691,8 +2691,8 @@ function system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_t * * @ingroup themeable */ -function theme_system_powered_by($image_path) { - $image = theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system')); +function theme_system_powered_by($variables) { + $image = theme('image', array('path' => $variables['image_path'], 'alt' => t('Powered by Drupal, an open source content management system'), 'title' => t('Powered by Drupal, an open source content management system'))); return l($image, 'http://drupal.org', array('html' => TRUE, 'absolute' => TRUE, 'external' => TRUE)); } @@ -2719,8 +2719,8 @@ function theme_system_compact_link() { * * @ingroup themeable */ -function theme_meta_generator_html($version = VERSION) { - drupal_add_html_head('<meta name="Generator" content="Drupal ' . $version . ' (http://drupal.org)" />'); +function theme_meta_generator_html($variables) { + drupal_add_html_head('<meta name="Generator" content="Drupal ' . $variables['version'] . ' (http://drupal.org)" />'); } /** @@ -2728,8 +2728,8 @@ function theme_meta_generator_html($version = VERSION) { * * @ingroup themeable */ -function theme_meta_generator_header($version = VERSION) { - drupal_add_http_header('X-Generator', 'Drupal ' . $version . ' (http://drupal.org)'); +function theme_meta_generator_header($variables) { + drupal_add_http_header('X-Generator', 'Drupal ' . $variables['version'] . ' (http://drupal.org)'); } /** @@ -2798,7 +2798,7 @@ function system_page_build(&$page) { ), ), // Trigger cron run for clients not supporting JavaScript (fall-back). - '#markup' => theme('system_run_cron_image', 'system/run-cron-image'), + '#markup' => theme('system_run_cron_image', array('image_path' => 'system/run-cron-image')), ); } @@ -2893,7 +2893,7 @@ function system_run_cron_image_access() { * @see system_run_cron_image() * @ingroup themeable */ -function theme_system_run_cron_image($image_path) { - return '<noscript><div id="system-cron-image">' . theme('image', $image_path, '', '', array(), FALSE) . '</div></noscript>'; +function theme_system_run_cron_image($variables) { + return '<noscript><div id="system-cron-image">' . theme('image', array('path' => $variables['image_path'], 'getsize' => FALSE)) . '</div></noscript>'; } |