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-terms-list-table.php

    r38077 r38334  
    368368        $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' );
    369369
    370         $uri = ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
     370        $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
    371371
    372372        $edit_link = add_query_arg(
     
    426426        $default_term = get_option( 'default_' . $taxonomy );
    427427
    428         $uri = ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
     428        $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
    429429
    430430        $edit_link = add_query_arg(
Note: See TracChangeset for help on using the changeset viewer.