close

Plugin Directory

source: simple-feature-requests/trunk/templates/loop/pagination.php

Last change on this file was 3418487, checked in by blobaugh, 3 months ago

v2.4.9

File size: 906 bytes
Line 
1<?php
2/**
3 * The template for displaying pagination.
4 *
5 * @var $sfr_requests WP_Query
6 */
7
8if ( ! defined( 'ABSPATH' ) ) {
9        return; // Return early if accessed directly
10}
11
12global $sfr_requests; ?>
13
14<nav class="sfr-pagination" aria-label="<?php esc_attr_e( 'Feature requests pagination', 'simple-feature-requests' ); ?>">
15        <?php
16        if ( $sfr_requests->max_num_pages > 1 ) {
17                echo paginate_links( sfr_apply_filters( 'sfr_pagination_args', array(
18                        'base'      => esc_url_raw( sprintf( '%s%%_%%', SFR_Post_Types::get_archive_url() ) ),
19                        'add_args'  => isset( $add_args ) ? $add_args : false,
20                        'current'   => isset( $sfr_requests->query_vars['paged'] ) ? $sfr_requests->query_vars['paged'] : 1,
21                        'total'     => $sfr_requests->max_num_pages,
22                        'prev_text' => '&larr;',
23                        'next_text' => '&rarr;',
24                        'type'      => 'list',
25                        'end_size'  => 3,
26                        'mid_size'  => 3,
27                ), $sfr_requests ) );
28        }
29        ?>
30</nav>
Note: See TracBrowser for help on using the repository browser.