WordPress.org

Make WordPress Core

Changeset 46140


Ignore:
Timestamp:
09/15/2019 11:45:45 AM (2 months ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Remove redundant calls to func_get_arg() in wp-includes/class-wp-admin-bar.php.

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r45821 r46140  
    116116    public function add_node( $args ) {
    117117        // Shim for old method signature: add_node( $parent_id, $menu_obj, $args )
    118         if ( func_num_args() >= 3 && is_string( func_get_arg( 0 ) ) ) {
    119             $args = array_merge( array( 'parent' => func_get_arg( 0 ) ), func_get_arg( 2 ) );
     118        if ( func_num_args() >= 3 && is_string( $args ) ) {
     119            $args = array_merge( array( 'parent' => $args ), func_get_arg( 2 ) );
    120120        }
    121121
Note: See TracChangeset for help on using the changeset viewer.