summaryrefslogtreecommitdiffstats
path: root/wp-includes/plugin.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-06-21 16:41:02 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-06-21 16:41:02 +0000
commita5fe68e002632c190ffbd85167671ed4d4961135 (patch)
treeae57f94603111507c50cb3c212a03bedf8f7dc5a /wp-includes/plugin.php
parent4e38776b5b68c61a4593a84340f4654200f7568e (diff)
downloadwordpress-mu-a5fe68e002632c190ffbd85167671ed4d4961135.tar.gz
wordpress-mu-a5fe68e002632c190ffbd85167671ed4d4961135.tar.xz
wordpress-mu-a5fe68e002632c190ffbd85167671ed4d4961135.zip
WP Merge to WP 2.2.1
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1005 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/plugin.php')
-rw-r--r--wp-includes/plugin.php12
1 files changed, 5 insertions, 7 deletions
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);
}
//