Version Description
- Comments: get back to
comment_form_defaults
filter (was introduced in 1.1.3) - Fix: Get key option
- Fix: Key testing return value
Download this release
Release Info
Developer | podpirate |
Plugin | WordPress ReCaptcha Integration |
Version | 1.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.4
- readme.txt +6 -1
- wp-recaptcha-integration.php +6 -7
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: security, captcha, recaptcha, no captcha, login, signup, contact form 7, ninja forms, woocommerce
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -242,6 +242,11 @@ I will migrate all the translation stuff there.
|
|
242 |
|
243 |
== Changelog ==
|
244 |
|
|
|
|
|
|
|
|
|
|
|
245 |
= 1.1.3 =
|
246 |
- Comments: use filter `comment_form_submit_button` in WP >= 4.2
|
247 |
- WooCommerce: Add action listener to `woocommerce_lostpassword_form` (probably functional in WC 2.3.8).
|
4 |
Tags: security, captcha, recaptcha, no captcha, login, signup, contact form 7, ninja forms, woocommerce
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.1.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
242 |
|
243 |
== Changelog ==
|
244 |
|
245 |
+
= 1.1.4 =
|
246 |
+
- Comments: get back to `comment_form_defaults` filter (was introduced in 1.1.3)
|
247 |
+
- Fix: Get key option
|
248 |
+
- Fix: Key testing return value
|
249 |
+
|
250 |
= 1.1.3 =
|
251 |
- Comments: use filter `comment_form_submit_button` in WP >= 4.2
|
252 |
- WooCommerce: Add action listener to `woocommerce_lostpassword_form` (probably functional in WC 2.3.8).
|
wp-recaptcha-integration.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP reCaptcha Integration
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-recaptcha-integration/
|
5 |
Description: Integrate reCaptcha in your blog. Supports no Captcha (new style recaptcha) as well as the old style reCaptcha. Provides of the box integration for signup, login, comment forms, lost password, Ninja Forms and contact form 7.
|
6 |
-
Version: 1.1.
|
7 |
Author: Jörn Lund
|
8 |
Author URI: https://github.com/mcguffin/
|
9 |
*/
|
@@ -82,7 +82,6 @@ class WP_reCaptcha {
|
|
82 |
add_site_option('recaptcha_enable_lostpw' , false); // global
|
83 |
add_site_option('recaptcha_disable_for_known_users' , true); // global
|
84 |
add_site_option( 'recaptcha_lockout' , true );
|
85 |
-
$this->_has_api_key = get_site_option( 'recaptcha_publickey' ) && get_site_option( 'recaptcha_privatekey' );
|
86 |
} else {
|
87 |
add_option( 'recaptcha_enable_comments' , true); // global
|
88 |
add_option( 'recaptcha_enable_signup' , true); // global
|
@@ -90,8 +89,8 @@ class WP_reCaptcha {
|
|
90 |
add_option( 'recaptcha_enable_lostpw' , false); // global
|
91 |
add_option( 'recaptcha_disable_for_known_users' , true); // global
|
92 |
add_option( 'recaptcha_lockout' , true );
|
93 |
-
$this->_has_api_key = get_option( 'recaptcha_publickey' ) && get_option( 'recaptcha_privatekey' );
|
94 |
}
|
|
|
95 |
|
96 |
if ( $this->_has_api_key ) {
|
97 |
|
@@ -146,8 +145,8 @@ class WP_reCaptcha {
|
|
146 |
add_action( 'login_footer' , array(&$this,'recaptcha_foot') );
|
147 |
}
|
148 |
if ( $this->get_option('recaptcha_enable_comments') ) {
|
149 |
-
|
150 |
-
|
151 |
/*/
|
152 |
|
153 |
// WP 4.2 introduced `comment_form_submit_button` filter
|
@@ -537,10 +536,10 @@ class WP_reCaptcha {
|
|
537 |
$pub_okay = $this->test_public_key();
|
538 |
$prv_okay = $this->test_private_key();
|
539 |
|
540 |
-
$keys_okay = $prv_okay && $pub_okay;
|
541 |
|
542 |
//cache the result
|
543 |
-
set_transient( 'recaptcha_keys_okay' , $keys_okay
|
544 |
}
|
545 |
return $keys_okay == 'yes';
|
546 |
}
|
3 |
Plugin Name: WP reCaptcha Integration
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-recaptcha-integration/
|
5 |
Description: Integrate reCaptcha in your blog. Supports no Captcha (new style recaptcha) as well as the old style reCaptcha. Provides of the box integration for signup, login, comment forms, lost password, Ninja Forms and contact form 7.
|
6 |
+
Version: 1.1.4
|
7 |
Author: Jörn Lund
|
8 |
Author URI: https://github.com/mcguffin/
|
9 |
*/
|
82 |
add_site_option('recaptcha_enable_lostpw' , false); // global
|
83 |
add_site_option('recaptcha_disable_for_known_users' , true); // global
|
84 |
add_site_option( 'recaptcha_lockout' , true );
|
|
|
85 |
} else {
|
86 |
add_option( 'recaptcha_enable_comments' , true); // global
|
87 |
add_option( 'recaptcha_enable_signup' , true); // global
|
89 |
add_option( 'recaptcha_enable_lostpw' , false); // global
|
90 |
add_option( 'recaptcha_disable_for_known_users' , true); // global
|
91 |
add_option( 'recaptcha_lockout' , true );
|
|
|
92 |
}
|
93 |
+
$this->_has_api_key = $this->get_option( 'recaptcha_publickey' ) && $this->get_option( 'recaptcha_privatekey' );
|
94 |
|
95 |
if ( $this->_has_api_key ) {
|
96 |
|
145 |
add_action( 'login_footer' , array(&$this,'recaptcha_foot') );
|
146 |
}
|
147 |
if ( $this->get_option('recaptcha_enable_comments') ) {
|
148 |
+
//*
|
149 |
+
add_filter('comment_form_defaults',array($this,'comment_form_defaults'),10);
|
150 |
/*/
|
151 |
|
152 |
// WP 4.2 introduced `comment_form_submit_button` filter
|
536 |
$pub_okay = $this->test_public_key();
|
537 |
$prv_okay = $this->test_private_key();
|
538 |
|
539 |
+
$keys_okay = ( $prv_okay && $pub_okay ) ? 'yes' : 'no';
|
540 |
|
541 |
//cache the result
|
542 |
+
set_transient( 'recaptcha_keys_okay' , $keys_okay , 15 * MINUTE_IN_SECONDS );
|
543 |
}
|
544 |
return $keys_okay == 'yes';
|
545 |
}
|