Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8439 closed defect (bug) (fixed)

wp_page_menu produces invalid html when used multiple times in a page (and arg names misleading)

Reported by: corischlegel's profile corischlegel Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: Template Keywords: template tags
Focuses: Cc:

Description

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.

Attachments (1)

post-template.diff (528 bytes) - added by corischlegel 16 years ago.
patch fixes #8439

Download all attachments as: .zip

Change History (2)

@corischlegel
16 years ago

patch fixes #8439

#1 @westi
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10114]) Use classes instead of ids to allow the wp_page_menu() to be used more than once per-page. Fixes #8439 props corischlegel.

Note: See TracTickets for help on using tickets.