function theme_tablesort_indicator

7.x theme.inc theme_tablesort_indicator($variables)
5.x theme.inc theme_tablesort_indicator($style)
6.x theme.inc theme_tablesort_indicator($style)

Returns HTML for a sort icon.

Parameters

$variables: An associative array containing:

  • style: Set to either 'asc' or 'desc', this determines which icon to show.

Related topics

1 theme call to theme_tablesort_indicator()
tablesort_header in drupal/includes/tablesort.inc
Formats a column header.
2 string references to the theme hook from theme_tablesort_indicator()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

drupal_common_theme in drupal/includes/common.inc
Provides theme registration for themes across .inc files.
tablesort_header in drupal/includes/tablesort.inc
Formats a column header.

File

drupal/includes/theme.inc, line 2129
The theme system, which controls the output of Drupal.

Code

function theme_tablesort_indicator($variables) {
  if ($variables['style'] == "asc") {
    return theme('image', array('path' => 'misc/arrow-asc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
  }
  else {
    return theme('image', array('path' => 'misc/arrow-desc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort descending'), 'title' => t('sort descending')));
  }
}