did_action( string $hook_name )
Retrieves the number of times an action has been fired during the current request.
Parameters
- $hook_name
-
(Required) The name of the action hook.
Return
(int) The number of times the action hook has been fired.
Source
File: wp-includes/plugin.php
function did_action($tag) {
global $wp_actions;
if ( ! isset( $wp_actions[ $tag ] ) )
return 0;
return $wp_actions[$tag];
}
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |