WordPress.org

Make WordPress Core

Changeset 45640


Ignore:
Timestamp:
07/15/2019 07:03:54 AM (5 months ago)
Author:
pento
Message:

Code Modernisation: Revert [45624].

Changing the method signatures on Walker causes back compat issues.

See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-walker.php

    r45624 r45640  
    185185     * @param array $elements  An array of elements.
    186186     * @param int   $max_depth The maximum hierarchical depth.
    187      * @param mixed ...$args   Optional additional arguments.
    188187     * @return string The hierarchical item output.
    189188     */
    190     public function walk( $elements, $max_depth, ...$args ) {
     189    public function walk( $elements, $max_depth ) {
     190        $args   = array_slice( func_get_args(), 2 );
    191191        $output = '';
    192192
     
    277277     * @param array $elements
    278278     * @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.
    280280     * @param int   $per_page
    281      * @param mixed ...$args   Optional additional arguments.
    282281     * @return string XHTML of the specified page of elements
    283282     */
    284     public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) {
     283    public function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
    285284        if ( empty( $elements ) || $max_depth < -1 ) {
    286285            return '';
    287286        }
    288287
     288        $args   = array_slice( func_get_args(), 4 );
    289289        $output = '';
    290290
Note: See TracChangeset for help on using the changeset viewer.