Edit File by line
/home/barbar84/public_h.../wp-admin
File: admin-post.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WordPress Generic Request (POST/GET) Handler
[2] Fix | Delete
*
[3] Fix | Delete
* Intended for form submission handling in themes and plugins.
[4] Fix | Delete
*
[5] Fix | Delete
* @package WordPress
[6] Fix | Delete
* @subpackage Administration
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
/** We are located in WordPress Administration Screens */
[10] Fix | Delete
if ( ! defined( 'WP_ADMIN' ) ) {
[11] Fix | Delete
define( 'WP_ADMIN', true );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
if ( defined( 'ABSPATH' ) ) {
[15] Fix | Delete
require_once ABSPATH . 'wp-load.php';
[16] Fix | Delete
} else {
[17] Fix | Delete
require_once dirname( __DIR__ ) . '/wp-load.php';
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
/** Allow for cross-domain requests (from the front end). */
[21] Fix | Delete
send_origin_headers();
[22] Fix | Delete
[23] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/admin.php';
[24] Fix | Delete
[25] Fix | Delete
nocache_headers();
[26] Fix | Delete
[27] Fix | Delete
/** This action is documented in wp-admin/admin.php */
[28] Fix | Delete
do_action( 'admin_init' );
[29] Fix | Delete
[30] Fix | Delete
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
[31] Fix | Delete
[32] Fix | Delete
if ( ! is_user_logged_in() ) {
[33] Fix | Delete
if ( empty( $action ) ) {
[34] Fix | Delete
/**
[35] Fix | Delete
* Fires on a non-authenticated admin post request where no action is supplied.
[36] Fix | Delete
*
[37] Fix | Delete
* @since 2.6.0
[38] Fix | Delete
*/
[39] Fix | Delete
do_action( 'admin_post_nopriv' );
[40] Fix | Delete
} else {
[41] Fix | Delete
/**
[42] Fix | Delete
* Fires on a non-authenticated admin post request for the given action.
[43] Fix | Delete
*
[44] Fix | Delete
* The dynamic portion of the hook name, `$action`, refers to the given
[45] Fix | Delete
* request action.
[46] Fix | Delete
*
[47] Fix | Delete
* @since 2.6.0
[48] Fix | Delete
*/
[49] Fix | Delete
do_action( "admin_post_nopriv_{$action}" );
[50] Fix | Delete
}
[51] Fix | Delete
} else {
[52] Fix | Delete
if ( empty( $action ) ) {
[53] Fix | Delete
/**
[54] Fix | Delete
* Fires on an authenticated admin post request where no action is supplied.
[55] Fix | Delete
*
[56] Fix | Delete
* @since 2.6.0
[57] Fix | Delete
*/
[58] Fix | Delete
do_action( 'admin_post' );
[59] Fix | Delete
} else {
[60] Fix | Delete
/**
[61] Fix | Delete
* Fires on an authenticated admin post request for the given action.
[62] Fix | Delete
*
[63] Fix | Delete
* The dynamic portion of the hook name, `$action`, refers to the given
[64] Fix | Delete
* request action.
[65] Fix | Delete
*
[66] Fix | Delete
* @since 2.6.0
[67] Fix | Delete
*/
[68] Fix | Delete
do_action( "admin_post_{$action}" );
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function