wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



did_filter › WordPress Function

Seit6.1.0
Veraltetn/v
did_filter ( $hook_name )
Parameter:
  • (string) $hook_name The name of the filter hook.
    Erforderlich: Ja
Gibt zurück:
  • (int) The number of times the filter hook has been applied.
Definiert in:
Codex:

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



Quellcode

function did_filter( $hook_name ) {
	global $wp_filters;

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

	return $wp_filters[ $hook_name ];
}