[wp-trac] [WordPress Trac] #8439: wp_page_menu produces invalid html when used multiple times in a page (and arg names misleading)

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 1 03:51:17 GMT 2008


#8439: wp_page_menu produces invalid html when used multiple times in a page (and
arg names misleading)
--------------------------+-------------------------------------------------
 Reporter:  corischlegel  |       Owner:  anonymous    
     Type:  defect        |      Status:  new          
 Priority:  normal        |   Milestone:  2.7          
Component:  Template      |     Version:  2.7          
 Severity:  normal        |    Keywords:  template tags
--------------------------+-------------------------------------------------
 wp_page_menu() produces a div with an id attribute.  If the template tag
 is placed multiple times in a page (say in the header and footer, for
 example) this will produce invalid html (in HTML 4 id must be unique in a
 document: http://www.w3.org/TR/REC-html40/struct/global.html#adef-id).  In
 addition, the defaults use the key "menu_class", which is misleading if
 the generated html actually produces an id.

 Attached patch swaps "<div id=" for "<div class=", and fixes both
 problems.

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


More information about the wp-trac mailing list