acf_uniqid()
acf_uniqid
Returns a unique numeric based id.
Хуков нет.
Возвращает
Строку
.
Использование
acf_uniqid( $prefix );
- $prefix(строка)
- The id prefix.
По умолчанию: 'acf'
Список изменений
С версии 5.7.10 | Введена. |
Код acf_uniqid() acf uniqid ACF 6.0.4
function acf_uniqid( $prefix = 'acf' ) { // Instantiate global counter. global $acf_uniqid; if ( ! isset( $acf_uniqid ) ) { $acf_uniqid = 1; } // Return id. return $prefix . '-' . $acf_uniqid++; }