wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
_wp_menus_changed is private and should not be used in themes or plugins directly.
_wp_menus_changed › WordPress Function
Od4.9.0
Przestarzałyn/a
› _wp_menus_changed ( Brak parametrów )
Dostęp: |
|
Zdefiniowane na: |
|
Codex: |
Handles menu config after theme change.
Powiązane Funkcje: _wp_sidebars_changed, wp_cache_set_last_changed, wp_cache_get_last_changed, add_menu_page, _wp_link_page
Źródło
function _wp_menus_changed() { $old_nav_menu_locations = get_option( 'theme_switch_menu_locations', array() ); $new_nav_menu_locations = get_nav_menu_locations(); $mapped_nav_menu_locations = wp_map_nav_menu_locations( $new_nav_menu_locations, $old_nav_menu_locations ); set_theme_mod( 'nav_menu_locations', $mapped_nav_menu_locations ); delete_option( 'theme_switch_menu_locations' ); }