WordPress at Your Fingertips
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.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

String.

Usage

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

Changelog

Since 3.0.1 Introduced.

Code of _nav_menu_item_id_use_once() WP 5.8

<?php
function _nav_menu_item_id_use_once( $id, $item ) {
	static $_used_ids = array();

	if ( in_array( $item->ID, $_used_ids, true ) ) {
		return '';
	}

	$_used_ids[] = $item->ID;

	return $id;
}