Ticket #20776: 20776-1.diff
| File 20776-1.diff, 2.3 KB (added by ericlewis, 13 months ago) |
|---|
-
wp-includes/plugin.php
164 164 $args = func_get_args(); 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 175 173 array_pop( $wp_current_filter ); … … 223 221 224 222 do { 225 223 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 224 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 229 225 } while ( next($wp_filter[$tag]) !== false ); 230 226 231 227 array_pop( $wp_current_filter ); … … 399 395 400 396 do { 401 397 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 398 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 405 399 } while ( next($wp_filter[$tag]) !== false ); 406 400 407 401 array_pop($wp_current_filter); … … 480 474 481 475 do { 482 476 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 477 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 486 478 } while ( next($wp_filter[$tag]) !== false ); 487 479 488 480 array_pop($wp_current_filter); … … 710 702 reset( $wp_filter['all'] ); 711 703 do { 712 704 foreach( (array) current($wp_filter['all']) as $the_ ) 713 if ( !is_null($the_['function']) ) 714 call_user_func_array($the_['function'], $args); 715 705 call_user_func_array($the_['function'], $args); 716 706 } while ( next($wp_filter['all']) !== false ); 717 707 } 718 708