426publicfunctiondoing_ajax($action=null){427if(!wp_doing_ajax()){428returnfalse;429}430431if(!$action){432returntrue;433}else{434/*435 * Note: we can't just use doing_action( "wp_ajax_{$action}" ) because we need436 * to check before admin-ajax.php gets to that point.437 */438returnisset($_REQUEST['action'])&&wp_unslash($_REQUEST['action'])===$action;439}440}
History
Introduced in 3.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.2.0
Added $action param.from the docblock
3.4.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/class-wp-customize-manager.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.