Ticket #14001 (closed enhancement: fixed)
Menu Locations should be unregisterable by child themes
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0.1 |
| Component: | Menus | Version: | 3.0 |
| Severity: | normal | Keywords: | |
| Cc: | aaron@… |
Description (last modified by nacin) (diff)
Right now there is no function to unregister menu locations. This means that child themes can't unregister a menu location that the parent has registered.
Attachments
Change History
- Milestone changed from Unassigned to 3.1
It should return true/false based on success.
We haven't decided on what 3.1 will look like yet, which would in turn affect what we end up backporting to 3.0.1 (whether it'll be more than just blockers). Seems fine for 3.1 for now.
- Description modified (diff)
I wish I had thought of this function when I wrote those originally. I had written remove_theme_support in 3.0 as well, and this one is sorely missing.
This was an oversight and while I would like for it to get in 3.0.1, but will also understand if 3.0.1 is a blocker/security only release.
I've updated it to return a bool value
I also added an is_array check since if it's called before any menu is registered, $_wp_registered_nav_menus won't be an array yet.
There seemed to be some momentum and discussion on moving this into 3.1 for sure and potentially 3.0.1. If it doesn't go in 3.0.1, I think a wpdevel post linking to or using the code I put out at http://aaron.jorb.in/blog/2010/06/how-to-remove-a-nav-menu-location-in-wordpress-3-0-0/ would be beneficial for child theme devs.
https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2010-06-24#m155929
- Status changed from new to closed
- Resolution set to fixed

