Ticket #21169: next-to-each-r3.patch
| File next-to-each-r3.patch, 2.2 KB (added by devesine, 10 months ago) |
|---|
-
wp-includes/plugin.php
166 166 if ( empty($args) ) 167 167 $args = func_get_args(); 168 168 169 do{170 foreach( (array) current($wp_filter[$tag])as $the_ ) {169 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 170 foreach( $next['value'] as $the_ ) { 171 171 $args[1] = $value; 172 172 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 173 173 } 174 } while ( next($wp_filter[$tag]) !== false );174 } 175 175 176 176 array_pop( $wp_current_filter ); 177 177 … … 222 222 223 223 reset( $wp_filter[ $tag ] ); 224 224 225 do{226 foreach( (array) current($wp_filter[$tag])as $the_ ) {225 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 226 foreach( $next['value'] as $the_ ) { 227 227 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 228 228 } 229 } while ( next($wp_filter[$tag]) !== false );229 } 230 230 231 231 array_pop( $wp_current_filter ); 232 232 … … 399 399 400 400 reset( $wp_filter[ $tag ] ); 401 401 402 do{403 foreach ( (array) current($wp_filter[$tag])as $the_ ) {402 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 403 foreach( $next['value'] as $the_ ) { 404 404 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 405 405 } 406 } while ( next($wp_filter[$tag]) !== false );406 } 407 407 408 408 array_pop($wp_current_filter); 409 409 } … … 479 479 480 480 reset( $wp_filter[ $tag ] ); 481 481 482 do{483 foreach( (array) current($wp_filter[$tag])as $the_ ) {482 while ( ( $next = each($wp_filter[$tag]) ) !== false ) { 483 foreach( $next['value'] as $the_ ) { 484 484 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 485 485 } 486 } while ( next($wp_filter[$tag]) !== false );486 } 487 487 488 488 array_pop($wp_current_filter); 489 489 } … … 710 710 global $wp_filter; 711 711 712 712 reset( $wp_filter['all'] ); 713 do{714 foreach( (array) current($wp_filter['all'])as $the_ ) {713 while ( ( $next = each($wp_filter['all']) ) !== false ) { 714 foreach( $next['value'] as $the_ ) { 715 715 call_user_func_array($the_['function'], $args); 716 716 } 717 } while ( next($wp_filter['all']) !== false );717 } 718 718 } 719 719 720 720 /**
