did_action

Definition:
function did_action($tag) {}

Retrieve the number of times an action is fired.

Parameters

  • string $tag: The name of the action hook.

Return values

returns:The number of times action hook <tt>$tag</tt> is fired

Source code

function did_action($tag) {

	global $wp_actions;



	if ( ! isset( $wp_actions ) || ! isset( $wp_actions[$tag] ) )

		return 0;



	return $wp_actions[$tag];

}

828

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: