mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Customize: Implement customized state persistence with changesets.
Includes infrastructure developed in the Customize Snapshots feature plugin. See https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/ Props westonruter, valendesigns, utkarshpatel, stubgo, lgedeon, ocean90, ryankienstra, mihai2u, dlh, aaroncampbell, jonathanbardo, jorbin. See #28721. See #31089. Fixes #30937. Fixes #31517. Fixes #30028. Fixes #23225. Fixes #34142. Fixes #36485. git-svn-id: https://develop.svn.wordpress.org/trunk@38810 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -5523,3 +5523,20 @@ function wp_raise_memory_limit( $context = 'admin' ) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a random UUID (version 4).
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @return string UUID.
|
||||
*/
|
||||
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 )
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user