Opened 14 years ago
Closed 14 years ago
#22331 closed defect (bug) (fixed)
show_home not working on wp_page_menu
| Reported by: | brasofilo | Owned by: | lancewillett |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
As reported here, this function call doesn't returns the expected output:
wp_page_menu( array( 'show_home' => 'Hjem', 'sort_column' => 'menu_order' ) );
Looks like show_home is being ignored. It keeps outputting "Home" instead of the custom text and even setting it as false doesn't behave as expected.
If the filter wp_page_menu_args is used, wp_page_menu works correctly.
Tested in WordPress 3.4.2 and 3.5-beta2, no active plugins, using TwentyEleven.
Attachments (2)
Change History (6)
#1
@
14 years ago
- Component General → Bundled Theme
- Keywords has-patch added
- Milestone Awaiting Review → 3.5
Version 0, edited 14 years ago by
(next)
#2
@
14 years ago
22331.2.patch uses isset instead of empty which also allows 'show_menu' => false with wp_page_menu.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The culprit is
twentyeleven_page_menu_args()(twentytwelve_page_menu_args()in Twenty Twelve).In ignores any passed value and enforces
trueinstead:http://core.trac.wordpress.org/browser/tags/3.4.2/wp-content/themes/twentyeleven/functions.php#L372
22331.patch is a fix for all three themes.