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
This commit is contained in:
parent
9d9eb25e2a
commit
6e4505e857
@ -16,13 +16,16 @@
|
|||||||
define( 'DOING_AJAX', true );
|
define( 'DOING_AJAX', true );
|
||||||
define( 'WP_ADMIN', 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
|
// Require an action parameter
|
||||||
if ( empty( $_REQUEST['action'] ) )
|
if ( empty( $_REQUEST['action'] ) )
|
||||||
die( '0' );
|
die( '0' );
|
||||||
|
|
||||||
/** Load WordPress Bootstrap */
|
|
||||||
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
|
|
||||||
|
|
||||||
/** Load WordPress Administration APIs */
|
/** Load WordPress Administration APIs */
|
||||||
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
|
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user