Ticket #7216: remove_filter.diff
File remove_filter.diff, 720 bytes (added by , 17 years ago) |
---|
-
wp-includes/plugin.php
192 192 * @return boolean Whether the function existed before it was removed. 193 193 */ 194 194 function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { 195 if ( 'all' == $function_to_remove && isset($GLOBALS['wp_filter'][$tag]) ) { 196 unset($GLOBALS['wp_filter'][$tag]); 197 unset($GLOBALS['merged_filters'][$tag]); 198 return true; 199 } 200 195 201 $function_to_remove = _wp_filter_build_unique_id($tag, $function_to_remove, $priority); 196 202 197 203 $r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]);