Version Description
- Bugfix: No more unnecessary loading reCAPTCHA on the other pages
- Bugfix: No more reCAPTCHA window over Clef waves (if you are using Clef plugin) on the login page
Download this release
Release Info
Developer | Minor |
Plugin | Simple Google reCAPTCHA |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- readme.txt +6 -1
- simple-google-recaptcha.php +7 -5
- style.css +4 -0
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Minor
|
|
3 |
Tags: recaptcha, spam, block, captcha, bots, brute, force, protect, comments, secure, attack, registration, reset, form
|
4 |
Requires at least: 4.2.0
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -41,6 +41,11 @@ Just pure protection - no ads and any other unnecessary changes.
|
|
41 |
5. Simple Google reCAPTCHA - Settings
|
42 |
|
43 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.0 =
|
45 |
* Warning: reCAPTCHA verification on the BuddyPress registration page has been removed
|
46 |
* Warning: reCAPTCHA verification on the Add new comment form for logged in users has been removed
|
3 |
Tags: recaptcha, spam, block, captcha, bots, brute, force, protect, comments, secure, attack, registration, reset, form
|
4 |
Requires at least: 4.2.0
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 2.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
41 |
5. Simple Google reCAPTCHA - Settings
|
42 |
|
43 |
== Changelog ==
|
44 |
+
= 2.1 =
|
45 |
+
* Bugfix: No more unnecessary loading reCAPTCHA on the other pages
|
46 |
+
* Bugfix: No more reCAPTCHA window over Clef waves (if you are using Clef plugin) on the login page
|
47 |
+
|
48 |
+
|
49 |
= 2.0 =
|
50 |
* Warning: reCAPTCHA verification on the BuddyPress registration page has been removed
|
51 |
* Warning: reCAPTCHA verification on the Add new comment form for logged in users has been removed
|
simple-google-recaptcha.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: Simple Google reCAPTCHA
|
4 |
* Description: Simply protect your WordPress against spam comments and brute-force attacks, thanks to Google reCAPTCHA!
|
5 |
-
* Version: 2.
|
6 |
* Author: Michal Novák
|
7 |
* Author URI: https://www.novami.cz
|
8 |
* License: GPL3
|
@@ -67,12 +67,12 @@ function sgr_display_options() {
|
|
67 |
add_action("admin_init", "sgr_display_options");
|
68 |
|
69 |
function load_language_sgr() {
|
70 |
-
load_plugin_textdomain("
|
71 |
}
|
72 |
add_action("plugins_loaded", "load_language_sgr");
|
73 |
|
74 |
function frontend_sgr_script() {
|
75 |
-
if ((get_option("
|
76 |
wp_register_script("sgr_recaptcha", "https://www.google.com/recaptcha/api.js?hl=".get_locale());
|
77 |
wp_enqueue_script("sgr_recaptcha");
|
78 |
wp_register_script("sgr_recaptcha_check", plugin_dir_url(__FILE__)."check.js");
|
@@ -81,8 +81,6 @@ function frontend_sgr_script() {
|
|
81 |
wp_enqueue_style("style", plugin_dir_url(__FILE__)."style.css");
|
82 |
}
|
83 |
}
|
84 |
-
add_action("login_enqueue_scripts", "frontend_sgr_script");
|
85 |
-
add_action("wp_enqueue_scripts", "frontend_sgr_script");
|
86 |
|
87 |
function sgr_display() {
|
88 |
echo "<div class=\"g-recaptcha\" data-sitekey=\"".get_option("sgr_site_key")."\" data-callback=\"enableBtn\"></div>";
|
@@ -111,6 +109,10 @@ function sgr_verify($input) {
|
|
111 |
|
112 |
function sgr_check() {
|
113 |
if (get_option("sgr_site_key") != "" && get_option("sgr_secret_key") != "") {
|
|
|
|
|
|
|
|
|
114 |
if (get_option("sgr_comments_disable") != 1 && !is_user_logged_in()) {
|
115 |
add_action("comment_form_after_fields", "sgr_display");
|
116 |
add_action("preprocess_comment", "sgr_verify");
|
2 |
/*
|
3 |
* Plugin Name: Simple Google reCAPTCHA
|
4 |
* Description: Simply protect your WordPress against spam comments and brute-force attacks, thanks to Google reCAPTCHA!
|
5 |
+
* Version: 2.1
|
6 |
* Author: Michal Novák
|
7 |
* Author URI: https://www.novami.cz
|
8 |
* License: GPL3
|
67 |
add_action("admin_init", "sgr_display_options");
|
68 |
|
69 |
function load_language_sgr() {
|
70 |
+
load_plugin_textdomain("sgr", false, dirname(plugin_basename(__FILE__))."/languages/");
|
71 |
}
|
72 |
add_action("plugins_loaded", "load_language_sgr");
|
73 |
|
74 |
function frontend_sgr_script() {
|
75 |
+
if ((did_action("login_init") && get_option("sgr_forms_disable") != 1) || (!is_user_logged_in() && is_single() && comments_open() && get_option("sgr_comments_disable") != 1)) {
|
76 |
wp_register_script("sgr_recaptcha", "https://www.google.com/recaptcha/api.js?hl=".get_locale());
|
77 |
wp_enqueue_script("sgr_recaptcha");
|
78 |
wp_register_script("sgr_recaptcha_check", plugin_dir_url(__FILE__)."check.js");
|
81 |
wp_enqueue_style("style", plugin_dir_url(__FILE__)."style.css");
|
82 |
}
|
83 |
}
|
|
|
|
|
84 |
|
85 |
function sgr_display() {
|
86 |
echo "<div class=\"g-recaptcha\" data-sitekey=\"".get_option("sgr_site_key")."\" data-callback=\"enableBtn\"></div>";
|
109 |
|
110 |
function sgr_check() {
|
111 |
if (get_option("sgr_site_key") != "" && get_option("sgr_secret_key") != "") {
|
112 |
+
|
113 |
+
add_action("login_enqueue_scripts", "frontend_sgr_script");
|
114 |
+
add_action("wp_enqueue_scripts", "frontend_sgr_script");
|
115 |
+
|
116 |
if (get_option("sgr_comments_disable") != 1 && !is_user_logged_in()) {
|
117 |
add_action("comment_form_after_fields", "sgr_display");
|
118 |
add_action("preprocess_comment", "sgr_verify");
|
style.css
CHANGED
@@ -7,4 +7,8 @@
|
|
7 |
|
8 |
.login form {
|
9 |
padding-bottom: 26px;
|
|
|
|
|
|
|
|
|
10 |
}
|
7 |
|
8 |
.login form {
|
9 |
padding-bottom: 26px;
|
10 |
+
}
|
11 |
+
|
12 |
+
.clef-login-container {
|
13 |
+
z-index: 1;
|
14 |
}
|