AnsPress_reCcaptcha::verification_response()

Description #

Send ajax response if capatcha verification fails.

Changelog #

VersionDescription
3.0.0Introduced.

Source #

File: addons/free/recaptcha.php

	public static function verification_response() {
		if ( ap_show_captcha_to_user() && false === SELF::verify_recaptcha() ) {
			ap_ajax_json( array(
				'form' 			=> $_POST['ap_form_action'],
				'message'		=> 'captcha_error',
				'errors'		=> array( 'captcha' => __( 'Bot verification failed.', 'anspress-question-answer' ) ),
			) );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment