Changeset 28884
- Timestamp:
- 06/28/2014 04:37:47 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/plugin.php
r28883 r28884 274 274 */ 275 275 function remove_filter( $tag, $function_to_remove, $priority = 10 ) { 276 $function_to_remove = _wp_filter_build_unique_id($tag, $function_to_remove, $priority); 277 278 $r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); 279 280 if ( true === $r) { 281 unset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); 282 if ( empty($GLOBALS['wp_filter'][$tag][$priority]) ) 283 unset($GLOBALS['wp_filter'][$tag][$priority]); 284 unset($GLOBALS['merged_filters'][$tag]); 276 $function_to_remove = _wp_filter_build_unique_id( $tag, $function_to_remove, $priority ); 277 278 $r = isset( $GLOBALS['wp_filter'][ $tag ][ $priority ][ $function_to_remove ] ); 279 280 if ( true === $r ) { 281 unset( $GLOBALS['wp_filter'][ $tag ][ $priority ][ $function_to_remove ] ); 282 if ( empty( $GLOBALS['wp_filter'][ $tag ][ $priority ] ) ) { 283 unset( $GLOBALS['wp_filter'][ $tag ][ $priority ] ); 284 } 285 if ( empty( $GLOBALS['wp_filter'][ $tag ] ) ) { 286 $GLOBALS['wp_filter'][ $tag ] = array(); 287 } 288 unset( $GLOBALS['merged_filters'][ $tag ] ); 285 289 } 286 290
Note: See TracChangeset
for help on using the changeset viewer.