Opened 3 years ago

Last modified 2 years ago

#13998 new enhancement

Inconsistency in arguments when wp_nav_menu falls back to wp_page_menu

Reported by: Utkarsh Owned by:
Priority: normal Milestone: Future Release
Component: Menus Version: 3.0
Severity: normal Keywords: needs-patch
Cc: Utkarsh

Description

wp_nav_menu's 'menu_class' parameter applies the class to the <ul>.

The default fallback function wp_page_menu however, applies 'menu_class' to the <div> enclosing the <ul>.

This can cause inconsistent styles if the style is applied to ul.<menu class>

Attachments (2)

13998_wp_page_menu_incosistence.patch (1.3 KB) - added by Sanjo 3 years ago.
wp_page_menu() has now a container_class and a menu_class argument that are identical to wp_nav_menu.
13998_wp_page_menu_incosistence_2.patch (2.0 KB) - added by Sanjo 3 years ago.
Added documentation

Download all attachments as: .zip

Change History (8)

Related #13979

  • Milestone changed from Awaiting Review to 3.1
  • Keywords needs-patch added

Needs patch or punt.

Sanjo3 years ago

wp_page_menu() has now a container_class and a menu_class argument that are identical to wp_nav_menu.

  • Keywords has-patch added; needs-patch removed

Sanjo3 years ago

Added documentation

  • Keywords needs-patch added; dev-feedback has-patch removed

We can't change how wp_page_menu() works. We'll need to add a ul_class argument to wp_page_menu and re-map menu_class to ul_class in wp_nav_menu before passing it to wp_page_menu.

  • Milestone changed from 3.1 to Future Release
  • Type changed from defect (bug) to enhancement
Note: See TracTickets for help on using tickets.