WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_unique_id() WP 5.0.3

Get 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.

  • Static. Число. $id_counter

Хуков нет.


Строку. Unique ID.


wp_unique_id( $prefix );
Prefix for the returned ID.
По умолчанию: ''

Код wp unique id: wp-includes/functions.php WP 5.2.2

function wp_unique_id( $prefix = '' ) {
	static $id_counter = 0;
	return $prefix . (string) ++$id_counter;