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/dashboard.php

    r38028 r38334  
    967967function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
    968968    $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';
    969     $doing_ajax = ( defined('DOING_AJAX') && DOING_AJAX );
     969    $doing_ajax = wp_doing_ajax();
    970970
    971971    if ( empty($check_urls) ) {
Note: See TracChangeset for help on using the changeset viewer.