Version Description
Download this release
Release Info
Developer | tareq1988 |
Plugin | WordPress ReCaptcha Integration |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
- inc/class-wp_recaptcha_options.php +3 -2
- readme.txt +131 -86
- wp-recaptcha-integration.php +15 -47
inc/class-wp_recaptcha_options.php
CHANGED
@@ -597,8 +597,9 @@ class WP_reCaptcha_Options {
|
|
597 |
* Selector for recaptcha theme
|
598 |
*/
|
599 |
public function select_language() {
|
600 |
-
$option_name
|
601 |
-
$option_value
|
|
|
602 |
|
603 |
$all_available_langs = array(
|
604 |
'recaptcha' => WP_reCaptcha_ReCaptcha::instance()->get_supported_languages(),
|
597 |
* Selector for recaptcha theme
|
598 |
*/
|
599 |
public function select_language() {
|
600 |
+
$option_name = 'recaptcha_language';
|
601 |
+
$option_value = WP_reCaptcha::instance()->get_option( $option_name );
|
602 |
+
$option_flavor = WP_reCaptcha::instance()->get_option( 'recaptcha_flavor' );
|
603 |
|
604 |
$all_available_langs = array(
|
605 |
'recaptcha' => WP_reCaptcha_ReCaptcha::instance()->get_supported_languages(),
|
readme.txt
CHANGED
@@ -1,38 +1,35 @@
|
|
1 |
-
===
|
2 |
-
Contributors: podpirate
|
3 |
-
Donate link: https://
|
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:
|
7 |
-
Stable tag: 1.2.
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
-
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
Used to integrate reCaptcha in your blog. Supported no Captcha as well as old style recaptcha.
|
20 |
-
Provided of the box integration for signup, login, comment forms and Ninja Forms as well
|
21 |
as a plugin API for your own integrations.
|
22 |
|
23 |
-
=
|
24 |
-
-
|
25 |
-
-
|
26 |
-
-
|
27 |
- WP Multisite
|
28 |
-
- bbPress
|
29 |
- BuddyPress
|
30 |
-
- AwesomeSupport (thanks to [Julien Liabeuf](http://julienliabeuf.com/)
|
31 |
- WooCommerce (Only checkout, registration and login form. Not password reset)
|
32 |
- [Ninja Forms](http://ninjaforms.com/)
|
33 |
- cformsII
|
34 |
|
35 |
-
- For integration in your self-coded forms see this [wiki article](https://github.com/
|
36 |
|
37 |
= Localizations =
|
38 |
- Brazilian Portuguese (thanks to [Vinícius Ferraz](http://www.viniciusferraz.com))
|
@@ -40,86 +37,66 @@ as a plugin API for your own integrations.
|
|
40 |
- Italian (thanks to [Salaros](http://blog.salaros.com/))
|
41 |
- German
|
42 |
|
43 |
-
Latest Files on GitHub: [https://github.com/
|
44 |
|
45 |
= Compatibility =
|
46 |
|
47 |
-
On a **WP Multisite** you
|
48 |
|
49 |
-
Activated on a single site everything
|
50 |
|
51 |
-
With network activation entering the API key and setting up where a captcha
|
52 |
-
|
53 |
running under his/her own domain name.
|
54 |
|
55 |
|
56 |
= Known Limitations =
|
57 |
-
- You
|
58 |
-
reCaptcha itself. If that
|
59 |
|
60 |
-
- A No Captcha definitely
|
61 |
-
sophisticated bot detection magic. There
|
62 |
-
JS enabled the captcha test
|
63 |
|
64 |
-
- On a **Contact Form 7** when the reCaptcha
|
65 |
-
label
|
66 |
|
67 |
-
To handle this there
|
68 |
-
users here. Check out the [GitHub Repo](https://github.com/
|
69 |
|
70 |
-
- As of version 4.3 CF7
|
71 |
-
I you want to keep the WP ReCaptcha functionality, e.g. if you
|
72 |
-
from known users,
|
73 |
|
74 |
-
- Old style reCaptcha
|
75 |
|
76 |
-
- In **WooCommerce** the reset password form
|
77 |
-
not fire any action in the lost password form, so there
|
78 |
Take a look at [this thread](https://wordpress.org/support/topic/captcha-not-showing-on-lost-password-page?replies=7) for a workaround.
|
79 |
|
80 |
-
- Due to a lack of filters there
|
81 |
support for the **MailPoet** subscription form.
|
82 |
|
83 |
== Installation ==
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
== Frequently asked questions ==
|
88 |
-
|
89 |
-
= Why did you abandon the plugin? =
|
90 |
-
|
91 |
-
**The short answer:** Privacy concerns.
|
92 |
-
|
93 |
-
**The long answer:** Googles (and others) business model is to record as much as
|
94 |
-
possible of your behaviour and to turn it into a model of your future behaviour
|
95 |
-
in order to sell it to who ever is willing to pay for it. every little bit you do
|
96 |
-
on the internet is a small stroke in the big picture which is showing you – your
|
97 |
-
fears and desires, your likes and dislikes, your days and nights – you name it.
|
98 |
|
99 |
-
|
100 |
-
problem. In risk assessment it may become one. In politics it definetly is. In
|
101 |
-
2020 we see personality profiles being used in dubious political campaigns,
|
102 |
-
asymmetric warfare and as a suppression technique in numerous dictatorships.
|
103 |
-
Your benevolent despot from the future knows what comes next...
|
104 |
|
105 |
-
|
106 |
-
not exists in the first place. The least I can do as a developer, is to not help
|
107 |
-
collecting it.
|
108 |
-
|
109 |
-
Thanks for reading that far.
|
110 |
|
111 |
-
= The login captcha
|
112 |
|
113 |
-
If it
|
114 |
-
settings (it's on by default) you
|
115 |
-
captcha. If the keys
|
116 |
new keypair.
|
117 |
|
118 |
-
When you
|
119 |
-
your domain. The server
|
120 |
possible.
|
121 |
|
122 |
-
You
|
123 |
- access to the settings for your sitekey on [reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
124 |
- access to your WordPress installation (via SSH or FTP) or database access
|
125 |
- database access
|
@@ -152,7 +129,7 @@ You would either needed one of the following:
|
|
152 |
3. Remove the line above from your theme functions.php.
|
153 |
|
154 |
|
155 |
-
**If you
|
156 |
|
157 |
1. Execute the following SQL-Commands in your Database:
|
158 |
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_publickey';</code>
|
@@ -160,19 +137,26 @@ You would either needed one of the following:
|
|
160 |
|
161 |
(Please note that `wp_options` might have a different prefix in your installation.)
|
162 |
|
163 |
-
2. After the login you
|
164 |
|
165 |
3. Set up a new keypair on Google and test it.
|
166 |
|
167 |
|
168 |
-
**If none of these
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
That was too bad...
|
171 |
|
172 |
-
= Privacy:
|
173 |
|
174 |
Yes and no. The captcha verification process, comming into effect after the user has solved
|
175 |
-
the challenge does not require the disclosure of the visitors IP address, so it
|
176 |
|
177 |
But everything related to the displaying of the captcha widget like the challenge image,
|
178 |
the JavaScripts and so on is loaded directly from Google and is very likely to be logged,
|
@@ -182,6 +166,17 @@ In other words: Google knows which (recaptcha protected) website is accessed fro
|
|
182 |
|
183 |
If that's an issue for you, you better use a self hosted solution.
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
= The captcha does not show up. What’s wrong? =
|
186 |
|
187 |
On the plugin settings page check out if the option “Disable for known users” is activated (it is by default).
|
@@ -193,7 +188,7 @@ right before the submit button.) You will have to use another hook, e.g. `commen
|
|
193 |
|
194 |
Here is some code that will fix it:
|
195 |
|
196 |
-
- Go to (https://gist.github.com/
|
197 |
- Click the "Download Gist" button
|
198 |
- Unpack the `.tar.gz` file.
|
199 |
- Create a zip Archive out of the included file `recaptcha-comment-form-fix.php` and name it `recaptcha-comment-form-fix.zip`.
|
@@ -202,6 +197,58 @@ Here is some code that will fix it:
|
|
202 |
If the problem still persist, Houston really has a problem, and you are welcome to post a support request.
|
203 |
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
== Screenshots ==
|
206 |
|
207 |
1. Plugin Settings (v 1.1.4)
|
@@ -211,11 +258,13 @@ If the problem still persist, Houston really has a problem, and you are welcome
|
|
211 |
|
212 |
== Changelog ==
|
213 |
|
214 |
-
=
|
215 |
-
-
|
216 |
-
|
217 |
-
|
218 |
-
-
|
|
|
|
|
219 |
|
220 |
= 1.2.0 =
|
221 |
- Support [cformsII](https://wordpress.org/plugins/cforms2/) (thanks to [Bastian Germann](https://github.com/bgermann))
|
@@ -352,8 +401,4 @@ Initial Release
|
|
352 |
|
353 |
The plugin offers some filters to allow themes and other plugins to hook in.
|
354 |
|
355 |
-
See [GitHub-Repo](https://github.com/
|
356 |
-
|
357 |
-
== Upgrade notice ==
|
358 |
-
|
359 |
-
Version 1.3.2 only brings a deprecation notice to the wp admin.
|
1 |
+
=== ReCaptcha Integration for WordPress ===
|
2 |
+
Contributors: podpirate, tareq1988, wedevs, nizamuddinbabu
|
3 |
+
Donate link: https://tareq.co/donate/
|
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: 5.5
|
7 |
+
Stable tag: 1.2.4
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
+
reCaptcha for login, signup, comment forms, Ninja Forms and woocommerce.
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
Integrate reCaptcha in your blog. Supports no Captcha as well as old style recaptcha.
|
17 |
+
Provides of the box integration for signup, login, comment formsand Ninja Forms as well
|
|
|
|
|
|
|
18 |
as a plugin API for your own integrations.
|
19 |
|
20 |
+
= Features: =
|
21 |
+
- Secures login, signup und comments with a recaptcha.
|
22 |
+
- Supports old as well as new reCaptcha.
|
23 |
+
- Works together with
|
24 |
- WP Multisite
|
25 |
+
- bbPress
|
26 |
- BuddyPress
|
27 |
+
- AwesomeSupport (thanks to [Julien Liabeuf](http://julienliabeuf.com/) )
|
28 |
- WooCommerce (Only checkout, registration and login form. Not password reset)
|
29 |
- [Ninja Forms](http://ninjaforms.com/)
|
30 |
- cformsII
|
31 |
|
32 |
+
- For integration in your self-coded forms see this [wiki article](https://github.com/tareq1988/wp-recaptcha-integration/wiki/Custom-Themes-and-Forms) for details.
|
33 |
|
34 |
= Localizations =
|
35 |
- Brazilian Portuguese (thanks to [Vinícius Ferraz](http://www.viniciusferraz.com))
|
37 |
- Italian (thanks to [Salaros](http://blog.salaros.com/))
|
38 |
- German
|
39 |
|
40 |
+
Latest Files on GitHub: [https://github.com/tareq1988/wp-recaptcha-integration](https://github.com/tareq1988/wp-recaptcha-integration)
|
41 |
|
42 |
= Compatibility =
|
43 |
|
44 |
+
On a **WP Multisite** you can either activate the plugin network wide or on a single site.
|
45 |
|
46 |
+
Activated on a single site everything works as usual.
|
47 |
|
48 |
+
With network activation entering the API key and setting up where a captcha is required
|
49 |
+
is up to the network admin. A blog admin can override the API key e.g. when his blog is
|
50 |
running under his/her own domain name.
|
51 |
|
52 |
|
53 |
= Known Limitations =
|
54 |
+
- You can't have more than one old style reCaptcha on a page. This is a limitiation of
|
55 |
+
reCaptcha itself. If that's an issue for you, you should use the no Captcha Form.
|
56 |
|
57 |
+
- A No Captcha definitely requires client side JavaScript enabled. That's how it does its
|
58 |
+
sophisticated bot detection magic. There is no fallback. If your visitor does not have
|
59 |
+
JS enabled the captcha test will not let him through.
|
60 |
|
61 |
+
- On a **Contact Form 7** when the reCaptcha is disabled (e.g. for logged in users) the field
|
62 |
+
label will be still visible. This is due to CF7 Shortcode architecture, and can't be fixed.
|
63 |
|
64 |
+
To handle this there is a filter `recaptcha_disabled_html`. You can return a message for your logged-in
|
65 |
+
users here. Check out the [GitHub Repo](https://github.com/tareq1988/wp-recaptcha-integration) for details.
|
66 |
|
67 |
+
- As of version 4.3 CF7 comes with its own recaptcha. Both are supposed to work together.
|
68 |
+
I you want to keep the WP ReCaptcha functionality, e.g. if you want to hide the captcha
|
69 |
+
from known users, leave the integration in the CF7 settings unconfigured.
|
70 |
|
71 |
+
- Old style reCaptcha does not work together with **WooCommerce**.
|
72 |
|
73 |
+
- In **WooCommerce** the reset password form can not be protected by a captcha. Woocommerce does
|
74 |
+
not fire any action in the lost password form, so there is no way for the plugin to hook in.
|
75 |
Take a look at [this thread](https://wordpress.org/support/topic/captcha-not-showing-on-lost-password-page?replies=7) for a workaround.
|
76 |
|
77 |
+
- Due to a lack of filters there is no (and as far as one can see, there will never be)
|
78 |
support for the **MailPoet** subscription form.
|
79 |
|
80 |
== Installation ==
|
81 |
|
82 |
+
First follow the standard [WordPress plugin installation procedere](http://codex.wordpress.org/Managing_Plugins).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
Then go to the [Google Recaptcha Site](http://www.google.com/recaptcha), register your site and enter your API-Keys on the configuration page.
|
|
|
|
|
|
|
|
|
85 |
|
86 |
+
== Frequently asked questions ==
|
|
|
|
|
|
|
|
|
87 |
|
88 |
+
= The login captcha says 'ERROR: (something somthing)'. What can I do? =
|
89 |
|
90 |
+
If it says 'Invalid sitekey' and you checked the 'Prevent lockout' option on the plugin
|
91 |
+
settings (it's on by default) you can log in with an administrator account and ignore the
|
92 |
+
captcha. If the keys are really invalid, the plugin will let you in, so you can set up a
|
93 |
new keypair.
|
94 |
|
95 |
+
When you see "Invalid domain for site key", then the key is okay in general, but not for
|
96 |
+
your domain. The server can not test this case, so an effective lockout prevention is not
|
97 |
possible.
|
98 |
|
99 |
+
You will either need one of the following:
|
100 |
- access to the settings for your sitekey on [reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
101 |
- access to your WordPress installation (via SSH or FTP) or database access
|
102 |
- database access
|
129 |
3. Remove the line above from your theme functions.php.
|
130 |
|
131 |
|
132 |
+
**If you have Database access**
|
133 |
|
134 |
1. Execute the following SQL-Commands in your Database:
|
135 |
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_publickey';</code>
|
137 |
|
138 |
(Please note that `wp_options` might have a different prefix in your installation.)
|
139 |
|
140 |
+
2. After the login you will see a message asking you to set up the API keys.
|
141 |
|
142 |
3. Set up a new keypair on Google and test it.
|
143 |
|
144 |
|
145 |
+
**If none of these works for you**
|
146 |
+
|
147 |
+
That's too bad...
|
148 |
+
|
149 |
+
|
150 |
+
= I can't get it to work with my custom comments form. Will you fix for me? =
|
151 |
+
|
152 |
+
Nope. I cannot give support on your individual projects for free, no matter how many one
|
153 |
+
star reviews you will give me. Have a look at the project wiki or find a WordPress coder.
|
154 |
|
|
|
155 |
|
156 |
+
= Privacy: Will the captcha send the visitors IP address to google? =
|
157 |
|
158 |
Yes and no. The captcha verification process, comming into effect after the user has solved
|
159 |
+
the challenge does not require the disclosure of the visitors IP address, so it is omitted.
|
160 |
|
161 |
But everything related to the displaying of the captcha widget like the challenge image,
|
162 |
the JavaScripts and so on is loaded directly from Google and is very likely to be logged,
|
166 |
|
167 |
If that's an issue for you, you better use a self hosted solution.
|
168 |
|
169 |
+
|
170 |
+
= Will you support plugin XYZ? =
|
171 |
+
|
172 |
+
If XYZ stands for a widely used free and OpenSource plugin in active development with some
|
173 |
+
100k+ downloads I will give it a try. Just ask.
|
174 |
+
|
175 |
+
If XYZ is some rarely used plugin (about 1k+ active installs or so), I will accept pull
|
176 |
+
requests on github and push it to the WP repository. Please note that in such cases I will
|
177 |
+
not feel responsible for code maintainance.
|
178 |
+
|
179 |
+
|
180 |
= The captcha does not show up. What’s wrong? =
|
181 |
|
182 |
On the plugin settings page check out if the option “Disable for known users” is activated (it is by default).
|
188 |
|
189 |
Here is some code that will fix it:
|
190 |
|
191 |
+
- Go to (https://gist.github.com/tareq1988/97d7f442ee3e92b7412e)
|
192 |
- Click the "Download Gist" button
|
193 |
- Unpack the `.tar.gz` file.
|
194 |
- Create a zip Archive out of the included file `recaptcha-comment-form-fix.php` and name it `recaptcha-comment-form-fix.zip`.
|
197 |
If the problem still persist, Houston really has a problem, and you are welcome to post a support request.
|
198 |
|
199 |
|
200 |
+
= Disabled submit buttons should be grey! Why aren't they? =
|
201 |
+
|
202 |
+
Very likely the Author of your Theme didn't care that a non functinal form element should
|
203 |
+
look different than a functional one. This how you can overcome that issue:
|
204 |
+
|
205 |
+
- Go to (https://gist.github.com/tareq1988/7cbfb0dab73eb32cb4a2)
|
206 |
+
- Click the "Download Gist" button
|
207 |
+
- Unpack the `.tar.gz` file.
|
208 |
+
- Create a zip Archive out of the included file `grey-out-disabled.php` and name it `grey-out-disabled.zip`.
|
209 |
+
- Install and activate it like any other WordPress plugin
|
210 |
+
|
211 |
+
|
212 |
+
= I want my visitors to solve only one Captcha and then never again. Is that possible? =
|
213 |
+
|
214 |
+
Yes. You can store in a session if a captcha was solved, and use the `wp_recaptcha_required`
|
215 |
+
filter to supress further captchas. See (https://github.com/tareq1988/wp-recaptcha-integration#real-world-example)
|
216 |
+
for a code example.
|
217 |
+
|
218 |
+
|
219 |
+
= I found a bug. Where should I post it? =
|
220 |
+
|
221 |
+
I personally prefer GitHub but you can post it in the forum as well. The plugin code is here: [GitHub](https://github.com/tareq1988/wp-recaptcha-integration)
|
222 |
+
|
223 |
+
|
224 |
+
= I want to use the latest files. How can I do this? =
|
225 |
+
|
226 |
+
Use the GitHub Repo rather than the WordPress Plugin. Do as follows:
|
227 |
+
|
228 |
+
1. If you haven't already done: [Install git](https://help.github.com/articles/set-up-git)
|
229 |
+
|
230 |
+
2. in the console cd into Your 'wp-content/plugins´ directory
|
231 |
+
|
232 |
+
3. type `git clone git@github.com:tareq1988/wp-recaptcha-integration.git`
|
233 |
+
|
234 |
+
4. If you want to update to the latest files (be careful, might be untested with your WP-Version) type `git pull.
|
235 |
+
|
236 |
+
Please note that the GitHub repository is more likely to contain unstable and untested code. Urgent fixes
|
237 |
+
concerning stability or security (like crashes, vulnerabilities and alike) are more likely to be fixed in
|
238 |
+
the official WP plugin repository first.
|
239 |
+
|
240 |
+
|
241 |
+
= I found a bug and fixed it. How can I contribute? =
|
242 |
+
|
243 |
+
Either post it on [GitHub](https://github.com/tareq1988/wp-recaptcha-integration) or—if you are working on a forked repository—send me a pull request.
|
244 |
+
|
245 |
+
|
246 |
+
= Will you accept translations? =
|
247 |
+
|
248 |
+
Since late 2015 WordPress.org offers a plugin translation API. Just use the
|
249 |
+
"Translate this plugin" button in the right sidebar.
|
250 |
+
|
251 |
+
|
252 |
== Screenshots ==
|
253 |
|
254 |
1. Plugin Settings (v 1.1.4)
|
258 |
|
259 |
== Changelog ==
|
260 |
|
261 |
+
= v1.2.4 (6 July, 2020) =
|
262 |
+
- Removed abandonment notice, plugin is no longer unmaintained.
|
263 |
+
|
264 |
+
= 1.2.1 =
|
265 |
+
- Drop most of Contact form 7 and Ninja Forms support. (Both have their own recaptcha now)
|
266 |
+
- Register Form compatibility with WooCommerce 3.0+ Thanks to [ywatt](https://github.com/ingomarent) and [MrFent37](https://wordpress.org/support/users/mrfent37/)
|
267 |
+
- Fix WSOD
|
268 |
|
269 |
= 1.2.0 =
|
270 |
- Support [cformsII](https://wordpress.org/plugins/cforms2/) (thanks to [Bastian Germann](https://github.com/bgermann))
|
401 |
|
402 |
The plugin offers some filters to allow themes and other plugins to hook in.
|
403 |
|
404 |
+
See [GitHub-Repo](https://github.com/tareq1988/wp-recaptcha-integration) for details.
|
|
|
|
|
|
|
|
wp-recaptcha-integration.php
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name:
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-recaptcha-integration/
|
5 |
Description: Integrate reCaptcha in your blog. Supports no Captcha (new style recaptcha). Provides of the box integration for signup, login, comment forms and lost password.
|
6 |
-
Version: 1.2.
|
7 |
-
Author:
|
8 |
-
Author URI: https://
|
9 |
Text Domain: wp-recaptcha-integration
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
-
/* Copyright
|
|
|
14 |
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -37,9 +38,12 @@ define( 'WP_RECAPTCHA_INTEGRATION_DIRECTORY', plugin_dir_path(__FILE__) );
|
|
37 |
*/
|
38 |
function wp_recaptcha_integration_autoload( $classname ) {
|
39 |
$class_path = dirname(__FILE__). sprintf('/inc/class-%s.php' , strtolower( $classname ) ) ;
|
40 |
-
|
|
|
41 |
require_once $class_path;
|
|
|
42 |
}
|
|
|
43 |
spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
44 |
|
45 |
|
@@ -47,55 +51,19 @@ spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
|
47 |
function wp_recaptcha_disable_updates($value) {
|
48 |
if ( version_compare(PHP_VERSION, '5.4', '<') ) {
|
49 |
$plugin_basename = plugin_basename(__FILE__);
|
|
|
50 |
if ( isset( $value->response[ $plugin_basename ] ) && version_compare( $value->response[ $plugin_basename ]->new_version , '2.0.0', '>=' ) ) {
|
51 |
unset( $value->response[ plugin_basename(__FILE__) ] );
|
52 |
}
|
53 |
}
|
54 |
-
return $value;
|
55 |
-
}
|
56 |
-
add_filter('site_transient_update_plugins', 'wp_recaptcha_disable_updates');
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
61 |
-
printf(
|
62 |
-
'<tr class="plugin-update-tr active" id="wp-recaptcha-integration" data-slug="wp-recaptcha-integration" data-plugin="wp-recaptcha-integration/wp-recaptcha-integration.php">' .
|
63 |
-
'<td colspan="%1$d" class="plugin-update colspanchange">' .
|
64 |
-
'<div class="update-message notice inline error notice-alt"><p><strong>%2$s</strong> %3$s</p></div></td></tr>',
|
65 |
-
esc_attr( $wp_list_table->get_column_count() ),
|
66 |
-
esc_html__( 'WP Recaptcha Integration is no longer maintained.', 'wp-recaptcha-integration' ),
|
67 |
-
esc_html__( 'It will likely vanish from the WordPress plugin repository by September 2020.', 'wp-recaptcha-integration' )
|
68 |
-
);
|
69 |
-
}
|
70 |
-
|
71 |
-
function wp_recaptcha_deprecation_admin_notice() {
|
72 |
-
?>
|
73 |
-
<div class="notice notice-error">
|
74 |
-
<p>
|
75 |
-
<strong>
|
76 |
-
<?php esc_html_e( 'WP Recaptcha Integration is no longer maintained.', 'wp-recaptcha-integration' ); ?>
|
77 |
-
</strong>
|
78 |
-
<?php esc_html_e( 'It will likely vanish from the WordPress plugin repository by September 2020.', 'wp-recaptcha-integration' ); ?>
|
79 |
-
<?php
|
80 |
-
global $pagenow;
|
81 |
-
if ( 'plugins.php' !== $pagenow && current_user_can('install_plugins') ) {
|
82 |
-
printf(
|
83 |
-
'<a href="%s">%s</a>',
|
84 |
-
admin_url('plugins.php'),
|
85 |
-
esc_html__( 'Disable it on the plugins page' )
|
86 |
-
);
|
87 |
-
}
|
88 |
-
?>
|
89 |
-
</p>
|
90 |
-
</div>
|
91 |
-
<?php
|
92 |
}
|
93 |
|
94 |
-
|
95 |
-
add_action( 'admin_notices', 'wp_recaptcha_deprecation_admin_notice' );
|
96 |
|
97 |
WP_reCaptcha::instance();
|
98 |
|
99 |
-
|
100 |
-
if ( is_admin() )
|
101 |
WP_reCaptcha_Options::instance();
|
|
1 |
<?php
|
2 |
/*
|
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). Provides of the box integration for signup, login, comment forms and lost password.
|
6 |
+
Version: 1.2.4
|
7 |
+
Author: weDevs
|
8 |
+
Author URI: https://wedevs.com/
|
9 |
Text Domain: wp-recaptcha-integration
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
+
/* Copyright 2020 weDevs (email : info AT wedevs DOT com)
|
14 |
+
Copyright 2014 Jörn Lund (email : joern AT podpirate DOT org)
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License, version 2, as
|
38 |
*/
|
39 |
function wp_recaptcha_integration_autoload( $classname ) {
|
40 |
$class_path = dirname(__FILE__). sprintf('/inc/class-%s.php' , strtolower( $classname ) ) ;
|
41 |
+
|
42 |
+
if ( file_exists($class_path) ) {
|
43 |
require_once $class_path;
|
44 |
+
}
|
45 |
}
|
46 |
+
|
47 |
spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
48 |
|
49 |
|
51 |
function wp_recaptcha_disable_updates($value) {
|
52 |
if ( version_compare(PHP_VERSION, '5.4', '<') ) {
|
53 |
$plugin_basename = plugin_basename(__FILE__);
|
54 |
+
|
55 |
if ( isset( $value->response[ $plugin_basename ] ) && version_compare( $value->response[ $plugin_basename ]->new_version , '2.0.0', '>=' ) ) {
|
56 |
unset( $value->response[ plugin_basename(__FILE__) ] );
|
57 |
}
|
58 |
}
|
|
|
|
|
|
|
59 |
|
60 |
+
return $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
+
add_filter('site_transient_update_plugins', 'wp_recaptcha_disable_updates');
|
|
|
64 |
|
65 |
WP_reCaptcha::instance();
|
66 |
|
67 |
+
if ( is_admin() ) {
|
|
|
68 |
WP_reCaptcha_Options::instance();
|
69 |
+
}
|