get_nav_menu_locations()
Retrieves all registered navigation menu locations and the menus assigned to them.
Description Description
Return Return
(array) Registered navigation menu locations and the menus assigned them. If none are registered, an empty array.
Source Source
File: wp-includes/nav-menu.php
function get_nav_menu_locations() { $locations = get_theme_mod( 'nav_menu_locations' ); return ( is_array( $locations ) ) ? $locations : array(); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Allows the editor role to modify menus
Expand full source codeCollapse full source code