mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
In remove_all_filters(), only remove callbacks that match the $priority parameter.
Props GeertDD, valendesigns. Fixes #20920. git-svn-id: https://develop.svn.wordpress.org/trunk@31014 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user