PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.6.2
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.6.2
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
← All changes | compatibility/cf7/ControllerCF7.class.php +37 -3 3.0.62 → 5.6.2 View file →
@@ -8,8 +8,12 @@
8 8 /**
9 9 * Class ControllerCF7
10 10 *
11 11 * @package forge12\contactform7\CF7OptIn
12 + *
13 + * @deprecated 4.0.0 This controller is part of the legacy system.
14 + * Use the filter 'f12_cf7_doubleoptin_use_new_integration_system' to switch
15 + * to the new event-based integration system.
12 16 */
13 17 class ControllerCF7 extends BaseController {
14 18 /**
15 19 * Admin constructor.
@@ -14,15 +18,45 @@
14 18 /**
15 19 * Admin constructor.
16 20 */
17 21 public function on_init() {
22 + /**
23 + * Check if the new integration system is active.
24 + * If so, skip loading the legacy classes to avoid duplicate processing.
25 + *
26 + * @since 4.0.0
27 + */
28 + if ( apply_filters( 'f12_cf7_doubleoptin_use_new_integration_system', true ) ) {
29 + $this->get_logger()->info( 'Legacy CF7 controller skipped - new integration system is active', [
30 + 'plugin' => 'double-opt-in',
31 + 'class' => __CLASS__,
32 + ] );
33 + return;
34 + }
35 +
36 + $this->get_logger()->debug( 'CF7 integration on_init started', [
37 + 'plugin' => 'double-opt-in',
38 + 'class' => __CLASS__,
39 + 'method' => __METHOD__,
40 + ] );
41 +
18 42 require_once( 'CF7Frontend.class.php' );
19 - $Frontend = new CF7Frontend();
43 + $Frontend = new CF7Frontend( $this->get_logger() );
44 + $this->get_logger()->debug( 'CF7Frontend initialized', [
45 + 'plugin' => 'double-opt-in',
46 + ] );
20 47
21 48 require_once( 'CF7Backend.class.php' );
22 - $Backend = new CF7Backend();
49 + $Backend = new CF7Backend( $this->get_logger() );
50 + $this->get_logger()->debug( 'CF7Backend initialized', [
51 + 'plugin' => 'double-opt-in',
52 + ] );
23 53
24 54 require_once( 'CF7ConditionalFields.class.php' );
25 - $CF = new CF7ConditionalFields();
55 + $CF = new CF7ConditionalFields( $this->get_logger() );
56 + $this->get_logger()->debug( 'CF7ConditionalFields initialized', [
57 + 'plugin' => 'double-opt-in',
58 + ] );
26 59 }
60 +
27 61 }
28 62 }