Archived
Updates bonanza
This commit is contained in:
1 parent
d26191c9f8
commit
9d480fc3c5
1366 files changed
+220321
-90180
No files matched your search
+18
-4
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* WordPress Administration Generic POST Handler.
|
||||
* WordPress Generic Request (POST/GET) Handler
|
||||
*
|
||||
* Intended for form submission handling in themes and plugins.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
@@ -12,13 +14,17 @@ define('WP_ADMIN', true);
|
||||
if ( defined('ABSPATH') )
|
||||
require_once(ABSPATH . 'wp-load.php');
|
||||
else
|
||||
require_once('../wp-load.php');
|
||||
require_once( dirname( dirname( __FILE__ ) ) . '/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');
|
||||
/** This action is documented in wp-admin/admin.php */
|
||||
do_action( 'admin_init' );
|
||||
|
||||
$action = 'admin_post';
|
||||
|
||||
@@ -28,4 +34,12 @@ if ( !wp_validate_auth_cookie() )
|
||||
if ( !empty($_REQUEST['action']) )
|
||||
$action .= '_' . $_REQUEST['action'];
|
||||
|
||||
do_action($action);
|
||||
/**
|
||||
* Fires the requested handler action.
|
||||
*
|
||||
* admin_post_nopriv_{$_REQUEST['action']} is called for not-logged-in users.
|
||||
* admin_post_{$_REQUEST['action']} is called for logged-in users.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
do_action( $action );
|
||||
Reference in new issue
Block a user