Make WordPress Core


Ignore:
Timestamp:
08/23/2016 02:32:18 PM (8 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-includes/class-wp-customize-manager.php

    r38299 r38334  
    316316     */
    317317    public function doing_ajax( $action = null ) {
    318         $doing_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
    319         if ( ! $doing_ajax ) {
     318        if ( ! wp_doing_ajax() ) {
    320319            return false;
    321320        }
Note: See TracChangeset for help on using the changeset viewer.