Version Description
- Support cformsII (thanks to Bastian Germann)
- Support for Password Reset Protection for older woocommerce Versions ingomarent
- L10n: Czech (thanks to Frantiek Zatloukal)
- Fix potential PHP Warnngs (thanks to Gennady Kovshenin)
Download this release
Release Info
Developer | podpirate |
Plugin | WordPress ReCaptcha Integration |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.2.0
- TODO.md +0 -31
- composer.json +17 -0
- css/recaptcha-options.css +101 -79
- css/recaptcha-options.min.css +0 -3
- 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 +129 -95
- inc/class-wp_recaptcha_awesome_support.php +0 -0
- inc/class-wp_recaptcha_bbpress.php +9 -8
- inc/class-wp_recaptcha_captcha.php +28 -14
- inc/class-wp_recaptcha_cforms2.php +0 -0
- inc/class-wp_recaptcha_contactform7.php +203 -18
- inc/class-wp_recaptcha_ninjaforms.php +138 -14
- inc/class-wp_recaptcha_nocaptcha.php +148 -154
- inc/class-wp_recaptcha_options.php +177 -190
- inc/class-wp_recaptcha_recaptcha.php +211 -0
- inc/class-wp_recaptcha_woocommerce.php +8 -15
- inc/recaptchalib.php +277 -0
- inc/woocommerce/myaccount/form-lost-password.php +0 -0
- js/recaptcha-options.js +15 -9
- js/recaptcha-options.min.js +0 -2
- js/wp-recaptcha.js +0 -89
- js/wp-recaptcha.min.js +0 -2
- js/wpcf7.js +14 -0
- languages/wp-recaptcha-integration-cs_CZ.mo +0 -0
- languages/wp-recaptcha-integration-cs_CZ.po +0 -0
- languages/wp-recaptcha-integration-de_DE.mo +0 -0
- languages/wp-recaptcha-integration-de_DE.po +0 -0
- languages/wp-recaptcha-integration-es_ES.mo +0 -0
- languages/wp-recaptcha-integration-es_ES.po +0 -0
- languages/wp-recaptcha-integration-it_IT.mo +0 -0
- languages/wp-recaptcha-integration-it_IT.po +0 -0
- languages/wp-recaptcha-integration-pt_BR.mo +0 -0
- languages/wp-recaptcha-integration-pt_BR.po +0 -0
- languages/wp-recaptcha-integration-pt_PT.mo +0 -0
- languages/wp-recaptcha-integration-pt_PT.po +0 -0
- readme.txt +74 -57
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- wp-recaptcha-integration.php +13 -15
TODO.md
DELETED
@@ -1,31 +0,0 @@
|
|
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
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,89 +1,111 @@
|
|
1 |
-
.recaptcha-select-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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///////++TYQe9ZcvAAAOH0lEQVR42uydCXuaTBSFA0Lbj46IKCYqaTAGU2PURrO2//9/fXNnYROzaGxVzskiEhjy6Puce2fmMp6cnHz7akPQJ+vrtxOu//BCQLvQf9y3bNt3LQj6VLm+bX87+Wr7eCmgT1fTt7+e2LaHVwL6fHm2zeHC6wDtQoALAlwQ4IIgwAUBLghwQRDgggAXBLggCHBBgAsCXBAEuCDABQEuCAJcEOCCABd0fGKvCXBB27Dlt8oVx3Fo+57LABe0IVtePP9eph/D4Wy26MWfxBfgqqJcO7gth+t8SOKExd728RFwVTLj8sJSujhc5w0hjldgb+tegKua1uWX0kVwKbo4X4vY3w4vwFXVtKuMLgHXsDFM8LI9lp7BABf0LrhcL5zflsKVWFejMZwFGinmBTYDXNA7rWv+fQ1cwxSvWU8uUsP8YBYDLuidWVe8Dq6MdWm6iK1G4AIu6D3G5ccl+bxyrvOMddUbnC4eE2f1OuCCNmYrda7zDFsNTpfXmzUAF/TOhKt8iF47VyPrXPXZYkFsAS7oXV3FVhlbP1K4zlPjqvOfITEGuKB3aOSXTy2Wh8W6eIRzQe9LuIJS3+I/CVvnmbAoyIJzQe+R17r9vsa5FhOeXw2JrPOErIQvwAW9bVw/S7ItuRGGYdRbzGbZnKshbIv/AC7oLbZYvGJct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WfOjZwAu6G8IcEGACwJcEAS4IMAFAS4IAlwQ4IIAFwQBLghwQYALggBXddX85fSdfj/W1TADp/Xx052+47QAF1Sko+s4/TMnua1w8PqqDmVwiTswABdUBlfbogJlwRQrfvCM/kCy5itLPVyd6XpAXdAlP7ZF/E4+EZQBrorCZXXolrJJ3wk6TqtDoDW7kzbVxFNtvHXVdeTNGi2qgQ7K4aKjJ7SakmxG3DpL695Q/Sk9vrKKEuA6ergoQMYcrqszzsOp06Mbd0y6L4MWsTEdoi4oi5sSLn70xJCrAYhmxCn/t3c2rQ0CQRhWcTERWeJav9IcDNRcgpCb//+fdWZntZUYKa0tNL7PSdhlD/IwO7vJjPE14IKgMo79esEuyPW0cmWaO2tl8md6kiu8kW9nliznop2cnnOr31t1vTgZ7+Uq3KRhmTyRMu2y4sKOdvGoALmeN6GX3klpzdUWhS35acOa40zXBIGVi57T3pB1WTl24hojkchFBp5O5/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/xhBQAAAAFzUkdCAK7OHOkAAADJUExURUdwTCI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dmkEi46OpJ3AxBhxDvTjfpyfVrUfGXhIuDa2Jzrzqc7a53JyfQcrv+3dwY9CsJAFKaNyWB6gQa4qHEDspi9cOD//7ftzACybvWysAd970AwJD3ol+kbzJsajgA1DNnA+bI23Ld8MzB1I4y/4RLylFFZZuByGCj1BQc72qetAuB6XUOvAf28PJwULmZBGPJEvcDFtiz8/GFf9BrL5xz1RJnC1bjBEgWc5mX0AS97dgXVp8cHBwKul4VrIKJaKVAqQoXywVll5ZgWayaMAnWfWn98f7kc7uASReHSZBES12/qucwSrqxxveRZZVcbKxf3e3lXdPOuOB+5OMH1UVXV8ZjH4DKmfjb/DXC9D1xswA/X2UWJ58q+eD9s3GJYTWZ+Vi6+0jUGF7eZ8FyA6zyOJREL7/re6WiRQdrGOZwfMfTcUlLJhj7uuahD5QJcOpaEQWCndJG9sRstU6RXZKwYLo1pL/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+4mPrDAH6ML7PZwOByILeLGYDpIgO6e8FzsaEDcGLG2Rj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5tr/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/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTDAwMEuK9yE8rMLCwpubm7W1tSIiIv///1JSUnp6eoyMjObm5kRERWdnZyxEkkJ2zgioD9wAAAABdFJOUwBA5thmAAAJuUlEQVR42u3diXbaOhAGYKZYcrSS93/aqxktlm0BhtyeAvmnPanxIvCX0WLHSk+n00lbg3gwrD5JgO45vmJHM+LBoMB62hhQPBPB6JR4yLvnci+lHhLv2TAGeMADHvCAhwAe8IAHPATwgAc84AEPATzgAQ94COABD3jAQwAPeMADHvAQwAMe8ICHAB7wgAc84AEPeMADHvAQwAMe8ICHAB7wgAc84CGA90p4Runp0VABeLJxeioC8FKo5/AU8FI8Zzdp4BW8rweDjwEe8IAHPOABD3jAAx7wgAc84AEPeMAD3t/Ac97bf33i1nv9Znh6mhKb+vr65/f80mfw74VHX8IGvKfwfMX7ebXlsuxfxJvuf4eBB7xfhKfltJXWZCfvvaLU+fGC7n9JfdTazSqtneyyqr20WvGb6dVP6pwUsvrJp9U6po7VRwGTd+vwpLx2+iQvXX4nlT6qVzq8HF6cJpLOw+djfKhvE9epUbbnAqnuxC99fb/QDT7Kqj5hfHmTJO7qIXZTfOHUX/XTyNZu35fCa8u78NTjtXBz78V7TTs8u+yuVpWvILj19r541dulMO+B550pn1NF5yvTgjfZyJ/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sT3H94F4hvH42cTU5pE8LJu+pCoZ5clhvjOaXEyeqxiv4DnZK+Ry+GlZmXwhE/N4hoB7iblk/zdeIOLn/alMm+BZUSGdbso0eeDVJS/LG9zMj7u6/c/SMp7Je9lcjhjLg51GZhqE4ZEf0GHkB4OpTNgxLJDPlKLlB9KjPGNsWDWnpTxY2yxK5qVmM8bERWUaCpWum/JTxjF8ZJvH5xyqAWfezAKuPjPMeIUpqZpSa3l4ssarc4+pNHIljfNmW6ZJfmSbN6/wUhKJoVS2mnl5os6g7jU8QxIjvDwnnj4Wb27VVuaLEVfN3HHEPKXJSXa5a0OVmNHCCE/exH0wXpd55WH+3H3mWSlRnvkfziqpva2SztmO2jzutz8683q8WKfK8pgt1HHePM6eNs6TX28xX23zXPi4Nu9mtGkSVOd7utu70/2ifutdlfCxl7B/H88o9euemPrf8OgX3hbEzVDgAe8d8fCo3dPNvD1pEwDx1ODM6FNKPfyW/CfyLqTEO7Ee4okQu9NJg+9xulRnT/8BSXNgGrzomHMAAAAASUVORK5CYII=); }
|
37 |
-
|
38 |
-
.radio-horizontal label {
|
39 |
-
margin-right: 1em; }
|
40 |
|
|
|
|
|
41 |
.recaptcha-onoff input[type="checkbox"] {
|
42 |
-
|
43 |
-
|
44 |
.recaptcha-onoff label {
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
.recaptcha-onoff input[type="checkbox"]:checked + label {
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
82 |
|
|
|
|
|
|
|
|
|
83 |
.warning {
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
.recaptcha-explain .loading .spinner {
|
87 |
-
|
88 |
-
|
89 |
-
|
|
1 |
+
.recaptcha-select-theme .theme-item {
|
2 |
+
display:inline-block;
|
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 |
+
display:none;
|
54 |
+
}
|
55 |
.recaptcha-onoff label {
|
56 |
+
display:block;
|
57 |
+
width:250px;
|
58 |
+
color:#999;
|
59 |
+
border-radius:7px;
|
60 |
+
border:2px solid #bbb;
|
61 |
+
float:left;
|
62 |
+
margin:0.5em 1em;
|
63 |
+
-webkit-transition: all 0.125s ease-in-out;
|
64 |
+
transition: all 0.125s ease-in-out;
|
65 |
+
}
|
66 |
+
.recaptcha-onoff label .title {
|
67 |
+
font-weight:bold;
|
68 |
+
display:block;
|
69 |
+
padding:0.5em 0.5em 0.5em 2.5em;
|
70 |
+
}
|
71 |
+
.recaptcha-onoff label .dashicons-lock {
|
72 |
+
position:absolute;
|
73 |
+
font-size:1.5em;
|
74 |
+
float:left;
|
75 |
+
padding:6px;
|
76 |
+
color:#bbb;
|
77 |
+
-webkit-transition: all 0.25s cubic-bezier(0, 1.8, 1, 1.8);
|
78 |
+
transition: all 0.25s cubic-bezier(0, 1.8, 1, 1.8);
|
79 |
+
}
|
80 |
.recaptcha-onoff input[type="checkbox"]:checked + label {
|
81 |
+
background-color:#fff;
|
82 |
+
border-color:#0074A2;
|
83 |
+
border-style:solid;
|
84 |
+
color:#333;
|
85 |
+
box-shadow: rgba(0,0,0,.5) 0 0 5px 0px;
|
86 |
+
}
|
87 |
+
.recaptcha-onoff input[type="checkbox"]:checked + label .dashicons-lock {
|
88 |
+
color:#0074A2;
|
89 |
+
font-size:2em;
|
90 |
+
padding-left:4px;
|
91 |
+
padding-right:8px;
|
92 |
+
padding-top:2px;
|
93 |
+
}
|
94 |
|
95 |
+
.flavor-grecaptcha .flavor-recaptcha,
|
96 |
+
.flavor-recaptcha .flavor-grecaptcha {
|
97 |
+
display:none;
|
98 |
+
}
|
99 |
.warning {
|
100 |
+
color:red;
|
101 |
+
}
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
|
106 |
|
107 |
.recaptcha-explain .loading .spinner {
|
108 |
+
display:inline-block;
|
109 |
+
float:none;
|
110 |
+
vertical-align:middle;
|
111 |
+
}
|
css/recaptcha-options.min.css
DELETED
@@ -1,3 +0,0 @@
|
|
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//BCQLvQf9y3bNt3LQj6VLm+bX87+Wr7eCmgT1fTt7+e2LaHVwL6fHm2zeHC6wDtQoALAlwQ4IIgwAUBLghwQRDgggAXBLggCHBBgAsCXBAEuCDABQEuCAJcEOCCABd0fGKvCXBB27Dlt8oVx3Fo+57LABe0IVt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Fkm3/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+v4HqBVSNcBFwS4IMAFQYALAlwQ4IIgwAUBLghwQRDgggAXBLggCHBBgAsCXBAEuCDABQEuCAJc0HzynV61HC7P833ABS0MV/d+f/9/+1M62ms0Gu2B49g24IIWlN27J5jKfB1xthp7/NFoOx7gghYRY56kqwKuPSEyMM8HXNAieHG6jirhUnRxvgbLuhfg2lbvsiu8qwAX18DL5V424ILmxcvuDvdn5Fx7mXulVaM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cha-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+OkoLimh4XDxTU2ZajAIXeLqc/5h3jvW4aafDmEoD77u67Oob4muGJd081szrZYep9VmVfHvU3nbVW8aNriZPhzfWhajBLS0Ttt3icT2P4wpPyv4aW+9qpOBWfHkT5zcuLoWnwvO1gdLbsYStrdDYF7Idqp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obNO1eevrDangkZI7W3I52qQ178u9AbWkl8SzCS9WvyjnKV1RmH4oE7Rcmxl/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+LBoMB62hhQPBPB6JR4yLvnci+lHhLv2TAGeMADHvCAhwAe8IAHPATwgAc84AEPATzgAQ94COABD3jAQwAPeMADHvAQwAMe8ICHAB7wgAc84AEPeMADHvAQwAMe8ICHAB7wgAc84CGA90p4Runp0VABeLJxeioC8FKo5/AU8FI8Zz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ilfF2Y3ql9a9+3uIA3tT6jG0DtVsFvFvjvG5XU1YR8A7iaRXzLbq4rCHgHcQbBQHvebxfm3sH8NR9PeBdwbOta7gaBnhjPB7PR9g9hedWw5JhhBl4w7D9gBi9xWN4HePYzs4z8A5cp7s9ncNUgsMNflTri435l8eDc8/IWPlBoLMG06cwcQ94wAMe8BDAAx7wgIcAHvCA9+F4ts1myjs/+FBXnRGlzG/Ec3k6QL1bHB+8C2WVk2dgfytefsgzzx2Rv13QbmEQy0N0tPqXhiV9Hl5QliR/Av+NZX0sD7GTk+foLKcX7Z43rGvkCT0z53Ki4lfRlLkBsT3H94F4hvH42cTU5pE8LJu+pCoZ5clhvjOaXEyeqxiv4DnZK+Ry+GlZmXwhE/N4hoB7iblk/zdeIOLn/alMm+BZUSGdbso0eeDVJS/LG9zMj7u6/c/SMp7Je9lcjhjLg51GZhqE4ZEf0GHkB4OpTNgxLJDPlKLlB9KjPGNsWDWnpTxY2yxK5qVmM8bERWUaCpWum/JTxjF8ZJvH5xyqAWfezAKuPjPMeIUpqZpSa3l4ssarc4+pNHIljfNmW6ZJfmSbN6/wUhKJoVS2mnl5os6g7jU8QxIjvDwnnj4Wb27VVuaLEVfN3HHEPKXJSXa5a0OVmNHCCE/exH0wXpd55WH+3H3mWSlRnvkfziqpva2SztmO2jzutz8683q8WKfK8pgt1HHePM6eNs6TX28xX23zXPi4Nu9mtGkSVOd7utu70/2ifutdlfCxl7B/H88o9euemPrf8OgX3hbEzVDgAe8d8fCo3dPNvD1pEwDx1ODM6FNKPfyW/CfyLqTEO7Ee4okQu9NJg+9xulRnT/8BSXNgGrzomHMAAAAASUVORK5CYII=)}.radio-horizontal label{margin-right:1em}.recaptcha-onoff input[type="checkbox"]{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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlY2FwdGNoYS1vcHRpb25zLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsMkJBQ0MsVUFBQSxDQUNBLDBDQUNELDZCQUdFLGtCQUNBLFdBQUEsQ0FFRCxDQUNELG1CQU1DLGdCQUNBLGtCQUNBLG9EQUFBLDRDQVFBLGtDQUNBLDRCQUNBLG9CQUFBLENBVEEsMENBVEQsbUJBVUUsa0JBQ0EsU0FDQSxRQUNBLFFBQUEsQ0EwQkQsQ0F2Q0QsdUNBb0JFLFlBQ0EsV0FBQSxDQXJCRiwyREF1QkcsZ3BLQUFBLENBdkJILDBEQTBCRyx3a0tBQUEsQ0ExQkgsd0NBOEJFLFlBQ0EsWUFBQSxDQS9CRiw0REFpQ0csd3VIQUFBLENBakNILDJEQW9DRyw0L0dBQUEsQ0FDQSx3QkFNRCxnQkFBQSxDQUNBLHdDQUtBLFlBQUEsQ0FGRix1QkFLRSxjQUNBLFlBQ0EsV0FDQSxrQkFDQSxz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sb3I6IzAwNzRBMjtcblx0XHRib3JkZXItc3R5bGU6c29saWQ7XG5cdFx0Y29sb3I6IzMzMztcblx0ICAgIGJveC1zaGFkb3c6IHJnYmEoMCwwLDAsLjUpIDAgMCA1cHggMHB4O1xuXHRcdC5kYXNoaWNvbnMtbG9jayB7XG5cdFx0XHRjb2xvcjojMDA3NEEyO1xuXHRcdFx0Zm9udC1zaXplOjJlbTtcblx0XHRcdHBhZGRpbmctbGVmdDo0cHg7XG5cdFx0XHRwYWRkaW5nLXJpZ2h0OjhweDtcblx0XHRcdHBhZGRpbmctdG9wOjJweDtcblx0XHR9XG5cdH1cbn1cblxuLndhcm5pbmcge1xuXHRjb2xvcjpyZWQ7XG59XG5cblxuLnJlY2FwdGNoYS1leHBsYWluIC5sb2FkaW5nIC5zcGlubmVyIHtcblx0ZGlzcGxheTppbmxpbmUtYmxvY2s7XG5cdGZsb2F0Om5vbmU7XG5cdHZlcnRpY2FsLWFsaWduOm1pZGRsZTtcbn1cbiJdfQ== */
|
|
|
|
|
|
images/grecaptcha-theme-dark.png
ADDED
Binary file
|
images/grecaptcha-theme-light.png
ADDED
Binary file
|
images/recaptcha-theme-blackglass.png
ADDED
Binary file
|
images/recaptcha-theme-clean.png
ADDED
Binary file
|
images/recaptcha-theme-red.png
ADDED
Binary file
|
images/recaptcha-theme-white.png
ADDED
Binary file
|
inc/class-wp_recaptcha.php
CHANGED
@@ -37,8 +37,9 @@ class WP_reCaptcha {
|
|
37 |
* Prevent from creating more than one instance
|
38 |
*/
|
39 |
private function __construct() {
|
|
|
40 |
add_option('recaptcha_theme','light'); // local
|
41 |
-
add_option('
|
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
|
@@ -67,15 +68,14 @@ class WP_reCaptcha {
|
|
67 |
|
68 |
if ( $this->has_api_key() ) {
|
69 |
|
70 |
-
add_action('init' , array(
|
71 |
-
add_action('plugins_loaded' , array(
|
72 |
|
73 |
}
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
register_uninstall_hook( WP_RECAPTCHA_FILE, array( __CLASS__ , 'uninstall' ) );
|
79 |
}
|
80 |
|
81 |
/**
|
@@ -86,12 +86,12 @@ class WP_reCaptcha {
|
|
86 |
if ( $this->has_api_key() ) {
|
87 |
// NinjaForms support
|
88 |
// check if ninja forms is present
|
89 |
-
if (
|
90 |
WP_reCaptcha_NinjaForms::instance();
|
91 |
|
92 |
// CF7 support
|
93 |
// check if contact form 7 forms is present
|
94 |
-
if (
|
95 |
WP_reCaptcha_ContactForm7::instance();
|
96 |
|
97 |
// WooCommerce support
|
@@ -121,7 +121,14 @@ class WP_reCaptcha {
|
|
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);
|
@@ -137,50 +144,47 @@ class WP_reCaptcha {
|
|
137 |
//*/
|
138 |
add_action('pre_comment_on_post',array($this,'recaptcha_check_or_die'));
|
139 |
|
140 |
-
add_action( 'print_comments_recaptcha' , array(
|
141 |
-
add_filter( 'comments_recaptcha_html' , array(
|
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(
|
148 |
-
add_action('bp_signup_pre_validate',array(
|
149 |
} else {
|
150 |
-
add_action('register_form',array(
|
151 |
-
add_filter('registration_errors',array(
|
152 |
}
|
153 |
if ( is_multisite() ) {
|
154 |
add_action( 'signup_extra_fields' , array($this,'print_recaptcha_html'));
|
155 |
-
add_filter('wpmu_validate_user_signup',array(
|
156 |
}
|
157 |
-
add_filter( 'signup_recaptcha_html' , array(
|
158 |
|
159 |
}
|
160 |
if ( $this->get_option('recaptcha_enable_login') ) {
|
161 |
-
|
162 |
-
|
163 |
-
add_filter( '
|
164 |
-
add_filter( 'login_recaptcha_html', array( $this , 'recaptcha_html' ) );
|
165 |
}
|
166 |
if ( $this->get_option('recaptcha_enable_lostpw') ) {
|
167 |
-
$this
|
168 |
-
add_action('lostpassword_form' , array( $this, 'print_recaptcha_html') );
|
169 |
//*
|
170 |
-
add_action('lostpassword_post' , array(
|
171 |
/*/ // switch this when pull request accepted and included in official WC release.
|
172 |
-
add_filter('allow_password_reset' , array(
|
173 |
//*/
|
174 |
-
add_filter( 'lostpassword_recaptcha_html' , array(
|
175 |
}
|
176 |
if ( 'WPLANG' === $this->get_option( 'recaptcha_language' ) )
|
177 |
-
add_filter( 'wp_recaptcha_language' , array(
|
178 |
|
179 |
-
add_action( 'recaptcha_print' , array(
|
180 |
-
add_filter( 'recaptcha_error' , array(
|
181 |
-
add_filter( 'recaptcha_html' , array(
|
182 |
}
|
183 |
-
add_filter( 'recaptcha_valid' , array(
|
184 |
}
|
185 |
|
186 |
/**
|
@@ -189,12 +193,25 @@ class WP_reCaptcha {
|
|
189 |
* @return object WP_reCaptcha_Captcha
|
190 |
*/
|
191 |
public function captcha_instance() {
|
192 |
-
if ( is_null( $this->_captcha_instance ) )
|
193 |
-
$this->_captcha_instance =
|
194 |
-
}
|
195 |
return $this->_captcha_instance;
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
/**
|
200 |
* returns if recaptcha is required.
|
@@ -213,6 +230,72 @@ class WP_reCaptcha {
|
|
213 |
// Displaying
|
214 |
//
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
/**
|
217 |
* Print recaptcha HTML. Use inside a form.
|
218 |
*
|
@@ -420,35 +503,6 @@ class WP_reCaptcha {
|
|
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 |
*/
|
@@ -512,39 +566,19 @@ class WP_reCaptcha {
|
|
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 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
/**
|
37 |
* Prevent from creating more than one instance
|
38 |
*/
|
39 |
private function __construct() {
|
40 |
+
add_option('recaptcha_flavor','grecaptcha'); // local
|
41 |
add_option('recaptcha_theme','light'); // local
|
42 |
+
add_option('recaptcha_disable_submit',false); // local
|
43 |
add_option('recaptcha_noscript',false); // local
|
44 |
add_option('recaptcha_comment_use_42_filter',false); // local
|
45 |
add_option('recaptcha_publickey',''); // 1st global -> then local
|
68 |
|
69 |
if ( $this->has_api_key() ) {
|
70 |
|
71 |
+
add_action('init' , array(&$this,'init') , 9 );
|
72 |
+
add_action('plugins_loaded' , array(&$this,'plugins_loaded'), 9 );
|
73 |
|
74 |
}
|
75 |
|
76 |
+
register_activation_hook( __FILE__ , array( __CLASS__ , 'activate' ) );
|
77 |
+
register_deactivation_hook( __FILE__ , array( __CLASS__ , 'deactivate' ) );
|
78 |
+
register_uninstall_hook( __FILE__ , array( __CLASS__ , 'uninstall' ) );
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
86 |
if ( $this->has_api_key() ) {
|
87 |
// NinjaForms support
|
88 |
// check if ninja forms is present
|
89 |
+
if ( class_exists('Ninja_Forms') || function_exists('ninja_forms_register_field') )
|
90 |
WP_reCaptcha_NinjaForms::instance();
|
91 |
|
92 |
// CF7 support
|
93 |
// check if contact form 7 forms is present
|
94 |
+
if ( function_exists('wpcf7') )
|
95 |
WP_reCaptcha_ContactForm7::instance();
|
96 |
|
97 |
// WooCommerce support
|
121 |
$require_recaptcha = $this->is_required();
|
122 |
|
123 |
if ( $require_recaptcha ) {
|
124 |
+
add_action( 'wp_head' , array($this,'recaptcha_head') );
|
125 |
+
add_action( 'wp_footer' , array($this,'recaptcha_foot') );
|
126 |
|
127 |
+
if ( $this->get_option('recaptcha_enable_signup') || $this->get_option('recaptcha_enable_login') || $this->get_option('recaptcha_enable_lostpw') ) {
|
128 |
+
add_action( 'login_head' , array(&$this,'recaptcha_head') );
|
129 |
+
add_action( 'login_head' , array(&$this,'recaptcha_login_head') );
|
130 |
+
add_action( 'login_footer' , array(&$this,'recaptcha_foot') );
|
131 |
+
}
|
132 |
if ( $this->get_option('recaptcha_enable_comments') ) {
|
133 |
/*
|
134 |
add_filter('comment_form_defaults',array($this,'comment_form_defaults'),10);
|
144 |
//*/
|
145 |
add_action('pre_comment_on_post',array($this,'recaptcha_check_or_die'));
|
146 |
|
147 |
+
add_action( 'print_comments_recaptcha' , array( &$this , 'print_recaptcha_html' ) );
|
148 |
+
add_filter( 'comments_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
149 |
}
|
150 |
if ( $this->get_option('recaptcha_enable_signup') ) {
|
|
|
151 |
// buddypress suuport.
|
152 |
if ( function_exists('buddypress') ) {
|
153 |
+
add_action('bp_account_details_fields',array($this,'print_recaptcha_html'));
|
154 |
+
add_action('bp_signup_pre_validate',array(&$this,'recaptcha_check_or_die'),99 );
|
155 |
} else {
|
156 |
+
add_action('register_form',array($this,'print_recaptcha_html'));
|
157 |
+
add_filter('registration_errors',array(&$this,'registration_errors'));
|
158 |
}
|
159 |
if ( is_multisite() ) {
|
160 |
add_action( 'signup_extra_fields' , array($this,'print_recaptcha_html'));
|
161 |
+
add_filter('wpmu_validate_user_signup',array(&$this,'wpmu_validate_user_signup'));
|
162 |
}
|
163 |
+
add_filter( 'signup_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
164 |
|
165 |
}
|
166 |
if ( $this->get_option('recaptcha_enable_login') ) {
|
167 |
+
add_action('login_form',array(&$this,'print_recaptcha_html'));
|
168 |
+
add_filter('wp_authenticate_user',array(&$this,'deny_login'),99 );
|
169 |
+
add_filter( 'login_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
|
|
170 |
}
|
171 |
if ( $this->get_option('recaptcha_enable_lostpw') ) {
|
172 |
+
add_action('lostpassword_form' , array($this,'print_recaptcha_html') );
|
|
|
173 |
//*
|
174 |
+
add_action('lostpassword_post' , array(&$this,'recaptcha_check_or_die') , 99 );
|
175 |
/*/ // switch this when pull request accepted and included in official WC release.
|
176 |
+
add_filter('allow_password_reset' , array(&$this,'wp_error') );
|
177 |
//*/
|
178 |
+
add_filter( 'lostpassword_recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
179 |
}
|
180 |
if ( 'WPLANG' === $this->get_option( 'recaptcha_language' ) )
|
181 |
+
add_filter( 'wp_recaptcha_language' , array( &$this,'recaptcha_wplang' ) , 5 );
|
182 |
|
183 |
+
add_action( 'recaptcha_print' , array( &$this , 'print_recaptcha_html' ) );
|
184 |
+
add_filter( 'recaptcha_error' , array( &$this , 'wp_error' ) );
|
185 |
+
add_filter( 'recaptcha_html' , array( &$this , 'recaptcha_html' ) );
|
186 |
}
|
187 |
+
add_filter( 'recaptcha_valid' , array( &$this , 'recaptcha_check' ) );
|
188 |
}
|
189 |
|
190 |
/**
|
193 |
* @return object WP_reCaptcha_Captcha
|
194 |
*/
|
195 |
public function captcha_instance() {
|
196 |
+
if ( is_null( $this->_captcha_instance ) )
|
197 |
+
$this->_captcha_instance = $this->captcha_instance_by_flavor( $this->get_option( 'recaptcha_flavor' ) );
|
|
|
198 |
return $this->_captcha_instance;
|
199 |
}
|
200 |
|
201 |
+
/**
|
202 |
+
* Set current captcha instance and return it.
|
203 |
+
*
|
204 |
+
* @param string captcha flavor. 'grecaptcha' (noCaptcha) or 'recaptcha' (reCaptcha)
|
205 |
+
* @return object WP_reCaptcha_Captcha
|
206 |
+
*/
|
207 |
+
public function captcha_instance_by_flavor( $flavor ) {
|
208 |
+
switch( $flavor ) {
|
209 |
+
case 'grecaptcha':
|
210 |
+
return WP_reCaptcha_NoCaptcha::instance();
|
211 |
+
case 'recaptcha':
|
212 |
+
return WP_reCaptcha_ReCaptcha::instance();
|
213 |
+
}
|
214 |
+
}
|
215 |
|
216 |
/**
|
217 |
* returns if recaptcha is required.
|
230 |
// Displaying
|
231 |
//
|
232 |
|
233 |
+
/**
|
234 |
+
* print recaptcha stylesheets
|
235 |
+
* hooks into `wp_head`
|
236 |
+
*/
|
237 |
+
function recaptcha_head( ) {
|
238 |
+
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
239 |
+
$this->begin_inject( );
|
240 |
+
$this->captcha_instance()->print_head();
|
241 |
+
$this->end_inject( );
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* print recaptcha login form stylesheets
|
247 |
+
* hooks into `wp_head`
|
248 |
+
*/
|
249 |
+
function recaptcha_login_head( ) {
|
250 |
+
if ( apply_filters( 'wp_recaptcha_print_login_css' , true ) ) {
|
251 |
+
$this->begin_inject( );
|
252 |
+
$this->captcha_instance()->print_login_head();
|
253 |
+
$this->end_inject( );
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Print recaptcha scripts
|
259 |
+
* hooks into `wp_footer`
|
260 |
+
*
|
261 |
+
*/
|
262 |
+
function recaptcha_foot( ) {
|
263 |
+
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
264 |
+
$this->begin_inject( );
|
265 |
+
|
266 |
+
// getting submit buttons of an elements form
|
267 |
+
if ( $this->get_option( 'recaptcha_disable_submit' ) ) {
|
268 |
+
?><script type="text/javascript">
|
269 |
+
function get_form_submits(el){
|
270 |
+
var form,current=el,ui,type,slice = Array.prototype.slice,self=this;
|
271 |
+
this.submits=[];
|
272 |
+
this.form=false;
|
273 |
+
|
274 |
+
this.setEnabled=function(e){
|
275 |
+
for ( var s=0;s<self.submits.length;s++ ) {
|
276 |
+
if (e) self.submits[s].removeAttribute('disabled');
|
277 |
+
else self.submits[s].setAttribute('disabled','disabled');
|
278 |
+
}
|
279 |
+
return this;
|
280 |
+
};
|
281 |
+
while ( current && current.nodeName != 'BODY' && current.nodeName != 'FORM' ) {
|
282 |
+
current = current.parentNode;
|
283 |
+
}
|
284 |
+
if ( !current || current.nodeName != 'FORM' )
|
285 |
+
return false;
|
286 |
+
this.form=current;
|
287 |
+
ui=slice.call(this.form.getElementsByTagName('input')).concat(slice.call(this.form.getElementsByTagName('button')));
|
288 |
+
for (var i = 0; i < ui.length; i++) if ( (type=ui[i].getAttribute('TYPE')) && type=='submit' ) this.submits.push(ui[i]);
|
289 |
+
return this;
|
290 |
+
}
|
291 |
+
</script><?php
|
292 |
+
}
|
293 |
+
$this->captcha_instance()->print_foot();
|
294 |
+
|
295 |
+
$this->end_inject( );
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
/**
|
300 |
* Print recaptcha HTML. Use inside a form.
|
301 |
*
|
503 |
}
|
504 |
}
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
/**
|
507 |
* @return bool return if google api is configured
|
508 |
*/
|
566 |
* Fired on plugin activation
|
567 |
*/
|
568 |
public static function activate() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
|
570 |
+
if ( function_exists('wpcf7') ) {
|
571 |
+
// IF CF7 is active, try to configure plugin from cf7 options
|
572 |
+
if ( $wpcf7_options = get_option('wpcf7') ) {
|
573 |
+
if ( isset( $wpcf7_options['recaptcha'] ) && !self::instance()->has_api_key() ) {
|
574 |
+
foreach ( $wpcf7_options['recaptcha'] as $sitekey => $secretkey ) {
|
575 |
+
update_option('recaptcha_publickey',$sitekey);
|
576 |
+
update_option('recaptcha_privatekey',$secretkey);
|
577 |
+
break;
|
578 |
+
}
|
579 |
+
}
|
580 |
+
}
|
581 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
}
|
583 |
|
584 |
/**
|
inc/class-wp_recaptcha_awesome_support.php
CHANGED
File without changes
|
inc/class-wp_recaptcha_bbpress.php
CHANGED
@@ -46,18 +46,19 @@ class WP_reCaptcha_bbPress {
|
|
46 |
if ( $require_recaptcha ) {
|
47 |
|
48 |
// WooCommerce support
|
|
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
58 |
}
|
59 |
}
|
60 |
-
|
61 |
}
|
62 |
|
63 |
/**
|
46 |
if ( $require_recaptcha ) {
|
47 |
|
48 |
// WooCommerce support
|
49 |
+
if ( $wp_recaptcha->get_option('recaptcha_flavor') == 'grecaptcha' ) {
|
50 |
|
51 |
+
if ( $enable_topic ) {
|
52 |
+
add_action( 'bbp_theme_before_topic_form_submit_wrapper' , array( $wp_recaptcha, 'print_recaptcha_html' ) );
|
53 |
+
add_action( 'bbp_new_topic_pre_extras', array( &$this , 'recaptcha_check' ) );
|
54 |
+
}
|
55 |
|
56 |
+
if ( $enable_reply ) {
|
57 |
+
add_action( 'bbp_theme_before_reply_form_submit_wrapper', array( $wp_recaptcha, 'print_recaptcha_html' ) );
|
58 |
+
add_filter( 'bbp_new_reply_pre_extras', array( &$this , 'recaptcha_check' ) );
|
59 |
+
}
|
60 |
}
|
61 |
}
|
|
|
62 |
}
|
63 |
|
64 |
/**
|
inc/class-wp_recaptcha_captcha.php
CHANGED
@@ -6,12 +6,26 @@
|
|
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,16 +34,15 @@ abstract class WP_reCaptcha_Captcha {
|
|
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,9 +50,9 @@ abstract class WP_reCaptcha_Captcha {
|
|
37 |
abstract function get_supported_themes();
|
38 |
|
39 |
/**
|
40 |
-
* Get supported
|
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,22 +60,22 @@ abstract class WP_reCaptcha_Captcha {
|
|
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,6 +88,7 @@ abstract class WP_reCaptcha_Captcha {
|
|
75 |
function get_last_result() {
|
76 |
return $this->_last_result;
|
77 |
}
|
78 |
-
|
79 |
|
80 |
}
|
|
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 |
/**
|
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 |
abstract function get_supported_themes();
|
51 |
|
52 |
/**
|
53 |
+
* Get languages supported by current recaptcha flavor.
|
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 |
|
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 by current flavor, empty string otherwise
|
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 |
function get_last_result() {
|
89 |
return $this->_last_result;
|
90 |
}
|
91 |
+
|
92 |
|
93 |
}
|
94 |
+
|
inc/class-wp_recaptcha_cforms2.php
CHANGED
File without changes
|
inc/class-wp_recaptcha_contactform7.php
CHANGED
@@ -29,26 +29,211 @@ class WP_reCaptcha_ContactForm7 {
|
|
29 |
* Prevent from creating more than one instance
|
30 |
*/
|
31 |
private function __construct() {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
$
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
|
54 |
}
|
|
29 |
* Prevent from creating more than one instance
|
30 |
*/
|
31 |
private function __construct() {
|
32 |
+
|
33 |
+
$wpcf7_version = defined('WPCF7_VERSION') ? WPCF7_VERSION : '0';
|
34 |
+
$wpcf7_recaptcha_configured = class_exists('WPCF7_RECAPTCHA') && ($cf7_sitekey = WPCF7_RECAPTCHA::get_instance()->get_sitekey()) && WPCF7_RECAPTCHA::get_instance()->get_secret( $cf7_sitekey );
|
35 |
+
|
36 |
+
// Skip WPCF7 reCaptcha
|
37 |
+
if ( $wpcf7_recaptcha_configured || version_compare( $wpcf7_version , '4.3' , '<' ) ) {
|
38 |
+
add_action( 'wpcf7_init', array( &$this , 'add_shortcode_recaptcha' ) );
|
39 |
+
add_action( 'wp_enqueue_scripts' , array( &$this , 'recaptcha_enqueue_script') );
|
40 |
+
add_action( 'admin_init', array( &$this , 'add_tag_generator_recaptcha' ), 45 );
|
41 |
+
add_filter( 'wpcf7_validate_recaptcha', array( &$this , 'recaptcha_validation_filter' ) , 10, 2 );
|
42 |
+
add_filter( 'wpcf7_validate_recaptcha*', array( &$this , 'recaptcha_validation_filter' ) , 10, 2 );
|
43 |
+
add_filter( 'wpcf7_messages' , array( &$this , 'add_error_message' ) );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
function add_error_message( $messages ) {
|
50 |
+
$messages['wp_recaptcha_invalid'] = array(
|
51 |
+
'description' => __( "Google reCaptcha does not validate.", 'wp-recaptcha-integration' ),
|
52 |
+
'default' => __("The Captcha didn’t verify.",'wp-recaptcha-integration')
|
53 |
+
);
|
54 |
+
return $messages;
|
55 |
+
}
|
56 |
+
|
57 |
+
function add_shortcode_recaptcha() {
|
58 |
+
wpcf7_add_shortcode(
|
59 |
+
array( 'recaptcha','recaptcha*'),
|
60 |
+
array(&$this,'recaptcha_shortcode_handler'), true );
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
function recaptcha_shortcode_handler( $tag ) {
|
66 |
+
if ( ! WP_reCaptcha::instance()->is_required() )
|
67 |
+
return apply_filters( 'wp_recaptcha_disabled_html' ,'');
|
68 |
+
$tag = new WPCF7_Shortcode( $tag );
|
69 |
+
if ( empty( $tag->name ) )
|
70 |
+
return '';
|
71 |
+
|
72 |
+
$atts = null;
|
73 |
+
if ( $theme = $tag->get_option('theme','',true) )
|
74 |
+
$atts = array( 'data-theme' => $theme );
|
75 |
+
|
76 |
+
$recaptcha_html = WP_reCaptcha::instance()->recaptcha_html( $atts );
|
77 |
+
$validation_error = wpcf7_get_validation_error( $tag->name );
|
78 |
+
|
79 |
+
$html = sprintf(
|
80 |
+
apply_filters( 'wp_recaptcha_cf7_shortcode_wrap' ,'<span class="wpcf7-form-control-wrap %1$s">%2$s %3$s</span>' ),
|
81 |
+
$tag->name, $recaptcha_html, $validation_error );
|
82 |
+
|
83 |
+
return $html;
|
84 |
+
}
|
85 |
+
|
86 |
+
function recaptcha_enqueue_script() {
|
87 |
+
if ( apply_filters( 'wp_recaptcha_do_scripts' , true ) ) {
|
88 |
+
wp_enqueue_script('wpcf7-recaptcha-integration',plugins_url('/js/wpcf7.js',dirname(__FILE__)),array('contact-form-7'));
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
function add_tag_generator_recaptcha() {
|
95 |
+
if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
|
96 |
+
return;
|
97 |
+
wpcf7_add_tag_generator( 'recaptcha', __( 'reCAPTCHA', 'wp-recaptcha-integration' ),
|
98 |
+
'wpcf7-tg-pane-recaptcha', array(&$this,'recaptcha_settings_callback') );
|
99 |
+
}
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
function recaptcha_settings_callback( $contact_form , $args = '' ) {
|
104 |
+
$args = wp_parse_args( $args, array() );
|
105 |
+
$type = 'recaptcha';
|
106 |
+
if ( defined( 'WPCF7_VERSION') && version_compare( WPCF7_VERSION , '4.2' ) >= 0 ) {
|
107 |
+
?>
|
108 |
+
<div class="control-box">
|
109 |
+
<fieldset>
|
110 |
+
<legend><?php _e( 'reCAPTCHA', 'wp-recaptcha-integration' ) ?></legend>
|
111 |
+
|
112 |
+
<table class="form-table">
|
113 |
+
<tbody>
|
114 |
+
|
115 |
+
<tr>
|
116 |
+
<th scope="row"><?php echo esc_html( __( 'Field type', 'contact-form-7' ) ); ?></th>
|
117 |
+
<td>
|
118 |
+
<fieldset>
|
119 |
+
<legend class="screen-reader-text"><?php echo esc_html( __( 'Field type', 'contact-form-7' ) ); ?></legend>
|
120 |
+
<label><input type="checkbox" checked="checked" disabled="disabled" name="required" onclick="return false" /> <?php echo esc_html( __( 'Required field', 'contact-form-7' ) ); ?></label>
|
121 |
+
</fieldset>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<th scope="row"><?php esc_html_e( __( 'Name', 'contact-form-7' ) ); ?></th>
|
127 |
+
<td>
|
128 |
+
<fieldset>
|
129 |
+
<legend class="screen-reader-text"><?php esc_html_e( __( 'Name', 'contact-form-7' ) ); ?></legend>
|
130 |
+
<label><input type="text" name="name" class="tg-name oneline" /></label>
|
131 |
+
</fieldset>
|
132 |
+
</td>
|
133 |
+
</tr><?php
|
134 |
+
|
135 |
+
if ( 'grecaptcha' === WP_reCaptcha::instance()->get_option('recaptcha_flavor') ) {
|
136 |
+
?><tr>
|
137 |
+
<th scope="row"><?php esc_html_e( __( 'Theme', 'wp-recaptcha-integration' ) ); ?></th>
|
138 |
+
<td>
|
139 |
+
<fieldset>
|
140 |
+
<legend class="screen-reader-text"><?php esc_html_e( __( 'Theme', 'wp-recaptcha-integration' ) ); ?></legend>
|
141 |
+
<label><?php
|
142 |
+
$this->_theme_select();
|
143 |
+
?></label>
|
144 |
+
</fieldset>
|
145 |
+
</td>
|
146 |
+
</tr><?php
|
147 |
+
}
|
148 |
+
?></tbody>
|
149 |
+
</table>
|
150 |
+
</fieldset>
|
151 |
+
</div>
|
152 |
+
<div class="insert-box">
|
153 |
+
<input type="text" name="<?php echo $type; ?>" class="tag code" readonly="readonly" onfocus="this.select()" />
|
154 |
+
|
155 |
+
<div class="submitbox">
|
156 |
+
<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
|
157 |
+
</div>
|
158 |
+
|
159 |
+
<br class="clear" />
|
160 |
+
|
161 |
+
<p class="description recaptcha-tag">
|
162 |
+
<label for="<?php echo esc_attr( $args['content'] . '-recaptchatag' ); ?>">
|
163 |
+
<?php /* esc_html_e( __( "Foobar", 'contact-form-7' ), '<strong><span class="recaptcha-tag"></span></strong>' );*/ ?>
|
164 |
+
<input type="text" class="recaptcha-tag code hidden" readonly="readonly" id="<?php echo esc_attr( $args['content'] . '-recaptchatag' ); ?>" />
|
165 |
+
</label>
|
166 |
+
</p>
|
167 |
+
</div>
|
168 |
+
<?php
|
169 |
+
} else {
|
170 |
+
?>
|
171 |
+
<div id="wpcf7-tg-pane-<?php echo $type; ?>" class="_hidden">
|
172 |
+
<form action="">
|
173 |
+
<table>
|
174 |
+
<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>
|
175 |
+
<tr><td>
|
176 |
+
<?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br />
|
177 |
+
<input type="text" name="name" class="tg-name oneline" />
|
178 |
+
</td><td><?php
|
179 |
+
if ( 'grecaptcha' === WP_reCaptcha::instance()->get_option('recaptcha_flavor') ) {
|
180 |
+
|
181 |
+
esc_html_e( __( 'Theme', 'wp-recaptcha-integration' ) ); ?><br /><?php
|
182 |
+
$this->_theme_select();
|
183 |
+
// cf7 does only allow literal <input>
|
184 |
+
}
|
185 |
+
?></td></tr>
|
186 |
+
</table>
|
187 |
+
<div class="tg-tag">
|
188 |
+
<?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br />
|
189 |
+
<input type="text" name="<?php echo $type; ?>" class="tag wp-ui-text-highlight code" readonly="readonly" onfocus="this.select()" />
|
190 |
+
</div>
|
191 |
+
</form>
|
192 |
+
</div>
|
193 |
+
<?php
|
194 |
+
}
|
195 |
+
?><script type="text/javascript">
|
196 |
+
(function($){
|
197 |
+
$(document).on('change','[name="recaptcha-theme-ui"]',function(){
|
198 |
+
$(this).next('[name="theme"]').val( $(this).val() ).trigger('change');
|
199 |
+
});
|
200 |
+
})(jQuery)
|
201 |
+
</script><?php
|
202 |
+
}
|
203 |
+
|
204 |
+
private function _theme_select() {
|
205 |
+
$themes = WP_reCaptcha::instance()->captcha_instance()->get_supported_themes();
|
206 |
+
?><select name="recaptcha-theme-ui"><?php
|
207 |
+
?><option value=""><?php _e('Use default','wp-recaptcha-integration') ?></option><?php
|
208 |
+
foreach ( $themes as $theme_name => $theme ) {
|
209 |
+
?><option value="<?php echo $theme_name; ?>"><?php echo $theme['label'] ?></option><?php
|
210 |
+
}
|
211 |
+
?></select><?php
|
212 |
+
?><input type="hidden" name="theme" class="idvalue option" value="" /><?php
|
213 |
+
}
|
214 |
+
|
215 |
+
function recaptcha_validation_filter( $result, $tag ) {
|
216 |
+
if ( ! WP_reCaptcha::instance()->is_required() )
|
217 |
+
return $result;
|
218 |
+
|
219 |
+
$tag = new WPCF7_Shortcode( $tag );
|
220 |
+
$name = $tag->name;
|
221 |
+
|
222 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() ) {
|
223 |
+
$message = wpcf7_get_message( 'wp_recaptcha_invalid' );
|
224 |
+
if ( ! $message )
|
225 |
+
$message = __("The Captcha didn’t verify.",'wp-recaptcha-integration');
|
226 |
+
|
227 |
+
if ( method_exists($result, 'invalidate' ) ) { // since CF7 4.1
|
228 |
+
$result->invalidate( $tag , $message );
|
229 |
+
} else {
|
230 |
+
$result['valid'] = false;
|
231 |
+
$result['reason'][$name] = $message;
|
232 |
}
|
233 |
}
|
234 |
+
return $result;
|
235 |
}
|
236 |
+
|
237 |
|
238 |
}
|
239 |
+
|
inc/class-wp_recaptcha_ninjaforms.php
CHANGED
@@ -27,21 +27,145 @@ class WP_reCaptcha_NinjaForms {
|
|
27 |
* Prevent from creating more than one instance
|
28 |
*/
|
29 |
private function __construct() {
|
30 |
-
add_action('init', array(
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
27 |
* Prevent from creating more than one instance
|
28 |
*/
|
29 |
private function __construct() {
|
30 |
+
add_action( 'init', array(&$this,'register_field_recaptcha'));
|
31 |
+
add_action( 'init' , array( &$this , 'late_init' ) , 99 );
|
32 |
+
add_action( 'wp_footer' , array(&$this,'recaptcha_script'),9999 );
|
33 |
+
add_filter( 'ninja_forms_field' , array(&$this,'recaptcha_field_data'), 10, 2 );
|
34 |
+
add_filter( 'ninja_forms_settings' , array( &$this , 'nf_settings' ) );
|
35 |
+
}
|
36 |
+
function nf_settings( $settings ) {
|
37 |
+
if ( ! isset($settings['wp_recaptcha_invalid']) )
|
38 |
+
$settings['wp_recaptcha_invalid'] = __("The Captcha didn’t verify.",'wp-recaptcha-integration');
|
39 |
+
return $settings;
|
40 |
+
}
|
41 |
+
function late_init() {
|
42 |
+
global $ninja_forms_tabs_metaboxes;
|
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 |
}
|
inc/class-wp_recaptcha_nocaptcha.php
CHANGED
@@ -6,83 +6,58 @@
|
|
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 |
-
'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,74 +81,25 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
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' =>
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
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,38 +115,110 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
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 |
-
$
|
199 |
-
$theme
|
200 |
-
$size = $inst->get_option('recaptcha_size');
|
201 |
|
202 |
$default = array(
|
203 |
'id' => 'g-recaptcha-'.$this->_counter++,
|
204 |
-
'class' => "
|
|
|
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 |
-
|
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;">' .
|
@@ -244,12 +242,8 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
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,8 +252,8 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
258 |
$user_response = isset( $_REQUEST['g-recaptcha-response'] ) ? $_REQUEST['g-recaptcha-response'] : false;
|
259 |
if ( $user_response !== false ) {
|
260 |
if ( ! $this->_last_result ) {
|
261 |
-
|
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 );
|
@@ -274,5 +268,5 @@ class WP_reCaptcha_NoCaptcha extends WP_reCaptcha_Captcha {
|
|
274 |
return false;
|
275 |
}
|
276 |
|
277 |
-
|
278 |
}
|
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 |
+
'bg' => 'Bulgarian',
|
13 |
+
'ca' => 'Catalan',
|
14 |
+
'zh-CN' => 'Chinese (Simplified)',
|
15 |
+
'zh-TW' => 'Chinese (Traditional)',
|
16 |
+
'hr' => 'Croatian',
|
17 |
+
'cs' => 'Czech',
|
18 |
+
'da' => 'Danish',
|
19 |
+
'nl' => 'Dutch',
|
20 |
+
'en-GB' => 'English (UK)',
|
21 |
+
'en' => 'English (US)',
|
22 |
+
'fil' => 'Filipino',
|
23 |
+
'fi' => 'Finnish',
|
24 |
+
'fr' => 'French',
|
25 |
+
'fr-CA' => 'French (Canadian)',
|
26 |
+
'de' => 'German',
|
27 |
+
'de-AT' => 'German (Austria)',
|
28 |
+
'de-CH' => 'German (Switzerland)',
|
29 |
+
'el' => 'Greek',
|
30 |
+
'iw' => 'Hebrew',
|
31 |
+
'hi' => 'Hindi',
|
32 |
+
'hu' => 'Hungarain',
|
33 |
+
'id' => 'Indonesian',
|
34 |
+
'it' => 'Italian',
|
35 |
+
'ja' => 'Japanese',
|
36 |
+
'ko' => 'Korean',
|
37 |
+
'lv' => 'Latvian',
|
38 |
+
'lt' => 'Lithuanian',
|
39 |
+
'no' => 'Norwegian',
|
40 |
+
'fa' => 'Persian',
|
41 |
+
'pl' => 'Polish',
|
42 |
+
'pt' => 'Portuguese',
|
43 |
+
'pt-BR' => 'Portuguese (Brazil)',
|
44 |
+
'pt-PT' => 'Portuguese (Portugal)',
|
45 |
+
'ro' => 'Romanian',
|
46 |
+
'ru' => 'Russian',
|
47 |
+
'sr' => 'Serbian',
|
48 |
+
'sk' => 'Slovak',
|
49 |
+
'sl' => 'Slovenian',
|
50 |
+
'es' => 'Spanish',
|
51 |
+
'es-419' => 'Spanish (Latin America)',
|
52 |
+
'sv' => 'Swedish',
|
53 |
+
'th' => 'Thai',
|
54 |
+
'tr' => 'Turkish',
|
55 |
+
'uk' => 'Ukrainian',
|
56 |
+
'vi' => 'Vietnamese',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
);
|
58 |
private $_counter = 0;
|
59 |
+
|
60 |
+
|
61 |
/**
|
62 |
* Holding the singleton instance
|
63 |
*/
|
81 |
* Prevent from creating more than one instance
|
82 |
*/
|
83 |
private function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
public function get_supported_themes() {
|
87 |
return array(
|
88 |
+
'light' => array(
|
89 |
+
'label' => __('Light','wp-recaptcha-integration') ,
|
90 |
+
),
|
91 |
+
'dark' => array(
|
92 |
+
'label' => __('Dark','wp-recaptcha-integration') ,
|
93 |
+
),
|
|
|
|
|
|
|
|
|
94 |
);
|
95 |
}
|
|
|
96 |
/**
|
97 |
* Override method
|
98 |
* Get recaptcha language code that matches input language code
|
99 |
+
* Sometimes WP uses different locales the the ones supported by nocaptcha.
|
100 |
+
*
|
101 |
* @param $lang string language code
|
102 |
+
* @return string recaptcha language code if supported by current flavor, empty string otherwise
|
103 |
*/
|
104 |
public function get_language( $lang ) {
|
105 |
/*
|
115 |
$lang = $mapping[$lang];
|
116 |
return parent::get_language( $lang );
|
117 |
}
|
118 |
+
/**
|
119 |
+
* @inheritdoc
|
120 |
+
*/
|
121 |
+
public function print_head() {}
|
122 |
|
123 |
+
/**
|
124 |
+
* @inheritdoc
|
125 |
+
*/
|
126 |
+
public function print_login_head() {
|
127 |
+
?><style type="text/css">
|
128 |
+
#login {
|
129 |
+
width:350px !important;
|
130 |
+
}
|
131 |
+
</style><?php
|
132 |
+
}
|
133 |
+
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @inheritdoc
|
137 |
+
*/
|
138 |
+
public function print_foot() {
|
139 |
+
$sitekey = WP_reCaptcha::instance()->get_option('recaptcha_publickey');
|
140 |
+
$language_param = '';
|
141 |
+
|
142 |
+
|
143 |
+
?><script type="text/javascript">
|
144 |
+
var recaptcha_widgets={};
|
145 |
+
function wp_recaptchaLoadCallback(){
|
146 |
+
try {
|
147 |
+
grecaptcha;
|
148 |
+
} catch(err){
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
var e = document.querySelectorAll ? document.querySelectorAll('.g-recaptcha:not(.wpcf7-form-control)') : document.getElementsByClassName('g-recaptcha'),
|
152 |
+
form_submits;
|
153 |
|
154 |
+
for (var i=0;i<e.length;i++) {
|
155 |
+
(function(el){
|
156 |
+
<?php if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) { ?>
|
157 |
+
var form_submits = get_form_submits(el).setEnabled(false), wid;
|
158 |
+
<?php } else { ?>
|
159 |
+
var wid;
|
160 |
+
<?php } ?>
|
161 |
+
// check if captcha element is unrendered
|
162 |
+
if ( ! el.childNodes.length) {
|
163 |
+
wid = grecaptcha.render(el,{
|
164 |
+
'sitekey':'<?php echo $sitekey ?>',
|
165 |
+
'theme':el.getAttribute('data-theme') || '<?php echo WP_reCaptcha::instance()->get_option('recaptcha_theme'); ?>'
|
166 |
+
<?php if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) {
|
167 |
+
?> ,
|
168 |
+
'callback' : function(r){ get_form_submits(el).setEnabled(true); /* enable submit buttons */ }
|
169 |
+
<?php } ?>
|
170 |
+
});
|
171 |
+
el.setAttribute('data-widget-id',wid);
|
172 |
+
} else {
|
173 |
+
wid = el.getAttribute('data-widget-id');
|
174 |
+
grecaptcha.reset(wid);
|
175 |
+
}
|
176 |
+
})(e[i]);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
// if jquery present re-render jquery/ajax loaded captcha elements
|
181 |
+
if ( typeof jQuery !== 'undefined' )
|
182 |
+
jQuery(document).ajaxComplete( function(evt,xhr,set){
|
183 |
+
if( xhr.responseText && xhr.responseText.indexOf('<?php echo $sitekey ?>') !== -1)
|
184 |
+
wp_recaptchaLoadCallback();
|
185 |
+
} );
|
186 |
+
|
187 |
+
</script><?php
|
188 |
+
$recaptcha_api_url = "https://www.google.com/recaptcha/api.js";
|
189 |
+
$recaptcha_api_url = add_query_arg(array(
|
190 |
+
'onload' => 'wp_recaptchaLoadCallback',
|
191 |
+
'render' => 'explicit',
|
192 |
+
),$recaptcha_api_url);
|
193 |
+
if ( $language_code = apply_filters( 'wp_recaptcha_language' , WP_reCaptcha::instance()->get_option( 'recaptcha_language' ) ) )
|
194 |
+
$recaptcha_api_url = add_query_arg('hl',$language_code,$recaptcha_api_url);
|
195 |
+
|
196 |
+
?><script src="<?php echo esc_url( $recaptcha_api_url ) ?>" async defer></script><?php
|
197 |
+
}
|
198 |
+
|
199 |
+
|
200 |
+
|
201 |
/**
|
202 |
* @inheritdoc
|
203 |
*/
|
204 |
public function get_html( $attr = array() ) {
|
205 |
+
$public_key = WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' );
|
206 |
+
$theme = WP_reCaptcha::instance()->get_option('recaptcha_theme');
|
|
|
207 |
|
208 |
$default = array(
|
209 |
'id' => 'g-recaptcha-'.$this->_counter++,
|
210 |
+
'class' => "g-recaptcha",
|
211 |
+
'data-sitekey' => $public_key,
|
212 |
'data-theme' => $theme,
|
|
|
|
|
213 |
);
|
214 |
$attr = wp_parse_args( $attr , $default );
|
215 |
+
|
|
|
|
|
|
|
216 |
$attr_str = '';
|
217 |
+
foreach ( $attr as $attr_name => $attr_val )
|
218 |
$attr_str .= sprintf( ' %s="%s"' , $attr_name , esc_attr( $attr_val ) );
|
|
|
|
|
|
|
219 |
$return = "<div {$attr_str}></div>";
|
220 |
$return .= '<noscript>';
|
221 |
if ( WP_reCaptcha::instance()->get_option('recaptcha_noscript') ) {
|
|
|
222 |
$return .= '<div style="width: 302px; height: 462px;">' .
|
223 |
'<div style="width: 302px; height: 422px; position: relative;">' .
|
224 |
'<div style="width: 302px; height: 422px; position: absolute;">' .
|
242 |
$return .= __('Please enable JavaScript to submit this form.','wp-recaptcha-integration');
|
243 |
}
|
244 |
$return .= '<br></noscript>';
|
|
|
|
|
|
|
245 |
return $return;
|
246 |
}
|
|
|
247 |
/**
|
248 |
* @inheritdoc
|
249 |
*/
|
252 |
$user_response = isset( $_REQUEST['g-recaptcha-response'] ) ? $_REQUEST['g-recaptcha-response'] : false;
|
253 |
if ( $user_response !== false ) {
|
254 |
if ( ! $this->_last_result ) {
|
255 |
+
$remote_ip = $_SERVER['REMOTE_ADDR'];
|
256 |
+
$url = "https://www.google.com/recaptcha/api/siteverify?secret=$private_key&response=$user_response&remoteip=$remote_ip";
|
257 |
$response = wp_remote_get( $url );
|
258 |
if ( ! is_wp_error($response) ) {
|
259 |
$response_data = wp_remote_retrieve_body( $response );
|
268 |
return false;
|
269 |
}
|
270 |
|
271 |
+
|
272 |
}
|
inc/class-wp_recaptcha_options.php
CHANGED
@@ -31,20 +31,20 @@ class WP_reCaptcha_Options {
|
|
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 |
|
@@ -97,7 +97,7 @@ class WP_reCaptcha_Options {
|
|
97 |
__( 'reCaptcha Settings' , 'wp-recaptcha-integration' ),
|
98 |
__( 'reCaptcha' , 'wp-recaptcha-integration' ),
|
99 |
'manage_network', 'racaptcha-settings',
|
100 |
-
array(
|
101 |
}
|
102 |
|
103 |
/**
|
@@ -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,7 +137,7 @@ 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 |
/**
|
@@ -165,108 +165,79 @@ class WP_reCaptcha_Options {
|
|
165 |
* admin init hook. Setup settings according.
|
166 |
*/
|
167 |
function admin_init( ) {
|
168 |
-
$
|
169 |
-
$has_api_key = $inst->has_api_key();
|
170 |
if ( ! $has_api_key && current_user_can( 'manage_options' ) ) {
|
171 |
-
add_action('admin_notices',array(
|
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' , __( '
|
178 |
-
add_settings_section( 'recaptcha_styling' , __( '
|
179 |
}
|
180 |
-
add_settings_section( 'recaptcha_apikey' , __( 'Connect' , 'wp-recaptcha-integration' ), array(
|
181 |
if ( ! $this->enter_api_key ) {
|
182 |
-
add_settings_section( 'recaptcha_advanced' , __( 'Advanced' , 'wp-recaptcha-integration' ), array(
|
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(
|
189 |
-
add_settings_field('recaptcha_privatekey', __('Secret key','wp-recaptcha-integration'), array(
|
190 |
if ( $has_api_key ) {
|
191 |
-
add_settings_field('cancel', '' , array(
|
192 |
}
|
193 |
} else {
|
194 |
// API Key. Add test tool.
|
195 |
-
add_action('wp_ajax_recaptcha-init-test-api-key' , array(
|
196 |
-
add_action('wp_ajax_recaptcha-test-api-key' , array(
|
197 |
-
add_action('wp_ajax_recaptcha-test-verification' , array(
|
198 |
}
|
199 |
|
200 |
if ( $has_api_key ) {
|
201 |
-
if (
|
202 |
// local options
|
203 |
-
register_setting( 'recaptcha_options', 'recaptcha_language' , array(
|
204 |
-
register_setting( 'recaptcha_options', '
|
205 |
-
register_setting( 'recaptcha_options', '
|
206 |
-
register_setting( 'recaptcha_options', '
|
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 |
-
|
213 |
-
|
214 |
-
__('Theme','wp-recaptcha-integration'),
|
215 |
-
array( $this, 'input_radio'), // select_theme
|
216 |
-
'recaptcha',
|
217 |
-
'recaptcha_styling',
|
218 |
array(
|
219 |
-
'name'
|
220 |
-
'
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
-
|
226 |
|
227 |
-
add_settings_field(
|
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(
|
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 |
|
@@ -274,11 +245,12 @@ class WP_reCaptcha_Options {
|
|
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(
|
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 |
}
|
@@ -328,9 +300,11 @@ class WP_reCaptcha_Options {
|
|
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 |
|
@@ -347,26 +321,28 @@ class WP_reCaptcha_Options {
|
|
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(
|
360 |
$protect_settings
|
361 |
);
|
362 |
|
363 |
add_settings_field('recaptcha_disable_for_known_users', __('Disable for known users','wp-recaptcha-integration'),
|
364 |
-
array(
|
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(
|
370 |
array(
|
371 |
'name'=>'recaptcha_lockout',
|
372 |
'label'=>__( 'Allow administrator to log in if API keys do not work.','wp-recaptcha-integration' ),
|
@@ -375,9 +351,8 @@ class WP_reCaptcha_Options {
|
|
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 |
|
@@ -443,7 +418,7 @@ class WP_reCaptcha_Options {
|
|
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 |
}
|
@@ -457,6 +432,8 @@ class WP_reCaptcha_Options {
|
|
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,6 +444,8 @@ class WP_reCaptcha_Options {
|
|
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 );
|
@@ -526,72 +505,16 @@ class WP_reCaptcha_Options {
|
|
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 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
$value,
|
589 |
-
selected( $value, $selected, false ),
|
590 |
-
$label
|
591 |
-
);
|
592 |
}
|
593 |
-
echo '</select>';
|
594 |
-
echo $after;
|
595 |
}
|
596 |
|
597 |
/**
|
@@ -677,56 +600,120 @@ class WP_reCaptcha_Options {
|
|
677 |
$option_name = 'recaptcha_language';
|
678 |
$option_value = WP_reCaptcha::instance()->get_option( $option_name );
|
679 |
|
680 |
-
$
|
|
|
|
|
|
|
681 |
|
682 |
-
?><div class="recaptcha-select-language"
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
?></div><?php
|
694 |
}
|
695 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
|
697 |
/**
|
698 |
-
*
|
699 |
*/
|
700 |
public function sanitize_language( $language ) {
|
701 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
}
|
703 |
/**
|
704 |
-
* Check valid recaptcha theme
|
705 |
*/
|
706 |
public function sanitize_theme( $theme ) {
|
707 |
-
$
|
|
|
|
|
|
|
|
|
708 |
|
709 |
-
if ( isset(
|
710 |
return $theme;
|
711 |
-
|
|
|
712 |
return 'light';
|
713 |
}
|
|
|
714 |
/**
|
715 |
-
* Check valid
|
716 |
*/
|
717 |
-
public function
|
718 |
-
|
719 |
-
|
720 |
-
|
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 |
/**
|
@@ -736,26 +723,26 @@ class WP_reCaptcha_Options {
|
|
736 |
$page_slug = add_options_page(
|
737 |
__('ReCaptcha','wp-recaptcha-integration'), __('ReCaptcha','wp-recaptcha-integration'),
|
738 |
'manage_options', 'recaptcha',
|
739 |
-
array(
|
740 |
);
|
741 |
|
742 |
-
add_action( "load-$page_slug" , array(
|
743 |
}
|
744 |
|
745 |
/**
|
746 |
* Enqueue script and css for options page.
|
747 |
*/
|
748 |
public function enqueue_styles() {
|
749 |
-
|
750 |
-
|
751 |
-
|
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 |
-
|
|
|
759 |
?><h2><?php /*icon*/
|
760 |
_e('Settings');
|
761 |
echo ' › ';
|
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 |
|
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 |
/**
|
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 |
/**
|
165 |
* admin init hook. Setup settings according.
|
166 |
*/
|
167 |
function admin_init( ) {
|
168 |
+
$has_api_key = WP_reCaptcha::instance()->has_api_key();
|
|
|
169 |
if ( ! $has_api_key && current_user_can( 'manage_options' ) ) {
|
170 |
+
add_action('admin_notices',array( &$this , 'api_key_notice'));
|
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' , __( 'Protect' , 'wp-recaptcha-integration' ), array( &$this , 'explain_protection' ), 'recaptcha');
|
177 |
+
add_settings_section( 'recaptcha_styling' , __( 'Style' , 'wp-recaptcha-integration' ), array( &$this , 'explain_styling' ), 'recaptcha');
|
178 |
}
|
179 |
+
add_settings_section( 'recaptcha_apikey' , __( 'Connect' , 'wp-recaptcha-integration' ), array( &$this , 'explain_apikey' ), 'recaptcha');
|
180 |
if ( ! $this->enter_api_key ) {
|
181 |
+
add_settings_section( 'recaptcha_advanced' , __( 'Advanced' , 'wp-recaptcha-integration' ), array( &$this , 'explain_advanced' ), 'recaptcha');
|
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(&$this,'secret_input_text'), 'recaptcha', 'recaptcha_apikey' , array('name'=>'recaptcha_publickey') );
|
188 |
+
add_settings_field('recaptcha_privatekey', __('Secret key','wp-recaptcha-integration'), array(&$this,'secret_input_text'), 'recaptcha', 'recaptcha_apikey', array('name'=>'recaptcha_privatekey'));
|
189 |
if ( $has_api_key ) {
|
190 |
+
add_settings_field('cancel', '' , array(&$this,'cancel_enter_api_key'), 'recaptcha', 'recaptcha_apikey' );
|
191 |
}
|
192 |
} else {
|
193 |
// API Key. Add test tool.
|
194 |
+
add_action('wp_ajax_recaptcha-init-test-api-key' , array( &$this , 'ajax_init_test_api_key' ) );
|
195 |
+
add_action('wp_ajax_recaptcha-test-api-key' , array( &$this , 'ajax_test_api_key' ) );
|
196 |
+
add_action('wp_ajax_recaptcha-test-verification' , array( &$this , 'ajax_test_api_key_verification' ) );
|
197 |
}
|
198 |
|
199 |
if ( $has_api_key ) {
|
200 |
+
if ( ! WP_reCaptcha::is_network_activated() || ! is_network_admin() ) {
|
201 |
// local options
|
202 |
+
register_setting( 'recaptcha_options', 'recaptcha_language' , array( &$this , 'sanitize_language' ) );
|
203 |
+
register_setting( 'recaptcha_options', 'recaptcha_flavor' , array( &$this , 'sanitize_flavor' ) );
|
204 |
+
register_setting( 'recaptcha_options', 'recaptcha_theme' , array( &$this , 'sanitize_theme' ) );
|
205 |
+
register_setting( 'recaptcha_options', 'recaptcha_disable_submit' , 'intval');
|
206 |
|
207 |
register_setting( 'recaptcha_options', 'recaptcha_noscript' , 'intval');
|
208 |
|
|
|
209 |
|
210 |
+
add_settings_field('recaptcha_flavor', __('Flavor','wp-recaptcha-integration'),
|
211 |
+
array(&$this,'input_radio'), 'recaptcha', 'recaptcha_styling',
|
|
|
|
|
|
|
|
|
212 |
array(
|
213 |
+
'name' => 'recaptcha_flavor',
|
214 |
+
'items' => array(
|
215 |
+
array(
|
216 |
+
'value' => 'grecaptcha',
|
217 |
+
'label' => __( 'No Captcha where you just click a button' , 'wp-recaptcha-integration' ),
|
218 |
+
),
|
219 |
+
array(
|
220 |
+
'value' => 'recaptcha',
|
221 |
+
'label' => __( 'Old style reCAPTCHA where you type some cryptic text' , 'wp-recaptcha-integration' ),
|
222 |
+
),
|
223 |
+
),
|
224 |
+
) );
|
225 |
|
226 |
+
add_settings_field('recaptcha_language', __( 'Language Settings','wp-recaptcha-integration' ), 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('recaptcha_noscript', __('Noscript Fallback','wp-recaptcha-integration'),
|
235 |
+
array(&$this,'input_checkbox'), 'recaptcha', 'recaptcha_advanced' ,
|
236 |
array(
|
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 |
+
'class' => 'flavor-grecaptcha',
|
241 |
)
|
242 |
);
|
243 |
|
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(&$this,'input_checkbox'), 'recaptcha', 'recaptcha_advanced' ,
|
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 |
+
'class' => 'flavor-grecaptcha',
|
254 |
)
|
255 |
);
|
256 |
}
|
300 |
);
|
301 |
|
302 |
if ( function_exists('WC') ) {
|
303 |
+
$wc_warn = WP_reCaptcha::instance()->get_option('recaptcha_enable_wc_order') && WP_reCaptcha::instance()->get_option('recaptcha_flavor') !== 'grecaptcha';
|
304 |
$protect_settings[] = array(
|
305 |
'name'=>'recaptcha_enable_wc_order',
|
306 |
'label'=>__( 'woocommerce Checkout','wp-recaptcha-integration' ),
|
307 |
+
'class' => 'flavor-grecaptcha',
|
308 |
);
|
309 |
}
|
310 |
|
321 |
$protect_settings[] = array(
|
322 |
'name' => 'recaptcha_enable_bbp_topic',
|
323 |
'label' => __( 'bbPress New Topic','wp-recaptcha-integration' ),
|
324 |
+
'class' => 'flavor-grecaptcha',
|
325 |
);
|
326 |
|
327 |
$protect_settings[] = array(
|
328 |
'name' => 'recaptcha_enable_bbp_reply',
|
329 |
'label' => __( 'bbPress New Reply','wp-recaptcha-integration' ),
|
330 |
+
'class' => 'flavor-grecaptcha',
|
331 |
);
|
332 |
}
|
333 |
|
334 |
add_settings_field('recaptcha_protection', __('Forms to protect','wp-recaptcha-integration'),
|
335 |
+
array(&$this,'input_protect'), 'recaptcha', 'recaptcha_protection' ,
|
336 |
$protect_settings
|
337 |
);
|
338 |
|
339 |
add_settings_field('recaptcha_disable_for_known_users', __('Disable for known users','wp-recaptcha-integration'),
|
340 |
+
array(&$this,'input_checkbox'), 'recaptcha', 'recaptcha_protection' ,
|
341 |
array('name'=>'recaptcha_disable_for_known_users','label'=>__( 'Disable reCaptcha verification for logged in users.','wp-recaptcha-integration' ))
|
342 |
);
|
343 |
|
344 |
add_settings_field('recaptcha_lockout', __('Prevent lockout','wp-recaptcha-integration'),
|
345 |
+
array(&$this,'input_checkbox'), 'recaptcha', 'recaptcha_protection' ,
|
346 |
array(
|
347 |
'name'=>'recaptcha_lockout',
|
348 |
'label'=>__( 'Allow administrator to log in if API keys do not work.','wp-recaptcha-integration' ),
|
351 |
);
|
352 |
}
|
353 |
|
354 |
+
if ( ! WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' ) || ! WP_reCaptcha::instance()->get_option( 'recaptcha_privatekey' ) )
|
355 |
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');
|
|
|
356 |
}
|
357 |
}
|
358 |
|
418 |
public function explain_styling() {
|
419 |
?><div class="recaptcha-explain"><?php
|
420 |
?><p class="description"><?php
|
421 |
+
_e( '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.' , 'wp-recaptcha-integration' );
|
422 |
?></p><?php
|
423 |
?></div><?php
|
424 |
}
|
432 |
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) {
|
433 |
header('Content-Type: text/html');
|
434 |
add_filter('option_recaptcha_disable_submit','__return_false');
|
435 |
+
WP_reCaptcha_noCaptcha::instance()->print_head( 'grecaptcha' );
|
436 |
+
WP_reCaptcha_noCaptcha::instance()->print_foot( 'grecaptcha' );
|
437 |
}
|
438 |
exit(0);
|
439 |
}
|
444 |
public function ajax_test_api_key() {
|
445 |
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) {
|
446 |
header('Content-Type: text/html');
|
447 |
+
// WP_reCaptcha::instance()->recaptcha_head( 'grecaptcha' );
|
448 |
+
// WP_reCaptcha::instance()->recaptcha_foot( 'grecaptcha' );
|
449 |
echo WP_reCaptcha_noCaptcha::instance()->get_html( 'grecaptcha' );
|
450 |
$action = 'recaptcha-test-verification';
|
451 |
$nonce = wp_create_nonce( $action );
|
505 |
* )
|
506 |
*/
|
507 |
public function input_radio( $args ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
extract($args); // name, items
|
509 |
+
$option = WP_reCaptcha::instance()->get_option( $name );
|
510 |
+
foreach ( $items as $item ) {
|
511 |
+
extract( $item ); // value, label
|
512 |
+
?><label for="<?php echo "$name-$value" ?>"><?php
|
513 |
+
?><input id="<?php echo "$name-$value" ?>" type="radio" name="<?php echo $name ?>" value="<?php echo $value ?>" <?php checked($value,$option,true) ?> />
|
514 |
+
<?php
|
515 |
+
echo $label;
|
516 |
+
?></label><br /><?php
|
|
|
|
|
|
|
|
|
517 |
}
|
|
|
|
|
518 |
}
|
519 |
|
520 |
/**
|
600 |
$option_name = 'recaptcha_language';
|
601 |
$option_value = WP_reCaptcha::instance()->get_option( $option_name );
|
602 |
|
603 |
+
$all_available_langs = array(
|
604 |
+
'recaptcha' => WP_reCaptcha_ReCaptcha::instance()->get_supported_languages(),
|
605 |
+
'grecaptcha' => WP_reCaptcha_NoCaptcha::instance()->get_supported_languages(),
|
606 |
+
);
|
607 |
|
608 |
+
?><div class="recaptcha-select-language flavor-<?php echo $option_flavor ?>"><?php
|
609 |
+
foreach( $all_available_langs as $flavor => $available_langs ) {
|
610 |
+
?><select class="flavor-<?php echo $flavor ?>" name="<?php echo $option_name ?>[<?php echo $flavor ?>]"><?php
|
611 |
+
?><option <?php selected($option_value,'',true); ?> value=""><?php _e( 'Automatic','wp-recaptcha-integration' ); ?></option><?php
|
612 |
+
?><option <?php selected($option_value,'WPLANG',true); ?> value="WPLANG"><?php _e( 'Site Language' ); ?></option><?php
|
613 |
+
?><optgroup label="<?php _e('Other','wp-recaptcha-integration' ) ?>"><?php
|
614 |
+
foreach ( $available_langs as $lang => $lang_name ) {
|
615 |
+
?><option <?php selected($option_value,$lang,true); ?> value="<?php echo $lang; ?>"><?php _e( $lang_name ); ?></option><?php
|
616 |
+
}
|
617 |
+
?></optgroup><?php
|
618 |
+
?></select><?php
|
619 |
+
}
|
620 |
+
?></div><?php
|
621 |
+
}
|
622 |
+
/**
|
623 |
+
* Selector for recaptcha theme
|
624 |
+
*/
|
625 |
+
public function select_theme() {
|
626 |
+
$option_name = 'recaptcha_theme';
|
627 |
+
|
628 |
+
$grecaptcha_themes = WP_reCaptcha_NoCaptcha::instance()->get_supported_themes();
|
629 |
+
$grecaptcha_themes = array_map( array( $this , '_map_grecaptcha' ) , $grecaptcha_themes );
|
630 |
+
|
631 |
+
$recaptcha_themes = WP_reCaptcha_ReCaptcha::instance()->get_supported_themes();
|
632 |
+
$recaptcha_themes = array_map( array( $this , '_map_recaptcha' ) , $recaptcha_themes );
|
633 |
+
|
634 |
+
$themes = $grecaptcha_themes + $recaptcha_themes;
|
635 |
+
|
636 |
+
$option_theme = WP_reCaptcha::instance()->get_option($option_name);
|
637 |
+
$option_flavor = WP_reCaptcha::instance()->get_option( 'recaptcha_flavor' );
|
638 |
+
|
639 |
+
?><div class="recaptcha-select-theme"><?php
|
640 |
+
|
641 |
+
foreach ( $themes as $value => $theme ) {
|
642 |
+
extract( $theme ); // label, flavor
|
643 |
+
?><div class="theme-item flavor-<?php echo $flavor ?>"><?php
|
644 |
+
?><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
|
645 |
+
?><label for="<?php echo "$option_name-$value" ?>"><?php
|
646 |
+
?><span class="title"><?php
|
647 |
+
echo $label;
|
648 |
+
?></span><?php
|
649 |
+
if ( $value == 'custom' ) {
|
650 |
+
?><span class="visual"><?php
|
651 |
+
_e( 'Unstyled HTML to apply your own Stylesheets.' , 'wp-recaptcha-integration' );
|
652 |
+
?></span><?php
|
653 |
+
} else {
|
654 |
+
$src = plugins_url( "images/{$flavor}-theme-{$value}.png" , dirname(__FILE__));
|
655 |
+
printf( '<img src="%s" alt="%s" />' , $src , $label );
|
656 |
+
}
|
657 |
+
?></label><?php
|
658 |
+
?></div><?php
|
659 |
+
|
660 |
+
}
|
661 |
+
?></div><?php
|
662 |
?></div><?php
|
663 |
}
|
664 |
|
665 |
+
/**
|
666 |
+
* @usage select_theme()
|
667 |
+
*/
|
668 |
+
private function _map_grecaptcha( $val ) {
|
669 |
+
$val['flavor'] = 'grecaptcha';
|
670 |
+
return $val;
|
671 |
+
}
|
672 |
+
/**
|
673 |
+
* @usage select_theme()
|
674 |
+
*/
|
675 |
+
private function _map_recaptcha( $val ) {
|
676 |
+
$val['flavor'] = 'recaptcha';
|
677 |
+
return $val;
|
678 |
+
}
|
679 |
|
680 |
/**
|
681 |
+
* Check if language is supported by current recaptcha flavor
|
682 |
*/
|
683 |
public function sanitize_language( $language ) {
|
684 |
+
$flavor = isset($_REQUEST['recaptcha_flavor']) ? $_REQUEST['recaptcha_flavor'] : WP_reCaptcha::instance()->get_option('recaptcha_flavor');
|
685 |
+
|
686 |
+
if ( isset( $language[$flavor] ) )
|
687 |
+
$language = $language[$flavor];
|
688 |
+
|
689 |
+
if ( $language != 'WPLANG' )
|
690 |
+
$language = WP_reCaptcha::instance()->captcha_instance_by_flavor( $flavor )->get_language( $language );
|
691 |
+
return $language;
|
692 |
}
|
693 |
/**
|
694 |
+
* Check valid recaptcha theme, check if theme fits to flavor
|
695 |
*/
|
696 |
public function sanitize_theme( $theme ) {
|
697 |
+
$themes_available = array(
|
698 |
+
'recaptcha' => array( 'white','red','blackglass','clean','custom' ),
|
699 |
+
'grecaptcha' => array( 'light','dark' ),
|
700 |
+
);
|
701 |
+
$flavor = WP_reCaptcha::instance()->get_option('recaptcha_flavor');
|
702 |
|
703 |
+
if ( isset($themes_available[$flavor] ) && in_array($theme,$themes_available[$flavor]) )
|
704 |
return $theme;
|
705 |
+
else if ( isset($themes_available[$flavor] ) )
|
706 |
+
return $themes_available[$flavor][0];
|
707 |
return 'light';
|
708 |
}
|
709 |
+
|
710 |
/**
|
711 |
+
* Check valid flavor
|
712 |
*/
|
713 |
+
public function sanitize_flavor( $flavor ) {
|
714 |
+
if ( in_array($flavor,array('recaptcha','grecaptcha')) )
|
715 |
+
return $flavor;
|
716 |
+
return 'grecaptcha';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
}
|
718 |
|
719 |
/**
|
723 |
$page_slug = add_options_page(
|
724 |
__('ReCaptcha','wp-recaptcha-integration'), __('ReCaptcha','wp-recaptcha-integration'),
|
725 |
'manage_options', 'recaptcha',
|
726 |
+
array(&$this,'render_options_page')
|
727 |
);
|
728 |
|
729 |
+
add_action( "load-$page_slug" , array( &$this , 'enqueue_styles' ) );
|
730 |
}
|
731 |
|
732 |
/**
|
733 |
* Enqueue script and css for options page.
|
734 |
*/
|
735 |
public function enqueue_styles() {
|
736 |
+
wp_enqueue_style( 'recaptcha-options' , plugins_url( "css/recaptcha-options.css" , dirname(__FILE__)) );
|
737 |
+
wp_enqueue_script( 'recaptcha-options' , plugins_url( "js/recaptcha-options.js" , dirname(__FILE__)) , array( 'jquery' ) );
|
738 |
+
remove_action('admin_notices',array( &$this , 'api_key_notice'));
|
|
|
739 |
}
|
740 |
/**
|
741 |
* Rendering the options page
|
742 |
*/
|
743 |
public function render_options_page() {
|
744 |
+
$option_flavor = WP_reCaptcha::instance()->get_option( 'recaptcha_flavor' );
|
745 |
+
?><div class="wrap flavor-<?php echo $option_flavor ?>"><?php
|
746 |
?><h2><?php /*icon*/
|
747 |
_e('Settings');
|
748 |
echo ' › ';
|
inc/class-wp_recaptcha_recaptcha.php
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
/**
|
23 |
+
* Holding the singleton instance
|
24 |
+
*/
|
25 |
+
private static $_instance = null;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Last error message.
|
29 |
+
*/
|
30 |
+
private $last_error = null;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @return WP_reCaptcha_Options The options manager instance
|
34 |
+
*/
|
35 |
+
public static function instance(){
|
36 |
+
if ( is_null( self::$_instance ) )
|
37 |
+
self::$_instance = new self();
|
38 |
+
return self::$_instance;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Prevent from creating more than one instance
|
43 |
+
*/
|
44 |
+
private function __clone() {
|
45 |
+
}
|
46 |
+
/**
|
47 |
+
* Prevent from creating more than one instance
|
48 |
+
*/
|
49 |
+
private function __construct() {
|
50 |
+
if ( ! function_exists( 'recaptcha_get_html' ) )
|
51 |
+
require_once dirname(__FILE__).'/recaptchalib.php';
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @inheritdoc
|
56 |
+
*/
|
57 |
+
public function get_supported_themes() {
|
58 |
+
return array(
|
59 |
+
'red' => array(
|
60 |
+
'label' => __('Red','wp-recaptcha-integration') ,
|
61 |
+
),
|
62 |
+
'white' => array(
|
63 |
+
'label' => __('White','wp-recaptcha-integration') ,
|
64 |
+
),
|
65 |
+
'blackglass' => array(
|
66 |
+
'label' => __('Black Glass','wp-recaptcha-integration') ,
|
67 |
+
),
|
68 |
+
'clean' => array(
|
69 |
+
'label' => __('Clean','wp-recaptcha-integration') ,
|
70 |
+
),
|
71 |
+
'custom' => array(
|
72 |
+
'label' => __('Custom','wp-recaptcha-integration') ,
|
73 |
+
),
|
74 |
+
);
|
75 |
+
}
|
76 |
+
/**
|
77 |
+
* @inheritdoc
|
78 |
+
*/
|
79 |
+
public function print_login_head() {
|
80 |
+
?><style type="text/css">
|
81 |
+
#login {
|
82 |
+
width:360px !important;
|
83 |
+
}
|
84 |
+
</style><?php
|
85 |
+
}
|
86 |
+
/**
|
87 |
+
* @inheritdoc
|
88 |
+
*/
|
89 |
+
public function print_head() {
|
90 |
+
$recaptcha_theme = WP_reCaptcha::instance()->get_option('recaptcha_theme');
|
91 |
+
if ( $recaptcha_theme == 'custom' ) {
|
92 |
+
?><script type="text/javascript">
|
93 |
+
var RecaptchaOptions = {
|
94 |
+
theme : '<?php echo $recaptcha_theme ?>',
|
95 |
+
custom_theme_widget: 'recaptcha_widget'
|
96 |
+
};
|
97 |
+
</script><?php
|
98 |
+
} else {
|
99 |
+
?><script type="text/javascript">
|
100 |
+
var RecaptchaOptions = {
|
101 |
+
<?php
|
102 |
+
$language_code = apply_filters( 'wp_recaptcha_language' , WP_reCaptcha::instance()->get_option( 'recaptcha_language' ) );
|
103 |
+
if ( $language_code ) { ?>
|
104 |
+
lang : '<?php echo $language_code ?>',
|
105 |
+
<?php } ?>
|
106 |
+
theme : '<?php echo $recaptcha_theme ?>'
|
107 |
+
|
108 |
+
};
|
109 |
+
</script><?php
|
110 |
+
?><style type="text/css">
|
111 |
+
.recaptchatable {
|
112 |
+
table-layout:auto;
|
113 |
+
}
|
114 |
+
</style><?php
|
115 |
+
}
|
116 |
+
}
|
117 |
+
/**
|
118 |
+
* @inheritdoc
|
119 |
+
*/
|
120 |
+
public function print_foot() {
|
121 |
+
if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) {
|
122 |
+
|
123 |
+
?><script type="text/javascript">
|
124 |
+
document.addEventListener('keyup',function(e){
|
125 |
+
if (e.target && typeof e.target.getAttribute=='function' && e.target.getAttribute('ID')=='recaptcha_response_field') {
|
126 |
+
get_form_submits(e.target).setEnabled(!!e.target.value);
|
127 |
+
}
|
128 |
+
});
|
129 |
+
document.addEventListener('DOMContentLoaded',function(e){
|
130 |
+
try {
|
131 |
+
get_form_submits(document.getElementById('wp-recaptcha-integration-marker')).setEnabled(false);
|
132 |
+
} catch(e){};
|
133 |
+
});
|
134 |
+
</script><?php
|
135 |
+
}
|
136 |
+
}
|
137 |
+
/**
|
138 |
+
* @inheritdoc
|
139 |
+
*/
|
140 |
+
public function get_html( $attr = array() ) {
|
141 |
+
$public_key = WP_reCaptcha::instance()->get_option( 'recaptcha_publickey' );
|
142 |
+
$recaptcha_theme = WP_reCaptcha::instance()->get_option('recaptcha_theme');
|
143 |
+
|
144 |
+
if ($recaptcha_theme == 'custom')
|
145 |
+
$return = $this->get_custom_html( $public_key );
|
146 |
+
else
|
147 |
+
$return = recaptcha_get_html( $public_key, $this->last_error );
|
148 |
+
if ( WP_reCaptcha::instance()->get_option( 'recaptcha_disable_submit' ) ) {
|
149 |
+
$return .= '<span id="wp-recaptcha-integration-marker"></span>';
|
150 |
+
}
|
151 |
+
return $return;
|
152 |
+
}
|
153 |
+
/**
|
154 |
+
* @inheritdoc
|
155 |
+
*/
|
156 |
+
public function check() {
|
157 |
+
if ( ! $this->_last_result ) {
|
158 |
+
$private_key = WP_reCaptcha::instance()->get_option( 'recaptcha_privatekey' );
|
159 |
+
$this->_last_result = recaptcha_check_answer( $private_key,
|
160 |
+
$_SERVER["REMOTE_ADDR"],
|
161 |
+
$_POST["recaptcha_challenge_field"],
|
162 |
+
$_POST["recaptcha_response_field"]);
|
163 |
+
|
164 |
+
if ( ! $this->_last_result->is_valid )
|
165 |
+
$this->last_error = $this->_last_result->error;
|
166 |
+
}
|
167 |
+
do_action( 'wp_recaptcha_checked' , $this->_last_result->is_valid );
|
168 |
+
return $this->_last_result->is_valid;
|
169 |
+
}
|
170 |
+
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Get un-themed old style recaptcha HTML.
|
174 |
+
* @return string recaptcha html
|
175 |
+
*/
|
176 |
+
private function get_custom_html( $public_key ) {
|
177 |
+
|
178 |
+
$return = '<div id="recaptcha_widget" style="display:none">';
|
179 |
+
|
180 |
+
$return .= '<div id="recaptcha_image"></div>';
|
181 |
+
$return .= sprintf('<div class="recaptcha_only_if_incorrect_sol" style="color:red">%s</div>',__('Incorrect please try again','wp-recaptcha-integration'));
|
182 |
+
|
183 |
+
$return .= sprintf('<span class="recaptcha_only_if_image">%s</span>',__('Enter the words above:','wp-recaptcha-integration'));
|
184 |
+
$return .= sprintf('<span class="recaptcha_only_if_audio">%s</span>',__('Enter the numbers you hear:','wp-recaptcha-integration'));
|
185 |
+
|
186 |
+
$return .= '<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />';
|
187 |
+
|
188 |
+
$return .= sprintf('<div><a href="javascript:Recaptcha.reload()"></a></div>',__('Get another CAPTCHA','wp-recaptcha-integration'));
|
189 |
+
$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'));
|
190 |
+
$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'));
|
191 |
+
|
192 |
+
$return .= '<div><a href="javascript:Recaptcha.showhelp()">Help</a></div>';
|
193 |
+
$return .= '</div>';
|
194 |
+
|
195 |
+
$return .= sprintf('<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=%s"></script>',$public_key);
|
196 |
+
$return .= '<noscript>';
|
197 |
+
$return .= sprintf('<iframe src="http://www.google.com/recaptcha/api/noscript?k=%s" height="300" width="500" frameborder="0"></iframe><br>',$public_key);
|
198 |
+
$return .= '<textarea name="recaptcha_challenge_field" rows="3" cols="40">';
|
199 |
+
$return .= '</textarea>';
|
200 |
+
$return .= '<input type="hidden" name="recaptcha_response_field" value="manual_challenge">';
|
201 |
+
$return .= '</noscript>';
|
202 |
+
|
203 |
+
return $return;
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
|
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 ( 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,16 +58,7 @@ class WP_reCaptcha_WooCommerce {
|
|
58 |
add_filter('woocommerce_process_login_errors', array( &$this , 'login_errors' ) , 10 , 3 );
|
59 |
}
|
60 |
if ( $enable_signup ) {
|
61 |
-
//
|
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 );
|
@@ -155,20 +146,20 @@ class WP_reCaptcha_WooCommerce {
|
|
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,3 +170,5 @@ class WP_reCaptcha_WooCommerce {
|
|
179 |
return $enabled;
|
180 |
}
|
181 |
}
|
|
|
|
45 |
$enable_lostpw = $wp_recaptcha->get_option('recaptcha_enable_lostpw');
|
46 |
if ( $require_recaptcha ) {
|
47 |
// WooCommerce support
|
48 |
+
if ( $wp_recaptcha->get_option('recaptcha_flavor') == 'grecaptcha' && 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 |
+
// displaying the captcha at hook 'registration_form' already done by core plugin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 );
|
146 |
* hooks into action `woocommerce_checkout_process`
|
147 |
*/
|
148 |
function recaptcha_check() {
|
149 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() )
|
150 |
wc_add_notice( __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration'), 'error' );
|
151 |
}
|
152 |
+
|
153 |
/**
|
154 |
* WooCommerce recaptcha Check
|
155 |
* hooks into actions `woocommerce_process_login_errors` and `woocommerce_registration_errors`
|
156 |
*/
|
157 |
function login_errors( $validation_error ) {
|
158 |
+
if ( ! WP_reCaptcha::instance()->recaptcha_check() )
|
159 |
$validation_error->add( 'captcha_error' , __("<strong>Error:</strong> the Captcha didn’t verify.",'wp-recaptcha-integration') );
|
160 |
return $validation_error;
|
161 |
}
|
162 |
+
|
163 |
/**
|
164 |
* WooCommerce recaptcha Check
|
165 |
* hooks into actions `woocommerce_process_login_errors` and `woocommerce_registration_errors`
|
170 |
return $enabled;
|
171 |
}
|
172 |
}
|
173 |
+
|
174 |
+
|
inc/recaptchalib.php
ADDED
@@ -0,0 +1,277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
?>
|
inc/woocommerce/myaccount/form-lost-password.php
CHANGED
File without changes
|
js/recaptcha-options.js
CHANGED
@@ -1,9 +1,15 @@
|
|
1 |
(function($){
|
2 |
-
$(document).
|
3 |
-
$('
|
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,7 +18,7 @@
|
|
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,15 +33,15 @@
|
|
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);
|
1 |
(function($){
|
2 |
+
$(document).ready(function(){
|
3 |
+
$('[name="recaptcha_flavor"]:checked').trigger('click');
|
|
|
4 |
});
|
5 |
+
$(document).on('click','[name="recaptcha_flavor"]',function(){
|
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 |
|
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 |
'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);
|
js/recaptcha-options.min.js
DELETED
@@ -1,2 +0,0 @@
|
|
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,eyJ2ZXJzaW9uI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bCgnPHNwYW4gY2xhc3M9XCJzcGlubmVyXCI+PC9zcGFuPicpO1xuXHRcdCQucG9zdCggYWpheHVybCAsXG5cdFx0XHRkYXRhICxcblx0XHRcdGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG5cdFx0XHRcdCQoJyNyZWNhcHRjaGEtdGVzdC1yZXN1bHQnKS5odG1sKHJlc3BvbnNlKTtcblx0XHRcdFx0JCgnI3Rlc3QtYXBpLWtleScpLnNob3coKTtcblx0XHRcdH0pO1xuXG5cdFx0ZS5wcmV2ZW50RGVmYXVsdCgpO1xuXHRcdGUuc3RvcFByb3BhZ2F0aW9uKCk7XG5cdFx0cmV0dXJuIGZhbHNlO1xuXHR9KTtcbn0pKGpRdWVyeSk7XG4iXX0=
|
|
|
|
js/wp-recaptcha.js
DELETED
@@ -1,89 +0,0 @@
|
|
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
DELETED
@@ -1,2 +0,0 @@
|
|
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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fSBlbHNlIHtcblx0XHRcdGluaXQoKTtcblx0XHR9XG5cdFx0Ly8gbG9hZCByZWNhcHRjaGEgc2NyaXB0XG5cdH0gZWxzZSB7XG5cdFx0JChkb2N1bWVudCkucmVhZHkoIGluaXQgKTtcblx0fVxuXG59KShqUXVlcnkpO1xuIl19
|
|
|
|
js/wpcf7.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
CHANGED
File without changes
|
languages/wp-recaptcha-integration-cs_CZ.po
CHANGED
File without changes
|
languages/wp-recaptcha-integration-de_DE.mo
CHANGED
File without changes
|
languages/wp-recaptcha-integration-de_DE.po
CHANGED
File without changes
|
languages/wp-recaptcha-integration-es_ES.mo
CHANGED
File without changes
|
languages/wp-recaptcha-integration-es_ES.po
CHANGED
File without changes
|
languages/wp-recaptcha-integration-it_IT.mo
CHANGED
File without changes
|
languages/wp-recaptcha-integration-it_IT.po
CHANGED
File without changes
|
languages/wp-recaptcha-integration-pt_BR.mo
CHANGED
File without changes
|
languages/wp-recaptcha-integration-pt_BR.po
CHANGED
File without changes
|
languages/wp-recaptcha-integration-pt_PT.mo
CHANGED
File without changes
|
languages/wp-recaptcha-integration-pt_PT.po
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,19 +1,19 @@
|
|
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.
|
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
|
17 |
as a plugin API for your own integrations.
|
18 |
|
19 |
= Features: =
|
@@ -25,6 +25,7 @@ as a plugin API for your own integrations.
|
|
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.
|
@@ -43,18 +44,36 @@ On a **WP Multisite** you can either activate the plugin network wide or on a si
|
|
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 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,18 +86,18 @@ Then go to the [Google Recaptcha Site](http://www.google.com/recaptcha), registe
|
|
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 |
|
@@ -94,16 +113,16 @@ You will either need one of the following:
|
|
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,12 +130,12 @@ You will either need one of the following:
|
|
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,41 +148,41 @@ That's too bad...
|
|
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,
|
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,13 +193,13 @@ 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
|
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,8 +210,8 @@ look different than a functional one. This how you can overcome that issue:
|
|
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,33 +232,31 @@ Use the GitHub Repo rather than the WordPress Plugin. Do as follows:
|
|
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 |
-
=
|
|
|
|
|
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)
|
@@ -347,7 +364,7 @@ Please contribute to the official (translation Project for the ReCaptcha Plugin)
|
|
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 =
|
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, captcha, recaptcha, no captcha, login, signup, contact form 7, ninja forms, woocommerce
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 1.2.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, Ninja 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 formsand Ninja Forms as well
|
17 |
as a plugin API for your own integrations.
|
18 |
|
19 |
= Features: =
|
25 |
- BuddyPress
|
26 |
- AwesomeSupport (thanks to [Julien Liabeuf](http://julienliabeuf.com/)
|
27 |
- WooCommerce (Only checkout, registration and login form. Not password reset)
|
28 |
+
- [Ninja Forms](http://ninjaforms.com/)
|
29 |
- cformsII
|
30 |
|
31 |
- 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.
|
44 |
|
45 |
Activated on a single site everything works as usual.
|
46 |
|
47 |
+
With network activation entering the API key and setting up where a captcha is required
|
48 |
+
is up to the network admin. A blog admin can override the API key e.g. when his blog is
|
49 |
+
running under his/her own domain name.
|
50 |
|
51 |
|
52 |
= Known Limitations =
|
53 |
+
- You can't have more than one old style reCaptcha on a page. This is a limitiation of
|
54 |
+
reCaptcha itself. If that's an issue for you, you should use the no Captcha Form.
|
55 |
|
56 |
+
- A No Captcha definitely requires client side JavaScript enabled. That's how it does its
|
57 |
+
sophisticated bot detection magic. There is no fallback. If your visitor does not have
|
58 |
+
JS enabled the captcha test will not let him through.
|
59 |
+
|
60 |
+
- On a **Contact Form 7** when the reCaptcha is disabled (e.g. for logged in users) the field
|
61 |
+
label will be still visible. This is due to CF7 Shortcode architecture, and can't be fixed.
|
62 |
+
|
63 |
+
To handle this there is a filter `recaptcha_disabled_html`. You can return a message for your logged-in
|
64 |
+
users here. Check out the [GitHub Repo](https://github.com/mcguffin/wp-recaptcha-integration) for details.
|
65 |
+
|
66 |
+
- As of version 4.3 CF7 comes with its own recaptcha. Both are supposed to work together.
|
67 |
+
I you want to keep the WP ReCaptcha functionality, e.g. if you want to hide the captcha
|
68 |
+
from known users, leave the integration in the CF7 settings unconfigured.
|
69 |
+
|
70 |
+
- Old style reCaptcha does not work together with **WooCommerce**.
|
71 |
+
|
72 |
+
- In **WooCommerce** the reset password form can not be protected by a captcha. Woocommerce does
|
73 |
not fire any action in the lost password form, so there is no way for the plugin to hook in.
|
74 |
Take a look at [this thread](https://wordpress.org/support/topic/captcha-not-showing-on-lost-password-page?replies=7) for a workaround.
|
75 |
|
76 |
+
- Due to a lack of filters there is no (and as far as one can see, there will never be)
|
77 |
support for the **MailPoet** subscription form.
|
78 |
|
79 |
== Installation ==
|
86 |
|
87 |
= The login captcha says 'ERROR: (something somthing)'. What can I do? =
|
88 |
|
89 |
+
If it says 'Invalid sitekey' and you checked the 'Prevent lockout' option on the plugin
|
90 |
+
settings (it's on by default) you can log in with an administrator account and ignore the
|
91 |
+
captcha. If the keys are really invalid, the plugin will let you in, so you can set up a
|
92 |
+
new keypair.
|
93 |
|
94 |
+
When you see "Invalid domain for site key", then the key is okay in general, but not for
|
95 |
+
your domain. The server can not test this case, so an effective lockout prevention is not
|
96 |
possible.
|
97 |
|
98 |
You will either need one of the following:
|
99 |
- access to the settings for your sitekey on [reCaptcha API key administration](https://www.google.com/recaptcha/admin#list)
|
100 |
+
- access to your WordPress installation (via SSH or FTP) or database access
|
101 |
- database access
|
102 |
|
103 |
|
113 |
4. Find the list entry with the sitekey from step 2
|
114 |
|
115 |
5. If lockout prevention is enabled you can simply delete the key set up a new one.
|
116 |
+
If not enter your domain name at "Domains" in a new line and wait up to 30 minutes.
|
117 |
|
118 |
|
119 |
**With FTP Access:**
|
120 |
|
121 |
+
1. Add this line of Code somewhere at the end of your theme functions.php:
|
122 |
<code>add_filter('wp_recaptcha_required','__return_false');</code>
|
123 |
+
|
124 |
This will disable the chaptcha everywhere.
|
125 |
+
|
126 |
2. Set up a new keypair and test it.
|
127 |
|
128 |
3. Remove the line above from your theme functions.php.
|
130 |
|
131 |
**If you have Database access**
|
132 |
|
133 |
+
1. Execute the following SQL-Commands in your Database:
|
134 |
+
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_publickey';</code>
|
135 |
<code>DELETE FROM wp_options WHERE option_name = 'recaptcha_privatekey';</code>
|
136 |
|
137 |
(Please note that `wp_options` might have a different prefix in your installation.)
|
138 |
+
|
139 |
2. After the login you will see a message asking you to set up the API keys.
|
140 |
|
141 |
3. Set up a new keypair on Google and test it.
|
148 |
|
149 |
= I can't get it to work with my custom comments form. Will you fix for me? =
|
150 |
|
151 |
+
Nope. I cannot give support on your individual projects for free, no matter how many one
|
152 |
+
star reviews you will give me. Have a look at the project wiki or find a WordPress coder.
|
153 |
|
154 |
|
155 |
= Privacy: Will the captcha send the visitors IP address to google? =
|
156 |
|
157 |
+
Yes and no. The captcha verification process, comming into effect after the user has solved
|
158 |
the challenge does not require the disclosure of the visitors IP address, so it is omitted.
|
159 |
|
160 |
+
But everything related to the displaying of the captcha widget like the challenge image,
|
161 |
+
the JavaScripts and so on is loaded directly from Google and is very likely to be logged,
|
162 |
evaluated and stored forever.
|
163 |
|
164 |
+
In other words: Google knows which (recaptcha protected) website is accessed from which IP.
|
165 |
|
166 |
+
If that's an issue for you, you better use a self hosted solution.
|
167 |
|
168 |
|
169 |
= Will you support plugin XYZ? =
|
170 |
|
171 |
+
If XYZ stands for a widely used free and OpenSource plugin in active development with some
|
172 |
+
100k+ downloads I will give it a try. Just ask.
|
173 |
|
174 |
+
If XYZ is some rarely used plugin (about 1k+ active installs or so), I will accept pull
|
175 |
+
requests on github and push it to the WP repository. Please note that in such cases I will
|
176 |
not feel responsible for code maintainance.
|
177 |
|
178 |
|
179 |
= The captcha does not show up. What’s wrong? =
|
180 |
|
181 |
On the plugin settings page check out if the option “Disable for known users” is activated (it is by default).
|
182 |
+
Then log out (or open your page in a private browser window) and try again.
|
183 |
|
184 |
+
If only the comment form is affected, it is very likely that your Theme does not use the
|
185 |
+
`comment_form_defaults` filter. (That‘s where I add the captcha HTML, to make it appear
|
186 |
right before the submit button.) You will have to use another hook, e.g. `comment_form_after_fields`.
|
187 |
|
188 |
Here is some code that will fix it:
|
193 |
- Create a zip Archive out of the included file `recaptcha-comment-form-fix.php` and name it `recaptcha-comment-form-fix.zip`.
|
194 |
- Install and activate it like any other WordPress plugin
|
195 |
|
196 |
+
If the problem still persist, Houston really has a problem, and you are welcome to post a support request.
|
197 |
|
198 |
|
199 |
= Disabled submit buttons should be grey! Why aren't they? =
|
200 |
|
201 |
+
Very likely the Author of your Theme didn't care that a non functinal form element should
|
202 |
+
look different than a functional one. This how you can overcome that issue:
|
203 |
|
204 |
- Go to (https://gist.github.com/mcguffin/7cbfb0dab73eb32cb4a2)
|
205 |
- Click the "Download Gist" button
|
210 |
|
211 |
= I want my visitors to solve only one Captcha and then never again. Is that possible? =
|
212 |
|
213 |
+
Yes. You can store in a session if a captcha was solved, and use the `wp_recaptcha_required`
|
214 |
+
filter to supress further captchas. See (https://github.com/mcguffin/wp-recaptcha-integration#real-world-example)
|
215 |
for a code example.
|
216 |
|
217 |
|
232 |
|
233 |
4. If you want to update to the latest files (be careful, might be untested with your WP-Version) type `git pull.
|
234 |
|
235 |
+
Please note that the GitHub repository is more likely to contain unstable and untested code. Urgent fixes
|
236 |
+
concerning stability or security (like crashes, vulnerabilities and alike) are more likely to be fixed in
|
237 |
the official WP plugin repository first.
|
238 |
|
239 |
|
240 |
+
= I found a bug and fixed it. How can I contribute? =
|
241 |
+
|
242 |
+
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.
|
243 |
|
|
|
244 |
|
245 |
+
= Will you accept translations? =
|
246 |
+
|
247 |
+
Since late 2015 WordPress.org offers a plugin translation API. Just use the
|
248 |
+
"Translate this plugin" button in the right sidebar.
|
249 |
|
250 |
|
251 |
== Screenshots ==
|
252 |
|
253 |
1. Plugin Settings (v 1.1.4)
|
254 |
+
2. Ninja Form Integration
|
255 |
+
3. Contact Form 7 Integration
|
256 |
|
|
|
257 |
|
258 |
== Changelog ==
|
259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
= 1.2.0 =
|
261 |
- Support [cformsII](https://wordpress.org/plugins/cforms2/) (thanks to [Bastian Germann](https://github.com/bgermann))
|
262 |
- Support for Password Reset Protection for older woocommerce Versions [ingomarent](https://github.com/ingomarent)
|
364 |
- Action hook for wp_recaptcha_checked
|
365 |
- NoCaptcha: add non-js fallback.
|
366 |
- Code: pass `WP_Error` to `wp_die()` when comment captcha fails.
|
367 |
+
- Code: Rename filters recaptcha_required > wp_recaptcha_required and recaptcha_disabled_html > wp_recaptcha_disabled_html
|
368 |
- Happy New Year!
|
369 |
|
370 |
= 1.0.2 =
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
screenshot-3.png
ADDED
Binary file
|
wp-recaptcha-integration.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP reCaptcha Integration
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-recaptcha-integration/
|
5 |
Description: Integrate reCaptcha in your blog. Supports no Captcha (new style recaptcha) as well as the old style reCaptcha. Provides of the box integration for signup, login, comment forms, lost password, Ninja Forms and contact form 7.
|
6 |
-
Version: 1.
|
7 |
Author: Jörn Lund
|
8 |
Author URI: https://github.com/mcguffin/
|
9 |
Text Domain: wp-recaptcha-integration
|
@@ -25,9 +25,6 @@ Text Domain: wp-recaptcha-integration
|
|
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__) );
|
30 |
-
|
31 |
/**
|
32 |
* Autoload Classes
|
33 |
*
|
@@ -41,17 +38,18 @@ function wp_recaptcha_integration_autoload( $classname ) {
|
|
41 |
spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
42 |
|
43 |
|
44 |
-
//
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
55 |
|
56 |
WP_reCaptcha::instance();
|
57 |
|
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.2.0
|
7 |
Author: Jörn Lund
|
8 |
Author URI: https://github.com/mcguffin/
|
9 |
Text Domain: wp-recaptcha-integration
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
|
|
|
|
|
|
28 |
/**
|
29 |
* Autoload Classes
|
30 |
*
|
38 |
spl_autoload_register( 'wp_recaptcha_integration_autoload' );
|
39 |
|
40 |
|
41 |
+
// disable 2.0.0 updates on php < 5.4
|
42 |
+
function wp_recaptcha_disable_updates($value) {
|
43 |
+
if ( version_compare(PHP_VERSION, '5.4', '<') ) {
|
44 |
+
$plugin_basename = plugin_basename(__FILE__);
|
45 |
+
if ( isset( $value->response[ $plugin_basename ] ) && version_compare( $value->response[ $plugin_basename ]['new_version'] , '2.0.0', '>=' ) ) {
|
46 |
+
unset( $value->response[ plugin_basename(__FILE__) ] );
|
47 |
+
}
|
48 |
+
}
|
49 |
+
return $value;
|
50 |
+
}
|
51 |
+
add_filter('site_transient_update_plugins', 'wp_recaptcha_disable_updates');
|
52 |
+
|
53 |
|
54 |
WP_reCaptcha::instance();
|
55 |
|