]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-ajax-response.php
WordPress 4.7.2-scripts
[autoinstalls/wordpress.git] / wp-includes / class-wp-ajax-response.php
index ee2901f971157a2223e11ebffe2ca9c37594eb4e..a86d8dd532a47dff2788f9cce947f1da7509950b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Send XML response back to AJAX request.
+ * Send XML response back to Ajax request.
  *
  * @package WordPress
  * @since 2.1.0
@@ -15,7 +15,7 @@ class WP_Ajax_Response {
        public $responses = array();
 
        /**
-        * Constructor - Passes args to {@link WP_Ajax_Response::add()}.
+        * Constructor - Passes args to WP_Ajax_Response::add().
         *
         * @since 2.1.0
         * @see WP_Ajax_Response::add()
@@ -149,7 +149,7 @@ class WP_Ajax_Response {
                foreach ( (array) $this->responses as $response )
                        echo $response;
                echo '</wp_ajax>';
-               if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
+               if ( wp_doing_ajax() )
                        wp_die();
                else
                        die();