Ticket #4223: 4223.diff
File 4223.diff, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/plugin.php
97 97 * @return boolean Whether the function is removed. 98 98 */ 99 99 function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { 100 global $wp_filter, $merged_filters;100 $function_to_remove = serialize($function_to_remove); 101 101 102 unset($GLOBALS['wp_filter'][$tag][$priority][serialize($function_to_remove)]); 103 unset( $merged_filters[ $tag ] ); 102 $r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); 104 103 105 return true; 104 unset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); 105 unset($GLOBALS['merged_filters'][$tag]); 106 107 return $r; 106 108 } 107 109 108 110 /** … … 216 218 * @return boolean Whether the function is removed. 217 219 */ 218 220 function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { 219 re move_filter($tag, $function_to_remove, $priority, $accepted_args);221 return remove_filter($tag, $function_to_remove, $priority, $accepted_args); 220 222 } 221 223 222 224 // … … 274 276 add_action('deactivate_' . $file, $function); 275 277 } 276 278 277 ?> 278 No newline at end of file 279 ?>