Ticket #51463: pre-ajax-action.patch
File pre-ajax-action.patch, 684 bytes (added by , 4 years ago) |
---|
-
wp-admin/admin-ajax.php
159 159 160 160 $action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : ''; 161 161 162 /** 163 * Fires before all AJAX actions - including ones that are not hooked and will not ultimately get fired. 164 * 165 * @since 5.6.0 166 * 167 * @param string $action The name of the invoked Ajax action callback. 168 */ 169 do_action( "pre_wp_ajax" , $action ); 170 162 171 if ( is_user_logged_in() ) { 163 172 // If no action is registered, return a Bad Request response. 164 173 if ( ! has_action( "wp_ajax_{$action}" ) ) {