wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



did_action › WordPress Function

Depuis2.1.0
Dépréciéen/a
did_action ( $hook_name )
Paramètres:
  • (string) $hook_name The name of the action hook.
    Requis: Oui
Retourne:
  • (int) The number of times the action hook has been fired.
Défini(e) dans:
Codex:

Retrieves the number of times an action has been fired during the current request.



Source

function did_action( $hook_name ) {
	global $wp_actions;

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

	return $wp_actions[ $hook_name ];
}