Could you please make it possible to use the Google reCAPTCHA, so that I have one kind of Captcha throughout my website?
2 Answers
You can get this extension to use Google reCaptcha on your website: https://www.designwall.com/wordpress/dwqa-extensions/dwqa-captcha/
there is no setting fields for Google reCaptcha v2 in the DWQA Captcha extension
added this to dwqa-captcha.php
add_settings_field(
'dwqa_options[captcha-google-public-key]',
__( 'Google reCaptcha v2 Site key', 'dwqa' ),
array( $this, 'gc_public_key_display' ),
'dwqa-settings',
'dwqa-captcha-settings'
);
add_settings_field(
'dwqa_options[captcha-google-private-key]',
__( 'Google reCaptcha v2 Secret key', 'dwqa' ),
array( $this, 'gc_private_key_display' ),
'dwqa-settings',
'dwqa-captcha-settings'
);
and
public function gc_private_key_display() {
global $dwqa_general_settings;
$private_key = isset( $dwqa_general_settings['captcha-google-private-key'] ) ? $dwqa_general_settings['captcha-google-private-key'] : '';
echo '<input type="text" name="dwqa_options[captcha-google-private-key]" value="'.$private_key.'" class="regular-text">
';
}
public function gc_public_key_display() {
global $dwqa_general_settings;
$private_key = isset( $dwqa_general_settings['captcha-google-public-key'] ) ? $dwqa_general_settings['captcha-google-public-key'] : '';
echo '<input type="text" name="dwqa_options[captcha-google-public-key]" value="'.$private_key.'" class="regular-text">
';
}
Awesome! Thanks for your helps, I appreciate it.
Please login or Register to submit your answer