Google Recaptcha module
-
Hi,
could you please consider maybe on next plugin update to do a check if shortcode exists on page before loading Google Recaptcha resources:
wpcf7_recaptcha_enqueue_scripts()on /wp-content/plugins/contact-form-7/modules/recaptcha.php:function wpcf7_recaptcha_enqueue_scripts() { $service = WPCF7_RECAPTCHA::get_instance(); global $post; if ( ! $service->is_active() ) { return; } $url = add_query_arg( array( 'render' => $service->get_sitekey(), ), 'https://www.google.com/recaptcha/api.js' ); if( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'contact-form-7') || has_shortcode( $post->post_content, 'contact-form') ) { wp_enqueue_script( 'google-recaptcha', $url, array(), '3.0', true ); } }Thank’s
The page I need help with: [log in to see the link]
The topic ‘Google Recaptcha module’ is closed to new replies.