WordPress.org

Make WordPress Core

Ticket #47678: 47678-walk_page_tree.patch

File 47678-walk_page_tree.patch, 802 bytes (added by jrf, 9 months ago)

Simplify walk_page_tree()

  • src/wp-includes/post-template.php

    From 045863ec222fe7261f4f66c38aa2a70c4b300bbb Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Thu, 18 Jul 2019 08:13:51 +0200
    Subject: [PATCH] Simplify walk_page_tree()
    
    ---
     src/wp-includes/post-template.php | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
    index b91b775554..3097cb3a2c 100644
    a b function walk_page_tree( $pages, $depth, $current_page, $r ) { 
    15341534                }
    15351535        }
    15361536
    1537         $args = array( $pages, $depth, $r, $current_page );
    1538         return call_user_func_array( array( $walker, 'walk' ), $args );
     1537        return $walker->walk( $pages, $depth, $r, $current_page );
    15391538}
    15401539
    15411540/**