WordPress at a glance

remove_all_filters() WP 1.0

Remove all of the hooks from a filter.

No Hooks.


true. True when finished.


remove_all_filters( $tag, $priority );
$tag(string) (required)
The filter to remove hooks from.
The priority number to remove.
Default: false


  • Global. Array. $wp_filter Stores all of the filters and actions.


Since 2.7.0 Introduced.

Code of remove all filters: wp-includes/plugin.php WP 5.4.2

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;

Related Functions

From tag: Filters (hooks)

More from category: Hooks (actions, filters)

No comments
        Log In . Register