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
|
b
|
class Walker { |
| 276 | 276 | * |
| 277 | 277 | * @param array $elements |
| 278 | 278 | * @param int $max_depth The maximum hierarchical depth. |
| 279 | | * @param int $page_num The specific page number, beginning with 1. |
| | 279 | * @param int $page_num The specific page number, beginning with 1. |
| 280 | 280 | * @param int $per_page |
| | 281 | * @param mixed ...$args Optional additional arguments. |
| 281 | 282 | * @return string XHTML of the specified page of elements |
| 282 | 283 | */ |
| 283 | | public function paged_walk( $elements, $max_depth, $page_num, $per_page ) { |
| | 284 | public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) { |
| 284 | 285 | if ( empty( $elements ) || $max_depth < -1 ) { |
| 285 | 286 | return ''; |
| 286 | 287 | } |
| 287 | 288 | |
| 288 | | $args = array_slice( func_get_args(), 4 ); |
| 289 | 289 | $output = ''; |
| 290 | 290 | |
| 291 | 291 | $parent_field = $this->db_fields['parent']; |