Make WordPress Core


Ignore:
Timestamp:
01/13/2011 12:03:38 AM (14 years ago)
Author:
markjaquith
Message:

Add "paged param is greater than total pages" redirects to a few more screens. props greuben. fixes #16187

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugin-install.php

    r16990 r17274  
    2222
    2323$wp_list_table = get_list_table('WP_Plugin_Install_List_Table');
     24$pagenum = $wp_list_table->get_pagenum();
    2425$wp_list_table->prepare_items();
     26$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
     27if ( $pagenum > $total_pages && $total_pages > 0 ) {
     28    wp_redirect( add_query_arg( 'paged', $total_pages ) );
     29    exit;
     30}
    2531
    2632$title = __('Install Plugins');
Note: See TracChangeset for help on using the changeset viewer.