From 6e4505e8574a8e479800c0af091583c969e48333 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: https://develop.svn.wordpress.org/trunk@22001 602fd350-edb4-49c9-b593-d223f7449a82 --- 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' );