available_item_types example

if ( 1 === $num_locations ) {
            $locations_description = __( 'Your theme can display menus in one location.' );
        } else {
            /* translators: %s: Number of menu locations. */
            $locations_description = sprintf( _n( 'Your theme can display menus in %s location.', 'Your theme can display menus in %s locations.', $num_locations )number_format_i18n( $num_locations ) );
        }

        // Pass data to JS.         $settings = array(
            'allMenus'                 => wp_get_nav_menus(),
            'itemTypes'                => $this->available_item_types(),
            'l10n'                     => array(
                'untitled'               => _x( '(no label)', 'missing menu item navigation label' ),
                'unnamed'                => _x( '(unnamed)', 'Missing menu name.' ),
                'custom_label'           => __( 'Custom Link' ),
                'page_label'             => get_post_type_object( 'page' )->labels->singular_name,
                /* translators: %s: Menu location. */
                'menuLocation'           => _x( '(Currently set to: %s)', 'menu' ),
                'locationsTitle'         => 1 === $num_locations ? __( 'Menu Location' ) : __( 'Menu Locations' ),
                'locationsDescription'   => $locations_description,
                'menuNameLabel'          => __( 'Menu Name' ),
                'newMenuNameDescription' => __( 'If your theme has multiple menus, giving them clear names will help you manage them.' ),
                
Home | Imprint | This part of the site doesn't use cookies.