Make WordPress Core

Ticket #14789: 14789.7.patch

File 14789.7.patch, 1.4 KB (added by hakre, 14 years ago)

no need to shift plus type hints

  • wp-includes/plugin.php

     
    190190 * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
    191191 * @return mixed The filtered value after all hooked functions are applied to it.
    192192 */
    193 function apply_filters_ref_array($tag, $args) {
     193function apply_filters_ref_array($tag, array $args) {
    194194        global $wp_filter, $merged_filters, $wp_current_filter;
    195195
    196196        $wp_current_filter[] = $tag;
    197197
    198198        // Do 'all' actions first
    199199        if ( isset($wp_filter['all']) ) {
    200                 $all_args = func_get_args();
    201                 _wp_call_all_hook($all_args);
     200                _wp_call_all_hook( array_merge( (array) $tag, $args ) );
    202201        }
    203202
    204203        if ( !isset($wp_filter[$tag]) ) {
     
    435434 * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
    436435 * @return null Will return null if $tag does not exist in $wp_filter array
    437436 */
    438 function do_action_ref_array($tag, $args) {
     437function do_action_ref_array($tag, array $args) {
    439438        global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
    440439
    441440        if ( ! isset($wp_actions) )
     
    450449
    451450        // Do 'all' actions first
    452451        if ( isset($wp_filter['all']) ) {
    453                 $all_args = func_get_args();
    454                 _wp_call_all_hook($all_args);
     452                _wp_call_all_hook( array_merge( (array) $tag, $args ) );
    455453        }
    456454
    457455        if ( !isset($wp_filter[$tag]) ) {