Opened 12 years ago
Closed 12 years ago
#29461 closed enhancement (fixed)
Use get_registered_nav_menus() instead of $_wp_registered_nav_menus
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.1 | Priority: | normal |
| Severity: | normal | Version: | 3.0 |
| Component: | Menus | Keywords: | good-first-bug has-patch |
| Focuses: | Cc: |
Description
Follow up to #27735. Whenever we're only reading from this value, we should use the public API.
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
I could only find 4 uses of
$_wp_registered_nav_menusin wp-includes/nav-menu.php.register_nav_menus()unregister_nav_menu()get_registered_nav_menus()has_nav_menu()This variable is modified in 1 and 2. So the only valid change would be 4. I think this patch should do.
I couldn't find other occurrences of
$_wp_registered_nav_menus.