doing_action
Retrieve the name of an action currently being processed.
Description
doing_action( (null) $action = null );
Parameters (1)
- 0. $action — Optional. (null) =>
null
- Action to check. Defaults to null, which checks if any action is currently being run.
Usage
if ( !function_exists( 'doing_action' ) ) { require_once ABSPATH . WPINC . '/plugin.php'; } // Optional. Action to check. Defaults to null, which checks // if any action is currently being run. $action = null; // NOTICE! Understand what this does before running. $result = doing_action($action);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/plugin.php
- function doing_action( $action = null ) {
- return doing_filter( $action );
- }