diff --git wp-admin/edit-comments.php wp-admin/edit-comments.php
index 561349f..f9b550a 100644
|
|
|
if ( $doaction ) { |
| 101 | 101 | |
| 102 | 102 | $wp_list_table->prepare_items(); |
| 103 | 103 | |
| 104 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 105 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 106 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 107 | | exit; |
| 108 | | } |
| 109 | | |
| 110 | 104 | wp_enqueue_script('admin-comments'); |
| 111 | 105 | enqueue_comment_hotkeys_js(); |
| 112 | 106 | |
diff --git wp-admin/edit.php wp-admin/edit.php
index 2fb8679..458e5ee 100644
|
|
|
if ( 'post' != $post_type ) { |
| 142 | 142 | |
| 143 | 143 | $wp_list_table->prepare_items(); |
| 144 | 144 | |
| 145 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 146 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 147 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 148 | | exit; |
| 149 | | } |
| 150 | | |
| 151 | 145 | wp_enqueue_script('inline-edit-post'); |
| 152 | 146 | |
| 153 | 147 | $title = $post_type_object->labels->name; |
diff --git wp-admin/includes/class-wp-list-table.php wp-admin/includes/class-wp-list-table.php
index fd4cf8d..12c4d04 100644
|
|
|
class WP_List_Table { |
| 138 | 138 | if ( !$args['total_pages'] && $args['per_page'] > 0 ) |
| 139 | 139 | $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] ); |
| 140 | 140 | |
| | 141 | if ( ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) { |
| | 142 | wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) ); |
| | 143 | exit; |
| | 144 | } |
| | 145 | |
| 141 | 146 | $this->_pagination_args = $args; |
| 142 | 147 | } |
| 143 | 148 | |
diff --git wp-admin/network/sites.php wp-admin/network/sites.php
index ec4ce56..e6c0333 100644
|
|
|
if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( |
| 88 | 88 | |
| 89 | 89 | $wp_list_table->prepare_items(); |
| 90 | 90 | |
| 91 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 92 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 93 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 94 | | exit; |
| 95 | | } |
| 96 | | |
| 97 | 91 | require_once( '../admin-header.php' ); |
| 98 | 92 | ?> |
| 99 | 93 | |
diff --git wp-admin/network/themes.php wp-admin/network/themes.php
index ed23b41..3e042b5 100644
|
|
|
if ( $action ) { |
| 171 | 171 | |
| 172 | 172 | $wp_list_table->prepare_items(); |
| 173 | 173 | |
| 174 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 175 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 176 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 177 | | exit; |
| 178 | | } |
| 179 | | |
| 180 | 174 | add_thickbox(); |
| 181 | 175 | |
| 182 | 176 | add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) ); |
diff --git wp-admin/plugin-install.php wp-admin/plugin-install.php
index 2754025..2bed8ac 100644
|
|
|
if ( is_multisite() && ! is_network_admin() ) { |
| 23 | 23 | $wp_list_table = get_list_table('WP_Plugin_Install_List_Table'); |
| 24 | 24 | $pagenum = $wp_list_table->get_pagenum(); |
| 25 | 25 | $wp_list_table->prepare_items(); |
| 26 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 27 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 28 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 29 | | exit; |
| 30 | | } |
| 31 | 26 | |
| 32 | 27 | $title = __('Install Plugins'); |
| 33 | 28 | $parent_file = 'plugins.php'; |
diff --git wp-admin/plugins.php wp-admin/plugins.php
index 2f8b085..9baedc0 100644
|
|
|
if ( $action ) { |
| 316 | 316 | |
| 317 | 317 | $wp_list_table->prepare_items(); |
| 318 | 318 | |
| 319 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 320 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 321 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 322 | | exit; |
| 323 | | } |
| 324 | | |
| 325 | 319 | wp_enqueue_script('plugin-install'); |
| 326 | 320 | add_thickbox(); |
| 327 | 321 | |
diff --git wp-admin/theme-install.php wp-admin/theme-install.php
index be0a470..ca95eb8 100644
|
|
|
if ( is_multisite() && ! is_network_admin() ) { |
| 23 | 23 | $wp_list_table = get_list_table('WP_Theme_Install_List_Table'); |
| 24 | 24 | $pagenum = $wp_list_table->get_pagenum(); |
| 25 | 25 | $wp_list_table->prepare_items(); |
| 26 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 27 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 28 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 29 | | exit; |
| 30 | | } |
| 31 | 26 | |
| 32 | 27 | $title = __('Install Themes'); |
| 33 | 28 | $parent_file = 'themes.php'; |
diff --git wp-admin/upload.php wp-admin/upload.php
index ed1665b..ad47fa2 100644
|
|
|
if ( $doaction ) { |
| 132 | 132 | |
| 133 | 133 | $wp_list_table->prepare_items(); |
| 134 | 134 | |
| 135 | | $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); |
| 136 | | if ( $pagenum > $total_pages && $total_pages > 0 ) { |
| 137 | | wp_redirect( add_query_arg( 'paged', $total_pages ) ); |
| 138 | | exit; |
| 139 | | } |
| 140 | | |
| 141 | 135 | $title = __('Media Library'); |
| 142 | 136 | $parent_file = 'upload.php'; |
| 143 | 137 | |