WordPress Zero Spam - Version 5.2.13

Version Description

Download this release

Release Info

Developer bmarshall511
Plugin Icon 128x128 WordPress Zero Spam
Version 5.2.13
Comparing to
See all releases

Code changes from version 5.2.12 to 5.2.13

assets/css/admin.css CHANGED
@@ -1,249 +1,249 @@
1
  :root {
2
- --zerospam-primary: #840012;
3
  }
4
 
5
  .zerospam-new-window-link::after {
6
- background-image: url('../img/icon-new-window.svg');
7
- background-position: center;
8
- background-repeat: no-repeat;
9
- background-size: contain;
10
- content: '';
11
- display: inline-block;
12
- height: 11px;
13
- margin-left: 3px;
14
- vertical-align: middle;
15
- width: 11px;
16
  }
17
 
18
  .zerospam-flag {
19
- display: inline-block;
20
- margin-right: 8px;
21
- vertical-align: sub;
22
  }
23
 
24
  .zerospam-callout,
25
  .zerospam-modal,
26
  .zerospam-notice,
27
- .zerospam-module {
28
- background: #fff;
29
- border: 1px solid #ccd0d4;
30
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
31
  }
32
 
33
  .zerospam-modal,
34
  .zerospam-notice,
35
  .zerospam-module {
36
- box-sizing: border-box;
37
- padding: 30px;
38
  }
39
 
40
  .zerospam-notice,
41
  .zerospam-callout {
42
- margin: 20px 0;
43
  }
44
 
45
  .zerospam-modules {
46
- display: flex;
47
- flex-wrap: wrap;
48
- margin-left: -10px;
49
- margin-right: -10px;
50
  }
51
 
52
  .zerospam-module {
53
- margin: 10px;
54
- width: calc(100% - 20px);
55
  }
56
 
57
  .zerospam-module h3 {
58
- margin: 0 0 30px 0;
59
  }
60
 
61
  @media (min-width: 768px) {
62
- .zerospam-module-map {
63
- width: calc(60% - 20px);
64
- }
65
 
66
- .zerospam-module-ip {
67
- width: calc(40% - 20px);
68
- }
69
 
70
- .zerospam-module-pie,
71
- .zerospam-module-line-chart {
72
- width: calc(50% - 20px)
73
- }
74
  }
75
 
76
  .zerospam-callout {
77
- display: flex;
78
- flex-wrap: wrap;
79
  }
80
 
81
  .zerospam-callout h2,
82
  .zerospam-callout h3 {
83
- margin-top: 0;
84
  }
85
 
86
  .zerospam-callout p:last-child {
87
- margin-bottom: 0;
88
  }
89
 
90
  .zerospam-callout-col {
91
- box-sizing: border-box;
92
- padding: 20px;
93
- width: 100%;
94
  }
95
 
96
  .zerospam-modal {
97
- box-sizing: border-box;
98
- left: 50%;
99
- max-width: 600px;
100
- opacity: 0;
101
- position: fixed;
102
- max-height: calc(90vh - 60px);
103
- overflow: auto;
104
- top: 50%;
105
- transform: translate(-50%, -50%);
106
- transition: all 0.5s;
107
- visibility: hidden;
108
- width: 100%;
109
- z-index: 1;
110
  }
111
 
112
  .zerospam-modal.is-active {
113
- opacity: 1;
114
- visibility: visible;
115
  }
116
 
117
  .zerospam-close-modal {
118
- background: transparent;
119
- border: 0;
120
- cursor: pointer;
121
- display: block;
122
- height: 16px;
123
- padding: 0;
124
- position: absolute;
125
- right: 15px;
126
- top: 15px;
127
- width: 15px;
128
  }
129
 
130
  .zerospam-close-modal::before,
131
  .zerospam-close-modal::after {
132
- background: #23282d;
133
- content: '';
134
- display: block;
135
- height: 16px;
136
- left: 6px;
137
- position: absolute;
138
- top: 0;
139
- width: 3px;
140
  }
141
 
142
  .zerospam-close-modal::before {
143
- transform: rotate(45deg);
144
  }
145
 
146
  .zerospam-close-modal::after {
147
- transform: rotate(-45deg);
148
  }
149
 
150
  .zerospam-modal-details {
151
- align-items: center;
152
- display: flex;;
153
- flex-wrap: wrap;
154
  }
155
 
156
  .zerospam-modal-title,
157
  .zerospam-modal-subtitle {
158
- width: 50%;
159
  }
160
 
161
  .zerospam-modal-headline,
162
  .zerospam-modal-list {
163
- width: 100%;
164
  }
165
 
166
  .zerospam-modal-list li {
167
- display: flex;
168
- justify-content: space-between;
169
- padding: 5px;
170
  }
171
 
172
  .zerospam-modal-list li strong,
173
  .zerospam-modal-list li span {
174
- width: 50%;
175
  }
176
 
177
  .zerospam-modal-list li:nth-child(odd) {
178
- background: #f9f9f9;
179
  }
180
 
181
  .zerospam-modal-subtitle {
182
- text-align: right;
183
  }
184
 
185
  /* Tabs */
186
  .zerospam-settings-tabs .form-table,
187
  .zerospam-tab {
188
- display: none;
189
  }
190
 
191
  .zerospam-settings-tabs h2 {
192
- background: #fff;
193
- border: 1px solid #ccd0d4;
194
- box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
195
- display: block;
196
- cursor: pointer;
197
- margin: 15px 0 0 0;
198
- padding: 15px 20px;
199
  }
200
 
201
  .zerospam-settings-tabs .form-table {
202
- background: #fff;
203
- border: 1px solid #ccd0d4;
204
- border-top: 0;
205
- margin: 0;
206
- padding: 20px;
207
  }
208
 
209
  .zerospam-settings-tabs .form-table.is-active,
