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 | src/Admin/AdminPageController.php +38 -1 5.1.5 → 5.6.2 View file →
@@ -250,9 +250,11 @@
250 250 'loadedAddons' => $this->getLoadedAddonIds(),
251 251 'registeredAddons' => $this->getRegisteredAddonIds(),
252 252 'version' => defined( 'FORGE12_OPTIN_VERSION' ) ? FORGE12_OPTIN_VERSION : '0.0.0',
253 253 'emailEditorUrl' => admin_url( 'admin.php?page=f12-doi-admin#/email-templates' ),
254 - 'upgradeUrl' => 'https://www.forge12.com',
254 + 'upgradeUrl' => $this->productUrl( 'admin-upgrade', 'https://www.forge12.com' ),
255 + 'supportUrl' => $this->supportUrl(),
256 + 'feedbackUrl' => $this->feedbackUrl(),
255 257 'adminUrl' => admin_url(),
256 258 // Nonce for the legacy admin-ajax `doi_export_consent`
257 259 // handler. The handler hard-requires `_wpnonce` in
258 260 // `$_REQUEST` keyed on action `doi_consent_export`; without
@@ -276,8 +278,43 @@
276 278 */
277 279 $config = apply_filters( 'f12_doi_admin_localize_data', $config );
278 280
279 281 wp_localize_script( 'doi-admin-ui', 'doiAdmin', $config );
282 + }
283 +
284 + /**
285 + * Product-site link for the SPA.
286 + *
287 + * The URL builders live in core/feedback.php, a plain-function file in the
288 + * legacy namespace rather than an autoloaded class. The guard is not
289 + * ceremony: this controller is also exercised by tests that do not load that
290 + * file, and a fatal there would be a poor trade for a marketing link.
291 + *
292 + * @param string $from Entry point recorded on the link.
293 + * @param string $fallback Used when core/feedback.php is not loaded.
294 + */
295 + private function productUrl( string $from, string $fallback ): string {
296 + $fn = '\\forge12\\contactform7\\CF7DoubleOptIn\\get_product_url';
297 +
298 + return function_exists( $fn ) ? esc_url_raw( $fn( $from ) ) : $fallback;
299 + }
300 +
301 + /**
302 + * Support link for the SPA. Empty when unavailable, so the UI can hide it.
303 + */
304 + private function supportUrl(): string {
305 + $fn = '\\forge12\\contactform7\\CF7DoubleOptIn\\get_support_url';
306 +
307 + return function_exists( $fn ) ? esc_url_raw( $fn( 'admin-spa' ) ) : '';
308 + }
309 +
310 + /**
311 + * Feedback link for the SPA. Empty when unavailable, so the UI can hide it.
312 + */
313 + private function feedbackUrl(): string {
314 + $fn = '\\forge12\\contactform7\\CF7DoubleOptIn\\get_feedback_url';
315 +
316 + return function_exists( $fn ) ? esc_url_raw( $fn( 'admin-spa' ) ) : '';
280 317 }
281 318
282 319 /**
283 320 * Feed the active locale's "double-opt-in" translations to wp.i18n so the