Ticket #22446: 22446-download-ajax.diff
File 22446-download-ajax.diff, 747 bytes (added by , 12 years ago) |
---|
-
wp-includes/functions.php
2273 2273 * @param mixed $response Variable (usually an array or object) to encode as JSON, then print and die. 2274 2274 */ 2275 2275 function wp_send_json( $response ) { 2276 @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) ); 2276 if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false ) 2277 @header( 'Content-Type: text/html;' ); 2278 else 2279 @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) ); 2280 2277 2281 echo json_encode( $response ); 2278 2282 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) 2279 2283 wp_die();