mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
foreach is a statement, not a function.
See #33491. git-svn-id: https://develop.svn.wordpress.org/trunk@33734 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -207,7 +207,7 @@ function apply_filters( $tag, $value ) {
|
||||
$args = func_get_args();
|
||||
|
||||
do {
|
||||
foreach( (array) current($wp_filter[$tag]) as $the_ )
|
||||
foreach ( (array) current($wp_filter[$tag]) as $the_ )
|
||||
if ( !is_null($the_['function']) ){
|
||||
$args[1] = $value;
|
||||
$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
|
||||
@@ -264,7 +264,7 @@ function apply_filters_ref_array($tag, $args) {
|
||||
reset( $wp_filter[ $tag ] );
|
||||
|
||||
do {
|
||||
foreach( (array) current($wp_filter[$tag]) as $the_ )
|
||||
foreach ( (array) current($wp_filter[$tag]) as $the_ )
|
||||
if ( !is_null($the_['function']) )
|
||||
$args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
|
||||
|
||||
@@ -574,7 +574,7 @@ function do_action_ref_array($tag, $args) {
|
||||
reset( $wp_filter[ $tag ] );
|
||||
|
||||
do {
|
||||
foreach( (array) current($wp_filter[$tag]) as $the_ )
|
||||
foreach ( (array) current($wp_filter[$tag]) as $the_ )
|
||||
if ( !is_null($the_['function']) )
|
||||
call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
|
||||
|
||||
@@ -845,7 +845,7 @@ function _wp_call_all_hook($args) {
|
||||
|
||||
reset( $wp_filter['all'] );
|
||||
do {
|
||||
foreach( (array) current($wp_filter['all']) as $the_ )
|
||||
foreach ( (array) current($wp_filter['all']) as $the_ )
|
||||
if ( !is_null($the_['function']) )
|
||||
call_user_func_array($the_['function'], $args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user