wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



did_filter › WordPress Function

Od6.1.0
Przestarzałyn/a
did_filter ( $hook_name )
Parametry:
  • (string) $hook_name The name of the filter hook.
    Wymagane: Tak
Powrót:
  • (int) The number of times the filter hook has been applied.
Zdefiniowane na:
Codex:

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



Źródło

function did_filter( $hook_name ) {
	global $wp_filters;

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

	return $wp_filters[ $hook_name ];
}