wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
register_nav_menus › WordPress Function
Seit3.0.0
Veraltetn/v
› register_nav_menus ( $locations = array() )
Parameter: |
|
Definiert in: |
|
Codex: |
Registers navigation menu locations for a theme.
Ähnliche Funktionen: register_nav_menu, unregister_nav_menu, get_registered_nav_menus, is_nav_menu, register_new_user
Quellcode
function register_nav_menus( $locations = array() ) { global $_wp_registered_nav_menus; add_theme_support( 'menus' ); foreach ( $locations as $key => $value ) { if ( is_int( $key ) ) { _doing_it_wrong( __FUNCTION__, __( 'Nav menu locations must be strings.' ), '5.3.0' ); break; } } $_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations ); }