remove_all_filters( string $tag, int|bool $priority = false )

Remove all of the hooks from a filter.


Description Description


Parameters Parameters

$tag

(string) (Required) The filter to remove hooks from.

$priority

(int|bool) (Optional) The priority number to remove.

Default value: false


Top ↑

Return Return

(true) True when finished.


Top ↑

Source 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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.