From 6c85d3218326b04ce588e66fc116b30d94f063fd Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 11 Jul 2019 11:50:22 +0200
Subject: [PATCH] Use spread operator in Walker::paged_walk()

---
 src/wp-includes/class-wp-walker.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php
index 1d60e28632..4d35b093f5 100644
--- a/src/wp-includes/class-wp-walker.php
+++ b/src/wp-includes/class-wp-walker.php
@@ -276,16 +276,16 @@ class Walker {
 	 *
 	 * @param array $elements
 	 * @param int   $max_depth The maximum hierarchical depth.
-	 * @param int   $page_num The specific page number, beginning with 1.
+	 * @param int   $page_num  The specific page number, beginning with 1.
 	 * @param int   $per_page
+	 * @param mixed ...$args   Optional additional arguments.
 	 * @return string XHTML of the specified page of elements
 	 */
-	public function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
+	public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) {
 		if ( empty( $elements ) || $max_depth < -1 ) {
 			return '';
 		}
 
-		$args   = array_slice( func_get_args(), 4 );
 		$output = '';
 
 		$parent_field = $this->db_fields['parent'];
-- 
2.21.0.windows.1

