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

Props jrf.
See #47678.

git-svn-id: https://develop.svn.wordpress.org/trunk@46140 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-09-15 11:45:45 +00:00
parent d4d853ee3f
commit 0521e61398

View File

@ -115,8 +115,8 @@ class WP_Admin_Bar {
*/ */
public function add_node( $args ) { public function add_node( $args ) {
// Shim for old method signature: add_node( $parent_id, $menu_obj, $args ) // Shim for old method signature: add_node( $parent_id, $menu_obj, $args )
if ( func_num_args() >= 3 && is_string( func_get_arg( 0 ) ) ) { if ( func_num_args() >= 3 && is_string( $args ) ) {
$args = array_merge( array( 'parent' => func_get_arg( 0 ) ), func_get_arg( 2 ) ); $args = array_merge( array( 'parent' => $args ), func_get_arg( 2 ) );
} }
if ( is_object( $args ) ) { if ( is_object( $args ) ) {