Centralize pagination bound exceeding redirects for list tables. props garyc40. props johnjamesjacoby. fixes #16208

git-svn-id: https://develop.svn.wordpress.org/trunk@17900 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2011-05-12 06:09:42 +00:00
parent c96930408d
commit 4f8b646e03
9 changed files with 6 additions and 46 deletions

View File

@@ -88,12 +88,6 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
$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;
}
require_once( '../admin-header.php' );
?>

View File

@@ -171,12 +171,6 @@ 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;
}
add_thickbox();
add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) );