Changeset 21299
- Timestamp:
- 07/21/2012 08:24:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r21288 r21299 168 168 169 169 do { 170 foreach( (array) current($wp_filter[$tag]) as $the_ ) { 171 $args[1] = $value; 172 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 173 } 170 foreach( (array) current($wp_filter[$tag]) as $the_ ) 171 if ( !is_null($the_['function']) ){ 172 $args[1] = $value; 173 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 174 } 175 174 176 } while ( next($wp_filter[$tag]) !== false ); 175 177 … … 224 226 225 227 do { 226 foreach( (array) current($wp_filter[$tag]) as $the_ ) { 227 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 228 } 228 foreach( (array) current($wp_filter[$tag]) as $the_ ) 229 if ( !is_null($the_['function']) ) 230 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 231 229 232 } while ( next($wp_filter[$tag]) !== false ); 230 233 … … 264 267 if ( empty($GLOBALS['wp_filter'][$tag][$priority]) ) 265 268 unset($GLOBALS['wp_filter'][$tag][$priority]); 266 if ( empty( $GLOBALS['wp_filter'][ $tag ] ) )267 unset( $GLOBALS['wp_filter'][ $tag ] );268 269 unset($GLOBALS['merged_filters'][$tag]); 269 270 } … … 401 402 402 403 do { 403 foreach ( (array) current($wp_filter[$tag]) as $the_ ) { 404 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 405 } 404 foreach ( (array) current($wp_filter[$tag]) as $the_ ) 405 if ( !is_null($the_['function']) ) 406 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 407 406 408 } while ( next($wp_filter[$tag]) !== false ); 407 409 … … 481 483 482 484 do { 483 foreach( (array) current($wp_filter[$tag]) as $the_ ) { 484 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 485 } 485 foreach( (array) current($wp_filter[$tag]) as $the_ ) 486 if ( !is_null($the_['function']) ) 487 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 488 486 489 } while ( next($wp_filter[$tag]) !== false ); 487 490 … … 712 715 reset( $wp_filter['all'] ); 713 716 do { 714 foreach( (array) current($wp_filter['all']) as $the_ ) { 715 call_user_func_array($the_['function'], $args); 716 } 717 foreach( (array) current($wp_filter['all']) as $the_ ) 718 if ( !is_null($the_['function']) ) 719 call_user_func_array($the_['function'], $args); 720 717 721 } while ( next($wp_filter['all']) !== false ); 718 722 }
Note: See TracChangeset
for help on using the changeset viewer.