From a5fe68e002632c190ffbd85167671ed4d4961135 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 21 Jun 2007 16:41:02 +0000 Subject: WP Merge to WP 2.2.1 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1005 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/plugin.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'wp-includes/plugin.php') diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index b8bf524..c573ec1 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -97,14 +97,12 @@ function merge_filters($tag) { * @return boolean Whether the function is removed. */ function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { - $function_to_remove = serialize($function_to_remove); - - $r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); + global $wp_filter, $merged_filters; - unset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); - unset($GLOBALS['merged_filters'][$tag]); + unset($GLOBALS['wp_filter'][$tag][$priority][serialize($function_to_remove)]); + unset( $merged_filters[ $tag ] ); - return $r; + return true; } /** @@ -222,7 +220,7 @@ function do_action_ref_array($tag, $args) { * @return boolean Whether the function is removed. */ function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { - return remove_filter($tag, $function_to_remove, $priority, $accepted_args); + remove_filter($tag, $function_to_remove, $priority, $accepted_args); } // -- cgit