mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-17 07:10:27 +00:00
AJAX: add a new function, wp_doing_ajax(), which can replace... (wait for it...) DOING_AJAX checks via the constant.
Props Mte90, sebastian.pisula, swissspidy. Fixes #25669. git-svn-id: https://develop.svn.wordpress.org/trunk@38334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -284,7 +284,7 @@ class WP_List_Table {
|
||||
$args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
|
||||
|
||||
// Redirect if page number is invalid and headers are not already sent.
|
||||
if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
||||
if ( ! headers_sent() && ! wp_doing_ajax() && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
||||
wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user