Generic POST handler. see #7283
git-svn-id: http://svn.automattic.com/wordpress/trunk@8315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ae2545c47
commit
ecd98d1aff
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
define('WP_ADMIN', TRUE);
|
||||||
|
|
||||||
|
if ( defined('ABSPATH') )
|
||||||
|
require_once(ABSPATH . 'wp-load.php');
|
||||||
|
else
|
||||||
|
require_once('../wp-load.php');
|
||||||
|
|
||||||
|
require_once(ABSPATH . 'wp-admin/includes/admin.php');
|
||||||
|
|
||||||
|
if ( !wp_validate_auth_cookie() )
|
||||||
|
wp_die(__('Cheatin’ uh?'));
|
||||||
|
|
||||||
|
nocache_headers();
|
||||||
|
|
||||||
|
do_action('admin_init');
|
||||||
|
|
||||||
|
$action = 'admin_post';
|
||||||
|
if ( !empty($_REQUEST['action']) )
|
||||||
|
$action .= '_' . $_REQUEST['action'];
|
||||||
|
|
||||||
|
do_action($action);
|
||||||
|
|
||||||
|
?>
|
|
@ -113,4 +113,7 @@ if (isset($plugin_page)) {
|
||||||
do_action("load-$pagenow");
|
do_action("load-$pagenow");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !empty($_REQUEST['action']) )
|
||||||
|
do_action('admin_action_' . $_REQUEST['action']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue