[wp-trac] [WordPress Trac] #5841: Semantic changes to wp_list_pages and wp_list_categories

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 13 17:56:29 GMT 2008


#5841: Semantic changes to wp_list_pages and wp_list_categories
-------------------------+--------------------------------------------------
 Reporter:  hyperionjrw  |       Owner:  anonymous                              
     Type:  defect       |      Status:  new                                    
 Priority:  normal       |   Milestone:  2.6                                    
Component:  Template     |     Version:  2.5                                    
 Severity:  normal       |    Keywords:  wp_list_pages wp_list_categories walker
-------------------------+--------------------------------------------------
 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>[[BR]]<li>[[BR]]Text[[BR]]<ul>[[BR]]<li>text</li>[[BR]]<li>text</li>[[BR]]<li>text</li>[[BR]]</ul>[[BR]]</li>[[BR]]</ul>[[BR]]

 Current 2.4-bleeding version:

 <ul>[[BR]]<li>[[BR]]Text[[BR]]<ul>[[BR]]<li>text</li>[[BR]]</ul>[[BR]]<ul>[[BR]]<li>text</li>[[BR]]
 </ul>[[BR]]<ul>[[BR]]<li>text</li>[[BR]]</ul>[[BR]]</li>[[BR]]</ul>[[BR]]

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5841>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list