An ACF field type that generates a unique ID.
- Download the whole repo
- Upload the
acf-unique-id
folder to yourwp-content/plugins
folder - Activate the plugin via the Plugins admin page
- Create a new field via ACF and select the Unique ID type
composer require iamntz/acf-unique-id
Then in your theme/plugin, init by new iamntz\acf\unique_id\InitAcfUniqueID();
By default, the generated field gives you a random 16 character string, separated by dashes similar to this:
ade5-8d58-b319-1678
You can change the length of the string, and the separator in the field options.
Also, you can enable debug, so the field will be visible in the admin area, and you can see the generated ID.
MIT.