Ticket #12492: 12492.patch
File 12492.patch, 1.1 KB (added by , 15 years ago) |
---|
-
wordpress/wp-includes/plugin.php
212 212 /** 213 213 * Remove all of the hooks from a filter. 214 214 * 215 * @since 2.7 215 * @since 2.7.0 216 216 * 217 217 * @param string $tag The filter to remove hooks from. 218 218 * @param int $priority The priority number to remove. 219 219 * @return bool True when finished. 220 220 */ 221 function remove_all_filters( $tag, $priority = false) {221 function remove_all_filters( $tag, $priority = false ) { 222 222 global $wp_filter, $merged_filters; 223 223 224 if ( isset($wp_filter[$tag]) ) {225 if( false !== $priority && isset( $$wp_filter[$tag][$priority]) )226 unset( $wp_filter[$tag][$priority]);224 if ( isset( $wp_filter[$tag] ) ) { 225 if( false !== $priority && isset( $wp_filter[$tag][$priority] ) ) 226 unset( $wp_filter[$tag][$priority] ); 227 227 else 228 unset( $wp_filter[$tag]);228 unset( $wp_filter[$tag] ); 229 229 } 230 230 231 if ( isset($merged_filters[$tag]) )232 unset( $merged_filters[$tag]);231 if ( isset( $merged_filters[$tag] ) ) 232 unset( $merged_filters[$tag] ); 233 233 234 234 return true; 235 235 }