PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 3.1.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v3.1.0
5.12.0 5.13.0 5.13.1 5.11.0 5.10.0 5.9.0 5.8.0 5.8.1 5.7.0 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 All 47 releases
double-opt-in / core / cron.php

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

44 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace forge12\contactform7\CF7DoubleOptIn;
3
4 use Forge12\Shared\Logger;
5
6 /**
7 * Registriert alle Cronjobs für das Plugin.
8 */
9 function add_cron_jobs() {
10 $logger = Logger::getInstance();
11
12 // 🔹 Daily Telemetry Job
13 if ( ! wp_next_scheduled( 'f12_cf7_doubleoptin_daily_telemetry' ) ) {
14 wp_schedule_event( time(), 'daily', 'f12_cf7_doubleoptin_daily_telemetry' );
15 $logger->info( "Cron event scheduled", [
16 'plugin' => 'double-opt-in',
17 'job' => 'f12_cf7_doubleoptin_daily_telemetry',
18 'interval' => 'daily'
19 ] );
20 } else {
21 $logger->debug( "Cron event already scheduled", [
22 'plugin' => 'double-opt-in',
23 'job' => 'f12_cf7_doubleoptin_daily_telemetry',
24 'interval' => 'daily',
25 ] );
26 }
27
28 // Add cron
29 if ( ! wp_next_scheduled( 'dailyOptinClear' ) ) {
30 wp_schedule_event( time(), 'daily', 'dailyOptinClear' );
31 $logger->info( 'Cron event scheduled', [
32 'plugin' => 'double-opt-in',
33 'job' => 'dailyOptinClear',
34 'interval' => 'daily',
35 ] );
36 } else {
37 $logger->debug( 'Cron event already scheduled', [
38 'plugin' => 'double-opt-in',
39 'job' => 'dailyOptinClear',
40 'interval' => 'daily',
41 ] );
42 }
43 }
44