You are here

function theme_pager_lite in Views Litepager 6.3

Same name and namespace in other branches
  1. 7.3 views_litepager.module \theme_pager_lite()

File

./views_litepager.module, line 31

Code

function theme_pager_lite($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9, $pager = NULL) {
  global $pager_page_array, $pager_total;

  // current is the page we are currently paged to
  $pager_current = $pager_page_array[$element] + 1;
  $li_previous = theme('pager_previous', isset($tags[1]) ? $tags[1] : t('‹‹'), $limit, $element, 1, $parameters);
  if (empty($li_previous)) {
    $li_previous = " ";
  }
  $li_next = theme('pager_lite_next', isset($tags[3]) ? $tags[3] : t('››'), $limit, $element, 1, $parameters);
  if (empty($li_next)) {
    $li_next = " ";
  }
  $items[] = array(
    'class' => 'pager-previous',
    'data' => $li_previous,
  );
  $items[] = array(
    'class' => 'pager-current',
    'data' => format_plural($pager_current, 'Page 1', 'Page @count'),
  );
  $items[] = array(
    'class' => 'pager-next',
    'data' => $li_next,
  );
  return theme('item_list', $items, NULL, 'ul', array(
    'class' => 'pager',
  ));
}