WordPress at a glance

did_action() WP 1.0

Retrieve the number of times an action is fired.

  • Global. Array. $wp_actions Increments the amount of times action was triggered.
✈ 1 time = 0.000013s = very fast | 50000 times = 0.01s = speed of light PHP 7.0.5, WP 4.5.2

No Hooks.


Int. The number of times action hook $tag is fired.


did_action( $tag );
$tag(string) (required)
The name of the action hook.

Code of did_action: wp-includes/plugin.php VER 5.0

function did_action($tag) {
	global $wp_actions;

	if ( ! isset( $wp_actions[ $tag ] ) )
		return 0;

	return $wp_actions[$tag];

Related Functions

From tag: Actions (hooks)

More from category: Hooks (actions, filters)

No comments
    Hello, !     Log In . Register