From fdb58876bbaec77c21d3979226b3c00d87f8e314 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 11 Jul 2019 11:47:05 +0200
Subject: [PATCH] Use spread operator in Walker::walk()
---
src/wp-includes/class-wp-walker.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php
index 6799d42f28..1d60e28632 100644
|
a
|
b
|
class Walker { |
| 184 | 184 | * |
| 185 | 185 | * @param array $elements An array of elements. |
| 186 | 186 | * @param int $max_depth The maximum hierarchical depth. |
| | 187 | * @param mixed ...$args Optional additional arguments. |
| 187 | 188 | * @return string The hierarchical item output. |
| 188 | 189 | */ |
| 189 | | public function walk( $elements, $max_depth ) { |
| 190 | | $args = array_slice( func_get_args(), 2 ); |
| | 190 | public function walk( $elements, $max_depth, ...$args ) { |
| 191 | 191 | $output = ''; |
| 192 | 192 | |
| 193 | 193 | //invalid parameter or nothing to walk |