Ticket #9968: 9968.2.diff
File 9968.2.diff, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/plugin.php
154 154 $merged_filters[ $tag ] = true; 155 155 } 156 156 157 reset( $wp_filter[ $tag ] );158 159 157 if ( empty($args) ) 160 158 $args = func_get_args(); 161 159 162 do{163 foreach( (array) current($wp_filter[$tag])as $the_ )160 foreach ( $wp_filter[$tag] as $filters ) { 161 foreach( (array) $filters as $the_ ) 164 162 if ( !is_null($the_['function']) ){ 165 163 $args[1] = $value; 166 164 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 167 165 } 166 } 168 167 169 } while ( next($wp_filter[$tag]) !== false );170 171 168 array_pop( $wp_current_filter ); 172 169 173 170 return $value; … … 331 328 $merged_filters[ $tag ] = true; 332 329 } 333 330 334 reset( $wp_filter[ $tag ] ); 335 336 do { 337 foreach ( (array) current($wp_filter[$tag]) as $the_ ) 331 foreach ( $wp_filter[$tag] as $filters ) { 332 foreach ( (array) $filters as $the_ ) 338 333 if ( !is_null($the_['function']) ) 339 334 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 340 335 341 } while ( next($wp_filter[$tag]) !== false );336 } 342 337 343 338 array_pop($wp_current_filter); 344 339 }