WordPress Version: 4.3
/**
* Remove all of the hooks from a filter.
*
* @since 2.7.0
*
* @global array $wp_filter Stores all of the filters
* @global array $merged_filters Merges the filter hooks using this function.
*
* @param string $tag The filter to remove hooks from.
* @param int|bool $priority Optional. The priority number to remove. Default false.
* @return true True when finished.
*/
function remove_all_filters($tag, $priority = false)
{
global $wp_filter, $merged_filters;
if (isset($wp_filter[$tag])) {
if (false === $priority) {
$wp_filter[$tag] = array();
} elseif (isset($wp_filter[$tag][$priority])) {
$wp_filter[$tag][$priority] = array();
}
}
unset($merged_filters[$tag]);
return true;
}