From 36f36dca776c3d306d5b333b9ae558de0a0dc212 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 31 Dec 2014 19:07:24 +0000 Subject: [PATCH] In `remove_all_filters()`, only remove callbacks that match the `$priority` parameter. Props GeertDD, valendesigns. Fixes #20920. Built from https://develop.svn.wordpress.org/trunk@31014 git-svn-id: http://core.svn.wordpress.org/trunk@30995 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/plugin.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 27a65ee1b5..06d727f313 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -325,10 +325,10 @@ function remove_all_filters( $tag, $priority = false ) { global $wp_filter, $merged_filters; if ( isset( $wp_filter[ $tag ]) ) { - if ( false !== $priority && isset( $wp_filter[ $tag ][ $priority ] ) ) { - $wp_filter[ $tag ][ $priority ] = array(); - } else { + if ( false === $priority ) { $wp_filter[ $tag ] = array(); + } else if ( isset( $wp_filter[ $tag ][ $priority ] ) ) { + $wp_filter[ $tag ][ $priority ] = array(); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 9a29121424..28d64377df 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31013'; +$wp_version = '4.2-alpha-31014'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.