WP_Customize_Nav_Menus::print_custom_links_available_menu_item()

In this article

Prints the markup for available menu item custom links.

Source

protected function print_custom_links_available_menu_item() {
	?>
	<div id="new-custom-menu-item" class="accordion-section">
		<h4 class="accordion-section-title" role="presentation">
			<?php _e( 'Custom Links' ); ?>
			<button type="button" class="button-link" aria-expanded="false">
				<span class="screen-reader-text">
					<?php
					/* translators: Hidden accessibility text. */
					_e( 'Toggle section: Custom Links' );
					?>
				</span>
				<span class="toggle-indicator" aria-hidden="true"></span>
			</button>
		</h4>
		<div class="accordion-section-content customlinkdiv">
			<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://">
			</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">
			</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
}

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.