210
- .zerospam-tab.is-active {
211
- display: block;
212
  }
213
 
214
  .zerospam-modal form {
215
- display: flex;
216
- flex-wrap: wrap;
217
  }
218
 
219
  .zerospam-modal form label {
220
- display: flex;
221
- flex-wrap: wrap;
222
- margin-bottom: 10px;
223
- width: 100%;
224
  }
225
 
226
  .zerospam-modal form label[for="blocked-ip"],
227
  .zerospam-modal form label[for="blocked-type"],
228
  .zerospam-modal form label[for="blocked-start-date"],
229
  .zerospam-modal form label[for="blocked-end-date"] {
230
- width: 50%;
231
  }
232
 
233
  .zerospam-modal form label[for="location-type"],
234
  .zerospam-modal form label[for="location-key"],
235
  .zerospam-modal form.zerospam-block-location-form label[for="blocked-type"] {
236
- width: calc(100% / 3);
237
  }
238
 
239
  .zerospam-modal input[type="text"],
240
  .zerospam-modal input[type="datetime-local"],
241
  .zerospam-modal select {
242
- width: 100%;
243
  }
244
 
245
  .zerospam-modal input[type="submit"] {
246
- margin-top: 16px;
247
  }
248
 
249
  /* Type theming */
@@ -257,129 +257,134 @@
257
  .zerospam-type-givewp::before,
258
  .zerospam-type-memberpress_registration::before,
259
  .zerospam-type-memberpress_login::before,
260
- .zerospam-type-mailchimp4wp::before {
261
- background-position: center;
262
- background-repeat: no-repeat;
263
- background-size: contain;
264
- content: "";
265
- display: inline-block;
266
- height: 16px;
267
- margin-right: 5px;
268
- vertical-align: sub;
269
- width: 16px;
 
270
  }
271
 
272
  /* Type: blocked */
273
  .zerospam-type-blocked {
274
- color: var(--zerospam-primary);
275
  }
276
 
277
  .zerospam-type-blocked::before {
278
- background-image: url('../img/icon.svg');
279
  }
280
 
281
  /* Type: login, registration, comment */
282
  .zerospam-type-login::before,
283
  .zerospam-type-registration::before,
284
  .zerospam-type-comment::before {
285
- background-image: url('../img/icon-wordpress.svg');
286
  }
287
 
288
  /* Type: fluent_form */
289
  .zerospam-type-fluent_form::before {
290
- background-image: url('../img/icon-fluent-forms.svg');
291
  }
292
 
293
  /* Type: wpforms */
294
  .zerospam-type-wpforms::before {
295
- background-image: url('../img/icon-wpforms.svg');
296
  }
297
 
298
  /* Type: contactform7 */
299
  .zerospam-type-contactform7::before {
300
- background-image: url('../img/icon-cf7.png');
301
  }
302
 
303
  /* Type: memberpress_registration, memberpress_login */
304
  .zerospam-type-memberpress_registration::before,
305
  .zerospam-type-memberpress_login::before {
306
- background-image: url('../img/icon-memberpress.svg');
307
  }
308
 
309
  /* Type: givewp */
310
  .zerospam-type-givewp::before {
311
- background-image: url('../img/icon-givewp.png');
312
  }
313
 
314
  /* Type: mailchimp4wp */
315
  .zerospam-type-mailchimp4wp::before {
316
- background-image: url('../img/icon-mc4wp.svg');
 
 
 
 
 
317
  }
318
 
319
  @media (min-width: 768px) {
320
- .zerospam-callout {
321
- flex-wrap: nowrap;
322
- }
323
 
324
- .zerospam-callout-col {
325
- padding: 30px;
326
- width: 100%;
327
- }
328
  }
329
 
330
  .zerospam-list {
331
- margin: 0;
332
  }
333
 
334
  .zerospam-list li {
335
- align-items: center;
336
- border-bottom: 1px solid #ccd0d4;
337
- display: flex;
338
- margin: 0;
339
- padding: 5px 0;
340
  }
341
 
342
  .zerospam-list li span {
343
- padding-left: 5px;
344
- padding-right: 5px;
345
  }
346
 
347
  .zerospam-list li:last-child {
348
- padding-right: 0;
349
- border-bottom: 0;
350
  }
351
 
352
  .zerospam-list li span:first-child {
353
- padding-left: 0;
354
- width: 35%;
355
  }
356
 
357
  .zerospam-list li span:nth-child(2) {
358
- width: 35%;
359
  }
360
 
361
  .zerospam-list li span:nth-child(3) {
362
- text-align: right;
363
- width: 8%;
364
  }
365
 
366
  .zerospam-list li span:nth-child(4) {
367
- text-align: right;
368
- width: 22%;
369
  }
370
 
371
  .zerospam-export-import-block {
372
- display: flex;
373
- flex-wrap: wrap;
374
  }
375
 
376
  .zerospam-export-import-block-column {
377
- width: 100%;
378
  }
379
 
380
-
381
  @media (min-width: 768px) {
382
- .zerospam-export-import-block-column {
383
- width: 50%;
384
- }
385
  }
1
  :root {
2
+ --zerospam-primary: #840012;
3
  }
4
 
5
  .zerospam-new-window-link::after {
6
+ background-image: url("../img/icon-new-window.svg");
7
+ background-position: center;
8
+ background-repeat: no-repeat;
9
+ background-size: contain;
10
+ content: "";
11
+ display: inline-block;
12
+ height: 11px;
13
+ margin-left: 3px;
14
+ vertical-align: middle;
15
+ width: 11px;
16
  }
17
 
18
  .zerospam-flag {
19
+ display: inline-block;
20
+ margin-right: 8px;
21
+ vertical-align: sub;
22
  }
23
 
24
  .zerospam-callout,
