Opened 11 years ago
Last modified 6 days ago
#31391 new enhancement
Make the list of registered nav menus filterable
| Reported by: | csschris | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | 3.6 |
| Severity: | normal | Keywords: | has-patch needs-docs has-unit-tests |
| Cc: | Focuses: | administration |
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 (6)
#1
@
11 years ago
- Keywords has-patch added
- Summary Apply Filter for list of registered menu theme locations in nav-menus.php?action=locations → Make the list registered nav menus filterable
- Version trunk → 3.6
#2
@
11 years ago
- Focuses multisite removed
- Summary Make the list registered nav menus filterable → Make the list of registered nav menus filterable
#4
@
10 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.
This ticket was mentioned in PR #12559 on WordPress/wordpress-develop by @sainathpoojary.
6 days ago
#5
- Keywords has-unit-tests added; needs-unit-tests removed
Trac ticket: #31391
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.