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.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 3.0.60 3.0.61 All 39 releases
← All changes | src/Admin/AdminPageController.php +19 -0 5.4.0 → 5.7.0 View file →
@@ -263,8 +263,11 @@
263 263 // 2026-05-13). REST routes use the separate `nonce` field
264 264 // above with action `wp_rest` — they live in different
265 265 // namespaces, so a single shared nonce won't work.
266 266 'consentExportNonce' => wp_create_nonce( 'doi_consent_export' ),
267 + // Setup wizard state for the dashboard card. Null on sites that
268 + // were installed before the wizard existed.
269 + 'setup' => $this->setupState(),
267 270 );
268 271
269 272 /**
270 273 * Filter the admin SPA configuration data.
@@ -291,8 +294,24 @@
291 294 *
292 295 * @param string $from Entry point recorded on the link.
293 296 * @param string $fallback Used when core/feedback.php is not loaded.
294 297 */
298 + /**
299 + * @return array{status: string, step: int, steps: int}|null
300 + */
301 + private function setupState(): ?array {
302 + $state = new \Forge12\DoubleOptIn\Setup\SetupState();
303 + if ( ! $state->exists() ) {
304 + return null;
305 + }
306 + $current = $state->get();
307 + return array(
308 + 'status' => $current['status'],
309 + 'step' => $current['step'],
310 + 'steps' => \Forge12\DoubleOptIn\Setup\SetupState::STEPS,
311 + );
312 + }
313 +
295 314 private function productUrl( string $from, string $fallback ): string {
296 315 $fn = '\\forge12\\contactform7\\CF7DoubleOptIn\\get_product_url';
297 316
298 317 return function_exists( $fn ) ? esc_url_raw( $fn( $from ) ) : $fallback;