Summery Summery
Print the markup for new menu items.
Syntax Syntax
Description Description
To be used in the template #available-menu-items.
Parameters Parameters
- $available_item_type
-
(Required) Menu item data to output, including title, type, and label.
Return Return
(void)
Source Source
File: wp-includes/class-wp-customize-nav-menus.php
public function available_items_template() { ?> <div id="available-menu-items" class="accordion-container"> <div class="customize-section-title"> <button type="button" class="customize-section-back" tabindex="-1"> <span class="screen-reader-text"><?php _e( 'Back' ); ?></span> </button> <h3> <span class="customize-action"> <?php /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ printf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'nav_menus' )->title ) ); ?> </span> <?php _e( 'Add Menu Items' ); ?> </h3> </div> <div id="available-menu-items-search" class="accordion-section cannot-expand"> <div class="accordion-section-title"> <label class="screen-reader-text" for="menu-items-search"><?php _e( 'Search Menu Items' ); ?></label> <input type="text" id="menu-items-search" placeholder="<?php esc_attr_e( 'Search menu items…' ); ?>" aria-describedby="menu-items-search-desc" /> <p class="screen-reader-text" id="menu-items-search-desc"><?php _e( 'The search results will be updated as you type.' ); ?></p> <span class="spinner"></span> </div> <div class="search-icon" aria-hidden="true"></div> <button type="button" class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></button> <ul class="accordion-section-content available-menu-items-list" data-type="search"></ul> </div> <?php // Ensure the page post type comes first in the list. $item_types = $this->available_item_types(); $page_item_type = null; foreach ( $item_types as $i => $item_type ) {
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |