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



did_filter › WordPress Function

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

Retrieves the number of times a filter has been applied during the current request.



Source

function did_filter( $hook_name ) {
	global $wp_filters;

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

	return $wp_filters[ $hook_name ];
}