WordPress at a glance
function is not described

_nav_menu_item_id_use_once() WP 3.0.1

Prevents a menu item ID from being used more than once.

  • Static. Array. $used_ids

No Hooks.

Return

String.

Usage

_nav_menu_item_id_use_once( $id, $item );
$id(string) (required)
$item(object) (required)

Code of nav menu item id use once: wp-includes/nav-menu-template.php VER 5.0.3

<?php
function _nav_menu_item_id_use_once( $id, $item ) {
	static $_used_ids = array();
	if ( in_array( $item->ID, $_used_ids ) ) {
		return '';
	}
	$_used_ids[] = $item->ID;
	return $id;
}