diff --git a/all-in-one-wp-security/classes/wp-security-captcha.php b/all-in-one-wp-security/classes/wp-security-captcha.php
index 4d48d8a..618c62a 100644
--- a/all-in-one-wp-security/classes/wp-security-captcha.php
+++ b/all-in-one-wp-security/classes/wp-security-captcha.php
@@ -24,7 +24,7 @@ function display_recaptcha_form()
do_action( 'bp_aiowps-captcha-answer_errors' );
}
$site_key = esc_html( $aio_wp_security->configs->get_value('aiowps_recaptcha_site_key') );
- $cap_form = '
';
+ $cap_form = '';
echo $cap_form;
}
diff --git a/all-in-one-wp-security/classes/wp-security-general-init-tasks.php b/all-in-one-wp-security/classes/wp-security-general-init-tasks.php
index 0682147..c78a922 100644
--- a/all-in-one-wp-security/classes/wp-security-general-init-tasks.php
+++ b/all-in-one-wp-security/classes/wp-security-general-init-tasks.php
@@ -527,7 +527,7 @@ function process_comment_post( $comment )
}
//Don't do captcha for pingback/trackback
- if ($comment['comment_type'] != '' && $comment['comment_type'] != 'comment') {
+ if ($comment['comment_type'] != '' && $comment['comment_type'] != 'comment' && $comment['comment_type'] != 'review') {
return $comment;
}
diff --git a/all-in-one-wp-security/classes/wp-security-wp-footer-content.php b/all-in-one-wp-security/classes/wp-security-wp-footer-content.php
index 32a0f7c..3b69128 100644
--- a/all-in-one-wp-security/classes/wp-security-wp-footer-content.php
+++ b/all-in-one-wp-security/classes/wp-security-wp-footer-content.php
@@ -14,15 +14,27 @@ function __construct() {
if($aio_wp_security->configs->get_value('aiowps_default_recaptcha')) {
// For Woocommerce forms.
// Only proceed if woocommerce installed and active
- if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) )
+ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && is_account_page() )
{
if($aio_wp_security->configs->get_value('aiowps_enable_woo_login_captcha') == '1' ||
$aio_wp_security->configs->get_value('aiowps_enable_woo_register_captcha') == '1' ||
$aio_wp_security->configs->get_value('aiowps_enable_woo_lostpassword_captcha') == '1')
{
- $this->print_recaptcha_api_woo();
+ $this->print_recaptcha_api_trigger(array(
+ 'woo_recaptcha_1',
+ 'woo_recaptcha_2'
+ ));
}
}
+
+ // ContactForm7 Conflict
+ // Only proceed if contact form 7 installed and active
+ elseif ( in_array( 'contact-form-7/wp-contact-form-7.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) )
+ {
+ $this->print_recaptcha_api_trigger(array(
+ 'aiowps_recaptcha_field',
+ ));
+ }
// For custom wp login form
if($aio_wp_security->configs->get_value('aiowps_enable_custom_login_captcha') == '1')
@@ -41,38 +53,37 @@ function __construct() {
//TODO - add other footer output content here
}
-
+
/**
- * For Woocommerce my account page - display two separate Google reCaptcha forms "explicitly"
+ * For Woocommerce my account page / Contactfrom7 - display multiple separate Google reCaptcha forms "explicitly" or single form for compatibility reasons
* @global type $aio_wp_security
*/
- function print_recaptcha_api_woo() {
+ function print_recaptcha_api_trigger($recaptureNames = array()) {
global $aio_wp_security;
- $is_woo = false;
- $is_woo = is_account_page();
- if(!$is_woo) {
- return; // if current page is not woo account page don't do anything
- }
$site_key = esc_html( $aio_wp_security->configs->get_value('aiowps_recaptcha_site_key') );
- ?>
-
-
+
+