Make WordPress Core

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)

31391.patch (480 bytes ) - added by csschris 11 years ago.

Download all attachments as: .zip

Change History (6)

@csschris
11 years ago

#1 @DrewAPicture
11 years ago

  • Keywords has-patch added
  • Summary Apply Filter for list of registered menu theme locations in nav-menus.php?action=locationsMake the list registered nav menus filterable
  • Version trunk3.6

#2 @SergeyBiryukov
11 years ago

  • Focuses multisite removed
  • Summary Make the list registered nav menus filterableMake the list of registered nav menus filterable

#3 @csschris
11 years ago

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.

#4 @welcher
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

Note: See TracTickets for help on using tickets.