PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 3.0.3
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v3.0.3
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 3.0.70 3.0.71 3.0.72 All 35 releases
double-opt-in / OnUpdate.php

OnUpdate.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 3.0.3, at OnUpdate.php

34 lines 990 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace forge12\contactform7\CF7DoubleOptIn;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 function onUpdate() {
10 // Only run if the version installed not exist or the version is < 1.7
11 // this will add categories to already existing plugins
12 if ( version_compare( get_site_option( FORGE12_OPTIN_SLUG . '_version' ), '1.7' ) < 0 ) {
13 createTableOptinCategories();
14 createTableOptin();
15
16 update_option( FORGE12_OPTIN_SLUG . '_version', '1.7' );
17 }
18
19 // Only run if the version installed not exist or the version is < 2.0
20 // this will add categories to already existing plugins
21 if ( version_compare( get_site_option( FORGE12_OPTIN_SLUG . '_version' ), '2.0' ) < 0 ) {
22 createTableOptin();
23
24 update_option( FORGE12_OPTIN_SLUG . '_version', '2.0' );
25 }
26
27 if ( version_compare( get_site_option( FORGE12_OPTIN_SLUG . '_version' ), '3.0.1' ) < 0 ) {
28 createTableOptin();
29
30 update_option( FORGE12_OPTIN_SLUG . '_version', '3.0.1' );
31 }
32 }
33
34 onUpdate();