PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / trunk
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification vtrunk
5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 All 38 releases
double-opt-in / core / helpers / uuid.php

uuid.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification trunk, at core/helpers/uuid.php

28 lines 796 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 if ( ! function_exists( 'f12_cf7_doubleoptin_get_installation_uuid' ) ) {
7 function f12_cf7_doubleoptin_get_installation_uuid(): string {
8 $uuid = get_option( 'f12_cf7_doubleoptin_installation_uuid' );
9 if ( empty( $uuid ) ) {
10 if ( function_exists( 'wp_generate_uuid4' ) ) {
11 $uuid = wp_generate_uuid4();
12 } else {
13 $uuid = sprintf(
14 '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
15 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
16 mt_rand( 0, 0xffff ),
17 mt_rand( 0, 0x0fff ) | 0x4000,
18 mt_rand( 0, 0x3fff ) | 0x8000,
19 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
20 );
21 }
22 update_option( 'f12_cf7_doubleoptin_installation_uuid', $uuid, true );
23 }
24
25 return $uuid;
26 }
27 }
28