PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.1.5
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.1.5
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 / cron.php

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

48 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 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 /**
11 * Registriert alle Cronjobs für das Plugin.
12 */
13 function add_cron_jobs() {
14 $logger = Logger::getInstance();
15
16 // 🔹 Daily Telemetry Job
17 if ( ! wp_next_scheduled( 'f12_cf7_doubleoptin_daily_telemetry' ) ) {
18 wp_schedule_event( time(), 'daily', 'f12_cf7_doubleoptin_daily_telemetry' );
19 $logger->info( "Cron event scheduled", [
20 'plugin' => 'double-opt-in',
21 'job' => 'f12_cf7_doubleoptin_daily_telemetry',
22 'interval' => 'daily'
23 ] );
24 } else {
25 $logger->debug( "Cron event already scheduled", [
26 'plugin' => 'double-opt-in',
27 'job' => 'f12_cf7_doubleoptin_daily_telemetry',
28 'interval' => 'daily',
29 ] );
30 }
31
32 // Add cron
33 if ( ! wp_next_scheduled( 'dailyOptinClear' ) ) {
34 wp_schedule_event( time(), 'daily', 'dailyOptinClear' );
35 $logger->info( 'Cron event scheduled', [
36 'plugin' => 'double-opt-in',
37 'job' => 'dailyOptinClear',
38 'interval' => 'daily',
39 ] );
40 } else {
41 $logger->debug( 'Cron event already scheduled', [
42 'plugin' => 'double-opt-in',
43 'job' => 'dailyOptinClear',
44 'interval' => 'daily',
45 ] );
46 }
47 }
48