| @@ -207,18 +207,19 @@ | ||
| 207 | 207 | |
| 208 | 208 | if ( 'cf-turnstile' === $this->captcha_security_type ) { |
| 209 | 209 | if ( ! empty( $this->cf_turnstile_site_key ) ) { |
| 210 | 210 | // Cloudflare Turnstile script. |
| 211 | - wp_enqueue_script( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion | |
| 211 | + // phpcs:disable WordPress.WP.EnqueuedResourceParameters.MissingVersion, PluginCheck.CodeAnalysis.EnqueuedResourceOffloading.OffloadedContent -- Cloudflare Turnstile must be loaded from Cloudflare's servers for token verification; the version is controlled by Cloudflare. | |
| 212 | + wp_enqueue_script( | |
| 212 | 213 | SRFM_SLUG . '-cf-turnstile', |
| 213 | 214 | 'https://challenges.cloudflare.com/turnstile/v0/api.js', |
| 214 | 215 | [], |
| 215 | 216 | null, |
| 216 | 217 | [ |
| 217 | - false, | |
| 218 | - 'defer' => true, | |
| 218 | + 'strategy' => 'defer', | |
| 219 | 219 | ] |
| 220 | 220 | ); |
| 221 | + // phpcs:enable WordPress.WP.EnqueuedResourceParameters.MissingVersion, PluginCheck.CodeAnalysis.EnqueuedResourceOffloading.OffloadedContent | |
| 221 | 222 | } else { |
| 222 | 223 | Helper::render_missing_sitekey_error( 'Cloudflare Turnstile' ); |
| 223 | 224 | } |
| 224 | 225 | } |
| @@ -223,9 +224,9 @@ | ||
| 223 | 224 | } |
| 224 | 225 | } |
| 225 | 226 | if ( 'hcaptcha' === $this->captcha_security_type ) { |
| 226 | 227 | if ( ! empty( $this->hcaptcha_site_key ) ) { |
| 227 | - wp_enqueue_script( 'hcaptcha', 'https://js.hcaptcha.com/1/api.js', [], null, [ 'strategy' => 'defer' ] ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion | |
| 228 | + wp_enqueue_script( 'hcaptcha', 'https://js.hcaptcha.com/1/api.js', [], null, [ 'strategy' => 'defer' ] ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion, PluginCheck.CodeAnalysis.EnqueuedResourceOffloading.OffloadedContent -- hCaptcha must be loaded from hCaptcha's servers for token verification; the version is controlled by hCaptcha. | |
| 228 | 229 | } else { |
| 229 | 230 | Helper::render_missing_sitekey_error( 'HCaptcha' ); |
| 230 | 231 | } |
| 231 | 232 | } |