PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.8.1
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.8.1
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/Admin/AdminPageController.php +38 -0 5.6.3 → 5.8.1 View file →
@@ -263,8 +263,14 @@
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(),
270 + // Installed form plugins, so the forms page offers only add-ons
271 + // for plugins this site actually runs.
272 + 'formPlugins' => $this->formPlugins(),
267 273 );
268 274
269 275 /**
270 276 * Filter the admin SPA configuration data.
@@ -291,8 +297,40 @@
291 297 *
292 298 * @param string $from Entry point recorded on the link.
293 299 * @param string $fallback Used when core/feedback.php is not loaded.
294 300 */
301 + /**
302 + * @return array<int, array{id: string, name: string, addonLoaded: bool, productUrl: string}>
303 + */
304 + private function formPlugins(): array {
305 + $plugins = array();
306 + foreach ( ( new \Forge12\DoubleOptIn\Setup\FormPluginDetector() )->installed() as $plugin ) {
307 + $plugins[] = array(
308 + 'id' => $plugin['id'],
309 + 'name' => $plugin['name'],
310 + 'addonLoaded' => $plugin['addonLoaded'],
311 + 'productUrl' => $this->productUrl( 'forms-detected-' . $plugin['id'], '' ),
312 + );
313 + }
314 + return $plugins;
315 + }
316 +
317 + /**
318 + * @return array{status: string, step: int, steps: int}|null
319 + */
320 + private function setupState(): ?array {
321 + $state = new \Forge12\DoubleOptIn\Setup\SetupState();
322 + if ( ! $state->exists() ) {
323 + return null;
324 + }
325 + $current = $state->get();
326 + return array(
327 + 'status' => $current['status'],
328 + 'step' => $current['step'],
329 + 'steps' => \Forge12\DoubleOptIn\Setup\SetupState::STEPS,
330 + );
331 + }
332 +
295 333 private function productUrl( string $from, string $fallback ): string {
296 334 $fn = '\\forge12\\contactform7\\CF7DoubleOptIn\\get_product_url';
297 335
298 336 return function_exists( $fn ) ? esc_url_raw( $fn( $from ) ) : $fallback;