Exemplo n.º 1
0
function showPagination($args = array())
{
    $args = array_merge(array('offset' => 0, 'id' => 'nav_pages', 'class' => 'nav_pages'), is_array($args) ? $args : (is_int($args) ? array('offset' => $args) : array('id' => $args, 'class' => $args)));
    // If send string parameter - use it as 'id' and 'class' name
    global $wp_query;
    echo "<div id=\"{$args['id']}\" class=\"{$args['class']}\">";
    if (function_exists('themerex_wp_pagenavi') && !is_single()) {
        echo themerex_wp_pagenavi(array('always_show' => 0, 'style' => 1, 'num_pages' => 5, 'num_larger_page_numbers' => 3, 'larger_page_numbers_multiple' => 10, 'pages_text' => __('Page %CURRENT_PAGE% of %TOTAL_PAGES%', 'themerex'), 'current_text' => "%PAGE_NUMBER%", 'page_text' => "%PAGE_NUMBER%", 'first_text' => __('&laquo; First', 'themerex'), 'last_text' => __("Last &raquo;", 'themerex'), 'next_text' => "&raquo;", 'prev_text' => "&laquo;", 'dotright_text' => '', 'dotleft_text' => '', 'before' => '', 'after' => '', 'offset' => $args['offset']));
    } else {
        showSinglePageNav('nav-below');
    }
    echo "</div>";
}
Exemplo n.º 2
0
 function showPagination($args = array())
 {
     $args = array_merge(array('offset' => 0, 'id' => 'pagination', 'class' => 'pagination', 'button_class' => '', 'style' => 'pages', 'show_pages' => 5, 'pages_in_group' => 10, 'pages_text' => '', 'current_text' => "%PAGE_NUMBER%", 'page_text' => "%PAGE_NUMBER%", 'first_text' => __('&laquo; First', 'themerex'), 'last_text' => __("Last &raquo;", 'themerex'), 'prev_text' => __("&laquo;", 'themerex'), 'next_text' => __("&raquo;", 'themerex'), 'dot_text' => "&hellip;", 'before' => '', 'after' => ''), is_array($args) ? $args : (is_int($args) ? array('offset' => $args) : array('id' => $args, 'class' => $args)));
     // If send string parameter - use it as 'id' and 'class' name
     if (empty($args['before'])) {
         $args['before'] = "<div id=\"{$args['id']}\" class=\"{$args['class']}\">";
     }
     if (empty($args['after'])) {
         $args['after'] = "</div>";
     }
     if (!is_single()) {
         showBlogPageNav($args);
     } else {
         showSinglePageNav($args);
     }
 }