WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#35640 new defect (bug)

No API to set a nav menu location

Reported by: dd32 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

We've got an API to retrieve the nav menu locations - get_nav_menu_locations() however, there's nothing (as far as I can tell) to set a theme location, either singularly or for all menu's.

We should probably have a method that can be used to set a single theme locations menu, and one to bulk-set.

For reference, the admin pages currently all call set_theme_mod( 'nav_menu_locations', $locations ); directly.

Change History (4)

#1 @ericlewis
4 years ago

  • Milestone changed from Awaiting Review to Future Release

It's true... I wonder if this was intentional or just an oversight.

#2 @DrewAPicture
4 years ago

  • Milestone changed from Future Release to Awaiting Review

Let's leave it as Awaiting Review til there's a patch ;)

#3 @ericlewis
4 years ago

Isn't Awaiting Review the milestone for tickets that have not been triaged, which either go to Future Release (meaning yes we should do this at some point) or close?

#4 @DrewAPicture
4 years ago

Awaiting Review doesn't really have a good meaning, which is part of the big problem with a needs-based workflow rather than a status-based one.

I would probably never mark something future release without a patch. The point is that there are good ideas, and then there are good ideas with patches awaiting review. I would tend to give preference to the latter for "punting".

Note: See TracTickets for help on using tickets.