Ticket #17817: 17817.patch
File 17817.patch, 1.6 KB (added by , 11 years ago) |
---|
-
wp-includes/plugin.php
161 161 $merged_filters[ $tag ] = true; 162 162 } 163 163 164 reset( $wp_filter[ $tag ] );165 166 164 if ( empty($args) ) 167 165 $args = func_get_args(); 168 166 169 do{170 foreach( (array) current($wp_filter[$tag]) as $the_ )171 if ( ! is_null($the_['function']) ){167 foreach ( $wp_filter[ $tag ] as $filters ) { 168 foreach( (array) $filters as $the_ ) { 169 if ( ! is_null( $the_['function'] ) ) { 172 170 $args[1] = $value; 173 $value = call_user_func_array( $the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));171 $value = call_user_func_array( $the_['function'], array_slice( $args, 1, (int) $the_['accepted_args'] ) ); 174 172 } 173 } 174 } 175 175 176 } while ( next($wp_filter[$tag]) !== false );177 178 176 array_pop( $wp_current_filter ); 179 177 180 178 return $value; … … 222 220 $merged_filters[ $tag ] = true; 223 221 } 224 222 225 reset( $wp_filter[ $tag ] ); 223 foreach ( $wp_filter[ $tag ] as $filters ) { 224 foreach( (array) $filters as $the_ ) { 225 if ( ! is_null( $the_['function'] ) ) { 226 $args[0] = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); 227 } 228 } 229 } 226 230 227 do {228 foreach( (array) current($wp_filter[$tag]) as $the_ )229 if ( !is_null($the_['function']) )230 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));231 231 232 } while ( next($wp_filter[$tag]) !== false );233 234 232 array_pop( $wp_current_filter ); 235 233 236 234 return $args[0];