Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#5841 closed defect (bug) (invalid)

Semantic changes to wp_list_pages and wp_list_categories

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

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)

#1 @ryan
19 years ago

  • Owner changed from anonymous to hailin

#2 @hailin
19 years ago

  • Resolution → invalid
  • Status new → closed

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

#3 @lloydbudd
19 years ago

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