From 45827d6e7ae5beb2ffa7584853fd680e39cffe53 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 15 Sep 2019 11:30:25 +0000 Subject: [PATCH] Code Modernisation: Replace `call_user_func_array()` in `wp-includes/nav-menu-template.php` with a dynamic function call. Props jrf. See #47678. git-svn-id: https://develop.svn.wordpress.org/trunk@46134 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/nav-menu-template.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/nav-menu-template.php b/src/wp-includes/nav-menu-template.php index cbd6fcdef9..1910e1737e 100644 --- a/src/wp-includes/nav-menu-template.php +++ b/src/wp-includes/nav-menu-template.php @@ -579,9 +579,8 @@ function _wp_menu_item_classes_by_context( &$menu_items ) { */ function walk_nav_menu_tree( $items, $depth, $r ) { $walker = ( empty( $r->walker ) ) ? new Walker_Nav_Menu : $r->walker; - $args = array( $items, $depth, $r ); - return call_user_func_array( array( $walker, 'walk' ), $args ); + return $walker->walk( $items, $depth, $r ); } /**