Make WordPress Core


Ignore:
Timestamp:
12/31/2014 07:06:29 PM (10 years ago)
Author:
boonebgorges
Message:

In remove_all_filters(), only remove callbacks that match the $priority parameter.

Props GeertDD, valendesigns.
Fixes #20920.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/plugin.php

    r30544 r31014  
    326326
    327327    if ( isset( $wp_filter[ $tag ]) ) {
    328         if ( false !== $priority && isset( $wp_filter[ $tag ][ $priority ] ) ) {
     328        if ( false === $priority ) {
     329            $wp_filter[ $tag ] = array();
     330        } else if ( isset( $wp_filter[ $tag ][ $priority ] ) ) {
    329331            $wp_filter[ $tag ][ $priority ] = array();
    330         } else {
    331             $wp_filter[ $tag ] = array();
    332332        }
    333333    }
Note: See TracChangeset for help on using the changeset viewer.