I got DWQA Captcha plugin and installed it. But there is no public/private fields in DWQA settings, just for funCaptcha. And I don’t see any captcha on the “ask question” page.
1 Answers
I have checked on our demo and it’s bug come from DWQA Captcha plugin, to resolve this issue, you can open the dwqa-captcha.php file and add the following code under line 58.
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 add the following code under line 75 (after added the previous code lines)
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">';
}
Note: We will fix and update this issue into plugin.
Hope this helps!
Please login or Register to submit your answer