Uma área de pesquisa sobre o WordPress para devs e autores do tema



did_action ›

Desde2.1.0
Obsoleton/a
did_action ( $tag )
Parâmetros:
  • (string) $tag The name of the action hook.
    Required: Yes
Retorna:
  • (int) The number of times action hook $tag is fired.
Definido em:
Codex:

Retrieve the number of times an action is fired.



Fonte

function did_action( $tag ) {
	global $wp_actions;

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

	return $wp_actions[ $tag ];
}