Last active
January 10, 2020 11:47
-
-
Save YuvrajKhavad/213602121a574f59b4e8c3a2070b9f5e to your computer and use it in GitHub Desktop.
Google captcha in french with contact form 7 WordPress, Just add this code on function.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wpcf7_enqueue_scripts', 'custom_recaptcha_enqueue_scripts', 11 ); | |
function custom_recaptcha_enqueue_scripts() { | |
wp_deregister_script( 'google-recaptcha' ); | |
$url = 'https://www.google.com/recaptcha/api.js'; | |
$url = add_query_arg( array( | |
'onload' => 'recaptchaCallback', | |
'render' => 'explicit', | |
'hl' => 'fr-CA' ), $url ); | |
wp_register_script( 'google-recaptcha', $url, array(), '2.0', true ); | |
} | |
// Thanks to http://dejanjanosevic.info/change-language-recaptcha-contact-form-7/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment