WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/23/2016 02:32:18 PM (5 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r38146 r38334  
    285285
    286286        // Redirect if page number is invalid and headers are not already sent.
    287         if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
     287        if ( ! headers_sent() && ! wp_doing_ajax() && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
    288288            wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
    289289            exit;
Note: See TracChangeset for help on using the changeset viewer.