Opened 10 years ago
Last modified 6 years ago
#31391 new enhancement
Make the list of registered nav menus filterable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | Menus | Keywords: | has-patch needs-docs needs-unit-tests |
Focuses: | administration | Cc: |
Description
Adding a filter to the list of registered menu locations before they are displayed in the admin section allows for easy reordering and/or selectively hiding menu locations to none admin users.
Attachments (1)
Change History (5)
#1
@
10 years ago
- Keywords has-patch added
- Summary changed from Apply Filter for list of registered menu theme locations in nav-menus.php?action=locations to Make the list registered nav menus filterable
- Version changed from trunk to 3.6
#2
@
10 years ago
- Focuses multisite removed
- Summary changed from Make the list registered nav menus filterable to Make the list of registered nav menus filterable
#4
@
9 years ago
- Keywords needs-docs needs-unit-tests added
The patch still applies but we need some inline docs - https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#4-hooks-actions-and-filter.
I would implement the filter everywhere it needs to go so the patch represents the entire change set and some unit tests couldn't either.
Note: See
TracTickets for help on using
tickets.
The call to get_registered_nav_menus() is done multiple times throughout wp-admin/nav-menus.php If approved, every call on the page should probably get filtered. My submitted patch only changes it in one place.