Add get-attachment and query-attachments Ajax handlers. props koopersmith. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@21681 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-08-31 02:58:51 +00:00
parent c7ba96ddaa
commit 215be466c3
3 changed files with 46 additions and 3 deletions

View File

@@ -2151,7 +2151,7 @@ function _scalar_wp_die_handler( $message = '' ) {
*/
function wp_send_json( $response ) {
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
echo json_encode( $json );
echo json_encode( $response );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
wp_die();
else