On this page
wp_generate_uuid4(): string
Generates a random UUID (version 4).
Return
string UUID.
Source
File: wp-includes/functions.php. View all references
function wp_generate_uuid4() {
return sprintf(
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
mt_rand( 0, 0xffff ),
mt_rand( 0, 0xffff ),
mt_rand( 0, 0xffff ),
mt_rand( 0, 0x0fff ) | 0x4000,
mt_rand( 0, 0x3fff ) | 0x8000,
mt_rand( 0, 0xffff ),
mt_rand( 0, 0xffff ),
mt_rand( 0, 0xffff )
);
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Application_Passwords::create_new_application_password() wp-includes/class-wp-application-passwords.php | Creates a new application password. |
| WP_Application_Passwords::get_user_application_passwords() wp-includes/class-wp-application-passwords.php | Gets a user’s application passwords. |
| WP_Customize_Manager::establish_loaded_changeset() wp-includes/class-wp-customize-manager.php | Establishes the loaded changeset. |
| WP_Customize_Manager::_publish_changeset_values() wp-includes/class-wp-customize-manager.php | Publishes the values of a changeset. |
| WP_Customize_Manager::save_changeset_post() wp-includes/class-wp-customize-manager.php | Saves the post for the loaded changeset. |
| WP_Customize_Manager::save() wp-includes/class-wp-customize-manager.php | Handles customize_save WP Ajax request to save/update a changeset. |
| WP_Customize_Manager::__construct() wp-includes/class-wp-customize-manager.php | Constructor. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_generate_uuid4