#14001 closed enhancement (fixed)
Menu Locations should be unregisterable by child themes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0.1 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
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 (2)
Change History (11)
#2
@
13 years ago
- 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.
#3
@
13 years ago
- 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.
#4
@
13 years ago
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
#5
@
13 years ago
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.
#6
@
13 years ago
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
(cut off above)
That the parent has registered.