[wp-trac] [WordPress Trac] #61749: `wp_list_pages()` depth of `0` can show only top level of pages

WordPress Trac noreply at wordpress.org
Wed Aug 7 19:46:17 UTC 2024


#61749: `wp_list_pages()` depth of `0` can show only top level of pages
-------------------------------------------------+-------------------------
 Reporter:  peterwilsoncc                        |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.6.2
Component:  General                              |     Version:  6.6
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests fixed-      |     Focuses:
  major dev-reviewed                             |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58863" 58863]:
 {{{
 #!CommitTicketReference repository="" revision="58863"
 General: Cast `$max_depth` and `$depth` to an integer in the `Walker`
 class.

 This ensures that the arguments are correctly interpreted when passed as a
 query string, i.e. when `wp_parse_args()` is involved. For example,
 `wp_list_pages( 'depth=0' )` should display a list of all pages to the
 maximum depth.

 Follow-up to [57848].

 Reviewed by peterwilsoncc.
 Merges [58812] to the 6.6 branch.

 Props freibergergarcia, peterwilsoncc, ahortin.
 Fixes #61749.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61749#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list