WP_Customize_Nav_Menus::print_custom_links_available_menu_item()protectedWP 4.7.0

Prints the markup for available menu item custom links.

Method of the class: WP_Customize_Nav_Menus{}

No Hooks.

Return

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() code WP 6.6.2

<?php
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
}