diff --git a/wp-includes/class-wp-ajax-response.php b/wp-includes/class-wp-ajax-response.php index 296c7bae1e..2bf974a265 100644 --- a/wp-includes/class-wp-ajax-response.php +++ b/wp-includes/class-wp-ajax-response.php @@ -131,6 +131,9 @@ class WP_Ajax_Response { foreach ( (array) $this->responses as $response ) echo $response; echo ''; - wp_die(); + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + wp_die(); + else + die(); } }