WordPress/wp-admin/admin-post.php
Andrew Nacin d5c4413aaa send_origin_headers() in admin-post.php.
props nickdaugherty, fixes #24600.


Built from https://develop.svn.wordpress.org/trunk@25036


git-svn-id: http://core.svn.wordpress.org/trunk@25023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-16 19:59:08 +00:00

35 lines
674 B
PHP

<?php
/**
* WordPress Administration Generic POST Handler.
*
* @package WordPress
* @subpackage Administration
*/
/** We are located in WordPress Administration Screens */
define('WP_ADMIN', true);
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
else
require_once('../wp-load.php');
/** Allow for cross-domain requests (from the frontend). */
send_origin_headers();
require_once(ABSPATH . 'wp-admin/includes/admin.php');
nocache_headers();
do_action('admin_init');
$action = 'admin_post';
if ( !wp_validate_auth_cookie() )
$action .= '_nopriv';
if ( !empty($_REQUEST['action']) )
$action .= '_' . $_REQUEST['action'];
do_action($action);