WordPress at a glance
функция не описана

_nav_menu_item_id_use_once() WP 3.0.1

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

Хуков нет.

Возвращает

String.

Использование

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

Changelog

Since 3.0.1 Introduced.

Код _nav_menu_item_id_use_once() WP 5.5.1

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