remove_all_filters

Definition:
function remove_all_filters($tag, $priority = false) {}

Remove all of the hooks from a filter.

Parameters

  • string $tag: The filter to remove hooks from.
  • int $priority: The priority number to remove.

Return values

returns:True when finished.

Source code

function remove_all_filters($tag, $priority = false) {

	global $wp_filter, $merged_filters;



	if( isset($wp_filter[$tag]) ) {

		if( false !== $priority && isset($wp_filter[$tag][$priority]) )

			unset($wp_filter[$tag][$priority]);

		else

			unset($wp_filter[$tag]);

	}



	if( isset($merged_filters[$tag]) )

		unset($merged_filters[$tag]);



	return true;

}

2705

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: