#5841 closed defect (bug) (invalid)
Semantic changes to wp_list_pages and wp_list_categories
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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)
Note: See
TracTickets for help on using
tickets.
This is the same issue as http://trac.wordpress.org/ticket/5844
It is already fixed.