Ticket #5844 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

remove extra <ul> in walker class

Reported by: hailin Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: General Version: 2.5
Severity: normal Keywords:
Cc:

Description (Last modified by lloydbudd)

As reported by James R Whitehead of interconnectit.com on wp-hackers:

I'm wondering why the html generated by wp_list_pages and wp_list_categories has changed in the current 2.4-bleeding. I know things in this are not set in stone so I'm hoping it's not a permanent change as it makes coding CSS menus that work with 2.3 and 2.4 very difficult especially as child item are no longer in a single container. The new structure also makes less sense semantically as each child is now a separate UL.

Changed from:

<ul>

<li>

Text <ul>

<li>text</li> <li>text</li> <li>text</li>

<ul>

</li>

</ul>

To:

<ul>

<li>

Text <ul>

<li>text</li>

<ul> <ul>

<li>text</li>

<ul> <ul>

<li>text</li>

<ul>

</li>

</ul>

Attachments

5844_walker_ul.diff (2.5 kB) - added by hailin on 02/14/08 03:25:37.
new patch

Change History

02/13/08 19:59:01 changed by lloydbudd

  • version set to 2.5.
  • description changed.
  • milestone changed from 2.6 to 2.5.

02/14/08 00:54:52 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6835]) Walker markup fixes from hailin. fixes #5844

02/14/08 02:47:23 changed by ryan

  • status changed from closed to reopened.
  • resolution deleted.

Looks like this is causing some problems with the depth arg.

02/14/08 02:51:12 changed by ryan

(In [6839]) Revert [6835] as it breaks the depth arg. see#5844

02/14/08 03:25:37 changed by hailin

  • attachment 5844_walker_ul.diff added.

new patch

02/14/08 03:27:35 changed by hailin

the issue is that when $depth = 1, it creates empty <ul> </ul>. The new patch addresses that: it checks earlier so it won't descend another level if not necessary. Verified with blogs with depth=1 theme (mwlibrary.wordpress.com).

02/15/08 07:34:52 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [6858]) Walker markup fixes from hailin. fixes #5844