function theme_tablesort_indicator

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

2 theme calls to theme_tablesort_indicator()
tablesort_header in drupal/core/includes/tablesort.inc
Formats a column header.
template_preprocess_views_view_table in drupal/core/modules/views/views.theme.inc
Prepares variables for views table templates.

File

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

Code

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