remove_all_filters( string $hook_name, int|false $priority = false )

Removes all of the callback functions from a filter hook.


Parameters

$hook_name

(Required) The filter to remove callbacks from.

$priority

(Optional) The priority number to remove them from.<br>

Default value: false


Return

(true) Always returns true.


Source

File: wp-includes/plugin.php

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

	if ( isset( $wp_filter[ $tag ]) ) {
		$wp_filter[ $tag ]->remove_all_filters( $priority );
		if ( ! $wp_filter[ $tag ]->has_filters() ) {
			unset( $wp_filter[ $tag ] );
		}
	}

	return true;
}


Changelog

Changelog
Version Description
2.7.0 Introduced.