wp_unique_id
wp_unique_id ( $prefix = '' )
Parameters:- (string) prefix Prefix for the returned ID.
Returns:Defined at: - Introduced in WordPress: 5.0.3
- Deprecated in WordPress: —
Description
Gets unique ID.This is a PHP implementation of Underscore's uniqueId method. A static variable
contains an integer that is incremented with each call. This number is returned
with the optional prefix. As such the returned value is not universally unique,
but it is unique across the life of the PHP process.