WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5841 closed defect (bug) (invalid)

Semantic changes to wp_list_pages and wp_list_categories

Reported by: hyperionjrw Owned by: hailin
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Template Keywords: wp_list_pages wp_list_categories walker
Focuses: Cc:

Description

The walker function is adding too many ULs to child pages and categories in wp_list_pages and wp_list_categories. This is wrong semantically and will break old themes that have CSS powered drop-down menus and other such things.

Line 420 and 445 in the walker class of classes.php (both read "if ($depth > 0)")need to check that the depth has changed from the previous run through. However this may be problematic for page drop-down versions.

The 2.3 version of wp_list_pages produces:

<ul>
<li>
Text
<ul>
<li>text</li>
<li>text</li>
<li>text</li>
</ul>
</li>
</ul>

Current 2.4-bleeding version:

<ul>
<li>
Text
<ul>
<li>text</li>
</ul>
<ul>
<li>text</li>
</ul>
<ul>
<li>text</li>
</ul>
</li>
</ul>

Change History (3)

comment:1 ryan6 years ago

  • Owner changed from anonymous to hailin

comment:2 hailin6 years ago

  • Resolution set to invalid
  • Status changed from new to closed

This is the same issue as http://trac.wordpress.org/ticket/5844
It is already fixed.

comment:3 lloydbudd6 years ago

  • Milestone 2.6 deleted
Note: See TracTickets for help on using tickets.