25
  .zerospam-modal,
26
  .zerospam-notice,
27
+ .zerospam-module {
28
+ background: #fff;
29
+ border: 1px solid #ccd0d4;
30
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
31
  }
32
 
33
  .zerospam-modal,
34
  .zerospam-notice,
35
  .zerospam-module {
36
+ box-sizing: border-box;
37
+ padding: 30px;
38
  }
39
 
40
  .zerospam-notice,
41
  .zerospam-callout {
42
+ margin: 20px 0;
43
  }
44
 
45
  .zerospam-modules {
46
+ display: flex;
47
+ flex-wrap: wrap;
48
+ margin-left: -10px;
49
+ margin-right: -10px;
50
  }
51
 
52
  .zerospam-module {
53
+ margin: 10px;
54
+ width: calc(100% - 20px);
55
  }
56
 
57
  .zerospam-module h3 {
58
+ margin: 0 0 30px 0;
59
  }
60
 
61
  @media (min-width: 768px) {
62
+ .zerospam-module-map {
63
+ width: calc(60% - 20px);
64
+ }
65
 
66
+ .zerospam-module-ip {
67
+ width: calc(40% - 20px);
68
+ }
69
 
70
+ .zerospam-module-pie,
71
+ .zerospam-module-line-chart {
72
+ width: calc(50% - 20px);
73
+ }
74
  }
75
 
76
  .zerospam-callout {
77
+ display: flex;
78
+ flex-wrap: wrap;
79
  }
80
 
81
  .zerospam-callout h2,
82
  .zerospam-callout h3 {
83
+ margin-top: 0;
84
  }
85
 
86
  .zerospam-callout p:last-child {
87
+ margin-bottom: 0;
88
  }
89
 
90
  .zerospam-callout-col {
91
+ box-sizing: border-box;
92
+ padding: 20px;
93
+ width: 100%;
94
  }
95
 
96
  .zerospam-modal {
97
+ box-sizing: border-box;
98
+ left: 50%;
99
+ max-width: 600px;
100
+ opacity: 0;
101
+ position: fixed;
102
+ max-height: calc(90vh - 60px);
103
+ overflow: auto;
104
+ top: 50%;
105
+ transform: translate(-50%, -50%);
106
+ transition: all 0.5s;
107
+ visibility: hidden;
108
+ width: 100%;
109
+ z-index: 1;
110
  }
111
 
112
  .zerospam-modal.is-active {
113
+ opacity: 1;
114
+ visibility: visible;
115
  }
116
 
117
  .zerospam-close-modal {
118
+ background: transparent;
119
+ border: 0;
120
+ cursor: pointer;
121
+ display: block;
122
+ height: 16px;
123
+ padding: 0;
124
+ position: absolute;
125
+ right: 15px;
126
+ top: 15px;
127
+ width: 15px;
128
  }
129
 
130
  .zerospam-close-modal::before,
131
  .zerospam-close-modal::after {
132
+ background: #23282d;
133
+ content: "";
134
+ display: block;
135
+ height: 16px;
136
+ left: 6px;
137
+ position: absolute;
138
+ top: 0;
139
+ width: 3px;
140
  }
141
 
142
  .zerospam-close-modal::before {
143
+ transform: rotate(45deg);
144
  }
145
 
146
  .zerospam-close-modal::after {
147
+ transform: rotate(-45deg);
148
  }
149
 
150
  .zerospam-modal-details {
151
+ align-items: center;
152
+ display: flex;
153
+ flex-wrap: wrap;
154
  }
155
 
156
  .zerospam-modal-title,
157
  .zerospam-modal-subtitle {
158
+ width: 50%;
159
  }
160
 
161
  .zerospam-modal-headline,
162
  .zerospam-modal-list {
163
+ width: 100%;
164
  }
165
 
166
  .zerospam-modal-list li {
167
+ display: flex;
168
+ justify-content: space-between;
169
+ padding: 5px;
170
  }
171
 
172
  .zerospam-modal-list li strong,
173
  .zerospam-modal-list li span {
174
+ width: 50%;
175
  }
176
 
177
  .zerospam-modal-list li:nth-child(odd) {
178
+ background: #f9f9f9;
179
  }
180
 
181
  .zerospam-modal-subtitle {
182
+ text-align: right;
183
  }
184
 
185
  /* Tabs */
186
  .zerospam-settings-tabs .form-table,
187
  .zerospam-tab {
188
+ display: none;
189
  }
190
 
191
  .zerospam-settings-tabs h2 {
192
+ background: #fff;
193
+ border: 1px solid #ccd0d4;
194
+ box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
195
+ display: block;
196
+ cursor: pointer;
197
+ margin: 15px 0 0 0;
198
+ padding: 15px 20px;
199
  }
200
 
201
  .zerospam-settings-tabs .form-table {
202
+ background: #fff;
203
+ border: 1px solid #ccd0d4;
204
+ border-top: 0;
205
+ margin: 0;
206
+ padding: 20px;
207
  }
208
 
209
  .zerospam-settings-tabs .form-table.is-active,
210
+ .zerospam-tab.is-active {
211
+ display: block;
212
  }
213
 
214
  .zerospam-modal form {
215
+ display: flex;
216
+ flex-wrap: wrap;
217
  }
218
 
219
  .zerospam-modal form label {
220
+ display: flex;
221
+ flex-wrap: wrap;
222
+ margin-bottom: 10px;
223
+ width: 100%;
224
  }
225
 
226
  .zerospam-modal form label[for="blocked-ip"],
227
  .zerospam-modal form label[for="blocked-type"],
228
  .zerospam-modal form label[for="blocked-start-date"],
229
  .zerospam-modal form label[for="blocked-end-date"] {
230
+ width: 50%;
231
  }
232
 
233
  .zerospam-modal form label[for="location-type"],
