Changeset 21287 for trunk/wp-includes/plugin.php
- Timestamp:
- 07/20/2012 05:25:37 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r19712 r21287 165 165 166 166 do { 167 foreach( (array) current($wp_filter[$tag]) as $the_ ) 168 if ( !is_null($the_['function']) ){ 169 $args[1] = $value; 170 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 171 } 172 167 foreach( (array) current($wp_filter[$tag]) as $the_ ) { 168 $args[1] = $value; 169 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 170 } 173 171 } while ( next($wp_filter[$tag]) !== false ); 174 172 … … 223 221 224 222 do { 225 foreach( (array) current($wp_filter[$tag]) as $the_ ) 226 if ( !is_null($the_['function']) ) 227 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 228 223 foreach( (array) current($wp_filter[$tag]) as $the_ ) { 224 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 225 } 229 226 } while ( next($wp_filter[$tag]) !== false ); 230 227 … … 264 261 if ( empty($GLOBALS['wp_filter'][$tag][$priority]) ) 265 262 unset($GLOBALS['wp_filter'][$tag][$priority]); 263 if ( empty( $GLOBALS['wp_filter'][ $tag ] ) ) 264 unset( $GLOBALS['wp_filter'][ $tag ] ); 266 265 unset($GLOBALS['merged_filters'][$tag]); 267 266 } … … 399 398 400 399 do { 401 foreach ( (array) current($wp_filter[$tag]) as $the_ ) 402 if ( !is_null($the_['function']) ) 403 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 404 400 foreach ( (array) current($wp_filter[$tag]) as $the_ ) { 401 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 402 } 405 403 } while ( next($wp_filter[$tag]) !== false ); 406 404 … … 480 478 481 479 do { 482 foreach( (array) current($wp_filter[$tag]) as $the_ ) 483 if ( !is_null($the_['function']) ) 484 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 485 480 foreach( (array) current($wp_filter[$tag]) as $the_ ) { 481 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 482 } 486 483 } while ( next($wp_filter[$tag]) !== false ); 487 484 … … 710 707 reset( $wp_filter['all'] ); 711 708 do { 712 foreach( (array) current($wp_filter['all']) as $the_ ) 713 if ( !is_null($the_['function']) ) 714 call_user_func_array($the_['function'], $args); 715 709 foreach( (array) current($wp_filter['all']) as $the_ ) { 710 call_user_func_array($the_['function'], $args); 711 } 716 712 } while ( next($wp_filter['all']) !== false ); 717 713 }
Note: See TracChangeset
for help on using the changeset viewer.