I don’t want to request ReCaptcha for logged in users

5.46K viewsGeneral
1

ask-form.php change line 102 for

if ( ap_show_captcha_to_user() && !is_user_logged_in()) {

same on:

answer-form.php change line 87 for

if ( ap_show_captcha_to_user() && !is_user_logged_in()) {

 

file are in wp-content/plugins/anspress-question-answer/includes

I’ve done a commit for that on github.

 

Just looking to contribute in some way for that great open source job you’ve done.

commented on answer

might just want this to be for a role or point level considering a spammer can create an account and then use a robot or some automation.

1

Download master.zip from github and you can use this filter:

add_filter('ap_show_captcha', 'my_ap_captch_filter', 10, 2);
function my_ap_captch_filter($true, $user_id){
    if ($user_id == get_current_user_id())
    	return false;
    return $true;
}
commented on answer

Not familiar with using github. Not seeing a download when searching master.zip. Is there a link? Would this upload as is as a plugin where I then add your code to what lines?

Hello, still waiting. Not seeing.

Googled Anspress site:github.com

You meant download anspress plugin from github. However the latest version still requests it for logged in users.
https://github.com/anspress/anspress

Which file to put this filter in?

@Stacy I think functions.php in your theme’s folder. (wp-content/themes/your_active_theme/functions.php)

My theme or the plugin ?