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

  1. if ( !function_exists( 'doing_action' ) ) { 
  2. require_once ABSPATH . WPINC . '/plugin.php'; 
  3.  
  4. // Optional. Action to check. Defaults to null, which checks 
  5. // if any action is currently being run. 
  6. $action = null; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = doing_action($action); 
  10.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/plugin.php  
  1. function doing_action( $action = null ) { 
  2. return doing_filter( $action );