WP_Customize_Nav_Menus::print_custom_links_available_menu_item
Prints the markup for available menu item custom links.
Method of the class: WP_Customize_Nav_Menus{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->print_custom_links_available_menu_item();
Changelog
| Since 4.7.0 | Introduced. |
WP_Customize_Nav_Menus::print_custom_links_available_menu_item() WP Customize Nav Menus::print custom links available menu item code WP 7.0
<?php
protected function print_custom_links_available_menu_item() {
?>
<div id="new-custom-menu-item" class="accordion-section">
<h4 class="accordion-section-title">
<button type="button" class="accordion-trigger" aria-expanded="false" aria-controls="new-custom-menu-item-content">
<?php _e( 'Custom Links' ); ?>
<span class="toggle-indicator" aria-hidden="true"></span>
</button>
</h4>
<div class="accordion-section-content customlinkdiv" id="new-custom-menu-item-content">
<input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" />
<p id="menu-item-url-wrap" class="wp-clearfix">
<label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
<input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" placeholder="https://">
<span id="custom-url-error" class="error-message" style="display: none;"><?php _e( 'Please provide a valid link.' ); ?></span>
</p>
<p id="menu-item-name-wrap" class="wp-clearfix">
<label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
<input id="custom-menu-item-name" name="menu-item[-1][menu-item-title]" type="text" class="regular-text menu-item-textbox">
<span id="custom-name-error" class="error-message" style="display: none;"><?php _e( 'The link text cannot be empty.' ); ?></span>
</p>
<p class="button-controls">
<span class="add-to-menu">
<input type="submit" class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="custom-menu-item-submit">
<span class="spinner"></span>
</span>
</p>
</div>
</div>
<?php
}