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 /themes/seven/template.php | |
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 'themes/seven/template.php')
-rw-r--r-- | themes/seven/template.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/themes/seven/template.php b/themes/seven/template.php index 6f40681ff..1065b44cf 100644 --- a/themes/seven/template.php +++ b/themes/seven/template.php @@ -15,7 +15,8 @@ function seven_preprocess_page(&$vars) { /** * Display the list of available node types for node creation. */ -function seven_node_add_list($content) { +function seven_node_add_list($variables) { + $content = $variables['content']; $output = ''; if ($content) { $output = '<ul class="node-type-list">'; @@ -35,7 +36,8 @@ function seven_node_add_list($content) { * * Use unordered list markup in both compact and extended move. */ -function seven_admin_block_content($content) { +function seven_admin_block_content($variables) { + $content = $variables['content']; $output = ''; if (!empty($content)) { $output = system_admin_compact_mode() ? '<ul class="admin-list compact">' : '<ul class="admin-list">'; @@ -57,13 +59,14 @@ function seven_admin_block_content($content) { * * Use our own image versions, so they show up as black and not gray on gray. */ -function seven_tablesort_indicator($style) { +function seven_tablesort_indicator($variables) { + $style = $variables['style']; $theme_path = drupal_get_path('theme', 'seven'); if ($style == "asc") { - return theme('image', $theme_path . '/images/arrow-asc.png', t('sort icon'), t('sort ascending')); + return theme('image', array('path' => $theme_path . '/images/arrow-asc.png', 'alt' => t('sort icon'), 'title' => t('sort ascending'))); } else { - return theme('image', $theme_path . '/images/arrow-desc.png', t('sort icon'), t('sort descending')); + return theme('image', array('path' => $theme_path . '/images/arrow-desc.png', 'alt' => t('sort icon'), 'title' => t('sort descending'))); } } @@ -72,7 +75,8 @@ function seven_tablesort_indicator($style) { * * Add span to legend tag, so we can style it to be inside the fieldset. */ -function seven_fieldset($element) { +function seven_fieldset($variables) { + $element = $variables['element']; if (!empty($element['#collapsible'])) { drupal_add_js('misc/collapse.js'); |