234
  .zerospam-modal form label[for="location-key"],
235
  .zerospam-modal form.zerospam-block-location-form label[for="blocked-type"] {
236
+ width: calc(100% / 3);
237
  }
238
 
239
  .zerospam-modal input[type="text"],
240
  .zerospam-modal input[type="datetime-local"],
241
  .zerospam-modal select {
242
+ width: 100%;
243
  }
244
 
245
  .zerospam-modal input[type="submit"] {
246
+ margin-top: 16px;
247
  }
248
 
249
  /* Type theming */
257
  .zerospam-type-givewp::before,
258
  .zerospam-type-memberpress_registration::before,
259
  .zerospam-type-memberpress_login::before,
260
+ .zerospam-type-mailchimp4wp::before,
261
+ .zerospam-type-woocommerce_registration::before {
262
+ background-position: center;
263
+ background-repeat: no-repeat;
264
+ background-size: contain;
265
+ content: "";
266
+ display: inline-block;
267
+ height: 16px;
268
+ margin-right: 5px;
269
+ vertical-align: sub;
270
+ width: 16px;
271
  }
272
 
273
  /* Type: blocked */
274
  .zerospam-type-blocked {
275
+ color: var(--zerospam-primary);
276
  }
277
 
278
  .zerospam-type-blocked::before {
279
+ background-image: url("../img/icon.svg");
280
  }
281
 
282
  /* Type: login, registration, comment */
283
  .zerospam-type-login::before,
284
  .zerospam-type-registration::before,
285
  .zerospam-type-comment::before {
286
+ background-image: url("../img/icon-wordpress.svg");
287
  }
288
 
289
  /* Type: fluent_form */
290
  .zerospam-type-fluent_form::before {
291
+ background-image: url("../img/icon-fluent-forms.svg");
292
  }
293
 
294
  /* Type: wpforms */
295
  .zerospam-type-wpforms::before {
296
+ background-image: url("../img/icon-wpforms.svg");
297
  }
298
 
299
  /* Type: contactform7 */
300
  .zerospam-type-contactform7::before {
301
+ background-image: url("../img/icon-cf7.png");
302
  }
303
 
304
  /* Type: memberpress_registration, memberpress_login */
305
  .zerospam-type-memberpress_registration::before,
306
  .zerospam-type-memberpress_login::before {
307
+ background-image: url("../img/icon-memberpress.svg");
308
  }
309
 
310
  /* Type: givewp */
311
  .zerospam-type-givewp::before {
312
+ background-image: url("../img/icon-givewp.png");
313
  }
314
 
315
  /* Type: mailchimp4wp */
316
  .zerospam-type-mailchimp4wp::before {
317
+ background-image: url("../img/icon-mc4wp.svg");
318
+ }
319
+
320
+ /* Type: woocommerce_registration */
321
+ .zerospam-type-woocommerce_registration::before {
322
+ background-image: url("../img/icon-woocommerce.svg");
323
  }
324
 
325
  @media (min-width: 768px) {
326
+ .zerospam-callout {
327
+ flex-wrap: nowrap;
328
+ }
329
 
330
+ .zerospam-callout-col {
331
+ padding: 30px;
332
+ width: 100%;
333
+ }
334
  }
335
 
336
  .zerospam-list {
337
+ margin: 0;
338
  }
339
 
340
  .zerospam-list li {
341
+ align-items: center;
342
+ border-bottom: 1px solid #ccd0d4;
343
+ display: flex;
344
+ margin: 0;
345
+ padding: 5px 0;
346
  }
347
 
348
  .zerospam-list li span {
349
+ padding-left: 5px;
350
+ padding-right: 5px;
351
  }
352
 
353
  .zerospam-list li:last-child {
354
+ padding-right: 0;
355
+ border-bottom: 0;
356
  }
357
 
358
  .zerospam-list li span:first-child {
359
+ padding-left: 0;
360
+ width: 35%;
361
  }
362
 
363
  .zerospam-list li span:nth-child(2) {
364
+ width: 35%;
365
  }
366
 
367
  .zerospam-list li span:nth-child(3) {
368
+ text-align: right;
369
+ width: 8%;
370
  }
371
 
372
  .zerospam-list li span:nth-child(4) {
373
+ text-align: right;
374
+ width: 22%;
375
  }
376
 
377
  .zerospam-export-import-block {
378
+ display: flex;
379
+ flex-wrap: wrap;
380
  }
381
 
382
  .zerospam-export-import-block-column {
383
+ width: 100%;
384
  }
385
 
 
386
  @media (min-width: 768px) {
387
+ .zerospam-export-import-block-column {
388
+ width: 50%;
389
+ }
390
  }
