CoreFiles by mySites.guru
admin-post.php45 lines, 1,045 bytes, from wordpress-3.7.33.zip
Raw History Compare with 3.7.32
md5
bf1e28687e173632da8193bb120a2dd6
sha1
1362777a8e9916ecb03484e8a72a2db80e60a428
sha256
e018b7570cce6978141220633bb5ecdb50b1b5604608523a428acb18b6aa2d2c
<?php
/**
 * WordPress Generic Request (POST/GET) Handler
 *
 * Intended for form submission handling in themes and plugins.
 *
 * @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( 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();

/** This action is documented in wp-admin/admin.php */
do_action( 'admin_init' );

$action = 'admin_post';

if ( !wp_validate_auth_cookie() )
	$action .= '_nopriv';

if ( !empty($_REQUEST['action']) )
	$action .= '_' . $_REQUEST['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 );

The same content is in 135 releases, WordPress 3.7-RC2 to 3.9.40. See them all, or every version of this file.