diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index e3f2560..c6a8b39 100644
--- src/wp-includes/functions.php
+++ src/wp-includes/functions.php
@@ -2875,7 +2875,7 @@ function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
 	);
 	$r = wp_parse_args( $args, $defaults );
 
-	if ( ! headers_sent() ) {
+	if ( ! headers_sent() && ( 0 === ob_get_level() || 0 === ob_get_length() ) ) {
 		status_header( $r['response'] );
 	}
 	if ( is_scalar( $message ) )
@@ -3100,9 +3100,11 @@ function _wp_json_prepare_data( $data ) {
  *                           then print and die.
  * @param int   $status_code The HTTP status code to output.
  */
-function wp_send_json( $response, $status_code = 200 ) {
+function wp_send_json( $response, $status_code = null ) {
 	@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
-	status_header( $status_code );
+	if ( null !== $status_code ) {
+		status_header( $status_code );
+	}
 	echo wp_json_encode( $response );
 	if ( wp_doing_ajax() )
 		wp_die();
@@ -3119,7 +3121,7 @@ function wp_send_json( $response, $status_code = 200 ) {
  * @param mixed $data        Data to encode as JSON, then print and die.
  * @param int   $status_code The HTTP status code to output.
  */
-function wp_send_json_success( $data = null, $status_code = 200 ) {
+function wp_send_json_success( $data = null, $status_code = null ) {
 	$response = array( 'success' => true );
 
 	if ( isset( $data ) )
@@ -3143,7 +3145,7 @@ function wp_send_json_success( $data = null, $status_code = 200 ) {
  * @param mixed $data        Data to encode as JSON, then print and die.
  * @param int   $status_code The HTTP status code to output.
  */
-function wp_send_json_error( $data = null, $status_code = 200 ) {
+function wp_send_json_error( $data = null, $status_code = null ) {
 	$response = array( 'success' => false );
 
 	if ( isset( $data ) ) {
