Ticket #21172: add-at-9-include-21169.patch
File add-at-9-include-21169.patch, 3.0 KB (added by , 13 years ago) |
---|
-
wp-includes/plugin.php
163 163 if ( empty($args) ) 164 164 $args = func_get_args(); 165 165 166 do { 167 foreach( (array) current($wp_filter[$tag]) as $the_ ) 166 $pri = null; 167 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 168 if ( is_null($pri) ) 169 $pri = $next['key']; 170 if ( $pri > $next['key'] ) 171 continue; 172 foreach( (array) $next['value'] as $the_ ) 168 173 if ( !is_null($the_['function']) ){ 169 174 $args[1] = $value; 170 175 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 171 176 } 172 177 173 } while ( next($wp_filter[$tag]) !== false );178 } 174 179 175 180 array_pop( $wp_current_filter ); 176 181 … … 221 226 222 227 reset( $wp_filter[ $tag ] ); 223 228 224 do { 225 foreach( (array) current($wp_filter[$tag]) as $the_ ) 229 $pri = null; 230 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 231 if ( is_null($pri) ) 232 $pri = $next['key']; 233 if ( $pri > $next['key'] ) 234 continue; 235 foreach( (array) $next['value'] as $the_ ) 226 236 if ( !is_null($the_['function']) ) 227 237 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 228 238 229 } while ( next($wp_filter[$tag]) !== false );239 } 230 240 231 241 array_pop( $wp_current_filter ); 232 242 … … 397 407 398 408 reset( $wp_filter[ $tag ] ); 399 409 400 do { 401 foreach ( (array) current($wp_filter[$tag]) as $the_ ) 410 $pri = null; 411 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 412 if ( is_null($pri) ) 413 $pri = $next['key']; 414 if ( $pri > $next['key'] ) 415 continue; 416 foreach( (array) $next['value'] as $the_ ) 402 417 if ( !is_null($the_['function']) ) 403 418 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 404 419 405 } while ( next($wp_filter[$tag]) !== false );420 } 406 421 407 422 array_pop($wp_current_filter); 408 423 } … … 478 493 479 494 reset( $wp_filter[ $tag ] ); 480 495 481 do { 482 foreach( (array) current($wp_filter[$tag]) as $the_ ) 496 $pri = null; 497 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 498 if ( is_null($pri) ) 499 $pri = $next['key']; 500 if ( $pri > $next['key'] ) 501 continue; 502 foreach( (array) $next['value'] as $the_ ) 483 503 if ( !is_null($the_['function']) ) 484 504 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 485 505 486 } while ( next($wp_filter[$tag]) !== false );506 } 487 507 488 508 array_pop($wp_current_filter); 489 509 } … … 708 728 global $wp_filter; 709 729 710 730 reset( $wp_filter['all'] ); 711 do { 712 foreach( (array) current($wp_filter['all']) as $the_ ) 731 $pri = $null; 732 while ( ( $next = each($wp_filter['all']) ) !== false ) { 733 if ( is_null($pri) ) 734 $pri = $next['key']; 735 if ( $pri > $next['key'] ) 736 continue; 737 foreach( (array) $next['value'] as $the_ ) 713 738 if ( !is_null($the_['function']) ) 714 739 call_user_func_array($the_['function'], $args); 715 740 716 } while ( next($wp_filter['all']) !== false );741 } 717 742 } 718 743 719 744 /**