WordPress.org

Make WordPress Core

Ticket #20920: remove_all_filters.diff

File remove_all_filters.diff, 549 bytes (added by GeertDD, 23 months ago)
  • wp-includes/plugin.php

     
    282282        global $wp_filter, $merged_filters; 
    283283 
    284284        if( isset($wp_filter[$tag]) ) { 
    285                 if( false !== $priority && isset($wp_filter[$tag][$priority]) ) 
    286                         unset($wp_filter[$tag][$priority]); 
     285                if( false !== $priority ) { 
     286                        if( isset($wp_filter[$tag][$priority]) ) 
     287                                unset($wp_filter[$tag][$priority]); 
     288                } 
    287289                else 
    288290                        unset($wp_filter[$tag]); 
    289291        }