PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.7.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.7.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 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 All 41 releases
← All changes | src/FollowUp/FollowUpAdapterRegistry.php +1 -21 trunk → 5.7.0 View file →
@@ -27,38 +27,18 @@
27 27
28 28 /** @var array<string, FollowUpAdapterInterface> */
29 29 private $adapters = array();
30 30
31 - /** @var array<string, GlobalFollowUpAdapterInterface> */
32 - private $globals = array();
33 -
34 31 /** @var bool */
35 32 private $hookFired = false;
36 33
37 34 public function register( FollowUpAdapterInterface $adapter ): void {
38 - if ( $adapter instanceof GlobalFollowUpAdapterInterface ) {
39 - $this->globals[ $adapter->getIntegration() ] = $adapter;
40 - return;
41 - }
42 35 $this->adapters[ $adapter->getIntegration() ] = $adapter;
43 36 }
44 37
45 - /**
46 - * Form or global adapter by the integration stored on a row.
47 - */
48 38 public function get( string $integration ): ?FollowUpAdapterInterface {
49 39 $this->fireHookOnce();
50 - return $this->adapters[ $integration ] ?? $this->globals[ $integration ] ?? null;
51 - }
52 -
53 - /**
54 - * Adapters that follow up every opt-in (since 5.8.0).
55 - *
56 - * @return array<string, GlobalFollowUpAdapterInterface>
57 - */
58 - public function globals(): array {
59 - $this->fireHookOnce();
60 - return $this->globals;
40 + return $this->adapters[ $integration ] ?? null;
61 41 }
62 42
63 43 /**
64 44 * Find the adapter responsible for an opt-in.