Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_nav_menu_item_id_use_once( string $id, object $item )
Prevents a menu item ID from being used more than once.
Description Description
Parameters Parameters
- $id
-
(string) (Required)
- $item
-
(object) (Required)
Return Return
(string)
Source Source
File: wp-includes/nav-menu-template.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; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.1 | Introduced. |