From 566145f911ba1d4172fbcf5e2b1403c80f3c1867 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 25 Sep 2012 15:55:32 +0000 Subject: [PATCH] Call send_origin_headers() from admin-ajax.php. Props nacin. fixes #21024 git-svn-id: http://core.svn.wordpress.org/trunk@22001 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 394e5c33b0..cc1128a6f9 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -16,13 +16,16 @@ define( 'DOING_AJAX', true ); define( 'WP_ADMIN', true ); +/** Load WordPress Bootstrap */ +require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); + +/** Allow for cross-domain requests (from the frontend). */ +send_origin_headers(); + // Require an action parameter if ( empty( $_REQUEST['action'] ) ) die( '0' ); -/** Load WordPress Bootstrap */ -require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); - /** Load WordPress Administration APIs */ require_once( ABSPATH . 'wp-admin/includes/admin.php' );