WordPress.org

Making WordPress.org

Changeset 6386


Ignore:
Timestamp:
01/16/2018 06:55:54 PM (4 years ago)
Author:
danielbachhuber
Message:

phpunit-test-reporter: Permit larger result sets to make inspection easier

See https://github.com/WordPress/phpunit-test-reporter/pull/53

File:
1 edited

Legend:

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

    r6262 r6386  
    103103            $query_args['paged'] = $paged;
    104104        }
     105        if ( isset( $_GET['rper_page'] ) ) {
     106            $per_page = (int) $_GET['rper_page'];
     107            if ( $per_page > 1 && $per_page <= 40 ) {
     108                $query_args['posts_per_page'] = $per_page;
     109            }
     110        }
    105111        $rev_query = new WP_Query( $query_args );
    106112        if ( empty( $rev_query->posts ) ) {
     
    239245    private static function pagination( $query ) {
    240246        global $wp;
    241         $bignum          = 999999999;
    242         $base_link       = add_query_arg( 'rpage', '%#%', home_url( trailingslashit( $wp->request ) ) );
     247        $bignum    = 999999999;
     248        $base_link = home_url( trailingslashit( $wp->request ) );
     249        if ( isset( $_GET['rper_page'] ) ) {
     250            $base_link = add_query_arg( 'rper_page', (int) $_GET['rper_page'], $base_link );
     251        }
     252        $base_link       = add_query_arg( 'rpage', '%#%', $base_link );
    243253        $max_num_pages   = $query->max_num_pages;
    244254        $current_page    = max( 1, $query->get( 'paged' ) );
Note: See TracChangeset for help on using the changeset viewer.