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

git-svn-id: https://develop.svn.wordpress.org/trunk@17274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2011-01-13 00:03:38 +00:00
parent fabe2d6fdc
commit b6cd198d8e
5 changed files with 34 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ if ( !current_user_can('activate_plugins') )
wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
$wp_list_table = get_list_table('WP_Plugins_List_Table');
$pagenum = $wp_list_table->get_pagenum();
$action = $wp_list_table->current_action();
@@ -315,6 +316,12 @@ if ( $action ) {
$wp_list_table->prepare_items();
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
if ( $pagenum > $total_pages && $total_pages > 0 ) {
wp_redirect( add_query_arg( 'paged', $total_pages ) );
exit;
}
wp_enqueue_script('plugin-install');
add_thickbox();