WordPress.org

Make WordPress Core

Ticket #14671: 14671.diff

File 14671.diff, 1.5 KB (added by markjaquith, 8 years ago)
  • wp-includes/plugin.php

     
    163163                foreach( (array) current($wp_filter[$tag]) as $the_ )
    164164                        if ( !is_null($the_['function']) ){
    165165                                $args[1] = $value;
    166                                 $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
     166                                $value = call_user_func_array($the_['function'], array_slice($args, 1 ) );
    167167                        }
    168168
    169169        } while ( next($wp_filter[$tag]) !== false );
     
    217217        do {
    218218                foreach( (array) current($wp_filter[$tag]) as $the_ )
    219219                        if ( !is_null($the_['function']) )
    220                                 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
     220                                $args[0] = call_user_func_array($the_['function'], $args);
    221221
    222222        } while ( next($wp_filter[$tag]) !== false );
    223223
     
    392392        do {
    393393                foreach ( (array) current($wp_filter[$tag]) as $the_ )
    394394                        if ( !is_null($the_['function']) )
    395                                 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
     395                                call_user_func_array($the_['function'], $args );
    396396
    397397        } while ( next($wp_filter[$tag]) !== false );
    398398
     
    470470        do {
    471471                foreach( (array) current($wp_filter[$tag]) as $the_ )
    472472                        if ( !is_null($the_['function']) )
    473                                 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
     473                                call_user_func_array($the_['function'], $args);
    474474
    475475        } while ( next($wp_filter[$tag]) !== false );
    476476