Make WordPress Core


Ignore:
Timestamp:
09/15/2019 12:03:04 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Simplify some logic in apply_filters().

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/plugin.php

    r45674 r46146  
    182182    global $wp_filter, $wp_current_filter;
    183183
    184     $args = array();
     184    $args = func_get_args();
    185185
    186186    // Do 'all' actions first.
    187187    if ( isset( $wp_filter['all'] ) ) {
    188188        $wp_current_filter[] = $tag;
    189         $args                = func_get_args();
    190189        _wp_call_all_hook( $args );
    191190    }
     
    202201    }
    203202
    204     if ( empty( $args ) ) {
    205         $args = func_get_args();
    206     }
    207 
    208     // don't pass the tag name to WP_Hook
     203    // Don't pass the tag name to WP_Hook.
    209204    array_shift( $args );
    210205
Note: See TracChangeset for help on using the changeset viewer.