Making WordPress.org


Ignore:
Timestamp:
08/22/2017 01:16:08 PM (7 years ago)
Author:
danielbachhuber
Message:

phpunit-test-reporter: Use a custom query parameter for result pagination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-display.php

    r5826 r5831  
    9595            'order'            => 'DESC',
    9696        );
    97         $paged = get_query_var( 'paged' );
     97        $paged = isset( $_GET['rpage'] ) ? (int) $_GET['rpage'] : 0;
    9898        if ( $paged ) {
    9999            $query_args['paged'] = $paged;
     
    232232
    233233    private static function pagination( $query ) {
     234        global $wp;
    234235        $bignum = 999999999;
    235         $base_link = str_replace( $bignum, '%#%', esc_url( get_pagenum_link( $bignum ) ) );
     236        $base_link = add_query_arg( 'rpage', '%#%', home_url( trailingslashit( $wp->request ) ) );
    236237        $max_num_pages = $query->max_num_pages;
    237238        $current_page = max( 1, $query->get( 'paged' ) );
Note: See TracChangeset for help on using the changeset viewer.