Make sure we are using the admin-ajax handler when we call wp_die() for WP_Ajax_Response. see #20024.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-02-12 19:02:07 +00:00
parent 51cdc1719d
commit 7caa93fd8f
1 changed files with 4 additions and 1 deletions

View File

@ -131,6 +131,9 @@ class WP_Ajax_Response {
foreach ( (array) $this->responses as $response )
echo $response;
echo '</wp_ajax>';
wp_die();
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
wp_die();
else
die();
}
}