did_action

The WordPress Core did action function.

Description

did_action(); 

Usage

  1. if ( !function_exists( 'did_action' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/noop.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = did_action(); 
  7.  

Defined (2)

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

/wp-admin/includes/noop.php  
  1. function did_action() {} 
/wp-includes/plugin.php  
  1. function did_action($tag) { 
  2. global $wp_actions; 
  3.  
  4. if ( ! isset( $wp_actions[ $tag ] ) ) 
  5. return 0; 
  6.  
  7. return $wp_actions[$tag];