Version Description
- Drop most of Contact form 7 and Ninja Forms support. (Both have their own recaptcha now)
- Deprecate recaptcha v1.
- New Option: Size
- New Option: Submit form when captcha is solved
- Cleanup options page
- Register Form compatibility with WooCommerce 3.0+ Thanks to ywatt and MrFent37
Download this release
Release Info
Developer | podpirate |
Plugin | WordPress ReCaptcha Integration |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.6 to 1.3.0
- .svnignore +0 -5
- TODO.md +31 -0
- composer.json +0 -17
- css/recaptcha-options.css +79 -101
- css/recaptcha-options.min.css +3 -0
- images/grecaptcha-theme-dark.png +0 -0
- images/grecaptcha-theme-light.png +0 -0
- images/recaptcha-theme-blackglass.png +0 -0
- images/recaptcha-theme-clean.png +0 -0
- images/recaptcha-theme-red.png +0 -0
- images/recaptcha-theme-white.png +0 -0
- inc/class-wp_recaptcha.php +648 -0
- inc/class-wp_recaptcha_awesome_support.php +90 -0
- inc/class-wp_recaptcha_bbpress.php +73 -0
- inc/class-wp_recaptcha_captcha.php +14 -31
- inc/class-wp_recaptcha_cforms2.php +65 -0
- inc/class-wp_recaptcha_contactform7.php +18 -132
- inc/class-wp_recaptcha_ninjaforms.php +14 -138
- inc/class-wp_recaptcha_nocaptcha.php +170 -163
- inc/class-wp_recaptcha_options.php +294 -249
- inc/class-wp_recaptcha_recaptcha.php +0 -201
- inc/class-wp_recaptcha_woocommerce.php +74 -8
- inc/recaptchalib.php +0 -277
- inc/woocommerce/myaccount/form-lost-password.php +54 -0
- js/recaptcha-options.js +9 -15
- js/recaptcha-options.min.js +2 -0
- js/wp-recaptcha.js +89 -0
- js/wp-recaptcha.min.js +2 -0
- js/wpcf7.js +0 -14
- languages/wp-recaptcha-integration-cs_CZ.mo +0 -0
- languages/wp-recaptcha-integration-cs_CZ.po +475 -0
- languages/wp-recaptcha-integration-it_IT.mo +0 -0
- languages/wp-recaptcha-integration-it_IT.po +373 -0
- languages/wp-recaptcha-integration-pt_PT.mo +0 -0
- languages/wp-recaptcha-integration-pt_PT.po +481 -0
- readme.txt +100 -80
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- wp-recaptcha-integration.php +18 -664
.svnignore
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
.git
|
2 |
-
.gitignore
|
3 |
-
composer.json
|
4 |
-
mkzip.sh
|
5 |
-
README.md
|
|
|
|
|
|
|
|
|
|
TODO.md
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
WordPress reCaptcha Integration TODO
|
2 |
+
====================================
|
3 |
+
|
4 |
+
- add settings link in plugin list table #75
|
5 |
+
-
|
6 |
+
- select size (should support invisible captcha)
|
7 |
+
- make send client ip optional
|
8 |
+
- new lockout feature:
|
9 |
+
- at login: "Captcha broken?"
|
10 |
+
- form: "Enter Admin login or email"
|
11 |
+
- admin gets reset token
|
12 |
+
- Form: admin login credentials
|
13 |
+
- Submit: delete_option('recaptcha_publickey'); delete_option('recaptcha_privatekey');
|
14 |
+
- documentation for any plugin integration
|
15 |
+
|
16 |
+
v2 invisible
|
17 |
+
data-sitekey x x
|
18 |
+
data-theme x
|
19 |
+
data-badge x bottomright | bottomleft | inline
|
20 |
+
data-type x x audio | image
|
21 |
+
data-size x x compact/normal | invisible
|
22 |
+
data-tabindex x x 0
|
23 |
+
data-callback x x fn
|
24 |
+
data-expired-callback x fn
|
25 |
+
|
26 |
+
|
27 |
+
js
|
28 |
+
grecaptcha.render x x
|
29 |
+
grecaptcha.execute x
|
30 |
+
grecaptcha.reset x x
|
31 |
+
grecaptcha.getResponse x x
|
composer.json
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "mcguffin/wp-recaptcha-integration",
|
3 |
-
"type": "wordpress-plugin",
|
4 |
-
"license": "GPLv2",
|
5 |
-
"description": "WordPress reCaptcha integration supporting Ninja Forms and Contact Form 7",
|
6 |
-
"keywords": [
|
7 |
-
"wordpress",
|
8 |
-
"plugin",
|
9 |
-
"recaptcha",
|
10 |
-
"contact form 7",
|
11 |
-
"ninja forms",
|
12 |
-
"captcha"
|
13 |
-
],
|
14 |
-
"require": {
|
15 |
-
"php": ">=5.2.4"
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/recaptcha-options.css
CHANGED
@@ -1,111 +1,89 @@
|
|
1 |
-
.recaptcha-select-
|
2 |
-
|
3 |
-
}
|
4 |
-
.recaptcha-select-theme label {
|
5 |
-
display:inline-block;
|
6 |
-
margin:30px;
|
7 |
-
padding:0px;
|
8 |
-
background-color:transparent;
|
9 |
-
border-radius:10px;
|
10 |
-
max-width:200px;
|
11 |
-
-webkit-transition: all 0.125s ease-in-out;
|
12 |
-
transition: all 0.125s ease-in-out;
|
13 |
-
}
|
14 |
-
.recaptcha-select-theme input[type="radio"] {
|
15 |
-
display:none;
|
16 |
-
}
|
17 |
-
.recaptcha-select-theme input[type="radio"]:checked + label {
|
18 |
-
background-color:#0074A2;
|
19 |
-
color:#fff;
|
20 |
-
margin:15px;
|
21 |
-
padding:15px;
|
22 |
-
box-shadow: rgba(0,0,0,.3) 0 0 15px 5px;
|
23 |
-
}
|
24 |
-
.recaptcha-select-theme .title {
|
25 |
-
display:block;
|
26 |
-
font-weight:600;
|
27 |
-
text-align:center;
|
28 |
-
padding-bottom:0.5em;
|
29 |
-
}
|
30 |
-
.recaptcha-select-theme .visual,
|
31 |
-
.recaptcha-select-theme img {
|
32 |
-
width:100%;
|
33 |
-
height:auto;
|
34 |
-
}
|
35 |
-
.recaptcha-select-theme .visual {
|
36 |
-
display:block;
|
37 |
-
-moz-box-sizing:border-box;
|
38 |
-
box-sizing:border-box;
|
39 |
-
background-color:#888;
|
40 |
-
color:#fff;
|
41 |
-
font-weight:bold;
|
42 |
-
padding:1em;
|
43 |
-
text-align:center;
|
44 |
-
border-radius:10px;
|
45 |
-
border:5px dashed #444;
|
46 |
-
}
|
47 |
|
|
|
|
|
|
|
|
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
.recaptcha-onoff {
|
51 |
-
}
|
52 |
.recaptcha-onoff input[type="checkbox"] {
|
53 |
-
|
54 |
-
|
55 |
.recaptcha-onoff label {
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
}
|
66 |
-
.recaptcha-onoff label .title {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
.recaptcha-onoff input[type="checkbox"]:checked + label {
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
}
|
87 |
-
.recaptcha-onoff input[type="checkbox"]:checked + label .dashicons-lock {
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
}
|
94 |
|
95 |
-
.flavor-grecaptcha .flavor-recaptcha,
|
96 |
-
.flavor-recaptcha .flavor-grecaptcha {
|
97 |
-
display:none;
|
98 |
-
}
|
99 |
.warning {
|
100 |
-
|
101 |
-
}
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
|
107 |
.recaptcha-explain .loading .spinner {
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
}
|
1 |
+
.recaptcha-select-language {
|
2 |
+
width: 100%; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
@media only screen and (min-width: 600px) {
|
5 |
+
.recaptcha-preview-container {
|
6 |
+
position: relative;
|
7 |
+
float: right; } }
|
8 |
|
9 |
+
.recaptcha-preview {
|
10 |
+
margin: 1em auto;
|
11 |
+
border-radius: 4px;
|
12 |
+
-webkit-box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 4px 1px;
|
13 |
+
box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 4px 1px;
|
14 |
+
background-position: center center;
|
15 |
+
background-repeat: no-repeat;
|
16 |
+
background-size: 100%; }
|
17 |
+
@media only screen and (min-width: 600px) {
|
18 |
+
.recaptcha-preview {
|
19 |
+
position: absolute;
|
20 |
+
bottom: 0;
|
21 |
+
right: 0;
|
22 |
+
margin: 0; } }
|
23 |
+
.recaptcha-preview[data-size="normal"] {
|
24 |
+
width: 302px;
|
25 |
+
height: 76px; }
|
26 |
+
.recaptcha-preview[data-size="normal"][data-theme="light"] {
|
27 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAACYCAMAAAAGJMcJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAC0UExURUdwTLKysra2twAAAPn5+dPT0////93d3eXl5ePj45ubnE+P9fT29xg8qvDw8CA/q+jp6vn579vd4rXV8snw+pmw1PbVrvvwy6acm7+impmhvaampsfJzCNCnkiG6q5UCb7Awt68pG8BADBMqfrz1KfA3+P4+gIAV4zP9S+X1NaXTJudq12R4vnz30pntHCq58etnksCAHGOu5WPjwJor+q5fQMOfOTSxQAFQ6Q/AJIzAHBiS9dg2HcAAAAKdFJOUwD///////++TYQe9ZcvAAAOH0lEQVR42uydCXuaTBSFA0Lbj46IKCYq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RMu2y4sKOdvGoALmeN6GX3klpzdUWhS35acOa40zXBIGVi57T3pB1WTl24hojkchFBp5O5/iox2VkgJelONaYBDnXBuXir74asUCs6Kqj9eLmqsWsXKEdzAuJPx1/hPgylUsknZNLBlFxvT25hgD0IRe54Nt6Vsq9WBCRS3OX3Wv1KXNKpnJlXDKk0zm5kvDQVNgWN5rQT+Uq7b3XkEVJDl9KNj/TrGbcFkm3/mVOrrMYC7kgV+jacfEZz4+ltYgfVM667ME9Fx8pm5oT+vmcK1joXAm5NrQtuijTU6L0yjHM3nO1k9n391x2Up6kyLnAl8zTw5271q6dzVJrU631whhOi2DJtb7+0U+IkAs8pIgXezJDLvB9OqUSyAX+F5ALQC4AuQCAXOCP5NJ4D2B9NMkVKYMXAdbHqMjbKWUQu8DKHIxSO8/bKwB+gb1H7CK8CLA2EcWtd5YK9zuLWg1CAAAAAElFTkSuQmCC); }
|
28 |
+
.recaptcha-preview[data-size="normal"][data-theme="dark"] {
|
29 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAACYCAMAAAAGJMcJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAADJUExURUdwTCIiIlJSUv///9HR0efn55qcn2lqa6KiouTk5MHBwZubmx09qk6P9bS1tbe3tyAgICEiMCIqUiM9mZaYk2eNmy4yN/X/////9s/4/0iG6ZyTdSkqKjYiIiMgdyJPd39RKf/21UNCQUBuk46NjZp3SzdRdYaZm1goILxvACQ4ZQBdtIEXHeKrbP3brHt8fqmpqqHa+02F2pqEZF6s4OHe4W1DJIRjREJ8yAB7uozB5PHFkeLPwMrS13ucwbdUBbWafLuITWOi9d9Mo6sAAAAKdFJOUwD///+ETNP+vk1vIE3FAAAN1ElEQVR42uydC1eqTBuGA993sd8oHBDJijKRtGzvIM3suA/f//9R3zwzw1Es09yl3rctRWQeWnKte5454c7Ozn/fDB2CPlTGt393uP4BWtAq8PpnZ+dfQw88DYI+VF6gG//tfNMDfBXQh8sP9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uahD5QJcOpaEQWCndJG9sRstU6RXZKwYLo1pL/sCfSCfZWYvPBe0OD0+r6b36mMW2xdPRriZ431Ke14xM5E4NuCCbv4qt+Wf/kJE5YIe6uxcawAXtEX18lsRALigbKuFARdkABcEuCAIcEH/ARfZCt8DtL4qS0lqcYgdtIFqmyZ7sjVqF7R23aot7ZNkRxaCVhftkqB9CrygtdFKQ936BiVulbwW27PMAAAAAElFTkSuQmCC); }
|
30 |
+
.recaptcha-preview[data-size="compact"] {
|
31 |
+
width: 158px;
|
32 |
+
height: 138px; }
|
33 |
+
.recaptcha-preview[data-size="compact"][data-theme="light"] {
|
34 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATwAAAEUCAMAAACBJHpvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA5UExURUdwTLW1te3t7SI9qsLCwgAAAJqamvn5+dPT0////0uK99/f4KmpqczNzqOjo2xsbBwcHEpKSnKQ0rLoEloAAAABdFJOUwBA5thmAAAKZElEQVR42u3diWLaOBAGYDRRZCUjyZj3f9iVRoct2xCg3Ybjn+4mPrDAH6ML7PZwOByILeLGYDpIgO6e8FzsaEDcGLG2Rj2yFhT3BFuKiYe8uy/3Yuoh8e4Na4EHPOABD3gI4AEPeMBDAA94wAMe8BDAAx7wgIcAHvCABzwE8IAHPOABDwE84AEPeAjgAQ94wAMe8IAHPOABDwE84AEPeAjgAQ94wAMeAniPhEde3xyegCd2+q4g4MXw9+F54MXQdwbwCt7XjQE84AEPeMADHvCABzzgAQ94wAMe8IAHvP8Lj4359Q9MKRj9ZHhWqchmPz9/PTvjazBPhjcJW3zhFng3440F7/gXqu34R6X8iOc+Pz3w7sfTwHvJzGPvB3LGmPT8pOJC92LJex5s3OoaEem4qijvtbH9VL577ZwK6Z89lkJkSu/OoTxbxfOtPIm06rgUH1+qsf7x8Mip3HmY42eKcQifeYG61BhN3qxaLrTVcsDntHAa86bj8ozj48b4JPJmTeUQqsXnA47l/H1+MZK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874O3jxXmF/Sn3UG338dKcbKvnFgtu/pgKeB1ens8S7zZ8ss05ftvLkn/AK0kVx3VunXR5Lej3tbv69imyKmwTL7xvlb0FL31pEato19EG5fmtb6W64cY9YqujWPyTf2jLb34X2m13PRKzlW/NvGWmt7+B79ZbRmnovysD3m2HfJ394gx4COABD3jAQwAPeMADHvAu4KmQol1E6G+8DjgfHoKx74iXbgVYXMCqb7wYU8nlr/HHm+LlizzzvSPrS8pos7AT88Xc1P2m3ZJeD4+NIuOC8WwsS/Kl7brc3yPX3vkobNO1eevrDangkZI7W3I52qQ178u9AbWkl8SzCS9WvyjnKV1RmH4oE7Rcmxl/RAprk8O2Xle8/CjO5aSrZeX+MZXYvayFF8RjIhuMpnLbRMowjqerY3uWSEJcVmmHG9Llrm5zeX/BK49SuRwx1kk+kUvOOkOvh1cu+s8GNuKxXNqaqqtW6YJ0LdcY+3SvmS21llI/QR1ebDZ9rK2BSj0t74Tsjpuf9K9E+wlPaZ3OjMqNSz5lmxjla4ZDhhhyy2hzraV0u3aPp8vV3Xt4+eJt+6Jt3tDhxSRKv+SqdlczL30sH0zY1r2G5/On9zOebXj5nnh6cTw5X5ZxH6UmjiTzVOlltdm5tr/hCRrvZZ6Qu5fHk/Mtt6Hk7jPuTzcuhqLqz+GlR2mXOowtXuq33yDzWOZZWn6yzB3SzZuh3i+xU2u/2jjPyaCuw7PLNo9frs27GET9Al2+I+fS15VP+k3m3/tUxTrzbh/P/DW8cicx8O4K7wfgIYAHvMfHY4tLnu4bq1k+EFLvvohZd4iph9y7I+84Jt5B9BC3h9gdDgS+2yPW2cN/Cl9XTBDr6aUAAAAASUVORK5CYII=); }
|
35 |
+
.recaptcha-preview[data-size="compact"][data-theme="dark"] {
|
36 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATwAAAEUCAMAAACBJHpvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTDAwMEuK9yE8rMLCwpubm7W1tSI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ifutdlfCxl7B/H88o9euemPrf8OgX3hbEzVDgAe8d8fCo3dPNvD1pEwDx1ODM6FNKPfyW/CfyLqTEO7Ee4okQu9NJg+9xulRnT/8BSXNgGrzomHMAAAAASUVORK5CYII=); }
|
37 |
+
|
38 |
+
.radio-horizontal label {
|
39 |
+
margin-right: 1em; }
|
40 |
|
|
|
|
|
41 |
.recaptcha-onoff input[type="checkbox"] {
|
42 |
+
display: none; }
|
43 |
+
|
44 |
.recaptcha-onoff label {
|
45 |
+
display: block;
|
46 |
+
width: 250px;
|
47 |
+
color: #999;
|
48 |
+
border-radius: 7px;
|
49 |
+
border: 2px solid #bbb;
|
50 |
+
float: left;
|
51 |
+
margin: 0.5em 1em;
|
52 |
+
-webkit-transition: all 0.125s ease-in-out;
|
53 |
+
-o-transition: all 0.125s ease-in-out;
|
54 |
+
transition: all 0.125s ease-in-out; }
|
55 |
+
.recaptcha-onoff label .title {
|
56 |
+
font-weight: bold;
|
57 |
+
display: block;
|
58 |
+
padding: 0.5em 0.5em 0.5em 2.5em; }
|
59 |
+
.recaptcha-onoff label .dashicons-lock {
|
60 |
+
position: absolute;
|
61 |
+
font-size: 1.5em;
|
62 |
+
float: left;
|
63 |
+
padding: 6px;
|
64 |
+
color: #bbb;
|
65 |
+
-webkit-transition: all 0.25s cubic-bezier(0, 1.8, 1, 1.8);
|
66 |
+
-o-transition: all 0.25s cubic-bezier(0, 1.8, 1, 1.8);
|
67 |
+
transition: all 0.25s cubic-bezier(0, 1.8, 1, 1.8); }
|
68 |
+
|
69 |
.recaptcha-onoff input[type="checkbox"]:checked + label {
|
70 |
+
background-color: #fff;
|
71 |
+
border-color: #0074A2;
|
72 |
+
border-style: solid;
|
73 |
+
color: #333;
|
74 |
+
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0px;
|
75 |
+
box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0px; }
|
76 |
+
.recaptcha-onoff input[type="checkbox"]:checked + label .dashicons-lock {
|
77 |
+
color: #0074A2;
|
78 |
+
font-size: 2em;
|
79 |
+
padding-left: 4px;
|
80 |
+
padding-right: 8px;
|
81 |
+
padding-top: 2px; }
|
|
|
82 |
|
|
|
|
|
|
|
|
|
83 |
.warning {
|
84 |
+
color: red; }
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
.recaptcha-explain .loading .spinner {
|
87 |
+
display: inline-block;
|
88 |
+
float: none;
|
89 |
+
vertical-align: middle; }
|
|
css/recaptcha-options.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.recaptcha-select-language{width:100%}@media only screen and (min-width: 600px){.recaptcha-preview-container{position:relative;float:right}}.recaptcha-preview{margin:1em auto;border-radius:4px;-webkit-box-shadow:rgba(0,0,0,0.08) 0px 0px 4px 1px;box-shadow:rgba(0,0,0,0.08) 0px 0px 4px 1px;background-position:center center;background-repeat:no-repeat;background-size:100%}@media only screen and (min-width: 600px){.recaptcha-preview{position:absolute;bottom:0;right:0;margin:0}}.recaptcha-preview[data-size="normal"]{width:302px;height:76px}.recaptcha-preview[data-size="normal"][data-theme="light"]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAACYCAMAAAAGJMcJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAC0UExURUdwTLKysra2twAAAPn5+dPT0////93d3eXl5ePj45ubnE+P9fT29xg8qvDw8CA/q+jp6vn579vd4rXV8snw+pmw1PbVrvvwy6acm7+impmhvaampsfJzCNCnkiG6q5UCb7Awt68pG8BADBMqfrz1KfA3+P4+gIAV4zP9S+X1NaXTJudq12R4vnz30pntHCq58etnksCAHGOu5WPjwJor+q5fQMOfOTSxQAFQ6Q/AJIzAHBiS9dg2HcAAAAKdFJOUwD///////++TYQe9ZcvAAAOH0lEQVR42uydCXuaTBSFA0Lbj46IKCYqaTAGU2PURrO2//9/fXNnYROzaGxVzskiEhjy6Puce2fmMp6cnHz7akPQJ+vrtxOu//BCQLvQf9y3bN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YBDnXBuXir74asUCs6Kqj9eLmqsWsXKEdzAuJPx1/hPgylUsknZNLBlFxvT25hgD0IRe54Nt6Vsq9WBCRS3OX3Wv1KXNKpnJlXDKk0zm5kvDQVNgWN5rQT+Uq7b3XkEVJDl9KNj/TrGbcFkm3/mVOrrMYC7kgV+jacfEZz4+ltYgfVM667ME9Fx8pm5oT+vmcK1joXAm5NrQtuijTU6L0yjHM3nO1k9n391x2Up6kyLnAl8zTw5271q6dzVJrU631whhOi2DJtb7+0U+IkAs8pIgXezJDLvB9OqUSyAX+F5ALQC4AuQCAXOCP5NJ4D2B9NMkVKYMXAdbHqMjbKWUQu8DKHIxSO8/bKwB+gb1H7CK8CLA2EcWtd5YK9zuLWg1CAAAAAElFTkSuQmCC)}.recaptcha-preview[data-size="normal"][data-theme="dark"]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAACYCAMAAAAGJMcJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAADJUExURUdwTCIiIlJSUv///9HR0efn55qcn2lqa6KiouTk5MHBwZubmx09qk6P9bS1tbe3tyAgICEiMCIqUiM9mZaYk2eNmy4yN/X/////9s/4/0iG6ZyTdSkqKjYiIiMgdyJPd39RKf/21UNCQUBuk46NjZp3SzdRdYaZm1goILxvACQ4ZQBdtIEXHeKrbP3brHt8fqmpqqHa+02F2pqEZF6s4OHe4W1DJIRjREJ8yAB7uozB5PHFkeLPwMrS13ucwbdUBbWafLuITWOi9d9Mo6sAAAAKdFJOUwD///+ETNP+vk1vIE3FAAAN1ElEQVR42uydC1eqTBuGA993sd8oHBDJijKRtGzvIM3suA/f//9R3zwzw1Es09yl3rctRWQeWnKte5454c7Ozn/fDB2CPlTGt393uP4BWtAq8PpnZ+dfQw88DYI+VF6gG//tfNMDfBXQh8sP9G87hg7fglbhXbqxo+v4HqBVSNcBFwS4IMAFQYALAlwQ4IIgwAUBLghwQRDgggAXBLggCHBBgAsCXBAEuCDABQEuCAJc0HzynV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f/kJE5YIe6uxcawAXtEX18lsRALigbKuFARdkABcEuCAIcEH/ARfZCt8DtL4qS0lqcYgdtIFqmyZ7sjVqF7R23aot7ZNkRxaCVhftkqB9CrygtdFKQ936BiVulbwW27PMAAAAAElFTkSuQmCC)}.recaptcha-preview[data-size="compact"]{width:158px;height:138px}.recaptcha-preview[data-size="compact"][data-theme="light"]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATwAAAEUCAMAAACBJHpvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA5UExURUdwTLW1te3t7SI9qsLCwgAAAJqamvn5+dPT0////0uK99/f4KmpqczNzqOjo2xsbBwcHEpKSnKQ0rLoEloAAAABdFJOUwBA5thmAAAKZElEQVR42u3diWLaOBAGYDRRZCUjyZj3f9iVRoct2xCg3Ybjn+4mPrDAH6ML7PZwOByILeLGYDpIgO6e8FzsaEDcGLG2Rj2yFhT3BFuKiYe8uy/3Yuoh8e4Na4EHPOABD3gI4AEPeMBDAA94wAMe8BDAAx7wgIcAHvCABzwE8IAHPOABDwE84AEPeAjgAQ94wAMe8IAHPOABDwE84AEPeAjgAQ94wAMeAniPhEde3xyegCd2+q4g4MXw9+F54MXQdwbwCt7XjQE84AEPeMADHvCABzzgAQ94wAMe8IAHvP8Lj4359Q9MKRj9ZHhWqchmPz9/PTvjazBPhjcJW3zhFng3440F7/gXqu34R6X8iOc+Pz3w7sfTwHvJzGPvB3LGmPT8pOJC92LJex5s3OoaEem4qijvtbH9VL577ZwK6Z89lkJkSu/OoTxbxfOtPIm06rgUH1+qsf7x8Mip3HmY42eKcQifeYG61BhN3qxaLrTVcsDntHAa86bj8ozj48b4JPJmTeUQqsXnA47l/H1+MZKQthR/Obd/Ba8tb2Ls8FpINpi2avbw6Ng/vOEVBG77j7wqXgB0W52eBM/EmikJMVnisZzXAi8QqZIMPtlyzq+UvXHhaGk+uWh7TE3CsXsLUrYeQ3pJY85ZXcSleBWLP+b1ZD/ZgUx+Oko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B79ZbRmnovysD3m2HfJ394gx4COABD3jAQwAPeMADHvAu4KmQol1E6G+8DjgfHoKx74iXbgVYXMCqb7wYU8nlr/HHm+LlizzzvSPrS8pos7AT88Xc1P2m3ZJeD4+NIuOC8WwsS/Kl7brc3yPX3vkobNO1eevrDangkZI7W3I52qQ178u9AbWkl8SzCS9WvyjnKV1RmH4oE7Rcmxl/RAprk8O2Xle8/CjO5aSrZeX+MZXYvayFF8RjIhuMpnLbRMowjqerY3uWSEJcVmmHG9Llrm5zeX/BK49SuRwx1kk+kUvOOkOvh1cu+s8GNuKxXNqaqqtW6YJ0LdcY+3SvmS21llI/QR1ebDZ9rK2BSj0t74Tsjpuf9K9E+wlPaZ3OjMqNSz5lmxjla4ZDhhhyy2hzraV0u3aPp8vV3Xt4+eJt+6Jt3tDhxSRKv+SqdlczL30sH0zY1r2G5/On9zOebXj5nnh6cTw5X5ZxH6UmjiTzVOlltdm5tr/hCRrvZZ6Qu5fHk/Mtt6Hk7jPuTzcuhqLqz+GlR2mXOowtXuq33yDzWOZZWn6yzB3SzZuh3i+xU2u/2jjPyaCuw7PLNo9frs27GET9Al2+I+fS15VP+k3m3/tUxTrzbh/P/DW8cicx8O4K7wfgIYAHvMfHY4tLnu4bq1k+EFLvvohZd4iph9y7I+84Jt5B9BC3h9gdDgS+2yPW2cN/Cl9XTBDr6aUAAAAASUVORK5CYII=)}.recaptcha-preview[data-size="compact"][data-theme="dark"]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATwAAAEUCAMAAACBJHpvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTDAwMEuK9yE8rMLCwpubm7W1tSIiIv///1JSUnp6eoyMjObm5kRERWdnZyxEkkJ2zgioD9wAAAABdFJOUwBA5thmAAAJuUlEQVR42u3diXbaOhAGYKZYcrSS93/aqxktlm0BhtyeAvmnPanxIvCX0WLHSk+n00lbg3gwrD5JgO45vmJHM+LBoMB62hhQPBPB6JR4y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box"]{display:none}.recaptcha-onoff label{display:block;width:250px;color:#999;border-radius:7px;border:2px solid #bbb;float:left;margin:0.5em 1em;-webkit-transition:all 0.125s ease-in-out;-o-transition:all 0.125s ease-in-out;transition:all 0.125s ease-in-out}.recaptcha-onoff label .title{font-weight:bold;display:block;padding:0.5em 0.5em 0.5em 2.5em}.recaptcha-onoff label .dashicons-lock{position:absolute;font-size:1.5em;float:left;padding:6px;color:#bbb;-webkit-transition:all 0.25s cubic-bezier(0, 1.8, 1, 1.8);-o-transition:all 0.25s cubic-bezier(0, 1.8, 1, 1.8);transition:all 0.25s cubic-bezier(0, 1.8, 1, 1.8)}.recaptcha-onoff input[type="checkbox"]:checked+label{background-color:#fff;border-color:#0074A2;border-style:solid;color:#333;-webkit-box-shadow:rgba(0,0,0,0.5) 0 0 5px 0px;box-shadow:rgba(0,0,0,0.5) 0 0 5px 0px}.recaptcha-onoff input[type="checkbox"]:checked+label .dashicons-lock{color:#0074A2;font-size:2em;padding-left:4px;padding-right:8px;padding-top:2px}.warning{color:red}.recaptcha-explain .loading .spinner{display:inline-block;float:none;vertical-align:middle}
|
2 |
+
|
3 |
+
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlY2FwdGNoYS1vcHRpb25zLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsMkJBQ0MsVUFBQSxDQUNBLDBDQUNELDZCQUdFLGtCQUNBLFdBQUEsQ0FFRCxDQUNELG1CQU1DLGdCQUNBLGtCQUNBLG9EQUFBLDRDQVFBLGtDQUNBLDRCQUNBLG9CQUFBLENBVEEsMENBVEQsbUJBVUUsa0JBQ0EsU0FDQSxRQUNBLFFBQUEsQ0EwQkQsQ0F2Q0QsdUNBb0JFLFlBQ0EsV0FBQSxDQXJCRiwyREF1QkcsZ3BLQUFBLENBdkJILDBEQTBCRyx3a0tBQUEsQ0ExQkgsd0NBOEJFLFlBQ0EsWUFBQSx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LjgsIDEsIDEuOCk7XG5cdFx0fVxuXHR9XG5cdGlucHV0W3R5cGU9XCJjaGVja2JveFwiXTpjaGVja2VkICsgbGFiZWwge1xuXHRcdGJhY2tncm91bmQtY29sb3I6I2ZmZjtcblx0XHRib3JkZXItY29sb3I6IzAwNzRBMjtcblx0XHRib3JkZXItc3R5bGU6c29saWQ7XG5cdFx0Y29sb3I6IzMzMztcblx0ICAgIGJveC1zaGFkb3c6IHJnYmEoMCwwLDAsLjUpIDAgMCA1cHggMHB4O1xuXHRcdC5kYXNoaWNvbnMtbG9jayB7XG5cdFx0XHRjb2xvcjojMDA3NEEyO1xuXHRcdFx0Zm9udC1zaXplOjJlbTtcblx0XHRcdHBhZGRpbmctbGVmdDo0cHg7XG5cdFx0XHRwYWRkaW5nLXJpZ2h0OjhweDtcblx0XHRcdHBhZGRpbmctdG9wOjJweDtcblx0XHR9XG5cdH1cbn1cblxuLndhcm5pbmcge1xuXHRjb2xvcjpyZWQ7XG59XG5cblxuLnJlY2FwdGNoYS1leHBsYWluIC5sb2FkaW5nIC5zcGlubmVyIHtcblx0ZGlzcGxheTppbmxpbmUtYmxvY2s7XG5cdGZsb2F0Om5vbmU7XG5cdHZlcnRpY2FsLWFsaWduOm1pZGRsZTtcbn1cbiJdfQ== */
|
images/grecaptcha-theme-dark.png
DELETED
Binary file
|
images/grecaptcha-theme-light.png
DELETED
Binary file
|
images/recaptcha-theme-blackglass.png
DELETED
Binary file
|
images/recaptcha-theme-clean.png
DELETED
Binary file
|
images/recaptcha-theme-red.png
DELETED
Binary file
|
images/recaptcha-theme-white.png
DELETED
Binary file
|
inc/class-wp_recaptcha.php
ADDED
@@ -0,0 +1,648 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Plugin base Class
|
5 |
+
*/
|
6 |
+
class WP_reCaptcha {
|
7 |
+
|
8 |
+
private static $_is_network_activated = null;
|
9 |
+
|
10 |
+
private $_has_api_key = false;
|
11 |
+
|
12 |
+
private $last_error = '';
|
13 |
+
private $_last_result;
|
14 |
+
|
15 |
+
private $_captcha_instance = null;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Holding the singleton instance
|
19 |
+
*/
|
20 |
+
private static $_instance = null;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @return WP_reCaptcha
|
24 |
+
*/
|
25 |
+
public static function instance(){
|
26 |
+
if ( is_null( self::$_instance ) )
|
27 |
+
self::$_instance = new self();
|
28 |
+
return self::$_instance;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Prevent from creating more instances
|
33 |
+
*/
|
34 |
+
private function __clone() { }
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Prevent from creating more than one instance
|
38 |
+
*/
|
39 |
+
private function __construct() {
|
40 |
+
add_option('recaptcha_theme','light'); // local
|
41 |
+
add_option('recaptcha_size','normal'); // local
|
42 |
+
add_option('recaptcha_noscript',false); // local
|
43 |
+
add_option('recaptcha_comment_use_42_filter',false); // local
|
44 |
+
add_option('recaptcha_publickey',''); // 1st global -> then local
|
45 |
+
add_option('recaptcha_privatekey',''); // 1st global -> then local
|
46 |
+
add_option('recaptcha_language',''); // 1st global -> then local
|
47 |
+
|
48 |
+
if ( WP_reCaptcha::is_network_activated() ) {
|
49 |
+
add_site_option('recaptcha_publickey',''); // 1st global -> then local
|
50 |
+
add_site_option('recaptcha_privatekey',''); // 1st global -> then local
|
51 |
+
|
52 |
+
add_site_option('recaptcha_enable_comments' , true); // global
|
53 |
+
add_site_option('recaptcha_enable_signup' , true); // global
|
54 |
+
add_site_option('recaptcha_enable_login' , false); // global
|
55 |
+
add_site_option('recaptcha_enable_lostpw' , false); // global
|
56 |
+
add_site_option('recaptcha_disable_for_known_users' , true); // global
|
57 |
+
add_site_option( 'recaptcha_lockout' , true );
|
58 |
+
} else {
|
59 |
+
add_option( 'recaptcha_enable_comments' , true); // global
|
60 |
+
add_option( 'recaptcha_enable_signup' , true); // global
|
61 |
+
add_option( 'recaptcha_enable_login' , false); // global
|
62 |
+
add_option( 'recaptcha_enable_lostpw' , false); // global
|
63 |
+
add_option( 'recaptcha_disable_for_known_users' , true); // global
|
64 |
+
add_option( 'recaptcha_lockout' , true );
|
65 |
+
}
|
66 |
+
$this->_has_api_key = $this->get_option( 'recaptcha_publickey' ) && $this->get_option( 'recaptcha_privatekey' );
|
67 |
+
|
68 |
+
if ( $this->has_api_key() ) {
|
69 |
+
|
70 |
+
add_action('init' , array( $this,'init') , 9 );
|
71 |
+
add_action('plugins_loaded' , array( $this,'plugins_loaded'), 9 );
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
register_activation_hook( WP_RECAPTCHA_FILE, array( __CLASS__ , 'activate' ) );
|
77 |
+
register_deactivation_hook( WP_RECAPTCHA_FILE, array( __CLASS__ , 'deactivate' ) );
|
78 |
+
register_uninstall_hook( WP_RECAPTCHA_FILE, array( __CLASS__ , 'uninstall' ) );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Load ninja/cf7 php files if necessary
|
83 |
+
* Hooks into 'plugins_loaded'
|
84 |
+
*/
|
85 |
+
function plugins_loaded() {
|
86 |
+
if ( $this->has_api_key() ) {
|
87 |
+
// NinjaForms support
|
88 |
+
// check if ninja forms is present
|
89 |
+
if ( function_exists( 'Ninja_Forms') )
|
90 |
+
WP_reCaptcha_NinjaForms::instance();
|
91 |
+
|
92 |
+
// CF7 support
|
93 |
+
// check if contact form 7 forms is present
|
94 |
+
if ( class_exists('WPCF7') )
|
95 |
+
WP_reCaptcha_ContactForm7::instance();
|
96 |
+
|
97 |
+
// WooCommerce support
|
98 |
+
// check if woocommerce is present
|
99 |
+
if ( function_exists('WC') || class_exists('WooCommerce') )
|
100 |
+
WP_reCaptcha_WooCommerce::instance();
|
101 |
+
|
102 |
+
if ( class_exists( 'Awesome_Support' ) )
|
103 |
+
WP_reCaptcha_Awesome_Support::instance();
|
104 |
+
|
105 |
+
if ( class_exists( 'bbPress' ) ) {
|
106 |
+
WP_reCaptcha_bbPress::instance();
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( class_exists( 'cforms2_captcha' ) ) {
|
110 |
+
WP_reCaptcha_cforms2::instance();
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
}
|
115 |
+
/**
|
116 |
+
* Init plugin
|
117 |
+
* set hooks
|
118 |
+
*/
|
119 |
+
function init() {
|
120 |
+
load_plugin_textdomain( 'wp-recaptcha-integration', false , dirname( plugin_basename( __FILE__ ) ).'/languages/' );
|
121 |
+
$require_recaptcha = $this->is_required();
|
122 |
+
|
123 |
+
if ( $require_recaptcha ) {
|
124 |
+
|
125 |
+
if ( $this->get_option('recaptcha_enable_comments') ) {
|
126 |
+
/*
|
127 |
+
add_filter('comment_form_defaults',array($this,'comment_form_defaults'),10);
|
128 |
+
/*/
|
129 |
+
// WP 4.2 introduced `comment_form_submit_button` filter
|
130 |
+
// which is much more likely to work
|
131 |
+
global $wp_version;
|
132 |
+
if ( version_compare( $wp_version , '4.2' ) >= 0 && $this->get_option('recaptcha_comment_use_42_filter') )
|
133 |
+
add_filter('comment_form_submit_button',array($this,'prepend_recaptcha_html'),10,2);
|
134 |
+
else
|
135 |
+
add_filter('comment_form_defaults',array($this,'comment_form_defaults'),10);
|
136 |
+
|
137 |
+
//*/
|
138 |
+
add_action('pre_comment_on_post',array($this,'recaptcha_check_or_die'));
|
139 |
+
|
140 |
+
add_action( 'print_comments_recaptcha' , array( $this , 'print_recaptcha_html' ) );
|
141 |
+
add_filter( 'comments_recaptcha_html' , array( $this , 'recaptcha_html' ) );
|
142 |
+
}
|
143 |
+
if ( $this->get_option('recaptcha_enable_signup') ) {
|
144 |
+
$this->captcha_instance();
|
145 |
+
// buddypress suuport.
|
146 |
+
if ( function_exists('buddypress') ) {
|
147 |
+
add_action('bp_account_details_fields',array( $this,'print_recaptcha_html'));
|
148 |
+
add_action('bp_signup_pre_validate',array( $this,'recaptcha_check_or_die'),99 );
|
149 |
+
} else {
|
150 |
+
add_action('register_form',array( $this,'print_recaptcha_html'));
|
151 |
+
add_filter('registration_errors',array( $this,'registration_errors'));
|
152 |
+
}
|
153 |
+
if ( is_multisite() ) {
|
154 |
+
add_action( 'signup_extra_fields' , array($this,'print_recaptcha_html'));
|
155 |
+
add_filter('wpmu_validate_user_signup',array( $this,'wpmu_validate_user_signup'));
|
156 |
+
}
|
157 |
+
add_filter( 'signup_recaptcha_html' , array( $this , 'recaptcha_html' ) );
|
158 |
+
|
159 |
+
}
|
160 |
+
if ( $this->get_option('recaptcha_enable_login') ) {
|
161 |
+
$this->captcha_instance();
|
162 |
+
add_action( 'login_form', array( $this, 'print_recaptcha_html' ) );
|
163 |
+
add_filter( 'wp_authenticate_user', array( $this, 'deny_login'), 99 );
|
164 |
+
add_filter( 'login_recaptcha_html', array( $this , 'recaptcha_html' ) );
|
165 |
+
}
|
166 |
+
if ( $this->get_option('recaptcha_enable_lostpw') ) {
|
167 |
+
$this->captcha_instance();
|
168 |
+
add_action('lostpassword_form' , array( $this, 'print_recaptcha_html') );
|
169 |
+
//*
|
170 |
+
add_action('lostpassword_post' , array( $this, 'recaptcha_check_or_die') , 99 );
|
171 |
+
/*/ // switch this when pull request accepted and included in official WC release.
|
172 |
+
add_filter('allow_password_reset' , array( $this,'wp_error') );
|
173 |
+
//*/
|
174 |
+
add_filter( 'lostpassword_recaptcha_html' , array( $this, 'recaptcha_html' ) );
|
175 |
+
}
|
176 |
+
if ( 'WPLANG' === $this->get_option( 'recaptcha_language' ) )
|
177 |
+
add_filter( 'wp_recaptcha_language' , array( $this, 'recaptcha_wplang' ) , 5 );
|
178 |
+
|
179 |
+
add_action( 'recaptcha_print' , array( $this, 'print_recaptcha_html' ) );
|
180 |
+
add_filter( 'recaptcha_error' , array( $this, 'wp_error' ) );
|
181 |
+
add_filter( 'recaptcha_html' , array( $this, 'recaptcha_html' ) );
|
182 |
+
}
|
183 |
+
add_filter( 'recaptcha_valid' , array( $this , 'recaptcha_check' ) );
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Set current captcha instance and return it.
|
188 |
+
*
|
189 |
+
* @return object WP_reCaptcha_Captcha
|
190 |
+
*/
|
191 |
+
public function captcha_instance() {
|
192 |
+
if ( is_null( $this->_captcha_instance ) ) {
|
193 |
+
$this->_captcha_instance = WP_reCaptcha_NoCaptcha::instance();
|
194 |
+
}
|
195 |
+
return $this->_captcha_instance;
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
/**
|
200 |
+
* returns if recaptcha is required.
|
201 |
+
*
|
202 |
+
* @return bool
|
203 |
+
*/
|
204 |
+
function is_required() {
|
205 |
+
$is_required = ! ( $this->get_option('recaptcha_disable_for_known_users') && is_user_logged_in() );
|
206 |
+
return apply_filters( 'wp_recaptcha_required' , $is_required );
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
|
212 |
+
//////////////////////////////////
|
213 |
+
// Displaying
|
214 |
+
//
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Print recaptcha HTML. Use inside a form.
|
218 |
+
*
|
219 |
+
*/
|
220 |
+
function print_recaptcha_html( $attr = array() ) {
|
221 |
+
echo $this->begin_inject( );
|
222 |
+
echo $this->recaptcha_html( $attr );
|
223 |
+
echo $this->end_inject( );
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Get recaptcha HTML.
|
228 |
+
*
|
229 |
+
* @return string recaptcha html
|
230 |
+
*/
|
231 |
+
function recaptcha_html( $attr = array() ) {
|
232 |
+
return $this->captcha_instance()->get_html( $attr );
|
233 |
+
}
|
234 |
+
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Get recaptcha HTML.
|
238 |
+
*
|
239 |
+
* @param $html string
|
240 |
+
* @return string recaptcha html prepended to first parameter.
|
241 |
+
*/
|
242 |
+
function prepend_recaptcha_html( $html ) {
|
243 |
+
return $this->recaptcha_html() . $html;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* HTML comment with some notes (beginning)
|
248 |
+
*
|
249 |
+
* @param $return bool Whether to print or to return the comment
|
250 |
+
* @param $moretext string Additional information being included in the comment
|
251 |
+
* @return null|string HTML-Comment
|
252 |
+
*/
|
253 |
+
function begin_inject($return = false,$moretext='') {
|
254 |
+
$html = "\n<!-- BEGIN recaptcha, injected by plugin wp-recaptcha-integration $moretext -->\n";
|
255 |
+
if ( $return ) return $html;
|
256 |
+
echo $html;
|
257 |
+
}
|
258 |
+
/**
|
259 |
+
* HTML comment with some notes (ending)
|
260 |
+
*
|
261 |
+
* @param $return bool Whether to print or to return the comment
|
262 |
+
* @return null|string HTML-Comment
|
263 |
+
*/
|
264 |
+
function end_inject( $return = false ) {
|
265 |
+
$html = "\n<!-- END recaptcha -->\n";
|
266 |
+
if ( $return ) return $html;
|
267 |
+
echo $html;
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Display recaptcha on comments form.
|
272 |
+
* filter function for `comment_form_defaults`
|
273 |
+
*
|
274 |
+
* @see filter doc `comment_form_defaults`
|
275 |
+
*/
|
276 |
+
function comment_form_defaults( $defaults ) {
|
277 |
+
$defaults['comment_notes_after'] .= '<p>' . $this->recaptcha_html() . '</p>';
|
278 |
+
return $defaults;
|
279 |
+
}
|
280 |
+
|
281 |
+
//////////////////////////////////
|
282 |
+
// Verification
|
283 |
+
//
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Get last result of recaptcha check
|
287 |
+
* @return string recaptcha html
|
288 |
+
*/
|
289 |
+
function get_last_result() {
|
290 |
+
return $this->captcha_instance()->get_last_result();
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Check recaptcha
|
295 |
+
*
|
296 |
+
* @return bool false if check does not validate
|
297 |
+
*/
|
298 |
+
function recaptcha_check( $valid=null ) {
|
299 |
+
if ( $this->is_required() )
|
300 |
+
return $this->captcha_instance()->check();
|
301 |
+
return true;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* check recaptcha on login
|
306 |
+
* filter function for `wp_authenticate_user`
|
307 |
+
*
|
308 |
+
* @param $user WP_User
|
309 |
+
* @return object user or wp_error
|
310 |
+
*/
|
311 |
+
function deny_login( $user ) {
|
312 |
+
if ( isset( $_POST["log"]) && ! $this->recaptcha_check() ) {
|
313 |
+
$msg = __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration');
|
314 |
+
if ( $this->get_option('recaptcha_lockout') && in_array( 'administrator' , $user->roles ) && ! $this->test_keys() ) {
|
315 |
+
return $user;
|
316 |
+
} else {
|
317 |
+
return $this->wp_error( $user );
|
318 |
+
}
|
319 |
+
return new WP_Error( 'captcha_error' , $msg );
|
320 |
+
}
|
321 |
+
return $user;
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* check recaptcha on registration
|
326 |
+
* filter function for `registration_errors`
|
327 |
+
*
|
328 |
+
* @param $errors WP_Error
|
329 |
+
* @return WP_Error with captcha error added if test fails.
|
330 |
+
*/
|
331 |
+
function registration_errors( $errors ) {
|
332 |
+
if ( isset( $_POST["user_login"]) )
|
333 |
+
$errors = $this->wp_error_add( $errors );
|
334 |
+
return $errors;
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* check recaptcha WPMU signup
|
339 |
+
* filter function for `wpmu_validate_user_signup`
|
340 |
+
*
|
341 |
+
* @see filter hook `wpmu_validate_user_signup`
|
342 |
+
*/
|
343 |
+
function wpmu_validate_user_signup( $result ) {
|
344 |
+
if ( isset( $_POST['stage'] ) && $_POST['stage'] == 'validate-user-signup' )
|
345 |
+
$result['errors'] = $this->wp_error_add( $result['errors'] , 'generic' );
|
346 |
+
return $result;
|
347 |
+
}
|
348 |
+
|
349 |
+
|
350 |
+
/**
|
351 |
+
* check recaptcha and return WP_Error on failure.
|
352 |
+
* filter function for `allow_password_reset`
|
353 |
+
*
|
354 |
+
* @param $param mixed return value of funtion when captcha validates
|
355 |
+
* @return mixed will return argument $param an success, else WP_Error
|
356 |
+
*/
|
357 |
+
function wp_error( $param , $error_code = 'captcha_error' ) {
|
358 |
+
if ( ! $this->recaptcha_check() ) {
|
359 |
+
return new WP_Error( $error_code , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
360 |
+
} else {
|
361 |
+
return $param;
|
362 |
+
}
|
363 |
+
}
|
364 |
+
/**
|
365 |
+
* check recaptcha and return WP_Error on failure.
|
366 |
+
* filter function for `allow_password_reset`
|
367 |
+
*
|
368 |
+
* @param $param mixed return value of funtion when captcha validates
|
369 |
+
* @return mixed will return argument $param an success, else WP_Error
|
370 |
+
*/
|
371 |
+
function wp_error_add( $param , $error_code = 'captcha_error' ) {
|
372 |
+
if ( ! $this->recaptcha_check() ) {
|
373 |
+
return new WP_Error( $error_code , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
374 |
+
} else {
|
375 |
+
return $param;
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Check recaptcha and wp_die() on fail
|
381 |
+
* hooks into `pre_comment_on_post`, `lostpassword_post`
|
382 |
+
*/
|
383 |
+
function recaptcha_check_or_die( ) {
|
384 |
+
if ( ! $this->recaptcha_check() ) {
|
385 |
+
$err = new WP_Error('comment_err', __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
386 |
+
wp_die( $err );
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
//////////////////////////////////
|
392 |
+
// Options
|
393 |
+
//
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Get plugin option by name.
|
397 |
+
*
|
398 |
+
* @param $option_name string
|
399 |
+
* @return bool false if check does not validate
|
400 |
+
*/
|
401 |
+
public function get_option( $option_name ) {
|
402 |
+
switch ( $option_name ) {
|
403 |
+
case 'recaptcha_publickey': // first try local, then global
|
404 |
+
case 'recaptcha_privatekey':
|
405 |
+
$option_value = get_option($option_name);
|
406 |
+
if ( ! $option_value && WP_reCaptcha::is_network_activated() )
|
407 |
+
$option_value = get_site_option( $option_name );
|
408 |
+
return $option_value;
|
409 |
+
case 'recaptcha_enable_comments': // global on network. else local
|
410 |
+
case 'recaptcha_enable_signup':
|
411 |
+
case 'recaptcha_enable_login':
|
412 |
+
case 'recaptcha_enable_lostpw':
|
413 |
+
case 'recaptcha_disable_for_known_users':
|
414 |
+
case 'recaptcha_enable_wc_order':
|
415 |
+
if ( WP_reCaptcha::is_network_activated() )
|
416 |
+
return get_site_option($option_name);
|
417 |
+
return get_option( $option_name );
|
418 |
+
default: // always local
|
419 |
+
return get_option($option_name);
|
420 |
+
}
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Get plugin option by name.
|
425 |
+
*
|
426 |
+
* @param $option_name string
|
427 |
+
* @return bool false if check does not validate
|
428 |
+
*/
|
429 |
+
public function update_option( $option_name, $value ) {
|
430 |
+
switch ( $option_name ) {
|
431 |
+
case 'recaptcha_publickey': // first try local, then global
|
432 |
+
case 'recaptcha_privatekey':
|
433 |
+
$option_value = update_option( $option_name, $value );
|
434 |
+
if ( WP_reCaptcha::is_network_activated() )
|
435 |
+
return update_site_option( $option_name, $value );
|
436 |
+
else
|
437 |
+
return update_option( $option_name, $value );
|
438 |
+
case 'recaptcha_enable_comments': // global on network. else local
|
439 |
+
case 'recaptcha_enable_signup':
|
440 |
+
case 'recaptcha_enable_login':
|
441 |
+
case 'recaptcha_enable_lostpw':
|
442 |
+
case 'recaptcha_disable_for_known_users':
|
443 |
+
case 'recaptcha_enable_wc_order':
|
444 |
+
if ( WP_reCaptcha::is_network_activated() )
|
445 |
+
return update_site_option( $option_name, $value );
|
446 |
+
return update_option( $option_name, $value );
|
447 |
+
default: // always local
|
448 |
+
return update_option( $option_name, $value );
|
449 |
+
}
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* @return bool return if google api is configured
|
454 |
+
*/
|
455 |
+
function has_api_key() {
|
456 |
+
return $this->_has_api_key;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Test public and private key
|
461 |
+
*
|
462 |
+
* @return bool
|
463 |
+
*/
|
464 |
+
public function test_keys() {
|
465 |
+
// if ( ! ( $keys_okay = get_transient( 'recaptcha_keys_okay' ) ) ) {
|
466 |
+
$pub_okay = $this->test_public_key();
|
467 |
+
$prv_okay = $this->test_private_key();
|
468 |
+
|
469 |
+
// $keys_okay = ( $prv_okay && $pub_okay ) ? 'yes' : 'no';
|
470 |
+
|
471 |
+
//cache the result
|
472 |
+
// set_transient( 'recaptcha_keys_okay' , $keys_okay , 15 * MINUTE_IN_SECONDS );
|
473 |
+
// }
|
474 |
+
return $prv_okay && $pub_okay;
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Test public key
|
479 |
+
*
|
480 |
+
* @return bool
|
481 |
+
*/
|
482 |
+
public function test_public_key( $key = null ) {
|
483 |
+
if ( is_null( $key ) )
|
484 |
+
$key = $this->get_option('recaptcha_publickey');
|
485 |
+
$rec = WP_reCaptcha::instance();
|
486 |
+
$pub_key_url = sprintf( "http://www.google.com/recaptcha/api/challenge?k=%s" , $key );
|
487 |
+
$pub_response = wp_remote_get( $pub_key_url );
|
488 |
+
$pub_response_body = wp_remote_retrieve_body( $pub_response );
|
489 |
+
return ! is_wp_error( $pub_response ) && ! strpos( $pub_response_body ,'Format of site key was invalid');
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Test private key
|
494 |
+
*
|
495 |
+
* @return bool
|
496 |
+
*/
|
497 |
+
public function test_private_key( $key = null ) {
|
498 |
+
if ( is_null( $key ) )
|
499 |
+
$key = $this->get_option('recaptcha_privatekey');
|
500 |
+
$prv_key_url = sprintf( "http://www.google.com/recaptcha/api/verify?privatekey=%s" , $key );
|
501 |
+
$prv_response = wp_remote_get( $prv_key_url );
|
502 |
+
$prv_rspbody = wp_remote_retrieve_body( $prv_response );
|
503 |
+
return ! is_wp_error( $prv_response ) && ! strpos(wp_remote_retrieve_body( $prv_response ),'invalid-site-private-key');
|
504 |
+
}
|
505 |
+
|
506 |
+
|
507 |
+
//////////////////////////////////
|
508 |
+
// Activation
|
509 |
+
//
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Fired on plugin activation
|
513 |
+
*/
|
514 |
+
public static function activate() {
|
515 |
+
// flavor option is deprecated
|
516 |
+
if ( get_option('recaptcha_flavor') === 'recaptcha' ) {
|
517 |
+
delete_option( 'recaptcha_flavor' );
|
518 |
+
}
|
519 |
+
|
520 |
+
if ( get_option('recaptcha_flavor') === 'recaptcha' ) {
|
521 |
+
$inst = self::instance();
|
522 |
+
delete_option( 'recaptcha_flavor' );
|
523 |
+
update_option( 'recaptcha_theme', 'light' );
|
524 |
+
update_option( 'recaptcha_language', '' );
|
525 |
+
add_action( 'admin_notices', array( $inst, 'deprecated_v1_notice' ) );
|
526 |
+
}
|
527 |
+
|
528 |
+
// disable submit option deprecated in favor of recaptcha_solved_callback
|
529 |
+
if ( get_option('recaptcha_disable_submit') ) {
|
530 |
+
update_option( 'recaptcha_solved_callback', 'enable' );
|
531 |
+
delete_option( 'recaptcha_disable_submit' );
|
532 |
+
}
|
533 |
+
|
534 |
+
|
535 |
+
}
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Admin Notices hook to show up when the api keys heve not been entered.
|
539 |
+
* @action admin_notices
|
540 |
+
*/
|
541 |
+
function deprecated_v1_notice() {
|
542 |
+
?><div class="notice error above-h1"><p><?php
|
543 |
+
printf(
|
544 |
+
__( 'Google no longer supports the old-style reCaptcha. The <a href="%s">plugin settings</a> have been updated accordingly.' , 'wp-recaptcha-integration' ),
|
545 |
+
admin_url( add_query_arg( 'page' , 'recaptcha' , 'options-general.php' ) )
|
546 |
+
);
|
547 |
+
?></p></div><?php
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Fired on plugin deactivation
|
552 |
+
*/
|
553 |
+
public static function deactivate() {
|
554 |
+
}
|
555 |
+
/**
|
556 |
+
* Uninstall
|
557 |
+
*/
|
558 |
+
public static function uninstall() {
|
559 |
+
if ( is_multisite() ) {
|
560 |
+
delete_site_option( 'recaptcha_publickey' );
|
561 |
+
delete_site_option( 'recaptcha_privatekey' );
|
562 |
+
delete_site_option( 'recaptcha_enable_comments' );
|
563 |
+
delete_site_option( 'recaptcha_enable_signup' );
|
564 |
+
delete_site_option( 'recaptcha_enable_login' );
|
565 |
+
delete_site_option( 'recaptcha_enable_wc_checkout' );
|
566 |
+
delete_site_option( 'recaptcha_disable_for_known_users' );
|
567 |
+
delete_site_option( 'recaptcha_lockout' );
|
568 |
+
|
569 |
+
foreach ( wp_get_sites() as $site) {
|
570 |
+
switch_to_blog( $site["blog_id"] );
|
571 |
+
delete_option( 'recaptcha_publickey' );
|
572 |
+
delete_option( 'recaptcha_privatekey' );
|
573 |
+
delete_option( 'recaptcha_flavor' );
|
574 |
+
delete_option( 'recaptcha_theme' );
|
575 |
+
delete_option( 'recaptcha_language' );
|
576 |
+
delete_option( 'recaptcha_comment_use_42_filter' );
|
577 |
+
delete_option( 'recaptcha_noscript' );
|
578 |
+
restore_current_blog();
|
579 |
+
}
|
580 |
+
} else {
|
581 |
+
delete_option( 'recaptcha_publickey' );
|
582 |
+
delete_option( 'recaptcha_privatekey' );
|
583 |
+
|
584 |
+
delete_option( 'recaptcha_flavor' );
|
585 |
+
delete_option( 'recaptcha_theme' );
|
586 |
+
delete_option( 'recaptcha_language' );
|
587 |
+
delete_option( 'recaptcha_enable_comments' );
|
588 |
+
delete_option( 'recaptcha_enable_signup' );
|
589 |
+
delete_option( 'recaptcha_enable_login' );
|
590 |
+
delete_option( 'recaptcha_enable_wc_checkout' );
|
591 |
+
delete_option( 'recaptcha_disable_for_known_users' );
|
592 |
+
delete_option( 'recaptcha_lockout' );
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
/**
|
597 |
+
* Get plugin option by name.
|
598 |
+
*
|
599 |
+
* @return bool true if plugin is activated on network
|
600 |
+
*/
|
601 |
+
static function is_network_activated() {
|
602 |
+
if ( is_null(self::$_is_network_activated) ) {
|
603 |
+
if ( ! is_multisite() )
|
604 |
+
return false;
|
605 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) )
|
606 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
607 |
+
|
608 |
+
self::$_is_network_activated = is_plugin_active_for_network( basename(dirname(__FILE__)).'/'.basename(__FILE__) );
|
609 |
+
}
|
610 |
+
return self::$_is_network_activated;
|
611 |
+
}
|
612 |
+
|
613 |
+
|
614 |
+
|
615 |
+
|
616 |
+
//////////////////////////////////
|
617 |
+
// Language
|
618 |
+
//
|
619 |
+
|
620 |
+
/**
|
621 |
+
* Rewrite WP get_locale() to recaptcha lang param.
|
622 |
+
*
|
623 |
+
* @return string recaptcha language
|
624 |
+
*/
|
625 |
+
function recaptcha_wplang( ) {
|
626 |
+
$locale = get_locale();
|
627 |
+
return $this->captcha_instance()->get_language( $locale );
|
628 |
+
}
|
629 |
+
/**
|
630 |
+
* Get recaptcha language code that matches input language code
|
631 |
+
*
|
632 |
+
* @param $lang string language code
|
633 |
+
* @return string recaptcha language code if supported by current flavor, empty string otherwise
|
634 |
+
*/
|
635 |
+
function recaptcha_language( $lang ) {
|
636 |
+
return $this->captcha_instance()->get_language( $lang );
|
637 |
+
}
|
638 |
+
|
639 |
+
/**
|
640 |
+
* Get languages supported by current recaptcha flavor.
|
641 |
+
*
|
642 |
+
* @return array languages supported by recaptcha.
|
643 |
+
*/
|
644 |
+
function get_supported_languages( ) {
|
645 |
+
return $this->captcha_instance()->get_supported_languages();
|
646 |
+
}
|
647 |
+
|
648 |
+
}
|
inc/class-wp_recaptcha_awesome_support.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WP reCaptcha integration for Awesome Support
|
4 |
+
*
|
5 |
+
* @package WP reCaptcha
|
6 |
+
* @author Julien Liabeuf <julien@liabeuf.fr>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://themeavenue.net
|
9 |
+
* @copyright 2014 ThemeAvenue
|
10 |
+
*/
|
11 |
+
class WP_reCaptcha_Awesome_Support {
|
12 |
+
/**
|
13 |
+
* Holding the singleton instance
|
14 |
+
*/
|
15 |
+
private static $_instance = null;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @return WP_reCaptcha
|
19 |
+
*/
|
20 |
+
public static function instance(){
|
21 |
+
if ( is_null( self::$_instance ) )
|
22 |
+
self::$_instance = new self();
|
23 |
+
return self::$_instance;
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Prevent from creating more instances
|
28 |
+
*/
|
29 |
+
private function __clone() { }
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Prevent from creating more than one instance
|
33 |
+
*/
|
34 |
+
private function __construct() {
|
35 |
+
add_action( 'init', array( $this , 'init' ), 11 );
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Init plugin component
|
40 |
+
* set hooks
|
41 |
+
*/
|
42 |
+
function init() {
|
43 |
+
|
44 |
+
$wp_recaptcha = WP_reCaptcha::instance();
|
45 |
+
$require_recaptcha = $wp_recaptcha->is_required();
|
46 |
+
$enable_login = $wp_recaptcha->get_option( 'recaptcha_enable_login' );
|
47 |
+
$enable_registration = $wp_recaptcha->get_option( 'recaptcha_enable_as_registration' );
|
48 |
+
|
49 |
+
if ( $require_recaptcha ) {
|
50 |
+
|
51 |
+
// Awesome Support support
|
52 |
+
|
53 |
+
if ( $enable_login ) {
|
54 |
+
add_action( 'wpas_after_login_fields', array( $wp_recaptcha, 'print_recaptcha_html' ), 10, 0 );
|
55 |
+
add_filter( 'wpas_try_login', array( &$this, 'recaptcha_check' ), 10, 1 );
|
56 |
+
}
|
57 |
+
|
58 |
+
if ( $enable_registration ) {
|
59 |
+
add_action( 'wpas_after_registration_fields', array( $wp_recaptcha, 'print_recaptcha_html' ), 10, 0 );
|
60 |
+
add_filter( 'wpas_register_account_errors', array( $this, 'recaptcha_check' ), 10, 3 );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Check the Captcha after Awesome Support tried to log the user in
|
68 |
+
*
|
69 |
+
* If the user login failed we simply return the existing error.
|
70 |
+
*
|
71 |
+
* @param WP_Error|WP_User $signon The result of the login attempt
|
72 |
+
*
|
73 |
+
* @return WP_Error|WP_User
|
74 |
+
*/
|
75 |
+
function recaptcha_check( $signon ) {
|
76 |
+
|
77 |
+
if ( is_wp_error( $signon ) ) {
|
78 |
+
return $signon;
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() ) {
|
82 |
+
return new WP_Error( 'recaptcha_failed', __( 'The Captcha didn't verify', 'wp-recaptcha-integration' ) );
|
83 |
+
}
|
84 |
+
|
85 |
+
return $signon;
|
86 |
+
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
|
inc/class-wp_recaptcha_bbpress.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class to manage bbPress Support
|
5 |
+
*/
|
6 |
+
class WP_reCaptcha_bbPress {
|
7 |
+
/**
|
8 |
+
* Holding the singleton instance
|
9 |
+
*/
|
10 |
+
private static $_instance = null;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @return WP_reCaptcha
|
14 |
+
*/
|
15 |
+
public static function instance(){
|
16 |
+
if ( is_null( self::$_instance ) ) {
|
17 |
+
self::$_instance = new self();
|
18 |
+
}
|
19 |
+
|
20 |
+
return self::$_instance;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Prevent from creating more instances
|
25 |
+
*/
|
26 |
+
private function __clone() { }
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Prevent from creating more than one instance
|
30 |
+
*/
|
31 |
+
private function __construct() {
|
32 |
+
add_action('init' , array( &$this , 'init' ) , 0 );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Init plugin component
|
37 |
+
*
|
38 |
+
* set hooks
|
39 |
+
*/
|
40 |
+
function init() {
|
41 |
+
$wp_recaptcha = WP_reCaptcha::instance();
|
42 |
+
$require_recaptcha = $wp_recaptcha->is_required();
|
43 |
+
$enable_topic = $wp_recaptcha->get_option('recaptcha_enable_bbp_topic') ;
|
44 |
+
$enable_reply = $wp_recaptcha->get_option('recaptcha_enable_bbp_reply') ;
|
45 |
+
|
46 |
+
if ( $require_recaptcha ) {
|
47 |
+
|
48 |
+
// WooCommerce support
|
49 |
+
|
50 |
+
if ( $enable_topic ) {
|
51 |
+
add_action( 'bbp_theme_before_topic_form_submit_wrapper' , array( $wp_recaptcha, 'print_recaptcha_html' ) );
|
52 |
+
add_action( 'bbp_new_topic_pre_extras', array( &$this , 'recaptcha_check' ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
if ( $enable_reply ) {
|
56 |
+
add_action( 'bbp_theme_before_reply_form_submit_wrapper', array( $wp_recaptcha, 'print_recaptcha_html' ) );
|
57 |
+
add_filter( 'bbp_new_reply_pre_extras', array( &$this , 'recaptcha_check' ) );
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* bbP recaptcha Check
|
65 |
+
*
|
66 |
+
* @return void
|
67 |
+
*/
|
68 |
+
function recaptcha_check() {
|
69 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() ) {
|
70 |
+
bbp_add_error( 'bbp-recaptcha-error', __('<strong>Error:</strong> the Captcha didn’t verify.', 'wp-recaptcha-integration'), 'error' );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
inc/class-wp_recaptcha_captcha.php
CHANGED
@@ -6,26 +6,12 @@
|
|
6 |
* Class to manage the recaptcha options.
|
7 |
*/
|
8 |
abstract class WP_reCaptcha_Captcha {
|
9 |
-
|
10 |
-
protected $_last_result = false;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Print Head scripts.
|
14 |
-
*/
|
15 |
-
abstract function print_head();
|
16 |
|
17 |
-
|
18 |
-
* Print Head scripts on login page.
|
19 |
-
*/
|
20 |
-
abstract function print_login_head();
|
21 |
|
22 |
-
/**
|
23 |
-
* Print footer scripts
|
24 |
-
*/
|
25 |
-
abstract function print_foot();
|
26 |
/**
|
27 |
* Get the captcha HTML
|
28 |
-
*
|
29 |
* @param $attr array HTML attributes as key => value association
|
30 |
* @return string The Captcha HTML
|
31 |
*/
|
@@ -34,15 +20,16 @@ abstract class WP_reCaptcha_Captcha {
|
|
34 |
/**
|
35 |
* Check the users resonse.
|
36 |
* Performs a HTTP request to the google captcha service.
|
37 |
-
*
|
38 |
* @return bool true when the captcha test verifies.
|
39 |
*/
|
40 |
abstract function check();
|
|
|
41 |
/**
|
42 |
* Get supported theme names
|
43 |
-
*
|
44 |
* @return array array(
|
45 |
-
* theme_slug => array(
|
46 |
* 'label' => string // Human readable Theme Name
|
47 |
* )
|
48 |
* )
|
@@ -50,9 +37,9 @@ abstract class WP_reCaptcha_Captcha {
|
|
50 |
abstract function get_supported_themes();
|
51 |
|
52 |
/**
|
53 |
-
* Get
|
54 |
*
|
55 |
-
* @return array languages supported by this recaptcha as language_code => Language Name association.
|
56 |
*/
|
57 |
public function get_supported_languages() {
|
58 |
return $this->supported_languages;
|
@@ -60,22 +47,22 @@ abstract class WP_reCaptcha_Captcha {
|
|
60 |
|
61 |
/**
|
62 |
* Get recaptcha language code that matches input language code
|
63 |
-
*
|
64 |
* @param $lang string language code
|
65 |
-
* @return string recaptcha language code if supported
|
66 |
*/
|
67 |
public function get_language( $lang ) {
|
68 |
$lang = str_replace( '_' , '-' , $lang );
|
69 |
-
|
70 |
// direct hit: return it.
|
71 |
if ( isset($this->supported_languages[$lang]) )
|
72 |
return $lang;
|
73 |
-
|
74 |
// remove countrycode, try again
|
75 |
$lang = preg_replace('/-(.*)$/','',$lang);
|
76 |
if ( isset($this->supported_languages[$lang]) )
|
77 |
return $lang;
|
78 |
-
|
79 |
// lang does not exist.
|
80 |
return '';
|
81 |
}
|
@@ -88,10 +75,6 @@ abstract class WP_reCaptcha_Captcha {
|
|
88 |
function get_last_result() {
|
89 |
return $this->_last_result;
|
90 |
}
|
91 |
-
|
92 |
-
|
93 |
-
}
|
94 |
|
95 |
|
96 |
-
|
97 |
-
|
6 |
* Class to manage the recaptcha options.
|
7 |
*/
|
8 |
abstract class WP_reCaptcha_Captcha {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
protected $_last_result = false;
|
|
|
|
|
|
|
11 |
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* Get the captcha HTML
|
14 |
+
*
|
15 |
* @param $attr array HTML attributes as key => value association
|
16 |
* @return string The Captcha HTML
|
17 |
*/
|
20 |
/**
|
21 |
* Check the users resonse.
|
22 |
* Performs a HTTP request to the google captcha service.
|
23 |
+
*
|
24 |
* @return bool true when the captcha test verifies.
|
25 |
*/
|
26 |
abstract function check();
|
27 |
+
|
28 |
/**
|
29 |
* Get supported theme names
|
30 |
+
*
|
31 |
* @return array array(
|
32 |
+
* theme_slug => array(
|
33 |
* 'label' => string // Human readable Theme Name
|
34 |
* )
|
35 |
* )
|
37 |
abstract function get_supported_themes();
|
38 |
|
39 |
/**
|
40 |
+
* Get supported languages
|
41 |
*
|
42 |
+
* @return array languages supported by this recaptcha as language_code => Language Name association.
|
43 |
*/
|
44 |
public function get_supported_languages() {
|
45 |
return $this->supported_languages;
|
47 |
|
48 |
/**
|
49 |
* Get recaptcha language code that matches input language code
|
50 |
+
*
|
51 |
* @param $lang string language code
|
52 |
+
* @return string recaptcha language code if supported, empty string otherwise
|
53 |
*/
|
54 |
public function get_language( $lang ) {
|
55 |
$lang = str_replace( '_' , '-' , $lang );
|
56 |
+
|
57 |
// direct hit: return it.
|
58 |
if ( isset($this->supported_languages[$lang]) )
|
59 |
return $lang;
|
60 |
+
|
61 |
// remove countrycode, try again
|
62 |
$lang = preg_replace('/-(.*)$/','',$lang);
|
63 |
if ( isset($this->supported_languages[$lang]) )
|
64 |
return $lang;
|
65 |
+
|
66 |
// lang does not exist.
|
67 |
return '';
|
68 |
}
|
75 |
function get_last_result() {
|
76 |
return $this->_last_result;
|
77 |
}
|
|
|
|
|
|
|
78 |
|
79 |
|
80 |
+
}
|
|
inc/class-wp_recaptcha_cforms2.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Manages cformsII support based on its pluggable captcha api
|
5 |
+
*/
|
6 |
+
class WP_reCaptcha_cforms2 extends cforms2_captcha {
|
7 |
+
/**
|
8 |
+
* Holding the singleton instance
|
9 |
+
*/
|
10 |
+
private static $_instance = null;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @return WP_reCaptcha
|
14 |
+
*/
|
15 |
+
public static function instance(){
|
16 |
+
if ( is_null( self::$_instance ) ) {
|
17 |
+
self::$_instance = new self();
|
18 |
+
}
|
19 |
+
|
20 |
+
return self::$_instance;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Prevent from creating more instances
|
25 |
+
*/
|
26 |
+
private function __clone() { }
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Prevent from creating more than one instance
|
30 |
+
*/
|
31 |
+
private function __construct() {
|
32 |
+
add_filter('cforms2_add_captcha', array($this, 'add_instance'));
|
33 |
+
}
|
34 |
+
|
35 |
+
public function get_id() {
|
36 |
+
return get_class($this);
|
37 |
+
}
|
38 |
+
|
39 |
+
public function get_name() {
|
40 |
+
return __('reCAPTCHA', 'wp-recaptcha-integration');
|
41 |
+
}
|
42 |
+
|
43 |
+
public function check_authn_users() {
|
44 |
+
return WP_reCaptcha::instance()->is_required();
|
45 |
+
}
|
46 |
+
|
47 |
+
public function check_response($post) {
|
48 |
+
return WP_reCaptcha::instance()->recaptcha_check();
|
49 |
+
}
|
50 |
+
|
51 |
+
public function get_request($input_id, $input_classes, $input_title) {
|
52 |
+
$wp_recaptcha = WP_reCaptcha::instance();
|
53 |
+
$request = $wp_recaptcha->begin_inject(true);
|
54 |
+
$request.= $wp_recaptcha->recaptcha_html( $attr );
|
55 |
+
$request.= $wp_recaptcha->end_inject(true);
|
56 |
+
return $request;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function render_settings() {
|
60 |
+
echo '<a href="' . admin_url('options-general.php?page=recaptcha') . '">';
|
61 |
+
_e('Please check WordPress reCaptcha integration plugin settings.', 'wp-recaptcha-integration');
|
62 |
+
echo '</a>';
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
inc/class-wp_recaptcha_contactform7.php
CHANGED
@@ -29,140 +29,26 @@ class WP_reCaptcha_ContactForm7 {
|
|
29 |
* Prevent from creating more than one instance
|
30 |
*/
|
31 |
private function __construct() {
|
32 |
-
add_action(
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
)
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
wpcf7_add_shortcode(
|
51 |
-
array( 'recaptcha','recaptcha*'),
|
52 |
-
array(&$this,'recaptcha_shortcode_handler'), true );
|
53 |
-
}
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
function recaptcha_shortcode_handler( $tag ) {
|
58 |
-
if ( ! WP_reCaptcha::instance()->is_required() )
|
59 |
-
return apply_filters( 'wp_recaptcha_disabled_html' ,'');
|
60 |
-
$tag = new WPCF7_Shortcode( $tag );
|
61 |
-
if ( empty( $tag->name ) )
|
62 |
-
return '';
|
63 |
-
|
64 |
-
$atts = null;
|
65 |
-
if ( $theme = $tag->get_option('theme','',true) )
|
66 |
-
$atts = array( 'data-theme' => $theme );
|
67 |
-
|
68 |
-
$recaptcha_html = WP_reCaptcha::instance()->recaptcha_html( $atts );
|
69 |
-
$validation_error = wpcf7_get_validation_error( $tag->name );
|
70 |
-
|
71 |
-
$html = sprintf(
|
72 |
-
apply_filters( 'wp_recaptcha_cf7_shortcode_wrap' ,'<span class="wpcf7-form-control-wrap %1$s">%2$s %3$s</span>' ),
|
73 |
-
$tag->name, $recaptcha_html, $validation_error );
|
74 |
-
|
75 |
-
return $html;
|
76 |
-
}
|
77 |
-
|
78 |
-
function recaptcha_enqueue_script() {
|
79 |
-
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
80 |
-
wp_enqueue_script('wpcf7-recaptcha-integration',plugins_url('/js/wpcf7.js',dirname(__FILE__)),array('contact-form-7'));
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
function add_tag_generator_recaptcha() {
|
87 |
-
if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
|
88 |
-
return;
|
89 |
-
wpcf7_add_tag_generator( 'recaptcha', __( 'reCAPTCHA', 'wp-recaptcha-integration' ),
|
90 |
-
'wpcf7-tg-pane-recaptcha', array(&$this,'recaptcha_settings_callback') );
|
91 |
-
}
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
function recaptcha_settings_callback( $contact_form ) {
|
96 |
-
$type = 'recaptcha';
|
97 |
-
|
98 |
-
?>
|
99 |
-
<div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
|
100 |
-
<form action="">
|
101 |
-
<table>
|
102 |
-
<tr><td><input type="checkbox" checked="checked" disabled="disabled" name="required" onclick="return false" /> <?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
|
103 |
-
<tr><td>
|
104 |
-
<?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br />
|
105 |
-
<input type="text" name="name" class="tg-name oneline" />
|
106 |
-
<?php echo esc_html( __( 'Error message', 'wp-recaptcha-integration' ) ); ?><br />
|
107 |
-
</td><td><?php
|
108 |
-
if ( 'grecaptcha' === WP_reCaptcha::instance()->get_option('recaptcha_flavor') ) {
|
109 |
-
$themes = WP_reCaptcha::instance()->captcha_instance()->get_supported_themes();
|
110 |
-
echo esc_html( __( 'Theme', 'contact-form-7' ) ); ?><br /><?php
|
111 |
-
?><select name="recaptcha-theme-ui"><?php
|
112 |
-
?><option value=""><?php _e('Use default','wp-recaptcha-integration') ?></option><?php
|
113 |
-
foreach ( $themes as $theme_name => $theme ) {
|
114 |
-
?><option value="<?php echo $theme_name; ?>"><?php echo $theme['label'] ?></option><?php
|
115 |
-
}
|
116 |
-
?></select><?php
|
117 |
-
// cf7 does only allow literal <input>
|
118 |
-
?><input type="hidden" name="theme" class="idvalue option" value="" /><?php
|
119 |
-
?><script type="text/javascript">
|
120 |
-
(function($){
|
121 |
-
$(document).on('change','[name="recaptcha-theme-ui"]',function(){
|
122 |
-
$(this).next('[name="theme"]').val( $(this).val() ).trigger('change');
|
123 |
-
});
|
124 |
-
$(document).on('change','[name="recaptcha-message-ui"]',function(){
|
125 |
-
$(this).next('[name="message"]').val( $(this).val() ).trigger('change');
|
126 |
-
});
|
127 |
-
|
128 |
-
})(jQuery)
|
129 |
-
</script><?php
|
130 |
-
}
|
131 |
-
?></td></tr>
|
132 |
-
</table>
|
133 |
-
<div class="tg-tag">
|
134 |
-
<?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br />
|
135 |
-
<input type="text" name="<?php echo $type; ?>" class="tag wp-ui-text-highlight code" readonly="readonly" onfocus="this.select()" />
|
136 |
-
</div>
|
137 |
-
</form>
|
138 |
-
</div>
|
139 |
-
<?php
|
140 |
-
}
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
function recaptcha_validation_filter( $result, $tag ) {
|
145 |
-
if ( ! WP_reCaptcha::instance()->is_required() )
|
146 |
-
return $result;
|
147 |
-
|
148 |
-
$tag = new WPCF7_Shortcode( $tag );
|
149 |
-
$name = $tag->name;
|
150 |
-
|
151 |
-
if ( ! WP_reCaptcha::instance()->recaptcha_check() ) {
|
152 |
-
$message = wpcf7_get_message( 'wp_recaptcha_invalid' );
|
153 |
-
if ( ! $message )
|
154 |
-
$message = __("The Captcha didn’t verify.",'wp-recaptcha-integration');
|
155 |
-
|
156 |
-
if ( method_exists($result, 'invalidate' ) ) { // since CF7 4.1
|
157 |
-
$result->invalidate( $tag , $message );
|
158 |
-
} else {
|
159 |
-
$result['valid'] = false;
|
160 |
-
$result['reason'][$name] = $message;
|
161 |
}
|
162 |
}
|
163 |
-
return $result;
|
164 |
}
|
165 |
-
|
166 |
|
167 |
}
|
168 |
-
|
29 |
* Prevent from creating more than one instance
|
30 |
*/
|
31 |
private function __construct() {
|
32 |
+
add_action('init',array( $this, 'update_cf7_settings' ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
public function update_cf7_settings() {
|
36 |
+
$wr = WP_reCaptcha::instance();
|
37 |
+
$wr_configured = $wr->has_api_key();
|
38 |
+
$cf7_opt = WPCF7::get_option( 'recaptcha' );
|
39 |
+
$cf7_configured = is_array( $cf7_opt );
|
40 |
+
|
41 |
+
if ( $wr_configured && ! $cf7_configured ) {
|
42 |
+
$cf7_opt = array();
|
43 |
+
$cf7_opt[ $wr->get_option( 'recaptcha_publickey' ) ] = $wr->get_option( 'recaptcha_privatekey' );
|
44 |
+
WPCF7::update_option( 'recaptcha', $cf7_opt );
|
45 |
+
} else if ( ! $wr_configured && $cf7_configured ) {
|
46 |
+
foreach ( $cf7_opt as $pub => $priv ) {
|
47 |
+
$wr->update_option( 'recaptcha_publickey' , $pub );
|
48 |
+
$wr->update_option( 'recaptcha_privatekey' , $priv );
|
49 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
|
54 |
}
|
|
inc/class-wp_recaptcha_ninjaforms.php
CHANGED
@@ -27,145 +27,21 @@ class WP_reCaptcha_NinjaForms {
|
|
27 |
* Prevent from creating more than one instance
|
28 |
*/
|
29 |
private function __construct() {
|
30 |
-
add_action(
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
$ninja_forms_tabs_metaboxes['ninja-forms-settings']['label_settings']['label_labels']['settings'][] = array(
|
45 |
-
'name' => 'wp_recaptcha_invalid',
|
46 |
-
'type' => 'text',
|
47 |
-
'label' => __( "Google reCaptcha does not validate.", 'wp-recaptcha-integration' ),
|
48 |
-
);
|
49 |
-
}
|
50 |
-
|
51 |
-
function register_field_recaptcha(){
|
52 |
-
$args = array(
|
53 |
-
'name' => __( 'reCAPTCHA', 'wp-recaptcha-integration' ),
|
54 |
-
'edit_function' => '',
|
55 |
-
'display_function' => array( &$this , 'field_recaptcha_display' ),
|
56 |
-
'group' => 'standard_fields',
|
57 |
-
'edit_label' => true,
|
58 |
-
'edit_label_pos' => true,
|
59 |
-
'edit_req' => false,
|
60 |
-
'edit_custom_class' => false,
|
61 |
-
'edit_help' => true,
|
62 |
-
'edit_meta' => false,
|
63 |
-
'sidebar' => 'template_fields',
|
64 |
-
'display_label' => true,
|
65 |
-
'edit_conditional' => false,
|
66 |
-
'conditional' => array(
|
67 |
-
'value' => array(
|
68 |
-
'type' => 'text',
|
69 |
-
),
|
70 |
-
),
|
71 |
-
'pre_process' => array( &$this , 'field_recaptcha_pre_process' ),
|
72 |
-
'process_field' => false,
|
73 |
-
'limit' => 1,
|
74 |
-
'edit_options' => array(
|
75 |
-
),
|
76 |
-
'req' => false,
|
77 |
-
);
|
78 |
-
if ( 'grecaptcha' === WP_reCaptcha::instance()->get_option('recaptcha_flavor') ) {
|
79 |
-
$themes = WP_reCaptcha::instance()->captcha_instance()->get_supported_themes();
|
80 |
-
$edit_options = array(
|
81 |
-
array( 'name' => __( 'Use default' , 'wp-recaptcha-integration' ) , 'value' => '' ),
|
82 |
-
);
|
83 |
-
foreach ( $themes as $theme_name => $theme )
|
84 |
-
$edit_options[] = array( 'name' => $theme['label'] , 'value' => $theme_name );
|
85 |
-
$args['edit_options'] = array(
|
86 |
-
array(
|
87 |
-
'type' => 'select',
|
88 |
-
'name' => 'theme',
|
89 |
-
'label' => __( 'Theme', 'wp-recaptcha-integration' ),
|
90 |
-
'width' => 'wide',
|
91 |
-
'class' => 'widefat',
|
92 |
-
'options' => $edit_options,
|
93 |
-
),
|
94 |
-
);
|
95 |
-
}
|
96 |
-
|
97 |
-
ninja_forms_register_field('_recaptcha', $args);
|
98 |
-
}
|
99 |
-
|
100 |
-
function recaptcha_field_data( $data, $field_id ) {
|
101 |
-
$field_row = ninja_forms_get_field_by_id($field_id);
|
102 |
-
if ( $field_row['type'] == '_recaptcha' )
|
103 |
-
$data['show_field'] = WP_reCaptcha::instance()->is_required();
|
104 |
-
return $data;
|
105 |
-
}
|
106 |
-
|
107 |
-
function recaptcha_script($id) {
|
108 |
-
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
109 |
-
/*
|
110 |
-
refresh captcha after form submission.
|
111 |
-
*/
|
112 |
-
$flavor = WP_reCaptcha::instance()->get_option( 'recaptcha_flavor' );
|
113 |
-
switch ( $flavor ) {
|
114 |
-
case 'recaptcha':
|
115 |
-
$html = '<script type="text/javascript">
|
116 |
-
// reload recaptcha after failed ajax form submit
|
117 |
-
jQuery(document).on("submitResponse.default", function(e, response){
|
118 |
-
Recaptcha.reload();
|
119 |
-
});
|
120 |
-
</script>';
|
121 |
-
break;
|
122 |
-
case 'grecaptcha':
|
123 |
-
$html = '<script type="text/javascript">
|
124 |
-
// reload recaptcha after failed ajax form submit
|
125 |
-
(function($){
|
126 |
-
$(document).on("submitResponse.default", function(e, response){
|
127 |
-
if ( grecaptcha ) {
|
128 |
-
var wid = $(\'#ninja_forms_form_\'+response.form_id).find(\'.g-recaptcha\').data(\'widget-id\');
|
129 |
-
grecaptcha.reset(wid);
|
130 |
-
}
|
131 |
-
});
|
132 |
-
})(jQuery);
|
133 |
-
</script>';
|
134 |
-
break;
|
135 |
-
}
|
136 |
-
WP_reCaptcha::instance()->begin_inject(false,', Ninja form integration');
|
137 |
-
echo $html;
|
138 |
-
WP_reCaptcha::instance()->end_inject();
|
139 |
}
|
140 |
}
|
141 |
|
142 |
-
function field_recaptcha_display($field_id, $data){
|
143 |
-
if ( WP_reCaptcha::instance()->is_required() ) {
|
144 |
-
$attr = !empty($data['theme']) ? array( 'data-theme' => $data['theme'] ) : null;
|
145 |
-
WP_reCaptcha::instance()->print_recaptcha_html( $attr );
|
146 |
-
} else {
|
147 |
-
echo apply_filters( 'wp_recaptcha_disabled_html' ,'');
|
148 |
-
}
|
149 |
-
}
|
150 |
-
|
151 |
-
function field_recaptcha_pre_process( $field_id, $user_value ){
|
152 |
-
global $ninja_forms_processing;
|
153 |
-
$plugin_settings = nf_get_settings();
|
154 |
-
|
155 |
-
$recaptcha_error = __("The Captcha didn’t verify.",'wp-recaptcha-integration');
|
156 |
-
if ( isset( $plugin_settings['wp_recaptcha_invalid'] ) )
|
157 |
-
$recaptcha_error = $plugin_settings['wp_recaptcha_invalid'];
|
158 |
-
|
159 |
-
$field_row = ninja_forms_get_field_by_id($field_id);
|
160 |
-
$field_data = $field_row['data'];
|
161 |
-
$form_row = ninja_forms_get_form_by_field_id($field_id);
|
162 |
-
$form_id = $form_row['id'];
|
163 |
-
|
164 |
-
$require_recaptcha = WP_reCaptcha::instance()->is_required();
|
165 |
-
|
166 |
-
if ( $ninja_forms_processing->get_action() != 'save' && $ninja_forms_processing->get_action() != 'mp_save' && $require_recaptcha && ! WP_reCaptcha::instance()->recaptcha_check() ){
|
167 |
-
$ninja_forms_processing->add_error('recaptcha-general', $recaptcha_error, 'general');
|
168 |
-
$ninja_forms_processing->add_error('recaptcha-'.$field_id, $recaptcha_error, $field_id);
|
169 |
-
}
|
170 |
-
}
|
171 |
}
|
27 |
* Prevent from creating more than one instance
|
28 |
*/
|
29 |
private function __construct() {
|
30 |
+
add_action('init', array( $this, 'update_nf_settings' ) );
|
31 |
+
}
|
32 |
+
|
33 |
+
function update_nf_settings( ) {
|
34 |
+
$nf = Ninja_Forms();
|
35 |
+
$wr = WP_reCaptcha::instance();
|
36 |
+
$wr_configured = $wr->has_api_key();
|
37 |
+
$nf_configured = false !== $nf->get_setting('recaptcha_site_key') && false !== $nf->get_setting('recaptcha_secret_key');
|
38 |
+
if ( $wr_configured && ! $nf_configured ) {
|
39 |
+
$nf->update_setting( 'recaptcha_site_key', $wr->get_option( 'recaptcha_publickey' ) );
|
40 |
+
$nf->update_setting( 'recaptcha_secret_key', $wr->get_option( 'recaptcha_privatekey' ) );
|
41 |
+
} else if ( ! $wr_configured && $nf_configured ) {
|
42 |
+
$wr->update_option( 'recaptcha_publickey' , $nf->get_setting('recaptcha_site_key') );
|
43 |
+
$wr->update_option( 'recaptcha_privatekey' , $nf->get_setting('recaptcha_secret_key') );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
inc/class-wp_recaptcha_nocaptcha.php
CHANGED
@@ -6,56 +6,83 @@
|
|
6 |
* Class to manage the recaptcha options.
|
7 |
*/
|
8 |
class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
9 |
-
|
10 |
protected $supported_languages = array(
|
11 |
-
'ar' =>
|
12 |
-
'
|
13 |
-
'
|
14 |
-
'
|
15 |
-
'
|
16 |
-
'
|
17 |
-
'
|
18 |
-
'
|
19 |
-
'
|
20 |
-
'
|
21 |
-
'
|
22 |
-
'
|
23 |
-
'
|
24 |
-
'
|
25 |
-
'
|
26 |
-
'
|
27 |
-
'
|
28 |
-
'
|
29 |
-
'
|
30 |
-
'
|
31 |
-
'
|
32 |
-
'
|
33 |
-
'
|
34 |
-
'
|
35 |
-
'
|
36 |
-
'
|
37 |
-
'
|
38 |
-
'
|
39 |
-
'
|
40 |
-
'
|
41 |
-
'
|
42 |
-
'
|
43 |
-
'
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
'
|
48 |
-
'
|
49 |
-
'
|
50 |
-
'
|
51 |
-
'
|
52 |
-
'
|
53 |
-
'
|
54 |
-
'
|
55 |
-
'
|
56 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
);
|
58 |
private $_counter = 0;
|
|
|
|
|
59 |
/**
|
60 |
* Holding the singleton instance
|
61 |
*/
|
@@ -79,25 +106,74 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
79 |
* Prevent from creating more than one instance
|
80 |
*/
|
81 |
private function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
|
84 |
public function get_supported_themes() {
|
85 |
return array(
|
86 |
-
'light' =>
|
87 |
-
|
88 |
-
),
|
89 |
-
'dark' => array(
|
90 |
-
'label' => __('Dark','wp-recaptcha-integration') ,
|
91 |
-
),
|
92 |
);
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
/**
|
95 |
* Override method
|
96 |
* Get recaptcha language code that matches input language code
|
97 |
-
* Sometimes WP uses different locales the the ones supported by nocaptcha.
|
98 |
-
*
|
99 |
* @param $lang string language code
|
100 |
-
* @return string recaptcha language code if supported
|
101 |
*/
|
102 |
public function get_language( $lang ) {
|
103 |
/*
|
@@ -113,132 +189,67 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
113 |
$lang = $mapping[$lang];
|
114 |
return parent::get_language( $lang );
|
115 |
}
|
116 |
-
/**
|
117 |
-
* @inheritdoc
|
118 |
-
*/
|
119 |
-
public function print_head() {}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @inheritdoc
|
123 |
-
*/
|
124 |
-
public function print_login_head() {
|
125 |
-
?><style type="text/css">
|
126 |
-
#login {
|
127 |
-
width:350px !important;
|
128 |
-
}
|
129 |
-
</style><?php
|
130 |
-
}
|
131 |
|
132 |
|
133 |
-
/**
|
134 |
-
* @inheritdoc
|
135 |
-
*/
|
136 |
-
public function print_foot() {
|
137 |
-
$sitekey = WP_reCaptcha::instance()->get_option('recaptcha_publickey');
|
138 |
-
$language_param = '';
|
139 |
-
|
140 |
-
|
141 |
-
?><script type="text/javascript">
|
142 |
-
var recaptcha_widgets={};
|
143 |
-
function recaptchaLoadCallback(){
|
144 |
-
try {
|
145 |
-
grecaptcha;
|
146 |
-
} catch(err){
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
var e=document.querySelectorAll ? document.querySelectorAll('.g-recaptcha') : document.getElementsByClassName('g-recaptcha'),form_submits;
|
150 |
-
|
151 |
-
for (var i=0;i<e.length;i++) {
|
152 |
-
(function(el){
|
153 |
-
<?php if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) { ?>
|
154 |
-
var form_submits = get_form_submits(el).setEnabled(false),wid;
|
155 |
-
<?php } else { ?>
|
156 |
-
var wid;
|
157 |
-
<?php } ?>
|
158 |
-
// check if captcha element is unrendered
|
159 |
-
if ( ! el.childNodes.length) {
|
160 |
-
wid = grecaptcha.render(el,{
|
161 |
-
'sitekey':'<?php echo $sitekey ?>',
|
162 |
-
'theme':el.getAttribute('data-theme') || '<?php echo WP_reCaptcha::instance()->get_option('recaptcha_theme'); ?>'
|
163 |
-
<?php if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) {
|
164 |
-
?> ,
|
165 |
-
'callback' : function(r){ get_form_submits(el).setEnabled(true); /* enable submit buttons */ }
|
166 |
-
<?php } ?>
|
167 |
-
});
|
168 |
-
el.setAttribute('data-widget-id',wid);
|
169 |
-
} else {
|
170 |
-
wid = el.getAttribute('data-widget-id');
|
171 |
-
grecaptcha.reset(wid);
|
172 |
-
}
|
173 |
-
})(e[i]);
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
// if jquery present re-render jquery/ajax loaded captcha elements
|
178 |
-
if ( typeof jQuery !== 'undefined' )
|
179 |
-
jQuery(document).ajaxComplete( function(evt,xhr,set){
|
180 |
-
if( xhr.responseText && xhr.responseText.indexOf('<?php echo $sitekey ?>') !== -1)
|
181 |
-
recaptchaLoadCallback();
|
182 |
-
} );
|
183 |
-
|
184 |
-
</script><?php
|
185 |
-
$recaptcha_api_url = "https://www.google.com/recaptcha/api.js";
|
186 |
-
$recaptcha_api_url = add_query_arg(array(
|
187 |
-
'onload' => 'recaptchaLoadCallback',
|
188 |
-
'render' => 'explicit',
|
189 |
-
),$recaptcha_api_url);
|
190 |
-
if ( $language_code = apply_filters( 'wp_recaptcha_language' , WP_reCaptcha::instance()->get_option( 'recaptcha_language' ) ) )
|
191 |
-
$recaptcha_api_url = add_query_arg('hl',$language_code,$recaptcha_api_url);
|
192 |
-
|
193 |
-
?><script src="<?php echo esc_url( $recaptcha_api_url ) ?>" async defer></script><?php
|
194 |
-
}
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
/**
|
199 |
* @inheritdoc
|
200 |
*/
|
201 |
public function get_html( $attr = array() ) {
|
202 |
-
$
|
203 |
-
$theme
|
|
|
204 |
|
205 |
$default = array(
|
206 |
'id' => 'g-recaptcha-'.$this->_counter++,
|
207 |
-
'class' => "
|
208 |
-
'data-sitekey' => $public_key,
|
209 |
'data-theme' => $theme,
|
|
|
|
|
210 |
);
|
211 |
$attr = wp_parse_args( $attr , $default );
|
|
|
|
|
|
|
|
|
212 |
$attr_str = '';
|
213 |
-
foreach ( $attr as $attr_name => $attr_val )
|
214 |
$attr_str .= sprintf( ' %s="%s"' , $attr_name , esc_attr( $attr_val ) );
|
|
|
|
|
|
|
215 |
$return = "<div {$attr_str}></div>";
|
216 |
$return .= '<noscript>';
|
217 |
if ( WP_reCaptcha::instance()->get_option('recaptcha_noscript') ) {
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
221 |
'<iframe src="https://www.google.com/recaptcha/api/fallback?k='.$attr['data-sitekey'].'"' .
|
222 |
' frameborder="0" scrolling="no"' .
|
223 |
-
' style="width: 302px; height:
|
224 |
'</iframe>' .
|
225 |
'</div>' .
|
226 |
-
'<div style="width: 250px; height: 80px; position: absolute; border-style: none;' .
|
227 |
-
' bottom: 21px; left: 25px; margin: 0px; padding: 0px; right: 25px;">' .
|
228 |
-
'<textarea id="g-recaptcha-response" name="g-recaptcha-response"' .
|
229 |
-
' class="g-recaptcha-response"' .
|
230 |
-
' style="width: 250px; height: 80px; border: 1px solid #c1c1c1;' .
|
231 |
-
' margin: 0px; padding: 0px; resize: none;" value="">' .
|
232 |
-
'</textarea>' .
|
233 |
-
'</div>' .
|
234 |
'</div>' .
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
} else {
|
237 |
$return .= __('Please enable JavaScript to submit this form.','wp-recaptcha-integration');
|
238 |
}
|
239 |
-
$return .= '
|
|
|
|
|
|
|
240 |
return $return;
|
241 |
}
|
|
|
242 |
/**
|
243 |
* @inheritdoc
|
244 |
*/
|
@@ -247,14 +258,14 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
247 |
$user_response = isset( $_REQUEST['g-recaptcha-response'] ) ? $_REQUEST['g-recaptcha-response'] : false;
|
248 |
if ( $user_response !== false ) {
|
249 |
if ( ! $this->_last_result ) {
|
250 |
-
$remote_ip = $_SERVER['REMOTE_ADDR'];
|
251 |
-
$url = "https://www.google.com/recaptcha/api/siteverify?secret=$private_key&response=$user_response
|
252 |
$response = wp_remote_get( $url );
|
253 |
if ( ! is_wp_error($response) ) {
|
254 |
$response_data = wp_remote_retrieve_body( $response );
|
255 |
$this->_last_result = json_decode($response_data);
|
256 |
} else {
|
257 |
-
$this->_last_result = (object) array( 'success' => false );
|
258 |
}
|
259 |
}
|
260 |
do_action( 'wp_recaptcha_checked' , $this->_last_result->success );
|
@@ -263,9 +274,5 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
263 |
return false;
|
264 |
}
|
265 |
|
266 |
-
|
267 |
-
}
|
268 |
-
|
269 |
-
|
270 |
-
WP_reCaptcha_Options::instance();
|
271 |
|
|
6 |
* Class to manage the recaptcha options.
|
7 |
*/
|
8 |
class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
9 |
+
|
10 |
protected $supported_languages = array(
|
11 |
+
'ar' => 'Arabic',
|
12 |
+
'af' => 'Afrikaans',
|
13 |
+
'am' => 'Amharic',
|
14 |
+
'hy' => 'Armenian',
|
15 |
+
'az' => 'Azerbaijani',
|
16 |
+
'eu' => 'Basque',
|
17 |
+
'bn' => 'Bengali',
|
18 |
+
'bg' => 'Bulgarian',
|
19 |
+
'ca' => 'Catalan',
|
20 |
+
'zh-HK' => 'Chinese (Hong Kong)',
|
21 |
+
'zh-CN' => 'Chinese (Simplified)',
|
22 |
+
'zh-TW' => 'Chinese (Traditional)',
|
23 |
+
'hr' => 'Croatian',
|
24 |
+
'cs' => 'Czech',
|
25 |
+
'da' => 'Danish',
|
26 |
+
'nl' => 'Dutch',
|
27 |
+
'en-GB' => 'English (UK)',
|
28 |
+
'en' => 'English (US)',
|
29 |
+
'et' => 'Estonian',
|
30 |
+
'fil' => 'Filipino',
|
31 |
+
'fi' => 'Finnish',
|
32 |
+
'fr' => 'French',
|
33 |
+
'fr-CA' => 'French (Canadian)',
|
34 |
+
'gl' => 'Galician',
|
35 |
+
'ka' => 'Georgian',
|
36 |
+
'de' => 'German',
|
37 |
+
'de-AT' => 'German (Austria)',
|
38 |
+
'de-CH' => 'German (Switzerland)',
|
39 |
+
'el' => 'Greek',
|
40 |
+
'gu' => 'Gujarati',
|
41 |
+
'iw' => 'Hebrew',
|
42 |
+
'hi' => 'Hindi',
|
43 |
+
'hu' => 'Hungarain',
|
44 |
+
'is' => 'Icelandic',
|
45 |
+
'id' => 'Indonesian',
|
46 |
+
'it' => 'Italian',
|
47 |
+
'ja' => 'Japanese',
|
48 |
+
'kn' => 'Kannada',
|
49 |
+
'ko' => 'Korean',
|
50 |
+
'lo' => 'Laothian',
|
51 |
+
'lv' => 'Latvian',
|
52 |
+
'lt' => 'Lithuanian',
|
53 |
+
'ms' => 'Malay',
|
54 |
+
'ml' => 'Malayalam',
|
55 |
+
'mr' => 'Marathi',
|
56 |
+
'mn' => 'Mongolian',
|
57 |
+
'no' => 'Norwegian',
|
58 |
+
'fa' => 'Persian',
|
59 |
+
'Value' => 'Language',
|
60 |
+
'pl' => 'Polish',
|
61 |
+
'pt' => 'Portuguese',
|
62 |
+
'pt-BR' => 'Portuguese (Brazil)',
|
63 |
+
'pt-PT' => 'Portuguese (Portugal)',
|
64 |
+
'ro' => 'Romanian',
|
65 |
+
'ru' => 'Russian',
|
66 |
+
'sr' => 'Serbian',
|
67 |
+
'si' => 'Sinhalese',
|
68 |
+
'sk' => 'Slovak',
|
69 |
+
'sl' => 'Slovenian',
|
70 |
+
'es' => 'Spanish',
|
71 |
+
'es-419' => 'Spanish (Latin America)',
|
72 |
+
'sw' => 'Swahili',
|
73 |
+
'sv' => 'Swedish',
|
74 |
+
'ta' => 'Tamil',
|
75 |
+
'te' => 'Telugu',
|
76 |
+
'th' => 'Thai',
|
77 |
+
'tr' => 'Turkish',
|
78 |
+
'uk' => 'Ukrainian',
|
79 |
+
'ur' => 'Urdu',
|
80 |
+
'vi' => 'Vietnamese',
|
81 |
+
'zu' => 'Zulu',
|
82 |
);
|
83 |
private $_counter = 0;
|
84 |
+
|
85 |
+
|
86 |
/**
|
87 |
* Holding the singleton instance
|
88 |
*/
|
106 |
* Prevent from creating more than one instance
|
107 |
*/
|
108 |
private function __construct() {
|
109 |
+
|
110 |
+
if ( did_action( 'wp_enqueue_scripts' ) ) {
|
111 |
+
$this->register_assets();
|
112 |
+
} else {
|
113 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_assets') );
|
114 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'register_assets') );
|
115 |
+
add_action( 'login_enqueue_scripts', array( $this, 'register_assets') );
|
116 |
+
}
|
117 |
+
}
|
118 |
+
public function register_assets() {
|
119 |
+
$is_login = current_filter() === 'login_enqueue_scripts';
|
120 |
+
|
121 |
+
$recaptcha_api_url = "https://www.google.com/recaptcha/api.js";
|
122 |
+
$recaptcha_api_url = add_query_arg( array(
|
123 |
+
'onload' => 'wp_recaptcha_loaded',
|
124 |
+
'render' => 'explicit',
|
125 |
+
),$recaptcha_api_url);
|
126 |
+
|
127 |
+
if ( $language_code = apply_filters( 'wp_recaptcha_language' , WP_reCaptcha::instance()->get_option( 'recaptcha_language' ) ) ) {
|
128 |
+
$recaptcha_api_url = add_query_arg( 'hl', $language_code, $recaptcha_api_url );
|
129 |
+
}
|
130 |
+
$suffix = WP_DEBUG ? '' : '.min';
|
131 |
+
wp_register_script( 'wp-recaptcha', plugins_url( "js/wp-recaptcha{$suffix}.js" , dirname(__FILE__)) , array( 'jquery' ), false, ! $is_login );
|
132 |
+
wp_localize_script( 'wp-recaptcha', 'wp_recaptcha', array(
|
133 |
+
'recaptcha_url' => $recaptcha_api_url,
|
134 |
+
'site_key' => WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' ),
|
135 |
+
) );
|
136 |
+
|
137 |
+
if ( $is_login ) {
|
138 |
+
wp_enqueue_script( 'wp-recaptcha' );
|
139 |
+
?>
|
140 |
+
<style type="text/css">
|
141 |
+
.wp-recaptcha[data-size="normal"] {
|
142 |
+
width:304px;
|
143 |
+
margin-left:-15px;
|
144 |
+
margin-bottom:15px;
|
145 |
+
}
|
146 |
+
.wp-recaptcha[data-size="compact"] {
|
147 |
+
width:164px;
|
148 |
+
margin-bottom:15px;
|
149 |
+
}
|
150 |
+
</style>
|
151 |
+
<?php
|
152 |
+
}
|
153 |
}
|
154 |
|
155 |
public function get_supported_themes() {
|
156 |
return array(
|
157 |
+
'light' => __('Light','wp-recaptcha-integration'),
|
158 |
+
'dark' => __('Dark','wp-recaptcha-integration'),
|
|
|
|
|
|
|
|
|
159 |
);
|
160 |
}
|
161 |
+
|
162 |
+
public function get_supported_sizes() {
|
163 |
+
return array(
|
164 |
+
'normal' => __('Normal','wp-recaptcha-integration'),
|
165 |
+
'compact' => __('Compact','wp-recaptcha-integration'),
|
166 |
+
// 'invisible' => __('Invisible','wp-recaptcha-integration'),
|
167 |
+
);
|
168 |
+
}
|
169 |
+
|
170 |
/**
|
171 |
* Override method
|
172 |
* Get recaptcha language code that matches input language code
|
173 |
+
* Sometimes WP uses different locales the the ones supported by nocaptcha.
|
174 |
+
*
|
175 |
* @param $lang string language code
|
176 |
+
* @return string recaptcha language code if supported, empty string otherwise
|
177 |
*/
|
178 |
public function get_language( $lang ) {
|
179 |
/*
|
189 |
$lang = $mapping[$lang];
|
190 |
return parent::get_language( $lang );
|
191 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
/**
|
195 |
* @inheritdoc
|
196 |
*/
|
197 |
public function get_html( $attr = array() ) {
|
198 |
+
$inst = WP_reCaptcha::instance();
|
199 |
+
$theme = $inst->get_option('recaptcha_theme');
|
200 |
+
$size = $inst->get_option('recaptcha_size');
|
201 |
|
202 |
$default = array(
|
203 |
'id' => 'g-recaptcha-'.$this->_counter++,
|
204 |
+
'class' => "wp-recaptcha",
|
|
|
205 |
'data-theme' => $theme,
|
206 |
+
'data-size' => $size,
|
207 |
+
'data-callback' => $inst->get_option( 'recaptcha_solved_callback'),
|
208 |
);
|
209 |
$attr = wp_parse_args( $attr , $default );
|
210 |
+
if ( WP_reCaptcha::instance()->get_option('recaptcha_noscript') ) {
|
211 |
+
$attr['class'] .= ' g-recaptcha';
|
212 |
+
}
|
213 |
+
|
214 |
$attr_str = '';
|
215 |
+
foreach ( $attr as $attr_name => $attr_val ) {
|
216 |
$attr_str .= sprintf( ' %s="%s"' , $attr_name , esc_attr( $attr_val ) );
|
217 |
+
|
218 |
+
}
|
219 |
+
|
220 |
$return = "<div {$attr_str}></div>";
|
221 |
$return .= '<noscript>';
|
222 |
if ( WP_reCaptcha::instance()->get_option('recaptcha_noscript') ) {
|
223 |
+
|
224 |
+
$return .= '<div style="width: 302px; height: 462px;">' .
|
225 |
+
'<div style="width: 302px; height: 422px; position: relative;">' .
|
226 |
+
'<div style="width: 302px; height: 422px; position: absolute;">' .
|
227 |
'<iframe src="https://www.google.com/recaptcha/api/fallback?k='.$attr['data-sitekey'].'"' .
|
228 |
' frameborder="0" scrolling="no"' .
|
229 |
+
' style="width: 302px; height:422px; border-style: none;">' .
|
230 |
'</iframe>' .
|
231 |
'</div>' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
'</div>' .
|
233 |
+
'<div style="width: 300px; height: 60px; border-style: none;' .
|
234 |
+
' bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px;' .
|
235 |
+
' background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">' .
|
236 |
+
'<textarea id="g-recaptcha-response" name="g-recaptcha-response"' .
|
237 |
+
' class="g-recaptcha-response"' .
|
238 |
+
' style="width: 250px; height: 40px; border: 1px solid #c1c1c1;' .
|
239 |
+
' margin: 10px 25px; padding: 0px; resize: none;" value="">' .
|
240 |
+
'</textarea>' .
|
241 |
+
'</div>' .
|
242 |
+
'</div><br>';
|
243 |
} else {
|
244 |
$return .= __('Please enable JavaScript to submit this form.','wp-recaptcha-integration');
|
245 |
}
|
246 |
+
$return .= '<br></noscript>';
|
247 |
+
|
248 |
+
wp_enqueue_script( 'wp-recaptcha' );
|
249 |
+
|
250 |
return $return;
|
251 |
}
|
252 |
+
|
253 |
/**
|
254 |
* @inheritdoc
|
255 |
*/
|
258 |
$user_response = isset( $_REQUEST['g-recaptcha-response'] ) ? $_REQUEST['g-recaptcha-response'] : false;
|
259 |
if ( $user_response !== false ) {
|
260 |
if ( ! $this->_last_result ) {
|
261 |
+
// $remote_ip = $_SERVER['REMOTE_ADDR'];
|
262 |
+
$url = "https://www.google.com/recaptcha/api/siteverify?secret=$private_key&response=$user_response";
|
263 |
$response = wp_remote_get( $url );
|
264 |
if ( ! is_wp_error($response) ) {
|
265 |
$response_data = wp_remote_retrieve_body( $response );
|
266 |
$this->_last_result = json_decode($response_data);
|
267 |
} else {
|
268 |
+
$this->_last_result = (object) array( 'success' => false , 'wp_error' => $response );
|
269 |
}
|
270 |
}
|
271 |
do_action( 'wp_recaptcha_checked' , $this->_last_result->success );
|
274 |
return false;
|
275 |
}
|
276 |
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
+
}
|
inc/class-wp_recaptcha_options.php
CHANGED
@@ -26,28 +26,28 @@ class WP_reCaptcha_Options {
|
|
26 |
*/
|
27 |
private function __clone() {
|
28 |
}
|
29 |
-
|
30 |
/**
|
31 |
* Prevent from creating more than one instance
|
32 |
*/
|
33 |
private function __construct() {
|
34 |
-
add_action('admin_init', array(
|
35 |
-
add_action('admin_menu', array(
|
36 |
|
37 |
if ( WP_reCaptcha::is_network_activated() ) {
|
38 |
$page_hook = 'settings_page_racaptcha-settings';
|
39 |
-
add_action( "load-{$page_hook}", array(
|
40 |
-
add_action( "load-{$page_hook}", array(
|
41 |
-
add_action( 'network_admin_menu', array(
|
42 |
}
|
43 |
-
|
44 |
-
add_action( 'pre_update_option_recaptcha_publickey' , array(
|
45 |
-
add_action( 'pre_update_option_recaptcha_privatekey' , array(
|
46 |
-
add_action( 'add_option_recaptcha_publickey' , array(
|
47 |
-
add_action( 'add_option_recaptcha_privatekey' , array(
|
48 |
}
|
49 |
-
|
50 |
-
|
51 |
/**
|
52 |
* Process network options
|
53 |
*/
|
@@ -85,21 +85,21 @@ class WP_reCaptcha_Options {
|
|
85 |
} else {
|
86 |
wp_die('Cheating, uh?');
|
87 |
}
|
88 |
-
// expecting api keys,
|
89 |
}
|
90 |
-
|
91 |
/**
|
92 |
* Network menu hook
|
93 |
*/
|
94 |
function network_settings_menu(){
|
95 |
-
add_submenu_page(
|
96 |
'settings.php',
|
97 |
-
__( 'reCaptcha Settings' , 'wp-recaptcha-integration' ),
|
98 |
-
__( 'reCaptcha' , 'wp-recaptcha-integration' ),
|
99 |
-
'manage_network', 'racaptcha-settings',
|
100 |
-
array(
|
101 |
}
|
102 |
-
|
103 |
/**
|
104 |
* Network Settings page
|
105 |
*/
|
@@ -114,7 +114,7 @@ class WP_reCaptcha_Options {
|
|
114 |
?></form><?php
|
115 |
?></div><?php
|
116 |
}
|
117 |
-
|
118 |
|
119 |
|
120 |
/**
|
@@ -125,7 +125,7 @@ class WP_reCaptcha_Options {
|
|
125 |
*/
|
126 |
function update_option_recaptcha_apikey( $new , $old ){
|
127 |
delete_transient('recaptcha_keys_okay');
|
128 |
-
add_filter( 'wp_redirect' , array(
|
129 |
return $new;
|
130 |
}
|
131 |
/**
|
@@ -137,9 +137,9 @@ class WP_reCaptcha_Options {
|
|
137 |
function add_option_recaptcha_apikey( $option , $value ){
|
138 |
delete_transient('recaptcha_keys_okay');
|
139 |
if ( in_array( $option , array('recaptcha_publickey','recaptcha_privatekey') ) )
|
140 |
-
add_filter( 'wp_redirect' , array(
|
141 |
}
|
142 |
-
|
143 |
/**
|
144 |
* Removes Update api key url params
|
145 |
* @param url URL
|
@@ -148,13 +148,13 @@ class WP_reCaptcha_Options {
|
|
148 |
function remove_new_apikey_url( $url = null ) {
|
149 |
return remove_query_arg( array('_wpnonce' , 'recaptcha-action' , 'settings-updated' ) , $url );
|
150 |
}
|
151 |
-
|
152 |
/**
|
153 |
* Admin Notices hook to show up when the api keys heve not been entered.
|
154 |
*/
|
155 |
function api_key_notice() {
|
156 |
-
?><div class="notice error above-h1"><p><?php
|
157 |
-
printf(
|
158 |
__( '<strong>reCaptcha needs your attention:</strong> To make it work You need to enter an api key. <br />You can do so at the <a href="%s">reCaptcha settings page</a>.' , 'wp-recaptcha-integration' ),
|
159 |
admin_url( add_query_arg( 'page' , 'recaptcha' , 'options-general.php' ) )
|
160 |
);
|
@@ -165,97 +165,125 @@ class WP_reCaptcha_Options {
|
|
165 |
* admin init hook. Setup settings according.
|
166 |
*/
|
167 |
function admin_init( ) {
|
168 |
-
$
|
|
|
169 |
if ( ! $has_api_key && current_user_can( 'manage_options' ) ) {
|
170 |
-
add_action('admin_notices',array(
|
171 |
}
|
172 |
|
173 |
$this->enter_api_key = ! $has_api_key || ( isset($_REQUEST['recaptcha-action']) && $_REQUEST['recaptcha-action'] == 'recaptcha-set-api-key');
|
174 |
-
|
175 |
if ( ! $this->enter_api_key ) {
|
176 |
-
add_settings_section( 'recaptcha_protection' , __( '
|
177 |
-
add_settings_section( 'recaptcha_styling' , __( '
|
178 |
}
|
179 |
-
add_settings_section( 'recaptcha_apikey' , __( 'Connect' , 'wp-recaptcha-integration' ), array(
|
180 |
if ( ! $this->enter_api_key ) {
|
181 |
-
add_settings_section( 'recaptcha_advanced' , __( 'Advanced' , 'wp-recaptcha-integration' ), array(
|
182 |
}
|
183 |
if ( $this->enter_api_key ) {
|
184 |
// no API Key. Let the user enter it.
|
185 |
register_setting( 'recaptcha_options', 'recaptcha_publickey' , 'trim' );
|
186 |
register_setting( 'recaptcha_options', 'recaptcha_privatekey' , 'trim' );
|
187 |
-
add_settings_field('recaptcha_publickey', __('Site key','wp-recaptcha-integration'), array(
|
188 |
-
add_settings_field('recaptcha_privatekey', __('Secret key','wp-recaptcha-integration'), array(
|
189 |
if ( $has_api_key ) {
|
190 |
-
add_settings_field('cancel', '' , array(
|
191 |
}
|
192 |
} else {
|
193 |
// API Key. Add test tool.
|
194 |
-
add_action('wp_ajax_recaptcha-init-test-api-key' , array(
|
195 |
-
add_action('wp_ajax_recaptcha-test-api-key' , array(
|
196 |
-
add_action('wp_ajax_recaptcha-test-verification' , array(
|
197 |
}
|
198 |
|
199 |
if ( $has_api_key ) {
|
200 |
-
if (
|
201 |
// local options
|
202 |
-
register_setting( 'recaptcha_options', 'recaptcha_language' , array(
|
203 |
-
register_setting( 'recaptcha_options', '
|
204 |
-
register_setting( 'recaptcha_options', '
|
205 |
-
register_setting( 'recaptcha_options', '
|
206 |
|
207 |
register_setting( 'recaptcha_options', 'recaptcha_noscript' , 'intval');
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
),
|
224 |
-
|
225 |
-
|
226 |
-
add_settings_field('recaptcha_language', __( 'Language Settings' ), array(&$this,'select_language'), 'recaptcha', 'recaptcha_styling');
|
227 |
-
|
228 |
-
add_settings_field('recaptcha_theme', __('Theme','wp-recaptcha-integration'), array(&$this,'select_theme'), 'recaptcha', 'recaptcha_styling');
|
229 |
-
|
230 |
-
add_settings_field('recaptcha_disable_submit', __('Disable Submit Button','wp-recaptcha-integration'),
|
231 |
-
array(&$this,'input_checkbox'), 'recaptcha', 'recaptcha_styling' ,
|
232 |
-
array('name'=>'recaptcha_disable_submit','label'=>__( 'Disable Form Submit Button until no-captcha is entered.' ,'wp-recaptcha-integration' ) )
|
233 |
);
|
234 |
-
add_settings_field('
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
'name'=>'recaptcha_noscript',
|
238 |
'label'=>__( 'Provide a fallback for non javascript capable browsers.','wp-recaptcha-integration' ),
|
239 |
'description' => __( 'Leave this unchecked when your site requires JavaScript anyway.','wp-recaptcha-integration' ),
|
240 |
-
|
241 |
-
)
|
242 |
);
|
243 |
|
244 |
global $wp_version;
|
245 |
if ( version_compare( $wp_version , '4.2' ) >= 0 ) {
|
246 |
register_setting( 'recaptcha_options', 'recaptcha_comment_use_42_filter' , 'intval');
|
247 |
-
add_settings_field('recaptcha_comment_use_42_filter', __('Comment Form rendering','wp-recaptcha-integration'),
|
248 |
-
array(
|
249 |
-
array(
|
250 |
'name'=>'recaptcha_comment_use_42_filter',
|
251 |
'label'=>__( 'My Comment Form is WordPress 4.2 compatible.','wp-recaptcha-integration' ),
|
252 |
'description' => __( 'Enable this when your comment form uses the <code>comment_form_submit_button</code> filter. (Or just try if it works.)','wp-recaptcha-integration' ),
|
253 |
-
|
254 |
-
)
|
255 |
);
|
256 |
}
|
257 |
}
|
258 |
-
|
259 |
if ( ! WP_reCaptcha::is_network_activated() || is_network_admin() ) {
|
260 |
// network options
|
261 |
register_setting( 'recaptcha_options', 'recaptcha_enable_comments' , 'intval');
|
@@ -264,11 +292,19 @@ class WP_reCaptcha_Options {
|
|
264 |
register_setting( 'recaptcha_options', 'recaptcha_enable_lostpw' , 'intval');
|
265 |
register_setting( 'recaptcha_options', 'recaptcha_lockout' , 'intval');
|
266 |
|
267 |
-
if ( function_exists('WC') )
|
268 |
register_setting( 'recaptcha_options', 'recaptcha_enable_wc_order' , 'intval');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
register_setting( 'recaptcha_options', 'recaptcha_disable_for_known_users' , 'intval');
|
271 |
-
|
272 |
$protect_settings = array();
|
273 |
$protect_settings[] = array(
|
274 |
'name' => 'recaptcha_enable_comments',
|
@@ -290,83 +326,106 @@ class WP_reCaptcha_Options {
|
|
290 |
'label' => __('Lost Password Form','wp-recaptcha-integration'),
|
291 |
'class' => '',
|
292 |
);
|
|
|
293 |
if ( function_exists('WC') ) {
|
294 |
-
$wc_warn = WP_reCaptcha::instance()->get_option('recaptcha_enable_wc_order') && WP_reCaptcha::instance()->get_option('recaptcha_flavor') !== 'grecaptcha';
|
295 |
$protect_settings[] = array(
|
296 |
'name'=>'recaptcha_enable_wc_order',
|
297 |
'label'=>__( 'woocommerce Checkout','wp-recaptcha-integration' ),
|
298 |
-
'class' => 'flavor-grecaptcha',
|
299 |
);
|
300 |
}
|
301 |
-
|
302 |
-
|
303 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
);
|
305 |
-
|
306 |
-
add_settings_field('recaptcha_disable_for_known_users', __('Disable for known users','wp-recaptcha-integration'),
|
307 |
-
array(
|
308 |
-
array('name'=>'recaptcha_disable_for_known_users','label'=>__( 'Disable reCaptcha verification for logged in users.','wp-recaptcha-integration' ))
|
309 |
);
|
310 |
-
|
311 |
-
|
312 |
-
array(
|
|
|
313 |
'name'=>'recaptcha_lockout',
|
314 |
'label'=>__( 'Allow administrator to log in if API keys do not work.','wp-recaptcha-integration' ),
|
315 |
'description' => __( 'When the captcha verification fails, and the private or public API key does not work the plugin will let you in anyway. Please note that with this option checked plus a broken keypair your site will be open to brute force attacks, that try to guess an administrator password.','wp-recaptcha-integration' ),
|
316 |
-
)
|
317 |
);
|
318 |
}
|
319 |
|
320 |
-
if ( ! WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' ) || ! WP_reCaptcha::instance()->get_option( 'recaptcha_privatekey' ) )
|
321 |
add_settings_error('recaptcha',1,__('Please configure the public and private key. <a href="http://www.google.com/recaptcha/whyrecaptcha">What are you trying to tell me?</a>','wp-recaptcha-integration'),'updated');
|
|
|
322 |
}
|
323 |
}
|
324 |
-
|
325 |
/**
|
326 |
* Intro text for the api key setting
|
327 |
*/
|
328 |
public function explain_apikey( ) {
|
329 |
if ( $this->enter_api_key ) {
|
330 |
-
?><p class="description"><?php
|
331 |
$info_url = 'https://developers.google.com/recaptcha/intro';
|
332 |
$admin_url = 'https://www.google.com/recaptcha/admin';
|
333 |
printf(
|
334 |
__( 'Please register your blog through the <a href="%s">Google reCAPTCHA admin page</a> and enter the public and private key in the fields below. <a href="%s">What is this all about?</a>', 'wp-recaptcha-integration' ) ,
|
335 |
-
$admin_url , $info_url
|
336 |
);
|
337 |
?></p><?php
|
338 |
?><input type="hidden" name="recaptcha-action" value="recaptcha-set-api-key" /><?php
|
339 |
} else {
|
340 |
?><div class="recaptcha-explain"><?php
|
341 |
-
?><p class="description"><?php
|
342 |
_e( 'You already entered an API Key. Use the button below to enter it again.','wp-recaptcha-integration');
|
343 |
?></p><?php
|
344 |
$action = 'recaptcha-set-api-key';
|
345 |
$nonce = wp_create_nonce( $action );
|
346 |
$new_url = add_query_arg( array('_wpnonce' => $nonce , 'recaptcha-action' => $action ) );
|
347 |
-
|
348 |
$action = 'recaptcha-test-api-key';
|
349 |
$nonce = wp_create_nonce( $action );
|
350 |
$test_url = add_query_arg( array('_wpnonce' => $nonce , 'action' => $action ) , admin_url( 'admin-ajax.php' ) );
|
351 |
-
|
352 |
$action = 'recaptcha-init-test-api-key';
|
353 |
$nonce = wp_create_nonce( $action );
|
354 |
$init_test_url = add_query_arg( array('_wpnonce' => $nonce , 'action' => $action ) , admin_url( 'admin-ajax.php' ) );
|
355 |
-
|
356 |
-
?><p class="submit"><?php
|
357 |
?><a class="button" href="<?php echo $new_url ?>"><?php _e('New API Key' , 'wp-recaptcha-integration') ?></a><?php
|
358 |
?><a id="test-api-key" class="button" data-init-href="<?php echo $init_test_url ?>" href="<?php echo $test_url ?>"><?php _e('Test API Key' , 'wp-recaptcha-integration') ?></a><?php
|
359 |
?></p><?php
|
360 |
?></div><?php
|
361 |
}
|
362 |
}
|
363 |
-
|
364 |
/**
|
365 |
* Intro text for the Protection setting
|
366 |
*/
|
367 |
public function explain_protection() {
|
368 |
?><div class="recaptcha-explain"><?php
|
369 |
-
?><p class="description"><?php
|
370 |
_e( 'Select which forms you want to protect with a captcha.' , 'wp-recaptcha-integration' );
|
371 |
?></p><?php
|
372 |
?></div><?php
|
@@ -383,13 +442,13 @@ class WP_reCaptcha_Options {
|
|
383 |
*/
|
384 |
public function explain_styling() {
|
385 |
?><div class="recaptcha-explain"><?php
|
386 |
-
?><p class="description"><?php
|
387 |
-
_e( 'Choose a
|
388 |
?></p><?php
|
389 |
?></div><?php
|
390 |
}
|
391 |
-
|
392 |
-
|
393 |
/**
|
394 |
* Test api key ajax response.
|
395 |
* Returns reCaptcha HTML
|
@@ -398,8 +457,6 @@ class WP_reCaptcha_Options {
|
|
398 |
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) {
|
399 |
header('Content-Type: text/html');
|
400 |
add_filter('option_recaptcha_disable_submit','__return_false');
|
401 |
-
WP_reCaptcha_noCaptcha::instance()->print_head( 'grecaptcha' );
|
402 |
-
WP_reCaptcha_noCaptcha::instance()->print_foot( 'grecaptcha' );
|
403 |
}
|
404 |
exit(0);
|
405 |
}
|
@@ -410,8 +467,6 @@ class WP_reCaptcha_Options {
|
|
410 |
public function ajax_test_api_key() {
|
411 |
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) {
|
412 |
header('Content-Type: text/html');
|
413 |
-
// WP_reCaptcha::instance()->recaptcha_head( 'grecaptcha' );
|
414 |
-
// WP_reCaptcha::instance()->recaptcha_foot( 'grecaptcha' );
|
415 |
echo WP_reCaptcha_noCaptcha::instance()->get_html( 'grecaptcha' );
|
416 |
$action = 'recaptcha-test-verification';
|
417 |
$nonce = wp_create_nonce( $action );
|
@@ -446,7 +501,7 @@ class WP_reCaptcha_Options {
|
|
446 |
}
|
447 |
exit(0);
|
448 |
}
|
449 |
-
|
450 |
/**
|
451 |
* Link for canceling api key entering
|
452 |
* checks the verification process and shows an error on fail.
|
@@ -455,7 +510,7 @@ class WP_reCaptcha_Options {
|
|
455 |
$url = $this->remove_new_apikey_url( add_query_arg(null,null) );
|
456 |
?><a class="button" href="<?php echo $url ?>"><?php _e( 'Cancel' ) ?></a><?php
|
457 |
}
|
458 |
-
|
459 |
/**
|
460 |
* Radio buttons
|
461 |
*
|
@@ -471,18 +526,74 @@ class WP_reCaptcha_Options {
|
|
471 |
* )
|
472 |
*/
|
473 |
public function input_radio( $args ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
extract($args); // name, items
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
}
|
|
|
|
|
484 |
}
|
485 |
-
|
486 |
/**
|
487 |
* A Checkbox
|
488 |
*
|
@@ -511,7 +622,7 @@ class WP_reCaptcha_Options {
|
|
511 |
}
|
512 |
?></label><?php
|
513 |
}
|
514 |
-
|
515 |
/**
|
516 |
* On/off switch. Basically A Checkbox
|
517 |
*
|
@@ -540,14 +651,14 @@ class WP_reCaptcha_Options {
|
|
540 |
?></label><?php
|
541 |
?></div><?php
|
542 |
}
|
543 |
-
|
544 |
public function input_protect( $switches ) {
|
545 |
-
foreach ( $switches as $switch )
|
546 |
$this->input_check_onoff( $switch );
|
547 |
}
|
548 |
-
|
549 |
/**
|
550 |
-
* A Text field.
|
551 |
* Used for api key input.
|
552 |
*
|
553 |
* @param args array(
|
@@ -566,163 +677,97 @@ class WP_reCaptcha_Options {
|
|
566 |
$option_name = 'recaptcha_language';
|
567 |
$option_value = WP_reCaptcha::instance()->get_option( $option_name );
|
568 |
|
569 |
-
$
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
?><option <?php selected($option_value,
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
}
|
583 |
-
?></optgroup><?php
|
584 |
-
?></select><?php
|
585 |
-
}
|
586 |
-
?></div><?php
|
587 |
-
}
|
588 |
-
/**
|
589 |
-
* Selector for recaptcha theme
|
590 |
-
*/
|
591 |
-
public function select_theme() {
|
592 |
-
$option_name = 'recaptcha_theme';
|
593 |
-
|
594 |
-
$grecaptcha_themes = WP_reCaptcha_NoCaptcha::instance()->get_supported_themes();
|
595 |
-
$grecaptcha_themes = array_map( array( $this , '_map_grecaptcha' ) , $grecaptcha_themes );
|
596 |
-
|
597 |
-
$recaptcha_themes = WP_reCaptcha_ReCaptcha::instance()->get_supported_themes();
|
598 |
-
$recaptcha_themes = array_map( array( $this , '_map_recaptcha' ) , $recaptcha_themes );
|
599 |
-
|
600 |
-
$themes = $grecaptcha_themes + $recaptcha_themes;
|
601 |
-
|
602 |
-
$option_theme = WP_reCaptcha::instance()->get_option($option_name);
|
603 |
-
$option_flavor = WP_reCaptcha::instance()->get_option( 'recaptcha_flavor' );
|
604 |
-
|
605 |
-
?><div class="recaptcha-select-theme"><?php
|
606 |
-
|
607 |
-
foreach ( $themes as $value => $theme ) {
|
608 |
-
extract( $theme ); // label, flavor
|
609 |
-
?><div class="theme-item flavor-<?php echo $flavor ?>"><?php
|
610 |
-
?><input <?php checked($value,$option_theme,true); ?> id="<?php echo "$option_name-$value" ?>" type="radio" name="<?php echo $option_name ?>" value="<?php echo $value ?>" /><?php
|
611 |
-
?><label for="<?php echo "$option_name-$value" ?>"><?php
|
612 |
-
?><span class="title"><?php
|
613 |
-
echo $label;
|
614 |
-
?></span><?php
|
615 |
-
if ( $value == 'custom' ) {
|
616 |
-
?><span class="visual"><?php
|
617 |
-
_e( 'Unstyled HTML to apply your own Stylesheets.' , 'wp-recaptcha-integration' );
|
618 |
-
?></span><?php
|
619 |
-
} else {
|
620 |
-
$src = plugins_url( "images/{$flavor}-theme-{$value}.png" , dirname(__FILE__));
|
621 |
-
printf( '<img src="%s" alt="%s" />' , $src , $label );
|
622 |
-
}
|
623 |
-
?></label><?php
|
624 |
-
?></div><?php
|
625 |
-
|
626 |
-
}
|
627 |
-
?></div><?php
|
628 |
?></div><?php
|
629 |
}
|
630 |
-
|
631 |
-
|
632 |
-
* @usage select_theme()
|
633 |
-
*/
|
634 |
-
private function _map_grecaptcha( $val ) {
|
635 |
-
$val['flavor'] = 'grecaptcha';
|
636 |
-
return $val;
|
637 |
-
}
|
638 |
-
/**
|
639 |
-
* @usage select_theme()
|
640 |
-
*/
|
641 |
-
private function _map_recaptcha( $val ) {
|
642 |
-
$val['flavor'] = 'recaptcha';
|
643 |
-
return $val;
|
644 |
-
}
|
645 |
-
|
646 |
/**
|
647 |
-
*
|
648 |
*/
|
649 |
public function sanitize_language( $language ) {
|
650 |
-
|
651 |
-
|
652 |
-
if ( isset( $language[$flavor] ) )
|
653 |
-
$language = $language[$flavor];
|
654 |
-
|
655 |
-
if ( $language != 'WPLANG' )
|
656 |
-
$language = WP_reCaptcha::instance()->captcha_instance_by_flavor( $flavor )->get_language( $language );
|
657 |
-
return $language;
|
658 |
}
|
659 |
/**
|
660 |
-
* Check valid recaptcha theme
|
661 |
*/
|
662 |
public function sanitize_theme( $theme ) {
|
663 |
-
$
|
664 |
-
|
665 |
-
|
666 |
-
);
|
667 |
-
$flavor = WP_reCaptcha::instance()->get_option('recaptcha_flavor');
|
668 |
-
|
669 |
-
if ( isset($themes_available[$flavor] ) && in_array($theme,$themes_available[$flavor]) )
|
670 |
return $theme;
|
671 |
-
|
672 |
-
return $themes_available[$flavor][0];
|
673 |
return 'light';
|
674 |
}
|
675 |
-
|
676 |
/**
|
677 |
-
* Check valid
|
678 |
*/
|
679 |
-
public function
|
680 |
-
|
681 |
-
|
682 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
683 |
}
|
684 |
|
685 |
/**
|
686 |
* Admin menu hook, adds blogs local options page
|
687 |
*/
|
688 |
public function add_options_page() {
|
689 |
-
$page_slug = add_options_page(
|
690 |
-
__('ReCaptcha','wp-recaptcha-integration'), __('ReCaptcha','wp-recaptcha-integration'),
|
691 |
-
'manage_options', 'recaptcha',
|
692 |
-
array(
|
693 |
);
|
694 |
-
|
695 |
-
add_action( "load-$page_slug" , array(
|
696 |
}
|
697 |
|
698 |
/**
|
699 |
* Enqueue script and css for options page.
|
700 |
*/
|
701 |
public function enqueue_styles() {
|
702 |
-
|
703 |
-
|
704 |
-
|
|
|
705 |
}
|
706 |
/**
|
707 |
* Rendering the options page
|
708 |
*/
|
709 |
public function render_options_page() {
|
710 |
-
|
711 |
-
|
712 |
-
?><h2><?php /*icon*/
|
713 |
_e('Settings');
|
714 |
-
echo ' › ';
|
715 |
-
_e( 'ReCaptcha' , 'wp-recaptcha-integration' );
|
716 |
?></h2><?php
|
717 |
/* ?><p><?php _e( '...' , 'googlefont' ); ?></p><?php */
|
718 |
?><form action="options.php" method="post"><?php
|
719 |
settings_fields( 'recaptcha_options' );
|
720 |
-
do_settings_sections( 'recaptcha' );
|
721 |
submit_button( null , 'primary' , null, null, array('autocomplete'=>'off'));
|
722 |
?></form><?php
|
723 |
?></div><?php
|
724 |
}
|
725 |
-
|
726 |
-
}
|
727 |
-
|
728 |
|
|
26 |
*/
|
27 |
private function __clone() {
|
28 |
}
|
29 |
+
|
30 |
/**
|
31 |
* Prevent from creating more than one instance
|
32 |
*/
|
33 |
private function __construct() {
|
34 |
+
add_action('admin_init', array($this,'admin_init') );
|
35 |
+
add_action('admin_menu', array($this,'add_options_page') );
|
36 |
|
37 |
if ( WP_reCaptcha::is_network_activated() ) {
|
38 |
$page_hook = 'settings_page_racaptcha-settings';
|
39 |
+
add_action( "load-{$page_hook}", array( $this , 'enqueue_styles' ));
|
40 |
+
add_action( "load-{$page_hook}", array( $this , 'process_network_settings' ));
|
41 |
+
add_action( 'network_admin_menu', array( $this , 'network_settings_menu' ));
|
42 |
}
|
43 |
+
|
44 |
+
add_action( 'pre_update_option_recaptcha_publickey' , array( $this , 'update_option_recaptcha_apikey' ) , 10 , 2 );
|
45 |
+
add_action( 'pre_update_option_recaptcha_privatekey' , array( $this , 'update_option_recaptcha_apikey' ) , 10 , 2 );
|
46 |
+
add_action( 'add_option_recaptcha_publickey' , array( $this , 'add_option_recaptcha_apikey' ) , 10 , 2 );
|
47 |
+
add_action( 'add_option_recaptcha_privatekey' , array( $this , 'add_option_recaptcha_apikey' ) , 10 , 2 );
|
48 |
}
|
49 |
+
|
50 |
+
|
51 |
/**
|
52 |
* Process network options
|
53 |
*/
|
85 |
} else {
|
86 |
wp_die('Cheating, uh?');
|
87 |
}
|
88 |
+
// expecting api keys,
|
89 |
}
|
90 |
+
|
91 |
/**
|
92 |
* Network menu hook
|
93 |
*/
|
94 |
function network_settings_menu(){
|
95 |
+
add_submenu_page(
|
96 |
'settings.php',
|
97 |
+
__( 'reCaptcha Settings' , 'wp-recaptcha-integration' ),
|
98 |
+
__( 'reCaptcha' , 'wp-recaptcha-integration' ),
|
99 |
+
'manage_network', 'racaptcha-settings',
|
100 |
+
array($this , 'network_settings_page' ) );
|
101 |
}
|
102 |
+
|
103 |
/**
|
104 |
* Network Settings page
|
105 |
*/
|
114 |
?></form><?php
|
115 |
?></div><?php
|
116 |
}
|
117 |
+
|
118 |
|
119 |
|
120 |
/**
|
125 |
*/
|
126 |
function update_option_recaptcha_apikey( $new , $old ){
|
127 |
delete_transient('recaptcha_keys_okay');
|
128 |
+
add_filter( 'wp_redirect' , array( $this , 'remove_new_apikey_url' ) );
|
129 |
return $new;
|
130 |
}
|
131 |
/**
|
137 |
function add_option_recaptcha_apikey( $option , $value ){
|
138 |
delete_transient('recaptcha_keys_okay');
|
139 |
if ( in_array( $option , array('recaptcha_publickey','recaptcha_privatekey') ) )
|
140 |
+
add_filter( 'wp_redirect' , array( $this , 'remove_new_apikey_url' ) );
|
141 |
}
|
142 |
+
|
143 |
/**
|
144 |
* Removes Update api key url params
|
145 |
* @param url URL
|
148 |
function remove_new_apikey_url( $url = null ) {
|
149 |
return remove_query_arg( array('_wpnonce' , 'recaptcha-action' , 'settings-updated' ) , $url );
|
150 |
}
|
151 |
+
|
152 |
/**
|
153 |
* Admin Notices hook to show up when the api keys heve not been entered.
|
154 |
*/
|
155 |
function api_key_notice() {
|
156 |
+
?><div class="notice error above-h1"><p><?php
|
157 |
+
printf(
|
158 |
__( '<strong>reCaptcha needs your attention:</strong> To make it work You need to enter an api key. <br />You can do so at the <a href="%s">reCaptcha settings page</a>.' , 'wp-recaptcha-integration' ),
|
159 |
admin_url( add_query_arg( 'page' , 'recaptcha' , 'options-general.php' ) )
|
160 |
);
|
165 |
* admin init hook. Setup settings according.
|
166 |
*/
|
167 |
function admin_init( ) {
|
168 |
+
$inst = WP_reCaptcha::instance();
|
169 |
+
$has_api_key = $inst->has_api_key();
|
170 |
if ( ! $has_api_key && current_user_can( 'manage_options' ) ) {
|
171 |
+
add_action('admin_notices',array( $this , 'api_key_notice'));
|
172 |
}
|
173 |
|
174 |
$this->enter_api_key = ! $has_api_key || ( isset($_REQUEST['recaptcha-action']) && $_REQUEST['recaptcha-action'] == 'recaptcha-set-api-key');
|
175 |
+
|
176 |
if ( ! $this->enter_api_key ) {
|
177 |
+
add_settings_section( 'recaptcha_protection' , __( 'Protection' , 'wp-recaptcha-integration' ), array( $this , 'explain_protection' ), 'recaptcha');
|
178 |
+
add_settings_section( 'recaptcha_styling' , __( 'Styling' , 'wp-recaptcha-integration' ), array( $this , 'explain_styling' ), 'recaptcha');
|
179 |
}
|
180 |
+
add_settings_section( 'recaptcha_apikey' , __( 'Connect' , 'wp-recaptcha-integration' ), array( $this , 'explain_apikey' ), 'recaptcha');
|
181 |
if ( ! $this->enter_api_key ) {
|
182 |
+
add_settings_section( 'recaptcha_advanced' , __( 'Advanced' , 'wp-recaptcha-integration' ), array( $this , 'explain_advanced' ), 'recaptcha');
|
183 |
}
|
184 |
if ( $this->enter_api_key ) {
|
185 |
// no API Key. Let the user enter it.
|
186 |
register_setting( 'recaptcha_options', 'recaptcha_publickey' , 'trim' );
|
187 |
register_setting( 'recaptcha_options', 'recaptcha_privatekey' , 'trim' );
|
188 |
+
add_settings_field('recaptcha_publickey', __('Site key','wp-recaptcha-integration'), array($this,'secret_input_text'), 'recaptcha', 'recaptcha_apikey' , array('name'=>'recaptcha_publickey') );
|
189 |
+
add_settings_field('recaptcha_privatekey', __('Secret key','wp-recaptcha-integration'), array($this,'secret_input_text'), 'recaptcha', 'recaptcha_apikey', array('name'=>'recaptcha_privatekey'));
|
190 |
if ( $has_api_key ) {
|
191 |
+
add_settings_field('cancel', '' , array($this,'cancel_enter_api_key'), 'recaptcha', 'recaptcha_apikey' );
|
192 |
}
|
193 |
} else {
|
194 |
// API Key. Add test tool.
|
195 |
+
add_action('wp_ajax_recaptcha-init-test-api-key' , array( $this , 'ajax_init_test_api_key' ) );
|
196 |
+
add_action('wp_ajax_recaptcha-test-api-key' , array( $this , 'ajax_test_api_key' ) );
|
197 |
+
add_action('wp_ajax_recaptcha-test-verification' , array( $this , 'ajax_test_api_key_verification' ) );
|
198 |
}
|
199 |
|
200 |
if ( $has_api_key ) {
|
201 |
+
if ( ! WP_reCaptcha::is_network_activated() || ! is_network_admin() ) {
|
202 |
// local options
|
203 |
+
register_setting( 'recaptcha_options', 'recaptcha_language' , array( $this , 'sanitize_language' ) );
|
204 |
+
register_setting( 'recaptcha_options', 'recaptcha_theme' , array( $this , 'sanitize_theme' ) );
|
205 |
+
register_setting( 'recaptcha_options', 'recaptcha_size' , array( $this , 'sanitize_size' ) );
|
206 |
+
register_setting( 'recaptcha_options', 'recaptcha_solved_callback' , array( $this, 'sanitize_solved_callback' ));
|
207 |
|
208 |
register_setting( 'recaptcha_options', 'recaptcha_noscript' , 'intval');
|
209 |
+
|
210 |
+
add_settings_field('recaptcha_language', __( 'Language Settings','wp-recaptcha-integration' ), array($this,'select_language'), 'recaptcha', 'recaptcha_styling');
|
211 |
+
|
212 |
+
$option_name = 'recaptcha_theme';
|
213 |
+
add_settings_field( $option_name,
|
214 |
+
__('Theme','wp-recaptcha-integration'),
|
215 |
+
array( $this, 'input_radio'), // select_theme
|
216 |
+
'recaptcha',
|
217 |
+
'recaptcha_styling',
|
218 |
+
array(
|
219 |
+
'name' => $option_name,
|
220 |
+
'horizontal' => true,
|
221 |
+
'items' => WP_reCaptcha_NoCaptcha::instance()->get_supported_themes(),
|
222 |
+
)
|
223 |
+
);
|
224 |
+
|
225 |
+
$option_name = 'recaptcha_size';
|
226 |
+
|
227 |
+
add_settings_field( $option_name,
|
228 |
+
__( 'Size', 'wp-recaptcha-integration' ),
|
229 |
+
array( $this, 'input_radio'), // select_theme
|
230 |
+
'recaptcha',
|
231 |
+
'recaptcha_styling',
|
232 |
+
array(
|
233 |
+
'name' => $option_name,
|
234 |
+
'horizontal' => true,
|
235 |
+
'items' => WP_reCaptcha_NoCaptcha::instance()->get_supported_sizes(),
|
236 |
+
'before' => sprintf( '<div class="recaptcha-preview-container"><div class="recaptcha-preview" data-theme="%s" data-size="%s"></div></div>',
|
237 |
+
$inst->get_option( 'recaptcha_theme' ),
|
238 |
+
$inst->get_option( 'recaptcha_size' )
|
239 |
),
|
240 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
);
|
242 |
+
// add_settings_field('recaptcha_size', __('Size','wp-recaptcha-integration'), array($this,'select_size'), 'recaptcha', 'recaptcha_styling');
|
243 |
+
|
244 |
+
// add_settings_field( 'recaptcha_disable_submit', __('Disable Submit Button','wp-recaptcha-integration'),
|
245 |
+
// array($this,'input_checkbox'), 'recaptcha', 'recaptcha_styling' ,
|
246 |
+
// array('name'=>'recaptcha_disable_submit','label'=>__( 'Disable Form Submit Button until no-captcha is entered.' ,'wp-recaptcha-integration' ) )
|
247 |
+
// );
|
248 |
+
|
249 |
+
add_settings_field( 'recaptcha_solved_callback',
|
250 |
+
__('When the captcha has been solved','wp-recaptcha-integration' ),
|
251 |
+
array( $this, 'input_select' ),
|
252 |
+
'recaptcha',
|
253 |
+
'recaptcha_styling',
|
254 |
+
array(
|
255 |
+
'name' =>'recaptcha_solved_callback',
|
256 |
+
'items' => array(
|
257 |
+
'' => __( 'Do nothing', 'wp-recaptcha-integration' ),
|
258 |
+
'enable' => __( 'Enable Submit Button', 'wp-recaptcha-integration' ),
|
259 |
+
'submit' => __( 'Submit Form', 'wp-recaptcha-integration' ),
|
260 |
+
)
|
261 |
+
)
|
262 |
+
);
|
263 |
+
|
264 |
+
add_settings_field('recaptcha_noscript', __('Noscript Fallback','wp-recaptcha-integration'),
|
265 |
+
array($this,'input_checkbox'), 'recaptcha', 'recaptcha_advanced' ,
|
266 |
+
array(
|
267 |
'name'=>'recaptcha_noscript',
|
268 |
'label'=>__( 'Provide a fallback for non javascript capable browsers.','wp-recaptcha-integration' ),
|
269 |
'description' => __( 'Leave this unchecked when your site requires JavaScript anyway.','wp-recaptcha-integration' ),
|
270 |
+
)
|
|
|
271 |
);
|
272 |
|
273 |
global $wp_version;
|
274 |
if ( version_compare( $wp_version , '4.2' ) >= 0 ) {
|
275 |
register_setting( 'recaptcha_options', 'recaptcha_comment_use_42_filter' , 'intval');
|
276 |
+
add_settings_field('recaptcha_comment_use_42_filter', __('Comment Form rendering','wp-recaptcha-integration'),
|
277 |
+
array($this,'input_checkbox'), 'recaptcha', 'recaptcha_advanced' ,
|
278 |
+
array(
|
279 |
'name'=>'recaptcha_comment_use_42_filter',
|
280 |
'label'=>__( 'My Comment Form is WordPress 4.2 compatible.','wp-recaptcha-integration' ),
|
281 |
'description' => __( 'Enable this when your comment form uses the <code>comment_form_submit_button</code> filter. (Or just try if it works.)','wp-recaptcha-integration' ),
|
282 |
+
)
|
|
|
283 |
);
|
284 |
}
|
285 |
}
|
286 |
+
|
287 |
if ( ! WP_reCaptcha::is_network_activated() || is_network_admin() ) {
|
288 |
// network options
|
289 |
register_setting( 'recaptcha_options', 'recaptcha_enable_comments' , 'intval');
|
292 |
register_setting( 'recaptcha_options', 'recaptcha_enable_lostpw' , 'intval');
|
293 |
register_setting( 'recaptcha_options', 'recaptcha_lockout' , 'intval');
|
294 |
|
295 |
+
if ( function_exists('WC') ) {
|
296 |
register_setting( 'recaptcha_options', 'recaptcha_enable_wc_order' , 'intval');
|
297 |
+
}
|
298 |
+
if ( class_exists( 'Awesome_Support' ) ) {
|
299 |
+
register_setting( 'recaptcha_options', 'recaptcha_enable_as_registration' , 'intval');
|
300 |
+
}
|
301 |
+
if ( class_exists( 'bbPress' ) ) {
|
302 |
+
register_setting( 'recaptcha_options', 'recaptcha_enable_bbp_topic' , 'intval');
|
303 |
+
register_setting( 'recaptcha_options', 'recaptcha_enable_bbp_reply' , 'intval');
|
304 |
+
}
|
305 |
|
306 |
register_setting( 'recaptcha_options', 'recaptcha_disable_for_known_users' , 'intval');
|
307 |
+
|
308 |
$protect_settings = array();
|
309 |
$protect_settings[] = array(
|
310 |
'name' => 'recaptcha_enable_comments',
|
326 |
'label' => __('Lost Password Form','wp-recaptcha-integration'),
|
327 |
'class' => '',
|
328 |
);
|
329 |
+
|
330 |
if ( function_exists('WC') ) {
|
|
|
331 |
$protect_settings[] = array(
|
332 |
'name'=>'recaptcha_enable_wc_order',
|
333 |
'label'=>__( 'woocommerce Checkout','wp-recaptcha-integration' ),
|
|
|
334 |
);
|
335 |
}
|
336 |
+
|
337 |
+
if ( class_exists( 'Awesome_Support' ) ) {
|
338 |
+
|
339 |
+
$protect_settings[] = array(
|
340 |
+
'name'=>'recaptcha_enable_as_registration',
|
341 |
+
'label'=>__( 'Awesome Support Registration','wp-recaptcha-integration' ),
|
342 |
+
'class' => '',
|
343 |
+
);
|
344 |
+
}
|
345 |
+
|
346 |
+
if ( class_exists( 'bbPress' ) ) {
|
347 |
+
$protect_settings[] = array(
|
348 |
+
'name' => 'recaptcha_enable_bbp_topic',
|
349 |
+
'label' => __( 'bbPress New Topic','wp-recaptcha-integration' ),
|
350 |
+
);
|
351 |
+
|
352 |
+
$protect_settings[] = array(
|
353 |
+
'name' => 'recaptcha_enable_bbp_reply',
|
354 |
+
'label' => __( 'bbPress New Reply','wp-recaptcha-integration' ),
|
355 |
+
);
|
356 |
+
}
|
357 |
+
|
358 |
+
add_settings_field('recaptcha_protection', __('Forms to protect','wp-recaptcha-integration'),
|
359 |
+
array($this,'input_protect'), 'recaptcha', 'recaptcha_protection' ,
|
360 |
+
$protect_settings
|
361 |
);
|
362 |
+
|
363 |
+
add_settings_field('recaptcha_disable_for_known_users', __('Disable for known users','wp-recaptcha-integration'),
|
364 |
+
array($this,'input_checkbox'), 'recaptcha', 'recaptcha_protection' ,
|
365 |
+
array('name'=>'recaptcha_disable_for_known_users','label'=>__( 'Disable reCaptcha verification for logged in users.','wp-recaptcha-integration' ))
|
366 |
);
|
367 |
+
|
368 |
+
add_settings_field('recaptcha_lockout', __('Prevent lockout','wp-recaptcha-integration'),
|
369 |
+
array($this,'input_checkbox'), 'recaptcha', 'recaptcha_protection' ,
|
370 |
+
array(
|
371 |
'name'=>'recaptcha_lockout',
|
372 |
'label'=>__( 'Allow administrator to log in if API keys do not work.','wp-recaptcha-integration' ),
|
373 |
'description' => __( 'When the captcha verification fails, and the private or public API key does not work the plugin will let you in anyway. Please note that with this option checked plus a broken keypair your site will be open to brute force attacks, that try to guess an administrator password.','wp-recaptcha-integration' ),
|
374 |
+
)
|
375 |
);
|
376 |
}
|
377 |
|
378 |
+
if ( ! WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' ) || ! WP_reCaptcha::instance()->get_option( 'recaptcha_privatekey' ) ) {
|
379 |
add_settings_error('recaptcha',1,__('Please configure the public and private key. <a href="http://www.google.com/recaptcha/whyrecaptcha">What are you trying to tell me?</a>','wp-recaptcha-integration'),'updated');
|
380 |
+
}
|
381 |
}
|
382 |
}
|
383 |
+
|
384 |
/**
|
385 |
* Intro text for the api key setting
|
386 |
*/
|
387 |
public function explain_apikey( ) {
|
388 |
if ( $this->enter_api_key ) {
|
389 |
+
?><p class="description"><?php
|
390 |
$info_url = 'https://developers.google.com/recaptcha/intro';
|
391 |
$admin_url = 'https://www.google.com/recaptcha/admin';
|
392 |
printf(
|
393 |
__( 'Please register your blog through the <a href="%s">Google reCAPTCHA admin page</a> and enter the public and private key in the fields below. <a href="%s">What is this all about?</a>', 'wp-recaptcha-integration' ) ,
|
394 |
+
$admin_url , $info_url
|
395 |
);
|
396 |
?></p><?php
|
397 |
?><input type="hidden" name="recaptcha-action" value="recaptcha-set-api-key" /><?php
|
398 |
} else {
|
399 |
?><div class="recaptcha-explain"><?php
|
400 |
+
?><p class="description"><?php
|
401 |
_e( 'You already entered an API Key. Use the button below to enter it again.','wp-recaptcha-integration');
|
402 |
?></p><?php
|
403 |
$action = 'recaptcha-set-api-key';
|
404 |
$nonce = wp_create_nonce( $action );
|
405 |
$new_url = add_query_arg( array('_wpnonce' => $nonce , 'recaptcha-action' => $action ) );
|
406 |
+
|
407 |
$action = 'recaptcha-test-api-key';
|
408 |
$nonce = wp_create_nonce( $action );
|
409 |
$test_url = add_query_arg( array('_wpnonce' => $nonce , 'action' => $action ) , admin_url( 'admin-ajax.php' ) );
|
410 |
+
|
411 |
$action = 'recaptcha-init-test-api-key';
|
412 |
$nonce = wp_create_nonce( $action );
|
413 |
$init_test_url = add_query_arg( array('_wpnonce' => $nonce , 'action' => $action ) , admin_url( 'admin-ajax.php' ) );
|
414 |
+
|
415 |
+
?><p class="submit"><?php
|
416 |
?><a class="button" href="<?php echo $new_url ?>"><?php _e('New API Key' , 'wp-recaptcha-integration') ?></a><?php
|
417 |
?><a id="test-api-key" class="button" data-init-href="<?php echo $init_test_url ?>" href="<?php echo $test_url ?>"><?php _e('Test API Key' , 'wp-recaptcha-integration') ?></a><?php
|
418 |
?></p><?php
|
419 |
?></div><?php
|
420 |
}
|
421 |
}
|
422 |
+
|
423 |
/**
|
424 |
* Intro text for the Protection setting
|
425 |
*/
|
426 |
public function explain_protection() {
|
427 |
?><div class="recaptcha-explain"><?php
|
428 |
+
?><p class="description"><?php
|
429 |
_e( 'Select which forms you want to protect with a captcha.' , 'wp-recaptcha-integration' );
|
430 |
?></p><?php
|
431 |
?></div><?php
|
442 |
*/
|
443 |
public function explain_styling() {
|
444 |
?><div class="recaptcha-explain"><?php
|
445 |
+
?><p class="description"><?php
|
446 |
+
_e( 'Choose a theme for your Captcha.' , 'wp-recaptcha-integration' );
|
447 |
?></p><?php
|
448 |
?></div><?php
|
449 |
}
|
450 |
+
|
451 |
+
|
452 |
/**
|
453 |
* Test api key ajax response.
|
454 |
* Returns reCaptcha HTML
|
457 |
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) {
|
458 |
header('Content-Type: text/html');
|
459 |
add_filter('option_recaptcha_disable_submit','__return_false');
|
|
|
|
|
460 |
}
|
461 |
exit(0);
|
462 |
}
|
467 |
public function ajax_test_api_key() {
|
468 |
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) {
|
469 |
header('Content-Type: text/html');
|
|
|
|
|
470 |
echo WP_reCaptcha_noCaptcha::instance()->get_html( 'grecaptcha' );
|
471 |
$action = 'recaptcha-test-verification';
|
472 |
$nonce = wp_create_nonce( $action );
|
501 |
}
|
502 |
exit(0);
|
503 |
}
|
504 |
+
|
505 |
/**
|
506 |
* Link for canceling api key entering
|
507 |
* checks the verification process and shows an error on fail.
|
510 |
$url = $this->remove_new_apikey_url( add_query_arg(null,null) );
|
511 |
?><a class="button" href="<?php echo $url ?>"><?php _e( 'Cancel' ) ?></a><?php
|
512 |
}
|
513 |
+
|
514 |
/**
|
515 |
* Radio buttons
|
516 |
*
|
526 |
* )
|
527 |
*/
|
528 |
public function input_radio( $args ) {
|
529 |
+
$args = wp_parse_args( $args, array(
|
530 |
+
'name' => '',
|
531 |
+
'horizontal' => false,
|
532 |
+
'items' => array(),
|
533 |
+
'before' => '',
|
534 |
+
'after' => '',
|
535 |
+
));
|
536 |
extract($args); // name, items
|
537 |
+
|
538 |
+
$selected = WP_reCaptcha::instance()->get_option( $name );
|
539 |
+
echo $before;
|
540 |
+
printf( '<div class="radio-%s">', $horizontal ? 'horizontal' : 'vertical' );
|
541 |
+
foreach ( $items as $value => $label ) {
|
542 |
+
printf('<label for="%s-%s">', $name, $value );
|
543 |
+
printf('<input id="%1$s-%2$s" type="radio" name="%1$s" value="%2$s" %3$s>',
|
544 |
+
$name,
|
545 |
+
$value,
|
546 |
+
checked( $value, $selected, false )
|
547 |
+
);
|
548 |
+
echo $label;
|
549 |
+
echo '</label>';
|
550 |
+
if ( ! $horizontal ) {
|
551 |
+
echo '<br />';
|
552 |
+
}
|
553 |
+
}
|
554 |
+
echo '</div>';
|
555 |
+
echo $after;
|
556 |
+
}
|
557 |
+
|
558 |
+
/**
|
559 |
+
* Radio buttons
|
560 |
+
*
|
561 |
+
* @param args array(
|
562 |
+
* 'name' => name of the input field,
|
563 |
+
* 'items' => array(
|
564 |
+
* array(
|
565 |
+
* 'value' => '', // the radio button value, must match an option name
|
566 |
+
* 'label' => '', // the button label
|
567 |
+
* ),
|
568 |
+
* ...
|
569 |
+
* )
|
570 |
+
* )
|
571 |
+
*/
|
572 |
+
public function input_select( $args ) {
|
573 |
+
$args = wp_parse_args( $args, array(
|
574 |
+
'name' => '',
|
575 |
+
'items' => array(),
|
576 |
+
'before' => '',
|
577 |
+
'after' => '',
|
578 |
+
));
|
579 |
+
extract($args); // name, items
|
580 |
+
|
581 |
+
$selected = WP_reCaptcha::instance()->get_option( $name );
|
582 |
+
echo $before;
|
583 |
+
|
584 |
+
printf( '<select name="%s">', $name );
|
585 |
+
foreach ( $items as $value => $label ) {
|
586 |
+
|
587 |
+
printf('<option value="%s" %s>%s</option>',
|
588 |
+
$value,
|
589 |
+
selected( $value, $selected, false ),
|
590 |
+
$label
|
591 |
+
);
|
592 |
}
|
593 |
+
echo '</select>';
|
594 |
+
echo $after;
|
595 |
}
|
596 |
+
|
597 |
/**
|
598 |
* A Checkbox
|
599 |
*
|
622 |
}
|
623 |
?></label><?php
|
624 |
}
|
625 |
+
|
626 |
/**
|
627 |
* On/off switch. Basically A Checkbox
|
628 |
*
|
651 |
?></label><?php
|
652 |
?></div><?php
|
653 |
}
|
654 |
+
|
655 |
public function input_protect( $switches ) {
|
656 |
+
foreach ( $switches as $switch )
|
657 |
$this->input_check_onoff( $switch );
|
658 |
}
|
659 |
+
|
660 |
/**
|
661 |
+
* A Text field.
|
662 |
* Used for api key input.
|
663 |
*
|
664 |
* @param args array(
|
677 |
$option_name = 'recaptcha_language';
|
678 |
$option_value = WP_reCaptcha::instance()->get_option( $option_name );
|
679 |
|
680 |
+
$available_langs = WP_reCaptcha_NoCaptcha::instance()->get_supported_languages();
|
681 |
+
|
682 |
+
?><div class="recaptcha-select-language">
|
683 |
+
<select name="<?php echo $option_name ?>">
|
684 |
+
<option <?php selected($option_value,'',true); ?> value=""><?php _e( 'Automatic','wp-recaptcha-integration' ); ?></option>
|
685 |
+
<option <?php selected($option_value,'WPLANG',true); ?> value="WPLANG"><?php _e( 'Site Language' ); ?></option>
|
686 |
+
<optgroup label="<?php _e('Other','wp-recaptcha-integration' ) ?>">
|
687 |
+
<?php
|
688 |
+
foreach ( $available_langs as $lang => $lang_name ) {
|
689 |
+
?><option <?php selected( $option_value, $lang, true ); ?> value="<?php echo $lang; ?>"><?php _e( $lang_name ); ?></option><?php
|
690 |
+
}
|
691 |
+
?></optgroup><?php
|
692 |
+
?></select><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
?></div><?php
|
694 |
}
|
695 |
+
|
696 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
/**
|
698 |
+
* return supported language
|
699 |
*/
|
700 |
public function sanitize_language( $language ) {
|
701 |
+
return WP_reCaptcha_NoCaptcha::instance()->get_language( $language );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
}
|
703 |
/**
|
704 |
+
* Check valid recaptcha theme
|
705 |
*/
|
706 |
public function sanitize_theme( $theme ) {
|
707 |
+
$themes = WP_reCaptcha_NoCaptcha::instance()->get_supported_themes();
|
708 |
+
|
709 |
+
if ( isset( $themes[ $theme ] ) ) {
|
|
|
|
|
|
|
|
|
710 |
return $theme;
|
711 |
+
}
|
|
|
712 |
return 'light';
|
713 |
}
|
|
|
714 |
/**
|
715 |
+
* Check valid recaptcha theme
|
716 |
*/
|
717 |
+
public function sanitize_size( $size ) {
|
718 |
+
$sizes = WP_reCaptcha_NoCaptcha::instance()->get_supported_sizes();
|
719 |
+
|
720 |
+
if ( isset( $sizes[ $size ] ) ) {
|
721 |
+
return $size;
|
722 |
+
}
|
723 |
+
return 'normal';
|
724 |
+
}
|
725 |
+
public function sanitize_solved_callback( $value ) {
|
726 |
+
if ( in_array( $value, array( '', 'enable', 'submit' ) ) ) {
|
727 |
+
return $value;
|
728 |
+
}
|
729 |
+
return '';
|
730 |
}
|
731 |
|
732 |
/**
|
733 |
* Admin menu hook, adds blogs local options page
|
734 |
*/
|
735 |
public function add_options_page() {
|
736 |
+
$page_slug = add_options_page(
|
737 |
+
__('ReCaptcha','wp-recaptcha-integration'), __('ReCaptcha','wp-recaptcha-integration'),
|
738 |
+
'manage_options', 'recaptcha',
|
739 |
+
array($this,'render_options_page')
|
740 |
);
|
741 |
+
|
742 |
+
add_action( "load-$page_slug" , array( $this , 'enqueue_styles' ) );
|
743 |
}
|
744 |
|
745 |
/**
|
746 |
* Enqueue script and css for options page.
|
747 |
*/
|
748 |
public function enqueue_styles() {
|
749 |
+
$suffix = WP_DEBUG ? '' : '.min';
|
750 |
+
wp_enqueue_style( 'recaptcha-options' , plugins_url( "css/recaptcha-options{$suffix}.css" , dirname(__FILE__)) );
|
751 |
+
wp_enqueue_script( 'recaptcha-options' , plugins_url( "js/recaptcha-options{$suffix}.js" , dirname(__FILE__)) , array( 'jquery' ) );
|
752 |
+
remove_action('admin_notices',array( $this , 'api_key_notice'));
|
753 |
}
|
754 |
/**
|
755 |
* Rendering the options page
|
756 |
*/
|
757 |
public function render_options_page() {
|
758 |
+
?><div class="wrap"><?php
|
759 |
+
?><h2><?php /*icon*/
|
|
|
760 |
_e('Settings');
|
761 |
+
echo ' › ';
|
762 |
+
_e( 'ReCaptcha' , 'wp-recaptcha-integration' );
|
763 |
?></h2><?php
|
764 |
/* ?><p><?php _e( '...' , 'googlefont' ); ?></p><?php */
|
765 |
?><form action="options.php" method="post"><?php
|
766 |
settings_fields( 'recaptcha_options' );
|
767 |
+
do_settings_sections( 'recaptcha' );
|
768 |
submit_button( null , 'primary' , null, null, array('autocomplete'=>'off'));
|
769 |
?></form><?php
|
770 |
?></div><?php
|
771 |
}
|
|
|
|
|
|
|
772 |
|
773 |
+
}
|
inc/class-wp_recaptcha_recaptcha.php
DELETED
@@ -1,201 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class to manage the recaptcha options.
|
7 |
-
*/
|
8 |
-
class WP_reCaptcha_ReCaptcha extends WP_reCaptcha_Captcha {
|
9 |
-
|
10 |
-
protected $supported_languages = array(
|
11 |
-
'en' => 'English',
|
12 |
-
'nl' => 'Dutch',
|
13 |
-
'fr' => 'French',
|
14 |
-
'de' => 'German',
|
15 |
-
'pt' => 'Portuguese',
|
16 |
-
'ru' => 'Russian',
|
17 |
-
'es' => 'Spanish',
|
18 |
-
'tr' => 'Turkish',
|
19 |
-
);
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Holding the singleton instance
|
23 |
-
*/
|
24 |
-
private static $_instance = null;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @return WP_reCaptcha_Options The options manager instance
|
28 |
-
*/
|
29 |
-
public static function instance(){
|
30 |
-
if ( is_null( self::$_instance ) )
|
31 |
-
self::$_instance = new self();
|
32 |
-
return self::$_instance;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Prevent from creating more than one instance
|
37 |
-
*/
|
38 |
-
private function __clone() {
|
39 |
-
}
|
40 |
-
/**
|
41 |
-
* Prevent from creating more than one instance
|
42 |
-
*/
|
43 |
-
private function __construct() {
|
44 |
-
if ( ! defined( 'RECAPTCHA_API_SERVER' ) || ! function_exists( 'recaptcha_get_html' ) )
|
45 |
-
require_once dirname(__FILE__).'/recaptchalib.php';
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* @inheritdoc
|
50 |
-
*/
|
51 |
-
public function get_supported_themes() {
|
52 |
-
return array(
|
53 |
-
'red' => array(
|
54 |
-
'label' => __('Red','wp-recaptcha-integration') ,
|
55 |
-
),
|
56 |
-
'white' => array(
|
57 |
-
'label' => __('White','wp-recaptcha-integration') ,
|
58 |
-
),
|
59 |
-
'blackglass' => array(
|
60 |
-
'label' => __('Black Glass','wp-recaptcha-integration') ,
|
61 |
-
),
|
62 |
-
'clean' => array(
|
63 |
-
'label' => __('Clean','wp-recaptcha-integration') ,
|
64 |
-
),
|
65 |
-
'custom' => array(
|
66 |
-
'label' => __('Custom','wp-recaptcha-integration') ,
|
67 |
-
),
|
68 |
-
);
|
69 |
-
}
|
70 |
-
/**
|
71 |
-
* @inheritdoc
|
72 |
-
*/
|
73 |
-
public function print_login_head() {
|
74 |
-
?><style type="text/css">
|
75 |
-
#login {
|
76 |
-
width:360px !important;
|
77 |
-
}
|
78 |
-
</style><?php
|
79 |
-
}
|
80 |
-
/**
|
81 |
-
* @inheritdoc
|
82 |
-
*/
|
83 |
-
public function print_head() {
|
84 |
-
$recaptcha_theme = WP_reCaptcha::instance()->get_option('recaptcha_theme');
|
85 |
-
if ( $recaptcha_theme == 'custom' ) {
|
86 |
-
?><script type="text/javascript">
|
87 |
-
var RecaptchaOptions = {
|
88 |
-
theme : '<?php echo $recaptcha_theme ?>',
|
89 |
-
custom_theme_widget: 'recaptcha_widget'
|
90 |
-
};
|
91 |
-
</script><?php
|
92 |
-
} else {
|
93 |
-
?><script type="text/javascript">
|
94 |
-
var RecaptchaOptions = {
|
95 |
-
<?php
|
96 |
-
$language_code = apply_filters( 'wp_recaptcha_language' , WP_reCaptcha::instance()->get_option( 'recaptcha_language' ) );
|
97 |
-
if ( $language_code ) { ?>
|
98 |
-
lang : '<?php echo $language_code ?>',
|
99 |
-
<?php } ?>
|
100 |
-
theme : '<?php echo $recaptcha_theme ?>'
|
101 |
-
|
102 |
-
};
|
103 |
-
</script><?php
|
104 |
-
}
|
105 |
-
}
|
106 |
-
/**
|
107 |
-
* @inheritdoc
|
108 |
-
*/
|
109 |
-
public function print_foot() {
|
110 |
-
if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) {
|
111 |
-
|
112 |
-
?><script type="text/javascript">
|
113 |
-
document.addEventListener('keyup',function(e){
|
114 |
-
if (e.target && typeof e.target.getAttribute=='function' && e.target.getAttribute('ID')=='recaptcha_response_field') {
|
115 |
-
get_form_submits(e.target).setEnabled(!!e.target.value);
|
116 |
-
}
|
117 |
-
});
|
118 |
-
document.addEventListener('DOMContentLoaded',function(e){
|
119 |
-
try {
|
120 |
-
get_form_submits(document.getElementById('wp-recaptcha-integration-marker')).setEnabled(false);
|
121 |
-
} catch(e){};
|
122 |
-
});
|
123 |
-
</script><?php
|
124 |
-
}
|
125 |
-
}
|
126 |
-
/**
|
127 |
-
* @inheritdoc
|
128 |
-
*/
|
129 |
-
public function get_html( $attr = array() ) {
|
130 |
-
$public_key = WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' );
|
131 |
-
$recaptcha_theme = WP_reCaptcha::instance()->get_option('recaptcha_theme');
|
132 |
-
|
133 |
-
if ($recaptcha_theme == 'custom')
|
134 |
-
$return = $this->get_custom_html( $public_key );
|
135 |
-
else
|
136 |
-
$return = recaptcha_get_html( $public_key, $this->last_error );
|
137 |
-
if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) {
|
138 |
-
$return .= '<span id="wp-recaptcha-integration-marker"></span>';
|
139 |
-
}
|
140 |
-
return $return;
|
141 |
-
}
|
142 |
-
/**
|
143 |
-
* @inheritdoc
|
144 |
-
*/
|
145 |
-
public function check() {
|
146 |
-
if ( ! $this->_last_result ) {
|
147 |
-
$private_key = WP_reCaptcha::instance()->get_option( 'recaptcha_privatekey' );
|
148 |
-
$this->_last_result = recaptcha_check_answer( $private_key,
|
149 |
-
$_SERVER["REMOTE_ADDR"],
|
150 |
-
$_POST["recaptcha_challenge_field"],
|
151 |
-
$_POST["recaptcha_response_field"]);
|
152 |
-
|
153 |
-
if ( ! $this->_last_result->is_valid )
|
154 |
-
$this->last_error = $this->_last_result->error;
|
155 |
-
}
|
156 |
-
do_action( 'wp_recaptcha_checked' , $this->_last_result->is_valid );
|
157 |
-
return $this->_last_result->is_valid;
|
158 |
-
}
|
159 |
-
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Get un-themed old style recaptcha HTML.
|
163 |
-
* @return string recaptcha html
|
164 |
-
*/
|
165 |
-
private function get_custom_html( $public_key ) {
|
166 |
-
|
167 |
-
$return = '<div id="recaptcha_widget" style="display:none">';
|
168 |
-
|
169 |
-
$return .= '<div id="recaptcha_image"></div>';
|
170 |
-
$return .= sprintf('<div class="recaptcha_only_if_incorrect_sol" style="color:red">%s</div>',__('Incorrect please try again','wp-recaptcha-integration'));
|
171 |
-
|
172 |
-
$return .= sprintf('<span class="recaptcha_only_if_image">%s</span>',__('Enter the words above:','wp-recaptcha-integration'));
|
173 |
-
$return .= sprintf('<span class="recaptcha_only_if_audio">%s</span>',__('Enter the numbers you hear:','wp-recaptcha-integration'));
|
174 |
-
|
175 |
-
$return .= '<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />';
|
176 |
-
|
177 |
-
$return .= sprintf('<div><a href="javascript:Recaptcha.reload()"></a></div>',__('Get another CAPTCHA','wp-recaptcha-integration'));
|
178 |
-
$return .= sprintf('<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type(\'audio\')">%s</a></div>',__('Get an audio CAPTCHA','wp-recaptcha-integration'));
|
179 |
-
$return .= sprintf('<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type(\'image\')">%s</a></div>',__('Get an image CAPTCHA','wp-recaptcha-integration'));
|
180 |
-
|
181 |
-
$return .= '<div><a href="javascript:Recaptcha.showhelp()">Help</a></div>';
|
182 |
-
$return .= '</div>';
|
183 |
-
|
184 |
-
$return .= sprintf('<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=%s"></script>',$public_key);
|
185 |
-
$return .= '<noscript>';
|
186 |
-
$return .= sprintf('<iframe src="http://www.google.com/recaptcha/api/noscript?k=%s" height="300" width="500" frameborder="0"></iframe><br>',$public_key);
|
187 |
-
$return .= '<textarea name="recaptcha_challenge_field" rows="3" cols="40">';
|
188 |
-
$return .= '</textarea>';
|
189 |
-
$return .= '<input type="hidden" name="recaptcha_response_field" value="manual_challenge">';
|
190 |
-
$return .= '</noscript>';
|
191 |
-
|
192 |
-
return $return;
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
}
|
198 |
-
|
199 |
-
|
200 |
-
WP_reCaptcha_Options::instance();
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-wp_recaptcha_woocommerce.php
CHANGED
@@ -45,7 +45,7 @@ class WP_reCaptcha_WooCommerce {
|
|
45 |
$enable_lostpw = $wp_recaptcha->get_option('recaptcha_enable_lostpw');
|
46 |
if ( $require_recaptcha ) {
|
47 |
// WooCommerce support
|
48 |
-
if (
|
49 |
if ( $enable_order ) {
|
50 |
add_action('woocommerce_review_order_before_submit' , array($wp_recaptcha,'print_recaptcha_html'),10,0);
|
51 |
add_action('woocommerce_checkout_process', array( &$this , 'recaptcha_check' ) );
|
@@ -58,7 +58,16 @@ class WP_reCaptcha_WooCommerce {
|
|
58 |
add_filter('woocommerce_process_login_errors', array( &$this , 'login_errors' ) , 10 , 3 );
|
59 |
}
|
60 |
if ( $enable_signup ) {
|
61 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
add_filter('woocommerce_registration_errors', array( &$this , 'login_errors' ) , 10 , 3 );
|
63 |
// if ( ! $enable_order )
|
64 |
// add_filter('woocommerce_checkout_fields', array( &$this , 'checkout_fields' ) , 10 , 3 );
|
@@ -70,9 +79,68 @@ class WP_reCaptcha_WooCommerce {
|
|
70 |
if ( $enable_lostpw ) {
|
71 |
add_action( 'woocommerce_lostpassword_form' , array($wp_recaptcha,'print_recaptcha_html'),10,0);
|
72 |
}
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
}
|
75 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
/*
|
77 |
function checkout_fields( $checkout_fields ) {
|
78 |
$checkout_fields['account']['recaptcha'] = array(
|
@@ -87,20 +155,20 @@ class WP_reCaptcha_WooCommerce {
|
|
87 |
* hooks into action `woocommerce_checkout_process`
|
88 |
*/
|
89 |
function recaptcha_check() {
|
90 |
-
if ( ! WP_reCaptcha::instance()->recaptcha_check() )
|
91 |
wc_add_notice( __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration'), 'error' );
|
92 |
}
|
93 |
-
|
94 |
/**
|
95 |
* WooCommerce recaptcha Check
|
96 |
* hooks into actions `woocommerce_process_login_errors` and `woocommerce_registration_errors`
|
97 |
*/
|
98 |
function login_errors( $validation_error ) {
|
99 |
-
if ( ! WP_reCaptcha::instance()->recaptcha_check() )
|
100 |
$validation_error->add( 'captcha_error' , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
101 |
return $validation_error;
|
102 |
}
|
103 |
-
|
104 |
/**
|
105 |
* WooCommerce recaptcha Check
|
106 |
* hooks into actions `woocommerce_process_login_errors` and `woocommerce_registration_errors`
|
@@ -111,5 +179,3 @@ class WP_reCaptcha_WooCommerce {
|
|
111 |
return $enabled;
|
112 |
}
|
113 |
}
|
114 |
-
|
115 |
-
|
45 |
$enable_lostpw = $wp_recaptcha->get_option('recaptcha_enable_lostpw');
|
46 |
if ( $require_recaptcha ) {
|
47 |
// WooCommerce support
|
48 |
+
if ( function_exists( 'wc_add_notice' ) ) {
|
49 |
if ( $enable_order ) {
|
50 |
add_action('woocommerce_review_order_before_submit' , array($wp_recaptcha,'print_recaptcha_html'),10,0);
|
51 |
add_action('woocommerce_checkout_process', array( &$this , 'recaptcha_check' ) );
|
58 |
add_filter('woocommerce_process_login_errors', array( &$this , 'login_errors' ) , 10 , 3 );
|
59 |
}
|
60 |
if ( $enable_signup ) {
|
61 |
+
// Injects recaptcha in Register for WooCommerce >= 3.0
|
62 |
+
// For WooCommerce < 3.0 displaying the captcha at hook 'registration_form' already done by core plugin
|
63 |
+
if ( class_exists( 'WooCommerce' ) ) {
|
64 |
+
global $woocommerce;
|
65 |
+
if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
|
66 |
+
add_action('woocommerce_register_form' , array($wp_recaptcha,'print_recaptcha_html'),10,0);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
add_filter('woocommerce_registration_errors', array( &$this , 'login_errors' ) , 10 , 3 );
|
72 |
// if ( ! $enable_order )
|
73 |
// add_filter('woocommerce_checkout_fields', array( &$this , 'checkout_fields' ) , 10 , 3 );
|
79 |
if ( $enable_lostpw ) {
|
80 |
add_action( 'woocommerce_lostpassword_form' , array($wp_recaptcha,'print_recaptcha_html'),10,0);
|
81 |
}
|
82 |
+
if( version_compare( WC()->version , '2.4.0' ) === -1 ){
|
83 |
+
add_filter( 'woocommerce_locate_template', array($this,'locate_template'), 10, 3 );
|
84 |
+
|
85 |
+
}
|
86 |
}
|
87 |
}
|
88 |
}
|
89 |
+
function plugin_path() {
|
90 |
+
|
91 |
+
// gets the absolute path to this plugin directory
|
92 |
+
|
93 |
+
return untrailingslashit( plugin_dir_path( __FILE__ ) );
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
function locate_template( $template, $template_name, $template_path ) {
|
98 |
+
|
99 |
+
global $woocommerce;
|
100 |
+
|
101 |
+
|
102 |
+
$_template = $template;
|
103 |
+
|
104 |
+
if ( ! $template_path )
|
105 |
+
$template_path = $woocommerce->template_url;
|
106 |
+
|
107 |
+
$plugin_path = $this->plugin_path() . '/woocommerce/';
|
108 |
+
|
109 |
+
|
110 |
+
// Look within passed path within the theme - this is priority
|
111 |
+
|
112 |
+
$template = locate_template(
|
113 |
+
|
114 |
+
array(
|
115 |
+
|
116 |
+
$template_path . $template_name,
|
117 |
+
|
118 |
+
$template_name
|
119 |
+
|
120 |
+
)
|
121 |
+
|
122 |
+
);
|
123 |
+
|
124 |
+
|
125 |
+
// Modification: Get the template from this plugin, if it exists
|
126 |
+
|
127 |
+
if ( ! $template && file_exists( $plugin_path . $template_name ) )
|
128 |
+
|
129 |
+
$template = $plugin_path . $template_name;
|
130 |
+
|
131 |
+
|
132 |
+
// Use default template
|
133 |
+
|
134 |
+
if ( ! $template )
|
135 |
+
|
136 |
+
$template = $_template;
|
137 |
+
|
138 |
+
|
139 |
+
// Return what we found
|
140 |
+
|
141 |
+
return $template;
|
142 |
+
|
143 |
+
}
|
144 |
/*
|
145 |
function checkout_fields( $checkout_fields ) {
|
146 |
$checkout_fields['account']['recaptcha'] = array(
|
155 |
* hooks into action `woocommerce_checkout_process`
|
156 |
*/
|
157 |
function recaptcha_check() {
|
158 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() )
|
159 |
wc_add_notice( __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration'), 'error' );
|
160 |
}
|
161 |
+
|
162 |
/**
|
163 |
* WooCommerce recaptcha Check
|
164 |
* hooks into actions `woocommerce_process_login_errors` and `woocommerce_registration_errors`
|
165 |
*/
|
166 |
function login_errors( $validation_error ) {
|
167 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() )
|
168 |
$validation_error->add( 'captcha_error' , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
169 |
return $validation_error;
|
170 |
}
|
171 |
+
|
172 |
/**
|
173 |
* WooCommerce recaptcha Check
|
174 |
* hooks into actions `woocommerce_process_login_errors` and `woocommerce_registration_errors`
|
179 |
return $enabled;
|
180 |
}
|
181 |
}
|
|
|
|
inc/recaptchalib.php
DELETED
@@ -1,277 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* This is a PHP library that handles calling reCAPTCHA.
|
4 |
-
* - Documentation and latest version
|
5 |
-
* http://recaptcha.net/plugins/php/
|
6 |
-
* - Get a reCAPTCHA API Key
|
7 |
-
* https://www.google.com/recaptcha/admin/create
|
8 |
-
* - Discussion group
|
9 |
-
* http://groups.google.com/group/recaptcha
|
10 |
-
*
|
11 |
-
* Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
|
12 |
-
* AUTHORS:
|
13 |
-
* Mike Crawford
|
14 |
-
* Ben Maurer
|
15 |
-
*
|
16 |
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
17 |
-
* of this software and associated documentation files (the "Software"), to deal
|
18 |
-
* in the Software without restriction, including without limitation the rights
|
19 |
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
20 |
-
* copies of the Software, and to permit persons to whom the Software is
|
21 |
-
* furnished to do so, subject to the following conditions:
|
22 |
-
*
|
23 |
-
* The above copyright notice and this permission notice shall be included in
|
24 |
-
* all copies or substantial portions of the Software.
|
25 |
-
*
|
26 |
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
27 |
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
28 |
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
29 |
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
30 |
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
31 |
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
32 |
-
* THE SOFTWARE.
|
33 |
-
*/
|
34 |
-
|
35 |
-
/**
|
36 |
-
* The reCAPTCHA server URL's
|
37 |
-
*/
|
38 |
-
define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
|
39 |
-
define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
|
40 |
-
define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Encodes the given data into a query string format
|
44 |
-
* @param $data - array of string elements to be encoded
|
45 |
-
* @return string - encoded request
|
46 |
-
*/
|
47 |
-
function _recaptcha_qsencode ($data) {
|
48 |
-
$req = "";
|
49 |
-
foreach ( $data as $key => $value )
|
50 |
-
$req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
|
51 |
-
|
52 |
-
// Cut the last '&'
|
53 |
-
$req=substr($req,0,strlen($req)-1);
|
54 |
-
return $req;
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Submits an HTTP POST to a reCAPTCHA server
|
61 |
-
* @param string $host
|
62 |
-
* @param string $path
|
63 |
-
* @param array $data
|
64 |
-
* @param int port
|
65 |
-
* @return array response
|
66 |
-
*/
|
67 |
-
function _recaptcha_http_post($host, $path, $data, $port = 80) {
|
68 |
-
|
69 |
-
$req = _recaptcha_qsencode ($data);
|
70 |
-
|
71 |
-
$http_request = "POST $path HTTP/1.0\r\n";
|
72 |
-
$http_request .= "Host: $host\r\n";
|
73 |
-
$http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
|
74 |
-
$http_request .= "Content-Length: " . strlen($req) . "\r\n";
|
75 |
-
$http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
|
76 |
-
$http_request .= "\r\n";
|
77 |
-
$http_request .= $req;
|
78 |
-
|
79 |
-
$response = '';
|
80 |
-
if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
|
81 |
-
die ('Could not open socket');
|
82 |
-
}
|
83 |
-
|
84 |
-
fwrite($fs, $http_request);
|
85 |
-
|
86 |
-
while ( !feof($fs) )
|
87 |
-
$response .= fgets($fs, 1160); // One TCP-IP packet
|
88 |
-
fclose($fs);
|
89 |
-
$response = explode("\r\n\r\n", $response, 2);
|
90 |
-
|
91 |
-
return $response;
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Gets the challenge HTML (javascript and non-javascript version).
|
98 |
-
* This is called from the browser, and the resulting reCAPTCHA HTML widget
|
99 |
-
* is embedded within the HTML form it was called from.
|
100 |
-
* @param string $pubkey A public key for reCAPTCHA
|
101 |
-
* @param string $error The error given by reCAPTCHA (optional, default is null)
|
102 |
-
* @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
|
103 |
-
|
104 |
-
* @return string - The HTML to be embedded in the user's form.
|
105 |
-
*/
|
106 |
-
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
|
107 |
-
{
|
108 |
-
if ($pubkey == null || $pubkey == '') {
|
109 |
-
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
|
110 |
-
}
|
111 |
-
|
112 |
-
if ($use_ssl) {
|
113 |
-
$server = RECAPTCHA_API_SECURE_SERVER;
|
114 |
-
} else {
|
115 |
-
$server = RECAPTCHA_API_SERVER;
|
116 |
-
}
|
117 |
-
|
118 |
-
$errorpart = "";
|
119 |
-
if ($error) {
|
120 |
-
$errorpart = "&error=" . $error;
|
121 |
-
}
|
122 |
-
return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
|
123 |
-
|
124 |
-
<noscript>
|
125 |
-
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
|
126 |
-
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
|
127 |
-
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
|
128 |
-
</noscript>';
|
129 |
-
}
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
/**
|
135 |
-
* A ReCaptchaResponse is returned from recaptcha_check_answer()
|
136 |
-
*/
|
137 |
-
class ReCaptchaResponse {
|
138 |
-
var $is_valid;
|
139 |
-
var $error;
|
140 |
-
}
|
141 |
-
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Calls an HTTP POST function to verify if the user's guess was correct
|
145 |
-
* @param string $privkey
|
146 |
-
* @param string $remoteip
|
147 |
-
* @param string $challenge
|
148 |
-
* @param string $response
|
149 |
-
* @param array $extra_params an array of extra variables to post to the server
|
150 |
-
* @return ReCaptchaResponse
|
151 |
-
*/
|
152 |
-
function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
|
153 |
-
{
|
154 |
-
if ($privkey == null || $privkey == '') {
|
155 |
-
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
|
156 |
-
}
|
157 |
-
|
158 |
-
if ($remoteip == null || $remoteip == '') {
|
159 |
-
die ("For security reasons, you must pass the remote ip to reCAPTCHA");
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
//discard spam submissions
|
165 |
-
if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
|
166 |
-
$recaptcha_response = new ReCaptchaResponse();
|
167 |
-
$recaptcha_response->is_valid = false;
|
168 |
-
$recaptcha_response->error = 'incorrect-captcha-sol';
|
169 |
-
return $recaptcha_response;
|
170 |
-
}
|
171 |
-
|
172 |
-
$response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
|
173 |
-
array (
|
174 |
-
'privatekey' => $privkey,
|
175 |
-
'remoteip' => $remoteip,
|
176 |
-
'challenge' => $challenge,
|
177 |
-
'response' => $response
|
178 |
-
) + $extra_params
|
179 |
-
);
|
180 |
-
|
181 |
-
$answers = explode ("\n", $response [1]);
|
182 |
-
$recaptcha_response = new ReCaptchaResponse();
|
183 |
-
|
184 |
-
if (trim ($answers [0]) == 'true') {
|
185 |
-
$recaptcha_response->is_valid = true;
|
186 |
-
}
|
187 |
-
else {
|
188 |
-
$recaptcha_response->is_valid = false;
|
189 |
-
$recaptcha_response->error = $answers [1];
|
190 |
-
}
|
191 |
-
return $recaptcha_response;
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* gets a URL where the user can sign up for reCAPTCHA. If your application
|
197 |
-
* has a configuration page where you enter a key, you should provide a link
|
198 |
-
* using this function.
|
199 |
-
* @param string $domain The domain where the page is hosted
|
200 |
-
* @param string $appname The name of your application
|
201 |
-
*/
|
202 |
-
function recaptcha_get_signup_url ($domain = null, $appname = null) {
|
203 |
-
return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
|
204 |
-
}
|
205 |
-
|
206 |
-
function _recaptcha_aes_pad($val) {
|
207 |
-
$block_size = 16;
|
208 |
-
$numpad = $block_size - (strlen ($val) % $block_size);
|
209 |
-
return str_pad($val, strlen ($val) + $numpad, chr($numpad));
|
210 |
-
}
|
211 |
-
|
212 |
-
/* Mailhide related code */
|
213 |
-
|
214 |
-
function _recaptcha_aes_encrypt($val,$ky) {
|
215 |
-
if (! function_exists ("mcrypt_encrypt")) {
|
216 |
-
die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
|
217 |
-
}
|
218 |
-
$mode=MCRYPT_MODE_CBC;
|
219 |
-
$enc=MCRYPT_RIJNDAEL_128;
|
220 |
-
$val=_recaptcha_aes_pad($val);
|
221 |
-
return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
|
222 |
-
}
|
223 |
-
|
224 |
-
|
225 |
-
function _recaptcha_mailhide_urlbase64 ($x) {
|
226 |
-
return strtr(base64_encode ($x), '+/', '-_');
|
227 |
-
}
|
228 |
-
|
229 |
-
/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
|
230 |
-
function recaptcha_mailhide_url($pubkey, $privkey, $email) {
|
231 |
-
if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
|
232 |
-
die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
|
233 |
-
"you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
|
234 |
-
}
|
235 |
-
|
236 |
-
|
237 |
-
$ky = pack('H*', $privkey);
|
238 |
-
$cryptmail = _recaptcha_aes_encrypt ($email, $ky);
|
239 |
-
|
240 |
-
return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* gets the parts of the email to expose to the user.
|
245 |
-
* eg, given johndoe@example,com return ["john", "example.com"].
|
246 |
-
* the email is then displayed as john...@example.com
|
247 |
-
*/
|
248 |
-
function _recaptcha_mailhide_email_parts ($email) {
|
249 |
-
$arr = preg_split("/@/", $email );
|
250 |
-
|
251 |
-
if (strlen ($arr[0]) <= 4) {
|
252 |
-
$arr[0] = substr ($arr[0], 0, 1);
|
253 |
-
} else if (strlen ($arr[0]) <= 6) {
|
254 |
-
$arr[0] = substr ($arr[0], 0, 3);
|
255 |
-
} else {
|
256 |
-
$arr[0] = substr ($arr[0], 0, 4);
|
257 |
-
}
|
258 |
-
return $arr;
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Gets html to display an email address given a public an private key.
|
263 |
-
* to get a key, go to:
|
264 |
-
*
|
265 |
-
* http://www.google.com/recaptcha/mailhide/apikey
|
266 |
-
*/
|
267 |
-
function recaptcha_mailhide_html($pubkey, $privkey, $email) {
|
268 |
-
$emailparts = _recaptcha_mailhide_email_parts ($email);
|
269 |
-
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
|
270 |
-
|
271 |
-
return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
|
272 |
-
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
|
273 |
-
|
274 |
-
}
|
275 |
-
|
276 |
-
|
277 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Lost password form
|
4 |
+
*
|
5 |
+
* @author WooThemes
|
6 |
+
* @package WooCommerce/Templates
|
7 |
+
* @version 2.3.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit; // Exit if accessed directly
|
12 |
+
}
|
13 |
+
|
14 |
+
?>
|
15 |
+
<?php wc_print_notices(); ?>
|
16 |
+
|
17 |
+
<form method="post" class="lost_reset_password">
|
18 |
+
|
19 |
+
<?php if( 'lost_password' == $args['form'] ) : ?>
|
20 |
+
|
21 |
+
<p><?php echo apply_filters( 'woocommerce_lost_password_message', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'woocommerce' ) ); ?></p>
|
22 |
+
|
23 |
+
<p class="form-row form-row-first"><label for="user_login"><?php _e( 'Username or email', 'woocommerce' ); ?></label> <input class="input-text" type="text" name="user_login" id="user_login" /></p>
|
24 |
+
|
25 |
+
<?php else : ?>
|
26 |
+
|
27 |
+
<p><?php echo apply_filters( 'woocommerce_reset_password_message', __( 'Enter a new password below.', 'woocommerce') ); ?></p>
|
28 |
+
|
29 |
+
<p class="form-row form-row-first">
|
30 |
+
<label for="password_1"><?php _e( 'New password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
31 |
+
<input type="password" class="input-text" name="password_1" id="password_1" />
|
32 |
+
</p>
|
33 |
+
<p class="form-row form-row-last">
|
34 |
+
<label for="password_2"><?php _e( 'Re-enter new password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
35 |
+
<input type="password" class="input-text" name="password_2" id="password_2" />
|
36 |
+
</p>
|
37 |
+
|
38 |
+
<input type="hidden" name="reset_key" value="<?php echo isset( $args['key'] ) ? $args['key'] : ''; ?>" />
|
39 |
+
<input type="hidden" name="reset_login" value="<?php echo isset( $args['login'] ) ? $args['login'] : ''; ?>" />
|
40 |
+
|
41 |
+
<?php endif; ?>
|
42 |
+
|
43 |
+
<div class="clear"></div>
|
44 |
+
<?php do_action( 'woocommerce_lostpassword_form' ); ?>
|
45 |
+
|
46 |
+
<p class="form-row">
|
47 |
+
<input type="hidden" name="wc_reset_password" value="true" />
|
48 |
+
|
49 |
+
<input type="submit" class="button" value="<?php echo 'lost_password' == $args['form'] ? __( 'Reset Password', 'woocommerce' ) : __( 'Save', 'woocommerce' ); ?>" />
|
50 |
+
</p>
|
51 |
+
|
52 |
+
<?php wp_nonce_field( $args['form'] ); ?>
|
53 |
+
|
54 |
+
</form>
|
js/recaptcha-options.js
CHANGED
@@ -1,15 +1,9 @@
|
|
1 |
(function($){
|
2 |
-
$(document).
|
3 |
-
$('[name="
|
|
|
4 |
});
|
5 |
-
|
6 |
-
$(this).closest('.wrap')
|
7 |
-
.removeClass('flavor-recaptcha')
|
8 |
-
.removeClass('flavor-grecaptcha')
|
9 |
-
.addClass('flavor-'+$(this).val());
|
10 |
-
});
|
11 |
-
|
12 |
-
|
13 |
$(document).on('click','#test-api-key' , function(e){
|
14 |
if ( ! $('#recaptcha-test-head').length )
|
15 |
$(this).closest('div').append('<div id="recaptcha-test-head" />');
|
@@ -18,7 +12,7 @@
|
|
18 |
|
19 |
if ( ! $('#recaptcha-test-head').html() )
|
20 |
$('#recaptcha-test-head').load( $(this).data('init-href') );
|
21 |
-
|
22 |
$('#recaptcha-test-result').load( $(this).prop('href') );
|
23 |
e.preventDefault();
|
24 |
e.stopPropagation();
|
@@ -33,15 +27,15 @@
|
|
33 |
'g-recaptcha-response' : $('.g-recaptcha-response:first').val()
|
34 |
};
|
35 |
$('#recaptcha-test-result').addClass('loading').html('<span class="spinner"></span>');
|
36 |
-
$.post( ajaxurl ,
|
37 |
-
data ,
|
38 |
function(response) {
|
39 |
$('#recaptcha-test-result').html(response);
|
40 |
$('#test-api-key').show();
|
41 |
});
|
42 |
-
|
43 |
e.preventDefault();
|
44 |
e.stopPropagation();
|
45 |
return false;
|
46 |
});
|
47 |
-
})(jQuery);
|
1 |
(function($){
|
2 |
+
$(document).on('change','[name="recaptcha_theme"],[name="recaptcha_size"]',function(e){
|
3 |
+
$('.recaptcha-preview').attr('data-size',$('[name="recaptcha_size"]:checked').first().val())
|
4 |
+
$('.recaptcha-preview').attr('data-theme',$('[name="recaptcha_theme"]:checked').first().val())
|
5 |
});
|
6 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
$(document).on('click','#test-api-key' , function(e){
|
8 |
if ( ! $('#recaptcha-test-head').length )
|
9 |
$(this).closest('div').append('<div id="recaptcha-test-head" />');
|
12 |
|
13 |
if ( ! $('#recaptcha-test-head').html() )
|
14 |
$('#recaptcha-test-head').load( $(this).data('init-href') );
|
15 |
+
|
16 |
$('#recaptcha-test-result').load( $(this).prop('href') );
|
17 |
e.preventDefault();
|
18 |
e.stopPropagation();
|
27 |
'g-recaptcha-response' : $('.g-recaptcha-response:first').val()
|
28 |
};
|
29 |
$('#recaptcha-test-result').addClass('loading').html('<span class="spinner"></span>');
|
30 |
+
$.post( ajaxurl ,
|
31 |
+
data ,
|
32 |
function(response) {
|
33 |
$('#recaptcha-test-result').html(response);
|
34 |
$('#test-api-key').show();
|
35 |
});
|
36 |
+
|
37 |
e.preventDefault();
|
38 |
e.stopPropagation();
|
39 |
return false;
|
40 |
});
|
41 |
+
})(jQuery);
|
js/recaptcha-options.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
!function(t){t(document).on("change",'[name="recaptcha_theme"],[name="recaptcha_size"]',function(e){t(".recaptcha-preview").attr("data-size",t('[name="recaptcha_size"]:checked').first().val()),t(".recaptcha-preview").attr("data-theme",t('[name="recaptcha_theme"]:checked').first().val())}),t(document).on("click","#test-api-key",function(e){return t("#recaptcha-test-head").length||t(this).closest("div").append('<div id="recaptcha-test-head" />'),t("#recaptcha-test-result").length||t(this).closest("div").append('<div id="recaptcha-test-result" />'),t("#recaptcha-test-head").html()||t("#recaptcha-test-head").load(t(this).data("init-href")),t("#recaptcha-test-result").load(t(this).prop("href")),e.preventDefault(),e.stopPropagation(),t(this).hide(),!1}),t(document).on("click","#recaptcha-test-verification",function(e){var a={action:"recaptcha-test-verification",_wpnonce:t('[name="recaptcha-test-verification-nonce"]').val(),"g-recaptcha-response":t(".g-recaptcha-response:first").val()};return t("#recaptcha-test-result").addClass("loading").html('<span class="spinner"></span>'),t.post(ajaxurl,a,function(e){t("#recaptcha-test-result").html(e),t("#test-api-key").show()}),e.preventDefault(),e.stopPropagation(),!1})}(jQuery);
|
2 |
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlY2FwdGNoYS1vcHRpb25zLmpzIl0sIm5hbWVzIjpbIiQiLCJkb2N1bWVudCIsIm9uIiwiZSIsImF0dHIiLCJmaXJzdCIsInZhbCIsImxlbmd0aCIsInRoaXMiLCJjbG9zZXN0IiwiYXBwZW5kIiwiaHRtbCIsImxvYWQiLCJkYXRhIiwicHJvcCIsInByZXZlbnREZWZhdWx0Iiwic3RvcFByb3BhZ2F0aW9uIiwiaGlkZSIsImFjdGlvbiIsIl93cG5vbmNlIiwiZy1yZWNhcHRjaGEtcmVzcG9uc2UiLCJhZGRDbGFzcyIsInBvc3QiLCJhamF4dXJsIiwicmVzcG9uc2UiLCJzaG93IiwialF1ZXJ5Il0sIm1hcHBpbmdzIjoiQ0FBQSxTQUFVQSxHQUNUQSxFQUFFQyxVQUFVQyxHQUFHLFNBQVMsbURBQW1ELFNBQVNDLEdBQ25GSCxFQUFFLHNCQUFzQkksS0FBSyxZQUFZSixFQUFFLG1DQUFtQ0ssUUFBUUMsT0FDdEZOLEVBQUUsc0JBQXNCSSxLQUFLLGFBQWFKLEVBQUUsb0NBQW9DSyxRQUFRQyxTQUd6Rk4sRUFBRUMsVUFBVUMsR0FBRyxRQUFRLGdCQUFrQixTQUFTQyxHQWNqRCxNQWJPSCxHQUFFLHdCQUF3Qk8sUUFDaENQLE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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
var $captchas = $('.wp-recaptcha'),
|
3 |
+
$other_captchas = $('.g-recaptcha'),
|
4 |
+
loadedInterval;
|
5 |
+
|
6 |
+
function init() {
|
7 |
+
$other_captchas.removeClass('g-recaptcha');
|
8 |
+
$captchas = $('.wp-recaptcha').addClass('g-recaptcha');
|
9 |
+
|
10 |
+
$('<script></script>')
|
11 |
+
.attr( 'src', wp_recaptcha.recaptcha_url )
|
12 |
+
.appendTo('body');
|
13 |
+
}
|
14 |
+
|
15 |
+
window.wp_recaptcha_loaded = function(){
|
16 |
+
if ( ! grecaptcha ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
$captchas.each(function(i,el){
|
21 |
+
var $form = $(el).closest('form');
|
22 |
+
var opts = {
|
23 |
+
sitekey : wp_recaptcha.site_key,
|
24 |
+
theme : $(el).attr('data-theme'),
|
25 |
+
size : $(el).attr('data-size'),
|
26 |
+
},
|
27 |
+
cb = $(el).attr('data-callback'),
|
28 |
+
submitInterval;
|
29 |
+
|
30 |
+
if ( cb !== '' ) {
|
31 |
+
|
32 |
+
opts.callback = function() {
|
33 |
+
$form.find('[type="submit"]').prop( 'disabled', false );
|
34 |
+
};
|
35 |
+
opts.expiredCallback = function() {
|
36 |
+
$form.find('[type="submit"]').prop( 'disabled', true );
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! $form.find('[type="submit"]').prop( 'disabled', true ).length ) {
|
40 |
+
$form.append('<input type="submit" style="visibilit:hidden;width:1px;height;1px;" />')
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( cb == 'submit' && $form.find('[type="submit"]').length ) {
|
44 |
+
submitInterval = setInterval(function(){
|
45 |
+
if ( ! $form.find('[type="submit"]').prop( 'disabled' ) ) {
|
46 |
+
clearInterval(submitInterval);
|
47 |
+
// form.submit() does not work
|
48 |
+
$form.find('[type="submit"]').trigger('click');
|
49 |
+
}
|
50 |
+
}, 100 );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
grecaptcha.render( el, opts );
|
55 |
+
});
|
56 |
+
|
57 |
+
$other_captchas.addClass('g-recaptcha');
|
58 |
+
}
|
59 |
+
|
60 |
+
function captchas_rendered() {
|
61 |
+
var rendered = true;
|
62 |
+
$other_captchas.each( function(i,el) {
|
63 |
+
rendered = captchas_rendered && $(el).html() !== '';
|
64 |
+
});
|
65 |
+
return rendered;
|
66 |
+
}
|
67 |
+
|
68 |
+
// load google recaptcha
|
69 |
+
if ( $captchas.length ) {
|
70 |
+
if ( $other_captchas.length || $('.nf-form-cont').length ) {
|
71 |
+
if ( 'undefined' !== typeof grecaptcha ) {
|
72 |
+
wp_recaptcha_loaded();
|
73 |
+
} else {
|
74 |
+
loadedInterval = setInterval(function(){
|
75 |
+
if ( 'undefined' !== typeof grecaptcha ) {
|
76 |
+
clearInterval( loadedInterval );
|
77 |
+
wp_recaptcha_loaded();
|
78 |
+
}
|
79 |
+
},333);
|
80 |
+
}
|
81 |
+
} else {
|
82 |
+
init();
|
83 |
+
}
|
84 |
+
// load recaptcha script
|
85 |
+
} else {
|
86 |
+
$(document).ready( init );
|
87 |
+
}
|
88 |
+
|
89 |
+
})(jQuery);
|
js/wp-recaptcha.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
!function(t){function e(){p.removeClass("g-recaptcha"),c=t(".wp-recaptcha").addClass("g-recaptcha"),t("<script><\/script>").attr("src",wp_recaptcha.recaptcha_url).appendTo("body")}var a,c=t(".wp-recaptcha"),p=t(".g-recaptcha");window.wp_recaptcha_loaded=function(){grecaptcha&&(c.each(function(e,a){var c,p=t(a).closest("form"),i={sitekey:wp_recaptcha.site_key,theme:t(a).attr("data-theme"),size:t(a).attr("data-size")},r=t(a).attr("data-callback");""!==r&&(i.callback=function(){p.find('[type="submit"]').prop("disabled",!1)},i.expiredCallback=function(){p.find('[type="submit"]').prop("disabled",!0)},p.find('[type="submit"]').prop("disabled",!0).length||p.append('<input type="submit" style="visibilit:hidden;width:1px;height;1px;" />'),"submit"==r&&p.find('[type="submit"]').length&&(c=setInterval(function(){p.find('[type="submit"]').prop("disabled")||(clearInterval(c),p.find('[type="submit"]').trigger("click"))},100))),grecaptcha.render(a,i)}),p.addClass("g-recaptcha"))},c.length?p.length||t(".nf-form-cont").length?"undefined"!=typeof grecaptcha?wp_recaptcha_loaded():a=setInterval(function(){"undefined"!=typeof grecaptcha&&(clearInterval(a),wp_recaptcha_loaded())},333):e():t(document).ready(e)}(jQuery);
|
2 |
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndwLXJlY2FwdGNoYS5qcyJdLCJuYW1lcyI6WyIkIiwiaW5pdCIsIiRvdGhlcl9jYXB0Y2hhcyIsInJlbW92ZUNsYXNzIiwiJGNhcHRjaGFzIiwiYWRkQ2xhc3MiLCJhdHRyIiwid3BfcmVjYXB0Y2hhIiwicmVjYXB0Y2hhX3VybCIsImFwcGVuZFRvIiwibG9hZGVkSW50ZXJ2YWwiLCJ3aW5kb3ciLCJ3cF9yZWNhcHRjaGFfbG9hZGVkIiwiZ3JlY2FwdGNoYSIsImVhY2giLCJpIiwiZWwiLCJzdWJtaXRJbnRlcnZhbCIsIiRmb3JtIiwiY2xvc2VzdCIsIm9wdHMiLCJzaXRla2V5Iiwic2l0ZV9rZXkiLCJ0aGVtZSIsInNpemUiLCJjYiIsImNhbGxiYWNrIiwiZmluZCIsInByb3AiLCJleHBpcmVkQ2FsbGJhY2siLCJsZW5ndGgiLCJhcHBlbmQiLCJzZXRJbnRlcnZhbCIsImNsZWFySW50ZXJ2YWwiLCJ0cmlnZ2VyIiwicmVuZGVyIiwiZG9jdW1lbnQiLCJyZWFkeSIsImpRdWVyeSJdLCJtYXBwaW5ncyI6IkNBQUEsU0FBVUEsR0FL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YV9sb2FkZWQoKTtcblx0XHRcdH0gZWxzZSB7XG5cdFx0XHRcdGxvYWRlZEludGVydmFsID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXtcblx0XHRcdFx0XHRpZiAoICd1bmRlZmluZWQnICE9PSB0eXBlb2YgZ3JlY2FwdGNoYSApIHtcblx0XHRcdFx0XHRcdGNsZWFySW50ZXJ2YWwoIGxvYWRlZEludGVydmFsICk7XG5cdFx0XHRcdFx0XHR3cF9yZWNhcHRjaGFfbG9hZGVkKCk7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9LDMzMyk7XG5cdFx0XHR9XG5cdFx0fSBlbHNlIHtcblx0XHRcdGluaXQoKTtcblx0XHR9XG5cdFx0Ly8gbG9hZCByZWNhcHRjaGEgc2NyaXB0XG5cdH0gZWxzZSB7XG5cdFx0JChkb2N1bWVudCkucmVhZHkoIGluaXQgKTtcblx0fVxuXG59KShqUXVlcnkpO1xuIl19
|
js/wpcf7.js
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
/* *
|
2 |
-
* Override Contact form 7 Ajax success callback.
|
3 |
-
*/
|
4 |
-
(function($){
|
5 |
-
var wpcf7AjaxSuccess = $.wpcf7AjaxSuccess;
|
6 |
-
$.wpcf7AjaxSuccess = function(data) {
|
7 |
-
wpcf7AjaxSuccess.apply( this , arguments );
|
8 |
-
// reload recaptcha on invalid form.
|
9 |
-
if ( data.invalids ) {
|
10 |
-
( typeof Recaptcha != 'undefined' && Recaptcha.reload() );
|
11 |
-
( typeof grecaptcha != 'undefined' && grecaptcha.reset() );
|
12 |
-
}
|
13 |
-
}
|
14 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/wp-recaptcha-integration-cs_CZ.mo
ADDED
Binary file
|
languages/wp-recaptcha-integration-cs_CZ.po
ADDED
@@ -0,0 +1,475 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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Mendonça <ped.gaspar@gmail.com>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
12 |
+
"X-Generator: Poedit 1.8.7.1\n"
|
13 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
15 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Textdomain-Support: yes\n"
|
18 |
+
"Last-Translator: \n"
|
19 |
+
"Language: cs_CZ\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ wp-recaptcha-integration
|
23 |
+
#: inc/class-wp_recaptcha.php:392 inc/class-wp_recaptcha.php:438
|
24 |
+
#: inc/class-wp_recaptcha.php:452 inc/class-wp_recaptcha.php:464
|
25 |
+
#: inc/class-wp_recaptcha_bbpress.php:71
|
26 |
+
#: inc/class-wp_recaptcha_woocommerce.php:91
|
27 |
+
#: inc/class-wp_recaptcha_woocommerce.php:100
|
28 |
+
msgid "<strong>Error:</strong> the Captcha didn’t verify."
|
29 |
+
msgstr "<strong>Chyba:</strong> ověření Captcha se nepovedlo."
|
30 |
+
|
31 |
+
#: inc/class-wp_recaptcha_awesome_support.php:82
|
32 |
+
msgid "The Captcha didn't verify"
|
33 |
+
msgstr "The Captcha didn’t verify."
|
34 |
+
|
35 |
+
#: inc/class-wp_recaptcha_contactform7.php:51
|
36 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:47
|
37 |
+
msgid "Google reCaptcha does not validate."
|
38 |
+
msgstr "Ověření Google reCaptcha se nepovedlo."
|
39 |
+
|
40 |
+
# @ wp-recaptcha-integration
|
41 |
+
#: inc/class-wp_recaptcha_contactform7.php:52
|
42 |
+
#: inc/class-wp_recaptcha_contactform7.php:225
|
43 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:38
|
44 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:155
|
45 |
+
msgid "The Captcha didn’t verify."
|
46 |
+
msgstr "Ověření Captcha se nepovedlo."
|
47 |
+
|
48 |
+
# @ wp-recaptcha-integration
|
49 |
+
#: inc/class-wp_recaptcha_contactform7.php:97
|
50 |
+
#: inc/class-wp_recaptcha_contactform7.php:110
|
51 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:53
|
52 |
+
msgid "reCAPTCHA"
|
53 |
+
msgstr "reCAPTCHA"
|
54 |
+
|
55 |
+
#: inc/class-wp_recaptcha_contactform7.php:116
|
56 |
+
#: inc/class-wp_recaptcha_contactform7.php:119
|
57 |
+
msgid "Field type"
|
58 |
+
msgstr "Typ pole"
|
59 |
+
|
60 |
+
#: inc/class-wp_recaptcha_contactform7.php:120
|
61 |
+
msgid "Required field"
|
62 |
+
msgstr "Požadované pole"
|
63 |
+
|
64 |
+
# @ contact-form-7
|
65 |
+
#: inc/class-wp_recaptcha_contactform7.php:126
|
66 |
+
#: inc/class-wp_recaptcha_contactform7.php:129
|
67 |
+
#: inc/class-wp_recaptcha_contactform7.php:176
|
68 |
+
msgid "Name"
|
69 |
+
msgstr "Jméno"
|
70 |
+
|
71 |
+
# @ contact-form-7
|
72 |
+
# @ wp-recaptcha-integration
|
73 |
+
#: inc/class-wp_recaptcha_contactform7.php:137
|
74 |
+
#: inc/class-wp_recaptcha_contactform7.php:140
|
75 |
+
#: inc/class-wp_recaptcha_contactform7.php:181
|
76 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:89
|
77 |
+
#: inc/class-wp_recaptcha_options.php:228
|
78 |
+
msgid "Theme"
|
79 |
+
msgstr "Vzhled"
|
80 |
+
|
81 |
+
#: inc/class-wp_recaptcha_contactform7.php:156
|
82 |
+
msgid "Insert Tag"
|
83 |
+
msgstr "Vložit tag"
|
84 |
+
|
85 |
+
# @ contact-form-7
|
86 |
+
#: inc/class-wp_recaptcha_contactform7.php:174
|
87 |
+
msgid "Required field?"
|
88 |
+
msgstr "Požadované pole?"
|
89 |
+
|
90 |
+
# @ contact-form-7
|
91 |
+
#: inc/class-wp_recaptcha_contactform7.php:188
|
92 |
+
msgid "Copy this code and paste it into the form left."
|
93 |
+
msgstr "Zkopírujte tento kód a vložte jej na levou stranu formuláře."
|
94 |
+
|
95 |
+
# @ wp-recaptcha-integration
|
96 |
+
#: inc/class-wp_recaptcha_contactform7.php:207
|
97 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:81
|
98 |
+
msgid "Use default"
|
99 |
+
msgstr "Použít výchozí"
|
100 |
+
|
101 |
+
# @ wp-recaptcha-integration
|
102 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:89
|
103 |
+
msgid "Light"
|
104 |
+
msgstr "Světlý"
|
105 |
+
|
106 |
+
# @ wp-recaptcha-integration
|
107 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:92
|
108 |
+
msgid "Dark"
|
109 |
+
msgstr "Tmavý"
|
110 |
+
|
111 |
+
# @ wp-recaptcha-integration
|
112 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:242
|
113 |
+
msgid "Please enable JavaScript to submit this form."
|
114 |
+
msgstr "Pro odeslání formuláře prosím povolte JavaScript."
|
115 |
+
|
116 |
+
# @ wp-recaptcha-integration
|
117 |
+
#: inc/class-wp_recaptcha_options.php:97 inc/class-wp_recaptcha_options.php:109
|
118 |
+
msgid "reCaptcha Settings"
|
119 |
+
msgstr "Nastavení reCaptcha"
|
120 |
+
|
121 |
+
# @ wp-recaptcha-integration
|
122 |
+
#: inc/class-wp_recaptcha_options.php:98
|
123 |
+
msgid "reCaptcha"
|
124 |
+
msgstr "reCaptcha"
|
125 |
+
|
126 |
+
# @ wp-recaptcha-integration
|
127 |
+
#: inc/class-wp_recaptcha_options.php:158
|
128 |
+
#, php-format
|
129 |
+
msgid ""
|
130 |
+
"<strong>reCaptcha needs your attention:</strong> To make it work You need to "
|
131 |
+
"enter an api key. <br />You can do so at the <a href=\"%s\">reCaptcha "
|
132 |
+
"settings page</a>."
|
133 |
+
msgstr ""
|
134 |
+
"<strong>reCaptcha vyžaduje vaši pozornost:</strong> Ke správnému fungování "
|
135 |
+
"musíte vyplnit klíče k api. <br /> Můžete tak učinit na stránce s natavením "
|
136 |
+
"<a href=\"%s\">reCaptcha</a>."
|
137 |
+
|
138 |
+
# @ wp-recaptcha-integration
|
139 |
+
#: inc/class-wp_recaptcha_options.php:176
|
140 |
+
msgid "Protect"
|
141 |
+
msgstr "Chránit"
|
142 |
+
|
143 |
+
# @ wp-recaptcha-integration
|
144 |
+
#: inc/class-wp_recaptcha_options.php:177
|
145 |
+
msgid "Style"
|
146 |
+
msgstr "Styl"
|
147 |
+
|
148 |
+
# @ wp-recaptcha-integration
|
149 |
+
#: inc/class-wp_recaptcha_options.php:179
|
150 |
+
msgid "Connect"
|
151 |
+
msgstr "Připojit"
|
152 |
+
|
153 |
+
#: inc/class-wp_recaptcha_options.php:181
|
154 |
+
msgid "Advanced"
|
155 |
+
msgstr "Pokročilé"
|
156 |
+
|
157 |
+
# @ wp-recaptcha-integration
|
158 |
+
#: inc/class-wp_recaptcha_options.php:187
|
159 |
+
msgid "Site key"
|
160 |
+
msgstr "Klíč pro web"
|
161 |
+
|
162 |
+
# @ wp-recaptcha-integration
|
163 |
+
#: inc/class-wp_recaptcha_options.php:188
|
164 |
+
msgid "Secret key"
|
165 |
+
msgstr "Tajný klíč"
|
166 |
+
|
167 |
+
# @ wp-recaptcha-integration
|
168 |
+
#: inc/class-wp_recaptcha_options.php:210
|
169 |
+
msgid "Flavor"
|
170 |
+
msgstr "Styl"
|
171 |
+
|
172 |
+
# @ wp-recaptcha-integration
|
173 |
+
#: inc/class-wp_recaptcha_options.php:217
|
174 |
+
msgid "No Captcha where you just click a button"
|
175 |
+
msgstr "No Captcha, kde jen klikáte na tlačítko"
|
176 |
+
|
177 |
+
# @ wp-recaptcha-integration
|
178 |
+
#: inc/class-wp_recaptcha_options.php:221
|
179 |
+
msgid "Old style reCAPTCHA where you type some cryptic text"
|
180 |
+
msgstr "Stará reCAPTCHA, kde přepisujete nějaký \"zašifrovaný\" text"
|
181 |
+
|
182 |
+
# @ default
|
183 |
+
#: inc/class-wp_recaptcha_options.php:226
|
184 |
+
msgid "Language Settings"
|
185 |
+
msgstr "Jazykové nastavení"
|
186 |
+
|
187 |
+
# @ wp-recaptcha-integration
|
188 |
+
#: inc/class-wp_recaptcha_options.php:230
|
189 |
+
msgid "Disable Submit Button"
|
190 |
+
msgstr "Deaktivovat tlačítko pro odeslání"
|
191 |
+
|
192 |
+
# @ wp-recaptcha-integration
|
193 |
+
#: inc/class-wp_recaptcha_options.php:232
|
194 |
+
msgid "Disable Form Submit Button until no-captcha is entered."
|
195 |
+
msgstr "Skrýt tlačítko k odeslání formuláře, dokud není zadána no-captcha."
|
196 |
+
|
197 |
+
#: inc/class-wp_recaptcha_options.php:234
|
198 |
+
msgid "Noscript Fallback"
|
199 |
+
msgstr "Záloha pro Noscript"
|
200 |
+
|
201 |
+
#: inc/class-wp_recaptcha_options.php:238
|
202 |
+
msgid "Provide a fallback for non javascript capable browsers."
|
203 |
+
msgstr "Poskytuje alternativu pro prohlížeče bez podpory javascriptu."
|
204 |
+
|
205 |
+
#: inc/class-wp_recaptcha_options.php:239
|
206 |
+
msgid "Leave this unchecked when your site requires JavaScript anyway."
|
207 |
+
msgstr "Zanechte to nezaškrtnuté, pokud vaše stránka vyžaduje JavaScript."
|
208 |
+
|
209 |
+
#: inc/class-wp_recaptcha_options.php:247
|
210 |
+
msgid "Comment Form rendering"
|
211 |
+
msgstr "Vykreslování formuláře pro nový komentář"
|
212 |
+
|
213 |
+
#: inc/class-wp_recaptcha_options.php:251
|
214 |
+
msgid "My Comment Form is WordPress 4.2 compatible."
|
215 |
+
msgstr ""
|
216 |
+
"Formulář pro nový komentář je kompatibilní podle specifikace WordPress 4.2."
|
217 |
+
|
218 |
+
#: inc/class-wp_recaptcha_options.php:252
|
219 |
+
msgid ""
|
220 |
+
"Enable this when your comment form uses the "
|
221 |
+
"<code>comment_form_submit_button</code> filter. (Or just try if it works.)"
|
222 |
+
msgstr ""
|
223 |
+
"Povolte to, když váš formulář pro nový komentář používá filtr "
|
224 |
+
"<code>comment_form_submit_button</code>. (A nebo jen zkuste, jestli to "
|
225 |
+
"funguje.)"
|
226 |
+
|
227 |
+
# @ wp-recaptcha-integration
|
228 |
+
#: inc/class-wp_recaptcha_options.php:283
|
229 |
+
msgid "Comment Form"
|
230 |
+
msgstr "Formulář pro nový komentář"
|
231 |
+
|
232 |
+
# @ wp-recaptcha-integration
|
233 |
+
#: inc/class-wp_recaptcha_options.php:288
|
234 |
+
msgid "Signup Form"
|
235 |
+
msgstr "Registrační formulář"
|
236 |
+
|
237 |
+
# @ wp-recaptcha-integration
|
238 |
+
#: inc/class-wp_recaptcha_options.php:293
|
239 |
+
msgid "Login Form"
|
240 |
+
msgstr "Přihlašovací formulář"
|
241 |
+
|
242 |
+
# @ wp-recaptcha-integration
|
243 |
+
#: inc/class-wp_recaptcha_options.php:298
|
244 |
+
msgid "Lost Password Form"
|
245 |
+
msgstr "Formulář se zapomenutým heslem"
|
246 |
+
|
247 |
+
# @ wp-recaptcha-integration
|
248 |
+
#: inc/class-wp_recaptcha_options.php:306
|
249 |
+
msgid "woocommerce Checkout"
|
250 |
+
msgstr "Pokladna woocommerce"
|
251 |
+
|
252 |
+
#: inc/class-wp_recaptcha_options.php:315
|
253 |
+
msgid "Awesome Support Registration"
|
254 |
+
msgstr "Registrace podpory Awesome"
|
255 |
+
|
256 |
+
#: inc/class-wp_recaptcha_options.php:323
|
257 |
+
msgid "bbPress New Topic"
|
258 |
+
msgstr "Nové téma bbPress"
|
259 |
+
|
260 |
+
#: inc/class-wp_recaptcha_options.php:329
|
261 |
+
msgid "bbPress New Reply"
|
262 |
+
msgstr "Nová odpověď bbPress"
|
263 |
+
|
264 |
+
# @ wp-recaptcha-integration
|
265 |
+
#: inc/class-wp_recaptcha_options.php:334
|
266 |
+
msgid "Forms to protect"
|
267 |
+
msgstr "Formulář k ochránění"
|
268 |
+
|
269 |
+
# @ wp-recaptcha-integration
|
270 |
+
#: inc/class-wp_recaptcha_options.php:339
|
271 |
+
msgid "Disable for known users"
|
272 |
+
msgstr "Deaktivovat pro známé uživatele"
|
273 |
+
|
274 |
+
# @ wp-recaptcha-integration
|
275 |
+
#: inc/class-wp_recaptcha_options.php:341
|
276 |
+
msgid "Disable reCaptcha verification for logged in users."
|
277 |
+
msgstr "Zakázat reCaptcha verifikaci pro přihlášené uživatele."
|
278 |
+
|
279 |
+
# @ wp-recaptcha-integration
|
280 |
+
#: inc/class-wp_recaptcha_options.php:344
|
281 |
+
msgid "Prevent lockout"
|
282 |
+
msgstr "Zabránit uzamčení"
|
283 |
+
|
284 |
+
# @ wp-recaptcha-integration
|
285 |
+
#: inc/class-wp_recaptcha_options.php:348
|
286 |
+
msgid "Allow administrator to log in if API keys do not work."
|
287 |
+
msgstr "Povolit administrátorovi přihlášení i když klíče k API nefungují."
|
288 |
+
|
289 |
+
# @ wp-recaptcha-integration
|
290 |
+
#: inc/class-wp_recaptcha_options.php:349
|
291 |
+
msgid ""
|
292 |
+
"When the captcha verification fails, and the private or public API key does "
|
293 |
+
"not work the plugin will let you in anyway. Please note that with this "
|
294 |
+
"option checked plus a broken keypair your site will be open to brute force "
|
295 |
+
"attacks, that try to guess an administrator password."
|
296 |
+
msgstr ""
|
297 |
+
"Když selže ověření captcha a privátní/veřejný klíč k API nefunguje, tak vám "
|
298 |
+
"plugin povolí vstup. Prosím, dejte pozor na to, že povolení této možnosti "
|
299 |
+
"spolu s rozbitou sadou klíčů otevře cestu k útokům hrubou silou, které se "
|
300 |
+
"snaží uhádnout vaše administrátorské heslo."
|
301 |
+
|
302 |
+
# @ wp-recaptcha-integration
|
303 |
+
#: inc/class-wp_recaptcha_options.php:355
|
304 |
+
msgid ""
|
305 |
+
"Please configure the public and private key. <a href=\"http://www.google.com/"
|
306 |
+
"recaptcha/whyrecaptcha\">What are you trying to tell me?</a>"
|
307 |
+
msgstr ""
|
308 |
+
"Prosím nastavte veřejný a privátní klíč. <a href=\"http://www.google.com/"
|
309 |
+
"recaptcha/whyrecaptcha\">co to znamená?</a>"
|
310 |
+
|
311 |
+
# @ wp-recaptcha-integration
|
312 |
+
#: inc/class-wp_recaptcha_options.php:368
|
313 |
+
#, php-format
|
314 |
+
msgid ""
|
315 |
+
"Please register your blog through the <a href=\"%s\">Google reCAPTCHA admin "
|
316 |
+
"page</a> and enter the public and private key in the fields below. <a href="
|
317 |
+
"\"%s\">What is this all about?</a>"
|
318 |
+
msgstr ""
|
319 |
+
"Prosím, registrujte svůj blog v <a href=\"%s\">administraci Google "
|
320 |
+
"reCAPTCHA</a> a zadejte veřejné a privátní klíče do polí níže. <a href=\"%s"
|
321 |
+
"\">O čem to celé je?</a>"
|
322 |
+
|
323 |
+
# @ wp-recaptcha-integration
|
324 |
+
#: inc/class-wp_recaptcha_options.php:376
|
325 |
+
msgid "You already entered an API Key. Use the button below to enter it again."
|
326 |
+
msgstr ""
|
327 |
+
"Už jste zadali klíč k API. Použijte tlačítko níže k jeho opětovnému zadání."
|
328 |
+
|
329 |
+
# @ wp-recaptcha-integration
|
330 |
+
#: inc/class-wp_recaptcha_options.php:391
|
331 |
+
msgid "New API Key"
|
332 |
+
msgstr "Nový klíč k API"
|
333 |
+
|
334 |
+
# @ wp-recaptcha-integration
|
335 |
+
#: inc/class-wp_recaptcha_options.php:392
|
336 |
+
msgid "Test API Key"
|
337 |
+
msgstr "Test klíče k API"
|
338 |
+
|
339 |
+
# @ wp-recaptcha-integration
|
340 |
+
#: inc/class-wp_recaptcha_options.php:404
|
341 |
+
msgid "Select which forms you want to protect with a captcha."
|
342 |
+
msgstr "Zvolte, které formuláře mají být chráněny captchou."
|
343 |
+
|
344 |
+
# @ wp-recaptcha-integration
|
345 |
+
#: inc/class-wp_recaptcha_options.php:421
|
346 |
+
msgid ""
|
347 |
+
"Choose a flavor and theme for your Captcha. Please note that with the old "
|
348 |
+
"style reCaptcha you cannot have more than one captcha per page."
|
349 |
+
msgstr ""
|
350 |
+
"Zvolte si styl a vzhled pro vaši Captchu. Dejte prosím pozor na to, že stará "
|
351 |
+
"verze reCaptcha neumožňuje mít více než jednu captchu na stránku."
|
352 |
+
|
353 |
+
# @ wp-recaptcha-integration
|
354 |
+
#: inc/class-wp_recaptcha_options.php:453
|
355 |
+
msgid "Test verfication"
|
356 |
+
msgstr "Ověření testu"
|
357 |
+
|
358 |
+
# @ wp-recaptcha-integration
|
359 |
+
#: inc/class-wp_recaptcha_options.php:466
|
360 |
+
msgid "The secret Key is missing."
|
361 |
+
msgstr "Tajný klíč chybí"
|
362 |
+
|
363 |
+
# @ wp-recaptcha-integration
|
364 |
+
#: inc/class-wp_recaptcha_options.php:467
|
365 |
+
msgid ""
|
366 |
+
"The secret Key is invalid. You better check your domain configuration and "
|
367 |
+
"enter it again."
|
368 |
+
msgstr ""
|
369 |
+
"Tajný klíč není správný. Ověřte prosím nastavení domény a zadejte jej znovu."
|
370 |
+
|
371 |
+
# @ wp-recaptcha-integration
|
372 |
+
#: inc/class-wp_recaptcha_options.php:468
|
373 |
+
msgid "The user response was missing"
|
374 |
+
msgstr "Chybějící odpověď uživatele"
|
375 |
+
|
376 |
+
# @ wp-recaptcha-integration
|
377 |
+
#: inc/class-wp_recaptcha_options.php:469
|
378 |
+
msgid "Invalid user response"
|
379 |
+
msgstr "Špatná odpověď uživatele"
|
380 |
+
|
381 |
+
# @ wp-recaptcha-integration
|
382 |
+
#: inc/class-wp_recaptcha_options.php:478
|
383 |
+
msgid "Works! All good!"
|
384 |
+
msgstr "Vše funguje správně!"
|
385 |
+
|
386 |
+
# @ default
|
387 |
+
#: inc/class-wp_recaptcha_options.php:490
|
388 |
+
msgid "Cancel"
|
389 |
+
msgstr "Zrušit"
|
390 |
+
|
391 |
+
# @ wp-recaptcha-integration
|
392 |
+
#: inc/class-wp_recaptcha_options.php:611
|
393 |
+
msgid "Automatic"
|
394 |
+
msgstr "Automatické"
|
395 |
+
|
396 |
+
# @ default
|
397 |
+
#: inc/class-wp_recaptcha_options.php:612
|
398 |
+
msgid "Site Language"
|
399 |
+
msgstr "Jazyk webu"
|
400 |
+
|
401 |
+
# @ default
|
402 |
+
#: inc/class-wp_recaptcha_options.php:613
|
403 |
+
msgid "Other"
|
404 |
+
msgstr "Ostatní"
|
405 |
+
|
406 |
+
# @ wp-recaptcha-integration
|
407 |
+
#: inc/class-wp_recaptcha_options.php:651
|
408 |
+
msgid "Unstyled HTML to apply your own Stylesheets."
|
409 |
+
msgstr "Nenastylovaný HTML kód k aplikaci vašich vlastní stylů."
|
410 |
+
|
411 |
+
# @ wp-recaptcha-integration
|
412 |
+
#: inc/class-wp_recaptcha_options.php:724
|
413 |
+
#: inc/class-wp_recaptcha_options.php:749
|
414 |
+
msgid "ReCaptcha"
|
415 |
+
msgstr "ReCaptcha"
|
416 |
+
|
417 |
+
# @ default
|
418 |
+
#: inc/class-wp_recaptcha_options.php:747
|
419 |
+
msgid "Settings"
|
420 |
+
msgstr "Nastavení"
|
421 |
+
|
422 |
+
# @ wp-recaptcha-integration
|
423 |
+
#: inc/class-wp_recaptcha_recaptcha.php:60
|
424 |
+
msgid "Red"
|
425 |
+
msgstr "Červená"
|
426 |
+
|
427 |
+
# @ wp-recaptcha-integration
|
428 |
+
#: inc/class-wp_recaptcha_recaptcha.php:63
|
429 |
+
msgid "White"
|
430 |
+
msgstr "Bílá"
|
431 |
+
|
432 |
+
# @ wp-recaptcha-integration
|
433 |
+
#: inc/class-wp_recaptcha_recaptcha.php:66
|
434 |
+
msgid "Black Glass"
|
435 |
+
msgstr "Černé sklo"
|
436 |
+
|
437 |
+
# @ wp-recaptcha-integration
|
438 |
+
#: inc/class-wp_recaptcha_recaptcha.php:69
|
439 |
+
msgid "Clean"
|
440 |
+
msgstr "Čistá"
|
441 |
+
|
442 |
+
# @ wp-recaptcha-integration
|
443 |
+
#: inc/class-wp_recaptcha_recaptcha.php:72
|
444 |
+
msgid "Custom"
|
445 |
+
msgstr "Vlastní"
|
446 |
+
|
447 |
+
# @ wp-recaptcha-integration
|
448 |
+
#: inc/class-wp_recaptcha_recaptcha.php:181
|
449 |
+
msgid "Incorrect please try again"
|
450 |
+
msgstr "Špatně, zkuste to prosím znovu"
|
451 |
+
|
452 |
+
# @ wp-recaptcha-integration
|
453 |
+
#: inc/class-wp_recaptcha_recaptcha.php:183
|
454 |
+
msgid "Enter the words above:"
|
455 |
+
msgstr "Napište slova, která vidíte výše:"
|
456 |
+
|
457 |
+
# @ wp-recaptcha-integration
|
458 |
+
#: inc/class-wp_recaptcha_recaptcha.php:184
|
459 |
+
msgid "Enter the numbers you hear:"
|
460 |
+
msgstr "Napište čísla, která slyšíte:"
|
461 |
+
|
462 |
+
# @ wp-recaptcha-integration
|
463 |
+
#: inc/class-wp_recaptcha_recaptcha.php:188
|
464 |
+
msgid "Get another CAPTCHA"
|
465 |
+
msgstr "Chci jinou CAPTCHu"
|
466 |
+
|
467 |
+
# @ wp-recaptcha-integration
|
468 |
+
#: inc/class-wp_recaptcha_recaptcha.php:189
|
469 |
+
msgid "Get an audio CAPTCHA"
|
470 |
+
msgstr "Chci zvukovou CAPTCHu"
|
471 |
+
|
472 |
+
# @ wp-recaptcha-integration
|
473 |
+
#: inc/class-wp_recaptcha_recaptcha.php:190
|
474 |
+
msgid "Get an image CAPTCHA"
|
475 |
+
msgstr "Chci obrázkovou CAPTCHu"
|
languages/wp-recaptcha-integration-it_IT.mo
ADDED
Binary file
|
languages/wp-recaptcha-integration-it_IT.po
ADDED
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP reCaptcha Integration v1.1.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-02-01 17:51+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-08-29 11:53+0100\n"
|
7 |
+
"Last-Translator: Jörn Lund <joern@podpirate.org>\n"
|
8 |
+
"Language-Team: Ivan <ivan@yivoff.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"Language: it_IT\n"
|
14 |
+
"X-Generator: Poedit 1.8.1\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
# @ wp-recaptcha-integration
|
22 |
+
#: inc/class-wp_recaptcha_contactform7.php:78
|
23 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:36
|
24 |
+
msgid "reCAPTCHA"
|
25 |
+
msgstr "reCAPTCHA"
|
26 |
+
|
27 |
+
# @ contact-form-7
|
28 |
+
#: inc/class-wp_recaptcha_contactform7.php:91
|
29 |
+
msgid "Required field?"
|
30 |
+
msgstr "Campo richiesto?"
|
31 |
+
|
32 |
+
# @ contact-form-7
|
33 |
+
#: inc/class-wp_recaptcha_contactform7.php:93
|
34 |
+
msgid "Name"
|
35 |
+
msgstr "Nome"
|
36 |
+
|
37 |
+
# @ contact-form-7
|
38 |
+
#: inc/class-wp_recaptcha_contactform7.php:119
|
39 |
+
msgid "Copy this code and paste it into the form left."
|
40 |
+
msgstr "Copiare questo codice e incollarlo nel modulo/form a sinistra."
|
41 |
+
|
42 |
+
# @ wp-recaptcha-integration
|
43 |
+
#: inc/class-wp_recaptcha_contactform7.php:137
|
44 |
+
msgid "The Captcha didn’t verify."
|
45 |
+
msgstr "Il codice di verifica è sbagliato"
|
46 |
+
|
47 |
+
# @ wp-recaptcha-integration
|
48 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:134
|
49 |
+
#: inc/class-wp_recaptcha_woocommerce.php:83
|
50 |
+
#: inc/class-wp_recaptcha_woocommerce.php:92 wp-recaptcha-integration.php:372
|
51 |
+
#: wp-recaptcha-integration.php:418 wp-recaptcha-integration.php:432
|
52 |
+
#: wp-recaptcha-integration.php:444
|
53 |
+
msgid "<strong>Error:</strong> the Captcha didn’t verify."
|
54 |
+
msgstr "<strong>Error:</strong> Il codice di verifica è sbagliato"
|
55 |
+
|
56 |
+
# @ wp-recaptcha-integration
|
57 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:198
|
58 |
+
msgid "Please enable JavaScript to submit this form."
|
59 |
+
msgstr "Si prega di abilitare JavaScript per inviare questo modulo."
|
60 |
+
|
61 |
+
# @ wp-recaptcha-integration
|
62 |
+
#: inc/class-wp_recaptcha_options.php:94
|
63 |
+
#: inc/class-wp_recaptcha_options.php:106
|
64 |
+
msgid "reCaptcha Settings"
|
65 |
+
msgstr "Impostazioni reCaptcha"
|
66 |
+
|
67 |
+
# @ wp-recaptcha-integration
|
68 |
+
#: inc/class-wp_recaptcha_options.php:95
|
69 |
+
msgid "reCaptcha"
|
70 |
+
msgstr "reCAPTCHA"
|
71 |
+
|
72 |
+
# @ wp-recaptcha-integration
|
73 |
+
#: inc/class-wp_recaptcha_options.php:155
|
74 |
+
#, php-format
|
75 |
+
msgid "<strong>reCaptcha needs your attention:</strong> To make it work You need to enter an api key. <br />You can do so at the <a href=\"%s\">reCaptcha settings page</a>."
|
76 |
+
msgstr "<strong>reCaptcha ha bisogno della tua attenzione:</strong> per farlo funzionare, è necessario immettere una chiave API. <br /> Puoi farlo in <a href=\"%s\">pagina delle impostazioni di reCaptcha</a> ."
|
77 |
+
|
78 |
+
# @ wp-recaptcha-integration
|
79 |
+
#: inc/class-wp_recaptcha_options.php:183
|
80 |
+
msgid "Site key"
|
81 |
+
msgstr "Chiave sito"
|
82 |
+
|
83 |
+
# @ wp-recaptcha-integration
|
84 |
+
#: inc/class-wp_recaptcha_options.php:184
|
85 |
+
msgid "Secret key"
|
86 |
+
msgstr "Chiave segreta"
|
87 |
+
|
88 |
+
# @ default
|
89 |
+
#: inc/class-wp_recaptcha_options.php:220
|
90 |
+
msgid "Language Settings"
|
91 |
+
msgstr "Impostazioni di lingua"
|
92 |
+
|
93 |
+
# @ wp-recaptcha-integration
|
94 |
+
#: inc/class-wp_recaptcha_options.php:204
|
95 |
+
msgid "Flavor"
|
96 |
+
msgstr "Il tipo"
|
97 |
+
|
98 |
+
# @ wp-recaptcha-integration
|
99 |
+
#: inc/class-wp_recaptcha_options.php:211
|
100 |
+
msgid "No Captcha where you just click a button"
|
101 |
+
msgstr "No Captcha dove basta cliccare su un pulsante"
|
102 |
+
|
103 |
+
# @ wp-recaptcha-integration
|
104 |
+
#: inc/class-wp_recaptcha_options.php:215
|
105 |
+
msgid "Old style reCAPTCHA where you type some cryptic text"
|
106 |
+
msgstr "reCAPTCHA vecchio stile, dove si deve interpretare e poi digitare una scritta deformata"
|
107 |
+
|
108 |
+
# @ contact-form-7
|
109 |
+
# @ wp-recaptcha-integration
|
110 |
+
#: inc/class-wp_recaptcha_contactform7.php:98
|
111 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:72
|
112 |
+
#: inc/class-wp_recaptcha_options.php:222
|
113 |
+
msgid "Theme"
|
114 |
+
msgstr "Tema"
|
115 |
+
|
116 |
+
# @ wp-recaptcha-integration
|
117 |
+
#: inc/class-wp_recaptcha_options.php:224
|
118 |
+
msgid "Disable Submit Button"
|
119 |
+
msgstr "Disattiva tasto Invio"
|
120 |
+
|
121 |
+
# @ wp-recaptcha-integration
|
122 |
+
#: inc/class-wp_recaptcha_options.php:226
|
123 |
+
msgid "Disable Form Submit Button until no-captcha is entered."
|
124 |
+
msgstr "Disattivare il tasto Invio del form finché il captcha non è inserito."
|
125 |
+
|
126 |
+
# @ wp-recaptcha-integration
|
127 |
+
#: inc/class-wp_recaptcha_options.php:313
|
128 |
+
msgid "Disable for known users"
|
129 |
+
msgstr "Disabilitare per gli utenti conosciuti"
|
130 |
+
|
131 |
+
# @ wp-recaptcha-integration
|
132 |
+
#: inc/class-wp_recaptcha_options.php:315
|
133 |
+
msgid "Disable reCaptcha verification for logged in users."
|
134 |
+
msgstr "Disabilita il reCAPTCHA per gli utenti loggati."
|
135 |
+
|
136 |
+
# @ wp-recaptcha-integration
|
137 |
+
#: inc/class-wp_recaptcha_options.php:328
|
138 |
+
msgid "Please configure the public and private key. <a href=\"http://www.google.com/recaptcha/whyrecaptcha\">What are you trying to tell me?</a>"
|
139 |
+
msgstr "Configurare la chiave pubblica e privata. <a href=\"http://www.google.com/recaptcha/whyrecaptcha\">Cosa vuol dire questa cosa?</a>"
|
140 |
+
|
141 |
+
# @ wp-recaptcha-integration
|
142 |
+
#: inc/class-wp_recaptcha_options.php:341
|
143 |
+
#, php-format
|
144 |
+
msgid "Please register your blog through the <a href=\"%s\">Google reCAPTCHA admin page</a> and enter the public and private key in the fields below. <a href=\"%s\">What is this all about?</a>"
|
145 |
+
msgstr "Registra il tuo blog tramite <a href=\"%s\">la pagine di amministrazione di reCAPTCHA</a> e inserisci la chiave pubblica e privata nei campi qui sotto. <a href=\"%s\">Di cosa si tratta?</a>"
|
146 |
+
|
147 |
+
# @ wp-recaptcha-integration
|
148 |
+
#: inc/class-wp_recaptcha_options.php:349
|
149 |
+
msgid "You already entered an API Key. Use the button below to enter it again."
|
150 |
+
msgstr "È già stata immessa una chiave API. Utilizza il pulsante sotto per inserirlo di nuovo."
|
151 |
+
|
152 |
+
# @ wp-recaptcha-integration
|
153 |
+
#: inc/class-wp_recaptcha_options.php:364
|
154 |
+
msgid "New API Key"
|
155 |
+
msgstr "Nuova chiave API"
|
156 |
+
|
157 |
+
# @ wp-recaptcha-integration
|
158 |
+
#: inc/class-wp_recaptcha_options.php:365
|
159 |
+
msgid "Test API Key"
|
160 |
+
msgstr "Prova la chiave API"
|
161 |
+
|
162 |
+
# @ wp-recaptcha-integration
|
163 |
+
#: inc/class-wp_recaptcha_options.php:419
|
164 |
+
msgid "Test verfication"
|
165 |
+
msgstr "Prova la verifica"
|
166 |
+
|
167 |
+
# @ wp-recaptcha-integration
|
168 |
+
#: inc/class-wp_recaptcha_options.php:432
|
169 |
+
msgid "The secret Key is missing."
|
170 |
+
msgstr "Manca la chiave segreta"
|
171 |
+
|
172 |
+
# @ wp-recaptcha-integration
|
173 |
+
#: inc/class-wp_recaptcha_options.php:433
|
174 |
+
msgid "The secret Key is invalid. You better check your domain configuration and enter it again."
|
175 |
+
msgstr "La chiave segreta non è valida. È meglio controllare la configurazione del dominio e immetterla nuovamente."
|
176 |
+
|
177 |
+
# @ wp-recaptcha-integration
|
178 |
+
#: inc/class-wp_recaptcha_options.php:434
|
179 |
+
msgid "The user response was missing"
|
180 |
+
msgstr "Mancava la risposta dell'utente"
|
181 |
+
|
182 |
+
# @ wp-recaptcha-integration
|
183 |
+
#: inc/class-wp_recaptcha_options.php:435
|
184 |
+
msgid "Invalid user response"
|
185 |
+
msgstr "Risposta sbagliata dell'utente "
|
186 |
+
|
187 |
+
# @ wp-recaptcha-integration
|
188 |
+
#: inc/class-wp_recaptcha_options.php:444
|
189 |
+
msgid "Works! All good!"
|
190 |
+
msgstr "Funziona! Tutto bene!"
|
191 |
+
|
192 |
+
# @ default
|
193 |
+
#: inc/class-wp_recaptcha_options.php:456
|
194 |
+
msgid "Cancel"
|
195 |
+
msgstr "Annulla"
|
196 |
+
|
197 |
+
# @ wp-recaptcha-integration
|
198 |
+
#: inc/class-wp_recaptcha_options.php:577
|
199 |
+
msgid "Automatic"
|
200 |
+
msgstr "Automatico"
|
201 |
+
|
202 |
+
# @ default
|
203 |
+
#: inc/class-wp_recaptcha_options.php:578
|
204 |
+
msgid "Site Language"
|
205 |
+
msgstr "Lingua del sito web"
|
206 |
+
|
207 |
+
# @ default
|
208 |
+
#: inc/class-wp_recaptcha_options.php:579
|
209 |
+
msgid "Other"
|
210 |
+
msgstr "Altro"
|
211 |
+
|
212 |
+
# @ wp-recaptcha-integration
|
213 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:88
|
214 |
+
msgid "Light"
|
215 |
+
msgstr "Chiaro"
|
216 |
+
|
217 |
+
# @ wp-recaptcha-integration
|
218 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:91
|
219 |
+
msgid "Dark"
|
220 |
+
msgstr "Scuro"
|
221 |
+
|
222 |
+
# @ wp-recaptcha-integration
|
223 |
+
#: inc/class-wp_recaptcha_recaptcha.php:51
|
224 |
+
msgid "Red"
|
225 |
+
msgstr "Rosso"
|
226 |
+
|
227 |
+
# @ wp-recaptcha-integration
|
228 |
+
#: inc/class-wp_recaptcha_recaptcha.php:54
|
229 |
+
msgid "White"
|
230 |
+
msgstr "Bianco"
|
231 |
+
|
232 |
+
# @ wp-recaptcha-integration
|
233 |
+
#: inc/class-wp_recaptcha_recaptcha.php:57
|
234 |
+
msgid "Black Glass"
|
235 |
+
msgstr "Vetro nero"
|
236 |
+
|
237 |
+
# @ wp-recaptcha-integration
|
238 |
+
#: inc/class-wp_recaptcha_recaptcha.php:60
|
239 |
+
msgid "Clean"
|
240 |
+
msgstr "Pulito"
|
241 |
+
|
242 |
+
# @ wp-recaptcha-integration
|
243 |
+
#: inc/class-wp_recaptcha_recaptcha.php:63
|
244 |
+
msgid "Custom"
|
245 |
+
msgstr "Personalizzato"
|
246 |
+
|
247 |
+
# @ wp-recaptcha-integration
|
248 |
+
#: inc/class-wp_recaptcha_options.php:617
|
249 |
+
msgid "Unstyled HTML to apply your own Stylesheets."
|
250 |
+
msgstr "HTML senza stile per applicare I tuoi fogli di stile."
|
251 |
+
|
252 |
+
# @ wp-recaptcha-integration
|
253 |
+
#: inc/class-wp_recaptcha_options.php:690
|
254 |
+
#: inc/class-wp_recaptcha_options.php:715
|
255 |
+
msgid "ReCaptcha"
|
256 |
+
msgstr "reCAPTCHA"
|
257 |
+
|
258 |
+
# @ default
|
259 |
+
#: inc/class-wp_recaptcha_options.php:713
|
260 |
+
msgid "Settings"
|
261 |
+
msgstr "Impostazioni"
|
262 |
+
|
263 |
+
# @ wp-recaptcha-integration
|
264 |
+
#: inc/class-wp_recaptcha_recaptcha.php:146
|
265 |
+
msgid "Incorrect please try again"
|
266 |
+
msgstr "Sbagliato! Riprova per favore"
|
267 |
+
|
268 |
+
# @ wp-recaptcha-integration
|
269 |
+
#: inc/class-wp_recaptcha_recaptcha.php:148
|
270 |
+
msgid "Enter the words above:"
|
271 |
+
msgstr "Inserisci le parole sovraindicate:"
|
272 |
+
|
273 |
+
# @ wp-recaptcha-integration
|
274 |
+
#: inc/class-wp_recaptcha_recaptcha.php:149
|
275 |
+
msgid "Enter the numbers you hear:"
|
276 |
+
msgstr "Inserisci i numeri che senti:"
|
277 |
+
|
278 |
+
# @ wp-recaptcha-integration
|
279 |
+
#: inc/class-wp_recaptcha_recaptcha.php:153
|
280 |
+
msgid "Get another CAPTCHA"
|
281 |
+
msgstr "Richiedi un altro CAPTCHA"
|
282 |
+
|
283 |
+
# @ wp-recaptcha-integration
|
284 |
+
#: inc/class-wp_recaptcha_recaptcha.php:154
|
285 |
+
msgid "Get an audio CAPTCHA"
|
286 |
+
msgstr "Ottieni un audio CAPTCHA"
|
287 |
+
|
288 |
+
# @ wp-recaptcha-integration
|
289 |
+
#: inc/class-wp_recaptcha_recaptcha.php:155
|
290 |
+
msgid "Get an image CAPTCHA"
|
291 |
+
msgstr "Ottieni un immagine CAPTCHA"
|
292 |
+
|
293 |
+
# @ wp-recaptcha-integration
|
294 |
+
#: inc/class-wp_recaptcha_contactform7.php:100
|
295 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:64
|
296 |
+
msgid "Use default"
|
297 |
+
msgstr "Usa predefinito"
|
298 |
+
|
299 |
+
# @ wp-recaptcha-integration
|
300 |
+
#: inc/class-wp_recaptcha_options.php:173
|
301 |
+
#: inc/class-wp_recaptcha_options.php:177
|
302 |
+
msgid "Connect"
|
303 |
+
msgstr "Connetti"
|
304 |
+
|
305 |
+
# @ wp-recaptcha-integration
|
306 |
+
#: inc/class-wp_recaptcha_options.php:174
|
307 |
+
msgid "Protect"
|
308 |
+
msgstr "Proteggi"
|
309 |
+
|
310 |
+
# @ wp-recaptcha-integration
|
311 |
+
#: inc/class-wp_recaptcha_options.php:175
|
312 |
+
msgid "Style"
|
313 |
+
msgstr "Stile"
|
314 |
+
|
315 |
+
# @ wp-recaptcha-integration
|
316 |
+
#: inc/class-wp_recaptcha_options.php:282
|
317 |
+
msgid "Comment Form"
|
318 |
+
msgstr "Modulo dei commenti"
|
319 |
+
|
320 |
+
# @ wp-recaptcha-integration
|
321 |
+
#: inc/class-wp_recaptcha_options.php:287
|
322 |
+
msgid "Signup Form"
|
323 |
+
msgstr "Modulo di iscrizione"
|
324 |
+
|
325 |
+
# @ wp-recaptcha-integration
|
326 |
+
#: inc/class-wp_recaptcha_options.php:292
|
327 |
+
msgid "Login Form"
|
328 |
+
msgstr "Form di login"
|
329 |
+
|
330 |
+
# @ wp-recaptcha-integration
|
331 |
+
#: inc/class-wp_recaptcha_options.php:297
|
332 |
+
msgid "Lost Password Form"
|
333 |
+
msgstr "Form password dimenticata"
|
334 |
+
|
335 |
+
# @ wp-recaptcha-integration
|
336 |
+
#: inc/class-wp_recaptcha_options.php:304
|
337 |
+
msgid "woocommerce Checkout"
|
338 |
+
msgstr "Woocommerce: Cassa"
|
339 |
+
|
340 |
+
# @ wp-recaptcha-integration
|
341 |
+
#: inc/class-wp_recaptcha_options.php:308
|
342 |
+
msgid "Forms to protect"
|
343 |
+
msgstr "I form da proteggere"
|
344 |
+
|
345 |
+
# @ wp-recaptcha-integration
|
346 |
+
#: inc/class-wp_recaptcha_options.php:317
|
347 |
+
msgid "Prevent lockout"
|
348 |
+
msgstr "Prevenire il blocco"
|
349 |
+
|
350 |
+
# @ wp-recaptcha-integration
|
351 |
+
#: inc/class-wp_recaptcha_options.php:321
|
352 |
+
msgid "Allow administrator to log in if API keys do not work."
|
353 |
+
msgstr "Consentire all'amministratore di accedere se le chiavi API non funzionano."
|
354 |
+
|
355 |
+
# @ wp-recaptcha-integration
|
356 |
+
#: inc/class-wp_recaptcha_options.php:322
|
357 |
+
msgid "When the captcha verification fails, and the private or public API key does not work the plugin will let you in anyway. Please note that with this option checked plus a broken keypair your site will be open to brute force attacks, that try to guess an administrator password."
|
358 |
+
msgstr "Quando la verifica di captcha non riesce, e la chiave API pubblica o privata non funziona il plugin permettera comunque di effettuare il login. Si prega di notare che con questa opzione selezionata e le chiavi non valide il sito sarà aperto agli attacchi di tipo brute force, con i quali si cerca di indovinare la password dell'utente amministratore."
|
359 |
+
|
360 |
+
# @ wp-recaptcha-integration
|
361 |
+
#: inc/class-wp_recaptcha_options.php:377
|
362 |
+
msgid "Select which forms you want to protect with a captcha."
|
363 |
+
msgstr "Segli quali form devono essere protetti con un captcha."
|
364 |
+
|
365 |
+
# @ wp-recaptcha-integration
|
366 |
+
#: inc/class-wp_recaptcha_options.php:387
|
367 |
+
msgid "Choose a flavor and theme for your Captcha. Please note that with the old style reCaptcha you cannot have more than one captcha per page."
|
368 |
+
msgstr "Scegli il tipo e il tema per il vostro Captcha. Si prega di notare che con il reCaptcha vecchio stile non si può avere più di un captcha per pagina."
|
369 |
+
|
370 |
+
# @ wp-recaptcha-integration
|
371 |
+
#: inc/class-wp_recaptcha_woocommerce.php:72
|
372 |
+
msgid "Are you human"
|
373 |
+
msgstr "sei umano?"
|
languages/wp-recaptcha-integration-pt_PT.mo
ADDED
Binary file
|
languages/wp-recaptcha-integration-pt_PT.po
ADDED
@@ -0,0 +1,481 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress ReCaptcha Integration\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2016-02-14 16:02+0000\n"
|
6 |
+
"PO-Revision-Date: 2016-02-15 21:15+0000\n"
|
7 |
+
"Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
|
8 |
+
"Language-Team: Pedro Mendonça <ped.gaspar@gmail.com>\n"
|
9 |
+
"Language: pt_PT\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
14 |
+
"X-Generator: Poedit 1.8.7\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
18 |
+
"X-Poedit-Basepath: ..\n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ wp-recaptcha-integration
|
23 |
+
#: inc/class-wp_recaptcha.php:392 inc/class-wp_recaptcha.php:438
|
24 |
+
#: inc/class-wp_recaptcha.php:452 inc/class-wp_recaptcha.php:464
|
25 |
+
#: inc/class-wp_recaptcha_bbpress.php:71
|
26 |
+
#: inc/class-wp_recaptcha_woocommerce.php:91
|
27 |
+
#: inc/class-wp_recaptcha_woocommerce.php:100
|
28 |
+
msgid "<strong>Error:</strong> the Captcha didn’t verify."
|
29 |
+
msgstr "<strong>Erro:</strong> o CAPTCHA está incorrecto."
|
30 |
+
|
31 |
+
#: inc/class-wp_recaptcha_awesome_support.php:82
|
32 |
+
msgid "The Captcha didn't verify"
|
33 |
+
msgstr "O CAPTCHA está incorrecto."
|
34 |
+
|
35 |
+
#: inc/class-wp_recaptcha_contactform7.php:51
|
36 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:47
|
37 |
+
msgid "Google reCaptcha does not validate."
|
38 |
+
msgstr "O Google reCAPTCHA não foi validado."
|
39 |
+
|
40 |
+
# @ wp-recaptcha-integration
|
41 |
+
#: inc/class-wp_recaptcha_contactform7.php:52
|
42 |
+
#: inc/class-wp_recaptcha_contactform7.php:225
|
43 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:38
|
44 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:155
|
45 |
+
msgid "The Captcha didn’t verify."
|
46 |
+
msgstr "O CAPTCHA está incorrecto."
|
47 |
+
|
48 |
+
# @ wp-recaptcha-integration
|
49 |
+
#: inc/class-wp_recaptcha_contactform7.php:97
|
50 |
+
#: inc/class-wp_recaptcha_contactform7.php:110
|
51 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:53
|
52 |
+
msgid "reCAPTCHA"
|
53 |
+
msgstr "reCAPTCHA"
|
54 |
+
|
55 |
+
#: inc/class-wp_recaptcha_contactform7.php:116
|
56 |
+
#: inc/class-wp_recaptcha_contactform7.php:119
|
57 |
+
msgid "Field type"
|
58 |
+
msgstr "Tipo de campo"
|
59 |
+
|
60 |
+
#: inc/class-wp_recaptcha_contactform7.php:120
|
61 |
+
msgid "Required field"
|
62 |
+
msgstr "Campo obrigatório"
|
63 |
+
|
64 |
+
# @ contact-form-7
|
65 |
+
#: inc/class-wp_recaptcha_contactform7.php:126
|
66 |
+
#: inc/class-wp_recaptcha_contactform7.php:129
|
67 |
+
#: inc/class-wp_recaptcha_contactform7.php:176
|
68 |
+
msgid "Name"
|
69 |
+
msgstr "Nome"
|
70 |
+
|
71 |
+
# @ contact-form-7
|
72 |
+
# @ wp-recaptcha-integration
|
73 |
+
#: inc/class-wp_recaptcha_contactform7.php:137
|
74 |
+
#: inc/class-wp_recaptcha_contactform7.php:140
|
75 |
+
#: inc/class-wp_recaptcha_contactform7.php:181
|
76 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:89
|
77 |
+
#: inc/class-wp_recaptcha_options.php:228
|
78 |
+
msgid "Theme"
|
79 |
+
msgstr "Tema"
|
80 |
+
|
81 |
+
#: inc/class-wp_recaptcha_contactform7.php:156
|
82 |
+
msgid "Insert Tag"
|
83 |
+
msgstr "Inserir etiqueta"
|
84 |
+
|
85 |
+
# @ contact-form-7
|
86 |
+
#: inc/class-wp_recaptcha_contactform7.php:174
|
87 |
+
msgid "Required field?"
|
88 |
+
msgstr "Campo obrigatório?"
|
89 |
+
|
90 |
+
# @ contact-form-7
|
91 |
+
#: inc/class-wp_recaptcha_contactform7.php:188
|
92 |
+
msgid "Copy this code and paste it into the form left."
|
93 |
+
msgstr "Copie e cole este código no formulário à esquerda."
|
94 |
+
|
95 |
+
# @ wp-recaptcha-integration
|
96 |
+
#: inc/class-wp_recaptcha_contactform7.php:207
|
97 |
+
#: inc/class-wp_recaptcha_ninjaforms.php:81
|
98 |
+
msgid "Use default"
|
99 |
+
msgstr "Usar por omissão"
|
100 |
+
|
101 |
+
# @ wp-recaptcha-integration
|
102 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:89
|
103 |
+
msgid "Light"
|
104 |
+
msgstr "Claro"
|
105 |
+
|
106 |
+
# @ wp-recaptcha-integration
|
107 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:92
|
108 |
+
msgid "Dark"
|
109 |
+
msgstr "Escuro"
|
110 |
+
|
111 |
+
# @ wp-recaptcha-integration
|
112 |
+
#: inc/class-wp_recaptcha_nocaptcha.php:242
|
113 |
+
msgid "Please enable JavaScript to submit this form."
|
114 |
+
msgstr "Por favor, active o JavaScript para enviar este formulário."
|
115 |
+
|
116 |
+
# @ wp-recaptcha-integration
|
117 |
+
#: inc/class-wp_recaptcha_options.php:97 inc/class-wp_recaptcha_options.php:109
|
118 |
+
msgid "reCaptcha Settings"
|
119 |
+
msgstr "Definições do reCAPTCHA"
|
120 |
+
|
121 |
+
# @ wp-recaptcha-integration
|
122 |
+
#: inc/class-wp_recaptcha_options.php:98
|
123 |
+
msgid "reCaptcha"
|
124 |
+
msgstr "reCAPTCHA"
|
125 |
+
|
126 |
+
# @ wp-recaptcha-integration
|
127 |
+
#: inc/class-wp_recaptcha_options.php:158
|
128 |
+
#, php-format
|
129 |
+
msgid ""
|
130 |
+
"<strong>reCaptcha needs your attention:</strong> To make it work You need to "
|
131 |
+
"enter an api key. <br />You can do so at the <a href=\"%s\">reCaptcha "
|
132 |
+
"settings page</a>."
|
133 |
+
msgstr ""
|
134 |
+
"<strong>O reCAPTCHA precisa da sua atenção:</strong> Para que o reCAPTCHA "
|
135 |
+
"funcione correctamente, tem que introduzir uma chave de API. <br />Poderá "
|
136 |
+
"fazer isto na <a href=\"%s\">página das opções do reCAPTCHA</a>."
|
137 |
+
|
138 |
+
# @ wp-recaptcha-integration
|
139 |
+
#: inc/class-wp_recaptcha_options.php:176
|
140 |
+
msgid "Protect"
|
141 |
+
msgstr "Proteger"
|
142 |
+
|
143 |
+
# @ wp-recaptcha-integration
|
144 |
+
#: inc/class-wp_recaptcha_options.php:177
|
145 |
+
msgid "Style"
|
146 |
+
msgstr "Estilo"
|
147 |
+
|
148 |
+
# @ wp-recaptcha-integration
|
149 |
+
#: inc/class-wp_recaptcha_options.php:179
|
150 |
+
msgid "Connect"
|
151 |
+
msgstr "Conectar"
|
152 |
+
|
153 |
+
#: inc/class-wp_recaptcha_options.php:181
|
154 |
+
msgid "Advanced"
|
155 |
+
msgstr "Avançado"
|
156 |
+
|
157 |
+
# @ wp-recaptcha-integration
|
158 |
+
#: inc/class-wp_recaptcha_options.php:187
|
159 |
+
msgid "Site key"
|
160 |
+
msgstr "Chave do site"
|
161 |
+
|
162 |
+
# @ wp-recaptcha-integration
|
163 |
+
#: inc/class-wp_recaptcha_options.php:188
|
164 |
+
msgid "Secret key"
|
165 |
+
msgstr "Chave secreta"
|
166 |
+
|
167 |
+
# @ wp-recaptcha-integration
|
168 |
+
#: inc/class-wp_recaptcha_options.php:210
|
169 |
+
msgid "Flavor"
|
170 |
+
msgstr "Tipo"
|
171 |
+
|
172 |
+
# @ wp-recaptcha-integration
|
173 |
+
#: inc/class-wp_recaptcha_options.php:217
|
174 |
+
msgid "No Captcha where you just click a button"
|
175 |
+
msgstr "Sem CAPTCHA, clique apenas num botão"
|
176 |
+
|
177 |
+
# @ wp-recaptcha-integration
|
178 |
+
#: inc/class-wp_recaptcha_options.php:221
|
179 |
+
msgid "Old style reCAPTCHA where you type some cryptic text"
|
180 |
+
msgstr "Antigo reCAPTCHA, tem que introduzir um texto"
|
181 |
+
|
182 |
+
# @ default
|
183 |
+
#: inc/class-wp_recaptcha_options.php:226
|
184 |
+
msgid "Language Settings"
|
185 |
+
msgstr "Definições de idioma"
|
186 |
+
|
187 |
+
# @ wp-recaptcha-integration
|
188 |
+
#: inc/class-wp_recaptcha_options.php:230
|
189 |
+
msgid "Disable Submit Button"
|
190 |
+
msgstr "Desactivar botão de envio"
|
191 |
+
|
192 |
+
# @ wp-recaptcha-integration
|
193 |
+
#: inc/class-wp_recaptcha_options.php:232
|
194 |
+
msgid "Disable Form Submit Button until no-captcha is entered."
|
195 |
+
msgstr ""
|
196 |
+
"Desactivar o botão de envio enquanto o utilizador não introduzir o CAPTCHA."
|
197 |
+
|
198 |
+
#: inc/class-wp_recaptcha_options.php:234
|
199 |
+
msgid "Noscript Fallback"
|
200 |
+
msgstr "Página de retorno sem script"
|
201 |
+
|
202 |
+
#: inc/class-wp_recaptcha_options.php:238
|
203 |
+
msgid "Provide a fallback for non javascript capable browsers."
|
204 |
+
msgstr "Mostrar uma página alternativa para navegadores sem JavaScript."
|
205 |
+
|
206 |
+
#: inc/class-wp_recaptcha_options.php:239
|
207 |
+
msgid "Leave this unchecked when your site requires JavaScript anyway."
|
208 |
+
msgstr "Não active esta opção se o seu site precisar sempre de JavaScript."
|
209 |
+
|
210 |
+
#: inc/class-wp_recaptcha_options.php:247
|
211 |
+
msgid "Comment Form rendering"
|
212 |
+
msgstr "Apresentação do formulário dos comentários"
|
213 |
+
|
214 |
+
#: inc/class-wp_recaptcha_options.php:251
|
215 |
+
msgid "My Comment Form is WordPress 4.2 compatible."
|
216 |
+
msgstr "O meu formulário de comentários é compatível com o WordPress 4.2."
|
217 |
+
|
218 |
+
#: inc/class-wp_recaptcha_options.php:252
|
219 |
+
msgid ""
|
220 |
+
"Enable this when your comment form uses the "
|
221 |
+
"<code>comment_form_submit_button</code> filter. (Or just try if it works.)"
|
222 |
+
msgstr ""
|
223 |
+
"Active isto se o seu formulário de comentários utilizar o filtro "
|
224 |
+
"<code>comment_form_submit_button</code>. (Experimente para ver se funciona.)"
|
225 |
+
|
226 |
+
# @ wp-recaptcha-integration
|
227 |
+
#: inc/class-wp_recaptcha_options.php:283
|
228 |
+
msgid "Comment Form"
|
229 |
+
msgstr "Formulário de comentários"
|
230 |
+
|
231 |
+
# @ wp-recaptcha-integration
|
232 |
+
#: inc/class-wp_recaptcha_options.php:288
|
233 |
+
msgid "Signup Form"
|
234 |
+
msgstr "Formulário de registo"
|
235 |
+
|
236 |
+
# @ wp-recaptcha-integration
|
237 |
+
#: inc/class-wp_recaptcha_options.php:293
|
238 |
+
msgid "Login Form"
|
239 |
+
msgstr "Formulário de início de sessão"
|
240 |
+
|
241 |
+
# @ wp-recaptcha-integration
|
242 |
+
#: inc/class-wp_recaptcha_options.php:298
|
243 |
+
msgid "Lost Password Form"
|
244 |
+
msgstr "Formulário de recuperação da senha"
|
245 |
+
|
246 |
+
# @ wp-recaptcha-integration
|
247 |
+
#: inc/class-wp_recaptcha_options.php:306
|
248 |
+
msgid "woocommerce Checkout"
|
249 |
+
msgstr "Checkout do WooCommerce"
|
250 |
+
|
251 |
+
#: inc/class-wp_recaptcha_options.php:315
|
252 |
+
msgid "Awesome Support Registration"
|
253 |
+
msgstr "Registo do Awesome Support"
|
254 |
+
|
255 |
+
#: inc/class-wp_recaptcha_options.php:323
|
256 |
+
msgid "bbPress New Topic"
|
257 |
+
msgstr "Novo tópico do bbPress"
|
258 |
+
|
259 |
+
#: inc/class-wp_recaptcha_options.php:329
|
260 |
+
msgid "bbPress New Reply"
|
261 |
+
msgstr "Nova resposta do bbPress"
|
262 |
+
|
263 |
+
# @ wp-recaptcha-integration
|
264 |
+
#: inc/class-wp_recaptcha_options.php:334
|
265 |
+
msgid "Forms to protect"
|
266 |
+
msgstr "Formulários a proteger"
|
267 |
+
|
268 |
+
# @ wp-recaptcha-integration
|
269 |
+
#: inc/class-wp_recaptcha_options.php:339
|
270 |
+
msgid "Disable for known users"
|
271 |
+
msgstr "Desactivar para utilizadores conhecidos"
|
272 |
+
|
273 |
+
# @ wp-recaptcha-integration
|
274 |
+
#: inc/class-wp_recaptcha_options.php:341
|
275 |
+
msgid "Disable reCaptcha verification for logged in users."
|
276 |
+
msgstr ""
|
277 |
+
"Desactivar a verificação reCAPTCHA para utilizadores com sessão iniciada."
|
278 |
+
|
279 |
+
# @ wp-recaptcha-integration
|
280 |
+
#: inc/class-wp_recaptcha_options.php:344
|
281 |
+
msgid "Prevent lockout"
|
282 |
+
msgstr "Evitar bloqueio"
|
283 |
+
|
284 |
+
# @ wp-recaptcha-integration
|
285 |
+
#: inc/class-wp_recaptcha_options.php:348
|
286 |
+
msgid "Allow administrator to log in if API keys do not work."
|
287 |
+
msgstr ""
|
288 |
+
"Permitir ao administrador iniciar a sessão caso as chaves de API não "
|
289 |
+
"funcionem."
|
290 |
+
|
291 |
+
# @ wp-recaptcha-integration
|
292 |
+
#: inc/class-wp_recaptcha_options.php:349
|
293 |
+
msgid ""
|
294 |
+
"When the captcha verification fails, and the private or public API key does "
|
295 |
+
"not work the plugin will let you in anyway. Please note that with this "
|
296 |
+
"option checked plus a broken keypair your site will be open to brute force "
|
297 |
+
"attacks, that try to guess an administrator password."
|
298 |
+
msgstr ""
|
299 |
+
"Quando a verificação de CAPTCHA falha e as chaves de API privada ou pública "
|
300 |
+
"não funcionam, ainda assim o plugin permite iniciar a sessão. Note que com "
|
301 |
+
"esta opção activada e sem o conjunto de chaves em funcionamento, o seu site "
|
302 |
+
"ficará vulnerável a ataques de brute force, através de tentativas sucessivas "
|
303 |
+
"de adivinhar a senha do administrador."
|
304 |
+
|
305 |
+
# @ wp-recaptcha-integration
|
306 |
+
#: inc/class-wp_recaptcha_options.php:355
|
307 |
+
msgid ""
|
308 |
+
"Please configure the public and private key. <a href=\"http://www.google.com/"
|
309 |
+
"recaptcha/whyrecaptcha\">What are you trying to tell me?</a>"
|
310 |
+
msgstr ""
|
311 |
+
"Por favor, configure as chaves pública e privada. <a href=\"http://www."
|
312 |
+
"google.com/recaptcha/whyrecaptcha\">O que significa isto?</a>"
|
313 |
+
|
314 |
+
# @ wp-recaptcha-integration
|
315 |
+
#: inc/class-wp_recaptcha_options.php:368
|
316 |
+
#, php-format
|
317 |
+
msgid ""
|
318 |
+
"Please register your blog through the <a href=\"%s\">Google reCAPTCHA admin "
|
319 |
+
"page</a> and enter the public and private key in the fields below. <a href="
|
320 |
+
"\"%s\">What is this all about?</a>"
|
321 |
+
msgstr ""
|
322 |
+
"Por favor, registe o seu site através da <a href=\"%s\">página de "
|
323 |
+
"administração do Google reCAPTCHA</a> e introduza com a chave do site (Site "
|
324 |
+
"key) bem como a chave secreta (Secret key) nos campos abaixo. <a href=\"%s"
|
325 |
+
"\">O que significa isto?</a>"
|
326 |
+
|
327 |
+
# @ wp-recaptcha-integration
|
328 |
+
#: inc/class-wp_recaptcha_options.php:376
|
329 |
+
msgid "You already entered an API Key. Use the button below to enter it again."
|
330 |
+
msgstr ""
|
331 |
+
"Já introduziu uma chave de API. Utilize o botão abaixo para introduzir de "
|
332 |
+
"novo."
|
333 |
+
|
334 |
+
# @ wp-recaptcha-integration
|
335 |
+
#: inc/class-wp_recaptcha_options.php:391
|
336 |
+
msgid "New API Key"
|
337 |
+
msgstr "Nova chave de API"
|
338 |
+
|
339 |
+
# @ wp-recaptcha-integration
|
340 |
+
#: inc/class-wp_recaptcha_options.php:392
|
341 |
+
msgid "Test API Key"
|
342 |
+
msgstr "Testar chave de API"
|
343 |
+
|
344 |
+
# @ wp-recaptcha-integration
|
345 |
+
#: inc/class-wp_recaptcha_options.php:404
|
346 |
+
msgid "Select which forms you want to protect with a captcha."
|
347 |
+
msgstr "Seleccione os formulários que deseja proteger com um CAPTCHA."
|
348 |
+
|
349 |
+
# @ wp-recaptcha-integration
|
350 |
+
#: inc/class-wp_recaptcha_options.php:421
|
351 |
+
msgid ""
|
352 |
+
"Choose a flavor and theme for your Captcha. Please note that with the old "
|
353 |
+
"style reCaptcha you cannot have more than one captcha per page."
|
354 |
+
msgstr ""
|
355 |
+
"Escolha um tipo e um tema para o seu CAPTCHA. Note que com o reCAPTCHA "
|
356 |
+
"antigo não poderá ter mais do que um CAPTCHA por página."
|
357 |
+
|
358 |
+
# @ wp-recaptcha-integration
|
359 |
+
#: inc/class-wp_recaptcha_options.php:453
|
360 |
+
msgid "Test verfication"
|
361 |
+
msgstr "Verificação de teste"
|
362 |
+
|
363 |
+
# @ wp-recaptcha-integration
|
364 |
+
#: inc/class-wp_recaptcha_options.php:466
|
365 |
+
msgid "The secret Key is missing."
|
366 |
+
msgstr "A chave secreta não foi encontrada."
|
367 |
+
|
368 |
+
# @ wp-recaptcha-integration
|
369 |
+
#: inc/class-wp_recaptcha_options.php:467
|
370 |
+
msgid ""
|
371 |
+
"The secret Key is invalid. You better check your domain configuration and "
|
372 |
+
"enter it again."
|
373 |
+
msgstr ""
|
374 |
+
"A chave secreta é inválida. Verifique as configurações do seu domínio e "
|
375 |
+
"introduza de novo."
|
376 |
+
|
377 |
+
# @ wp-recaptcha-integration
|
378 |
+
#: inc/class-wp_recaptcha_options.php:468
|
379 |
+
msgid "The user response was missing"
|
380 |
+
msgstr "Nenhuma resposta do utilizador"
|
381 |
+
|
382 |
+
# @ wp-recaptcha-integration
|
383 |
+
#: inc/class-wp_recaptcha_options.php:469
|
384 |
+
msgid "Invalid user response"
|
385 |
+
msgstr "Resposta do utilizador inválida"
|
386 |
+
|
387 |
+
# @ wp-recaptcha-integration
|
388 |
+
#: inc/class-wp_recaptcha_options.php:478
|
389 |
+
msgid "Works! All good!"
|
390 |
+
msgstr "Funcionou! Está tudo bem!"
|
391 |
+
|
392 |
+
# @ default
|
393 |
+
#: inc/class-wp_recaptcha_options.php:490
|
394 |
+
msgid "Cancel"
|
395 |
+
msgstr "Cancelar"
|
396 |
+
|
397 |
+
# @ wp-recaptcha-integration
|
398 |
+
#: inc/class-wp_recaptcha_options.php:611
|
399 |
+
msgid "Automatic"
|
400 |
+
msgstr "Automático"
|
401 |
+
|
402 |
+
# @ default
|
403 |
+
#: inc/class-wp_recaptcha_options.php:612
|
404 |
+
msgid "Site Language"
|
405 |
+
msgstr "Idioma do site"
|
406 |
+
|
407 |
+
# @ default
|
408 |
+
#: inc/class-wp_recaptcha_options.php:613
|
409 |
+
msgid "Other"
|
410 |
+
msgstr "Outro"
|
411 |
+
|
412 |
+
# @ wp-recaptcha-integration
|
413 |
+
#: inc/class-wp_recaptcha_options.php:651
|
414 |
+
msgid "Unstyled HTML to apply your own Stylesheets."
|
415 |
+
msgstr "HTML simples para aplicar o seu próprio estilo."
|
416 |
+
|
417 |
+
# @ wp-recaptcha-integration
|
418 |
+
#: inc/class-wp_recaptcha_options.php:724
|
419 |
+
#: inc/class-wp_recaptcha_options.php:749
|
420 |
+
msgid "ReCaptcha"
|
421 |
+
msgstr "reCAPTCHA"
|
422 |
+
|
423 |
+
# @ default
|
424 |
+
#: inc/class-wp_recaptcha_options.php:747
|
425 |
+
msgid "Settings"
|
426 |
+
msgstr "Definições"
|
427 |
+
|
428 |
+
# @ wp-recaptcha-integration
|
429 |
+
#: inc/class-wp_recaptcha_recaptcha.php:60
|
430 |
+
msgid "Red"
|
431 |
+
msgstr "Vermelho"
|
432 |
+
|
433 |
+
# @ wp-recaptcha-integration
|
434 |
+
#: inc/class-wp_recaptcha_recaptcha.php:63
|
435 |
+
msgid "White"
|
436 |
+
msgstr "Branco"
|
437 |
+
|
438 |
+
# @ wp-recaptcha-integration
|
439 |
+
#: inc/class-wp_recaptcha_recaptcha.php:66
|
440 |
+
msgid "Black Glass"
|
441 |
+
msgstr "Preto"
|
442 |
+
|
443 |
+
# @ wp-recaptcha-integration
|
444 |
+
#: inc/class-wp_recaptcha_recaptcha.php:69
|
445 |
+
msgid "Clean"
|
446 |
+
msgstr "Limpo"
|
447 |
+
|
448 |
+
# @ wp-recaptcha-integration
|
449 |
+
#: inc/class-wp_recaptcha_recaptcha.php:72
|
450 |
+
msgid "Custom"
|
451 |
+
msgstr "Personalizado"
|
452 |
+
|
453 |
+
# @ wp-recaptcha-integration
|
454 |
+
#: inc/class-wp_recaptcha_recaptcha.php:181
|
455 |
+
msgid "Incorrect please try again"
|
456 |
+
msgstr "Incorrecto, por favor tente de novo"
|
457 |
+
|
458 |
+
# @ wp-recaptcha-integration
|
459 |
+
#: inc/class-wp_recaptcha_recaptcha.php:183
|
460 |
+
msgid "Enter the words above:"
|
461 |
+
msgstr "Introduza as palavras acima:"
|
462 |
+
|
463 |
+
# @ wp-recaptcha-integration
|
464 |
+
#: inc/class-wp_recaptcha_recaptcha.php:184
|
465 |
+
msgid "Enter the numbers you hear:"
|
466 |
+
msgstr "Introduza os números que ouvir:"
|
467 |
+
|
468 |
+
# @ wp-recaptcha-integration
|
469 |
+
#: inc/class-wp_recaptcha_recaptcha.php:188
|
470 |
+
msgid "Get another CAPTCHA"
|
471 |
+
msgstr "Obter novo CAPTCHA"
|
472 |
+
|
473 |
+
# @ wp-recaptcha-integration
|
474 |
+
#: inc/class-wp_recaptcha_recaptcha.php:189
|
475 |
+
msgid "Get an audio CAPTCHA"
|
476 |
+
msgstr "Obter um CAPTCHA de áudio"
|
477 |
+
|
478 |
+
# @ wp-recaptcha-integration
|
479 |
+
#: inc/class-wp_recaptcha_recaptcha.php:190
|
480 |
+
msgid "Get an image CAPTCHA"
|
481 |
+
msgstr "Obter um CAPTCHA de imagem"
|
readme.txt
CHANGED
@@ -1,34 +1,38 @@
|
|
1 |
=== WordPress ReCaptcha Integration ===
|
2 |
Contributors: podpirate
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F8NKC6TCASUXE
|
4 |
-
Tags: security,
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
reCaptcha for login, signup, comment forms
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Integrate reCaptcha in your blog. Supports no Captcha as well as old style recaptcha.
|
16 |
-
Provides of the box integration for signup, login, comment forms
|
17 |
-
|
18 |
|
19 |
= Features: =
|
20 |
-
- Secures login, signup
|
21 |
- Supports old as well as new reCaptcha.
|
22 |
-
-
|
23 |
-
-
|
24 |
-
-
|
25 |
-
-
|
26 |
-
- [
|
27 |
-
-
|
|
|
|
|
|
|
28 |
|
29 |
= Localizations =
|
30 |
- Brazilian Portuguese (thanks to [Vinícius Ferraz](http://www.viniciusferraz.com))
|
31 |
- Spanish (thanks to [Ivan Yivoff](https://github.com/yivi))
|
|
|
32 |
- German
|
33 |
|
34 |
Latest Files on GitHub: [https://github.com/mcguffin/wp-recaptcha-integration](https://github.com/mcguffin/wp-recaptcha-integration)
|
@@ -39,32 +43,18 @@ On a **WP Multisite** you can either activate the plugin network wide or on a si
|
|
39 |
|
40 |
Activated on a single site everything works as usual.
|
41 |
|
42 |
-
With network activation entering the API key and setting up where a captcha is required
|
43 |
-
is up to the network admin. A blog admin can override the API key e.g. when his blog is
|
44 |
-
running under his/her own domain name.
|
45 |
|
46 |
|
47 |
= Known Limitations =
|
48 |
-
- You can't have more than one old style reCaptcha on a page. This is a limitiation of
|
49 |
-
reCaptcha itself. If that's an issue for you, you should use the no Captcha Form.
|
50 |
-
|
51 |
-
- A No Captcha definitely requires client side JavaScript enabled. That's how it does its
|
52 |
-
sophisticated bot detection magic. There is no fallback. If your visitor does not have
|
53 |
-
JS enabled the captcha test will not let him through.
|
54 |
-
|
55 |
-
- On a **Contact Form 7** when the reCaptcha is disabled (e.g. for logged in users) the field
|
56 |
-
label will be still visible. This is due to CF7 Shortcode architecture, and can't be fixed.
|
57 |
-
|
58 |
-
To handle this there is a filter `recaptcha_disabled_html`. You can return a message for your logged-in
|
59 |
-
users here. Check out the [GitHub Repo](https://github.com/mcguffin/wp-recaptcha-integration) for details.
|
60 |
|
61 |
-
-
|
62 |
-
|
63 |
-
- In **WooCommerce** the reset password form can not be protected by a captcha. Woocommerce does
|
64 |
not fire any action in the lost password form, so there is no way for the plugin to hook in.
|
65 |
Take a look at [this thread](https://wordpress.org/support/topic/captcha-not-showing-on-lost-password-page?replies=7) for a workaround.
|
66 |
|
67 |
-
- Due to a lack of filters there is no (and as far as one can see, there will never be)
|
68 |
support for the **MailPoet** subscription form.
|
69 |
|
70 |
== Installation ==
|
@@ -77,18 +67,18 @@ Then go to the [Google Recaptcha Site](http://www.google.com/recaptcha), registe
|
|
77 |
|
78 |
= The login captcha says 'ERROR: (something somthing)'. What can I do? =
|
79 |
|
80 |
-
If it says 'Invalid sitekey' and you checked the 'Prevent lockout' option on the plugin
|
81 |
-
settings (it's on by default) you can log in with an administrator account and ignore the
|
82 |
-
captcha. If the keys are really invalid, the plugin will let you in, so you can set up a
|
83 |
-
new keypair.
|
84 |
|
85 |
-
When you see "Invalid domain for site key", then the key is okay in general, but not for
|
86 |
-
your domain. The server can not test this case, so an effective lockout prevention is not
|
87 |
possible.
|
88 |
|
89 |
You will either need one of the following:
|
90 |
- access to the settings for your sitekey on [reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
91 |
-
- access to your WordPress installation (via SSH or FTP) or database access
|
92 |
- database access
|
93 |
|
94 |
|
@@ -96,24 +86,24 @@ You will either need one of the following:
|
|
96 |
|
97 |
1. Look at source code of the login page.
|
98 |
|
99 |
-
2. Find the part saying <code>data-sitekey="
|
100 |
-
The part
|
101 |
|
102 |
3. Go to the [Google reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
103 |
|
104 |
4. Find the list entry with the sitekey from step 2
|
105 |
|
106 |
5. If lockout prevention is enabled you can simply delete the key set up a new one.
|
107 |
-
If not enter your domain name at "Domains" in a new line and wait up to 30 minutes.
|
108 |
|
109 |
|
110 |
**With FTP Access:**
|
111 |
|
112 |
-
1. Add this line of Code somewhere at the end of your theme functions.php:
|
113 |
<code>add_filter('wp_recaptcha_required','__return_false');</code>
|
114 |
-
|
115 |
This will disable the chaptcha everywhere.
|
116 |
-
|
117 |
2. Set up a new keypair and test it.
|
118 |
|
119 |
3. Remove the line above from your theme functions.php.
|
@@ -121,12 +111,12 @@ You will either need one of the following:
|
|
121 |
|
122 |
**If you have Database access**
|
123 |
|
124 |
-
1. Execute the following SQL-Commands in your Database:
|
125 |
-
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_publickey';</code>
|
126 |
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_privatekey';</code>
|
127 |
|
128 |
(Please note that `wp_options` might have a different prefix in your installation.)
|
129 |
-
|
130 |
2. After the login you will see a message asking you to set up the API keys.
|
131 |
|
132 |
3. Set up a new keypair on Google and test it.
|
@@ -139,36 +129,41 @@ That's too bad...
|
|
139 |
|
140 |
= I can't get it to work with my custom comments form. Will you fix for me? =
|
141 |
|
142 |
-
|
|
|
143 |
|
144 |
|
145 |
= Privacy: Will the captcha send the visitors IP address to google? =
|
146 |
|
147 |
-
Yes and no. The captcha verification process,
|
148 |
the challenge does not require the disclosure of the visitors IP address, so it is omitted.
|
149 |
|
150 |
-
But everything related to the displaying of the captcha widget like the challenge image,
|
151 |
-
the JavaScripts and so on is loaded directly from Google and is very likely to be logged,
|
152 |
evaluated and stored forever.
|
153 |
|
154 |
-
In other words: Google knows which (recaptcha protected) website is accessed from which IP.
|
155 |
|
156 |
-
If that's an issue for you, you
|
157 |
|
158 |
|
159 |
= Will you support plugin XYZ? =
|
160 |
|
161 |
-
If XYZ stands for a widely used free and OpenSource plugin in active development with some
|
162 |
-
100k+ downloads I will give it a try. Just ask.
|
|
|
|
|
|
|
|
|
163 |
|
164 |
|
165 |
= The captcha does not show up. What’s wrong? =
|
166 |
|
167 |
On the plugin settings page check out if the option “Disable for known users” is activated (it is by default).
|
168 |
-
Then log out (or open your page in a private browser window) and try again.
|
169 |
|
170 |
-
If only the comment form is affected, it is very likely that your Theme does not use the
|
171 |
-
`comment_form_defaults` filter. (That‘s where I add the captcha HTML, to make it appear
|
172 |
right before the submit button.) You will have to use another hook, e.g. `comment_form_after_fields`.
|
173 |
|
174 |
Here is some code that will fix it:
|
@@ -179,13 +174,13 @@ Here is some code that will fix it:
|
|
179 |
- Create a zip Archive out of the included file `recaptcha-comment-form-fix.php` and name it `recaptcha-comment-form-fix.zip`.
|
180 |
- Install and activate it like any other WordPress plugin
|
181 |
|
182 |
-
If the problem still persist, Houston really has a problem, and you are welcome to post a support request.
|
183 |
|
184 |
|
185 |
= Disabled submit buttons should be grey! Why aren't they? =
|
186 |
|
187 |
-
Very likely the Author of your Theme didn't care that a
|
188 |
-
look different than a functional one. This how you can overcome that issue:
|
189 |
|
190 |
- Go to (https://gist.github.com/mcguffin/7cbfb0dab73eb32cb4a2)
|
191 |
- Click the "Download Gist" button
|
@@ -196,8 +191,8 @@ look different than a functional one. This how you can overcome that issue:
|
|
196 |
|
197 |
= I want my visitors to solve only one Captcha and then never again. Is that possible? =
|
198 |
|
199 |
-
Yes. You can store in a session if a captcha was solved, and use the `wp_recaptcha_required`
|
200 |
-
filter to supress further captchas. See (https://github.com/mcguffin/wp-recaptcha-integration#real-world-example)
|
201 |
for a code example.
|
202 |
|
203 |
|
@@ -218,35 +213,60 @@ Use the GitHub Repo rather than the WordPress Plugin. Do as follows:
|
|
218 |
|
219 |
4. If you want to update to the latest files (be careful, might be untested with your WP-Version) type `git pull.
|
220 |
|
221 |
-
Please note that the GitHub repository is more likely to contain unstable and untested code. Urgent fixes
|
222 |
-
concerning stability or security (like crashes, vulnerabilities and alike) are more likely to be fixed in
|
223 |
the official WP plugin repository first.
|
224 |
|
225 |
|
226 |
-
= I found a bug and fixed it. How can I contribute? =
|
227 |
-
|
228 |
-
Either post it on [GitHub](https://github.com/mcguffin/wp-recaptcha-integration) or—if you are working on a forked repository—send me a pull request.
|
229 |
-
|
230 |
-
|
231 |
= Will you accept translations? =
|
232 |
|
233 |
-
|
234 |
-
will appear in an official plugin release, and it is not unlikely that I will have added
|
235 |
-
or removed some strings in the meantime.
|
236 |
|
237 |
-
As soon as there is a [public centralized repository for WordPress plugin translations](https://translate.wordpress.org/projects/wp-plugins)
|
238 |
-
I will migrate all the translation stuff there.
|
239 |
|
240 |
|
241 |
== Screenshots ==
|
242 |
|
243 |
1. Plugin Settings (v 1.1.4)
|
244 |
-
2. Ninja Form Integration
|
245 |
-
3. Contact Form 7 Integration
|
246 |
|
|
|
247 |
|
248 |
== Changelog ==
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
= 1.1.6 =
|
251 |
- Fix: Skip Ninja Forms required check
|
252 |
|
@@ -327,7 +347,7 @@ I will migrate all the translation stuff there.
|
|
327 |
- Action hook for wp_recaptcha_checked
|
328 |
- NoCaptcha: add non-js fallback.
|
329 |
- Code: pass `WP_Error` to `wp_die()` when comment captcha fails.
|
330 |
-
- Code: Rename filters recaptcha_required > wp_recaptcha_required and recaptcha_disabled_html > wp_recaptcha_disabled_html
|
331 |
- Happy New Year!
|
332 |
|
333 |
= 1.0.2 =
|
1 |
=== WordPress ReCaptcha Integration ===
|
2 |
Contributors: podpirate
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F8NKC6TCASUXE
|
4 |
+
Tags: security, recaptcha, login, signup, woocommerce
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 1.3.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
reCaptcha for login, signup, comment forms and woocommerce.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Integrate reCaptcha in your blog. Supports no Captcha as well as old style recaptcha.
|
16 |
+
Provides of the box integration for signup, login, comment forms as well
|
17 |
+
as a plugin API for your own integrations.
|
18 |
|
19 |
= Features: =
|
20 |
+
- Secures login, signup und comments with a recaptcha.
|
21 |
- Supports old as well as new reCaptcha.
|
22 |
+
- Works together with
|
23 |
+
- WP Multisite
|
24 |
+
- bbPress (thanks to [Tareq Hasan](http://tareq.wedevs.com/)
|
25 |
+
- BuddyPress
|
26 |
+
- AwesomeSupport (thanks to [Julien Liabeuf](http://julienliabeuf.com/)
|
27 |
+
- WooCommerce (Only checkout, registration and login form. Not password reset)
|
28 |
+
- cformsII
|
29 |
+
|
30 |
+
- For integration in your self-coded forms see this [wiki article](https://github.com/mcguffin/wp-recaptcha-integration/wiki/Custom-Themes-and-Forms) for details.
|
31 |
|
32 |
= Localizations =
|
33 |
- Brazilian Portuguese (thanks to [Vinícius Ferraz](http://www.viniciusferraz.com))
|
34 |
- Spanish (thanks to [Ivan Yivoff](https://github.com/yivi))
|
35 |
+
- Italian (thanks to [Salaros](http://blog.salaros.com/))
|
36 |
- German
|
37 |
|
38 |
Latest Files on GitHub: [https://github.com/mcguffin/wp-recaptcha-integration](https://github.com/mcguffin/wp-recaptcha-integration)
|
43 |
|
44 |
Activated on a single site everything works as usual.
|
45 |
|
46 |
+
With network activation entering the API key and setting up where a captcha is required
|
47 |
+
is up to the network admin. A blog admin can override the API key e.g. when his blog is
|
48 |
+
running under his/her own domain name.
|
49 |
|
50 |
|
51 |
= Known Limitations =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
- In **WooCommerce** the reset password form can not be protected by a captcha. Woocommerce does
|
|
|
|
|
54 |
not fire any action in the lost password form, so there is no way for the plugin to hook in.
|
55 |
Take a look at [this thread](https://wordpress.org/support/topic/captcha-not-showing-on-lost-password-page?replies=7) for a workaround.
|
56 |
|
57 |
+
- Due to a lack of filters there is no (and as far as one can see, there will never be)
|
58 |
support for the **MailPoet** subscription form.
|
59 |
|
60 |
== Installation ==
|
67 |
|
68 |
= The login captcha says 'ERROR: (something somthing)'. What can I do? =
|
69 |
|
70 |
+
If it says 'Invalid sitekey' and you checked the 'Prevent lockout' option on the plugin
|
71 |
+
settings (it's on by default) you can log in with an administrator account and ignore the
|
72 |
+
captcha. If the keys are really invalid, the plugin will let you in, so you can set up a
|
73 |
+
new keypair.
|
74 |
|
75 |
+
When you see "Invalid domain for site key", then the key is okay in general, but not for
|
76 |
+
your domain. The server can not test this case, so an effective lockout prevention is not
|
77 |
possible.
|
78 |
|
79 |
You will either need one of the following:
|
80 |
- access to the settings for your sitekey on [reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
81 |
+
- access to your WordPress installation (via SSH or FTP) or database access
|
82 |
- database access
|
83 |
|
84 |
|
86 |
|
87 |
1. Look at source code of the login page.
|
88 |
|
89 |
+
2. Find the part saying <code>data-sitekey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"</code>
|
90 |
+
(The XXX-part should be your sitekey.)
|
91 |
|
92 |
3. Go to the [Google reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
93 |
|
94 |
4. Find the list entry with the sitekey from step 2
|
95 |
|
96 |
5. If lockout prevention is enabled you can simply delete the key set up a new one.
|
97 |
+
If not enter your domain name at "Domains" in a new line and wait up to 30 minutes.
|
98 |
|
99 |
|
100 |
**With FTP Access:**
|
101 |
|
102 |
+
1. Add this line of Code somewhere at the end of your theme functions.php:
|
103 |
<code>add_filter('wp_recaptcha_required','__return_false');</code>
|
104 |
+
|
105 |
This will disable the chaptcha everywhere.
|
106 |
+
|
107 |
2. Set up a new keypair and test it.
|
108 |
|
109 |
3. Remove the line above from your theme functions.php.
|
111 |
|
112 |
**If you have Database access**
|
113 |
|
114 |
+
1. Execute the following SQL-Commands in your Database:
|
115 |
+
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_publickey';</code>
|
116 |
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_privatekey';</code>
|
117 |
|
118 |
(Please note that `wp_options` might have a different prefix in your installation.)
|
119 |
+
|
120 |
2. After the login you will see a message asking you to set up the API keys.
|
121 |
|
122 |
3. Set up a new keypair on Google and test it.
|
129 |
|
130 |
= I can't get it to work with my custom comments form. Will you fix for me? =
|
131 |
|
132 |
+
Nope. I cannot give support on your individual projects for free, no matter how many one
|
133 |
+
star reviews you will give me. Have a look at the project wiki or find a WordPress coder.
|
134 |
|
135 |
|
136 |
= Privacy: Will the captcha send the visitors IP address to google? =
|
137 |
|
138 |
+
Yes and no. The captcha verification process, coming into effect after the user has solved
|
139 |
the challenge does not require the disclosure of the visitors IP address, so it is omitted.
|
140 |
|
141 |
+
But everything related to the displaying of the captcha widget like the challenge image,
|
142 |
+
the JavaScripts and so on is loaded directly from Google and is very likely to be logged,
|
143 |
evaluated and stored forever.
|
144 |
|
145 |
+
In other words: Google knows which (recaptcha protected) website is accessed from which IP.
|
146 |
|
147 |
+
If that's an issue for you, you better use a self hosted solution.
|
148 |
|
149 |
|
150 |
= Will you support plugin XYZ? =
|
151 |
|
152 |
+
If XYZ stands for a widely used free and OpenSource plugin in active development with some
|
153 |
+
100k+ downloads I will give it a try. Just ask.
|
154 |
+
|
155 |
+
If XYZ is some rarely used plugin (about 1k+ active installs or so), I will accept pull
|
156 |
+
requests on github and push it to the WP repository. Please note that in such cases I will
|
157 |
+
not feel responsible for code maintainance.
|
158 |
|
159 |
|
160 |
= The captcha does not show up. What’s wrong? =
|
161 |
|
162 |
On the plugin settings page check out if the option “Disable for known users” is activated (it is by default).
|
163 |
+
Then log out (or open your page in a private browser window) and try again.
|
164 |
|
165 |
+
If only the comment form is affected, it is very likely that your Theme does not use the
|
166 |
+
`comment_form_defaults` filter. (That‘s where I add the captcha HTML, to make it appear
|
167 |
right before the submit button.) You will have to use another hook, e.g. `comment_form_after_fields`.
|
168 |
|
169 |
Here is some code that will fix it:
|
174 |
- Create a zip Archive out of the included file `recaptcha-comment-form-fix.php` and name it `recaptcha-comment-form-fix.zip`.
|
175 |
- Install and activate it like any other WordPress plugin
|
176 |
|
177 |
+
If the problem still persist, Houston really has a problem, and you are welcome to post a support request.
|
178 |
|
179 |
|
180 |
= Disabled submit buttons should be grey! Why aren't they? =
|
181 |
|
182 |
+
Very likely the Author of your Theme didn't care that a diabled form element should
|
183 |
+
look different than a functional one. This how you can overcome that issue:
|
184 |
|
185 |
- Go to (https://gist.github.com/mcguffin/7cbfb0dab73eb32cb4a2)
|
186 |
- Click the "Download Gist" button
|
191 |
|
192 |
= I want my visitors to solve only one Captcha and then never again. Is that possible? =
|
193 |
|
194 |
+
Yes. You can store in a session if a captcha was solved, and use the `wp_recaptcha_required`
|
195 |
+
filter to supress further captchas. See (https://github.com/mcguffin/wp-recaptcha-integration#real-world-example)
|
196 |
for a code example.
|
197 |
|
198 |
|
213 |
|
214 |
4. If you want to update to the latest files (be careful, might be untested with your WP-Version) type `git pull.
|
215 |
|
216 |
+
Please note that the GitHub repository is more likely to contain unstable and untested code. Urgent fixes
|
217 |
+
concerning stability or security (like crashes, vulnerabilities and alike) are more likely to be fixed in
|
218 |
the official WP plugin repository first.
|
219 |
|
220 |
|
|
|
|
|
|
|
|
|
|
|
221 |
= Will you accept translations? =
|
222 |
|
223 |
+
Please contribute to the official (translation Project for the ReCaptcha Plugin)[https://translate.wordpress.org/projects/wp-plugins/wp-recaptcha-integration].
|
|
|
|
|
224 |
|
|
|
|
|
225 |
|
226 |
|
227 |
== Screenshots ==
|
228 |
|
229 |
1. Plugin Settings (v 1.1.4)
|
|
|
|
|
230 |
|
231 |
+
== Upgrade Notice ==
|
232 |
|
233 |
== Changelog ==
|
234 |
|
235 |
+
= 1.3.0 =
|
236 |
+
- Drop most of Contact form 7 and Ninja Forms support. (Both have their own recaptcha now)
|
237 |
+
- Deprecate recaptcha v1.
|
238 |
+
- New Option: Size
|
239 |
+
- New Option: Submit form when captcha is solved
|
240 |
+
- Cleanup options page
|
241 |
+
- Register Form compatibility with WooCommerce 3.0+ Thanks to [ywatt](https://github.com/ingomarent) and [MrFent37](https://wordpress.org/support/users/mrfent37/)
|
242 |
+
|
243 |
+
= 1.2.0 =
|
244 |
+
- Support [cformsII](https://wordpress.org/plugins/cforms2/) (thanks to [Bastian Germann](https://github.com/bgermann))
|
245 |
+
- Support for Password Reset Protection for older woocommerce Versions [ingomarent](https://github.com/ingomarent)
|
246 |
+
- L10n: Czech (thanks to [František Zatloukal](https://github.com/frantisekz))
|
247 |
+
- Fix potential PHP Warnngs (thanks to [Gennady Kovshenin](https://github.com/soulseekah))
|
248 |
+
|
249 |
+
= 1.1.11 =
|
250 |
+
- Code: Move plugin main class to include directory
|
251 |
+
- Update: Disable 2.0 updates on PHP < 5.4
|
252 |
+
|
253 |
+
= 1.1.10 =
|
254 |
+
- Feature: Changed Contact Form 7 support: As of version 4.3 CF7 comes with its own recaptcha. The plugin now just makes sure both captchas work together. It also keeps the API keys in sync.
|
255 |
+
- Fix: Disable Captcha for logged in users now respects custom roles without read capability. (Thanks to [@lainme](https://github.com/lainme))
|
256 |
+
|
257 |
+
= 1.1.9 =
|
258 |
+
- Fix: Layout issues on recaptcha nojs fallback (thanks to [nurupo](https://github.com/nurupo))
|
259 |
+
- Metadata: add plugin textdomain
|
260 |
+
|
261 |
+
= 1.1.8 =
|
262 |
+
- Feature: Support AwesomeSupport
|
263 |
+
- Feature: Support bbPress new Topics and posts
|
264 |
+
- L10n: italian
|
265 |
+
- Fix: Layout issue on theme twenty fifteen (recaptcha)
|
266 |
+
|
267 |
+
= 1.1.7 =
|
268 |
+
- Fix: Compatibility with CF7 4.2 User Interface
|
269 |
+
|
270 |
= 1.1.6 =
|
271 |
- Fix: Skip Ninja Forms required check
|
272 |
|
347 |
- Action hook for wp_recaptcha_checked
|
348 |
- NoCaptcha: add non-js fallback.
|
349 |
- Code: pass `WP_Error` to `wp_die()` when comment captcha fails.
|
350 |
+
- Code: Rename filters recaptcha_required > wp_recaptcha_required and recaptcha_disabled_html > wp_recaptcha_disabled_html
|
351 |
- Happy New Year!
|
352 |
|
353 |
= 1.0.2 =
|
screenshot-1.png
DELETED
Binary file
|
screenshot-2.png
DELETED
Binary file
|
screenshot-3.png
DELETED
Binary file
|
wp-recaptcha-integration.php
CHANGED
@@ -3,15 +3,16 @@
|
|
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.
|
7 |
Author: Jörn Lund
|
8 |
Author URI: https://github.com/mcguffin/
|
|
|
9 |
*/
|
10 |
|
11 |
/* Copyright 2014 Jörn Lund (email : joern AT podpirate DOT org)
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
-
it under the terms of the GNU General Public License, version 2, as
|
15 |
published by the Free Software Foundation.
|
16 |
|
17 |
This program is distributed in the hope that it will be useful,
|
@@ -24,680 +25,33 @@ Author URI: https://github.com/mcguffin/
|
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Plugin base Class
|
31 |
-
*/
|
32 |
-
class WP_reCaptcha {
|
33 |
-
|
34 |
-
private static $_is_network_activated = null;
|
35 |
-
|
36 |
-
private $_has_api_key = false;
|
37 |
-
|
38 |
-
private $last_error = '';
|
39 |
-
private $_last_result;
|
40 |
-
|
41 |
-
private $_counter = 0;
|
42 |
-
|
43 |
-
private $_captcha_instance = null;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Holding the singleton instance
|
47 |
-
*/
|
48 |
-
private static $_instance = null;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* @return WP_reCaptcha
|
52 |
-
*/
|
53 |
-
public static function instance(){
|
54 |
-
if ( is_null( self::$_instance ) )
|
55 |
-
self::$_instance = new self();
|
56 |
-
return self::$_instance;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Prevent from creating more instances
|
61 |
-
*/
|
62 |
-
private function __clone() { }
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Prevent from creating more than one instance
|
66 |
-
*/
|
67 |
-
private function __construct() {
|
68 |
-
add_option('recaptcha_flavor','grecaptcha'); // local
|
69 |
-
add_option('recaptcha_theme','light'); // local
|
70 |
-
add_option('recaptcha_disable_submit',false); // local
|
71 |
-
add_option('recaptcha_noscript',false); // local
|
72 |
-
add_option('recaptcha_comment_use_42_filter',false); // local
|
73 |
-
add_option('recaptcha_publickey',''); // 1st global -> then local
|
74 |
-
add_option('recaptcha_privatekey',''); // 1st global -> then local
|
75 |
-
add_option('recaptcha_language',''); // 1st global -> then local
|
76 |
-
|
77 |
-
if ( WP_reCaptcha::is_network_activated() ) {
|
78 |
-
add_site_option('recaptcha_publickey',''); // 1st global -> then local
|
79 |
-
add_site_option('recaptcha_privatekey',''); // 1st global -> then local
|
80 |
-
|
81 |
-
add_site_option('recaptcha_enable_comments' , true); // global
|
82 |
-
add_site_option('recaptcha_enable_signup' , true); // global
|
83 |
-
add_site_option('recaptcha_enable_login' , false); // global
|
84 |
-
add_site_option('recaptcha_enable_lostpw' , false); // global
|
85 |
-
add_site_option('recaptcha_disable_for_known_users' , true); // global
|
86 |
-
add_site_option( 'recaptcha_lockout' , true );
|
87 |
-
} else {
|
88 |
-
add_option( 'recaptcha_enable_comments' , true); // global
|
89 |
-
add_option( 'recaptcha_enable_signup' , true); // global
|
90 |
-
add_option( 'recaptcha_enable_login' , false); // global
|
91 |
-
add_option( 'recaptcha_enable_lostpw' , false); // global
|
92 |
-
add_option( 'recaptcha_disable_for_known_users' , true); // global
|
93 |
-
add_option( 'recaptcha_lockout' , true );
|
94 |
-
}
|
95 |
-
$this->_has_api_key = $this->get_option( 'recaptcha_publickey' ) && $this->get_option( 'recaptcha_privatekey' );
|
96 |
-
|
97 |
-
if ( $this->has_api_key() ) {
|
98 |
-
|
99 |
-
add_action('init' , array(&$this,'init') , 9 );
|
100 |
-
add_action('plugins_loaded' , array(&$this,'plugins_loaded') );
|
101 |
-
|
102 |
-
}
|
103 |
-
|
104 |
-
register_activation_hook( __FILE__ , array( __CLASS__ , 'activate' ) );
|
105 |
-
register_deactivation_hook( __FILE__ , array( __CLASS__ , 'deactivate' ) );
|
106 |
-
register_uninstall_hook( __FILE__ , array( __CLASS__ , 'uninstall' ) );
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Load ninja/cf7 php files if necessary
|
111 |
-
* Hooks into 'plugins_loaded'
|
112 |
-
*/
|
113 |
-
function plugins_loaded() {
|
114 |
-
if ( $this->has_api_key() ) {
|
115 |
-
// NinjaForms support
|
116 |
-
// check if ninja forms is present
|
117 |
-
if ( class_exists('Ninja_Forms') || function_exists('ninja_forms_register_field') )
|
118 |
-
WP_reCaptcha_NinjaForms::instance();
|
119 |
-
|
120 |
-
// CF7 support
|
121 |
-
// check if contact form 7 forms is present
|
122 |
-
if ( function_exists('wpcf7') )
|
123 |
-
WP_reCaptcha_ContactForm7::instance();
|
124 |
-
|
125 |
-
// WooCommerce support
|
126 |
-
// check if woocommerce is present
|
127 |
-
if ( function_exists('WC') || class_exists('WooCommerce') )
|
128 |
-
WP_reCaptcha_WooCommerce::instance();
|
129 |
-
|
130 |
-
}
|
131 |
-
}
|
132 |
-
/**
|
133 |
-
* Init plugin
|
134 |
-
* set hooks
|
135 |
-
*/
|
136 |
-
function init() {
|
137 |
-
load_plugin_textdomain( 'wp-recaptcha-integration', false , dirname( plugin_basename( __FILE__ ) ).'/languages/' );
|
138 |
-
$require_recaptcha = $this->is_required();
|
139 |
-
|
140 |
-
if ( $require_recaptcha ) {
|
141 |
-
add_action( 'wp_head' , array($this,'recaptcha_head') );
|
142 |
-
add_action( 'wp_footer' , array($this,'recaptcha_foot') );
|
143 |
-
|
144 |
-
if ( $this->get_option('recaptcha_enable_signup') || $this->get_option('recaptcha_enable_login') || $this->get_option('recaptcha_enable_lostpw') ) {
|
145 |
-
add_action( 'login_head' , array(&$this,'recaptcha_head') );
|
146 |
-
add_action( 'login_head' , array(&$this,'recaptcha_login_head') );
|
147 |
-
add_action( 'login_footer' , array(&$this,'recaptcha_foot') );
|
148 |
-
}
|
149 |
-
if ( $this->get_option('recaptcha_enable_comments') ) {
|
150 |
-
/*
|
151 |
-
add_filter('comment_form_defaults',array($this,'comment_form_defaults'),10);
|
152 |
-
/*/
|
153 |
-
// WP 4.2 introduced `comment_form_submit_button` filter
|
154 |
-
// which is much more likely to work
|
155 |
-
global $wp_version;
|
156 |
-
if ( version_compare( $wp_version , '4.2' ) >= 0 && $this->get_option('recaptcha_comment_use_42_filter') )
|
157 |
-
add_filter('comment_form_submit_button',array($this,'prepend_recaptcha_html'),10,2);
|
158 |
-
else
|
159 |
-
add_filter('comment_form_defaults',array($this,'comment_form_defaults'),10);
|
160 |
-
|
161 |
-
//*/
|
162 |
-
add_action('pre_comment_on_post',array($this,'recaptcha_check_or_die'));
|
163 |
-
|
164 |
-
add_action( 'print_comments_recaptcha' , array( &$this , 'print_recaptcha_html' ) );
|
165 |
-
add_filter( 'comments_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
166 |
-
}
|
167 |
-
if ( $this->get_option('recaptcha_enable_signup') ) {
|
168 |
-
// buddypress suuport.
|
169 |
-
if ( function_exists('buddypress') ) {
|
170 |
-
add_action('bp_account_details_fields',array($this,'print_recaptcha_html'));
|
171 |
-
add_action('bp_signup_pre_validate',array(&$this,'recaptcha_check_or_die'),99 );
|
172 |
-
} else {
|
173 |
-
add_action('register_form',array($this,'print_recaptcha_html'));
|
174 |
-
add_filter('registration_errors',array(&$this,'registration_errors'));
|
175 |
-
}
|
176 |
-
if ( is_multisite() ) {
|
177 |
-
add_action( 'signup_extra_fields' , array($this,'print_recaptcha_html'));
|
178 |
-
add_filter('wpmu_validate_user_signup',array(&$this,'wpmu_validate_user_signup'));
|
179 |
-
}
|
180 |
-
add_filter( 'signup_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
181 |
-
|
182 |
-
}
|
183 |
-
if ( $this->get_option('recaptcha_enable_login') ) {
|
184 |
-
add_action('login_form',array(&$this,'print_recaptcha_html'));
|
185 |
-
add_filter('wp_authenticate_user',array(&$this,'deny_login'),99 );
|
186 |
-
add_filter( 'login_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
187 |
-
}
|
188 |
-
if ( $this->get_option('recaptcha_enable_lostpw') ) {
|
189 |
-
add_action('lostpassword_form' , array($this,'print_recaptcha_html') );
|
190 |
-
//*
|
191 |
-
add_action('lostpassword_post' , array(&$this,'recaptcha_check_or_die') , 99 );
|
192 |
-
/*/ // switch this when pull request accepted and included in official WC release.
|
193 |
-
add_filter('allow_password_reset' , array(&$this,'wp_error') );
|
194 |
-
//*/
|
195 |
-
add_filter( 'lostpassword_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
196 |
-
}
|
197 |
-
if ( 'WPLANG' === $this->get_option( 'recaptcha_language' ) )
|
198 |
-
add_filter( 'wp_recaptcha_language' , array( &$this,'recaptcha_wplang' ) , 5 );
|
199 |
-
|
200 |
-
add_action( 'recaptcha_print' , array( &$this , 'print_recaptcha_html' ) );
|
201 |
-
add_filter( 'recaptcha_error' , array( &$this , 'wp_error' ) );
|
202 |
-
add_filter( 'recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
203 |
-
}
|
204 |
-
add_filter( 'recaptcha_valid' , array( &$this , 'recaptcha_check' ) );
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Set current captcha instance and return it.
|
209 |
-
*
|
210 |
-
* @return object WP_reCaptcha_Captcha
|
211 |
-
*/
|
212 |
-
public function captcha_instance() {
|
213 |
-
if ( is_null( $this->_captcha_instance ) )
|
214 |
-
$this->_captcha_instance = $this->captcha_instance_by_flavor( $this->get_option( 'recaptcha_flavor' ) );
|
215 |
-
return $this->_captcha_instance;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Set current captcha instance and return it.
|
220 |
-
*
|
221 |
-
* @param string captcha flavor. 'grecaptcha' (noCaptcha) or 'recaptcha' (reCaptcha)
|
222 |
-
* @return object WP_reCaptcha_Captcha
|
223 |
-
*/
|
224 |
-
public function captcha_instance_by_flavor( $flavor ) {
|
225 |
-
switch( $flavor ) {
|
226 |
-
case 'grecaptcha':
|
227 |
-
return WP_reCaptcha_NoCaptcha::instance();
|
228 |
-
case 'recaptcha':
|
229 |
-
return WP_reCaptcha_ReCaptcha::instance();
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* returns if recaptcha is required.
|
235 |
-
*
|
236 |
-
* @return bool
|
237 |
-
*/
|
238 |
-
function is_required() {
|
239 |
-
$is_required = ! ( $this->get_option('recaptcha_disable_for_known_users') && current_user_can( 'read' ) );
|
240 |
-
return apply_filters( 'wp_recaptcha_required' , $is_required );
|
241 |
-
}
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
//////////////////////////////////
|
247 |
-
// Displaying
|
248 |
-
//
|
249 |
-
|
250 |
-
/**
|
251 |
-
* print recaptcha stylesheets
|
252 |
-
* hooks into `wp_head`
|
253 |
-
*/
|
254 |
-
function recaptcha_head( ) {
|
255 |
-
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
256 |
-
$this->begin_inject( );
|
257 |
-
$this->captcha_instance()->print_head();
|
258 |
-
$this->end_inject( );
|
259 |
-
}
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* print recaptcha login form stylesheets
|
264 |
-
* hooks into `wp_head`
|
265 |
-
*/
|
266 |
-
function recaptcha_login_head( ) {
|
267 |
-
if ( apply_filters( 'wp_recaptcha_print_login_css' , true ) ) {
|
268 |
-
$this->begin_inject( );
|
269 |
-
$this->captcha_instance()->print_login_head();
|
270 |
-
$this->end_inject( );
|
271 |
-
}
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Print recaptcha scripts
|
276 |
-
* hooks into `wp_footer`
|
277 |
-
*
|
278 |
-
*/
|
279 |
-
function recaptcha_foot( ) {
|
280 |
-
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
281 |
-
$this->begin_inject( );
|
282 |
-
|
283 |
-
// getting submit buttons of an elements form
|
284 |
-
if ( $this->get_option( 'recaptcha_disable_submit' ) ) {
|
285 |
-
?><script type="text/javascript">
|
286 |
-
function get_form_submits(el){
|
287 |
-
var form,current=el,ui,type,slice = Array.prototype.slice,self=this;
|
288 |
-
this.submits=[];
|
289 |
-
this.form=false;
|
290 |
-
|
291 |
-
this.setEnabled=function(e){
|
292 |
-
for ( var s=0;s<self.submits.length;s++ ) {
|
293 |
-
if (e) self.submits[s].removeAttribute('disabled');
|
294 |
-
else self.submits[s].setAttribute('disabled','disabled');
|
295 |
-
}
|
296 |
-
return this;
|
297 |
-
};
|
298 |
-
while ( current && current.nodeName != 'BODY' && current.nodeName != 'FORM' ) {
|
299 |
-
current = current.parentNode;
|
300 |
-
}
|
301 |
-
if ( !current || current.nodeName != 'FORM' )
|
302 |
-
return false;
|
303 |
-
this.form=current;
|
304 |
-
ui=slice.call(this.form.getElementsByTagName('input')).concat(slice.call(this.form.getElementsByTagName('button')));
|
305 |
-
for (var i = 0; i < ui.length; i++) if ( (type=ui[i].getAttribute('TYPE')) && type=='submit' ) this.submits.push(ui[i]);
|
306 |
-
return this;
|
307 |
-
}
|
308 |
-
</script><?php
|
309 |
-
}
|
310 |
-
$this->captcha_instance()->print_foot();
|
311 |
-
|
312 |
-
$this->end_inject( );
|
313 |
-
}
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Print recaptcha HTML. Use inside a form.
|
318 |
-
*
|
319 |
-
*/
|
320 |
-
function print_recaptcha_html( $attr = array() ) {
|
321 |
-
echo $this->begin_inject( );
|
322 |
-
echo $this->recaptcha_html( $attr );
|
323 |
-
echo $this->end_inject( );
|
324 |
-
}
|
325 |
-
|
326 |
-
/**
|
327 |
-
* Get recaptcha HTML.
|
328 |
-
*
|
329 |
-
* @return string recaptcha html
|
330 |
-
*/
|
331 |
-
function recaptcha_html( $attr = array() ) {
|
332 |
-
return $this->captcha_instance()->get_html( $attr );
|
333 |
-
}
|
334 |
-
|
335 |
-
|
336 |
-
/**
|
337 |
-
* Get recaptcha HTML.
|
338 |
-
*
|
339 |
-
* @param $html string
|
340 |
-
* @return string recaptcha html prepended to first parameter.
|
341 |
-
*/
|
342 |
-
function prepend_recaptcha_html( $html ) {
|
343 |
-
return $this->recaptcha_html() . $html;
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* HTML comment with some notes (beginning)
|
348 |
-
*
|
349 |
-
* @param $return bool Whether to print or to return the comment
|
350 |
-
* @param $moretext string Additional information being included in the comment
|
351 |
-
* @return null|string HTML-Comment
|
352 |
-
*/
|
353 |
-
function begin_inject($return = false,$moretext='') {
|
354 |
-
$html = "\n<!-- BEGIN recaptcha, injected by plugin wp-recaptcha-integration $moretext -->\n";
|
355 |
-
if ( $return ) return $html;
|
356 |
-
echo $html;
|
357 |
-
}
|
358 |
-
/**
|
359 |
-
* HTML comment with some notes (ending)
|
360 |
-
*
|
361 |
-
* @param $return bool Whether to print or to return the comment
|
362 |
-
* @return null|string HTML-Comment
|
363 |
-
*/
|
364 |
-
function end_inject( $return = false ) {
|
365 |
-
$html = "\n<!-- END recaptcha -->\n";
|
366 |
-
if ( $return ) return $html;
|
367 |
-
echo $html;
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Display recaptcha on comments form.
|
372 |
-
* filter function for `comment_form_defaults`
|
373 |
-
*
|
374 |
-
* @see filter doc `comment_form_defaults`
|
375 |
-
*/
|
376 |
-
function comment_form_defaults( $defaults ) {
|
377 |
-
$defaults['comment_notes_after'] .= '<p>' . $this->recaptcha_html() . '</p>';
|
378 |
-
return $defaults;
|
379 |
-
}
|
380 |
-
|
381 |
-
//////////////////////////////////
|
382 |
-
// Verification
|
383 |
-
//
|
384 |
-
|
385 |
-
/**
|
386 |
-
* Get last result of recaptcha check
|
387 |
-
* @return string recaptcha html
|
388 |
-
*/
|
389 |
-
function get_last_result() {
|
390 |
-
return $this->captcha_instance()->get_last_result();
|
391 |
-
}
|
392 |
-
|
393 |
-
/**
|
394 |
-
* Check recaptcha
|
395 |
-
*
|
396 |
-
* @return bool false if check does not validate
|
397 |
-
*/
|
398 |
-
function recaptcha_check( ) {
|
399 |
-
if ( $this->is_required() )
|
400 |
-
return $this->captcha_instance()->check();
|
401 |
-
return true;
|
402 |
-
}
|
403 |
-
|
404 |
-
/**
|
405 |
-
* check recaptcha on login
|
406 |
-
* filter function for `wp_authenticate_user`
|
407 |
-
*
|
408 |
-
* @param $user WP_User
|
409 |
-
* @return object user or wp_error
|
410 |
-
*/
|
411 |
-
function deny_login( $user ) {
|
412 |
-
if ( isset( $_POST["log"]) && ! $this->recaptcha_check() ) {
|
413 |
-
$msg = __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration');
|
414 |
-
if ( $this->get_option('recaptcha_lockout') && in_array( 'administrator' , $user->roles ) && ! $this->test_keys() ) {
|
415 |
-
return $user;
|
416 |
-
} else {
|
417 |
-
return $this->wp_error( $user );
|
418 |
-
}
|
419 |
-
return new WP_Error( 'captcha_error' , $msg );
|
420 |
-
}
|
421 |
-
return $user;
|
422 |
-
}
|
423 |
-
|
424 |
-
/**
|
425 |
-
* check recaptcha on registration
|
426 |
-
* filter function for `registration_errors`
|
427 |
-
*
|
428 |
-
* @param $errors WP_Error
|
429 |
-
* @return WP_Error with captcha error added if test fails.
|
430 |
-
*/
|
431 |
-
function registration_errors( $errors ) {
|
432 |
-
if ( isset( $_POST["user_login"]) )
|
433 |
-
$errors = $this->wp_error_add( $errors );
|
434 |
-
return $errors;
|
435 |
-
}
|
436 |
-
|
437 |
-
/**
|
438 |
-
* check recaptcha WPMU signup
|
439 |
-
* filter function for `wpmu_validate_user_signup`
|
440 |
-
*
|
441 |
-
* @see filter hook `wpmu_validate_user_signup`
|
442 |
-
*/
|
443 |
-
function wpmu_validate_user_signup( $result ) {
|
444 |
-
if ( isset( $_POST['stage'] ) && $_POST['stage'] == 'validate-user-signup' )
|
445 |
-
$result['errors'] = $this->wp_error_add( $result['errors'] , 'generic' );
|
446 |
-
return $result;
|
447 |
-
}
|
448 |
-
|
449 |
-
|
450 |
-
/**
|
451 |
-
* check recaptcha and return WP_Error on failure.
|
452 |
-
* filter function for `allow_password_reset`
|
453 |
-
*
|
454 |
-
* @param $param mixed return value of funtion when captcha validates
|
455 |
-
* @return mixed will return argument $param an success, else WP_Error
|
456 |
-
*/
|
457 |
-
function wp_error( $param , $error_code = 'captcha_error' ) {
|
458 |
-
if ( ! $this->recaptcha_check() ) {
|
459 |
-
return new WP_Error( $error_code , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
460 |
-
} else {
|
461 |
-
return $param;
|
462 |
-
}
|
463 |
-
}
|
464 |
-
/**
|
465 |
-
* check recaptcha and return WP_Error on failure.
|
466 |
-
* filter function for `allow_password_reset`
|
467 |
-
*
|
468 |
-
* @param $param mixed return value of funtion when captcha validates
|
469 |
-
* @return mixed will return argument $param an success, else WP_Error
|
470 |
-
*/
|
471 |
-
function wp_error_add( $param , $error_code = 'captcha_error' ) {
|
472 |
-
if ( ! $this->recaptcha_check() ) {
|
473 |
-
return new WP_Error( $error_code , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
474 |
-
} else {
|
475 |
-
return $param;
|
476 |
-
}
|
477 |
-
}
|
478 |
-
|
479 |
-
/**
|
480 |
-
* Check recaptcha and wp_die() on fail
|
481 |
-
* hooks into `pre_comment_on_post`, `lostpassword_post`
|
482 |
-
*/
|
483 |
-
function recaptcha_check_or_die( ) {
|
484 |
-
if ( ! $this->recaptcha_check() ) {
|
485 |
-
$err = new WP_Error('comment_err', __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
486 |
-
wp_die( $err );
|
487 |
-
}
|
488 |
-
}
|
489 |
-
|
490 |
-
|
491 |
-
//////////////////////////////////
|
492 |
-
// Options
|
493 |
-
//
|
494 |
-
|
495 |
-
/**
|
496 |
-
* Get plugin option by name.
|
497 |
-
*
|
498 |
-
* @param $option_name string
|
499 |
-
* @return bool false if check does not validate
|
500 |
-
*/
|
501 |
-
public function get_option( $option_name ) {
|
502 |
-
switch ( $option_name ) {
|
503 |
-
case 'recaptcha_publickey': // first try local, then global
|
504 |
-
case 'recaptcha_privatekey':
|
505 |
-
$option_value = get_option($option_name);
|
506 |
-
if ( ! $option_value && WP_reCaptcha::is_network_activated() )
|
507 |
-
$option_value = get_site_option( $option_name );
|
508 |
-
return $option_value;
|
509 |
-
case 'recaptcha_enable_comments': // global on network. else local
|
510 |
-
case 'recaptcha_enable_signup':
|
511 |
-
case 'recaptcha_enable_login':
|
512 |
-
case 'recaptcha_enable_lostpw':
|
513 |
-
case 'recaptcha_disable_for_known_users':
|
514 |
-
case 'recaptcha_enable_wc_order':
|
515 |
-
if ( WP_reCaptcha::is_network_activated() )
|
516 |
-
return get_site_option($option_name);
|
517 |
-
return get_option( $option_name );
|
518 |
-
default: // always local
|
519 |
-
return get_option($option_name);
|
520 |
-
}
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* @return bool return if google api is configured
|
525 |
-
*/
|
526 |
-
function has_api_key() {
|
527 |
-
return $this->_has_api_key;
|
528 |
-
}
|
529 |
-
|
530 |
-
/**
|
531 |
-
* Test public and private key
|
532 |
-
*
|
533 |
-
* @return bool
|
534 |
-
*/
|
535 |
-
public function test_keys() {
|
536 |
-
// if ( ! ( $keys_okay = get_transient( 'recaptcha_keys_okay' ) ) ) {
|
537 |
-
$pub_okay = $this->test_public_key();
|
538 |
-
$prv_okay = $this->test_private_key();
|
539 |
-
|
540 |
-
// $keys_okay = ( $prv_okay && $pub_okay ) ? 'yes' : 'no';
|
541 |
-
|
542 |
-
//cache the result
|
543 |
-
// set_transient( 'recaptcha_keys_okay' , $keys_okay , 15 * MINUTE_IN_SECONDS );
|
544 |
-
// }
|
545 |
-
return $prv_okay && $pub_okay;
|
546 |
-
}
|
547 |
-
|
548 |
-
/**
|
549 |
-
* Test public key
|
550 |
-
*
|
551 |
-
* @return bool
|
552 |
-
*/
|
553 |
-
public function test_public_key( $key = null ) {
|
554 |
-
if ( is_null( $key ) )
|
555 |
-
$key = $this->get_option('recaptcha_publickey');
|
556 |
-
$rec = WP_reCaptcha::instance();
|
557 |
-
$pub_key_url = sprintf( "http://www.google.com/recaptcha/api/challenge?k=%s" , $key );
|
558 |
-
$pub_response = wp_remote_get( $pub_key_url );
|
559 |
-
$pub_response_body = wp_remote_retrieve_body( $pub_response );
|
560 |
-
return ! is_wp_error( $pub_response ) && ! strpos( $pub_response_body ,'Format of site key was invalid');
|
561 |
-
}
|
562 |
-
|
563 |
-
/**
|
564 |
-
* Test private key
|
565 |
-
*
|
566 |
-
* @return bool
|
567 |
-
*/
|
568 |
-
public function test_private_key( $key = null ) {
|
569 |
-
if ( is_null( $key ) )
|
570 |
-
$key = $this->get_option('recaptcha_privatekey');
|
571 |
-
$prv_key_url = sprintf( "http://www.google.com/recaptcha/api/verify?privatekey=%s" , $key );
|
572 |
-
$prv_response = wp_remote_get( $prv_key_url );
|
573 |
-
$prv_rspbody = wp_remote_retrieve_body( $prv_response );
|
574 |
-
return ! is_wp_error( $prv_response ) && ! strpos(wp_remote_retrieve_body( $prv_response ),'invalid-site-private-key');
|
575 |
-
}
|
576 |
-
|
577 |
-
|
578 |
-
//////////////////////////////////
|
579 |
-
// Activation
|
580 |
-
//
|
581 |
-
|
582 |
-
/**
|
583 |
-
* Fired on plugin activation
|
584 |
-
*/
|
585 |
-
public static function activate() {
|
586 |
-
}
|
587 |
-
|
588 |
-
/**
|
589 |
-
* Fired on plugin deactivation
|
590 |
-
*/
|
591 |
-
public static function deactivate() {
|
592 |
-
}
|
593 |
-
/**
|
594 |
-
* Uninstall
|
595 |
-
*/
|
596 |
-
public static function uninstall() {
|
597 |
-
if ( is_multisite() ) {
|
598 |
-
delete_site_option( 'recaptcha_publickey' );
|
599 |
-
delete_site_option( 'recaptcha_privatekey' );
|
600 |
-
delete_site_option( 'recaptcha_enable_comments' );
|
601 |
-
delete_site_option( 'recaptcha_enable_signup' );
|
602 |
-
delete_site_option( 'recaptcha_enable_login' );
|
603 |
-
delete_site_option( 'recaptcha_enable_wc_checkout' );
|
604 |
-
delete_site_option( 'recaptcha_disable_for_known_users' );
|
605 |
-
delete_site_option( 'recaptcha_lockout' );
|
606 |
-
|
607 |
-
foreach ( wp_get_sites() as $site) {
|
608 |
-
switch_to_blog( $site["blog_id"] );
|
609 |
-
delete_option( 'recaptcha_publickey' );
|
610 |
-
delete_option( 'recaptcha_privatekey' );
|
611 |
-
delete_option( 'recaptcha_flavor' );
|
612 |
-
delete_option( 'recaptcha_theme' );
|
613 |
-
delete_option( 'recaptcha_language' );
|
614 |
-
delete_option( 'recaptcha_comment_use_42_filter' );
|
615 |
-
delete_option( 'recaptcha_noscript' );
|
616 |
-
restore_current_blog();
|
617 |
-
}
|
618 |
-
} else {
|
619 |
-
delete_option( 'recaptcha_publickey' );
|
620 |
-
delete_option( 'recaptcha_privatekey' );
|
621 |
-
|
622 |
-
delete_option( 'recaptcha_flavor' );
|
623 |
-
delete_option( 'recaptcha_theme' );
|
624 |
-
delete_option( 'recaptcha_language' );
|
625 |
-
delete_option( 'recaptcha_enable_comments' );
|
626 |
-
delete_option( 'recaptcha_enable_signup' );
|
627 |
-
delete_option( 'recaptcha_enable_login' );
|
628 |
-
delete_option( 'recaptcha_enable_wc_checkout' );
|
629 |
-
delete_option( 'recaptcha_disable_for_known_users' );
|
630 |
-
delete_option( 'recaptcha_lockout' );
|
631 |
-
}
|
632 |
-
}
|
633 |
-
|
634 |
-
/**
|
635 |
-
* Get plugin option by name.
|
636 |
-
*
|
637 |
-
* @return bool true if plugin is activated on network
|
638 |
-
*/
|
639 |
-
static function is_network_activated() {
|
640 |
-
if ( is_null(self::$_is_network_activated) ) {
|
641 |
-
if ( ! is_multisite() )
|
642 |
-
return false;
|
643 |
-
if ( ! function_exists( 'is_plugin_active_for_network' ) )
|
644 |
-
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
645 |
-
|
646 |
-
self::$_is_network_activated = is_plugin_active_for_network( basename(dirname(__FILE__)).'/'.basename(__FILE__) );
|
647 |
-
}
|
648 |
-
return self::$_is_network_activated;
|
649 |
-
}
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
//////////////////////////////////
|
655 |
-
// Language
|
656 |
-
//
|
657 |
-
|
658 |
-
/**
|
659 |
-
* Rewrite WP get_locale() to recaptcha lang param.
|
660 |
-
*
|
661 |
-
* @return string recaptcha language
|
662 |
-
*/
|
663 |
-
function recaptcha_wplang( ) {
|
664 |
-
$locale = get_locale();
|
665 |
-
return $this->captcha_instance()->get_language( $locale );
|
666 |
-
}
|
667 |
-
/**
|
668 |
-
* Get recaptcha language code that matches input language code
|
669 |
-
*
|
670 |
-
* @param $lang string language code
|
671 |
-
* @return string recaptcha language code if supported by current flavor, empty string otherwise
|
672 |
-
*/
|
673 |
-
function recaptcha_language( $lang ) {
|
674 |
-
return $this->captcha_instance()->get_language( $lang );
|
675 |
-
}
|
676 |
-
|
677 |
-
/**
|
678 |
-
* Get languages supported by current recaptcha flavor.
|
679 |
-
*
|
680 |
-
* @return array languages supported by recaptcha.
|
681 |
-
*/
|
682 |
-
function get_supported_languages( ) {
|
683 |
-
return $this->captcha_instance()->get_supported_languages();
|
684 |
-
}
|
685 |
-
|
686 |
-
}
|
687 |
|
688 |
/**
|
689 |
-
* Autoload
|
690 |
*
|
691 |
* @param string $classname
|
692 |
*/
|
693 |
function wp_recaptcha_integration_autoload( $classname ) {
|
694 |
-
$class_path = dirname(__FILE__). sprintf('/inc/class-%s.php' , strtolower( $classname ) ) ;
|
695 |
if ( file_exists($class_path) )
|
696 |
require_once $class_path;
|
697 |
}
|
698 |
spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
699 |
|
700 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
701 |
|
702 |
WP_reCaptcha::instance();
|
703 |
|
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.3.0
|
7 |
Author: Jörn Lund
|
8 |
Author URI: https://github.com/mcguffin/
|
9 |
+
Text Domain: wp-recaptcha-integration
|
10 |
*/
|
11 |
|
12 |
/* Copyright 2014 Jörn Lund (email : joern AT podpirate DOT org)
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
+
it under the terms of the GNU General Public License, version 2, as
|
16 |
published by the Free Software Foundation.
|
17 |
|
18 |
This program is distributed in the hope that it will be useful,
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
28 |
+
define( 'WP_RECAPTCHA_FILE', __FILE__ );
|
29 |
+
define( 'WP_RECAPTCHA_PATH', dirname(__FILE__) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
/**
|
32 |
+
* Autoload Classes
|
33 |
*
|
34 |
* @param string $classname
|
35 |
*/
|
36 |
function wp_recaptcha_integration_autoload( $classname ) {
|
37 |
+
$class_path = dirname(__FILE__). sprintf('/inc/class-%s.php' , strtolower( $classname ) ) ;
|
38 |
if ( file_exists($class_path) )
|
39 |
require_once $class_path;
|
40 |
}
|
41 |
spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
42 |
|
43 |
|
44 |
+
// // disable 2.0.0 updates on php < 5.4
|
45 |
+
// function wp_recaptcha_disable_updates($value) {
|
46 |
+
// if ( version_compare(PHP_VERSION, '5.4', '<') ) {
|
47 |
+
// $plugin_basename = plugin_basename(__FILE__);
|
48 |
+
// if ( isset( $value->response[ $plugin_basename ] ) && version_compare( $value->response[ $plugin_basename ]['new_version'] , '2.0.0', '>=' ) ) {
|
49 |
+
// unset( $value->response[ plugin_basename(__FILE__) ] );
|
50 |
+
// }
|
51 |
+
// }
|
52 |
+
// return $value;
|
53 |
+
// }
|
54 |
+
// add_filter('site_transient_update_plugins', 'wp_recaptcha_disable_updates');
|
55 |
|
56 |
WP_reCaptcha::instance();
|
57 |
|