wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



remove_all_filters › WordPress Function

Da2.7.0
Deprecaton/a
remove_all_filters ( $hook_name, $priority = false )
Parametri: (2)
  • (string) $hook_name The filter to remove callbacks from.
    Richiesto:
  • (int|false) $priority Optional. The priority number to remove them from. Default false.
    Richiesto: No
    Default: false
Ritorna:
  • (true) Always returns true.
Definito a:
Codex:

Removes all of the callback functions from a filter hook.



Sorgenti

function remove_all_filters( $hook_name, $priority = false ) {
	global $wp_filter;

	if ( isset( $wp_filter[ $hook_name ] ) ) {
		$wp_filter[ $hook_name ]->remove_all_filters( $priority );

		if ( ! $wp_filter[ $hook_name ]->has_filters() ) {
			unset( $wp_filter[ $hook_name ] );
		}
	}

	return true;
}