assets/img/icon-woocommerce.svg ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg preserveAspectRatio="xMidYMid" version="1.1" viewBox="0 0 256 153" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
3
+ <title>WooCommerce Logo</title>
4
+ <metadata>
5
+ <rdf:RDF>
6
+ <cc:Work rdf:about="">
7
+ <dc:format>image/svg+xml</dc:format>
8
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
9
+ <dc:title/>
10
+ </cc:Work>
11
+ </rdf:RDF>
12
+ </metadata>
13
+ <path d="m23.759 0h208.38c13.187 0 23.863 10.675 23.863 23.863v79.542c0 13.187-10.675 23.863-23.863 23.863h-74.727l10.257 25.118-45.109-25.118h-98.695c-13.187 0-23.863-10.675-23.863-23.863v-79.542c-0.10466-13.083 10.571-23.863 23.758-23.863z" fill="#7f54b3"/>
14
+ <path d="m14.578 21.75c1.4569-1.9772 3.6423-3.0179 6.5561-3.226 5.3073-0.41626 8.3252 2.0813 9.0537 7.4927 3.226 21.75 6.7642 40.169 10.511 55.259l22.79-43.395c2.0813-3.9545 4.6829-6.0358 7.8049-6.2439 4.5789-0.3122 7.3886 2.6016 8.5333 8.7415 2.6016 13.841 5.9317 25.6 9.8862 35.59 2.7057-26.433 7.2846-45.476 13.737-57.236 1.561-2.9138 3.8504-4.3707 6.8683-4.5789 2.3935-0.20813 4.5789 0.52033 6.5561 2.0813 1.9772 1.561 3.0179 3.5382 3.226 5.9317 0.10406 1.8732-0.20813 3.4341-1.0407 4.9951-4.0585 7.4927-7.3886 20.085-10.094 37.567-2.6016 16.963-3.5382 30.179-2.9138 39.649 0.20813 2.6016-0.20813 4.8911-1.2488 6.8683-1.2488 2.2894-3.122 3.5382-5.5154 3.7463-2.7057 0.20813-5.5154-1.0406-8.2211-3.8504-9.678-9.8862-17.379-24.663-22.998-44.332-6.7642 13.32-11.759 23.311-14.985 29.971-6.1398 11.759-11.343 17.795-15.714 18.107-2.8098 0.20813-5.2033-2.1854-7.2846-7.1805-5.3073-13.633-11.031-39.961-17.171-78.985-0.41626-2.7057 0.20813-5.0992 1.665-6.9724zm223.64 16.338c-3.7463-6.5561-9.2618-10.511-16.65-12.072-1.9772-0.41626-3.8504-0.62439-5.6195-0.62439-9.9902 0-18.107 5.2033-24.455 15.61-5.4114 8.8455-8.1171 18.628-8.1171 29.346 0 8.013 1.665 14.881 4.9951 20.605 3.7463 6.5561 9.2618 10.511 16.65 12.072 1.9772 0.41626 3.8504 0.62439 5.6195 0.62439 10.094 0 18.211-5.2033 24.455-15.61 5.4114-8.9496 8.1171-18.732 8.1171-29.45 0.10406-8.1171-1.665-14.881-4.9951-20.501zm-13.112 28.826c-1.4569 6.8683-4.0585 11.967-7.9089 15.402-3.0179 2.7057-5.8276 3.8504-8.4293 3.3301-2.4976-0.52033-4.5789-2.7057-6.1398-6.7642-1.2488-3.226-1.8732-6.452-1.8732-9.4699 0-2.6016 0.20813-5.2033 0.72846-7.5967 0.93659-4.2667 2.7057-8.4293 5.5154-12.384 3.4341-5.0992 7.0764-7.1805 10.823-6.452 2.4976 0.52033 4.5789 2.7057 6.1398 6.7642 1.2488 3.226 1.8732 6.452 1.8732 9.4699 0 2.7057-0.20813 5.3073-0.72846 7.7008zm-52.033-28.826c-3.7463-6.5561-9.3659-10.511-16.65-12.072-1.9772-0.41626-3.8504-0.62439-5.6195-0.62439-9.9902 0-18.107 5.2033-24.455 15.61-5.4114 8.8455-8.1171 18.628-8.1171 29.346 0 8.013 1.665 14.881 4.9951 20.605 3.7463 6.5561 9.2618 10.511 16.65 12.072 1.9772 0.41626 3.8504 0.62439 5.6195 0.62439 10.094 0 18.211-5.2033 24.455-15.61 5.4114-8.9496 8.1171-18.732 8.1171-29.45 0-8.1171-1.665-14.881-4.9951-20.501zm-13.216 28.826c-1.4569 6.8683-4.0585 11.967-7.9089 15.402-3.0179 2.7057-5.8276 3.8504-8.4293 3.3301-2.4976-0.52033-4.5789-2.7057-6.1398-6.7642-1.2488-3.226-1.8732-6.452-1.8732-9.4699 0-2.6016 0.20813-5.2033 0.72846-7.5967 0.93658-4.2667 2.7057-8.4293 5.5154-12.384 3.4341-5.0992 7.0764-7.1805 10.823-6.452 2.4976 0.52033 4.5789 2.7057 6.1398 6.7642 1.2488 3.226 1.8732 6.452 1.8732 9.4699 0.10406 2.7057-0.20813 5.3073-0.72846 7.7008z" fill="#fff"/>
15
+ </svg>
core/admin/class-dashboard.php CHANGED
@@ -55,7 +55,7 @@ class Dashboard {
55
 
56
  $url = $url['scheme'] . '://' . $url['host'] . ( ! empty( $url['port'] ) ? ':' . $url['port'] : '' ) . $url['path'] . '?' . $url['query'];
57
 
58
- if ( ! isset( $_POST['zerospam'] ) || ! wp_verify_nonce( $_POST['zerospam'], 'zero-spam' ) ) {
59
  wp_redirect( $url . '&zerospam-error=1' );
60
  exit;
61
  }
@@ -88,6 +88,7 @@ class Dashboard {
88
  $record['start_block'] = sanitize_text_field( $_POST['blocked_start_date'] );
89
  $record['end_block'] = sanitize_text_field( $_POST['blocked_end_date'] );
90
 
 
91
  if ( ! empty( $record['user_ip'] ) && ! rest_is_ip_address( $record['user_ip'] ) ) {
92
  wp_safe_redirect( $url . '&zerospam-error=1' );
93
  exit;
55
 
56
  $url = $url['scheme'] . '://' . $url['host'] . ( ! empty( $url['port'] ) ? ':' . $url['port'] : '' ) . $url['path'] . '?' . $url['query'];
57
 
58
+ if ( ! isset( $_POST['zerospam'] ) || ! wp_verify_nonce( $_POST['zerospam'], 'zerospam' ) ) {
59
  wp_redirect( $url . '&zerospam-error=1' );
60
  exit;
61
  }
88
  $record['start_block'] = sanitize_text_field( $_POST['blocked_start_date'] );
89
  $record['end_block'] = sanitize_text_field( $_POST['blocked_end_date'] );
90
 
91
+
92
  if ( ! empty( $record['user_ip'] ) && ! rest_is_ip_address( $record['user_ip'] ) ) {
93
  wp_safe_redirect( $url . '&zerospam-error=1' );
94
  exit;
includes/class-db.php CHANGED
@@ -284,7 +284,7 @@ class DB {
284
  if ( ! empty( $args['orderby'] ) ) {
285
  $orderby = $args['orderby'];
286
  if ( ! empty( $args['order'] ) ) {
287
- $orderby = ' ' . $args['order'];
288
  }
289
 
290
  $sql .= ' ORDER BY ' . sanitize_sql_orderby( $orderby );
284
  if ( ! empty( $args['orderby'] ) ) {
285
  $orderby = $args['orderby'];
286
  if ( ! empty( $args['order'] ) ) {
287
+ $orderby .= ' ' . $args['order'];
288
  }
289
 
290
  $sql .= ' ORDER BY ' . sanitize_sql_orderby( $orderby );
includes/class-plugin.php CHANGED
@@ -154,6 +154,11 @@ class Plugin {
154
  new \ZeroSpam\Modules\MailchimpForWP\MailchimpForWP();
155
  }
156
 
 
 
 
 
 
157
  // Debug module.
158
  new \ZeroSpam\Modules\Debug();
159
  }
154
  new \ZeroSpam\Modules\MailchimpForWP\MailchimpForWP();
155
  }
156
 
157
+ // Zero Spam WooCommerce module.
158
+ if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
159
+ new \ZeroSpam\Modules\WooCommerce\WooCommerce();
160
+ }
161
+
162
  // Debug module.
163
  new \ZeroSpam\Modules\Debug();
164
  }
modules/davidwalsh/assets/js/davidwalsh.js CHANGED
@@ -26,16 +26,20 @@
26
  // Hidden input isn't present, add it.
27
  $(
28
  '<input type="hidden" name="zerospam_david_walsh_key" value="' +
29
- ZeroSpamDavidWalsh.key +
30
  '" />'
31
  ).appendTo(this);
32
  }
33
  };
34
 
35
- $(function() {
36
- var selectors = '#commentform, #registerform, .wpforms-form, .wpcf7-form, .frm-fluent-form, #loginform, .woocommerce-form-login, .mepr-signup-form, .mc4wp-form, #mepr_loginform';
37
- if (typeof ZeroSpamDavidWalsh.selectors != "undefined" && ZeroSpamDavidWalsh.selectors ) {
38
- selectors += ',' + ZeroSpamDavidWalsh.selectors
 
 
 
 
39
  }
40
 
41
  jQuery(selectors).ZeroSpamDavidWalsh();
26
  // Hidden input isn't present, add it.
27
  $(
28
  '<input type="hidden" name="zerospam_david_walsh_key" value="' +
29
+ ZeroSpamDavidWalsh.key +
30
  '" />'
31
  ).appendTo(this);
32
  }
33
  };
34
 
35
+ $(function () {
36
+ var selectors =
37
+ "#commentform, #registerform, .wpforms-form, .wpcf7-form, .frm-fluent-form, #loginform, .mepr-signup-form, .mc4wp-form, #mepr_loginform, .woocommerce-form-register";
38
+ if (
39
+ typeof ZeroSpamDavidWalsh.selectors != "undefined" &&
40
+ ZeroSpamDavidWalsh.selectors
41
+ ) {
42
+ selectors += "," + ZeroSpamDavidWalsh.selectors;
43
  }
44
 
45
  jQuery(selectors).ZeroSpamDavidWalsh();
modules/davidwalsh/class-davidwalsh.php CHANGED
@@ -47,6 +47,7 @@ class DavidWalsh {
47
  add_action( 'zerospam_login_scripts', array( $this, 'enqueue_script' ) );
48
  add_action( 'zerospam_mailchimp4wp_scripts', array( $this, 'enqueue_script' ) );
49
  add_action( 'zerospam_memberpress_login_scripts', array( $this, 'enqueue_script' ) );
 
50
  add_filter(
51
  'zerospam_memberpress_registration_scripts',
52
  function( $scripts ) {
@@ -67,6 +68,7 @@ class DavidWalsh {
67
  add_filter( 'zerospam_preprocess_memberpress_registration', array( $this, 'validate_post' ), 10, 3 );
68
  add_filter( 'zerospam_preprocess_memberpress_login', array( $this, 'validate_post' ), 10, 3 );
69
  add_filter( 'zerospam_preprocess_mailchimp4wp', array( $this, 'validate_post' ), 10, 3 );
 
70
  }
71
  }
72
 
47
  add_action( 'zerospam_login_scripts', array( $this, 'enqueue_script' ) );
48
  add_action( 'zerospam_mailchimp4wp_scripts', array( $this, 'enqueue_script' ) );
49
  add_action( 'zerospam_memberpress_login_scripts', array( $this, 'enqueue_script' ) );
50
+ add_action( 'zerospam_woocommerce_registration_scripts', array( $this, 'enqueue_script' ) );
51
  add_filter(
52
  'zerospam_memberpress_registration_scripts',
53
  function( $scripts ) {
68
  add_filter( 'zerospam_preprocess_memberpress_registration', array( $this, 'validate_post' ), 10, 3 );
69
  add_filter( 'zerospam_preprocess_memberpress_login', array( $this, 'validate_post' ), 10, 3 );
70
  add_filter( 'zerospam_preprocess_mailchimp4wp', array( $this, 'validate_post' ), 10, 3 );
71
+ add_filter( 'zerospam_process_woocommerce_registration', array( $this, 'validate_post' ), 10, 3 );
72
  }
73
  }
74
 
modules/woocommerce/class-woocommerce.php ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Zero Spam for WordPress WooCommerce Module
4
+ *
5
+ * @package ZeroSpam
6
+ */
7
+
8
+ namespace ZeroSpam\Modules\WooCommerce;
9
+
10
+ // Security Note: Blocks direct access to the plugin PHP files.
11
+ defined( 'ABSPATH' ) || die();
12
+
13
+ /**
14
+ * Zero Spam WooCommerce Module Class
15
+ */
16
+ class WooCommerce {
17
+ /**
18
+ * Class constructor
19
+ */
20
+ public function __construct() {
21
+ add_action( 'init', array( $this, 'init' ) );
22
+ }
23
+
24
+ /**
25
+ * Register the Zero Spam detection types
26
+ *
27
+ * @param array $types Array of available detection types.
28
+ */
29
+ public function types( $types ) {
30
+ $types['woocommerce_registration'] = __( 'WooCommerce Registration', 'zero-spam' );
31
+
32
+ return $types;
33
+ }
34
+
35
+ /**
36
+ * Register the Zero Spam admin setting sections
37
+ *
38
+ * @param array $sections Array of admin setting sections.
39
+ */
40
+ public function sections( $sections ) {
41
+ $sections['woocommerce'] = array(
42
+ 'title' => __( 'WooCommerce Integration', 'zero-spam' ),
43
+ );
44
+
45
+ return $sections;
46
+ }
47
+
48
+ /**
49
+ * Register the Zero Spam admin settings for this module
50
+ *
51
+ * @param array $settings Array of available settings.
52
+ * @param array $options Array of saved database options.
53
+ */
54
+ public function settings( $settings, $options ) {
55
+ $settings['verify_woocommerce_registrations'] = array(
56
+ 'title' => __( 'Protect Registrations', 'zero-spam' ),
57
+ 'section' => 'woocommerce',
58
+ 'type' => 'checkbox',
59
+ 'options' => array(
60
+ 'enabled' => __( 'Monitor WooCommerce registrations for malicious or automated spambots.', 'zero-spam' ),
61
+ ),
62
+ 'value' => ! empty( $options['verify_woocommerce_registrations'] ) ? 'enabled' : false,
63
+ 'recommended' => 'enabled',
64
+ );
65
+
66
+ $message = __( 'Your IP has been flagged as spam/malicious.', 'zero-spam' );
67
+
68
+ $settings['woocommerce_registration_spam_message'] = array(
69
+ 'title' => __( 'Spam/Malicious Message', 'zero-spam' ),
70
+ 'desc' => __( 'When WooCommerce registration protection is enabled, the message displayed to the user when a registration has been detected as spam/malicious.', 'zero-spam' ),
71
+ 'section' => 'woocommerce',
72
+ 'type' => 'text',
73
+ 'field_class' => 'large-text',
74
+ 'placeholder' => $message,
75
+ 'value' => ! empty( $options['registration_spam_message'] ) ? $options['registration_spam_message'] : $message,
76
+ 'recommended' => $message,
77
+ );
78
+
79
+ $settings['log_blocked_woocommerce_registrations'] = array(
80
+ 'title' => __( 'Log Blocked Registrations', 'zero-spam' ),
81
+ 'section' => 'woocommerce',
82
+ 'type' => 'checkbox',
83
+ 'desc' => wp_kses(
84
+ __( 'Enables logging blocked WooCommerce registrations. <strong>Recommended for enhanced protection.</strong>', 'zero-spam' ),
85
+ array( 'strong' => array() )
86
+ ),
87
+ 'options' => array(
88
+ 'enabled' => __( 'Enabled', 'zero-spam' ),
89
+ ),
90
+ 'value' => ! empty( $options['log_blocked_registrations'] ) ? 'enabled' : false,
91
+ 'recommended' => 'enabled',
92
+ );
93
+
94
+ return $settings;
95
+ }
96
+
97
+ /**
98
+ * Fires after WordPress has finished loading but before any headers are sent.
99
+ */
100
+ public function init() {
101
+ add_filter( 'zerospam_setting_sections', array( $this, 'sections' ) );
102
+ add_filter( 'zerospam_settings', array( $this, 'settings' ), 10, 2 );
103
+ add_filter( 'zerospam_types', array( $this, 'types' ), 10, 1 );
104
+
105
+ if (
106
+ 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_woocommerce_registrations' ) &&
107
+ \ZeroSpam\Core\Access::process()
108
+ ) {
109
+ add_action( 'woocommerce_register_form', array( $this, 'honeypot' ) );
110
+ add_action( 'woocommerce_register_form', array( $this, 'scripts' ) );
111
+ add_action( 'woocommerce_register_post', array( $this, 'process_registration' ), 10, 3 );
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Adds the 'honeypot' field to the WooCommerce registration form
117
+ */
118
+ public function honeypot() {
119
+ woocommerce_form_field(
120
+ \ZeroSpam\Core\Utilities::get_honeypot(),
121
+ array(
122
+ 'type' => 'hidden',
123
+ 'class' => array( 'zero-spam-hidden' ),
124
+ )
125
+ );
126
+ }
127
+
128
+ /**
129
+ * Load the scripts
130
+ */
131
+ public function scripts() {
132
+ do_action( 'zerospam_woocommerce_registration_scripts' );
133
+ }
134
+
135
+ /**
136
+ * Preprocess registrations
137
+ *
138
+ * @param string $username Registration username.
139
+ * @param string $email Registration email address.
140
+ * @param string $errors WooCommerce error object.
141
+ */
142
+ public function process_registration( $username, $email, $errors ) {
143
+ // Get all posted form fields.
144
+ // @codingStandardsIgnoreLine
145
+ $data = \ZeroSpam\Core\Utilities::sanitize_array( $_POST );
146
+
147
+ // Get the WooCommerce registration spam message.
148
+ $spam_message = \ZeroSpam\Core\Utilities::detection_message( 'woocommerce_registration_spam_message' );
149
+
150
+ // Create the details array for logging & sharing data.
151
+ $details = array(
152
+ 'username' => $username,
153
+ 'email' => $email,
154
+ 'data' => $data,
155
+ 'type' => 'woocommerce_registration',
156
+ );
157
+
158
+ // Create the validation errors array.
159
+ $validation_errors = array();
160
+
161
+ // Check Zero Spam's honeypot field.
162
+ $honeypot_field_name = \ZeroSpam\Core\Utilities::get_honeypot();
163
+ if ( isset( $data[ $honeypot_field_name ] ) && ! empty( $data[ $honeypot_field_name ] ) ) {
164
+ // Failed the honeypot check.
165
+ $validation_errors[] = 'honeypot';
166
+ }
167
+
168
+ // Check blocked email domains.
169
+ if ( \ZeroSpam\Core\Utilities::is_email_domain_blocked( $email ) ) {
170
+ // Email domain has been blocked.
171
+ $validation_errors[] = 'blocked_email_domain';
172
+ }
173
+
174
+ // Fire hook for additional validation (ex. David Walsh script).
175
+ $filtered_errors = apply_filters( 'zerospam_process_woocommerce_registration', array(), $data, 'woocommerce_registration_spam_message' );
176
+
177
+ if ( ! empty( $filtered_errors ) ) {
178
+ foreach ( $filtered_errors as $key => $message ) {
179
+ $validation_errors[] = str_replace( 'zerospam_', '', $key );
180
+ }
181
+ }
182
+
183
+ // Check for validation errors, then log & share if enabled.
184
+ if ( ! empty( $validation_errors ) ) {
185
+ // Failed validations, log & send details if enabled.
186
+ foreach ( $validation_errors as $key => $fail ) {
187
+ $details['failed'] = $fail;
188
+
189
+ // Log the detection if enabled.
190
+ if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'log_blocked_woocommerce_registrations' ) ) {
191
+ \ZeroSpam\Includes\DB::log( 'woocommerce_registration', $details );
192
+ }
193
+
194
+ // Share the detection if enabled.
195
+ if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'share_data' ) ) {
196
+ do_action( 'zerospam_share_detection', $details );
197
+ }
198
+ }
199
+
200
+ // Add the spam message to the WooCommerce errors object.
201
+ $errors->add( 'zerospam_error', $spam_message );
202
+ }
203
+ }
204
+ }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.zerospam.org/subscribe/
5
  Requires at least: 5.2
6
  Tested up to: 5.9
7
  Requires PHP: 7.3
8
- Stable tag: 5.2.12
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
@@ -41,6 +41,7 @@ Quit forcing people to answer questions or confusing captchas to prove they're n
41
  * [Fluent Forms](https://wordpress.org/plugins/fluentform/) submissions
42
  * [MemberPress](https://memberpress.com/) registrations
43
  * [Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/) submissions
 
44
  * and can be easily integrated into any existing theme or plugin
45
 
46
  Zero Spam for WordPress is great at blocking spam &mdash; as a site owner there's more you can do to [stop WordPress spam](https://www.benmarshall.me/stop-wordpress-spam/) in its tracks.
@@ -103,6 +104,11 @@ If hosting with Pantheon, see their [known issues page](https://pantheon.io/docs
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
106
  = v5.2.12 =
107
 
108
  * refactor(wordpress coding standards): misc updates to conform to wordpress coding standards
5
  Requires at least: 5.2
6
  Tested up to: 5.9
7
  Requires PHP: 7.3
8
+ Stable tag: 5.2.13
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
41
  * [Fluent Forms](https://wordpress.org/plugins/fluentform/) submissions
42
  * [MemberPress](https://memberpress.com/) registrations
43
  * [Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/) submissions
44
+ * [WooCommerce](https://wordpress.org/plugins/woocommerce/) registrations
45
  * and can be easily integrated into any existing theme or plugin
46
 
47
  Zero Spam for WordPress is great at blocking spam &mdash; as a site owner there's more you can do to [stop WordPress spam](https://www.benmarshall.me/stop-wordpress-spam/) in its tracks.
104
 
105
  == Changelog ==
106
 
107
+ = v5.2.13 =
108
+
109
+ * feat(woocommerce): added support for woocommerce registrations, resolves #306
110
+ * fix(admin): fix for displaying & adding blocked ip addresses, resolves #308
111
+
112
  = v5.2.12 =
113
 
114
  * refactor(wordpress coding standards): misc updates to conform to wordpress coding standards
wordpress-zero-spam.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: Zero Spam for WordPress
14
  * Plugin URI: https://www.highfivery.com/projects/zero-spam/
15
  * Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam &amp; malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
16
- * Version: 5.2.12
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.3
19
  * Author: Highfivery LLC
@@ -31,7 +31,7 @@ defined( 'ABSPATH' ) || die();
31
  define( 'ZEROSPAM', __FILE__ );
32
  define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
33
  define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
34
- define( 'ZEROSPAM_VERSION', '5.2.12' );
35
 
36
  if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
37
  define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );
13
  * Plugin Name: Zero Spam for WordPress
14
  * Plugin URI: https://www.highfivery.com/projects/zero-spam/
15
  * Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam &amp; malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
16
+ * Version: 5.2.13
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.3
19
  * Author: Highfivery LLC
31
  define( 'ZEROSPAM', __FILE__ );
32
  define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
33
  define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
34
+ define( 'ZEROSPAM_VERSION', '5.2.13' );
35
 
36
  if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
37
  define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );