Version Description
Download this release
Release Info
Developer | swissspidy |
Plugin | Antispam Bee |
Version | 2.7.0 |
Comparing to | |
See all releases |
Code changes from version 2.6.9 to 2.7.0
- README.md +0 -342
- antispam_bee.php +706 -409
- css/dashboard.css +0 -4
- css/styles.css +35 -39
- css/styles.min.css +1 -1
- inc/columns.class.php +11 -18
- inc/gui.class.php +243 -97
- js/dashboard.js +2 -2
- js/scripts.js +4 -4
- js/scripts.min.js +1 -1
- lang/antispam-bee-fr_FR.mo +0 -0
- lang/antispam-bee-fr_FR.po +0 -264
- lang/antispam-bee-sl_SI.mo +0 -0
- lang/antispam-bee-sl_SI.po +0 -388
- lang/antispam-bee-sv_SE.mo +0 -0
- lang/antispam-bee-sv_SE.po +0 -286
- readme.txt +156 -0
README.md
DELETED
@@ -1,342 +0,0 @@
|
|
1 |
-
# Antispam Bee #
|
2 |
-
* Contributors: pluginkollektiv
|
3 |
-
* Tags: comment, spam, antispam, comments, trackback, protection, prevention
|
4 |
-
* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8CH5FPR88QYML
|
5 |
-
* Requires at least: 3.8
|
6 |
-
* Tested up to: 4.6
|
7 |
-
* Stable tag: 2.6.9
|
8 |
-
* License: GPLv2 or later
|
9 |
-
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
“…another popular solution to fight spam is Antispam Bee”—Matt Mullenweg, Q&A WordCamp Europe 2014
|
12 |
-
|
13 |
-
## Description ##
|
14 |
-
Say Goodbye to comment spam on your WordPress blog or website. *Antispam Bee* blocks spam comments and trackbacks effectively and without captchas. It is free of charge, ad-free and compliant with European data privacy standards.
|
15 |
-
|
16 |
-
### Feature/Settings Overview ###
|
17 |
-
* Trust approved commenters.
|
18 |
-
* Trust commenters with a Gravatar.
|
19 |
-
* Consider the comment time.
|
20 |
-
* Treat BBCode as spam.
|
21 |
-
* Validate the IP address of commenters.
|
22 |
-
* Use regular expressions.
|
23 |
-
* Search local spam database for commenters previously marked as spammers.
|
24 |
-
* Match against a public anti-spam database.
|
25 |
-
* Notify admins by e-mail about incoming spam.
|
26 |
-
* Delete existing spam after n days.
|
27 |
-
* Limit approval to comments/pings (will delete other comment types).
|
28 |
-
* Select spam indicators to send comments to deletion directly.
|
29 |
-
* Optionally exclude trackbacks and pingbacks from spam detection.
|
30 |
-
* Optionally spam-check comment forms on archive pages.
|
31 |
-
* Display spam statistics on the dashboard, including daily updates of spam detection rate and a total of blocked spam comments.
|
32 |
-
|
33 |
-
> #### Auf Deutsch? ####
|
34 |
-
> Für eine ausführliche [Dokumentation](https://github.com/pluginkollektiv/antispam-bee/wiki/Dokumentation) besuche bitte das [Antispam-Bee-Wiki](https://github.com/pluginkollektiv/antispam-bee/wiki). Dort findest du u.a. Antworten auf [häufig gestellte Fragen](https://github.com/pluginkollektiv/antispam-bee/wiki/H%C3%A4ufige-Fragen), sowie Hinweise zu den [Einstellungen der Antispam-Regeln](https://github.com/pluginkollektiv/antispam-bee/wiki/Dokumentation#antispam-regeln).
|
35 |
-
>
|
36 |
-
> **Community-Support auf Deutsch** erhältst du in einem der [deutschsprachigen Foren](https://de.forums.wordpress.org/forum/plugins); im [Plugin-Forum für Antispam Bee](https://wordpress.org/support/plugin/antispam-bee) wird, wie in allen Plugin-Foren auf wordpress.org, ausschließlich **Englisch** gesprochen.
|
37 |
-
|
38 |
-
### Credits ###
|
39 |
-
* Author: [Sergej Müller](https://sergejmueller.github.io/)
|
40 |
-
* Maintainers: [pluginkollektiv](http://pluginkollektiv.org)
|
41 |
-
|
42 |
-
## Installation ##
|
43 |
-
* If you don’t know how to install a plugin for WordPress, [here’s how](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
|
44 |
-
|
45 |
-
### Requirements ###
|
46 |
-
* PHP 5.2.4 or greater
|
47 |
-
* WordPress 3.8 or greater
|
48 |
-
|
49 |
-
### Settings ###
|
50 |
-
After you have activated *Antispam Bee* the plugin will block spam comments out of the box. However, you may want to visit *Settings → Antispam Bee* to configure your custom set of anti-spam options that works best for your site.
|
51 |
-
|
52 |
-
### Privacy Notice ###
|
53 |
-
On sites operating from within the EU the option *Use a public antispam database* should not be activated for privacy reasons. When that option has been activated, *Antispam Bee* will match full IP addresses from comments against a public spam database. Technically it is not possible to encrypt those IPs, because spam databases only store and operate with complete, unencrypted IP addresses.
|
54 |
-
|
55 |
-
## Frequently Asked Questions ##
|
56 |
-
|
57 |
-
### Does Antispam Bee work with Jetpack, Disqus Comments and other comment plugins? ###
|
58 |
-
Antispam Bee works best with default WordPress comments. It is not compatible with Jetpack or Disqus Comments as those plugins load the comment form within an iframe. Thus Antispam Bee can not access the comment form directly.
|
59 |
-
It also won’t work with any AJAX-powered comment forms.
|
60 |
-
|
61 |
-
### On how many web sites or blogs can I use Antispam Bee? ###
|
62 |
-
On as many as you wish. There is no limitation to the number of sites you use the plugin on.
|
63 |
-
|
64 |
-
### Do I have to register for any sort of paid service if my site gets a lot of comment spam? ###
|
65 |
-
No, Antispam Bee is free forever, for both private and commercial projects.
|
66 |
-
|
67 |
-
### Does Antispam Bee store any private user data, IP addresses or the like? ###
|
68 |
-
Nope. Antispam Bee is developed in Germany and Switzerland. You might have heard we can be a bit nitpicky over here when it comes to privacy.
|
69 |
-
|
70 |
-
### Will I have to edit any theme templates to get Antispam Bee to work? ###
|
71 |
-
No, the plugin works as is. You may want to configure your favorite settings, though.
|
72 |
-
|
73 |
-
## Changelog ##
|
74 |
-
|
75 |
-
### 2.6.9 ###
|
76 |
-
* Updates donation links throughout the plugin
|
77 |
-
* Fixes an error were JavaScript on the dashboard was erroneously being enqueued
|
78 |
-
* Ensures compatibility with the latest WordPress version
|
79 |
-
|
80 |
-
### 2.6.8 ###
|
81 |
-
* added a POT file
|
82 |
-
* updated German translation, added formal version
|
83 |
-
* updated plugin text domain to include a dash instead of an underscore
|
84 |
-
* updated, translated + formatted README.md
|
85 |
-
* updated expired link URLs in plugin and languages files
|
86 |
-
* updated [plugin authors](https://gist.github.com/glueckpress/f058c0ab973d45a72720)
|
87 |
-
|
88 |
-
### 2.6.7 ###
|
89 |
-
* **English**
|
90 |
-
* Removal of functions *Block comments from specific countries* and *Allow comments only in certain language* for financial reasons
|
91 |
-
* **Deutsch**
|
92 |
-
* Entfernung der Funktionen *Kommentare nur in einer Sprache zulassen* und *Bestimmte Länder blockieren bzw. erlauben* aus finanziellen Gründen
|
93 |
-
* [Weitere Informationen zum Hintergrund](https://plus.google.com/u/0/+SergejMüller/posts/ZyquhoYjUyF)
|
94 |
-
|
95 |
-
### 2.6.6 ###
|
96 |
-
* **English**
|
97 |
-
* Switch to the official Google Translation API
|
98 |
-
* *Release time investment (Development & QA): 2.5 h*
|
99 |
-
* **Deutsch**
|
100 |
-
* (Testweise) Umstellung auf die offizielle Google Translation API
|
101 |
-
* [Weitere Informationen zum Hintergrund](https://plus.google.com/u/0/+SergejMüller/posts/ZyquhoYjUyF)
|
102 |
-
* *Release-Zeitaufwand (Development & QA): 2,5 Stunden*
|
103 |
-
|
104 |
-
### 2.6.5 ###
|
105 |
-
* **English**
|
106 |
-
* Fix: Return parameters on `dashboard_glance_items` callback / thx [@toscho](https://twitter.com/toscho)
|
107 |
-
* New function: Trust commenters with a Gravatar / thx [@glueckpress](https://twitter.com/glueckpress)
|
108 |
-
* Additional plausibility checks and filters
|
109 |
-
* *Release time investment (Development & QA): 12 h*
|
110 |
-
* **Deutsch**
|
111 |
-
* Fix: Parameter-Rückgabe bei `dashboard_glance_items` / thx [@toscho](https://twitter.com/toscho)
|
112 |
-
* Neue Funktion: [Kommentatoren mit Gravatar vertrauen](https://github.com/pluginkollektiv/antispam-bee/wiki/Dokumentation) / thx [@glueckpress](https://twitter.com/glueckpress)
|
113 |
-
* Zusätzliche Plausibilitätsprüfungen und Filter
|
114 |
-
* *Release-Zeitaufwand (Development & QA): 12 Stunden*
|
115 |
-
|
116 |
-
### 2.6.4 ###
|
117 |
-
* **English**
|
118 |
-
* Consideration of the comment time (Spam if a comment was written in less than 5 seconds)
|
119 |
-
* *Release time investment (Development & QA): 6.25 h*
|
120 |
-
* **Deutsch**
|
121 |
-
* Berücksichtigung der Kommentarzeit (Spam, wenn ein Kommentar in unter 5 Sekunden verfasst)
|
122 |
-
* [Mehr Informationen auf Google+](https://plus.google.com/+SergejMüller/posts/73EbP6F1BgC)
|
123 |
-
* *Release-Zeitaufwand (Development & QA): 6,25 Stunden*
|
124 |
-
|
125 |
-
### 2.6.3 ###
|
126 |
-
* **English**
|
127 |
-
* Sorting for the Antispam Bee column in the spam comments overview
|
128 |
-
* Code refactoring around the use of REQUEST_URI
|
129 |
-
* *Release time investment (Development & QA): 2.75 h*
|
130 |
-
* **Deutsch**
|
131 |
-
* Sortierung für die Antispam Bee Spalte in der Spam-Übersicht
|
132 |
-
* Code-Refactoring rund um die Nutzung von REQUEST_URI
|
133 |
-
* *Release-Zeitaufwand (Development & QA): 2,.75 Stunden*
|
134 |
-
|
135 |
-
### 2.6.2 ###
|
136 |
-
* **English**
|
137 |
-
* Improving detection of fake IPs
|
138 |
-
* *Release time investment (Development & QA): 11 h*
|
139 |
-
* **Deutsch**
|
140 |
-
* Überarbeitung der Erkennung von gefälschten IPs
|
141 |
-
* *Release-Zeitaufwand (Development & QA): 11 Stunden*
|
142 |
-
|
143 |
-
### 2.6.1 ###
|
144 |
-
* **English**
|
145 |
-
* Code refactoring of options management
|
146 |
-
* Support for `HTTP_FORWARDED_FOR` header
|
147 |
-
* *Release time investment (Development & QA): 8.5 h*
|
148 |
-
* **Deutsch**
|
149 |
-
* Überarbeitung der Optionen-Verwaltung
|
150 |
-
* Berücksichtigung der Header `HTTP_FORWARDED_FOR`
|
151 |
-
* *Release-Zeitaufwand (Development & QA): 8,5 Stunden*
|
152 |
-
|
153 |
-
### 2.6.0 ###
|
154 |
-
* DE: Optimierungen für WordPress 3.8
|
155 |
-
* DE: Zusatzprüfung auf Nicht-UTF-8-Zeichen in Kommentardaten
|
156 |
-
* DE: Spamgrund als Spalte in der Übersicht mit Spamkommentaren
|
157 |
-
* EN: Optimizations for WordPress 3.8
|
158 |
-
* EN: Clear invalid UTF-8 characters in comment fields
|
159 |
-
* EN: Spam reason as a column in the table with spam comments
|
160 |
-
|
161 |
-
### 2.5.9 ###
|
162 |
-
* DE: Anpassung des Dashboard-Skriptes für die Zusammenarbeit mit [Statify](http://statify.de)
|
163 |
-
* EN: Dashboard widget changes to work with [Statify](http://statify.de)
|
164 |
-
|
165 |
-
### 2.5.8 ###
|
166 |
-
* DE: Umstellung von TornevallDNSBL zu [Stop Forum Spam](http://www.stopforumspam.com)
|
167 |
-
* DE: Neue JS-Bibliothek für das Dashboard-Widget
|
168 |
-
* DE: [Mehr Informationen auf Google+](https://plus.google.com/110569673423509816572/posts/VCFr3fDAYDs)
|
169 |
-
* EN: Switch from TornevallDNSBL to [Stop Forum Spam](http://www.stopforumspam.com)
|
170 |
-
* EN: New JS library for the Antispam Bee dashboard chart
|
171 |
-
|
172 |
-
### 2.5.7 ###
|
173 |
-
* DE: Optionale Spam-Logdatei z.B. für [Fail2Ban](https://github.com/sergejmueller/sergejmueller.github.io/wiki/Fail2Ban:-IP-Blacklist)
|
174 |
-
* DE: Filter `antispam_bee_notification_subject` für eigenen Betreff in Benachrichtigungen
|
175 |
-
* DE: Detaillierte Informationen zum Update auf [Google+](https://plus.google.com/110569673423509816572/posts/iCfip2ggYt9)
|
176 |
-
* EN: Optional logfile with spam entries e.g. for [Fail2Ban](https://gist.github.com/sergejmueller/5622883)
|
177 |
-
* EN: Filter `antispam_bee_notification_subject` for a custom subject in notifications
|
178 |
-
|
179 |
-
### 2.5.6 ###
|
180 |
-
* DE: Neue Erkennungsmuster für Spam hinzugefügt / [Google+](https://plus.google.com/110569673423509816572/posts/9BSURheN3as)
|
181 |
-
* EN: Added new detection/patterns for spam comments
|
182 |
-
|
183 |
-
### 2.5.5 ###
|
184 |
-
* Deutsch: Erkennung und Ausfilterung von Spam-Kommentaren, die versuchen, [Sicherheitslücken von W3 Total Cache und WP Super Cache](http://blog.sucuri.net/2013/05/w3-total-cache-and-wp-super-cache-vulnerability-being-targeted-in-the-wild.html) auszunutzen. [Ausführlicher auf Google+](https://plus.google.com/110569673423509816572/posts/afWWQbUh4at).
|
185 |
-
* English: Detection and filtering of spam comments that try to exploit the latest [W3 Total Cache and WP Super Cache Vulnerability](http://blog.sucuri.net/2013/05/w3-total-cache-and-wp-super-cache-vulnerability-being-targeted-in-the-wild.html).
|
186 |
-
|
187 |
-
### 2.5.4 ###
|
188 |
-
* Jubiläumsausgabe: [Details zum Update](https://plus.google.com/110569673423509816572/posts/3dq9Re5vTY5)
|
189 |
-
* Neues Maskottchen für Antispam Bee
|
190 |
-
* Erweiterte Prüfung eingehender Kommentare in lokaler Blog-Spamdatenbank auf IP, URL und E-Mail-Adresse
|
191 |
-
|
192 |
-
### 2.5.3 ###
|
193 |
-
* Optimierung des Regulären Ausdrucks
|
194 |
-
|
195 |
-
### 2.5.2 ###
|
196 |
-
* Neu: [Reguläre Ausdrücke anwenden](https://github.com/pluginkollektiv/antispam-bee/wiki/Dokumentation) mit vordefinierten und eigenen Erkennungsmustern
|
197 |
-
* Änderung der Filter-Reihenfolge
|
198 |
-
* Verbesserungen an der Sprachdatei
|
199 |
-
* [Hintergrundinformationen zum Update](https://plus.google.com/110569673423509816572/posts/CwtbSoMkGrT)
|
200 |
-
|
201 |
-
### 2.5.1 ###
|
202 |
-
* [BBCode im Kommentar als Spamgrund](https://github.com/pluginkollektiv/antispam-bee/wiki/Dokumentation)
|
203 |
-
* IP-Anonymisierung bei der Länderprüfung
|
204 |
-
* [Mehr Transparenz](https://plus.google.com/110569673423509816572/posts/ZMU6RfyRK29) durch hinzugefügte Datenschutzhinweise
|
205 |
-
* PHP 5.2.4 als Voraussetzung (ist zugleich die Voraussetzung für WP 3.4)
|
206 |
-
|
207 |
-
### 2.5.0 ###
|
208 |
-
* [Edition 2012](https://plus.google.com/110569673423509816572/posts/6JUC6PHXd6A)
|
209 |
-
|
210 |
-
### 2.4.6 ###
|
211 |
-
* Russische Übersetzung
|
212 |
-
* Veränderung der Secret-Zeichenfolge
|
213 |
-
|
214 |
-
### 2.4.5 ###
|
215 |
-
* Überarbeitetes Layout der Einstellungen
|
216 |
-
* Streichung von Project Honey Pot
|
217 |
-
* TornevallNET als neuer DNSBL-Dienst
|
218 |
-
* WordPress 3.4 als Mindestvoraussetzung
|
219 |
-
* WordPress 3.5 Unterstützung
|
220 |
-
* Online-Handbuch in Neufassung
|
221 |
-
|
222 |
-
### 2.4.4 ###
|
223 |
-
* Technical and visual support for WordPress 3.5
|
224 |
-
* Modification of the file structure: from `xyz.dev.css` to `xyz.min.css`
|
225 |
-
* Retina screenshot
|
226 |
-
|
227 |
-
### 2.4.3 ###
|
228 |
-
* Check for basic requirements
|
229 |
-
* Remove the sidebar plugin icon
|
230 |
-
* Set the Google API calls to SSL
|
231 |
-
* Compatibility with WordPress 3.4
|
232 |
-
* Add retina plugin icon on options
|
233 |
-
* Depending on WordPress settings: anonymous comments allowed
|
234 |
-
|
235 |
-
### 2.4.2 ###
|
236 |
-
* New geo ip location service (without the api key)
|
237 |
-
* Code cleanup: Replacement of `@` characters by a function
|
238 |
-
* JS-Fallback for missing jQuery UI
|
239 |
-
|
240 |
-
### 2.4.1 ###
|
241 |
-
* Add russian translation
|
242 |
-
* Fix for the textarea replace
|
243 |
-
* Detect and hide admin notices
|
244 |
-
|
245 |
-
### 2.4 ###
|
246 |
-
* Support for IPv6
|
247 |
-
* Source code revision
|
248 |
-
* Delete spam by reason
|
249 |
-
* Changing the user interface
|
250 |
-
* Requirements: PHP 5.1.2 and WordPress 3.3
|
251 |
-
|
252 |
-
### 2.3 ###
|
253 |
-
* Xmas Edition
|
254 |
-
|
255 |
-
### 2.2 ###
|
256 |
-
* Interactive Dashboard Stats
|
257 |
-
|
258 |
-
### 2.1 ###
|
259 |
-
* Remove Google Translate API support
|
260 |
-
|
261 |
-
### 2.0 ###
|
262 |
-
* Allow comments only in certain language (English/German)
|
263 |
-
* Consider comments which are already marked as spam
|
264 |
-
* Dashboard Stats: Change from canvas to image format
|
265 |
-
* System requirements: WordPress 2.8
|
266 |
-
* Removal of the migration script
|
267 |
-
* Increase plugin security
|
268 |
-
|
269 |
-
### 1.9 ###
|
270 |
-
* Dashboard History Stats (HTML5 Canvas)
|
271 |
-
|
272 |
-
### 1.8 ###
|
273 |
-
* Support for the new IPInfoDB API (including API Key)
|
274 |
-
|
275 |
-
### 1.7 ###
|
276 |
-
* Black and whitelisting for specific countries
|
277 |
-
* "Project Honey Pot" as a optional spammer source
|
278 |
-
* Spam reason in the notification email
|
279 |
-
* Visual refresh of the notification email
|
280 |
-
* Advanced GUI changes + Fold-out options
|
281 |
-
|
282 |
-
### 1.6 ###
|
283 |
-
* Support for WordPress 3.0
|
284 |
-
* System requirements: WordPress 2.7
|
285 |
-
* Code optimization
|
286 |
-
|
287 |
-
### 1.5 ###
|
288 |
-
* Compatibility with WPtouch
|
289 |
-
* Add support for do_action
|
290 |
-
* Translation to Portuguese of Brazil
|
291 |
-
|
292 |
-
### 1.4 ###
|
293 |
-
* Enable stricter inspection for incomming comments
|
294 |
-
* Do not check if the author has already commented and approved
|
295 |
-
|
296 |
-
### 1.3 ###
|
297 |
-
* New code structure
|
298 |
-
* Email notifications about new spam comments
|
299 |
-
* Novel Algorithm: Advanced spam checking
|
300 |
-
|
301 |
-
### 1.2 ###
|
302 |
-
* Antispam Bee spam counter on dashboard
|
303 |
-
|
304 |
-
### 1.1 ###
|
305 |
-
* Adds support for WordPress new changelog readme.txt standard
|
306 |
-
* Various changes for more speed, usability and security
|
307 |
-
|
308 |
-
### 1.0 ###
|
309 |
-
* Adds WordPress 2.8 support
|
310 |
-
|
311 |
-
### 0.9 ###
|
312 |
-
* Mark as spam only comments or only pings
|
313 |
-
|
314 |
-
### 0.8 ###
|
315 |
-
* Optical adjustments of the settings page
|
316 |
-
* Translation for Simplified Chinese, Spanish and Catalan
|
317 |
-
|
318 |
-
### 0.7 ###
|
319 |
-
* Spam folder cleanup after X days
|
320 |
-
* Optional hide the "MARKED AS SPAM" note
|
321 |
-
* Language support for Italian and Turkish
|
322 |
-
|
323 |
-
### 0.6 ###
|
324 |
-
* Language support for English, German, Russian
|
325 |
-
|
326 |
-
### 0.5 ###
|
327 |
-
* Workaround for empty comments
|
328 |
-
|
329 |
-
### 0.4 ###
|
330 |
-
* Option for trackback and pingback protection
|
331 |
-
|
332 |
-
### 0.3 ###
|
333 |
-
* Trackback and Pingback spam protection
|
334 |
-
|
335 |
-
## Upgrade Notice ##
|
336 |
-
|
337 |
-
### 2.6.9 ###
|
338 |
-
|
339 |
-
This is mainly a maintenance release ensuring compatibility with the latest version of WordPress. Expect bigger changes in 2.7 soon!
|
340 |
-
|
341 |
-
## Screenshots ##
|
342 |
-
1. Antispam Bee settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antispam_bee.php
CHANGED
@@ -1,40 +1,38 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Antispam Bee
|
4 |
-
Description: Easy and extremely productive spam-fighting plugin with many sophisticated solutions. Includes protection against trackback spam.
|
5 |
-
Author: pluginkollektiv
|
6 |
-
Author URI: http://pluginkollektiv.org
|
7 |
-
Plugin URI: https://wordpress.org/plugins/antispam-bee/
|
8 |
-
Text Domain: antispam-bee
|
9 |
-
Domain Path: /lang
|
10 |
-
License: GPLv2 or later
|
11 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
-
Version: 2.
|
13 |
*/
|
14 |
|
15 |
/*
|
16 |
-
Copyright (C) 2009-2015 Sergej Müller
|
17 |
-
|
18 |
-
This program is free software; you can redistribute it and/or modify
|
19 |
-
it under the terms of the GNU General Public License as published by
|
20 |
-
the Free Software Foundation; either version 2 of the License, or
|
21 |
-
(at your option) any later version.
|
22 |
-
|
23 |
-
This program is distributed in the hope that it will be useful,
|
24 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
-
GNU General Public License for more details.
|
27 |
-
|
28 |
-
You should have received a copy of the GNU General Public License along
|
29 |
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
30 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
31 |
*/
|
32 |
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
die();
|
37 |
-
}
|
38 |
|
39 |
|
40 |
/**
|
@@ -47,15 +45,15 @@ if ( ! class_exists('WP') ) {
|
|
47 |
class Antispam_Bee {
|
48 |
|
49 |
|
50 |
-
|
51 |
public static $defaults;
|
52 |
private static $_base;
|
53 |
-
private static $
|
54 |
private static $_reason;
|
55 |
|
56 |
|
57 |
/**
|
58 |
-
* "
|
59 |
*
|
60 |
* @since 0.1
|
61 |
* @change 2.6.4
|
@@ -63,7 +61,7 @@ class Antispam_Bee {
|
|
63 |
|
64 |
public static function init()
|
65 |
{
|
66 |
-
|
67 |
add_action(
|
68 |
'unspam_comment',
|
69 |
array(
|
@@ -72,15 +70,15 @@ class Antispam_Bee {
|
|
72 |
)
|
73 |
);
|
74 |
|
75 |
-
|
76 |
if ( (defined('DOING_AJAX') && DOING_AJAX) or (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) ) {
|
77 |
return;
|
78 |
}
|
79 |
|
80 |
-
|
81 |
self::_init_internal_vars();
|
82 |
|
83 |
-
|
84 |
if ( defined('DOING_CRON') ) {
|
85 |
add_action(
|
86 |
'antispam_bee_daily_cronjob',
|
@@ -90,9 +88,9 @@ class Antispam_Bee {
|
|
90 |
)
|
91 |
);
|
92 |
|
93 |
-
|
94 |
} elseif ( is_admin() ) {
|
95 |
-
|
96 |
add_action(
|
97 |
'admin_menu',
|
98 |
array(
|
@@ -101,7 +99,7 @@ class Antispam_Bee {
|
|
101 |
)
|
102 |
);
|
103 |
|
104 |
-
|
105 |
if ( self::_current_page('dashboard') ) {
|
106 |
add_action(
|
107 |
'init',
|
@@ -125,7 +123,7 @@ class Antispam_Bee {
|
|
125 |
)
|
126 |
);
|
127 |
|
128 |
-
|
129 |
} else if ( self::_current_page('plugins') ) {
|
130 |
add_action(
|
131 |
'init',
|
@@ -151,7 +149,7 @@ class Antispam_Bee {
|
|
151 |
)
|
152 |
);
|
153 |
|
154 |
-
|
155 |
} else if ( self::_current_page('options') ) {
|
156 |
add_action(
|
157 |
'admin_init',
|
@@ -181,13 +179,13 @@ class Antispam_Bee {
|
|
181 |
|
182 |
} else if ( self::_current_page('edit-comments') ) {
|
183 |
if ( ! empty($_GET['comment_status']) && $_GET['comment_status'] === 'spam' && ! self::get_option('no_notice') ) {
|
184 |
-
|
185 |
require_once( dirname(__FILE__). '/inc/columns.class.php' );
|
186 |
|
187 |
-
|
188 |
self::load_plugin_lang();
|
189 |
|
190 |
-
|
191 |
add_filter(
|
192 |
'manage_edit-comments_columns',
|
193 |
array(
|
@@ -229,7 +227,7 @@ class Antispam_Bee {
|
|
229 |
}
|
230 |
}
|
231 |
|
232 |
-
|
233 |
} else {
|
234 |
add_action(
|
235 |
'template_redirect',
|
@@ -265,14 +263,14 @@ class Antispam_Bee {
|
|
265 |
|
266 |
|
267 |
|
268 |
-
|
269 |
-
############################
|
270 |
-
######## INSTALL #########
|
271 |
-
############################
|
272 |
-
|
273 |
|
274 |
/**
|
275 |
-
*
|
276 |
*
|
277 |
* @since 0.1
|
278 |
* @change 2.4
|
@@ -280,7 +278,7 @@ class Antispam_Bee {
|
|
280 |
|
281 |
public static function activate()
|
282 |
{
|
283 |
-
|
284 |
add_option(
|
285 |
'antispam_bee',
|
286 |
array(),
|
@@ -288,7 +286,7 @@ class Antispam_Bee {
|
|
288 |
'no'
|
289 |
);
|
290 |
|
291 |
-
|
292 |
if ( self::get_option('cronjob_enable') ) {
|
293 |
self::init_scheduled_hook();
|
294 |
}
|
@@ -296,7 +294,7 @@ class Antispam_Bee {
|
|
296 |
|
297 |
|
298 |
/**
|
299 |
-
*
|
300 |
*
|
301 |
* @since 0.1
|
302 |
* @change 2.4
|
@@ -309,7 +307,7 @@ class Antispam_Bee {
|
|
309 |
|
310 |
|
311 |
/**
|
312 |
-
*
|
313 |
*
|
314 |
* @since 2.4
|
315 |
* @change 2.4
|
@@ -317,39 +315,41 @@ class Antispam_Bee {
|
|
317 |
|
318 |
public static function uninstall()
|
319 |
{
|
320 |
-
|
321 |
global $wpdb;
|
322 |
|
323 |
-
|
324 |
delete_option('antispam_bee');
|
325 |
|
326 |
-
|
327 |
$wpdb->query("OPTIMIZE TABLE `" .$wpdb->options. "`");
|
328 |
}
|
329 |
|
330 |
|
331 |
|
332 |
-
|
333 |
-
############################
|
334 |
-
|
335 |
-
############################
|
336 |
-
|
337 |
|
338 |
/**
|
339 |
-
*
|
340 |
*
|
341 |
* @since 2.4
|
342 |
-
* @change 2.
|
343 |
*/
|
344 |
|
345 |
private static function _init_internal_vars()
|
346 |
{
|
347 |
self::$_base = plugin_basename(__FILE__);
|
348 |
-
|
|
|
|
|
349 |
|
350 |
self::$defaults = array(
|
351 |
'options' => array(
|
352 |
-
|
353 |
'advanced_check' => 1,
|
354 |
'regexp_check' => 1,
|
355 |
'spam_ip' => 1,
|
@@ -362,11 +362,18 @@ class Antispam_Bee {
|
|
362 |
'dashboard_chart' => 0,
|
363 |
'dashboard_count' => 0,
|
364 |
|
365 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
'dnsbl_check' => 0,
|
367 |
'bbcode_check' => 1,
|
368 |
|
369 |
-
|
370 |
'flag_spam' => 1,
|
371 |
'email_notify' => 1,
|
372 |
'no_notice' => 0,
|
@@ -377,31 +384,33 @@ class Antispam_Bee {
|
|
377 |
'ignore_type' => 0,
|
378 |
|
379 |
'reasons_enable' => 0,
|
380 |
-
'ignore_reasons' => array()
|
381 |
),
|
382 |
'reasons' => array(
|
383 |
-
'css' => 'CSS Hack',
|
384 |
-
'time' => 'Comment time',
|
385 |
-
'empty' => 'Empty Data',
|
386 |
-
'server' => 'Fake IP',
|
387 |
-
'localdb' => 'Local DB Spam',
|
388 |
-
'
|
389 |
-
'
|
390 |
-
'
|
|
|
|
|
391 |
)
|
392 |
);
|
393 |
}
|
394 |
|
395 |
|
396 |
/**
|
397 |
-
*
|
398 |
*
|
399 |
* @since 2.4.2
|
400 |
* @change 2.4.2
|
401 |
*
|
402 |
-
* @param array $array Array
|
403 |
-
* @param string $key Name
|
404 |
-
* @return mixed
|
405 |
*/
|
406 |
|
407 |
public static function get_key($array, $key)
|
@@ -415,13 +424,13 @@ class Antispam_Bee {
|
|
415 |
|
416 |
|
417 |
/**
|
418 |
-
*
|
419 |
*
|
420 |
* @since 0.1
|
421 |
* @change 2.4
|
422 |
*
|
423 |
-
* @param string $page
|
424 |
-
* @return boolean TRUE
|
425 |
*/
|
426 |
|
427 |
private static function _current_page($page)
|
@@ -449,7 +458,7 @@ class Antispam_Bee {
|
|
449 |
|
450 |
|
451 |
/**
|
452 |
-
*
|
453 |
*
|
454 |
* @since 0.1
|
455 |
* @change 2.4
|
@@ -466,7 +475,7 @@ class Antispam_Bee {
|
|
466 |
|
467 |
|
468 |
/**
|
469 |
-
*
|
470 |
*
|
471 |
* @since 1.1
|
472 |
* @change 1.1
|
@@ -474,7 +483,7 @@ class Antispam_Bee {
|
|
474 |
|
475 |
public static function init_action_links($data)
|
476 |
{
|
477 |
-
|
478 |
if ( ! current_user_can('manage_options') ) {
|
479 |
return $data;
|
480 |
}
|
@@ -490,7 +499,7 @@ class Antispam_Bee {
|
|
490 |
),
|
491 |
admin_url('options-general.php')
|
492 |
),
|
493 |
-
|
494 |
)
|
495 |
)
|
496 |
);
|
@@ -498,19 +507,19 @@ class Antispam_Bee {
|
|
498 |
|
499 |
|
500 |
/**
|
501 |
-
* Meta
|
502 |
*
|
503 |
* @since 0.1
|
504 |
* @change 2.6.2
|
505 |
*
|
506 |
-
* @param array $input
|
507 |
-
* @param string $file
|
508 |
-
* @return array $data
|
509 |
*/
|
510 |
|
511 |
public static function init_row_meta($input, $file)
|
512 |
{
|
513 |
-
|
514 |
if ( $file != self::$_base ) {
|
515 |
return $input;
|
516 |
}
|
@@ -518,21 +527,22 @@ class Antispam_Bee {
|
|
518 |
return array_merge(
|
519 |
$input,
|
520 |
array(
|
521 |
-
'<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8CH5FPR88QYML" target="_blank">
|
|
|
522 |
)
|
523 |
);
|
524 |
}
|
525 |
|
526 |
|
527 |
|
528 |
-
|
529 |
-
############################
|
530 |
-
#######
|
531 |
-
############################
|
532 |
-
|
533 |
|
534 |
/**
|
535 |
-
*
|
536 |
*
|
537 |
* @since 1.6
|
538 |
* @change 2.4.5
|
@@ -540,10 +550,10 @@ class Antispam_Bee {
|
|
540 |
|
541 |
public static function init_plugin_sources()
|
542 |
{
|
543 |
-
|
544 |
$plugin = get_plugin_data(__FILE__);
|
545 |
|
546 |
-
|
547 |
wp_register_script(
|
548 |
'ab_script',
|
549 |
plugins_url('js/scripts.min.js', __FILE__),
|
@@ -551,7 +561,7 @@ class Antispam_Bee {
|
|
551 |
$plugin['Version']
|
552 |
);
|
553 |
|
554 |
-
|
555 |
wp_register_style(
|
556 |
'ab_style',
|
557 |
plugins_url('css/styles.min.css', __FILE__),
|
@@ -562,7 +572,7 @@ class Antispam_Bee {
|
|
562 |
|
563 |
|
564 |
/**
|
565 |
-
*
|
566 |
*
|
567 |
* @since 0.1
|
568 |
* @change 2.4.3
|
@@ -570,7 +580,7 @@ class Antispam_Bee {
|
|
570 |
|
571 |
public static function add_sidebar_menu()
|
572 |
{
|
573 |
-
|
574 |
$page = add_options_page(
|
575 |
'Antispam Bee',
|
576 |
'Antispam Bee',
|
@@ -582,7 +592,7 @@ class Antispam_Bee {
|
|
582 |
)
|
583 |
);
|
584 |
|
585 |
-
|
586 |
add_action(
|
587 |
'admin_print_scripts-' . $page,
|
588 |
array(
|
@@ -591,7 +601,7 @@ class Antispam_Bee {
|
|
591 |
)
|
592 |
);
|
593 |
|
594 |
-
|
595 |
add_action(
|
596 |
'admin_print_styles-' . $page,
|
597 |
array(
|
@@ -600,7 +610,7 @@ class Antispam_Bee {
|
|
600 |
)
|
601 |
);
|
602 |
|
603 |
-
|
604 |
add_action(
|
605 |
'load-' .$page,
|
606 |
array(
|
@@ -612,7 +622,7 @@ class Antispam_Bee {
|
|
612 |
|
613 |
|
614 |
/**
|
615 |
-
*
|
616 |
*
|
617 |
* @since 1.6
|
618 |
* @change 2.4
|
@@ -625,7 +635,7 @@ class Antispam_Bee {
|
|
625 |
|
626 |
|
627 |
/**
|
628 |
-
*
|
629 |
*
|
630 |
* @since 1.6
|
631 |
* @change 2.4
|
@@ -638,7 +648,7 @@ class Antispam_Bee {
|
|
638 |
|
639 |
|
640 |
/**
|
641 |
-
*
|
642 |
*
|
643 |
* @since 2.4
|
644 |
* @change 2.4
|
@@ -651,63 +661,63 @@ class Antispam_Bee {
|
|
651 |
|
652 |
|
653 |
|
654 |
-
|
655 |
-
############################
|
656 |
-
####### DASHBOARD ########
|
657 |
-
############################
|
658 |
-
|
659 |
|
660 |
/**
|
661 |
-
*
|
662 |
*
|
663 |
* @since 0.1
|
664 |
* @change 2.6.5
|
665 |
*
|
666 |
* @param array $items Initial array with dashboard items
|
667 |
-
|
668 |
*/
|
669 |
|
670 |
public static function add_dashboard_count( $items = array() )
|
671 |
{
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
|
693 |
-
|
694 |
}
|
695 |
|
696 |
|
697 |
/**
|
698 |
-
*
|
699 |
*
|
700 |
* @since 1.9
|
701 |
* @change 2.5.6
|
702 |
*/
|
703 |
public static function add_dashboard_chart()
|
704 |
{
|
705 |
-
|
706 |
if ( ! current_user_can( 'publish_posts' ) || ! self::get_option( 'dashboard_chart' ) ) {
|
707 |
return;
|
708 |
}
|
709 |
|
710 |
-
|
711 |
wp_add_dashboard_widget(
|
712 |
'ab_widget',
|
713 |
'Antispam Bee',
|
@@ -717,7 +727,7 @@ class Antispam_Bee {
|
|
717 |
)
|
718 |
);
|
719 |
|
720 |
-
|
721 |
add_action(
|
722 |
'admin_head',
|
723 |
array(
|
@@ -737,10 +747,10 @@ class Antispam_Bee {
|
|
737 |
|
738 |
public static function add_dashboard_style()
|
739 |
{
|
740 |
-
|
741 |
$plugin = get_plugin_data(__FILE__);
|
742 |
|
743 |
-
|
744 |
wp_register_style(
|
745 |
'ab_chart',
|
746 |
plugins_url('css/dashboard.min.css', __FILE__),
|
@@ -748,7 +758,7 @@ class Antispam_Bee {
|
|
748 |
$plugin['Version']
|
749 |
);
|
750 |
|
751 |
-
|
752 |
wp_print_styles('ab_chart');
|
753 |
}
|
754 |
|
@@ -760,15 +770,15 @@ class Antispam_Bee {
|
|
760 |
* @change 2.5.8
|
761 |
*/
|
762 |
public static function add_dashboard_script() {
|
763 |
-
|
764 |
if ( ! self::get_option('daily_stats') ) {
|
765 |
return;
|
766 |
}
|
767 |
|
768 |
-
|
769 |
$plugin = get_plugin_data(__FILE__);
|
770 |
|
771 |
-
|
772 |
wp_enqueue_script(
|
773 |
'raphael',
|
774 |
plugins_url( 'js/raphael.min.js', __FILE__ ),
|
@@ -804,10 +814,10 @@ class Antispam_Bee {
|
|
804 |
|
805 |
public static function show_spam_chart()
|
806 |
{
|
807 |
-
|
808 |
$items = (array)self::get_option('daily_stats');
|
809 |
|
810 |
-
|
811 |
if ( empty($items) ) {
|
812 |
echo sprintf(
|
813 |
'<div id="ab_chart"><p>%s</p></div>',
|
@@ -820,21 +830,21 @@ class Antispam_Bee {
|
|
820 |
// Enqueue scripts.
|
821 |
self::add_dashboard_script();
|
822 |
|
823 |
-
|
824 |
ksort($items, SORT_NUMERIC);
|
825 |
|
826 |
-
|
827 |
$html = "<table id=ab_chart_data>\n";
|
828 |
|
829 |
|
830 |
-
|
831 |
$html .= "<tfoot><tr>\n";
|
832 |
foreach($items as $date => $count) {
|
833 |
$html .= "<th>" .$date. "</th>\n";
|
834 |
}
|
835 |
$html .= "</tr></tfoot>\n";
|
836 |
|
837 |
-
|
838 |
$html .= "<tbody><tr>\n";
|
839 |
foreach($items as $date => $count) {
|
840 |
$html .= "<td>" .(int) $count. "</td>\n";
|
@@ -842,20 +852,20 @@ class Antispam_Bee {
|
|
842 |
$html .= "</tr></tbody>\n";
|
843 |
|
844 |
|
845 |
-
|
846 |
$html .= "</table>\n";
|
847 |
|
848 |
-
|
849 |
echo '<div id="ab_chart">' .$html. '</div>';
|
850 |
}
|
851 |
|
852 |
|
853 |
|
854 |
-
|
855 |
-
############################
|
856 |
-
######## OPTIONS #########
|
857 |
-
############################
|
858 |
-
|
859 |
|
860 |
/**
|
861 |
* Get all plugin options
|
@@ -894,7 +904,7 @@ class Antispam_Bee {
|
|
894 |
|
895 |
public static function get_option($field)
|
896 |
{
|
897 |
-
|
898 |
$options = self::get_options();
|
899 |
|
900 |
return self::get_key($options, $field);
|
@@ -932,26 +942,27 @@ class Antispam_Bee {
|
|
932 |
|
933 |
public static function update_options($data)
|
934 |
{
|
935 |
-
|
936 |
$options = get_option('antispam_bee');
|
937 |
|
938 |
-
|
939 |
if ( is_array($options) ) {
|
940 |
$options = array_merge(
|
941 |
$options,
|
942 |
$data
|
943 |
);
|
944 |
-
}
|
|
|
945 |
$options = $data;
|
946 |
}
|
947 |
|
948 |
-
|
949 |
update_option(
|
950 |
'antispam_bee',
|
951 |
$options
|
952 |
);
|
953 |
|
954 |
-
|
955 |
wp_cache_set(
|
956 |
'antispam_bee',
|
957 |
$options
|
@@ -960,14 +971,14 @@ class Antispam_Bee {
|
|
960 |
|
961 |
|
962 |
|
963 |
-
|
964 |
-
############################
|
965 |
-
######## CRONJOBS ########
|
966 |
-
############################
|
967 |
-
|
968 |
|
969 |
/**
|
970 |
-
*
|
971 |
*
|
972 |
* @since 0.1
|
973 |
* @change 2.4
|
@@ -975,24 +986,24 @@ class Antispam_Bee {
|
|
975 |
|
976 |
public static function start_daily_cronjob()
|
977 |
{
|
978 |
-
|
979 |
if ( !self::get_option('cronjob_enable') ) {
|
980 |
return;
|
981 |
}
|
982 |
|
983 |
-
|
984 |
self::_update_option(
|
985 |
'cronjob_timestamp',
|
986 |
time()
|
987 |
);
|
988 |
|
989 |
-
|
990 |
self::_delete_old_spam();
|
991 |
}
|
992 |
|
993 |
|
994 |
/**
|
995 |
-
*
|
996 |
*
|
997 |
* @since 0.1
|
998 |
* @change 2.4
|
@@ -1000,18 +1011,18 @@ class Antispam_Bee {
|
|
1000 |
|
1001 |
private static function _delete_old_spam()
|
1002 |
{
|
1003 |
-
|
1004 |
$days = (int)self::get_option('cronjob_interval');
|
1005 |
|
1006 |
-
|
1007 |
if ( empty($days) ) {
|
1008 |
return false;
|
1009 |
}
|
1010 |
|
1011 |
-
|
1012 |
global $wpdb;
|
1013 |
|
1014 |
-
|
1015 |
$wpdb->query(
|
1016 |
$wpdb->prepare(
|
1017 |
"DELETE FROM `$wpdb->comments` WHERE `comment_approved` = 'spam' AND SUBDATE(NOW(), %d) > comment_date_gmt",
|
@@ -1019,13 +1030,13 @@ class Antispam_Bee {
|
|
1019 |
)
|
1020 |
);
|
1021 |
|
1022 |
-
|
1023 |
$wpdb->query("OPTIMIZE TABLE `$wpdb->comments`");
|
1024 |
}
|
1025 |
|
1026 |
|
1027 |
/**
|
1028 |
-
*
|
1029 |
*
|
1030 |
* @since 0.1
|
1031 |
* @change 2.4
|
@@ -1044,7 +1055,7 @@ class Antispam_Bee {
|
|
1044 |
|
1045 |
|
1046 |
/**
|
1047 |
-
*
|
1048 |
*
|
1049 |
* @since 0.1
|
1050 |
* @change 2.4
|
@@ -1059,14 +1070,14 @@ class Antispam_Bee {
|
|
1059 |
|
1060 |
|
1061 |
|
1062 |
-
|
1063 |
-
############################
|
1064 |
-
######
|
1065 |
-
############################
|
1066 |
-
|
1067 |
|
1068 |
/**
|
1069 |
-
*
|
1070 |
*
|
1071 |
* @since 0.1
|
1072 |
* @change 2.6.3
|
@@ -1074,28 +1085,29 @@ class Antispam_Bee {
|
|
1074 |
|
1075 |
public static function precheck_incoming_request()
|
1076 |
{
|
1077 |
-
|
1078 |
if ( is_feed() OR is_trackback() OR empty($_POST) OR self::_is_mobile() ) {
|
1079 |
return;
|
1080 |
}
|
1081 |
|
1082 |
-
|
1083 |
$request_uri = self::get_key($_SERVER, 'REQUEST_URI');
|
1084 |
$request_path = parse_url($request_uri, PHP_URL_PATH);
|
1085 |
|
1086 |
-
|
1087 |
if ( strpos($request_path, 'wp-comments-post.php') === false ) {
|
1088 |
return;
|
1089 |
}
|
1090 |
|
1091 |
-
|
1092 |
-
|
1093 |
-
$
|
|
|
1094 |
|
1095 |
-
|
1096 |
if ( empty($hidden_field) && ! empty($plugin_field) ) {
|
1097 |
$_POST['comment'] = $plugin_field;
|
1098 |
-
unset( $_POST[self
|
1099 |
} else {
|
1100 |
$_POST['ab_spam__hidden_field'] = 1;
|
1101 |
}
|
@@ -1103,21 +1115,21 @@ class Antispam_Bee {
|
|
1103 |
|
1104 |
|
1105 |
/**
|
1106 |
-
*
|
1107 |
*
|
1108 |
* @since 0.1
|
1109 |
* @change 2.6.3
|
1110 |
*
|
1111 |
-
* @param array $comment
|
1112 |
-
* @return array $comment
|
1113 |
*/
|
1114 |
|
1115 |
public static function handle_incoming_request($comment)
|
1116 |
{
|
1117 |
-
|
1118 |
$comment['comment_author_IP'] = self::get_client_ip();
|
1119 |
|
1120 |
-
|
1121 |
add_filter(
|
1122 |
'pre_comment_user_ip',
|
1123 |
array(
|
@@ -1127,11 +1139,11 @@ class Antispam_Bee {
|
|
1127 |
1
|
1128 |
);
|
1129 |
|
1130 |
-
|
1131 |
$request_uri = self::get_key($_SERVER, 'REQUEST_URI');
|
1132 |
$request_path = parse_url($request_uri, PHP_URL_PATH);
|
1133 |
|
1134 |
-
|
1135 |
if ( empty($request_path) ) {
|
1136 |
return self::_handle_spam_request(
|
1137 |
$comment,
|
@@ -1139,18 +1151,18 @@ class Antispam_Bee {
|
|
1139 |
);
|
1140 |
}
|
1141 |
|
1142 |
-
|
1143 |
$ping = array(
|
1144 |
'types' => array('pingback', 'trackback', 'pings'),
|
1145 |
'allowed' => !self::get_option('ignore_pings')
|
1146 |
);
|
1147 |
|
1148 |
-
|
1149 |
if ( strpos($request_path, 'wp-comments-post.php') !== false && ! empty($_POST) ) {
|
1150 |
-
|
1151 |
$status = self::_verify_comment_request($comment);
|
1152 |
|
1153 |
-
|
1154 |
if ( ! empty($status['reason']) ) {
|
1155 |
return self::_handle_spam_request(
|
1156 |
$comment,
|
@@ -1158,12 +1170,12 @@ class Antispam_Bee {
|
|
1158 |
);
|
1159 |
}
|
1160 |
|
1161 |
-
|
1162 |
} else if ( in_array(self::get_key($comment, 'comment_type'), $ping['types']) && $ping['allowed'] ) {
|
1163 |
-
|
1164 |
$status = self::_verify_trackback_request($comment);
|
1165 |
|
1166 |
-
|
1167 |
if ( ! empty($status['reason']) ) {
|
1168 |
return self::_handle_spam_request(
|
1169 |
$comment,
|
@@ -1178,7 +1190,7 @@ class Antispam_Bee {
|
|
1178 |
|
1179 |
|
1180 |
/**
|
1181 |
-
*
|
1182 |
*
|
1183 |
* @since 0.1
|
1184 |
* @change 2.4
|
@@ -1186,17 +1198,17 @@ class Antispam_Bee {
|
|
1186 |
|
1187 |
public static function prepare_comment_field()
|
1188 |
{
|
1189 |
-
|
1190 |
if ( is_feed() or is_trackback() or is_robots() or self::_is_mobile() ) {
|
1191 |
return;
|
1192 |
}
|
1193 |
|
1194 |
-
|
1195 |
if ( !is_singular() && !self::get_option('always_allowed') ) {
|
1196 |
return;
|
1197 |
}
|
1198 |
|
1199 |
-
|
1200 |
ob_start(
|
1201 |
array(
|
1202 |
'Antispam_Bee',
|
@@ -1207,28 +1219,66 @@ class Antispam_Bee {
|
|
1207 |
|
1208 |
|
1209 |
/**
|
1210 |
-
*
|
1211 |
*
|
1212 |
* @since 2.4
|
1213 |
* @change 2.6.4
|
1214 |
*
|
1215 |
-
* @param string $data HTML
|
1216 |
-
* @return string
|
1217 |
*/
|
1218 |
|
1219 |
public static function replace_comment_field($data)
|
1220 |
{
|
1221 |
-
|
1222 |
if ( empty($data) ) {
|
1223 |
return;
|
1224 |
}
|
1225 |
|
1226 |
-
|
1227 |
if ( ! preg_match('#<textarea.+?name=["\']comment["\']#s', $data) ) {
|
1228 |
return $data;
|
1229 |
}
|
1230 |
|
1231 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
if ( self::get_option('time_check') ) {
|
1233 |
$init_time_field = sprintf(
|
1234 |
'<input type="hidden" name="ab_init_time" value="%d" />',
|
@@ -1238,169 +1288,189 @@ class Antispam_Bee {
|
|
1238 |
$init_time_field = '';
|
1239 |
}
|
1240 |
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
|
|
|
|
|
|
|
|
|
|
1252 |
}
|
1253 |
|
1254 |
|
1255 |
/**
|
1256 |
-
*
|
1257 |
*
|
1258 |
* @since 2.4
|
1259 |
-
* @change 2.
|
1260 |
*
|
1261 |
-
* @param array $comment
|
1262 |
-
* @return array Array
|
1263 |
*/
|
1264 |
|
1265 |
private static function _verify_trackback_request($comment)
|
1266 |
{
|
1267 |
-
|
1268 |
$ip = self::get_key($comment, 'comment_author_IP');
|
1269 |
$url = self::get_key($comment, 'comment_author_url');
|
1270 |
$body = self::get_key($comment, 'comment_content');
|
1271 |
|
1272 |
-
|
1273 |
if ( empty($url) OR empty($body) ) {
|
1274 |
return array(
|
1275 |
'reason' => 'empty'
|
1276 |
);
|
1277 |
}
|
1278 |
|
1279 |
-
|
1280 |
if ( empty($ip) ) {
|
1281 |
return array(
|
1282 |
'reason' => 'empty'
|
1283 |
);
|
1284 |
}
|
1285 |
|
1286 |
-
|
1287 |
$options = self::get_options();
|
1288 |
|
1289 |
-
|
1290 |
if ( $options['bbcode_check'] && self::_is_bbcode_spam($body) ) {
|
1291 |
return array(
|
1292 |
'reason' => 'bbcode'
|
1293 |
);
|
1294 |
}
|
1295 |
|
1296 |
-
|
1297 |
if ( $options['advanced_check'] && self::_is_fake_ip($ip, parse_url($url, PHP_URL_HOST)) ) {
|
1298 |
return array(
|
1299 |
'reason' => 'server'
|
1300 |
);
|
1301 |
}
|
1302 |
|
1303 |
-
|
1304 |
if ( $options['spam_ip'] && self::_is_db_spam($ip, $url) ) {
|
1305 |
return array(
|
1306 |
'reason' => 'localdb'
|
1307 |
);
|
1308 |
}
|
1309 |
|
1310 |
-
|
1311 |
if ( $options['dnsbl_check'] && self::_is_dnsbl_spam($ip) ) {
|
1312 |
return array(
|
1313 |
'reason' => 'dnsbl'
|
1314 |
);
|
1315 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1316 |
}
|
1317 |
|
1318 |
|
1319 |
/**
|
1320 |
-
*
|
1321 |
*
|
1322 |
* @since 2.4
|
1323 |
-
* @change 2.
|
1324 |
*
|
1325 |
-
* @param array $comment
|
1326 |
-
* @return array Array
|
1327 |
*/
|
1328 |
|
1329 |
private static function _verify_comment_request($comment)
|
1330 |
{
|
1331 |
-
|
1332 |
$ip = self::get_key($comment, 'comment_author_IP');
|
1333 |
$url = self::get_key($comment, 'comment_author_url');
|
1334 |
$body = self::get_key($comment, 'comment_content');
|
1335 |
$email = self::get_key($comment, 'comment_author_email');
|
1336 |
$author = self::get_key($comment, 'comment_author');
|
1337 |
|
1338 |
-
|
1339 |
if ( empty($body) ) {
|
1340 |
return array(
|
1341 |
'reason' => 'empty'
|
1342 |
);
|
1343 |
}
|
1344 |
|
1345 |
-
|
1346 |
if ( empty($ip) ) {
|
1347 |
return array(
|
1348 |
'reason' => 'empty'
|
1349 |
);
|
1350 |
}
|
1351 |
|
1352 |
-
|
1353 |
if ( get_option('require_name_email') && ( empty($email) OR empty($author) ) ) {
|
1354 |
return array(
|
1355 |
'reason' => 'empty'
|
1356 |
);
|
1357 |
}
|
1358 |
|
1359 |
-
|
1360 |
$options = self::get_options();
|
1361 |
|
1362 |
-
|
1363 |
if ( $options['already_commented'] && ! empty($email) && self::_is_approved_email($email) ) {
|
1364 |
return;
|
1365 |
}
|
1366 |
|
1367 |
-
|
1368 |
if ( $options['gravatar_check'] && ! empty($email) && self::_has_valid_gravatar($email) ) {
|
1369 |
return;
|
1370 |
}
|
1371 |
|
1372 |
-
|
1373 |
if ( ! empty($_POST['ab_spam__hidden_field']) ) {
|
1374 |
return array(
|
1375 |
'reason' => 'css'
|
1376 |
);
|
1377 |
}
|
1378 |
|
1379 |
-
|
1380 |
if ( $options['time_check'] && self::_is_shortest_time() ) {
|
1381 |
return array(
|
1382 |
'reason' => 'time'
|
1383 |
);
|
1384 |
}
|
1385 |
|
1386 |
-
|
1387 |
if ( $options['bbcode_check'] && self::_is_bbcode_spam($body) ) {
|
1388 |
return array(
|
1389 |
'reason' => 'bbcode'
|
1390 |
);
|
1391 |
}
|
1392 |
|
1393 |
-
|
1394 |
if ( $options['advanced_check'] && self::_is_fake_ip($ip) ) {
|
1395 |
return array(
|
1396 |
'reason' => 'server'
|
1397 |
);
|
1398 |
}
|
1399 |
|
1400 |
-
|
1401 |
if ( $options['regexp_check'] && self::_is_regexp_spam(
|
1402 |
array(
|
1403 |
'ip' => $ip,
|
|
|
1404 |
'host' => parse_url($url, PHP_URL_HOST),
|
1405 |
'body' => $body,
|
1406 |
'email' => $email,
|
@@ -1412,19 +1482,33 @@ class Antispam_Bee {
|
|
1412 |
);
|
1413 |
}
|
1414 |
|
1415 |
-
|
1416 |
if ( $options['spam_ip'] && self::_is_db_spam($ip, $url, $email) ) {
|
1417 |
return array(
|
1418 |
'reason' => 'localdb'
|
1419 |
);
|
1420 |
}
|
1421 |
|
1422 |
-
|
1423 |
if ( $options['dnsbl_check'] && self::_is_dnsbl_spam($ip) ) {
|
1424 |
return array(
|
1425 |
'reason' => 'dnsbl'
|
1426 |
);
|
1427 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1428 |
}
|
1429 |
|
1430 |
|
@@ -1469,12 +1553,12 @@ class Antispam_Bee {
|
|
1469 |
|
1470 |
private static function _is_shortest_time()
|
1471 |
{
|
1472 |
-
|
1473 |
if ( ! $init_time = (int)self::get_key($_POST, 'ab_init_time') ) {
|
1474 |
return false;
|
1475 |
}
|
1476 |
|
1477 |
-
|
1478 |
if ( time() - $init_time < apply_filters('ab_action_time_limit', 5) ) {
|
1479 |
return true;
|
1480 |
}
|
@@ -1484,51 +1568,64 @@ class Antispam_Bee {
|
|
1484 |
|
1485 |
|
1486 |
/**
|
1487 |
-
*
|
1488 |
*
|
1489 |
* @since 2.5.2
|
1490 |
* @change 2.5.6
|
1491 |
*
|
1492 |
-
* @param array $comment Array
|
1493 |
-
* @return boolean TRUE
|
1494 |
*/
|
1495 |
|
1496 |
private static function _is_regexp_spam($comment)
|
1497 |
{
|
1498 |
-
|
1499 |
$fields = array(
|
1500 |
'ip',
|
1501 |
'host',
|
1502 |
'body',
|
1503 |
'email',
|
1504 |
-
'author'
|
1505 |
);
|
1506 |
|
1507 |
-
|
1508 |
$patterns = array(
|
1509 |
-
|
1510 |
'host' => '^(www\.)?\d+\w+\.com$',
|
1511 |
'body' => '^\w+\s\d+$',
|
1512 |
-
'email' => '@gmail.com$'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1513 |
),
|
1514 |
-
1 => array(
|
1515 |
-
'body' => '\<\!.+?mfunc.+?\>'
|
1516 |
-
)
|
1517 |
);
|
1518 |
|
1519 |
-
|
1520 |
if ( $quoted_author = preg_quote($comment['author'], '/') ) {
|
1521 |
$patterns[] = array(
|
1522 |
'body' => sprintf(
|
1523 |
'<a.+?>%s<\/a>$',
|
1524 |
$quoted_author
|
1525 |
-
)
|
1526 |
);
|
1527 |
$patterns[] = array(
|
1528 |
'body' => sprintf(
|
1529 |
'%s https?:.+?$',
|
1530 |
$quoted_author
|
1531 |
-
)
|
1532 |
);
|
1533 |
$patterns[] = array(
|
1534 |
'email' => '@gmail.com$',
|
@@ -1536,41 +1633,41 @@ class Antispam_Bee {
|
|
1536 |
'host' => sprintf(
|
1537 |
'^%s$',
|
1538 |
$quoted_author
|
1539 |
-
)
|
1540 |
);
|
1541 |
}
|
1542 |
|
1543 |
-
|
1544 |
$patterns = apply_filters(
|
1545 |
'antispam_bee_patterns',
|
1546 |
$patterns
|
1547 |
);
|
1548 |
|
1549 |
-
|
1550 |
if ( ! $patterns ) {
|
1551 |
return false;
|
1552 |
}
|
1553 |
|
1554 |
-
|
1555 |
foreach ($patterns as $pattern) {
|
1556 |
$hits = array();
|
1557 |
|
1558 |
-
|
1559 |
foreach ($pattern as $field => $regexp) {
|
1560 |
-
|
1561 |
if ( empty($field) OR !in_array($field, $fields) OR empty($regexp) ) {
|
1562 |
continue;
|
1563 |
}
|
1564 |
|
1565 |
-
|
1566 |
$comment[$field] = ( function_exists('iconv') ? iconv('utf-8', 'utf-8//TRANSLIT', $comment[$field]) : $comment[$field] );
|
1567 |
|
1568 |
-
|
1569 |
if ( empty($comment[$field]) ) {
|
1570 |
continue;
|
1571 |
}
|
1572 |
|
1573 |
-
|
1574 |
if ( @preg_match('/' .$regexp. '/isu', $comment[$field]) ) {
|
1575 |
$hits[$field] = true;
|
1576 |
}
|
@@ -1586,39 +1683,39 @@ class Antispam_Bee {
|
|
1586 |
|
1587 |
|
1588 |
/**
|
1589 |
-
*
|
1590 |
*
|
1591 |
* @since 2.0.0
|
1592 |
* @change 2.5.4
|
1593 |
*
|
1594 |
-
* @param string $ip
|
1595 |
-
* @param string $url
|
1596 |
-
* @param string $email
|
1597 |
-
* @return boolean
|
1598 |
*/
|
1599 |
|
1600 |
private static function _is_db_spam($ip, $url = '', $email = '')
|
1601 |
{
|
1602 |
-
|
1603 |
global $wpdb;
|
1604 |
|
1605 |
-
|
1606 |
$filter = array('`comment_author_IP` = %s');
|
1607 |
$params = array( wp_unslash($ip) );
|
1608 |
|
1609 |
-
|
1610 |
if ( ! empty($url) ) {
|
1611 |
$filter[] = '`comment_author_url` = %s';
|
1612 |
$params[] = wp_unslash($url);
|
1613 |
}
|
1614 |
|
1615 |
-
|
1616 |
if ( ! empty($email) ) {
|
1617 |
$filter[] = '`comment_author_email` = %s';
|
1618 |
$params[] = wp_unslash($email);
|
1619 |
}
|
1620 |
|
1621 |
-
|
1622 |
$result = $wpdb->get_var(
|
1623 |
$wpdb->prepare(
|
1624 |
sprintf(
|
@@ -1634,18 +1731,90 @@ class Antispam_Bee {
|
|
1634 |
|
1635 |
|
1636 |
/**
|
1637 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1638 |
*
|
1639 |
* @since 2.4.5
|
1640 |
* @change 2.4.5
|
1641 |
*
|
1642 |
-
* @param string $ip IP
|
1643 |
-
* @return boolean TRUE
|
1644 |
*/
|
1645 |
|
1646 |
private static function _is_dnsbl_spam($ip)
|
1647 |
{
|
1648 |
-
|
1649 |
$response = wp_safe_remote_request(
|
1650 |
esc_url_raw(
|
1651 |
sprintf(
|
@@ -1656,35 +1825,35 @@ class Antispam_Bee {
|
|
1656 |
)
|
1657 |
);
|
1658 |
|
1659 |
-
|
1660 |
if ( is_wp_error($response) ) {
|
1661 |
return false;
|
1662 |
}
|
1663 |
|
1664 |
-
|
1665 |
$json = wp_remote_retrieve_body($response);
|
1666 |
|
1667 |
-
|
1668 |
$result = json_decode($json);
|
1669 |
|
1670 |
-
|
1671 |
if ( empty($result->success) ) {
|
1672 |
return false;
|
1673 |
}
|
1674 |
|
1675 |
-
|
1676 |
return (bool) $result->ip->appears;
|
1677 |
}
|
1678 |
|
1679 |
|
1680 |
/**
|
1681 |
-
*
|
1682 |
*
|
1683 |
* @since 2.5.1
|
1684 |
* @change 2.5.1
|
1685 |
*
|
1686 |
-
* @param string $body
|
1687 |
-
* @return boolean TRUE
|
1688 |
*/
|
1689 |
|
1690 |
private static function _is_bbcode_spam($body)
|
@@ -1694,21 +1863,21 @@ class Antispam_Bee {
|
|
1694 |
|
1695 |
|
1696 |
/**
|
1697 |
-
*
|
1698 |
*
|
1699 |
* @since 2.0
|
1700 |
* @change 2.5.1
|
1701 |
*
|
1702 |
-
* @param string $email E-
|
1703 |
-
* @return boolean TRUE
|
1704 |
*/
|
1705 |
|
1706 |
private static function _is_approved_email($email)
|
1707 |
{
|
1708 |
-
|
1709 |
global $wpdb;
|
1710 |
|
1711 |
-
|
1712 |
$result = $wpdb->get_var(
|
1713 |
$wpdb->prepare(
|
1714 |
"SELECT `comment_ID` FROM `$wpdb->comments` WHERE `comment_approved` = '1' AND `comment_author_email` = %s LIMIT 1",
|
@@ -1716,7 +1885,7 @@ class Antispam_Bee {
|
|
1716 |
)
|
1717 |
);
|
1718 |
|
1719 |
-
|
1720 |
if ( $result ) {
|
1721 |
return true;
|
1722 |
}
|
@@ -1738,15 +1907,15 @@ class Antispam_Bee {
|
|
1738 |
|
1739 |
private static function _is_fake_ip($client_ip, $client_host = false)
|
1740 |
{
|
1741 |
-
|
1742 |
$host_by_ip = gethostbyaddr($client_ip);
|
1743 |
|
1744 |
-
|
1745 |
if ( self::_is_ipv6($client_ip) ) {
|
1746 |
return $client_ip != $host_by_ip;
|
1747 |
}
|
1748 |
|
1749 |
-
|
1750 |
if ( empty($client_host) ) {
|
1751 |
$ip_by_host = gethostbyname($host_by_ip);
|
1752 |
|
@@ -1754,7 +1923,7 @@ class Antispam_Bee {
|
|
1754 |
return false;
|
1755 |
}
|
1756 |
|
1757 |
-
|
1758 |
} else {
|
1759 |
if ( $host_by_ip === $client_ip ) {
|
1760 |
return true;
|
@@ -1770,21 +1939,101 @@ class Antispam_Bee {
|
|
1770 |
return false;
|
1771 |
}
|
1772 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1773 |
|
1774 |
/**
|
1775 |
-
*
|
1776 |
*
|
1777 |
* @since 0.1
|
1778 |
* @change 2.5.1
|
1779 |
*
|
1780 |
* @param string $ip Original IP
|
1781 |
-
* @param boolean $cut_end
|
1782 |
-
* @return string
|
1783 |
*/
|
1784 |
|
1785 |
private static function _cut_ip($ip, $cut_end = true)
|
1786 |
{
|
1787 |
-
/* Trenner */
|
1788 |
$separator = ( self::_is_ipv4($ip) ? '.' : ':' );
|
1789 |
|
1790 |
return str_replace(
|
@@ -1796,13 +2045,13 @@ class Antispam_Bee {
|
|
1796 |
|
1797 |
|
1798 |
/**
|
1799 |
-
*
|
1800 |
*
|
1801 |
* @since 2.5.1
|
1802 |
* @change 2.5.1
|
1803 |
*
|
1804 |
* @param string $ip Original IP
|
1805 |
-
* @return string
|
1806 |
*/
|
1807 |
|
1808 |
private static function _anonymize_ip($ip)
|
@@ -1816,13 +2065,13 @@ class Antispam_Bee {
|
|
1816 |
|
1817 |
|
1818 |
/**
|
1819 |
-
*
|
1820 |
*
|
1821 |
* @since 2.4.5
|
1822 |
* @change 2.4.5
|
1823 |
*
|
1824 |
-
* @param string $ip IP
|
1825 |
-
* @return string
|
1826 |
*/
|
1827 |
|
1828 |
private static function _reverse_ip($ip)
|
@@ -1880,12 +2129,12 @@ class Antispam_Bee {
|
|
1880 |
|
1881 |
|
1882 |
/**
|
1883 |
-
*
|
1884 |
*
|
1885 |
* @since 0.1
|
1886 |
* @change 2.4
|
1887 |
*
|
1888 |
-
* @return boolean TRUE
|
1889 |
*/
|
1890 |
|
1891 |
private static function _is_mobile()
|
@@ -1895,62 +2144,60 @@ class Antispam_Bee {
|
|
1895 |
|
1896 |
|
1897 |
|
1898 |
-
|
1899 |
-
############################
|
1900 |
-
##### SPAM-
|
1901 |
-
############################
|
1902 |
-
|
1903 |
|
1904 |
/**
|
1905 |
-
*
|
1906 |
*
|
1907 |
* @since 0.1
|
1908 |
* @change 2.6.0
|
1909 |
*
|
1910 |
-
* @param array $comment
|
1911 |
-
* @param string $reason
|
1912 |
-
* @param boolean $is_ping Ping (
|
1913 |
-
* @return array $comment
|
1914 |
*/
|
1915 |
|
1916 |
private static function _handle_spam_request($comment, $reason, $is_ping = false)
|
1917 |
{
|
1918 |
-
|
1919 |
$options = self::get_options();
|
1920 |
|
1921 |
-
|
1922 |
$spam_remove = !$options['flag_spam'];
|
1923 |
$spam_notice = !$options['no_notice'];
|
1924 |
|
1925 |
-
|
1926 |
$ignore_filter = $options['ignore_filter'];
|
1927 |
$ignore_type = $options['ignore_type'];
|
1928 |
$ignore_reason = in_array($reason, (array)$options['ignore_reasons']);
|
1929 |
|
1930 |
-
|
1931 |
self::_update_spam_log($comment);
|
1932 |
self::_update_spam_count();
|
1933 |
self::_update_daily_stats();
|
1934 |
|
1935 |
-
|
1936 |
if ( $spam_remove ) {
|
1937 |
self::_go_in_peace();
|
1938 |
}
|
1939 |
|
1940 |
-
|
1941 |
if ( $ignore_filter && (( $ignore_type == 1 && $is_ping ) or ( $ignore_type == 2 && !$is_ping )) ) {
|
1942 |
self::_go_in_peace();
|
1943 |
}
|
1944 |
|
1945 |
-
|
1946 |
if ( $ignore_reason ) {
|
1947 |
self::_go_in_peace();
|
1948 |
}
|
1949 |
-
|
1950 |
-
/* Spam-Grund */
|
1951 |
self::$_reason = $reason;
|
1952 |
|
1953 |
-
|
1954 |
add_filter(
|
1955 |
'pre_comment_approved',
|
1956 |
create_function(
|
@@ -1959,7 +2206,7 @@ class Antispam_Bee {
|
|
1959 |
)
|
1960 |
);
|
1961 |
|
1962 |
-
|
1963 |
add_filter(
|
1964 |
'trackback_post',
|
1965 |
array(
|
@@ -1975,7 +2222,7 @@ class Antispam_Bee {
|
|
1975 |
)
|
1976 |
);
|
1977 |
|
1978 |
-
|
1979 |
if ( $spam_notice ) {
|
1980 |
add_filter(
|
1981 |
'comment_post',
|
@@ -1991,23 +2238,23 @@ class Antispam_Bee {
|
|
1991 |
|
1992 |
|
1993 |
/**
|
1994 |
-
* Logfile
|
1995 |
*
|
1996 |
* @since 2.5.7
|
1997 |
* @change 2.6.1
|
1998 |
*
|
1999 |
-
* @param array $comment
|
2000 |
-
* @return mixed
|
2001 |
*/
|
2002 |
|
2003 |
private static function _update_spam_log($comment)
|
2004 |
{
|
2005 |
-
|
2006 |
if ( ! defined('ANTISPAM_BEE_LOG_FILE') OR ! ANTISPAM_BEE_LOG_FILE OR ! is_writable(ANTISPAM_BEE_LOG_FILE) OR validate_file(ANTISPAM_BEE_LOG_FILE) === 1 ) {
|
2007 |
return false;
|
2008 |
}
|
2009 |
|
2010 |
-
|
2011 |
$entry = sprintf(
|
2012 |
'%s comment for post=%d from host=%s marked as spam%s',
|
2013 |
current_time('mysql'),
|
@@ -2016,7 +2263,7 @@ class Antispam_Bee {
|
|
2016 |
PHP_EOL
|
2017 |
);
|
2018 |
|
2019 |
-
|
2020 |
file_put_contents(
|
2021 |
ANTISPAM_BEE_LOG_FILE,
|
2022 |
$entry,
|
@@ -2026,7 +2273,7 @@ class Antispam_Bee {
|
|
2026 |
|
2027 |
|
2028 |
/**
|
2029 |
-
*
|
2030 |
*
|
2031 |
* @since 2.5.6
|
2032 |
* @change 2.5.6
|
@@ -2124,7 +2371,7 @@ class Antispam_Bee {
|
|
2124 |
|
2125 |
|
2126 |
/**
|
2127 |
-
*
|
2128 |
*
|
2129 |
* @since 0.1
|
2130 |
* @change 2.5.7
|
@@ -2137,31 +2384,31 @@ class Antispam_Bee {
|
|
2137 |
|
2138 |
public static function send_mail_notification($id)
|
2139 |
{
|
2140 |
-
|
2141 |
$options = self::get_options();
|
2142 |
|
2143 |
-
|
2144 |
if ( !$options['email_notify'] ) {
|
2145 |
return $id;
|
2146 |
}
|
2147 |
|
2148 |
-
|
2149 |
$comment = get_comment($id, ARRAY_A);
|
2150 |
|
2151 |
-
|
2152 |
if ( empty($comment) ) {
|
2153 |
return $id;
|
2154 |
}
|
2155 |
|
2156 |
-
|
2157 |
if ( ! $post = get_post($comment['comment_post_ID']) ) {
|
2158 |
return $id;
|
2159 |
}
|
2160 |
|
2161 |
-
|
2162 |
self::load_plugin_lang();
|
2163 |
|
2164 |
-
|
2165 |
$subject = sprintf(
|
2166 |
'[%s] %s',
|
2167 |
stripslashes_deep(
|
@@ -2170,40 +2417,41 @@ class Antispam_Bee {
|
|
2170 |
ENT_QUOTES
|
2171 |
)
|
2172 |
),
|
2173 |
-
|
2174 |
);
|
2175 |
|
2176 |
-
|
2177 |
if ( !$content = strip_tags(stripslashes($comment['comment_content'])) ) {
|
2178 |
$content = sprintf(
|
2179 |
'-- %s --',
|
2180 |
-
|
2181 |
);
|
2182 |
}
|
2183 |
|
2184 |
-
|
2185 |
$body = sprintf(
|
2186 |
"%s \"%s\"\r\n\r\n",
|
2187 |
-
|
2188 |
strip_tags($post->post_title)
|
2189 |
).sprintf(
|
2190 |
"%s: %s\r\n",
|
2191 |
-
|
2192 |
( empty($comment['comment_author']) ? '' : strip_tags($comment['comment_author']) )
|
2193 |
).sprintf(
|
2194 |
"URL: %s\r\n",
|
2195 |
-
|
|
|
2196 |
).sprintf(
|
2197 |
"%s: %s\r\n",
|
2198 |
-
|
2199 |
-
|
2200 |
).sprintf(
|
2201 |
"Whois: http://whois.arin.net/rest/ip/%s\r\n",
|
2202 |
$comment['comment_author_IP']
|
2203 |
).sprintf(
|
2204 |
"%s: %s\r\n\r\n",
|
2205 |
-
|
2206 |
-
|
2207 |
).sprintf(
|
2208 |
"%s\r\n\r\n\r\n",
|
2209 |
$content
|
@@ -2211,31 +2459,31 @@ class Antispam_Bee {
|
|
2211 |
EMPTY_TRASH_DAYS ? (
|
2212 |
sprintf(
|
2213 |
"%s: %s\r\n",
|
2214 |
-
|
2215 |
admin_url('comment.php?action=trash&c=' .$id)
|
2216 |
)
|
2217 |
) : (
|
2218 |
sprintf(
|
2219 |
"%s: %s\r\n",
|
2220 |
-
|
2221 |
admin_url('comment.php?action=delete&c=' .$id)
|
2222 |
)
|
2223 |
)
|
2224 |
).sprintf(
|
2225 |
"%s: %s\r\n",
|
2226 |
-
|
2227 |
admin_url('comment.php?action=approve&c=' .$id)
|
2228 |
).sprintf(
|
2229 |
"%s: %s\r\n\r\n",
|
2230 |
-
|
2231 |
admin_url('edit-comments.php?comment_status=spam')
|
2232 |
).sprintf(
|
2233 |
"%s\r\n%s\r\n",
|
2234 |
-
|
2235 |
-
|
2236 |
);
|
2237 |
|
2238 |
-
|
2239 |
wp_mail(
|
2240 |
get_bloginfo('admin_email'),
|
2241 |
apply_filters(
|
@@ -2250,33 +2498,33 @@ class Antispam_Bee {
|
|
2250 |
|
2251 |
|
2252 |
|
2253 |
-
|
2254 |
-
############################
|
2255 |
-
#######
|
2256 |
-
############################
|
2257 |
-
|
2258 |
|
2259 |
/**
|
2260 |
-
*
|
2261 |
*
|
2262 |
* @since 0.1
|
2263 |
* @change 2.4
|
2264 |
*
|
2265 |
-
* @param intval $count
|
2266 |
*/
|
2267 |
|
2268 |
private static function _get_spam_count()
|
2269 |
{
|
2270 |
-
|
2271 |
$count = self::get_option('spam_count');
|
2272 |
|
2273 |
-
|
2274 |
return ( get_locale() == 'de_DE' ? number_format($count, 0, '', '.') : number_format_i18n($count) );
|
2275 |
}
|
2276 |
|
2277 |
|
2278 |
/**
|
2279 |
-
*
|
2280 |
*
|
2281 |
* @since 0.1
|
2282 |
* @change 2.4
|
@@ -2289,7 +2537,7 @@ class Antispam_Bee {
|
|
2289 |
|
2290 |
|
2291 |
/**
|
2292 |
-
*
|
2293 |
*
|
2294 |
* @since 0.1
|
2295 |
* @change 2.6.1
|
@@ -2297,7 +2545,7 @@ class Antispam_Bee {
|
|
2297 |
|
2298 |
private static function _update_spam_count()
|
2299 |
{
|
2300 |
-
|
2301 |
if ( ! self::get_option('dashboard_count') ) {
|
2302 |
return;
|
2303 |
}
|
@@ -2310,7 +2558,7 @@ class Antispam_Bee {
|
|
2310 |
|
2311 |
|
2312 |
/**
|
2313 |
-
*
|
2314 |
*
|
2315 |
* @since 1.9
|
2316 |
* @change 2.6.1
|
@@ -2318,35 +2566,84 @@ class Antispam_Bee {
|
|
2318 |
|
2319 |
private static function _update_daily_stats()
|
2320 |
{
|
2321 |
-
|
2322 |
if ( ! self::get_option('dashboard_chart') ) {
|
2323 |
return;
|
2324 |
}
|
2325 |
|
2326 |
-
|
2327 |
$stats = (array)self::get_option('daily_stats');
|
2328 |
$today = (int)strtotime('today');
|
2329 |
|
2330 |
-
|
2331 |
if ( array_key_exists($today, $stats) ) {
|
2332 |
$stats[$today] ++;
|
2333 |
} else {
|
2334 |
$stats[$today] = 1;
|
2335 |
}
|
2336 |
|
2337 |
-
|
2338 |
krsort($stats, SORT_NUMERIC);
|
2339 |
|
2340 |
-
|
2341 |
self::_update_option(
|
2342 |
'daily_stats',
|
2343 |
array_slice($stats, 0, 31, true)
|
2344 |
);
|
2345 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2346 |
}
|
2347 |
|
2348 |
|
2349 |
-
|
2350 |
add_action(
|
2351 |
'plugins_loaded',
|
2352 |
array(
|
@@ -2355,7 +2652,7 @@ add_action(
|
|
2355 |
)
|
2356 |
);
|
2357 |
|
2358 |
-
|
2359 |
register_activation_hook(
|
2360 |
__FILE__,
|
2361 |
array(
|
@@ -2364,7 +2661,7 @@ register_activation_hook(
|
|
2364 |
)
|
2365 |
);
|
2366 |
|
2367 |
-
|
2368 |
register_deactivation_hook(
|
2369 |
__FILE__,
|
2370 |
array(
|
@@ -2373,7 +2670,7 @@ register_deactivation_hook(
|
|
2373 |
)
|
2374 |
);
|
2375 |
|
2376 |
-
|
2377 |
register_uninstall_hook(
|
2378 |
__FILE__,
|
2379 |
array(
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Plugin Name: Antispam Bee
|
4 |
+
* Description: Easy and extremely productive spam-fighting plugin with many sophisticated solutions. Includes privacy hints and protection against trackback spam.
|
5 |
+
* Author: pluginkollektiv
|
6 |
+
* Author URI: http://pluginkollektiv.org
|
7 |
+
* Plugin URI: https://wordpress.org/plugins/antispam-bee/
|
8 |
+
* Text Domain: antispam-bee
|
9 |
+
* Domain Path: /lang
|
10 |
+
* License: GPLv2 or later
|
11 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
+
* Version: 2.7.0
|
13 |
*/
|
14 |
|
15 |
/*
|
16 |
+
* Copyright (C) 2009-2015 Sergej Müller
|
17 |
+
*
|
18 |
+
* This program is free software; you can redistribute it and/or modify
|
19 |
+
* it under the terms of the GNU General Public License as published by
|
20 |
+
* the Free Software Foundation; either version 2 of the License, or
|
21 |
+
* (at your option) any later version.
|
22 |
+
*
|
23 |
+
* This program is distributed in the hope that it will be useful,
|
24 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
* GNU General Public License for more details.
|
27 |
+
*
|
28 |
+
* You should have received a copy of the GNU General Public License along
|
29 |
+
* with this program; if not, write to the Free Software Foundation, Inc.,
|
30 |
+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
31 |
*/
|
32 |
|
33 |
|
34 |
+
// Make sure this file is only run from within the WordPress context.
|
35 |
+
defined( 'ABSPATH' ) || exit;
|
|
|
|
|
36 |
|
37 |
|
38 |
/**
|
45 |
class Antispam_Bee {
|
46 |
|
47 |
|
48 |
+
// Init
|
49 |
public static $defaults;
|
50 |
private static $_base;
|
51 |
+
private static $_salt;
|
52 |
private static $_reason;
|
53 |
|
54 |
|
55 |
/**
|
56 |
+
* "Constructor" of the class
|
57 |
*
|
58 |
* @since 0.1
|
59 |
* @change 2.6.4
|
61 |
|
62 |
public static function init()
|
63 |
{
|
64 |
+
// Delete spam reason
|
65 |
add_action(
|
66 |
'unspam_comment',
|
67 |
array(
|
70 |
)
|
71 |
);
|
72 |
|
73 |
+
// AJAX & Co.
|
74 |
if ( (defined('DOING_AJAX') && DOING_AJAX) or (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) ) {
|
75 |
return;
|
76 |
}
|
77 |
|
78 |
+
// Initialization
|
79 |
self::_init_internal_vars();
|
80 |
|
81 |
+
// Cronjob
|
82 |
if ( defined('DOING_CRON') ) {
|
83 |
add_action(
|
84 |
'antispam_bee_daily_cronjob',
|
88 |
)
|
89 |
);
|
90 |
|
91 |
+
// Admin
|
92 |
} elseif ( is_admin() ) {
|
93 |
+
// Menu
|
94 |
add_action(
|
95 |
'admin_menu',
|
96 |
array(
|
99 |
)
|
100 |
);
|
101 |
|
102 |
+
// Dashboard
|
103 |
if ( self::_current_page('dashboard') ) {
|
104 |
add_action(
|
105 |
'init',
|
123 |
)
|
124 |
);
|
125 |
|
126 |
+
// Plugins
|
127 |
} else if ( self::_current_page('plugins') ) {
|
128 |
add_action(
|
129 |
'init',
|
149 |
)
|
150 |
);
|
151 |
|
152 |
+
// Options
|
153 |
} else if ( self::_current_page('options') ) {
|
154 |
add_action(
|
155 |
'admin_init',
|
179 |
|
180 |
} else if ( self::_current_page('edit-comments') ) {
|
181 |
if ( ! empty($_GET['comment_status']) && $_GET['comment_status'] === 'spam' && ! self::get_option('no_notice') ) {
|
182 |
+
// Include file
|
183 |
require_once( dirname(__FILE__). '/inc/columns.class.php' );
|
184 |
|
185 |
+
// Load textdomain
|
186 |
self::load_plugin_lang();
|
187 |
|
188 |
+
// Add plugin columns
|
189 |
add_filter(
|
190 |
'manage_edit-comments_columns',
|
191 |
array(
|
227 |
}
|
228 |
}
|
229 |
|
230 |
+
// Frontend
|
231 |
} else {
|
232 |
add_action(
|
233 |
'template_redirect',
|
263 |
|
264 |
|
265 |
|
266 |
+
/*
|
267 |
+
* ############################
|
268 |
+
* ######## INSTALL #########
|
269 |
+
* ############################
|
270 |
+
*/
|
271 |
|
272 |
/**
|
273 |
+
* Action during the activation of the Plugins
|
274 |
*
|
275 |
* @since 0.1
|
276 |
* @change 2.4
|
278 |
|
279 |
public static function activate()
|
280 |
{
|
281 |
+
// Apply Option
|
282 |
add_option(
|
283 |
'antispam_bee',
|
284 |
array(),
|
286 |
'no'
|
287 |
);
|
288 |
|
289 |
+
// Activate Cron
|
290 |
if ( self::get_option('cronjob_enable') ) {
|
291 |
self::init_scheduled_hook();
|
292 |
}
|
294 |
|
295 |
|
296 |
/**
|
297 |
+
* Action to deactivate the plugin
|
298 |
*
|
299 |
* @since 0.1
|
300 |
* @change 2.4
|
307 |
|
308 |
|
309 |
/**
|
310 |
+
* Action deleting the plugin
|
311 |
*
|
312 |
* @since 2.4
|
313 |
* @change 2.4
|
315 |
|
316 |
public static function uninstall()
|
317 |
{
|
318 |
+
// Global
|
319 |
global $wpdb;
|
320 |
|
321 |
+
// Remove settings
|
322 |
delete_option('antispam_bee');
|
323 |
|
324 |
+
// Clean DB
|
325 |
$wpdb->query("OPTIMIZE TABLE `" .$wpdb->options. "`");
|
326 |
}
|
327 |
|
328 |
|
329 |
|
330 |
+
/*
|
331 |
+
* ############################
|
332 |
+
* ######## INTERNAL ########
|
333 |
+
* ############################
|
334 |
+
*/
|
335 |
|
336 |
/**
|
337 |
+
* Initialization of the internal variables
|
338 |
*
|
339 |
* @since 2.4
|
340 |
+
* @change 2.7.0
|
341 |
*/
|
342 |
|
343 |
private static function _init_internal_vars()
|
344 |
{
|
345 |
self::$_base = plugin_basename(__FILE__);
|
346 |
+
|
347 |
+
$salt = defined( 'NONCE_SALT' ) ? NONCE_SALT : ABSPATH;
|
348 |
+
self::$_salt = substr( sha1( $salt ), 0, 10 );
|
349 |
|
350 |
self::$defaults = array(
|
351 |
'options' => array(
|
352 |
+
// General
|
353 |
'advanced_check' => 1,
|
354 |
'regexp_check' => 1,
|
355 |
'spam_ip' => 1,
|
362 |
'dashboard_chart' => 0,
|
363 |
'dashboard_count' => 0,
|
364 |
|
365 |
+
// Filter
|
366 |
+
'country_code' => 0,
|
367 |
+
'country_black' => '',
|
368 |
+
'country_white' => '',
|
369 |
+
|
370 |
+
'translate_api' => 0,
|
371 |
+
'translate_lang' => '',
|
372 |
+
|
373 |
'dnsbl_check' => 0,
|
374 |
'bbcode_check' => 1,
|
375 |
|
376 |
+
// Advanced
|
377 |
'flag_spam' => 1,
|
378 |
'email_notify' => 1,
|
379 |
'no_notice' => 0,
|
384 |
'ignore_type' => 0,
|
385 |
|
386 |
'reasons_enable' => 0,
|
387 |
+
'ignore_reasons' => array(),
|
388 |
),
|
389 |
'reasons' => array(
|
390 |
+
'css' => esc_attr__( 'CSS Hack', 'antispam-bee' ),
|
391 |
+
'time' => esc_attr__( 'Comment time', 'antispam-bee' ),
|
392 |
+
'empty' => esc_attr__( 'Empty Data', 'antispam-bee' ),
|
393 |
+
'server' => esc_attr__( 'Fake IP', 'antispam-bee' ),
|
394 |
+
'localdb' => esc_attr__( 'Local DB Spam', 'antispam-bee' ),
|
395 |
+
'country' => esc_attr__( 'Country Check', 'antispam-bee' ),
|
396 |
+
'dnsbl' => esc_attr__( 'Public Antispam DB', 'antispam-bee' ),
|
397 |
+
'bbcode' => esc_attr__( 'BBCode', 'antispam-bee' ),
|
398 |
+
'lang' => esc_attr__( 'Comment Language', 'antispam-bee' ),
|
399 |
+
'regexp' => esc_attr__( 'Regular Expression', 'antispam-bee' ),
|
400 |
)
|
401 |
);
|
402 |
}
|
403 |
|
404 |
|
405 |
/**
|
406 |
+
* Check and return an array key
|
407 |
*
|
408 |
* @since 2.4.2
|
409 |
* @change 2.4.2
|
410 |
*
|
411 |
+
* @param array $array Array with values
|
412 |
+
* @param string $key Name of the key
|
413 |
+
* @return mixed Value of the requested key
|
414 |
*/
|
415 |
|
416 |
public static function get_key($array, $key)
|
424 |
|
425 |
|
426 |
/**
|
427 |
+
* Localization of the admin pages
|
428 |
*
|
429 |
* @since 0.1
|
430 |
* @change 2.4
|
431 |
*
|
432 |
+
* @param string $page Mark the page
|
433 |
+
* @return boolean TRUE on success
|
434 |
*/
|
435 |
|
436 |
private static function _current_page($page)
|
458 |
|
459 |
|
460 |
/**
|
461 |
+
* Integration of the localization file
|
462 |
*
|
463 |
* @since 0.1
|
464 |
* @change 2.4
|
475 |
|
476 |
|
477 |
/**
|
478 |
+
* Add the link to the settings
|
479 |
*
|
480 |
* @since 1.1
|
481 |
* @change 1.1
|
483 |
|
484 |
public static function init_action_links($data)
|
485 |
{
|
486 |
+
// Rights?
|
487 |
if ( ! current_user_can('manage_options') ) {
|
488 |
return $data;
|
489 |
}
|
499 |
),
|
500 |
admin_url('options-general.php')
|
501 |
),
|
502 |
+
esc_attr__('Settings', 'antispam-bee')
|
503 |
)
|
504 |
)
|
505 |
);
|
507 |
|
508 |
|
509 |
/**
|
510 |
+
* Meta links of the plugin
|
511 |
*
|
512 |
* @since 0.1
|
513 |
* @change 2.6.2
|
514 |
*
|
515 |
+
* @param array $input Existing links
|
516 |
+
* @param string $file Current page
|
517 |
+
* @return array $data Modified links
|
518 |
*/
|
519 |
|
520 |
public static function init_row_meta($input, $file)
|
521 |
{
|
522 |
+
// Rights
|
523 |
if ( $file != self::$_base ) {
|
524 |
return $input;
|
525 |
}
|
527 |
return array_merge(
|
528 |
$input,
|
529 |
array(
|
530 |
+
'<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8CH5FPR88QYML" target="_blank" rel="noopener noreferrer">' . esc_html__( 'Donate', 'antispam-bee' ) . '</a>',
|
531 |
+
'<a href="https://wordpress.org/support/plugin/antispam-bee" target="_blank" rel="noopener noreferrer">' . esc_html__( 'Support', 'antispam-bee' ) . '</a>',
|
532 |
)
|
533 |
);
|
534 |
}
|
535 |
|
536 |
|
537 |
|
538 |
+
/*
|
539 |
+
* ############################
|
540 |
+
* ####### RESOURCES ########
|
541 |
+
* ############################
|
542 |
+
*/
|
543 |
|
544 |
/**
|
545 |
+
* Registration of resources (CSS & JS)
|
546 |
*
|
547 |
* @since 1.6
|
548 |
* @change 2.4.5
|
550 |
|
551 |
public static function init_plugin_sources()
|
552 |
{
|
553 |
+
// Read information
|
554 |
$plugin = get_plugin_data(__FILE__);
|
555 |
|
556 |
+
// Integrate JS
|
557 |
wp_register_script(
|
558 |
'ab_script',
|
559 |
plugins_url('js/scripts.min.js', __FILE__),
|
561 |
$plugin['Version']
|
562 |
);
|
563 |
|
564 |
+
// Integrate CSS
|
565 |
wp_register_style(
|
566 |
'ab_style',
|
567 |
plugins_url('css/styles.min.css', __FILE__),
|
572 |
|
573 |
|
574 |
/**
|
575 |
+
* Initialization of the option page
|
576 |
*
|
577 |
* @since 0.1
|
578 |
* @change 2.4.3
|
580 |
|
581 |
public static function add_sidebar_menu()
|
582 |
{
|
583 |
+
// Create menu
|
584 |
$page = add_options_page(
|
585 |
'Antispam Bee',
|
586 |
'Antispam Bee',
|
592 |
)
|
593 |
);
|
594 |
|
595 |
+
// Integrate JS
|
596 |
add_action(
|
597 |
'admin_print_scripts-' . $page,
|
598 |
array(
|
601 |
)
|
602 |
);
|
603 |
|
604 |
+
// Integrate CSS
|
605 |
add_action(
|
606 |
'admin_print_styles-' . $page,
|
607 |
array(
|
610 |
)
|
611 |
);
|
612 |
|
613 |
+
// Load PHP
|
614 |
add_action(
|
615 |
'load-' .$page,
|
616 |
array(
|
622 |
|
623 |
|
624 |
/**
|
625 |
+
* Initialization of JavaScript
|
626 |
*
|
627 |
* @since 1.6
|
628 |
* @change 2.4
|
635 |
|
636 |
|
637 |
/**
|
638 |
+
* Initialization of Stylesheets
|
639 |
*
|
640 |
* @since 1.6
|
641 |
* @change 2.4
|
648 |
|
649 |
|
650 |
/**
|
651 |
+
* Integration of the GUI
|
652 |
*
|
653 |
* @since 2.4
|
654 |
* @change 2.4
|
661 |
|
662 |
|
663 |
|
664 |
+
/*
|
665 |
+
* ############################
|
666 |
+
* ####### DASHBOARD ########
|
667 |
+
* ############################
|
668 |
+
*/
|
669 |
|
670 |
/**
|
671 |
+
* Display the spam counter on the dashboard
|
672 |
*
|
673 |
* @since 0.1
|
674 |
* @change 2.6.5
|
675 |
*
|
676 |
* @param array $items Initial array with dashboard items
|
677 |
+
* @return array $items Merged array with dashboard items
|
678 |
*/
|
679 |
|
680 |
public static function add_dashboard_count( $items = array() )
|
681 |
{
|
682 |
+
// Skip
|
683 |
+
if ( ! current_user_can('manage_options') OR ! self::get_option('dashboard_count') ) {
|
684 |
+
return $items;
|
685 |
+
}
|
686 |
|
687 |
+
// Icon styling
|
688 |
+
echo '<style>#dashboard_right_now .ab-count:before {content: "\f117"}</style>';
|
689 |
+
|
690 |
+
// Right now item
|
691 |
+
$items[] = sprintf(
|
692 |
+
'<a href="%s" class="ab-count">%s %s</a>',
|
693 |
+
add_query_arg(
|
694 |
+
array(
|
695 |
+
'page' => 'antispam_bee'
|
696 |
+
),
|
697 |
+
admin_url( 'options-general.php' )
|
698 |
+
),
|
699 |
+
esc_html( self::_get_spam_count() ),
|
700 |
+
esc_html__('Blocked', 'antispam-bee')
|
701 |
+
);
|
702 |
|
703 |
+
return $items;
|
704 |
}
|
705 |
|
706 |
|
707 |
/**
|
708 |
+
* Initialize the dashboard chart
|
709 |
*
|
710 |
* @since 1.9
|
711 |
* @change 2.5.6
|
712 |
*/
|
713 |
public static function add_dashboard_chart()
|
714 |
{
|
715 |
+
// Filter
|
716 |
if ( ! current_user_can( 'publish_posts' ) || ! self::get_option( 'dashboard_chart' ) ) {
|
717 |
return;
|
718 |
}
|
719 |
|
720 |
+
// Add Widget
|
721 |
wp_add_dashboard_widget(
|
722 |
'ab_widget',
|
723 |
'Antispam Bee',
|
727 |
)
|
728 |
);
|
729 |
|
730 |
+
// Load CSS
|
731 |
add_action(
|
732 |
'admin_head',
|
733 |
array(
|
747 |
|
748 |
public static function add_dashboard_style()
|
749 |
{
|
750 |
+
// Get plugin data
|
751 |
$plugin = get_plugin_data(__FILE__);
|
752 |
|
753 |
+
// Register styles
|
754 |
wp_register_style(
|
755 |
'ab_chart',
|
756 |
plugins_url('css/dashboard.min.css', __FILE__),
|
758 |
$plugin['Version']
|
759 |
);
|
760 |
|
761 |
+
// Embed styles
|
762 |
wp_print_styles('ab_chart');
|
763 |
}
|
764 |
|
770 |
* @change 2.5.8
|
771 |
*/
|
772 |
public static function add_dashboard_script() {
|
773 |
+
// Get stats
|
774 |
if ( ! self::get_option('daily_stats') ) {
|
775 |
return;
|
776 |
}
|
777 |
|
778 |
+
// Get plugin data
|
779 |
$plugin = get_plugin_data(__FILE__);
|
780 |
|
781 |
+
// Embed scripts
|
782 |
wp_enqueue_script(
|
783 |
'raphael',
|
784 |
plugins_url( 'js/raphael.min.js', __FILE__ ),
|
814 |
|
815 |
public static function show_spam_chart()
|
816 |
{
|
817 |
+
// Get stats
|
818 |
$items = (array)self::get_option('daily_stats');
|
819 |
|
820 |
+
// Emty array?
|
821 |
if ( empty($items) ) {
|
822 |
echo sprintf(
|
823 |
'<div id="ab_chart"><p>%s</p></div>',
|
830 |
// Enqueue scripts.
|
831 |
self::add_dashboard_script();
|
832 |
|
833 |
+
// Sort stats
|
834 |
ksort($items, SORT_NUMERIC);
|
835 |
|
836 |
+
// Start HTML
|
837 |
$html = "<table id=ab_chart_data>\n";
|
838 |
|
839 |
|
840 |
+
// Timestamp table
|
841 |
$html .= "<tfoot><tr>\n";
|
842 |
foreach($items as $date => $count) {
|
843 |
$html .= "<th>" .$date. "</th>\n";
|
844 |
}
|
845 |
$html .= "</tr></tfoot>\n";
|
846 |
|
847 |
+
// Counter table
|
848 |
$html .= "<tbody><tr>\n";
|
849 |
foreach($items as $date => $count) {
|
850 |
$html .= "<td>" .(int) $count. "</td>\n";
|
852 |
$html .= "</tr></tbody>\n";
|
853 |
|
854 |
|
855 |
+
// HTML end
|
856 |
$html .= "</table>\n";
|
857 |
|
858 |
+
// Print html
|
859 |
echo '<div id="ab_chart">' .$html. '</div>';
|
860 |
}
|
861 |
|
862 |
|
863 |
|
864 |
+
/*
|
865 |
+
* ############################
|
866 |
+
* ######## OPTIONS #########
|
867 |
+
* ############################
|
868 |
+
*/
|
869 |
|
870 |
/**
|
871 |
* Get all plugin options
|
904 |
|
905 |
public static function get_option($field)
|
906 |
{
|
907 |
+
// Get all options
|
908 |
$options = self::get_options();
|
909 |
|
910 |
return self::get_key($options, $field);
|
942 |
|
943 |
public static function update_options($data)
|
944 |
{
|
945 |
+
// Get options
|
946 |
$options = get_option('antispam_bee');
|
947 |
|
948 |
+
// Merge new data
|
949 |
if ( is_array($options) ) {
|
950 |
$options = array_merge(
|
951 |
$options,
|
952 |
$data
|
953 |
);
|
954 |
+
}
|
955 |
+
else {
|
956 |
$options = $data;
|
957 |
}
|
958 |
|
959 |
+
// Update options
|
960 |
update_option(
|
961 |
'antispam_bee',
|
962 |
$options
|
963 |
);
|
964 |
|
965 |
+
// Refresh cache
|
966 |
wp_cache_set(
|
967 |
'antispam_bee',
|
968 |
$options
|
971 |
|
972 |
|
973 |
|
974 |
+
/*
|
975 |
+
* ############################
|
976 |
+
* ######## CRONJOBS ########
|
977 |
+
* ############################
|
978 |
+
*/
|
979 |
|
980 |
/**
|
981 |
+
* Execution of the daily cronjobs
|
982 |
*
|
983 |
* @since 0.1
|
984 |
* @change 2.4
|
986 |
|
987 |
public static function start_daily_cronjob()
|
988 |
{
|
989 |
+
// No Cronjob?
|
990 |
if ( !self::get_option('cronjob_enable') ) {
|
991 |
return;
|
992 |
}
|
993 |
|
994 |
+
// Update timestamp
|
995 |
self::_update_option(
|
996 |
'cronjob_timestamp',
|
997 |
time()
|
998 |
);
|
999 |
|
1000 |
+
// Delete spam
|
1001 |
self::_delete_old_spam();
|
1002 |
}
|
1003 |
|
1004 |
|
1005 |
/**
|
1006 |
+
* Delete old spam comments
|
1007 |
*
|
1008 |
* @since 0.1
|
1009 |
* @change 2.4
|
1011 |
|
1012 |
private static function _delete_old_spam()
|
1013 |
{
|
1014 |
+
// Number of days
|
1015 |
$days = (int)self::get_option('cronjob_interval');
|
1016 |
|
1017 |
+
// No value?
|
1018 |
if ( empty($days) ) {
|
1019 |
return false;
|
1020 |
}
|
1021 |
|
1022 |
+
// Global
|
1023 |
global $wpdb;
|
1024 |
|
1025 |
+
// Delete comments
|
1026 |
$wpdb->query(
|
1027 |
$wpdb->prepare(
|
1028 |
"DELETE FROM `$wpdb->comments` WHERE `comment_approved` = 'spam' AND SUBDATE(NOW(), %d) > comment_date_gmt",
|
1030 |
)
|
1031 |
);
|
1032 |
|
1033 |
+
// DB optimization
|
1034 |
$wpdb->query("OPTIMIZE TABLE `$wpdb->comments`");
|
1035 |
}
|
1036 |
|
1037 |
|
1038 |
/**
|
1039 |
+
* Initialization of the cronjobs
|
1040 |
*
|
1041 |
* @since 0.1
|
1042 |
* @change 2.4
|
1055 |
|
1056 |
|
1057 |
/**
|
1058 |
+
* Deletion of the cronjobs
|
1059 |
*
|
1060 |
* @since 0.1
|
1061 |
* @change 2.4
|
1070 |
|
1071 |
|
1072 |
|
1073 |
+
/*
|
1074 |
+
* ############################
|
1075 |
+
* ###### SPAM CHECK ########
|
1076 |
+
* ############################
|
1077 |
+
*/
|
1078 |
|
1079 |
/**
|
1080 |
+
* Check POST values
|
1081 |
*
|
1082 |
* @since 0.1
|
1083 |
* @change 2.6.3
|
1085 |
|
1086 |
public static function precheck_incoming_request()
|
1087 |
{
|
1088 |
+
// Skip if not a comment request
|
1089 |
if ( is_feed() OR is_trackback() OR empty($_POST) OR self::_is_mobile() ) {
|
1090 |
return;
|
1091 |
}
|
1092 |
|
1093 |
+
// Request params
|
1094 |
$request_uri = self::get_key($_SERVER, 'REQUEST_URI');
|
1095 |
$request_path = parse_url($request_uri, PHP_URL_PATH);
|
1096 |
|
1097 |
+
// Request check
|
1098 |
if ( strpos($request_path, 'wp-comments-post.php') === false ) {
|
1099 |
return;
|
1100 |
}
|
1101 |
|
1102 |
+
$post_id = (int) self::get_key( $_POST, 'comment_post_ID' );
|
1103 |
+
// Form fields
|
1104 |
+
$hidden_field = self::get_key( $_POST, 'comment' );
|
1105 |
+
$plugin_field = self::get_key( $_POST, self::get_secret_name_for_post( $post_id ) );
|
1106 |
|
1107 |
+
// Hidden field check
|
1108 |
if ( empty($hidden_field) && ! empty($plugin_field) ) {
|
1109 |
$_POST['comment'] = $plugin_field;
|
1110 |
+
unset( $_POST[ self::get_secret_name_for_post( $post_id ) ] );
|
1111 |
} else {
|
1112 |
$_POST['ab_spam__hidden_field'] = 1;
|
1113 |
}
|
1115 |
|
1116 |
|
1117 |
/**
|
1118 |
+
* Check incoming requests for spam
|
1119 |
*
|
1120 |
* @since 0.1
|
1121 |
* @change 2.6.3
|
1122 |
*
|
1123 |
+
* @param array $comment Untreated comment
|
1124 |
+
* @return array $comment Treated comment
|
1125 |
*/
|
1126 |
|
1127 |
public static function handle_incoming_request($comment)
|
1128 |
{
|
1129 |
+
// Add client IP
|
1130 |
$comment['comment_author_IP'] = self::get_client_ip();
|
1131 |
|
1132 |
+
// Hook client IP
|
1133 |
add_filter(
|
1134 |
'pre_comment_user_ip',
|
1135 |
array(
|
1139 |
1
|
1140 |
);
|
1141 |
|
1142 |
+
// Request params
|
1143 |
$request_uri = self::get_key($_SERVER, 'REQUEST_URI');
|
1144 |
$request_path = parse_url($request_uri, PHP_URL_PATH);
|
1145 |
|
1146 |
+
// Empty path?
|
1147 |
if ( empty($request_path) ) {
|
1148 |
return self::_handle_spam_request(
|
1149 |
$comment,
|
1151 |
);
|
1152 |
}
|
1153 |
|
1154 |
+
// Defaults
|
1155 |
$ping = array(
|
1156 |
'types' => array('pingback', 'trackback', 'pings'),
|
1157 |
'allowed' => !self::get_option('ignore_pings')
|
1158 |
);
|
1159 |
|
1160 |
+
// Is a comment
|
1161 |
if ( strpos($request_path, 'wp-comments-post.php') !== false && ! empty($_POST) ) {
|
1162 |
+
// Verify request
|
1163 |
$status = self::_verify_comment_request($comment);
|
1164 |
|
1165 |
+
// Treat the request as spam
|
1166 |
if ( ! empty($status['reason']) ) {
|
1167 |
return self::_handle_spam_request(
|
1168 |
$comment,
|
1170 |
);
|
1171 |
}
|
1172 |
|
1173 |
+
// Is a trackback
|
1174 |
} else if ( in_array(self::get_key($comment, 'comment_type'), $ping['types']) && $ping['allowed'] ) {
|
1175 |
+
// Verify request
|
1176 |
$status = self::_verify_trackback_request($comment);
|
1177 |
|
1178 |
+
// Treat the request as spam
|
1179 |
if ( ! empty($status['reason']) ) {
|
1180 |
return self::_handle_spam_request(
|
1181 |
$comment,
|
1190 |
|
1191 |
|
1192 |
/**
|
1193 |
+
* Prepares the replacement of the comment field
|
1194 |
*
|
1195 |
* @since 0.1
|
1196 |
* @change 2.4
|
1198 |
|
1199 |
public static function prepare_comment_field()
|
1200 |
{
|
1201 |
+
// Frontend only
|
1202 |
if ( is_feed() or is_trackback() or is_robots() or self::_is_mobile() ) {
|
1203 |
return;
|
1204 |
}
|
1205 |
|
1206 |
+
// Only Posts
|
1207 |
if ( !is_singular() && !self::get_option('always_allowed') ) {
|
1208 |
return;
|
1209 |
}
|
1210 |
|
1211 |
+
// Fire!
|
1212 |
ob_start(
|
1213 |
array(
|
1214 |
'Antispam_Bee',
|
1219 |
|
1220 |
|
1221 |
/**
|
1222 |
+
* Replaces the comment field
|
1223 |
*
|
1224 |
* @since 2.4
|
1225 |
* @change 2.6.4
|
1226 |
*
|
1227 |
+
* @param string $data HTML code of the website
|
1228 |
+
* @return string Treated HTML code
|
1229 |
*/
|
1230 |
|
1231 |
public static function replace_comment_field($data)
|
1232 |
{
|
1233 |
+
// Empty?
|
1234 |
if ( empty($data) ) {
|
1235 |
return;
|
1236 |
}
|
1237 |
|
1238 |
+
// Find the comment textarea
|
1239 |
if ( ! preg_match('#<textarea.+?name=["\']comment["\']#s', $data) ) {
|
1240 |
return $data;
|
1241 |
}
|
1242 |
|
1243 |
+
/* Inject HTML */
|
1244 |
+
return preg_replace_callback(
|
1245 |
+
'/(?P<all> (?# match the whole textarea tag )
|
1246 |
+
<textarea (?# the opening of the textarea and some optional attributes )
|
1247 |
+
( (?# match a id attribute followed by some optional ones and the name attribute )
|
1248 |
+
(?P<before1>[^>]*)
|
1249 |
+
(?P<id1>id=["\'](?P<id_value1>[^>"\']*)["\'])
|
1250 |
+
(?P<between1>[^>]*)
|
1251 |
+
name=["\']comment["\']
|
1252 |
+
| (?# match same as before, but with the name attribute before the id attribute )
|
1253 |
+
(?P<before2>[^>]*)
|
1254 |
+
name=["\']comment["\']
|
1255 |
+
(?P<between2>[^>]*)
|
1256 |
+
(?P<id2>id=["\'](?P<id_value2>[^>"\']*)["\'])
|
1257 |
+
| (?# match same as before, but with no id attribute )
|
1258 |
+
(?P<before3>[^>]*)
|
1259 |
+
name=["\']comment["\']
|
1260 |
+
(?P<between3>[^>]*)
|
1261 |
+
)
|
1262 |
+
(?P<after>[^>]*) (?# match any additional optional attributes )
|
1263 |
+
><\/textarea> (?# the closing of the textarea )
|
1264 |
+
)/x',
|
1265 |
+
array( 'Antispam_Bee', 'replace_comment_field_callback' ),
|
1266 |
+
$data,
|
1267 |
+
1
|
1268 |
+
);
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
/**
|
1272 |
+
* The callback function for the preg_match_callback to modify the textarea tags.
|
1273 |
+
*
|
1274 |
+
* @since 2.6.10
|
1275 |
+
*
|
1276 |
+
* @param array $matches The regex matches.
|
1277 |
+
*
|
1278 |
+
* @return string The modified content string.
|
1279 |
+
*/
|
1280 |
+
public static function replace_comment_field_callback( $matches ) {
|
1281 |
+
// Build init time field
|
1282 |
if ( self::get_option('time_check') ) {
|
1283 |
$init_time_field = sprintf(
|
1284 |
'<input type="hidden" name="ab_init_time" value="%d" />',
|
1288 |
$init_time_field = '';
|
1289 |
}
|
1290 |
|
1291 |
+
$output = '<textarea ' . $matches['before1'] . $matches['before2'] . $matches['before3'];
|
1292 |
+
|
1293 |
+
$id_script = '';
|
1294 |
+
if ( ! empty( $matches['id1'] ) || ! empty( $matches['id2'] ) ) {
|
1295 |
+
$output .= 'id="' . self::get_secret_id_for_post( get_the_ID() ) . '" ';
|
1296 |
+
$id_script = '<script type="text/javascript">document.getElementById("comment").setAttribute( "id", "' . esc_js( md5( time() ) ) . '" );document.getElementById("' . esc_js( self::get_secret_id_for_post( get_the_ID() ) ) . '").setAttribute( "id", "comment" );</script>';
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
$output .= ' name="' . esc_attr( self::get_secret_name_for_post( get_the_ID() ) ) . '" ';
|
1300 |
+
$output .= $matches['between1'] . $matches['between2'] . $matches['between3'];
|
1301 |
+
$output .= $matches['after'] . '>';
|
1302 |
+
$output .= '</textarea><textarea id="comment" aria-hidden="true" name="comment" style="width:10px !important;position:absolute !important;left:-10000000px !important"></textarea>';
|
1303 |
+
$output .= $id_script;
|
1304 |
+
$output .= $init_time_field;
|
1305 |
+
|
1306 |
+
return $output;
|
1307 |
}
|
1308 |
|
1309 |
|
1310 |
/**
|
1311 |
+
* Check the trackbacks
|
1312 |
*
|
1313 |
* @since 2.4
|
1314 |
+
* @change 2.7.0
|
1315 |
*
|
1316 |
+
* @param array $comment Trackback data
|
1317 |
+
* @return array Array with suspected reason [optional]
|
1318 |
*/
|
1319 |
|
1320 |
private static function _verify_trackback_request($comment)
|
1321 |
{
|
1322 |
+
// Comment values
|
1323 |
$ip = self::get_key($comment, 'comment_author_IP');
|
1324 |
$url = self::get_key($comment, 'comment_author_url');
|
1325 |
$body = self::get_key($comment, 'comment_content');
|
1326 |
|
1327 |
+
// Empty values?
|
1328 |
if ( empty($url) OR empty($body) ) {
|
1329 |
return array(
|
1330 |
'reason' => 'empty'
|
1331 |
);
|
1332 |
}
|
1333 |
|
1334 |
+
// IP?
|
1335 |
if ( empty($ip) ) {
|
1336 |
return array(
|
1337 |
'reason' => 'empty'
|
1338 |
);
|
1339 |
}
|
1340 |
|
1341 |
+
// Options
|
1342 |
$options = self::get_options();
|
1343 |
|
1344 |
+
// BBCode spam
|
1345 |
if ( $options['bbcode_check'] && self::_is_bbcode_spam($body) ) {
|
1346 |
return array(
|
1347 |
'reason' => 'bbcode'
|
1348 |
);
|
1349 |
}
|
1350 |
|
1351 |
+
// IP != Server
|
1352 |
if ( $options['advanced_check'] && self::_is_fake_ip($ip, parse_url($url, PHP_URL_HOST)) ) {
|
1353 |
return array(
|
1354 |
'reason' => 'server'
|
1355 |
);
|
1356 |
}
|
1357 |
|
1358 |
+
// IP in local spam
|
1359 |
if ( $options['spam_ip'] && self::_is_db_spam($ip, $url) ) {
|
1360 |
return array(
|
1361 |
'reason' => 'localdb'
|
1362 |
);
|
1363 |
}
|
1364 |
|
1365 |
+
// DNSBL spam
|
1366 |
if ( $options['dnsbl_check'] && self::_is_dnsbl_spam($ip) ) {
|
1367 |
return array(
|
1368 |
'reason' => 'dnsbl'
|
1369 |
);
|
1370 |
}
|
1371 |
+
|
1372 |
+
// Check Country Code
|
1373 |
+
if ( $options['country_code'] && self::_is_country_spam($ip) ) {
|
1374 |
+
return array(
|
1375 |
+
'reason' => 'country'
|
1376 |
+
);
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
// Translate API
|
1380 |
+
if ( $options['translate_api'] && self::_is_lang_spam($body) ) {
|
1381 |
+
return array(
|
1382 |
+
'reason' => 'lang'
|
1383 |
+
);
|
1384 |
+
}
|
1385 |
}
|
1386 |
|
1387 |
|
1388 |
/**
|
1389 |
+
* Check the comment
|
1390 |
*
|
1391 |
* @since 2.4
|
1392 |
+
* @change 2.7.0
|
1393 |
*
|
1394 |
+
* @param array $comment Data of the comment
|
1395 |
+
* @return array Array with suspected reason [optional]
|
1396 |
*/
|
1397 |
|
1398 |
private static function _verify_comment_request($comment)
|
1399 |
{
|
1400 |
+
// Comment values
|
1401 |
$ip = self::get_key($comment, 'comment_author_IP');
|
1402 |
$url = self::get_key($comment, 'comment_author_url');
|
1403 |
$body = self::get_key($comment, 'comment_content');
|
1404 |
$email = self::get_key($comment, 'comment_author_email');
|
1405 |
$author = self::get_key($comment, 'comment_author');
|
1406 |
|
1407 |
+
// Empty values?
|
1408 |
if ( empty($body) ) {
|
1409 |
return array(
|
1410 |
'reason' => 'empty'
|
1411 |
);
|
1412 |
}
|
1413 |
|
1414 |
+
// IP?
|
1415 |
if ( empty($ip) ) {
|
1416 |
return array(
|
1417 |
'reason' => 'empty'
|
1418 |
);
|
1419 |
}
|
1420 |
|
1421 |
+
// Empty values?
|
1422 |
if ( get_option('require_name_email') && ( empty($email) OR empty($author) ) ) {
|
1423 |
return array(
|
1424 |
'reason' => 'empty'
|
1425 |
);
|
1426 |
}
|
1427 |
|
1428 |
+
// Options
|
1429 |
$options = self::get_options();
|
1430 |
|
1431 |
+
// Already commented?
|
1432 |
if ( $options['already_commented'] && ! empty($email) && self::_is_approved_email($email) ) {
|
1433 |
return;
|
1434 |
}
|
1435 |
|
1436 |
+
// Check for a Gravatar
|
1437 |
if ( $options['gravatar_check'] && ! empty($email) && self::_has_valid_gravatar($email) ) {
|
1438 |
return;
|
1439 |
}
|
1440 |
|
1441 |
+
// Bot detected
|
1442 |
if ( ! empty($_POST['ab_spam__hidden_field']) ) {
|
1443 |
return array(
|
1444 |
'reason' => 'css'
|
1445 |
);
|
1446 |
}
|
1447 |
|
1448 |
+
// Action time
|
1449 |
if ( $options['time_check'] && self::_is_shortest_time() ) {
|
1450 |
return array(
|
1451 |
'reason' => 'time'
|
1452 |
);
|
1453 |
}
|
1454 |
|
1455 |
+
// BBCode spam
|
1456 |
if ( $options['bbcode_check'] && self::_is_bbcode_spam($body) ) {
|
1457 |
return array(
|
1458 |
'reason' => 'bbcode'
|
1459 |
);
|
1460 |
}
|
1461 |
|
1462 |
+
// Extended protection
|
1463 |
if ( $options['advanced_check'] && self::_is_fake_ip($ip) ) {
|
1464 |
return array(
|
1465 |
'reason' => 'server'
|
1466 |
);
|
1467 |
}
|
1468 |
|
1469 |
+
// Regex for spam
|
1470 |
if ( $options['regexp_check'] && self::_is_regexp_spam(
|
1471 |
array(
|
1472 |
'ip' => $ip,
|
1473 |
+
'rawurl' => $url,
|
1474 |
'host' => parse_url($url, PHP_URL_HOST),
|
1475 |
'body' => $body,
|
1476 |
'email' => $email,
|
1482 |
);
|
1483 |
}
|
1484 |
|
1485 |
+
// IP in local spam
|
1486 |
if ( $options['spam_ip'] && self::_is_db_spam($ip, $url, $email) ) {
|
1487 |
return array(
|
1488 |
'reason' => 'localdb'
|
1489 |
);
|
1490 |
}
|
1491 |
|
1492 |
+
// DNSBL spam
|
1493 |
if ( $options['dnsbl_check'] && self::_is_dnsbl_spam($ip) ) {
|
1494 |
return array(
|
1495 |
'reason' => 'dnsbl'
|
1496 |
);
|
1497 |
}
|
1498 |
+
|
1499 |
+
// Check Country Code
|
1500 |
+
if ( $options['country_code'] && self::_is_country_spam($ip) ) {
|
1501 |
+
return array(
|
1502 |
+
'reason' => 'country'
|
1503 |
+
);
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
// Translate API
|
1507 |
+
if ( $options['translate_api'] && self::_is_lang_spam($body) ) {
|
1508 |
+
return array(
|
1509 |
+
'reason' => 'lang'
|
1510 |
+
);
|
1511 |
+
}
|
1512 |
}
|
1513 |
|
1514 |
|
1553 |
|
1554 |
private static function _is_shortest_time()
|
1555 |
{
|
1556 |
+
// Comment init time
|
1557 |
if ( ! $init_time = (int)self::get_key($_POST, 'ab_init_time') ) {
|
1558 |
return false;
|
1559 |
}
|
1560 |
|
1561 |
+
// Compare time values
|
1562 |
if ( time() - $init_time < apply_filters('ab_action_time_limit', 5) ) {
|
1563 |
return true;
|
1564 |
}
|
1568 |
|
1569 |
|
1570 |
/**
|
1571 |
+
* Usage of regexp, also custom
|
1572 |
*
|
1573 |
* @since 2.5.2
|
1574 |
* @change 2.5.6
|
1575 |
*
|
1576 |
+
* @param array $comment Array with commentary data
|
1577 |
+
* @return boolean TRUE for suspicious comment
|
1578 |
*/
|
1579 |
|
1580 |
private static function _is_regexp_spam($comment)
|
1581 |
{
|
1582 |
+
// Fields
|
1583 |
$fields = array(
|
1584 |
'ip',
|
1585 |
'host',
|
1586 |
'body',
|
1587 |
'email',
|
1588 |
+
'author',
|
1589 |
);
|
1590 |
|
1591 |
+
// Regexp
|
1592 |
$patterns = array(
|
1593 |
+
array(
|
1594 |
'host' => '^(www\.)?\d+\w+\.com$',
|
1595 |
'body' => '^\w+\s\d+$',
|
1596 |
+
'email' => '@gmail.com$',
|
1597 |
+
),
|
1598 |
+
array(
|
1599 |
+
'body' => '\<\!.+?mfunc.+?\>',
|
1600 |
+
),
|
1601 |
+
array(
|
1602 |
+
'author' => 'moncler|north face|vuitton|handbag|burberry|outlet|prada|cialis|viagra|maillot|oakley|ralph lauren|ray ban|iphone|プラダ',
|
1603 |
+
),
|
1604 |
+
array(
|
1605 |
+
'host' => '^(www\.)?fkbook\.co\.uk$|^(www\.)?nsru\.net$|^(www\.)?goo\.gl$|^(www\.)?bit\.ly$',
|
1606 |
+
),
|
1607 |
+
array(
|
1608 |
+
'body' => 'target[t]?ed (visitors|traffic)|viagra|cialis',
|
1609 |
+
),
|
1610 |
+
array(
|
1611 |
+
'body' => 'dating|sex|lotto|pharmacy',
|
1612 |
+
'email' => '@mail\.ru|@yandex\.',
|
1613 |
),
|
|
|
|
|
|
|
1614 |
);
|
1615 |
|
1616 |
+
// Spammy author
|
1617 |
if ( $quoted_author = preg_quote($comment['author'], '/') ) {
|
1618 |
$patterns[] = array(
|
1619 |
'body' => sprintf(
|
1620 |
'<a.+?>%s<\/a>$',
|
1621 |
$quoted_author
|
1622 |
+
),
|
1623 |
);
|
1624 |
$patterns[] = array(
|
1625 |
'body' => sprintf(
|
1626 |
'%s https?:.+?$',
|
1627 |
$quoted_author
|
1628 |
+
),
|
1629 |
);
|
1630 |
$patterns[] = array(
|
1631 |
'email' => '@gmail.com$',
|
1633 |
'host' => sprintf(
|
1634 |
'^%s$',
|
1635 |
$quoted_author
|
1636 |
+
),
|
1637 |
);
|
1638 |
}
|
1639 |
|
1640 |
+
// Hook
|
1641 |
$patterns = apply_filters(
|
1642 |
'antispam_bee_patterns',
|
1643 |
$patterns
|
1644 |
);
|
1645 |
|
1646 |
+
// Empty?
|
1647 |
if ( ! $patterns ) {
|
1648 |
return false;
|
1649 |
}
|
1650 |
|
1651 |
+
// Loop expressions
|
1652 |
foreach ($patterns as $pattern) {
|
1653 |
$hits = array();
|
1654 |
|
1655 |
+
// Loop fields
|
1656 |
foreach ($pattern as $field => $regexp) {
|
1657 |
+
// Empty value?
|
1658 |
if ( empty($field) OR !in_array($field, $fields) OR empty($regexp) ) {
|
1659 |
continue;
|
1660 |
}
|
1661 |
|
1662 |
+
// Ignore non utf-8 chars
|
1663 |
$comment[$field] = ( function_exists('iconv') ? iconv('utf-8', 'utf-8//TRANSLIT', $comment[$field]) : $comment[$field] );
|
1664 |
|
1665 |
+
// Empty value?
|
1666 |
if ( empty($comment[$field]) ) {
|
1667 |
continue;
|
1668 |
}
|
1669 |
|
1670 |
+
// Perform regex
|
1671 |
if ( @preg_match('/' .$regexp. '/isu', $comment[$field]) ) {
|
1672 |
$hits[$field] = true;
|
1673 |
}
|
1683 |
|
1684 |
|
1685 |
/**
|
1686 |
+
* Review a comment on its existence in the local spam
|
1687 |
*
|
1688 |
* @since 2.0.0
|
1689 |
* @change 2.5.4
|
1690 |
*
|
1691 |
+
* @param string $ip Comment IP
|
1692 |
+
* @param string $url Comment URL [optional]
|
1693 |
+
* @param string $email Comment Email [optional]
|
1694 |
+
* @return boolean TRUE for suspicious comment
|
1695 |
*/
|
1696 |
|
1697 |
private static function _is_db_spam($ip, $url = '', $email = '')
|
1698 |
{
|
1699 |
+
// Global
|
1700 |
global $wpdb;
|
1701 |
|
1702 |
+
// Default
|
1703 |
$filter = array('`comment_author_IP` = %s');
|
1704 |
$params = array( wp_unslash($ip) );
|
1705 |
|
1706 |
+
// Match the URL
|
1707 |
if ( ! empty($url) ) {
|
1708 |
$filter[] = '`comment_author_url` = %s';
|
1709 |
$params[] = wp_unslash($url);
|
1710 |
}
|
1711 |
|
1712 |
+
// Match the E-mail
|
1713 |
if ( ! empty($email) ) {
|
1714 |
$filter[] = '`comment_author_email` = %s';
|
1715 |
$params[] = wp_unslash($email);
|
1716 |
}
|
1717 |
|
1718 |
+
// Perform query
|
1719 |
$result = $wpdb->get_var(
|
1720 |
$wpdb->prepare(
|
1721 |
sprintf(
|
1731 |
|
1732 |
|
1733 |
/**
|
1734 |
+
* Check for country spam by (anonymized) IP
|
1735 |
+
*
|
1736 |
+
* @since 2.6.9
|
1737 |
+
* @change 2.6.9
|
1738 |
+
*
|
1739 |
+
* @param string $ip IP address
|
1740 |
+
* @return boolean TRUE if the comment is spam based on country filter
|
1741 |
+
*/
|
1742 |
+
|
1743 |
+
private static function _is_country_spam($ip)
|
1744 |
+
{
|
1745 |
+
// Get options
|
1746 |
+
$options = self::get_options();
|
1747 |
+
|
1748 |
+
// White & Black
|
1749 |
+
$white = preg_split(
|
1750 |
+
'/[\s,;]+/',
|
1751 |
+
$options['country_white'],
|
1752 |
+
-1,
|
1753 |
+
PREG_SPLIT_NO_EMPTY
|
1754 |
+
);
|
1755 |
+
$black = preg_split(
|
1756 |
+
'/[\s,;]+/',
|
1757 |
+
$options['country_black'],
|
1758 |
+
-1,
|
1759 |
+
PREG_SPLIT_NO_EMPTY
|
1760 |
+
);
|
1761 |
+
|
1762 |
+
// Empty lists?
|
1763 |
+
if ( empty($white) && empty($black) ) {
|
1764 |
+
return false;
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
// IP 2 Country API
|
1768 |
+
$response = wp_safe_remote_head(
|
1769 |
+
esc_url_raw(
|
1770 |
+
sprintf(
|
1771 |
+
'https://api.ip2country.info/ip?%s',
|
1772 |
+
self::_anonymize_ip($ip)
|
1773 |
+
),
|
1774 |
+
'https'
|
1775 |
+
)
|
1776 |
+
);
|
1777 |
+
|
1778 |
+
// Error by WP
|
1779 |
+
if ( is_wp_error($response) ) {
|
1780 |
+
return false;
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
// Response code check
|
1784 |
+
if ( wp_remote_retrieve_response_code($response) !== 200 ) {
|
1785 |
+
return false;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
// Get country code
|
1789 |
+
$country = (string)wp_remote_retrieve_header($response, 'x-country-code');
|
1790 |
+
|
1791 |
+
// Country code check
|
1792 |
+
if ( empty($country) OR strlen($country) !== 2 ) {
|
1793 |
+
return false;
|
1794 |
+
}
|
1795 |
+
|
1796 |
+
// Dive into blacklist
|
1797 |
+
if ( ! empty($black) ) {
|
1798 |
+
return ( in_array($country, $black) );
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
// Dive into whitelist
|
1802 |
+
return ( ! in_array($country, $white) );
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
/**
|
1806 |
+
* Check for DNSBL spam
|
1807 |
*
|
1808 |
* @since 2.4.5
|
1809 |
* @change 2.4.5
|
1810 |
*
|
1811 |
+
* @param string $ip IP address
|
1812 |
+
* @return boolean TRUE for reported IP
|
1813 |
*/
|
1814 |
|
1815 |
private static function _is_dnsbl_spam($ip)
|
1816 |
{
|
1817 |
+
// Start request
|
1818 |
$response = wp_safe_remote_request(
|
1819 |
esc_url_raw(
|
1820 |
sprintf(
|
1825 |
)
|
1826 |
);
|
1827 |
|
1828 |
+
// Response error?
|
1829 |
if ( is_wp_error($response) ) {
|
1830 |
return false;
|
1831 |
}
|
1832 |
|
1833 |
+
// Get JSON
|
1834 |
$json = wp_remote_retrieve_body($response);
|
1835 |
|
1836 |
+
// Decode JSON
|
1837 |
$result = json_decode($json);
|
1838 |
|
1839 |
+
// Empty data
|
1840 |
if ( empty($result->success) ) {
|
1841 |
return false;
|
1842 |
}
|
1843 |
|
1844 |
+
// Return status
|
1845 |
return (bool) $result->ip->appears;
|
1846 |
}
|
1847 |
|
1848 |
|
1849 |
/**
|
1850 |
+
* Check for BBCode spam
|
1851 |
*
|
1852 |
* @since 2.5.1
|
1853 |
* @change 2.5.1
|
1854 |
*
|
1855 |
+
* @param string $body Content of a comment
|
1856 |
+
* @return boolean TRUE for BBCode in content
|
1857 |
*/
|
1858 |
|
1859 |
private static function _is_bbcode_spam($body)
|
1863 |
|
1864 |
|
1865 |
/**
|
1866 |
+
* Check for an already approved e-mail address
|
1867 |
*
|
1868 |
* @since 2.0
|
1869 |
* @change 2.5.1
|
1870 |
*
|
1871 |
+
* @param string $email E-mail address
|
1872 |
+
* @return boolean TRUE for a found entry
|
1873 |
*/
|
1874 |
|
1875 |
private static function _is_approved_email($email)
|
1876 |
{
|
1877 |
+
// Global
|
1878 |
global $wpdb;
|
1879 |
|
1880 |
+
// Search
|
1881 |
$result = $wpdb->get_var(
|
1882 |
$wpdb->prepare(
|
1883 |
"SELECT `comment_ID` FROM `$wpdb->comments` WHERE `comment_approved` = '1' AND `comment_author_email` = %s LIMIT 1",
|
1885 |
)
|
1886 |
);
|
1887 |
|
1888 |
+
// Found?
|
1889 |
if ( $result ) {
|
1890 |
return true;
|
1891 |
}
|
1907 |
|
1908 |
private static function _is_fake_ip($client_ip, $client_host = false)
|
1909 |
{
|
1910 |
+
// Remote Host
|
1911 |
$host_by_ip = gethostbyaddr($client_ip);
|
1912 |
|
1913 |
+
// IPv6
|
1914 |
if ( self::_is_ipv6($client_ip) ) {
|
1915 |
return $client_ip != $host_by_ip;
|
1916 |
}
|
1917 |
|
1918 |
+
// IPv4 and Comment
|
1919 |
if ( empty($client_host) ) {
|
1920 |
$ip_by_host = gethostbyname($host_by_ip);
|
1921 |
|
1923 |
return false;
|
1924 |
}
|
1925 |
|
1926 |
+
// IPv4 and Trackback
|
1927 |
} else {
|
1928 |
if ( $host_by_ip === $client_ip ) {
|
1929 |
return true;
|
1939 |
return false;
|
1940 |
}
|
1941 |
|
1942 |
+
/**
|
1943 |
+
* Check for unwanted languages
|
1944 |
+
*
|
1945 |
+
* @since 2.0
|
1946 |
+
* @change 2.6.6
|
1947 |
+
* @change 2.7.0
|
1948 |
+
*
|
1949 |
+
* @param string $comment_content Content of the comment.
|
1950 |
+
*
|
1951 |
+
* @return boolean TRUE if it is spam
|
1952 |
+
*/
|
1953 |
+
|
1954 |
+
private static function _is_lang_spam( $comment_content ) {
|
1955 |
+
// User defined language
|
1956 |
+
$allowed_lang = self::get_option( 'translate_lang' );
|
1957 |
+
|
1958 |
+
// Make comment text plain
|
1959 |
+
$comment_text = wp_strip_all_tags( $comment_content );
|
1960 |
+
|
1961 |
+
// Skip if empty values
|
1962 |
+
if ( empty( $allowed_lang )
|
1963 |
+
|| empty( $comment_text )
|
1964 |
+
) {
|
1965 |
+
return false;
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
// Trim comment text
|
1969 |
+
if ( ! $query_text = wp_trim_words( $comment_text, 10, '' ) ) {
|
1970 |
+
return false;
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
/**
|
1974 |
+
* Filter the Google Translate API key to be used.
|
1975 |
+
*
|
1976 |
+
* @since 2.7.0
|
1977 |
+
*
|
1978 |
+
* @param string $key API key to use.
|
1979 |
+
*
|
1980 |
+
* @return string Modified API key.
|
1981 |
+
*/
|
1982 |
+
$key = apply_filters(
|
1983 |
+
'ab_google_translate_api_key',
|
1984 |
+
base64_decode(
|
1985 |
+
strrev( 'B9GcXFjbjdULkdDUfh1SOlzZ2FzMhF1Mt1kRWVTWoVHR5NVY6lUQ' )
|
1986 |
+
)
|
1987 |
+
);
|
1988 |
+
|
1989 |
+
// Start request
|
1990 |
+
$response = wp_safe_remote_request(
|
1991 |
+
add_query_arg(
|
1992 |
+
array(
|
1993 |
+
'q' => rawurlencode( $query_text ),
|
1994 |
+
'key' => $key,
|
1995 |
+
),
|
1996 |
+
'https://www.googleapis.com/language/translate/v2/detect'
|
1997 |
+
)
|
1998 |
+
);
|
1999 |
+
|
2000 |
+
// Skip on error
|
2001 |
+
if ( is_wp_error( $response )
|
2002 |
+
|| wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
2003 |
+
return false;
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
// Get JSON from content
|
2007 |
+
if ( ! $json = wp_remote_retrieve_body( $response ) ) {
|
2008 |
+
return false;
|
2009 |
+
}
|
2010 |
+
|
2011 |
+
// Decode JSON
|
2012 |
+
if ( ! $data_array = json_decode( $json, true ) ) {
|
2013 |
+
return false;
|
2014 |
+
}
|
2015 |
+
|
2016 |
+
// Get detected language
|
2017 |
+
if ( ! $detected_lang = @$data_array['data']['detections'][0][0]['language'] ) {
|
2018 |
+
return false;
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
return ( $detected_lang != $allowed_lang );
|
2022 |
+
}
|
2023 |
|
2024 |
/**
|
2025 |
+
* Trim IP addresses
|
2026 |
*
|
2027 |
* @since 0.1
|
2028 |
* @change 2.5.1
|
2029 |
*
|
2030 |
* @param string $ip Original IP
|
2031 |
+
* @param boolean $cut_end Shortening the end?
|
2032 |
+
* @return string Shortened IP
|
2033 |
*/
|
2034 |
|
2035 |
private static function _cut_ip($ip, $cut_end = true)
|
2036 |
{
|
|
|
2037 |
$separator = ( self::_is_ipv4($ip) ? '.' : ':' );
|
2038 |
|
2039 |
return str_replace(
|
2045 |
|
2046 |
|
2047 |
/**
|
2048 |
+
* Anonymize the IP addresses
|
2049 |
*
|
2050 |
* @since 2.5.1
|
2051 |
* @change 2.5.1
|
2052 |
*
|
2053 |
* @param string $ip Original IP
|
2054 |
+
* @return string Anonymous IP
|
2055 |
*/
|
2056 |
|
2057 |
private static function _anonymize_ip($ip)
|
2065 |
|
2066 |
|
2067 |
/**
|
2068 |
+
* Rotates the IP address
|
2069 |
*
|
2070 |
* @since 2.4.5
|
2071 |
* @change 2.4.5
|
2072 |
*
|
2073 |
+
* @param string $ip IP address
|
2074 |
+
* @return string Turned IP address
|
2075 |
*/
|
2076 |
|
2077 |
private static function _reverse_ip($ip)
|
2129 |
|
2130 |
|
2131 |
/**
|
2132 |
+
* Testing on mobile devices
|
2133 |
*
|
2134 |
* @since 0.1
|
2135 |
* @change 2.4
|
2136 |
*
|
2137 |
+
* @return boolean TRUE if "wptouch" is active
|
2138 |
*/
|
2139 |
|
2140 |
private static function _is_mobile()
|
2144 |
|
2145 |
|
2146 |
|
2147 |
+
/*
|
2148 |
+
* ############################
|
2149 |
+
* ##### SPAM-TREATMENT #####
|
2150 |
+
* ############################
|
2151 |
+
*/
|
2152 |
|
2153 |
/**
|
2154 |
+
* Execution of the delete/marking process
|
2155 |
*
|
2156 |
* @since 0.1
|
2157 |
* @change 2.6.0
|
2158 |
*
|
2159 |
+
* @param array $comment Untreated commentary data
|
2160 |
+
* @param string $reason Reason for suspicion
|
2161 |
+
* @param boolean $is_ping Ping (yes or no) [optional]
|
2162 |
+
* @return array $comment Treated commentary data
|
2163 |
*/
|
2164 |
|
2165 |
private static function _handle_spam_request($comment, $reason, $is_ping = false)
|
2166 |
{
|
2167 |
+
// Options
|
2168 |
$options = self::get_options();
|
2169 |
|
2170 |
+
// Settings
|
2171 |
$spam_remove = !$options['flag_spam'];
|
2172 |
$spam_notice = !$options['no_notice'];
|
2173 |
|
2174 |
+
// Filter settings
|
2175 |
$ignore_filter = $options['ignore_filter'];
|
2176 |
$ignore_type = $options['ignore_type'];
|
2177 |
$ignore_reason = in_array($reason, (array)$options['ignore_reasons']);
|
2178 |
|
2179 |
+
// Remember spam
|
2180 |
self::_update_spam_log($comment);
|
2181 |
self::_update_spam_count();
|
2182 |
self::_update_daily_stats();
|
2183 |
|
2184 |
+
// Delete spam
|
2185 |
if ( $spam_remove ) {
|
2186 |
self::_go_in_peace();
|
2187 |
}
|
2188 |
|
2189 |
+
// Handle types
|
2190 |
if ( $ignore_filter && (( $ignore_type == 1 && $is_ping ) or ( $ignore_type == 2 && !$is_ping )) ) {
|
2191 |
self::_go_in_peace();
|
2192 |
}
|
2193 |
|
2194 |
+
// Spam reason
|
2195 |
if ( $ignore_reason ) {
|
2196 |
self::_go_in_peace();
|
2197 |
}
|
|
|
|
|
2198 |
self::$_reason = $reason;
|
2199 |
|
2200 |
+
// Mark spam
|
2201 |
add_filter(
|
2202 |
'pre_comment_approved',
|
2203 |
create_function(
|
2206 |
)
|
2207 |
);
|
2208 |
|
2209 |
+
// Send e-mail
|
2210 |
add_filter(
|
2211 |
'trackback_post',
|
2212 |
array(
|
2222 |
)
|
2223 |
);
|
2224 |
|
2225 |
+
// Spam reason as comment meta
|
2226 |
if ( $spam_notice ) {
|
2227 |
add_filter(
|
2228 |
'comment_post',
|
2238 |
|
2239 |
|
2240 |
/**
|
2241 |
+
* Logfile with detected spam
|
2242 |
*
|
2243 |
* @since 2.5.7
|
2244 |
* @change 2.6.1
|
2245 |
*
|
2246 |
+
* @param array $comment Array with commentary data
|
2247 |
+
* @return mixed FALSE in case of error
|
2248 |
*/
|
2249 |
|
2250 |
private static function _update_spam_log($comment)
|
2251 |
{
|
2252 |
+
// Skip logfile?
|
2253 |
if ( ! defined('ANTISPAM_BEE_LOG_FILE') OR ! ANTISPAM_BEE_LOG_FILE OR ! is_writable(ANTISPAM_BEE_LOG_FILE) OR validate_file(ANTISPAM_BEE_LOG_FILE) === 1 ) {
|
2254 |
return false;
|
2255 |
}
|
2256 |
|
2257 |
+
// Compose entry
|
2258 |
$entry = sprintf(
|
2259 |
'%s comment for post=%d from host=%s marked as spam%s',
|
2260 |
current_time('mysql'),
|
2263 |
PHP_EOL
|
2264 |
);
|
2265 |
|
2266 |
+
// Write
|
2267 |
file_put_contents(
|
2268 |
ANTISPAM_BEE_LOG_FILE,
|
2269 |
$entry,
|
2273 |
|
2274 |
|
2275 |
/**
|
2276 |
+
* Sends the 403 header and terminates the connection
|
2277 |
*
|
2278 |
* @since 2.5.6
|
2279 |
* @change 2.5.6
|
2371 |
|
2372 |
|
2373 |
/**
|
2374 |
+
*Send notification via e-mail
|
2375 |
*
|
2376 |
* @since 0.1
|
2377 |
* @change 2.5.7
|
2384 |
|
2385 |
public static function send_mail_notification($id)
|
2386 |
{
|
2387 |
+
// Options
|
2388 |
$options = self::get_options();
|
2389 |
|
2390 |
+
// No notification?
|
2391 |
if ( !$options['email_notify'] ) {
|
2392 |
return $id;
|
2393 |
}
|
2394 |
|
2395 |
+
// Comment
|
2396 |
$comment = get_comment($id, ARRAY_A);
|
2397 |
|
2398 |
+
// No values?
|
2399 |
if ( empty($comment) ) {
|
2400 |
return $id;
|
2401 |
}
|
2402 |
|
2403 |
+
// Parent Post
|
2404 |
if ( ! $post = get_post($comment['comment_post_ID']) ) {
|
2405 |
return $id;
|
2406 |
}
|
2407 |
|
2408 |
+
// Load the language
|
2409 |
self::load_plugin_lang();
|
2410 |
|
2411 |
+
// Subject
|
2412 |
$subject = sprintf(
|
2413 |
'[%s] %s',
|
2414 |
stripslashes_deep(
|
2417 |
ENT_QUOTES
|
2418 |
)
|
2419 |
),
|
2420 |
+
esc_html__('Comment marked as spam', 'antispam-bee')
|
2421 |
);
|
2422 |
|
2423 |
+
// Content
|
2424 |
if ( !$content = strip_tags(stripslashes($comment['comment_content'])) ) {
|
2425 |
$content = sprintf(
|
2426 |
'-- %s --',
|
2427 |
+
esc_html__('Content removed by Antispam Bee', 'antispam-bee')
|
2428 |
);
|
2429 |
}
|
2430 |
|
2431 |
+
// Body
|
2432 |
$body = sprintf(
|
2433 |
"%s \"%s\"\r\n\r\n",
|
2434 |
+
esc_html__('New spam comment on your post', 'antispam-bee'),
|
2435 |
strip_tags($post->post_title)
|
2436 |
).sprintf(
|
2437 |
"%s: %s\r\n",
|
2438 |
+
esc_html__('Author', 'antispam-bee'),
|
2439 |
( empty($comment['comment_author']) ? '' : strip_tags($comment['comment_author']) )
|
2440 |
).sprintf(
|
2441 |
"URL: %s\r\n",
|
2442 |
+
// empty check exists
|
2443 |
+
esc_url($comment['comment_author_url'])
|
2444 |
).sprintf(
|
2445 |
"%s: %s\r\n",
|
2446 |
+
esc_html__('Type', 'antispam-bee'),
|
2447 |
+
esc_html__( ( empty($comment['comment_type']) ? 'Comment' : 'Trackback' ), 'antispam-bee' )
|
2448 |
).sprintf(
|
2449 |
"Whois: http://whois.arin.net/rest/ip/%s\r\n",
|
2450 |
$comment['comment_author_IP']
|
2451 |
).sprintf(
|
2452 |
"%s: %s\r\n\r\n",
|
2453 |
+
esc_html__('Spam Reason', 'antispam-bee'),
|
2454 |
+
esc_html__(self::$defaults['reasons'][self::$_reason], 'antispam-bee')
|
2455 |
).sprintf(
|
2456 |
"%s\r\n\r\n\r\n",
|
2457 |
$content
|
2459 |
EMPTY_TRASH_DAYS ? (
|
2460 |
sprintf(
|
2461 |
"%s: %s\r\n",
|
2462 |
+
esc_html__('Trash it', 'antispam-bee'),
|
2463 |
admin_url('comment.php?action=trash&c=' .$id)
|
2464 |
)
|
2465 |
) : (
|
2466 |
sprintf(
|
2467 |
"%s: %s\r\n",
|
2468 |
+
esc_html__('Delete it', 'antispam-bee'),
|
2469 |
admin_url('comment.php?action=delete&c=' .$id)
|
2470 |
)
|
2471 |
)
|
2472 |
).sprintf(
|
2473 |
"%s: %s\r\n",
|
2474 |
+
esc_html__('Approve it', 'antispam-bee'),
|
2475 |
admin_url('comment.php?action=approve&c=' .$id)
|
2476 |
).sprintf(
|
2477 |
"%s: %s\r\n\r\n",
|
2478 |
+
esc_html__('Spam list', 'antispam-bee'),
|
2479 |
admin_url('edit-comments.php?comment_status=spam')
|
2480 |
).sprintf(
|
2481 |
"%s\r\n%s\r\n",
|
2482 |
+
esc_html__('Notify message by Antispam Bee', 'antispam-bee'),
|
2483 |
+
esc_html__('http://antispambee.com', 'antispam-bee')
|
2484 |
);
|
2485 |
|
2486 |
+
// Send
|
2487 |
wp_mail(
|
2488 |
get_bloginfo('admin_email'),
|
2489 |
apply_filters(
|
2498 |
|
2499 |
|
2500 |
|
2501 |
+
/*
|
2502 |
+
* ############################
|
2503 |
+
* ####### STATISTICS #######
|
2504 |
+
* ############################
|
2505 |
+
*/
|
2506 |
|
2507 |
/**
|
2508 |
+
* Return the number of spam comments
|
2509 |
*
|
2510 |
* @since 0.1
|
2511 |
* @change 2.4
|
2512 |
*
|
2513 |
+
* @param intval $count Number of spam comments
|
2514 |
*/
|
2515 |
|
2516 |
private static function _get_spam_count()
|
2517 |
{
|
2518 |
+
// Init
|
2519 |
$count = self::get_option('spam_count');
|
2520 |
|
2521 |
+
// Fire
|
2522 |
return ( get_locale() == 'de_DE' ? number_format($count, 0, '', '.') : number_format_i18n($count) );
|
2523 |
}
|
2524 |
|
2525 |
|
2526 |
/**
|
2527 |
+
* Output the number of spam comments
|
2528 |
*
|
2529 |
* @since 0.1
|
2530 |
* @change 2.4
|
2537 |
|
2538 |
|
2539 |
/**
|
2540 |
+
* Update the number of spam comments
|
2541 |
*
|
2542 |
* @since 0.1
|
2543 |
* @change 2.6.1
|
2545 |
|
2546 |
private static function _update_spam_count()
|
2547 |
{
|
2548 |
+
// Skip if not enabled
|
2549 |
if ( ! self::get_option('dashboard_count') ) {
|
2550 |
return;
|
2551 |
}
|
2558 |
|
2559 |
|
2560 |
/**
|
2561 |
+
* Update statistics
|
2562 |
*
|
2563 |
* @since 1.9
|
2564 |
* @change 2.6.1
|
2566 |
|
2567 |
private static function _update_daily_stats()
|
2568 |
{
|
2569 |
+
// Skip if not enabled
|
2570 |
if ( ! self::get_option('dashboard_chart') ) {
|
2571 |
return;
|
2572 |
}
|
2573 |
|
2574 |
+
// Init
|
2575 |
$stats = (array)self::get_option('daily_stats');
|
2576 |
$today = (int)strtotime('today');
|
2577 |
|
2578 |
+
// Count up
|
2579 |
if ( array_key_exists($today, $stats) ) {
|
2580 |
$stats[$today] ++;
|
2581 |
} else {
|
2582 |
$stats[$today] = 1;
|
2583 |
}
|
2584 |
|
2585 |
+
// Sort
|
2586 |
krsort($stats, SORT_NUMERIC);
|
2587 |
|
2588 |
+
// Save
|
2589 |
self::_update_option(
|
2590 |
'daily_stats',
|
2591 |
array_slice($stats, 0, 31, true)
|
2592 |
);
|
2593 |
}
|
2594 |
+
|
2595 |
+
/**
|
2596 |
+
* Returns the secret of a post used in the textarea name attribute.
|
2597 |
+
*
|
2598 |
+
* @param int $post_id
|
2599 |
+
*
|
2600 |
+
* @return string
|
2601 |
+
*/
|
2602 |
+
public static function get_secret_name_for_post( $post_id ) {
|
2603 |
+
|
2604 |
+
$secret = substr( sha1( md5( self::$_salt . get_the_title( (int) $post_id ) ) ), 0, 10 );
|
2605 |
+
|
2606 |
+
/**
|
2607 |
+
* Filters the secret for a post, which is used in the textarea name attribute.
|
2608 |
+
*
|
2609 |
+
* @param string $secret The secret.
|
2610 |
+
* @param int $post_id The post ID.
|
2611 |
+
*/
|
2612 |
+
return apply_filters(
|
2613 |
+
'ab_get_secret_name_for_post',
|
2614 |
+
$secret,
|
2615 |
+
(int) $post_id
|
2616 |
+
);
|
2617 |
+
|
2618 |
+
}
|
2619 |
+
|
2620 |
+
/**
|
2621 |
+
* Returns the secret of a post used in the textarea id attribute.
|
2622 |
+
*
|
2623 |
+
* @param int $post_id
|
2624 |
+
*
|
2625 |
+
* @return string
|
2626 |
+
*/
|
2627 |
+
public static function get_secret_id_for_post( $post_id ) {
|
2628 |
+
|
2629 |
+
$secret = substr( sha1( md5( 'comment-id' . self::$_salt . get_the_title( (int) $post_id ) ) ), 0, 10 );
|
2630 |
+
|
2631 |
+
/**
|
2632 |
+
* Filters the secret for a post, which is used in the textarea id attribute.
|
2633 |
+
*
|
2634 |
+
* @param string $secret The secret.
|
2635 |
+
* @param int $post_id The post ID.
|
2636 |
+
*/
|
2637 |
+
return apply_filters(
|
2638 |
+
'ab_get_secret_id_for_post',
|
2639 |
+
$secret,
|
2640 |
+
(int) $post_id
|
2641 |
+
);
|
2642 |
+
}
|
2643 |
}
|
2644 |
|
2645 |
|
2646 |
+
// Fire
|
2647 |
add_action(
|
2648 |
'plugins_loaded',
|
2649 |
array(
|
2652 |
)
|
2653 |
);
|
2654 |
|
2655 |
+
// Activation
|
2656 |
register_activation_hook(
|
2657 |
__FILE__,
|
2658 |
array(
|
2661 |
)
|
2662 |
);
|
2663 |
|
2664 |
+
// Deactivation
|
2665 |
register_deactivation_hook(
|
2666 |
__FILE__,
|
2667 |
array(
|
2670 |
)
|
2671 |
);
|
2672 |
|
2673 |
+
// Uninstall
|
2674 |
register_uninstall_hook(
|
2675 |
__FILE__,
|
2676 |
array(
|
css/dashboard.css
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
/* @group Vorderseite */
|
2 |
-
|
3 |
#ab_chart {
|
4 |
color: #a0a5aa;
|
5 |
height: 140px;
|
@@ -18,5 +16,3 @@
|
|
18 |
position: relative;
|
19 |
white-space: nowrap;
|
20 |
}
|
21 |
-
|
22 |
-
/* @end group */
|
|
|
|
|
1 |
#ab_chart {
|
2 |
color: #a0a5aa;
|
3 |
height: 140px;
|
16 |
position: relative;
|
17 |
white-space: nowrap;
|
18 |
}
|
|
|
|
css/styles.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
/* @end group */
|
10 |
|
11 |
|
12 |
-
/* @group
|
13 |
|
14 |
.ab-main *,
|
15 |
.ab-main *:after,
|
@@ -18,7 +18,6 @@
|
|
18 |
margin: 0;
|
19 |
padding: 0;
|
20 |
outline: 0;
|
21 |
-
|
22 |
-webkit-box-sizing: border-box;
|
23 |
-moz-box-sizing: border-box;
|
24 |
box-sizing: border-box;
|
@@ -39,10 +38,9 @@
|
|
39 |
/* @end group */
|
40 |
|
41 |
|
42 |
-
/* @group
|
43 |
|
44 |
.ab-wrap {
|
45 |
-
color: #2f353e;
|
46 |
margin: 0 0 0 -10px;
|
47 |
padding: 20px 0 0 0;
|
48 |
text-rendering: optimizeLegibility;
|
@@ -56,7 +54,7 @@
|
|
56 |
/* @end group */
|
57 |
|
58 |
|
59 |
-
/* @group
|
60 |
|
61 |
.ab-column h3 {
|
62 |
margin: 0;
|
@@ -99,24 +97,28 @@
|
|
99 |
/* @end group */
|
100 |
|
101 |
|
102 |
-
/* @group
|
103 |
|
104 |
.ab-column input[type="text"],
|
|
|
105 |
.ab-column select {
|
106 |
-
|
107 |
-
font-size: 11px;
|
108 |
text-align: center;
|
109 |
background: #f8f8f9;
|
110 |
}
|
|
|
|
|
|
|
111 |
.ab-column select[multiple] {
|
112 |
-
width:
|
113 |
-
height:
|
114 |
}
|
115 |
.ab-column input.ab-mini-field {
|
116 |
-
width:
|
117 |
}
|
118 |
-
.ab-column
|
119 |
-
width:
|
|
|
120 |
}
|
121 |
.ab-column input[type="text"] + label,
|
122 |
.ab-column select + label {
|
@@ -129,7 +131,7 @@
|
|
129 |
/* @end group */
|
130 |
|
131 |
|
132 |
-
/* @group
|
133 |
|
134 |
.ab-column > ul {
|
135 |
padding: 0 20px 0 0;
|
@@ -143,9 +145,6 @@
|
|
143 |
padding: 10px 0 12px 12px;
|
144 |
position: relative;
|
145 |
background: #fff;
|
146 |
-
list-style: none;
|
147 |
-
border-radius: 3px;
|
148 |
-
white-space: nowrap;
|
149 |
}
|
150 |
|
151 |
.ab-column > ul > li a {
|
@@ -156,15 +155,11 @@
|
|
156 |
border-color: inherit;
|
157 |
}
|
158 |
|
159 |
-
.ab-column > ul > li input[type="checkbox"] {
|
160 |
-
display: inline-block;
|
161 |
-
margin: 0 8px 0 0;
|
162 |
-
}
|
163 |
.ab-column > ul > li label {
|
164 |
cursor: default;
|
165 |
display: inline-block;
|
166 |
-
overflow: hidden;
|
167 |
line-height: 24px;
|
|
|
168 |
}
|
169 |
.ab-column > ul > li label span {
|
170 |
color: #8e959c;
|
@@ -176,7 +171,7 @@
|
|
176 |
/* @end group */
|
177 |
|
178 |
|
179 |
-
/* @group
|
180 |
|
181 |
.ab-column > ul > li:after,
|
182 |
.ab-column > ul > li:before {
|
@@ -220,31 +215,33 @@
|
|
220 |
|
221 |
/* @group Submit & Service */
|
222 |
|
223 |
-
.ab-column--service {
|
224 |
width: 342px;
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
margin-right: 20px;
|
229 |
}
|
230 |
-
.ab-column--service p {
|
231 |
-
|
|
|
|
|
|
|
232 |
}
|
233 |
-
.ab-column--service
|
234 |
-
|
235 |
}
|
236 |
-
.ab-column--submit {
|
237 |
-
|
238 |
-
margin-top: 35px;
|
239 |
}
|
240 |
-
.ab-column--submit .button {
|
241 |
width: 100%;
|
|
|
242 |
}
|
243 |
|
244 |
/* @end group */
|
245 |
|
246 |
|
247 |
-
/* @group
|
248 |
|
249 |
.ab-column > ul > li:last-of-type:after,
|
250 |
.ab-column > ul > li:last-of-type:before {
|
@@ -254,7 +251,6 @@
|
|
254 |
.ab-column > ul > li > ul {
|
255 |
margin: 10px 10px 0 26px;
|
256 |
display: none;
|
257 |
-
list-style: none;
|
258 |
}
|
259 |
.ab-column > ul > li > ul li {
|
260 |
padding: 2px 0;
|
@@ -266,4 +262,4 @@
|
|
266 |
display: block;
|
267 |
}
|
268 |
|
269 |
-
/* @end group */
|
9 |
/* @end group */
|
10 |
|
11 |
|
12 |
+
/* @group General */
|
13 |
|
14 |
.ab-main *,
|
15 |
.ab-main *:after,
|
18 |
margin: 0;
|
19 |
padding: 0;
|
20 |
outline: 0;
|
|
|
21 |
-webkit-box-sizing: border-box;
|
22 |
-moz-box-sizing: border-box;
|
23 |
box-sizing: border-box;
|
38 |
/* @end group */
|
39 |
|
40 |
|
41 |
+
/* @group Columns */
|
42 |
|
43 |
.ab-wrap {
|
|
|
44 |
margin: 0 0 0 -10px;
|
45 |
padding: 20px 0 0 0;
|
46 |
text-rendering: optimizeLegibility;
|
54 |
/* @end group */
|
55 |
|
56 |
|
57 |
+
/* @group Headlines + Icons */
|
58 |
|
59 |
.ab-column h3 {
|
60 |
margin: 0;
|
97 |
/* @end group */
|
98 |
|
99 |
|
100 |
+
/* @group Form */
|
101 |
|
102 |
.ab-column input[type="text"],
|
103 |
+
.ab-column input[type="number"],
|
104 |
.ab-column select {
|
105 |
+
font-size: 12px;
|
|
|
106 |
text-align: center;
|
107 |
background: #f8f8f9;
|
108 |
}
|
109 |
+
.ab-column input[type="number"] {
|
110 |
+
padding: 0;
|
111 |
+
}
|
112 |
.ab-column select[multiple] {
|
113 |
+
width: 175px;
|
114 |
+
min-height: 60px;
|
115 |
}
|
116 |
.ab-column input.ab-mini-field {
|
117 |
+
width: 40px;
|
118 |
}
|
119 |
+
.ab-column .ab-medium-field {
|
120 |
+
width: 100%;
|
121 |
+
max-width :285px;
|
122 |
}
|
123 |
.ab-column input[type="text"] + label,
|
124 |
.ab-column select + label {
|
131 |
/* @end group */
|
132 |
|
133 |
|
134 |
+
/* @group Column contents */
|
135 |
|
136 |
.ab-column > ul {
|
137 |
padding: 0 20px 0 0;
|
145 |
padding: 10px 0 12px 12px;
|
146 |
position: relative;
|
147 |
background: #fff;
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
.ab-column > ul > li a {
|
155 |
border-color: inherit;
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
158 |
.ab-column > ul > li label {
|
159 |
cursor: default;
|
160 |
display: inline-block;
|
|
|
161 |
line-height: 24px;
|
162 |
+
max-width: 286px;
|
163 |
}
|
164 |
.ab-column > ul > li label span {
|
165 |
color: #8e959c;
|
171 |
/* @end group */
|
172 |
|
173 |
|
174 |
+
/* @group Separator */
|
175 |
|
176 |
.ab-column > ul > li:after,
|
177 |
.ab-column > ul > li:before {
|
215 |
|
216 |
/* @group Submit & Service */
|
217 |
|
218 |
+
.ab-column--submit-service {
|
219 |
width: 342px;
|
220 |
+
margin-top: 20px;
|
221 |
+
padding-right:20px;
|
222 |
+
|
|
|
223 |
}
|
224 |
+
.ab-column--submit-service p {
|
225 |
+
padding: 5px 0;
|
226 |
+
margin: 0;
|
227 |
+
text-align: center;
|
228 |
+
width: 100%;
|
229 |
}
|
230 |
+
.ab-column--submit-service p:first-of-type {
|
231 |
+
border-top: 1px solid #e0e5e9;
|
232 |
}
|
233 |
+
.ab-column--submit-service p:last-of-type {
|
234 |
+
border-bottom: 1px solid #e0e5e9;
|
|
|
235 |
}
|
236 |
+
.ab-column--submit-service .button {
|
237 |
width: 100%;
|
238 |
+
margin: 35px 0 10px;
|
239 |
}
|
240 |
|
241 |
/* @end group */
|
242 |
|
243 |
|
244 |
+
/* @group 2nd level */
|
245 |
|
246 |
.ab-column > ul > li:last-of-type:after,
|
247 |
.ab-column > ul > li:last-of-type:before {
|
251 |
.ab-column > ul > li > ul {
|
252 |
margin: 10px 10px 0 26px;
|
253 |
display: none;
|
|
|
254 |
}
|
255 |
.ab-column > ul > li > ul li {
|
256 |
padding: 2px 0;
|
262 |
display: block;
|
263 |
}
|
264 |
|
265 |
+
/* @end group */
|
css/styles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@font-face{font-family:icons;src:url(../font/icons.woff2) format('woff2'),url(../font/icons.woff) format('woff')}.ab-main *,.ab-main :after,.ab-main :before{border:0;margin:0;padding:0;outline:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.browsehappy{margin:0 0 20px;padding:10px;border:1px solid #e66f00;text-align:center}.ab-wrap{
|
1 |
+
@font-face{font-family:icons;src:url(../font/icons.woff2) format('woff2'),url(../font/icons.woff) format('woff')}.ab-main *,.ab-main :after,.ab-main :before{border:0;margin:0;padding:0;outline:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.browsehappy{margin:0 0 20px;padding:10px;border:1px solid #e66f00;text-align:center}.ab-wrap{margin:0 0 0 -10px;padding:20px 0 0;text-rendering:optimizeLegibility}.ab-column{float:left;margin:0 0 0 10px;position:relative}.ab-column h3{margin:0;font-size:14px;font-weight:400;line-height:20px;text-transform:uppercase}.ab-column h3.icon:before{font:400 30px/30px icons;top:4px;right:20px;speak:none;width:1em;color:#8e959c;position:absolute;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ab-column.ab-arrow h3.icon:before{content:'\2387'}.ab-column.ab-join h3.icon:before{content:'\e795'}.ab-column.ab-diff h3.icon:before{content:'\e73c'}.ab-column h6{clear:both;color:#8e959c;margin:0 0 20px;font-size:10px;font-weight:400;text-transform:uppercase}.ab-column input[type=text],.ab-column input[type=number],.ab-column select{font-size:12px;text-align:center;background:#f8f8f9}.ab-column input[type=number]{padding:0}.ab-column select[multiple]{width:175px;min-height:60px}.ab-column input.ab-mini-field{width:40px}.ab-column .ab-medium-field{width:100%;max-width:285px}.ab-column input[type=text]+label,.ab-column select+label{color:#8e959c;margin:0 0 0 7px;display:inline-block;text-transform:uppercase}.ab-column>ul{padding:0 20px 0 0}.ab-column:last-of-type>ul{border:0}.ab-column>ul>li{width:330px;margin:0 0 36px;padding:10px 0 12px 12px;position:relative;background:#fff}.ab-column>ul>li a{text-decoration:none;border-bottom:1px dotted #e0e5e9}.ab-column>ul>li a:hover{border-color:inherit}.ab-column>ul>li label{cursor:default;display:inline-block;line-height:24px;max-width:286px}.ab-column>ul>li label span{color:#8e959c;display:block;font-size:12px;line-height:16px}.ab-column>ul>li:after,.ab-column>ul>li:before{width:0;content:'';position:absolute}.ab-column.ab-arrow>ul>li:after,.ab-column.ab-arrow>ul>li:before{left:157px;border-width:10px 10px 0;border-style:solid}.ab-column.ab-arrow>ul>li:before{bottom:-24px;border-color:#fff transparent}.ab-column.ab-arrow>ul>li:after{bottom:-22px;border-color:#f1f1f1 transparent}.ab-column.ab-join>ul>li:before{left:171px;bottom:-27px;height:18px;border-right:2px solid #fff}.ab-column.ab-diff>ul>li:before{left:162px;bottom:-19px;width:18px;height:0;border-bottom:2px solid #fff}.ab-column--submit-service{width:342px;margin-top:20px;padding-right:20px}.ab-column--submit-service p{padding:5px 0;margin:0;text-align:center;width:100%}.ab-column--submit-service p:first-of-type{border-top:1px solid #e0e5e9}.ab-column--submit-service p:last-of-type{border-bottom:1px solid #e0e5e9}.ab-column--submit-service .button{width:100%;margin:35px 0 10px}.ab-column>ul>li:last-of-type:after,.ab-column>ul>li:last-of-type:before{display:none}.ab-column>ul>li>ul{margin:10px 10px 0 26px;display:none}.ab-column>ul>li>ul li{padding:2px 0}.ab-column>ul>li>ul label{margin:0 0 0 7px}.ab-column>ul>li>input[type=checkbox]:checked~ul{display:block}
|
inc/columns.class.php
CHANGED
@@ -1,13 +1,9 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
|
3 |
|
4 |
-
|
5 |
-
defined('ABSPATH') OR exit;
|
6 |
-
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Antispam_Bee_Columns
|
10 |
-
*/
|
11 |
|
12 |
final class Antispam_Bee_Columns {
|
13 |
|
@@ -45,25 +41,22 @@ final class Antispam_Bee_Columns {
|
|
45 |
|
46 |
public static function print_plugin_column($column, $comment_id)
|
47 |
{
|
48 |
-
|
49 |
if ( $column !== 'antispam_bee_reason' ) {
|
50 |
return;
|
51 |
}
|
52 |
|
53 |
-
|
54 |
$spam_reason = get_comment_meta($comment_id, $column, true);
|
55 |
$spam_reasons = Antispam_Bee::$defaults['reasons'];
|
56 |
|
57 |
-
|
58 |
if ( empty($spam_reason) OR empty($spam_reasons[$spam_reason]) ) {
|
59 |
return;
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
echo
|
64 |
-
$spam_reasons[$spam_reason],
|
65 |
-
'antispam-bee'
|
66 |
-
);
|
67 |
}
|
68 |
|
69 |
|
@@ -96,15 +89,15 @@ final class Antispam_Bee_Columns {
|
|
96 |
|
97 |
public static function set_orderby_query($query)
|
98 |
{
|
99 |
-
|
100 |
$orderby = $query->get('orderby');
|
101 |
|
102 |
-
|
103 |
if ( empty($orderby) OR $orderby !== 'antispam_bee_reason' ) {
|
104 |
return;
|
105 |
}
|
106 |
|
107 |
-
|
108 |
$query->set( 'meta_key', 'antispam_bee_reason' );
|
109 |
$query->set( 'orderby', 'meta_value' );
|
110 |
}
|
1 |
<?php
|
2 |
+
// Make sure this file is only run from within the WordPress context.
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
|
6 |
+
// Antispam_Bee_Columns
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
final class Antispam_Bee_Columns {
|
9 |
|
41 |
|
42 |
public static function print_plugin_column($column, $comment_id)
|
43 |
{
|
44 |
+
// Only Antispam Bee column
|
45 |
if ( $column !== 'antispam_bee_reason' ) {
|
46 |
return;
|
47 |
}
|
48 |
|
49 |
+
// Init data
|
50 |
$spam_reason = get_comment_meta($comment_id, $column, true);
|
51 |
$spam_reasons = Antispam_Bee::$defaults['reasons'];
|
52 |
|
53 |
+
// Empty values?
|
54 |
if ( empty($spam_reason) OR empty($spam_reasons[$spam_reason]) ) {
|
55 |
return;
|
56 |
}
|
57 |
|
58 |
+
// Escape & Print
|
59 |
+
echo esc_html( $spam_reasons[$spam_reason] );
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
|
89 |
|
90 |
public static function set_orderby_query($query)
|
91 |
{
|
92 |
+
// Order by value
|
93 |
$orderby = $query->get('orderby');
|
94 |
|
95 |
+
// Skip if not our case
|
96 |
if ( empty($orderby) OR $orderby !== 'antispam_bee_reason' ) {
|
97 |
return;
|
98 |
}
|
99 |
|
100 |
+
// Set orderby values
|
101 |
$query->set( 'meta_key', 'antispam_bee_reason' );
|
102 |
$query->set( 'orderby', 'meta_value' );
|
103 |
}
|
inc/gui.class.php
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
/* Sicherheitsabfrage */
|
5 |
-
if ( ! class_exists('Antispam_Bee') ) {
|
6 |
-
die();
|
7 |
-
}
|
8 |
|
9 |
|
10 |
/**
|
@@ -17,28 +13,28 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
17 |
|
18 |
|
19 |
/**
|
20 |
-
*
|
21 |
*
|
22 |
* @since 0.1
|
23 |
-
* @change 2.
|
24 |
*/
|
25 |
|
26 |
public static function save_changes()
|
27 |
{
|
28 |
-
|
29 |
if ( empty($_POST) ) {
|
30 |
-
wp_die(
|
31 |
}
|
32 |
|
33 |
-
|
34 |
if ( ! current_user_can('manage_options') ) {
|
35 |
-
wp_die(
|
36 |
}
|
37 |
|
38 |
-
|
39 |
check_admin_referer('_antispam_bee__settings_nonce');
|
40 |
-
|
41 |
-
|
42 |
$options = array(
|
43 |
'flag_spam' => (int)(!empty($_POST['ab_flag_spam'])),
|
44 |
'email_notify' => (int)(!empty($_POST['ab_email_notify'])),
|
@@ -65,30 +61,75 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
65 |
|
66 |
'bbcode_check' => (int)(!empty($_POST['ab_bbcode_check'])),
|
67 |
'gravatar_check' => (int)(!empty($_POST['ab_gravatar_check'])),
|
68 |
-
'dnsbl_check' => (int)(!empty($_POST['ab_dnsbl_check']))
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
);
|
70 |
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
if ( empty($options['cronjob_interval']) ) {
|
73 |
$options['cronjob_enable'] = 0;
|
74 |
}
|
75 |
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
if ( empty($options['reasons_enable']) ) {
|
78 |
$options['ignore_reasons'] = array();
|
79 |
}
|
80 |
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
if ( $options['cronjob_enable'] && !self::get_option('cronjob_enable') ) {
|
83 |
self::init_scheduled_hook();
|
84 |
} else if ( !$options['cronjob_enable'] && self::get_option('cronjob_enable') ) {
|
85 |
self::clear_scheduled_hook();
|
86 |
}
|
87 |
|
88 |
-
|
89 |
self::update_options($options);
|
90 |
|
91 |
-
|
92 |
wp_safe_redirect(
|
93 |
add_query_arg(
|
94 |
array(
|
@@ -103,28 +144,28 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
103 |
|
104 |
|
105 |
/**
|
106 |
-
*
|
107 |
*
|
108 |
* @since 2.4.5
|
109 |
* @change 2.4.5
|
110 |
*
|
111 |
-
* @param string $name Name
|
112 |
-
* @param array $data Array
|
113 |
-
* @param string $selected
|
114 |
-
* @return string $html
|
115 |
*/
|
116 |
|
117 |
private static function _build_select($name, $data, $selected)
|
118 |
{
|
119 |
-
|
120 |
$html = '<select name="' .$name. '">';
|
121 |
|
122 |
-
|
123 |
foreach( $data as $k => $v) {
|
124 |
-
$html .= '<option value="' .esc_attr($k). '" ' .selected($selected, $k, false). '>' .
|
125 |
}
|
126 |
|
127 |
-
|
128 |
$html .= '</select>';
|
129 |
|
130 |
return $html;
|
@@ -132,10 +173,10 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
132 |
|
133 |
|
134 |
/**
|
135 |
-
*
|
136 |
*
|
137 |
* @since 0.1
|
138 |
-
* @change 2.
|
139 |
*/
|
140 |
|
141 |
public static function options_page() { ?>
|
@@ -150,7 +191,6 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
150 |
<?php wp_nonce_field('_antispam_bee__settings_nonce') ?>
|
151 |
|
152 |
<?php $options = self::get_options() ?>
|
153 |
-
|
154 |
<div class="ab-wrap">
|
155 |
<!--[if lt IE 9]>
|
156 |
<p class="browsehappy">
|
@@ -160,147 +200,252 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
160 |
|
161 |
<div class="ab-column ab-arrow">
|
162 |
<h3 class="icon">
|
163 |
-
<?php esc_html_e('Antispam filter', 'antispam-bee') ?>
|
164 |
</h3>
|
165 |
<h6>
|
166 |
-
<?php esc_html_e('Filter in the execution order', 'antispam-bee') ?>
|
167 |
</h6>
|
168 |
|
169 |
<ul>
|
170 |
<li>
|
171 |
<input type="checkbox" name="ab_already_commented" id="ab_already_commented" value="1" <?php checked($options['already_commented'], 1) ?> />
|
172 |
<label for="ab_already_commented">
|
173 |
-
<?php esc_html_e('Trust approved commenters', 'antispam-bee') ?>
|
174 |
-
<span><?php esc_html_e('
|
175 |
</label>
|
176 |
</li>
|
177 |
|
178 |
<li>
|
179 |
<input type="checkbox" name="ab_gravatar_check" id="ab_gravatar_check" value="1" <?php checked($options['gravatar_check'], 1) ?> />
|
180 |
<label for="ab_gravatar_check">
|
181 |
-
<?php esc_html_e('Trust commenters with a Gravatar', 'antispam-bee') ?>
|
182 |
-
<span><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
</label>
|
184 |
</li>
|
185 |
|
186 |
<li>
|
187 |
<input type="checkbox" name="ab_time_check" id="ab_time_check" value="1" <?php checked($options['time_check'], 1) ?> />
|
188 |
<label for="ab_time_check">
|
189 |
-
<?php esc_html_e('Consider the comment time', 'antispam-bee') ?>
|
190 |
-
<span><?php esc_html_e('Not recommended when using page caching', 'antispam-bee') ?></span>
|
191 |
</label>
|
192 |
</li>
|
193 |
|
194 |
<li>
|
195 |
<input type="checkbox" name="ab_bbcode_check" id="ab_bbcode_check" value="1" <?php checked($options['bbcode_check'], 1) ?> />
|
196 |
<label for="ab_bbcode_check">
|
197 |
-
<?php esc_html_e('BBCode is spam', 'antispam-bee') ?>
|
198 |
-
<span><?php esc_html_e('Review the comment contents for BBCode links', 'antispam-bee') ?></span>
|
199 |
</label>
|
200 |
</li>
|
201 |
|
202 |
<li>
|
203 |
<input type="checkbox" name="ab_advanced_check" id="ab_advanced_check" value="1" <?php checked($options['advanced_check'], 1) ?> />
|
204 |
<label for="ab_advanced_check">
|
205 |
-
<?php esc_html_e('Validate the ip address of commenters', 'antispam-bee') ?>
|
206 |
-
<span><?php esc_html_e('
|
207 |
</label>
|
208 |
</li>
|
209 |
|
210 |
<li>
|
211 |
<input type="checkbox" name="ab_regexp_check" id="ab_regexp_check" value="1" <?php checked($options['regexp_check'], 1) ?> />
|
212 |
<label for="ab_regexp_check">
|
213 |
-
<?php esc_html_e('Use regular expressions', 'antispam-bee') ?>
|
214 |
-
<span><?php
|
215 |
</label>
|
216 |
</li>
|
217 |
|
218 |
<li>
|
219 |
<input type="checkbox" name="ab_spam_ip" id="ab_spam_ip" value="1" <?php checked($options['spam_ip'], 1) ?> />
|
220 |
<label for="ab_spam_ip">
|
221 |
-
<?php esc_html_e('Look in the local spam database', 'antispam-bee') ?>
|
222 |
-
<span><?php esc_html_e('
|
223 |
</label>
|
224 |
</li>
|
225 |
|
226 |
<li>
|
227 |
<input type="checkbox" name="ab_dnsbl_check" id="ab_dnsbl_check" value="1" <?php checked($options['dnsbl_check'], 1) ?> />
|
228 |
<label for="ab_dnsbl_check">
|
229 |
-
<?php esc_html_e('Use a public antispam database', 'antispam-bee') ?>
|
230 |
-
<span><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
</label>
|
232 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
</ul>
|
234 |
</div>
|
235 |
|
236 |
|
237 |
<div class="ab-column ab-join">
|
238 |
<h3 class="icon advanced">
|
239 |
-
<?php esc_html_e('Advanced', 'antispam-bee') ?>
|
240 |
</h3>
|
241 |
<h6>
|
242 |
-
<?php esc_html_e('Other antispam tools', 'antispam-bee') ?>
|
243 |
</h6>
|
244 |
|
245 |
<ul>
|
246 |
<li>
|
247 |
<input type="checkbox" name="ab_flag_spam" id="ab_flag_spam" value="1" <?php checked($options['flag_spam'], 1) ?> />
|
248 |
<label for="ab_flag_spam">
|
249 |
-
<?php esc_html_e('Mark as spam, do not delete', 'antispam-bee') ?>
|
250 |
-
<span><?php esc_html_e('Keep the spam in my blog.', 'antispam-bee') ?></span>
|
251 |
</label>
|
252 |
</li>
|
253 |
|
254 |
-
<li>
|
255 |
<input type="checkbox" name="ab_email_notify" id="ab_email_notify" value="1" <?php checked($options['email_notify'], 1) ?> />
|
256 |
<label for="ab_email_notify">
|
257 |
-
<?php esc_html_e('Notification by email', 'antispam-bee') ?>
|
258 |
-
<span><?php esc_html_e('Notify admins by e-mail about incoming spam', 'antispam-bee') ?></span>
|
259 |
</label>
|
260 |
</li>
|
261 |
|
262 |
-
<li>
|
263 |
<input type="checkbox" name="ab_no_notice" id="ab_no_notice" value="1" <?php checked($options['no_notice'], 1) ?> />
|
264 |
<label for="ab_no_notice">
|
265 |
-
<?php esc_html_e('
|
266 |
-
<span><?php esc_html_e('Spam reason as table column in the spam overview', 'antispam-bee') ?></span>
|
267 |
</label>
|
268 |
</li>
|
269 |
|
270 |
-
<li>
|
271 |
<input type="checkbox" name="ab_cronjob_enable" id="ab_cronjob_enable" value="1" <?php checked($options['cronjob_enable'], 1) ?> />
|
272 |
-
<label>
|
273 |
<?php echo sprintf(
|
274 |
-
esc_html__('Delete existing spam after %s days', 'antispam-bee'),
|
275 |
-
'<input type="
|
276 |
) ?>
|
277 |
-
<span><?php esc_html_e('Cleaning up the database from old entries', 'antispam-bee') ?></span>
|
278 |
</label>
|
279 |
</li>
|
280 |
|
281 |
-
<li>
|
282 |
<input type="checkbox" name="ab_ignore_filter" id="ab_ignore_filter" value="1" <?php checked($options['ignore_filter'], 1) ?> />
|
283 |
-
<label>
|
284 |
<?php echo sprintf(
|
285 |
-
esc_html__('Limit approval to %s', 'antispam-bee'),
|
286 |
self::_build_select(
|
287 |
'ab_ignore_type',
|
288 |
array(
|
289 |
-
1 => 'Comments',
|
290 |
-
2 => 'Pings'
|
291 |
),
|
292 |
$options['ignore_type']
|
293 |
)
|
294 |
); ?>
|
295 |
-
<span><?php esc_html_e('Other types of spam will be deleted immediately', 'antispam-bee') ?></span>
|
296 |
</label>
|
297 |
</li>
|
298 |
|
299 |
-
<li>
|
300 |
<input type="checkbox" name="ab_reasons_enable" id="ab_reasons_enable" value="1" <?php checked($options['reasons_enable'], 1) ?> />
|
301 |
<label for="ab_reasons_enable">
|
302 |
-
<?php esc_html_e('Delete comments by spam reasons', 'antispam-bee') ?>
|
303 |
-
<span><?php esc_html_e('For multiple selections press Ctrl/CMD', 'antispam-bee') ?></span>
|
304 |
</label>
|
305 |
|
306 |
<ul>
|
@@ -311,7 +456,7 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
311 |
<?php } ?>
|
312 |
</select>
|
313 |
<label for="ab_ignore_reasons">
|
314 |
-
<?php esc_html_e('Spam Reason', 'antispam-bee') ?>
|
315 |
</label>
|
316 |
</li>
|
317 |
</ul>
|
@@ -322,61 +467,62 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
322 |
|
323 |
<div class="ab-column ab-diff">
|
324 |
<h3 class="icon more">
|
325 |
-
<?php esc_html_e('More', 'antispam-bee') ?>
|
326 |
</h3>
|
327 |
<h6>
|
328 |
-
<?php esc_html_e('
|
329 |
</h6>
|
330 |
|
331 |
<ul>
|
332 |
<li>
|
333 |
<input type="checkbox" name="ab_dashboard_chart" id="ab_dashboard_chart" value="1" <?php checked($options['dashboard_chart'], 1) ?> />
|
334 |
<label for="ab_dashboard_chart">
|
335 |
-
<?php esc_html_e('
|
336 |
-
<span><?php esc_html_e('Daily updates of spam detection rate', 'antispam-bee') ?></span>
|
337 |
</label>
|
338 |
</li>
|
339 |
|
340 |
<li>
|
341 |
<input type="checkbox" name="ab_dashboard_count" id="ab_dashboard_count" value="1" <?php checked($options['dashboard_count'], 1) ?> />
|
342 |
<label for="ab_dashboard_count">
|
343 |
-
<?php esc_html_e('Spam counter on the dashboard', 'antispam-bee') ?>
|
344 |
-
<span><?php esc_html_e('Amount of identified spam comments', 'antispam-bee') ?></span>
|
345 |
</label>
|
346 |
</li>
|
347 |
|
348 |
<li>
|
349 |
<input type="checkbox" name="ab_ignore_pings" id="ab_ignore_pings" value="1" <?php checked($options['ignore_pings'], 1) ?> />
|
350 |
<label for="ab_ignore_pings">
|
351 |
-
<?php esc_html_e('Do not check trackbacks / pingbacks', 'antispam-bee') ?>
|
352 |
-
<span><?php esc_html_e('No spam check for
|
353 |
</label>
|
354 |
</li>
|
355 |
|
356 |
<li>
|
357 |
<input type="checkbox" name="ab_always_allowed" id="ab_always_allowed" value="1" <?php checked($options['always_allowed'], 1) ?> />
|
358 |
<label for="ab_always_allowed">
|
359 |
-
<?php esc_html_e('Comment form used outside of posts', 'antispam-bee') ?>
|
360 |
-
<span><?php esc_html_e('Check for comment forms on archive pages', 'antispam-bee') ?></span>
|
361 |
</label>
|
362 |
</li>
|
363 |
</ul>
|
364 |
</div>
|
365 |
|
366 |
-
<div class="ab-column ab-column--service">
|
367 |
-
<?php if ( substr( get_locale(), 0, 3 ) === 'de_' ) { ?>
|
368 |
-
<p>
|
369 |
-
<a href="https://github.com/pluginkollektiv/antispam-bee/wiki/" target="_blank">Dokumentation</a>
|
370 |
-
</p>
|
371 |
-
<?php } ?>
|
372 |
-
|
373 |
<p>
|
374 |
-
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8CH5FPR88QYML" target="_blank"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
</p>
|
376 |
-
</div>
|
377 |
|
378 |
-
|
379 |
-
<input type="submit" class="button button-primary" value="<?php _e('Save Changes', 'antispam-bee') ?>" />
|
380 |
</div>
|
381 |
</div>
|
382 |
</form>
|
1 |
<?php
|
2 |
+
// Make sure this file is only run from within the WordPress context.
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
|
|
|
|
|
|
|
|
4 |
|
5 |
|
6 |
/**
|
13 |
|
14 |
|
15 |
/**
|
16 |
+
* Save the GUI
|
17 |
*
|
18 |
* @since 0.1
|
19 |
+
* @change 2.7.0
|
20 |
*/
|
21 |
|
22 |
public static function save_changes()
|
23 |
{
|
24 |
+
// No POST?
|
25 |
if ( empty($_POST) ) {
|
26 |
+
wp_die(esc_html__('Cheatin’ uh?', 'antispam-bee'));
|
27 |
}
|
28 |
|
29 |
+
// Capability check
|
30 |
if ( ! current_user_can('manage_options') ) {
|
31 |
+
wp_die(esc_html__('Cheatin’ uh?', 'antispam-bee'));
|
32 |
}
|
33 |
|
34 |
+
// Check referer
|
35 |
check_admin_referer('_antispam_bee__settings_nonce');
|
36 |
+
|
37 |
+
// Determine options
|
38 |
$options = array(
|
39 |
'flag_spam' => (int)(!empty($_POST['ab_flag_spam'])),
|
40 |
'email_notify' => (int)(!empty($_POST['ab_email_notify'])),
|
61 |
|
62 |
'bbcode_check' => (int)(!empty($_POST['ab_bbcode_check'])),
|
63 |
'gravatar_check' => (int)(!empty($_POST['ab_gravatar_check'])),
|
64 |
+
'dnsbl_check' => (int)(!empty($_POST['ab_dnsbl_check'])),
|
65 |
+
'country_code' => (int)(!empty($_POST['ab_country_code'])),
|
66 |
+
'country_black' => sanitize_text_field( wp_unslash( self::get_key( $_POST, 'ab_country_black' ) ) ),
|
67 |
+
'country_white' => sanitize_text_field( wp_unslash( self::get_key( $_POST, 'ab_country_white' ) ) ),
|
68 |
+
|
69 |
+
'translate_api' => (int)(!empty($_POST['ab_translate_api'])),
|
70 |
+
'translate_lang' => sanitize_text_field( wp_unslash( self::get_key($_POST, 'ab_translate_lang' ) ) ),
|
71 |
);
|
72 |
|
73 |
+
foreach( $options['ignore_reasons'] as $key => $val ) {
|
74 |
+
if ( ! isset( self::$defaults['reasons'][ $val ] ) ) {
|
75 |
+
unset( $options['ignore_reasons'][ $key ] );
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
// No number of days indicated?
|
80 |
if ( empty($options['cronjob_interval']) ) {
|
81 |
$options['cronjob_enable'] = 0;
|
82 |
}
|
83 |
|
84 |
+
// Translate API
|
85 |
+
if ( !empty($options['translate_lang']) ) {
|
86 |
+
if ( !preg_match('/^(de|en|fr|it|es)$/', $options['translate_lang']) ) {
|
87 |
+
$options['translate_lang'] = '';
|
88 |
+
}
|
89 |
+
}
|
90 |
+
if ( empty($options['translate_lang']) ) {
|
91 |
+
$options['translate_api'] = 0;
|
92 |
+
}
|
93 |
+
|
94 |
+
// List of spam reasons
|
95 |
if ( empty($options['reasons_enable']) ) {
|
96 |
$options['ignore_reasons'] = array();
|
97 |
}
|
98 |
|
99 |
+
// Blacklist clean
|
100 |
+
if ( !empty($options['country_black']) ) {
|
101 |
+
$options['country_black'] = preg_replace(
|
102 |
+
'/[^A-Z ,;]/',
|
103 |
+
'',
|
104 |
+
strtoupper($options['country_black'])
|
105 |
+
);
|
106 |
+
}
|
107 |
+
|
108 |
+
// Whitelist clean
|
109 |
+
if ( !empty($options['country_white']) ) {
|
110 |
+
$options['country_white'] = preg_replace(
|
111 |
+
'/[^A-Z ,;]/',
|
112 |
+
'',
|
113 |
+
strtoupper($options['country_white'])
|
114 |
+
);
|
115 |
+
}
|
116 |
+
|
117 |
+
// Empty lists?
|
118 |
+
if ( empty($options['country_black']) && empty($options['country_white']) ) {
|
119 |
+
$options['country_code'] = 0;
|
120 |
+
}
|
121 |
+
|
122 |
+
// Stop Cron?
|
123 |
if ( $options['cronjob_enable'] && !self::get_option('cronjob_enable') ) {
|
124 |
self::init_scheduled_hook();
|
125 |
} else if ( !$options['cronjob_enable'] && self::get_option('cronjob_enable') ) {
|
126 |
self::clear_scheduled_hook();
|
127 |
}
|
128 |
|
129 |
+
// Save options
|
130 |
self::update_options($options);
|
131 |
|
132 |
+
// Redirect
|
133 |
wp_safe_redirect(
|
134 |
add_query_arg(
|
135 |
array(
|
144 |
|
145 |
|
146 |
/**
|
147 |
+
* Generation of a selectbox
|
148 |
*
|
149 |
* @since 2.4.5
|
150 |
* @change 2.4.5
|
151 |
*
|
152 |
+
* @param string $name Name of the Selectbox
|
153 |
+
* @param array $data Array with values
|
154 |
+
* @param string $selected Selected value
|
155 |
+
* @return string $html Generated HTML
|
156 |
*/
|
157 |
|
158 |
private static function _build_select($name, $data, $selected)
|
159 |
{
|
160 |
+
// Start HTML
|
161 |
$html = '<select name="' .$name. '">';
|
162 |
|
163 |
+
// Loop options
|
164 |
foreach( $data as $k => $v) {
|
165 |
+
$html .= '<option value="' .esc_attr($k). '" ' .selected($selected, $k, false). '>' .esc_html( $v ). '</option>';
|
166 |
}
|
167 |
|
168 |
+
// Close HTML
|
169 |
$html .= '</select>';
|
170 |
|
171 |
return $html;
|
173 |
|
174 |
|
175 |
/**
|
176 |
+
* Display the GUI
|
177 |
*
|
178 |
* @since 0.1
|
179 |
+
* @change 2.7.0
|
180 |
*/
|
181 |
|
182 |
public static function options_page() { ?>
|
191 |
<?php wp_nonce_field('_antispam_bee__settings_nonce') ?>
|
192 |
|
193 |
<?php $options = self::get_options() ?>
|
|
|
194 |
<div class="ab-wrap">
|
195 |
<!--[if lt IE 9]>
|
196 |
<p class="browsehappy">
|
200 |
|
201 |
<div class="ab-column ab-arrow">
|
202 |
<h3 class="icon">
|
203 |
+
<?php esc_html_e( 'Antispam filter', 'antispam-bee' ); ?>
|
204 |
</h3>
|
205 |
<h6>
|
206 |
+
<?php esc_html_e( 'Filter in the execution order', 'antispam-bee' ); ?>
|
207 |
</h6>
|
208 |
|
209 |
<ul>
|
210 |
<li>
|
211 |
<input type="checkbox" name="ab_already_commented" id="ab_already_commented" value="1" <?php checked($options['already_commented'], 1) ?> />
|
212 |
<label for="ab_already_commented">
|
213 |
+
<?php esc_html_e( 'Trust approved commenters', 'antispam-bee' ); ?>
|
214 |
+
<span><?php esc_html_e( 'No review of already commented users', 'antispam-bee' ); ?></span>
|
215 |
</label>
|
216 |
</li>
|
217 |
|
218 |
<li>
|
219 |
<input type="checkbox" name="ab_gravatar_check" id="ab_gravatar_check" value="1" <?php checked($options['gravatar_check'], 1) ?> />
|
220 |
<label for="ab_gravatar_check">
|
221 |
+
<?php esc_html_e( 'Trust commenters with a Gravatar', 'antispam-bee' ); ?>
|
222 |
+
<span><?php $link1 = sprintf(
|
223 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer">',
|
224 |
+
esc_url( __( 'https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#trust-commenters-with-a-gravatar', 'antispam-bee' ),
|
225 |
+
'https' )
|
226 |
+
);
|
227 |
+
printf(
|
228 |
+
/* translators: 1: opening <a> tag with link to documentation. 2: closing </a> tag */
|
229 |
+
esc_html__( 'Check if commenter has a Gravatar image. Please note the %1$ssprivacy notice%2$s for this option.', 'antispam-bee' ),
|
230 |
+
$link1,
|
231 |
+
'</a>'
|
232 |
+
); ?></span>
|
233 |
</label>
|
234 |
</li>
|
235 |
|
236 |
<li>
|
237 |
<input type="checkbox" name="ab_time_check" id="ab_time_check" value="1" <?php checked($options['time_check'], 1) ?> />
|
238 |
<label for="ab_time_check">
|
239 |
+
<?php esc_html_e( 'Consider the comment time', 'antispam-bee' ); ?>
|
240 |
+
<span><?php esc_html_e( 'Not recommended when using page caching', 'antispam-bee' ); ?></span>
|
241 |
</label>
|
242 |
</li>
|
243 |
|
244 |
<li>
|
245 |
<input type="checkbox" name="ab_bbcode_check" id="ab_bbcode_check" value="1" <?php checked($options['bbcode_check'], 1) ?> />
|
246 |
<label for="ab_bbcode_check">
|
247 |
+
<?php esc_html_e( 'BBCode is spam', 'antispam-bee' ); ?>
|
248 |
+
<span><?php esc_html_e( 'Review the comment contents for BBCode links', 'antispam-bee' ); ?></span>
|
249 |
</label>
|
250 |
</li>
|
251 |
|
252 |
<li>
|
253 |
<input type="checkbox" name="ab_advanced_check" id="ab_advanced_check" value="1" <?php checked($options['advanced_check'], 1) ?> />
|
254 |
<label for="ab_advanced_check">
|
255 |
+
<?php esc_html_e( 'Validate the ip address of commenters', 'antispam-bee' ); ?>
|
256 |
+
<span><?php esc_html_e( 'Validation of the IP address used', 'antispam-bee' ); ?></span>
|
257 |
</label>
|
258 |
</li>
|
259 |
|
260 |
<li>
|
261 |
<input type="checkbox" name="ab_regexp_check" id="ab_regexp_check" value="1" <?php checked($options['regexp_check'], 1) ?> />
|
262 |
<label for="ab_regexp_check">
|
263 |
+
<?php esc_html_e( 'Use regular expressions', 'antispam-bee' ); ?>
|
264 |
+
<span><?php esc_html_e( 'Predefined and custom patterns by plugin hook', 'antispam-bee' ); ?></span>
|
265 |
</label>
|
266 |
</li>
|
267 |
|
268 |
<li>
|
269 |
<input type="checkbox" name="ab_spam_ip" id="ab_spam_ip" value="1" <?php checked($options['spam_ip'], 1) ?> />
|
270 |
<label for="ab_spam_ip">
|
271 |
+
<?php esc_html_e( 'Look in the local spam database', 'antispam-bee' ); ?>
|
272 |
+
<span><?php esc_html_e( 'Check for spam data on your own blog', 'antispam-bee' ); ?></span>
|
273 |
</label>
|
274 |
</li>
|
275 |
|
276 |
<li>
|
277 |
<input type="checkbox" name="ab_dnsbl_check" id="ab_dnsbl_check" value="1" <?php checked($options['dnsbl_check'], 1) ?> />
|
278 |
<label for="ab_dnsbl_check">
|
279 |
+
<?php esc_html_e( 'Use a public antispam database', 'antispam-bee' ); ?>
|
280 |
+
<span><?php $link2 = sprintf(
|
281 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer">',
|
282 |
+
esc_url( __( 'https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#trust-commenters-with-a-gravatar', 'antispam-bee' ),
|
283 |
+
'https' )
|
284 |
+
);
|
285 |
+
printf(
|
286 |
+
/* translators: 1: opening <a> tag with link to documentation. 2: closing </a> tag. 3: opening <a> tag with link to documentation. 4: closing </a> tag. */
|
287 |
+
esc_html__( 'Matching the ip address with %1$sStop Forum Spam%2$s. Please note the %3$sprivacy notice%4$s for this option.', 'antispam-bee' ),
|
288 |
+
'<a href="https://www.stopforumspam.com/" target="_blank" rel="noopener noreferrer">',
|
289 |
+
'</a>',
|
290 |
+
$link2,
|
291 |
+
'</a>'
|
292 |
+
);
|
293 |
+
?></span>
|
294 |
</label>
|
295 |
</li>
|
296 |
+
|
297 |
+
<li>
|
298 |
+
<input type="checkbox" name="ab_country_code" id="ab_country_code" value="1" <?php checked($options['country_code'], 1) ?> />
|
299 |
+
<label for="ab_country_code">
|
300 |
+
<?php esc_html_e('Block comments from specific countries', 'antispam-bee') ?>
|
301 |
+
<span><?php $link1 = sprintf(
|
302 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer">',
|
303 |
+
esc_url( __( 'https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#block-comments-from-specific-countries', 'antispam-bee' ),
|
304 |
+
'https' )
|
305 |
+
);
|
306 |
+
printf(
|
307 |
+
/* translators: 1: opening <a> tag with link to documentation. 2: closing </a> tag. */
|
308 |
+
esc_html__( 'Filtering the requests depending on country. Please note the %1$sprivacy notice%2$s for this option.', 'antispam-bee' ),
|
309 |
+
$link1, '</a>'
|
310 |
+
); ?></span>
|
311 |
+
</label>
|
312 |
+
|
313 |
+
<ul>
|
314 |
+
<?php $iso_codes_link = sprintf(
|
315 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer">',
|
316 |
+
esc_url( __( 'https://www.iso.org/iso/country_names_and_code_elements', 'antispam-bee' ),
|
317 |
+
'https' )
|
318 |
+
); ?>
|
319 |
+
<li>
|
320 |
+
<textarea name="ab_country_black" id="ab_country_black" class="ab-medium-field code" placeholder="<?php esc_attr_e( 'e.g. BF, SG, YE', 'antispam-bee' ); ?>"><?php echo esc_attr($options['country_black']); ?></textarea>
|
321 |
+
<label for="ab_country_black">
|
322 |
+
<span><?php
|
323 |
+
printf(
|
324 |
+
/* translators: 1: opening <a> tag with link to ISO codes reference. 2: closing </a> tag. */
|
325 |
+
esc_html__( 'Blacklist %1$sISO Codes%2$s for this option.', 'antispam-bee' ),
|
326 |
+
$iso_codes_link,
|
327 |
+
'</a>' );
|
328 |
+
?></span>
|
329 |
+
</label>
|
330 |
+
</li>
|
331 |
+
<li>
|
332 |
+
<textarea name="ab_country_white" id="ab_country_white" class="ab-medium-field code" placeholder="<?php esc_attr_e( 'e.g. BF, SG, YE', 'antispam-bee' ); ?>"><?php echo esc_attr($options['country_white']); ?></textarea>
|
333 |
+
<label for="ab_country_white">
|
334 |
+
<span><?php
|
335 |
+
printf(
|
336 |
+
/* translators: 1: opening <a> tag with link to ISO codes reference. 2: closing </a> tag. */
|
337 |
+
esc_html__( 'Whitelist %1$sISO Codes%2$s for this option.', 'antispam-bee' ),
|
338 |
+
$iso_codes_link,
|
339 |
+
'</a>' );
|
340 |
+
?></span>
|
341 |
+
</label>
|
342 |
+
</li>
|
343 |
+
</ul>
|
344 |
+
</li>
|
345 |
+
|
346 |
+
<li>
|
347 |
+
<input type="checkbox" name="ab_translate_api" id="ab_translate_api" value="1" <?php checked($options['translate_api'], 1) ?> />
|
348 |
+
<label for="ab_translate_api">
|
349 |
+
<?php esc_html_e( 'Allow comments only in certain language', 'antispam_bee' ) ?>
|
350 |
+
<span><?php
|
351 |
+
$link1 = sprintf(
|
352 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer">',
|
353 |
+
esc_url( __( 'https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#allow-comments-only-in-certain-language', 'antispam-bee' ),
|
354 |
+
'https' )
|
355 |
+
);
|
356 |
+
|
357 |
+
printf(
|
358 |
+
/* translators: 1: opening <a> tag with link to documentation. 2: closing </a> tag. */
|
359 |
+
esc_html__( 'Detect and approve only the specified language. Please note the %1$sprivacy notice%2$s for this option.', 'antispam-bee' ),
|
360 |
+
$link1,
|
361 |
+
'</a>' );
|
362 |
+
?></span>
|
363 |
+
</label>
|
364 |
+
|
365 |
+
<ul>
|
366 |
+
<li>
|
367 |
+
<select name="ab_translate_lang">
|
368 |
+
<?php foreach( array('de' => 'German', 'en' => 'English', 'fr' => 'French', 'it' => 'Italian', 'es' => 'Spanish') as $k => $v ) { ?>
|
369 |
+
<option <?php selected($options['translate_lang'], $k); ?> value="<?php echo esc_attr($k) ?>"><?php esc_html_e($v, 'antispam_bee') ?></option>
|
370 |
+
<?php } ?>
|
371 |
+
</select>
|
372 |
+
<label for="ab_translate_lang">
|
373 |
+
<?php esc_html_e('Language', 'antispam_bee') ?>
|
374 |
+
</label>
|
375 |
+
</li>
|
376 |
+
</ul>
|
377 |
+
</li>
|
378 |
</ul>
|
379 |
</div>
|
380 |
|
381 |
|
382 |
<div class="ab-column ab-join">
|
383 |
<h3 class="icon advanced">
|
384 |
+
<?php esc_html_e( 'Advanced', 'antispam-bee' ); ?>
|
385 |
</h3>
|
386 |
<h6>
|
387 |
+
<?php esc_html_e( 'Other antispam tools', 'antispam-bee' ); ?>
|
388 |
</h6>
|
389 |
|
390 |
<ul>
|
391 |
<li>
|
392 |
<input type="checkbox" name="ab_flag_spam" id="ab_flag_spam" value="1" <?php checked($options['flag_spam'], 1) ?> />
|
393 |
<label for="ab_flag_spam">
|
394 |
+
<?php esc_html_e( 'Mark as spam, do not delete', 'antispam-bee' ); ?>
|
395 |
+
<span><?php esc_html_e( 'Keep the spam in my blog.', 'antispam-bee' ); ?></span>
|
396 |
</label>
|
397 |
</li>
|
398 |
|
399 |
+
<li class="ab_flag_spam_child">
|
400 |
<input type="checkbox" name="ab_email_notify" id="ab_email_notify" value="1" <?php checked($options['email_notify'], 1) ?> />
|
401 |
<label for="ab_email_notify">
|
402 |
+
<?php esc_html_e( 'Spam-Notification by email', 'antispam-bee' ); ?>
|
403 |
+
<span><?php esc_html_e( 'Notify admins by e-mail about incoming spam', 'antispam-bee' ); ?></span>
|
404 |
</label>
|
405 |
</li>
|
406 |
|
407 |
+
<li class="ab_flag_spam_child">
|
408 |
<input type="checkbox" name="ab_no_notice" id="ab_no_notice" value="1" <?php checked($options['no_notice'], 1) ?> />
|
409 |
<label for="ab_no_notice">
|
410 |
+
<?php esc_html_e( 'Do not save the spam reason', 'antispam-bee' ); ?>
|
411 |
+
<span><?php esc_html_e( 'Spam reason as a table column in the spam overview', 'antispam-bee' ); ?></span>
|
412 |
</label>
|
413 |
</li>
|
414 |
|
415 |
+
<li class="ab_flag_spam_child">
|
416 |
<input type="checkbox" name="ab_cronjob_enable" id="ab_cronjob_enable" value="1" <?php checked($options['cronjob_enable'], 1) ?> />
|
417 |
+
<label for="ab_cronjob_enable">
|
418 |
<?php echo sprintf(
|
419 |
+
esc_html__( 'Delete existing spam after %s days', 'antispam-bee' ),
|
420 |
+
'<input type="number" min="0" name="ab_cronjob_interval" value="' .esc_attr($options['cronjob_interval']). '" class="ab-mini-field" />'
|
421 |
) ?>
|
422 |
+
<span><?php esc_html_e( 'Cleaning up the database from old entries', 'antispam-bee' ) ?></span>
|
423 |
</label>
|
424 |
</li>
|
425 |
|
426 |
+
<li class="ab_flag_spam_child">
|
427 |
<input type="checkbox" name="ab_ignore_filter" id="ab_ignore_filter" value="1" <?php checked($options['ignore_filter'], 1) ?> />
|
428 |
+
<label for="ab_ignore_filter">
|
429 |
<?php echo sprintf(
|
430 |
+
esc_html__( 'Limit approval to %s', 'antispam-bee' ),
|
431 |
self::_build_select(
|
432 |
'ab_ignore_type',
|
433 |
array(
|
434 |
+
1 => esc_attr__( 'Comments', 'antispam-bee' ),
|
435 |
+
2 => esc_attr__( 'Pings', 'antispam-bee' )
|
436 |
),
|
437 |
$options['ignore_type']
|
438 |
)
|
439 |
); ?>
|
440 |
+
<span><?php esc_html_e( 'Other types of spam will be deleted immediately', 'antispam-bee' ); ?></span>
|
441 |
</label>
|
442 |
</li>
|
443 |
|
444 |
+
<li class="ab_flag_spam_child">
|
445 |
<input type="checkbox" name="ab_reasons_enable" id="ab_reasons_enable" value="1" <?php checked($options['reasons_enable'], 1) ?> />
|
446 |
<label for="ab_reasons_enable">
|
447 |
+
<?php esc_html_e( 'Delete comments by spam reasons', 'antispam-bee' ); ?>
|
448 |
+
<span><?php esc_html_e( 'For multiple selections press Ctrl/CMD', 'antispam-bee' ); ?></span>
|
449 |
</label>
|
450 |
|
451 |
<ul>
|
456 |
<?php } ?>
|
457 |
</select>
|
458 |
<label for="ab_ignore_reasons">
|
459 |
+
<?php esc_html_e( 'Spam Reason', 'antispam-bee' ); ?>
|
460 |
</label>
|
461 |
</li>
|
462 |
</ul>
|
467 |
|
468 |
<div class="ab-column ab-diff">
|
469 |
<h3 class="icon more">
|
470 |
+
<?php esc_html_e( 'More', 'antispam-bee' ); ?>
|
471 |
</h3>
|
472 |
<h6>
|
473 |
+
<?php esc_html_e( 'Various options', 'antispam-bee' ); ?>
|
474 |
</h6>
|
475 |
|
476 |
<ul>
|
477 |
<li>
|
478 |
<input type="checkbox" name="ab_dashboard_chart" id="ab_dashboard_chart" value="1" <?php checked($options['dashboard_chart'], 1) ?> />
|
479 |
<label for="ab_dashboard_chart">
|
480 |
+
<?php esc_html_e( 'Generate statistics as a dashboard widget', 'antispam-bee' ); ?>
|
481 |
+
<span><?php esc_html_e( 'Daily updates of spam detection rate', 'antispam-bee' ); ?></span>
|
482 |
</label>
|
483 |
</li>
|
484 |
|
485 |
<li>
|
486 |
<input type="checkbox" name="ab_dashboard_count" id="ab_dashboard_count" value="1" <?php checked($options['dashboard_count'], 1) ?> />
|
487 |
<label for="ab_dashboard_count">
|
488 |
+
<?php esc_html_e( 'Spam counter on the dashboard', 'antispam-bee' ); ?>
|
489 |
+
<span><?php esc_html_e( 'Amount of identified spam comments', 'antispam-bee' ); ?></span>
|
490 |
</label>
|
491 |
</li>
|
492 |
|
493 |
<li>
|
494 |
<input type="checkbox" name="ab_ignore_pings" id="ab_ignore_pings" value="1" <?php checked($options['ignore_pings'], 1) ?> />
|
495 |
<label for="ab_ignore_pings">
|
496 |
+
<?php esc_html_e( 'Do not check trackbacks / pingbacks', 'antispam-bee' ); ?>
|
497 |
+
<span><?php esc_html_e( 'No spam check for link notifications', 'antispam-bee' ); ?></span>
|
498 |
</label>
|
499 |
</li>
|
500 |
|
501 |
<li>
|
502 |
<input type="checkbox" name="ab_always_allowed" id="ab_always_allowed" value="1" <?php checked($options['always_allowed'], 1) ?> />
|
503 |
<label for="ab_always_allowed">
|
504 |
+
<?php esc_html_e( 'Comment form used outside of posts', 'antispam-bee' ); ?>
|
505 |
+
<span><?php esc_html_e( 'Check for comment forms on archive pages', 'antispam-bee' ); ?></span>
|
506 |
</label>
|
507 |
</li>
|
508 |
</ul>
|
509 |
</div>
|
510 |
|
511 |
+
<div class="ab-column ab-column--submit-service">
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
<p>
|
513 |
+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8CH5FPR88QYML" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Donate', 'antispam-bee' ); ?></a>
|
514 |
+
</p>
|
515 |
+
<p>
|
516 |
+
<a href="<?php esc_html_e( 'https://wordpress.org/plugins/antispam-bee/faq/', 'antispam-bee' ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'FAQ', 'antispam-bee' ); ?></a>
|
517 |
+
</p>
|
518 |
+
<p>
|
519 |
+
<a href="https://github.com/pluginkollektiv/antispam-bee/wiki/" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Manual', 'antispam-bee' ); ?></a>
|
520 |
+
</p>
|
521 |
+
<p>
|
522 |
+
<a href="https://wordpress.org/support/plugin/antispam-bee" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Support', 'antispam-bee' ); ?></a>
|
523 |
</p>
|
|
|
524 |
|
525 |
+
<input type="submit" class="button button-primary" value="<?php esc_html_e( 'Save Changes', 'antispam-bee' ); ?>" />
|
|
|
526 |
</div>
|
527 |
</div>
|
528 |
</form>
|
js/dashboard.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
max = Math.max.apply(Math, data),
|
24 |
Y = (height - bottomgutter - topgutter) / max;
|
25 |
|
26 |
-
|
27 |
r
|
28 |
.text(16, 16, max)
|
29 |
.attr(
|
@@ -110,4 +110,4 @@
|
|
110 |
label[0].toFront();
|
111 |
label[1].toFront();
|
112 |
blanket.toFront();
|
113 |
-
})();
|
23 |
max = Math.max.apply(Math, data),
|
24 |
Y = (height - bottomgutter - topgutter) / max;
|
25 |
|
26 |
+
// Max value
|
27 |
r
|
28 |
.text(16, 16, max)
|
29 |
.attr(
|
110 |
label[0].toFront();
|
111 |
label[1].toFront();
|
112 |
blanket.toFront();
|
113 |
+
})();
|
js/scripts.js
CHANGED
@@ -2,11 +2,11 @@ jQuery(document).ready(
|
|
2 |
function($) {
|
3 |
function ab_flag_spam() {
|
4 |
var $$ = $('#ab_flag_spam'),
|
5 |
-
nextAll = $$.parent('li').nextAll();
|
6 |
|
7 |
nextAll.css(
|
8 |
-
'
|
9 |
-
( $$.is(':checked') ? '
|
10 |
);
|
11 |
}
|
12 |
|
@@ -17,4 +17,4 @@ jQuery(document).ready(
|
|
17 |
|
18 |
ab_flag_spam();
|
19 |
}
|
20 |
-
);
|
2 |
function($) {
|
3 |
function ab_flag_spam() {
|
4 |
var $$ = $('#ab_flag_spam'),
|
5 |
+
nextAll = $$.parent('li').nextAll( '.ab_flag_spam_child' );
|
6 |
|
7 |
nextAll.css(
|
8 |
+
'display',
|
9 |
+
( $$.is(':checked') ? 'list-item' : 'none' )
|
10 |
);
|
11 |
}
|
12 |
|
17 |
|
18 |
ab_flag_spam();
|
19 |
}
|
20 |
+
);
|
js/scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(a){function b(){var b=a("#ab_flag_spam"),c=b.parent("li").nextAll(".ab_flag_spam_child");c.css("display",b.is(":checked")?"list-item":"none")}a("#ab_flag_spam").on("change",b),b()});
|
lang/antispam-bee-fr_FR.mo
DELETED
Binary file
|
lang/antispam-bee-fr_FR.po
DELETED
@@ -1,264 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Antispam Bee\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: Tue Mar 10 2015 08:16:58 GMT+0100 (CET)\n"
|
7 |
-
"Last-Translator: glueckpress <caspar@glueckpress.com>\n"
|
8 |
-
"Language-Team: Sergej Müller\n"
|
9 |
-
"Language: French (France)\n"
|
10 |
-
"Plural-Forms: nplurals=2; plural=n > 1\n"
|
11 |
-
"MIME-Version: 1.0\n"
|
12 |
-
"Content-Type: text/plain; charset=utf-8\n"
|
13 |
-
"Content-Transfer-Encoding: 8bit\n"
|
14 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
-
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
|
16 |
-
"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
17 |
-
"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
|
18 |
-
"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
|
19 |
-
"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
|
20 |
-
"X-Poedit-Basepath: .\n"
|
21 |
-
"X-Generator: Loco - https://localise.biz/\n"
|
22 |
-
"X-Poedit-SearchPath-0: .\n"
|
23 |
-
"X-Loco-Target-Locale: fr_FR"
|
24 |
-
|
25 |
-
msgid "No data available."
|
26 |
-
msgstr "Aucune donnée disponible."
|
27 |
-
|
28 |
-
msgid "New spam comment on your post"
|
29 |
-
msgstr "Nouveau spam sur l'article"
|
30 |
-
|
31 |
-
msgid "Comment"
|
32 |
-
msgstr "Commentaire"
|
33 |
-
|
34 |
-
msgid "Type"
|
35 |
-
msgstr "Type"
|
36 |
-
|
37 |
-
msgid "Spam Reason"
|
38 |
-
msgstr "Raison de détection"
|
39 |
-
|
40 |
-
msgid "Empty Data"
|
41 |
-
msgstr "Pas de données"
|
42 |
-
|
43 |
-
msgid "CSS Hack"
|
44 |
-
msgstr "Hack CSS"
|
45 |
-
|
46 |
-
msgid "Server IP"
|
47 |
-
msgstr "IP du serveur"
|
48 |
-
|
49 |
-
msgid "Local DB Spam"
|
50 |
-
msgstr "Spam BD locale"
|
51 |
-
|
52 |
-
msgid "Comment Language"
|
53 |
-
msgstr "Langue du commentaire"
|
54 |
-
|
55 |
-
msgid "Country Check"
|
56 |
-
msgstr "Vérification du pays"
|
57 |
-
|
58 |
-
msgid "DNSBL Spam"
|
59 |
-
msgstr "Spam DNSBL"
|
60 |
-
|
61 |
-
msgid "RegExp"
|
62 |
-
msgstr "Expression régulière"
|
63 |
-
|
64 |
-
msgid "Approve it"
|
65 |
-
msgstr "Approuver"
|
66 |
-
|
67 |
-
msgid "Delete it"
|
68 |
-
msgstr "Supprimer"
|
69 |
-
|
70 |
-
msgid "Trash it"
|
71 |
-
msgstr "Dans la corbeille"
|
72 |
-
|
73 |
-
msgid "Spam list"
|
74 |
-
msgstr "Liste des spams"
|
75 |
-
|
76 |
-
msgid "Notify message by Antispam Bee"
|
77 |
-
msgstr "Message de notification par Antispam Bee"
|
78 |
-
|
79 |
-
msgid "Content removed by Antispam Bee"
|
80 |
-
msgstr "Contenu supprimé par Antispam Bee"
|
81 |
-
|
82 |
-
msgid "Last check"
|
83 |
-
msgstr "Dernière vérification"
|
84 |
-
|
85 |
-
msgid "Blocked"
|
86 |
-
msgstr "Bloqué"
|
87 |
-
|
88 |
-
msgid "Today"
|
89 |
-
msgstr "Aujourd'hui"
|
90 |
-
|
91 |
-
msgid ""
|
92 |
-
"Easy and extremely productive spam-fighting plugin with many sophisticated "
|
93 |
-
"solutions. Includes protection again trackback spam."
|
94 |
-
msgstr ""
|
95 |
-
"Extension simple et très efficace pour lutter contre les commentaires "
|
96 |
-
"indésirables comportant des solutions sophistiquées. Inclus une protection "
|
97 |
-
"contre le spam trackback."
|
98 |
-
|
99 |
-
msgid "http://antispambee.com"
|
100 |
-
msgstr "http://antispambee.com"
|
101 |
-
|
102 |
-
msgid "Comments"
|
103 |
-
msgstr "Commentaires"
|
104 |
-
|
105 |
-
msgid "Comment marked as spam"
|
106 |
-
msgstr "Commentaire marqué comme spam"
|
107 |
-
|
108 |
-
# Langues
|
109 |
-
msgid "Language"
|
110 |
-
msgstr "Langue"
|
111 |
-
|
112 |
-
msgid "English"
|
113 |
-
msgstr "Anglais"
|
114 |
-
|
115 |
-
msgid "German"
|
116 |
-
msgstr "Allemand"
|
117 |
-
|
118 |
-
msgid "French"
|
119 |
-
msgstr "Français"
|
120 |
-
|
121 |
-
msgid "Italian"
|
122 |
-
msgstr "Italien"
|
123 |
-
|
124 |
-
msgid "Spanish"
|
125 |
-
msgstr "Espagnol"
|
126 |
-
|
127 |
-
# Antispam-Filter
|
128 |
-
msgid "Antispam filter"
|
129 |
-
msgstr "Filtre antispam"
|
130 |
-
|
131 |
-
msgid "Filter in the execution order"
|
132 |
-
msgstr "Ordre d'exécution du filtrage"
|
133 |
-
|
134 |
-
msgid "Trust approved commenters"
|
135 |
-
msgstr "Faire confiance aux commentateurs approuvés"
|
136 |
-
|
137 |
-
msgid "Always approve previously approved users"
|
138 |
-
msgstr "Pas de vérification pour utilisateurs connus"
|
139 |
-
|
140 |
-
msgid "BBCode is spam"
|
141 |
-
msgstr "Le BBCode est considéré comme spam"
|
142 |
-
|
143 |
-
msgid "Review the comment contents for BBCode links"
|
144 |
-
msgstr "Rechercher les liens BBCode dans le commentaire"
|
145 |
-
|
146 |
-
msgid "Use a public antispam database"
|
147 |
-
msgstr "Banque de données de spams publique"
|
148 |
-
|
149 |
-
msgid ""
|
150 |
-
"Matching the ip address with <a href=\"https://dnsbl.tornevall.org\" "
|
151 |
-
"target=\"_blank\">Tornevall</a>"
|
152 |
-
msgstr ""
|
153 |
-
"Correspondance de l'IP en utilisant <a href=\"https://dnsbl.tornevall.org\" "
|
154 |
-
"target=\"_blank\">Tornevall</a>"
|
155 |
-
|
156 |
-
msgid "Validate the ip address of commenters"
|
157 |
-
msgstr "Valider l'adresse IP des commentateurs"
|
158 |
-
|
159 |
-
msgid "Validity check for used ip address"
|
160 |
-
msgstr "Vérification de la validité pour les IP utilisées"
|
161 |
-
|
162 |
-
msgid "Use regular expressions"
|
163 |
-
msgstr "Utiliser des expressions régulières"
|
164 |
-
|
165 |
-
msgid ""
|
166 |
-
"Predefined and custom patterns by <a href=\"https://gist.github.com/4242142\" "
|
167 |
-
"target=\"_blank\">plugin hook</a>"
|
168 |
-
msgstr ""
|
169 |
-
"Motifs prédéfinis et personnalisés par le <a href=\"https://gist.github."
|
170 |
-
"com/4242142\" target=\"_blank\">plugin hook</a>"
|
171 |
-
|
172 |
-
msgid "Look in the local spam database"
|
173 |
-
msgstr "Vérifier dans la base de données locale des spams"
|
174 |
-
|
175 |
-
msgid "Already marked as spam? Yes? No?"
|
176 |
-
msgstr "Le spam a-t-il déjà été reconnu ?"
|
177 |
-
|
178 |
-
msgid "Block comments from specific countries"
|
179 |
-
msgstr "Bloquer selon le pays"
|
180 |
-
|
181 |
-
msgid "Filtering the requests depending on country"
|
182 |
-
msgstr "Filtrage selon le pays d'origine du commentaire"
|
183 |
-
|
184 |
-
msgid "Allow comments only in certain language"
|
185 |
-
msgstr "N'accepter des commentaires qu'en une langue"
|
186 |
-
|
187 |
-
msgid "Detection and approval in specified language"
|
188 |
-
msgstr "Détection et autorisation d'une langue spécifiée"
|
189 |
-
|
190 |
-
# Erweitert
|
191 |
-
msgid "Advanced"
|
192 |
-
msgstr "Avancé"
|
193 |
-
|
194 |
-
msgid "Other antispam tools"
|
195 |
-
msgstr "Autres outils antispam"
|
196 |
-
|
197 |
-
msgid "Mark as spam, do not delete"
|
198 |
-
msgstr "Marquer comme spam et ne pas supprimer"
|
199 |
-
|
200 |
-
msgid "Keep the spam in my blog."
|
201 |
-
msgstr "Conserver le commentaire indésirable"
|
202 |
-
|
203 |
-
msgid "Notification by email"
|
204 |
-
msgstr "Notification par courriel"
|
205 |
-
|
206 |
-
msgid "Notify admins by e-mail about incoming spam"
|
207 |
-
msgstr "Avertir l'administrateur par courriel"
|
208 |
-
|
209 |
-
msgid "Not save the spam reason"
|
210 |
-
msgstr "Ne pas stocker la raison de détection"
|
211 |
-
|
212 |
-
msgid "Spam reason as table column in the spam overview"
|
213 |
-
msgstr "Raison dans la colonne du tableau d'aperçu"
|
214 |
-
|
215 |
-
#, c-format
|
216 |
-
msgid "Delete existing spam after %s days"
|
217 |
-
msgstr "Supprimer les spams après %s jours"
|
218 |
-
|
219 |
-
msgid "Cleaning up the database from old entries"
|
220 |
-
msgstr "Nettoyage de la base de données"
|
221 |
-
|
222 |
-
#, c-format
|
223 |
-
msgid "Limit approval to %s"
|
224 |
-
msgstr "Limiter aux %s"
|
225 |
-
|
226 |
-
msgid "Other types of spam will be deleted immediately"
|
227 |
-
msgstr "Autre type de spam supprimé immédiatemment"
|
228 |
-
|
229 |
-
msgid "Delete comments by spam reasons"
|
230 |
-
msgstr "Supprimer les commentaires selon détection"
|
231 |
-
|
232 |
-
msgid "For multiple selections press Ctrl/CMD"
|
233 |
-
msgstr "Choix multiples en maintenant la touche Ctrl/CMD"
|
234 |
-
|
235 |
-
# Sonstiges
|
236 |
-
msgid "More"
|
237 |
-
msgstr "Plus"
|
238 |
-
|
239 |
-
msgid "A few little things"
|
240 |
-
msgstr "Options moins significatives"
|
241 |
-
|
242 |
-
msgid "Statistics on the dashboard"
|
243 |
-
msgstr "Statistiques sur le tableau de bord"
|
244 |
-
|
245 |
-
msgid "Daily updates of spam detection rate"
|
246 |
-
msgstr "Taux de détection de spam avec valeurs quotidiennes"
|
247 |
-
|
248 |
-
msgid "Spam counter on the dashboard"
|
249 |
-
msgstr "Compteur de spam sur le tableau de bord"
|
250 |
-
|
251 |
-
msgid "Amount of identified spam comments"
|
252 |
-
msgstr "Nombre de commentaires indésirables identifiés"
|
253 |
-
|
254 |
-
msgid "Do not check trackbacks / pingbacks"
|
255 |
-
msgstr "Ignorer les trackbacks et pingbacks"
|
256 |
-
|
257 |
-
msgid "No spam check for trackback notifications"
|
258 |
-
msgstr "Pas de spam pour les notifications de trackback"
|
259 |
-
|
260 |
-
msgid "Comment form used outside of posts"
|
261 |
-
msgstr "Commentaires présents dans les archives"
|
262 |
-
|
263 |
-
msgid "Check for comment forms on archive pages"
|
264 |
-
msgstr "Vérification des commentaires dans les archives"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/antispam-bee-sl_SI.mo
DELETED
Binary file
|
lang/antispam-bee-sl_SI.po
DELETED
@@ -1,388 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Antispam Bee v2.6.6\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2015-04-20 10:27:44+0200\n"
|
7 |
-
"Last-Translator: Mitja Mihelič - mitja@arnes.si\n"
|
8 |
-
"Language-Team: ARNES\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: Slovenian\n"
|
15 |
-
"X-Poedit-Country: SLOVENIA\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: .\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#: antispam_bee.php:838
|
24 |
-
#@ antispam_bee
|
25 |
-
msgid "No data available."
|
26 |
-
msgstr "Ni podatkov."
|
27 |
-
|
28 |
-
#: antispam_bee.php:2368
|
29 |
-
#@ antispam_bee
|
30 |
-
msgid "New spam comment on your post"
|
31 |
-
msgstr "Nova nezaželena vsebina na vašem prispevku"
|
32 |
-
|
33 |
-
#: antispam_bee.php:2379
|
34 |
-
#@ antispam_bee
|
35 |
-
msgid "Type"
|
36 |
-
msgstr "Tip"
|
37 |
-
|
38 |
-
#: antispam_bee.php:2386
|
39 |
-
#: inc/columns.class.php:30
|
40 |
-
#: inc/gui.class.php:400
|
41 |
-
#@ antispam_bee
|
42 |
-
msgid "Spam Reason"
|
43 |
-
msgstr "Vzrok nezaželene oglasne vsebine"
|
44 |
-
|
45 |
-
#: antispam_bee.php:2407
|
46 |
-
#@ antispam_bee
|
47 |
-
msgid "Approve it"
|
48 |
-
msgstr "Potrdi"
|
49 |
-
|
50 |
-
#: antispam_bee.php:2401
|
51 |
-
#@ antispam_bee
|
52 |
-
msgid "Delete it"
|
53 |
-
msgstr "Izbriši"
|
54 |
-
|
55 |
-
#: antispam_bee.php:2395
|
56 |
-
#@ antispam_bee
|
57 |
-
msgid "Trash it"
|
58 |
-
msgstr "Premakni v smeti"
|
59 |
-
|
60 |
-
#: antispam_bee.php:2411
|
61 |
-
#@ antispam_bee
|
62 |
-
msgid "Spam list"
|
63 |
-
msgstr "Seznam nezaželene vsebine"
|
64 |
-
|
65 |
-
#: antispam_bee.php:2415
|
66 |
-
#@ antispam_bee
|
67 |
-
msgid "Notify message by Antispam Bee"
|
68 |
-
msgstr "Antispam Bee obvestilo"
|
69 |
-
|
70 |
-
#: antispam_bee.php:2361
|
71 |
-
#@ antispam_bee
|
72 |
-
msgid "Content removed by Antispam Bee"
|
73 |
-
msgstr "Antispam Bee je odstranil vsebino"
|
74 |
-
|
75 |
-
#: antispam_bee.php:699
|
76 |
-
#@ antispam_bee
|
77 |
-
msgid "Blocked"
|
78 |
-
msgstr "Onemogočenih"
|
79 |
-
|
80 |
-
#. translators: plugin header field 'Description'
|
81 |
-
#: antispam_bee.php:0
|
82 |
-
#@ antispam_bee
|
83 |
-
msgid "Easy and extremely productive spam-fighting plugin with many sophisticated solutions. Includes protection again trackback spam."
|
84 |
-
msgstr "Preprost, napreden in izjemno učinkovit vtičnik v boju proti nezaželeni oglasni vsebini (spam)."
|
85 |
-
|
86 |
-
#. translators: plugin header field 'PluginURI'
|
87 |
-
#: antispam_bee.php:0
|
88 |
-
#: antispam_bee.php:2416
|
89 |
-
#@ antispam_bee
|
90 |
-
msgid "http://antispambee.com"
|
91 |
-
msgstr "http://antispambee.com"
|
92 |
-
|
93 |
-
#: antispam_bee.php:2354
|
94 |
-
#@ antispam_bee
|
95 |
-
msgid "Comment marked as spam"
|
96 |
-
msgstr "Komentar označen kot nezaželena vsebina"
|
97 |
-
|
98 |
-
# Sprachen
|
99 |
-
#: inc/gui.class.php:314
|
100 |
-
#@ antispam_bee
|
101 |
-
msgid "Language"
|
102 |
-
msgstr "Jezik"
|
103 |
-
|
104 |
-
# Antispam-Filter
|
105 |
-
#: inc/gui.class.php:205
|
106 |
-
#@ antispam_bee
|
107 |
-
msgid "Antispam filter"
|
108 |
-
msgstr "Pravila Antispam"
|
109 |
-
|
110 |
-
#: inc/gui.class.php:208
|
111 |
-
#@ antispam_bee
|
112 |
-
msgid "Filter in the execution order"
|
113 |
-
msgstr "Filtri v vrstnem redu izvrševanja"
|
114 |
-
|
115 |
-
#: inc/gui.class.php:215
|
116 |
-
#@ antispam_bee
|
117 |
-
msgid "Trust approved commenters"
|
118 |
-
msgstr "Zaupanja vredni komentatorji"
|
119 |
-
|
120 |
-
#: inc/gui.class.php:216
|
121 |
-
#@ antispam_bee
|
122 |
-
msgid "Always approve previously approved users"
|
123 |
-
msgstr "Ne preverjaj avtorjev, ki so že komentirali"
|
124 |
-
|
125 |
-
#: inc/gui.class.php:239
|
126 |
-
#@ antispam_bee
|
127 |
-
msgid "BBCode is spam"
|
128 |
-
msgstr "Obravnavaj kodo BBCode kot nezaželeo vsebino"
|
129 |
-
|
130 |
-
#: inc/gui.class.php:240
|
131 |
-
#@ antispam_bee
|
132 |
-
msgid "Review the comment contents for BBCode links"
|
133 |
-
msgstr "Preveri vsebino komentarjev, če vsebujejo povezave BBCode"
|
134 |
-
|
135 |
-
#: inc/gui.class.php:271
|
136 |
-
#@ antispam_bee
|
137 |
-
msgid "Use a public antispam database"
|
138 |
-
msgstr "Uporabi javno podatkovno zbirko z nezaželeno vsebino"
|
139 |
-
|
140 |
-
#: inc/gui.class.php:272
|
141 |
-
#@ antispam_bee
|
142 |
-
msgid "Matching the ip address with <a href=\"https://dnsbl.tornevall.org\" target=\"_blank\">Tornevall</a>"
|
143 |
-
msgstr "IP naslov preveri v podatkovni bazi <a href=\"https://dnsbl.tornevall.org\" target=\"_blank\">Tornevall</a>"
|
144 |
-
|
145 |
-
#: inc/gui.class.php:247
|
146 |
-
#@ antispam_bee
|
147 |
-
msgid "Validate the ip address of commenters"
|
148 |
-
msgstr "Preveri veljavnost naslovov IP komentatorjev"
|
149 |
-
|
150 |
-
#: inc/gui.class.php:248
|
151 |
-
#@ antispam_bee
|
152 |
-
msgid "Validity check for used ip address"
|
153 |
-
msgstr "Preverjanje veljavnosti uporabljenih naslovov IP"
|
154 |
-
|
155 |
-
#: inc/gui.class.php:255
|
156 |
-
#@ antispam_bee
|
157 |
-
msgid "Use regular expressions"
|
158 |
-
msgstr "Uporabi regularne izraze"
|
159 |
-
|
160 |
-
#: inc/gui.class.php:256
|
161 |
-
#@ antispam_bee
|
162 |
-
msgid "Predefined and custom patterns by <a href=\"https://gist.github.com/4242142\" target=\"_blank\">plugin hook</a>"
|
163 |
-
msgstr "Vnaprej pripravljeni in lastni vzorci prek <a href=\"https://gist.github.com/4242142\" target=\"_blank\">vtičnika</a>"
|
164 |
-
|
165 |
-
#: inc/gui.class.php:263
|
166 |
-
#@ antispam_bee
|
167 |
-
msgid "Look in the local spam database"
|
168 |
-
msgstr "Uporabi lokalno podatkovno zbirko"
|
169 |
-
|
170 |
-
#: inc/gui.class.php:264
|
171 |
-
#@ antispam_bee
|
172 |
-
msgid "Already marked as spam? Yes? No?"
|
173 |
-
msgstr "Išči v zbriki lastnega spletišča"
|
174 |
-
|
175 |
-
#: inc/gui.class.php:279
|
176 |
-
#@ antispam_bee
|
177 |
-
msgid "Block comments from specific countries"
|
178 |
-
msgstr "Onemogoči komentarje iz določenih držav"
|
179 |
-
|
180 |
-
#: inc/gui.class.php:280
|
181 |
-
#@ antispam_bee
|
182 |
-
msgid "Filtering the requests depending on country"
|
183 |
-
msgstr "Filtriranje zahtevkov glede na državo izvora"
|
184 |
-
|
185 |
-
#: inc/gui.class.php:302
|
186 |
-
#@ antispam_bee
|
187 |
-
msgid "Allow comments only in certain language"
|
188 |
-
msgstr "Dovoli komentarje v zgolj določenih jezikih"
|
189 |
-
|
190 |
-
#: inc/gui.class.php:303
|
191 |
-
#@ antispam_bee
|
192 |
-
msgid "Detection and approval in specified language"
|
193 |
-
msgstr "Zaznavanje in odobritev v določenem jeziku"
|
194 |
-
|
195 |
-
# Erweitert
|
196 |
-
#: inc/gui.class.php:325
|
197 |
-
#@ antispam_bee
|
198 |
-
msgid "Advanced"
|
199 |
-
msgstr "Napredne nastavitve"
|
200 |
-
|
201 |
-
#: inc/gui.class.php:328
|
202 |
-
#@ antispam_bee
|
203 |
-
msgid "Other antispam tools"
|
204 |
-
msgstr "Dodatna orodja proti nezaželeni vsebini"
|
205 |
-
|
206 |
-
#: inc/gui.class.php:335
|
207 |
-
#@ antispam_bee
|
208 |
-
msgid "Mark as spam, do not delete"
|
209 |
-
msgstr "Le označi kot nezaželeno, ne izbriši"
|
210 |
-
|
211 |
-
#: inc/gui.class.php:336
|
212 |
-
#@ antispam_bee
|
213 |
-
msgid "Keep the spam in my blog."
|
214 |
-
msgstr "Obdrži nezaželeno vzebino na spletišču"
|
215 |
-
|
216 |
-
#: inc/gui.class.php:343
|
217 |
-
#@ antispam_bee
|
218 |
-
msgid "Notification by email"
|
219 |
-
msgstr "Pošlji obvestilo ob prejetju neželene vsebine"
|
220 |
-
|
221 |
-
#: inc/gui.class.php:344
|
222 |
-
#@ antispam_bee
|
223 |
-
msgid "Notify admins by e-mail about incoming spam"
|
224 |
-
msgstr "Pošiljanje obvestil administratorju"
|
225 |
-
|
226 |
-
#: inc/gui.class.php:351
|
227 |
-
#@ antispam_bee
|
228 |
-
msgid "Not save the spam reason"
|
229 |
-
msgstr "Razlog za izbris komentarja"
|
230 |
-
|
231 |
-
#: inc/gui.class.php:352
|
232 |
-
#@ antispam_bee
|
233 |
-
msgid "Spam reason as table column in the spam overview"
|
234 |
-
msgstr "Prikaži razlog v pregledu nezaželene vsebino"
|
235 |
-
|
236 |
-
#: inc/gui.class.php:360
|
237 |
-
#, c-format, php-format
|
238 |
-
#@ antispam_bee
|
239 |
-
msgid "Delete existing spam after %s days"
|
240 |
-
msgstr "Neželeno vsebino izbriši čez %s dni"
|
241 |
-
|
242 |
-
#: inc/gui.class.php:363
|
243 |
-
#@ antispam_bee
|
244 |
-
msgid "Cleaning up the database from old entries"
|
245 |
-
msgstr "Izbris starih vnosov iz podatkovne zbirke"
|
246 |
-
|
247 |
-
#: inc/gui.class.php:371
|
248 |
-
#, c-format, php-format
|
249 |
-
#@ antispam_bee
|
250 |
-
msgid "Limit approval to %s"
|
251 |
-
msgstr "Omejitev velja le za %s"
|
252 |
-
|
253 |
-
#: inc/gui.class.php:381
|
254 |
-
#@ antispam_bee
|
255 |
-
msgid "Other types of spam will be deleted immediately"
|
256 |
-
msgstr "Ostala nezaželena vsebina bo izbrisana takoj"
|
257 |
-
|
258 |
-
#: inc/gui.class.php:388
|
259 |
-
#@ antispam_bee
|
260 |
-
msgid "Delete comments by spam reasons"
|
261 |
-
msgstr "Pri vnaprej določenih pogojih izbriši takoj"
|
262 |
-
|
263 |
-
#: inc/gui.class.php:389
|
264 |
-
#@ antispam_bee
|
265 |
-
msgid "For multiple selections press Ctrl/CMD"
|
266 |
-
msgstr "S CTRL lahko izberete tudi več pogojev"
|
267 |
-
|
268 |
-
# Sonstiges
|
269 |
-
#: inc/gui.class.php:411
|
270 |
-
#@ antispam_bee
|
271 |
-
msgid "More"
|
272 |
-
msgstr "Ostale nastavitve"
|
273 |
-
|
274 |
-
#: inc/gui.class.php:414
|
275 |
-
#@ antispam_bee
|
276 |
-
msgid "A few little things"
|
277 |
-
msgstr "Manj pomembne nastavitve"
|
278 |
-
|
279 |
-
#: inc/gui.class.php:421
|
280 |
-
#@ antispam_bee
|
281 |
-
msgid "Statistics on the dashboard"
|
282 |
-
msgstr "Prikaz statistike na Nadzorni plošči"
|
283 |
-
|
284 |
-
#: inc/gui.class.php:422
|
285 |
-
#@ antispam_bee
|
286 |
-
msgid "Daily updates of spam detection rate"
|
287 |
-
msgstr "Prikaz prepoznane vsebine na dnevni ravni"
|
288 |
-
|
289 |
-
#: inc/gui.class.php:429
|
290 |
-
#@ antispam_bee
|
291 |
-
msgid "Spam counter on the dashboard"
|
292 |
-
msgstr "Prikaz števca nezaželene vsebine na Nadzorni plošči"
|
293 |
-
|
294 |
-
#: inc/gui.class.php:430
|
295 |
-
#@ antispam_bee
|
296 |
-
msgid "Amount of identified spam comments"
|
297 |
-
msgstr "Količina prepoznane nezaželene vsebine"
|
298 |
-
|
299 |
-
#: inc/gui.class.php:437
|
300 |
-
#@ antispam_bee
|
301 |
-
msgid "Do not check trackbacks / pingbacks"
|
302 |
-
msgstr "Ne preverjaj povratnih sledi/pingbackov"
|
303 |
-
|
304 |
-
#: inc/gui.class.php:438
|
305 |
-
#@ antispam_bee
|
306 |
-
msgid "No spam check for trackback notifications"
|
307 |
-
msgstr "Ne preverjaj obvestil o povratnih sledeh"
|
308 |
-
|
309 |
-
#: inc/gui.class.php:445
|
310 |
-
#@ antispam_bee
|
311 |
-
msgid "Comment form used outside of posts"
|
312 |
-
msgstr "Komentarji so omogočeni tudi izven prispevkov"
|
313 |
-
|
314 |
-
#: inc/gui.class.php:446
|
315 |
-
#@ antispam_bee
|
316 |
-
msgid "Check for comment forms on archive pages"
|
317 |
-
msgstr "Preverjanje komentarjev na arhiviranih straneh"
|
318 |
-
|
319 |
-
#. translators: plugin header field 'Name'
|
320 |
-
#: antispam_bee.php:0
|
321 |
-
#@ antispam_bee
|
322 |
-
msgid "Antispam Bee"
|
323 |
-
msgstr ""
|
324 |
-
|
325 |
-
#. translators: plugin header field 'Author'
|
326 |
-
#: antispam_bee.php:0
|
327 |
-
#@ antispam_bee
|
328 |
-
msgid "Sergej Müller"
|
329 |
-
msgstr ""
|
330 |
-
|
331 |
-
#. translators: plugin header field 'AuthorURI'
|
332 |
-
#: antispam_bee.php:0
|
333 |
-
#@ antispam_bee
|
334 |
-
msgid "http://wpcoder.de"
|
335 |
-
msgstr ""
|
336 |
-
|
337 |
-
#. translators: plugin header field 'Version'
|
338 |
-
#: antispam_bee.php:0
|
339 |
-
#@ antispam_bee
|
340 |
-
msgid "2.6.6"
|
341 |
-
msgstr ""
|
342 |
-
|
343 |
-
#: antispam_bee.php:501
|
344 |
-
#@ default
|
345 |
-
msgid "Settings"
|
346 |
-
msgstr "Nastavitve"
|
347 |
-
|
348 |
-
#: antispam_bee.php:2372
|
349 |
-
#@ default
|
350 |
-
msgid "Author"
|
351 |
-
msgstr "Avtor"
|
352 |
-
|
353 |
-
#: antispam_bee.php:2380
|
354 |
-
#@ antispam_bee
|
355 |
-
msgid "comment_typeCommentTrackback"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: inc/gui.class.php:30
|
359 |
-
#: inc/gui.class.php:35
|
360 |
-
#@ default
|
361 |
-
msgid "Cheatin’ uh?"
|
362 |
-
msgstr "Goljufate, kaj?"
|
363 |
-
|
364 |
-
#: inc/gui.class.php:223
|
365 |
-
#@ antispam_bee
|
366 |
-
msgid "Trust commenters with a Gravatar"
|
367 |
-
msgstr "Zaupaj komentatorjem, ki imajo Gravater"
|
368 |
-
|
369 |
-
#: inc/gui.class.php:224
|
370 |
-
#@ antispam_bee
|
371 |
-
msgid "Check if commenter has a Gravatar image"
|
372 |
-
msgstr "Preveri, ali ima komentrator sliko Gravatar"
|
373 |
-
|
374 |
-
#: inc/gui.class.php:231
|
375 |
-
#@ antispam_bee
|
376 |
-
msgid "Consider the comment time"
|
377 |
-
msgstr "Upoštevaj čas komentarja"
|
378 |
-
|
379 |
-
#: inc/gui.class.php:232
|
380 |
-
#@ antispam_bee
|
381 |
-
msgid "Not recommended when using page caching"
|
382 |
-
msgstr "Ni priproročljivo ob uporabi predpomnenja strani"
|
383 |
-
|
384 |
-
#: inc/gui.class.php:465
|
385 |
-
#@ default
|
386 |
-
msgid "Save Changes"
|
387 |
-
msgstr "Shrani spremembe"
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/antispam-bee-sv_SE.mo
DELETED
Binary file
|
lang/antispam-bee-sv_SE.po
DELETED
@@ -1,286 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Antispam Bee\n"
|
4 |
-
"POT-Creation-Date: 2015-04-17 12:23+0100\n"
|
5 |
-
"PO-Revision-Date: 2015-04-17 15:18+0100\n"
|
6 |
-
"Last-Translator: Sergej Müller\n"
|
7 |
-
"Language-Team: Elger Lindgren <elger@bilddigital.se>\n"
|
8 |
-
"Language: sv_SE\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.7.5\n"
|
13 |
-
"X-Poedit-Basepath: ..\n"
|
14 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
-
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
16 |
-
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
|
17 |
-
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
-
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
21 |
-
|
22 |
-
#: antispam_bee.php:501
|
23 |
-
msgid "Settings"
|
24 |
-
msgstr "Inställningar"
|
25 |
-
|
26 |
-
#: antispam_bee.php:699
|
27 |
-
msgid "Blocked"
|
28 |
-
msgstr "Blockerad"
|
29 |
-
|
30 |
-
#: antispam_bee.php:838
|
31 |
-
msgid "No data available."
|
32 |
-
msgstr "Inga data tillgängliga."
|
33 |
-
|
34 |
-
#: antispam_bee.php:2354
|
35 |
-
msgid "Comment marked as spam"
|
36 |
-
msgstr "Kommentar markeras som skräppost"
|
37 |
-
|
38 |
-
#: antispam_bee.php:2361
|
39 |
-
msgid "Content removed by Antispam Bee"
|
40 |
-
msgstr "Innehållet avlägsnades av Antispam Bee"
|
41 |
-
|
42 |
-
#: antispam_bee.php:2368
|
43 |
-
msgid "New spam comment on your post"
|
44 |
-
msgstr "Ny spam kommentar ditt inlägg"
|
45 |
-
|
46 |
-
#: antispam_bee.php:2372
|
47 |
-
msgid "Author"
|
48 |
-
msgstr "Skapare"
|
49 |
-
|
50 |
-
#: antispam_bee.php:2379
|
51 |
-
msgid "Type"
|
52 |
-
msgstr "Typ"
|
53 |
-
|
54 |
-
#: antispam_bee.php:2386 inc/columns.class.php:30 inc/gui.class.php:400
|
55 |
-
msgid "Spam Reason"
|
56 |
-
msgstr "Spam Anledning"
|
57 |
-
|
58 |
-
#: antispam_bee.php:2395
|
59 |
-
msgid "Trash it"
|
60 |
-
msgstr "Kasta det"
|
61 |
-
|
62 |
-
#: antispam_bee.php:2401
|
63 |
-
msgid "Delete it"
|
64 |
-
msgstr "Radera det"
|
65 |
-
|
66 |
-
#: antispam_bee.php:2407
|
67 |
-
msgid "Approve it"
|
68 |
-
msgstr "Godkänn det"
|
69 |
-
|
70 |
-
#: antispam_bee.php:2411
|
71 |
-
msgid "Spam list"
|
72 |
-
msgstr "Skräppostlista"
|
73 |
-
|
74 |
-
#: antispam_bee.php:2415
|
75 |
-
msgid "Notify message by Antispam Bee"
|
76 |
-
msgstr "Uppmärksammande meddelande av Antispam Bee"
|
77 |
-
|
78 |
-
#: antispam_bee.php:2416
|
79 |
-
msgid "http://antispambee.com"
|
80 |
-
msgstr "http://antispambee.com"
|
81 |
-
|
82 |
-
#: inc/gui.class.php:30 inc/gui.class.php:35
|
83 |
-
msgid "Cheatin’ uh?"
|
84 |
-
msgstr "Fuskar du eller?"
|
85 |
-
|
86 |
-
#: inc/gui.class.php:205
|
87 |
-
msgid "Antispam filter"
|
88 |
-
msgstr "Antispam-filter"
|
89 |
-
|
90 |
-
#: inc/gui.class.php:208
|
91 |
-
msgid "Filter in the execution order"
|
92 |
-
msgstr "Filter i utförandeordning"
|
93 |
-
|
94 |
-
#: inc/gui.class.php:215
|
95 |
-
msgid "Trust approved commenters"
|
96 |
-
msgstr "Lita på godkända kommenterare"
|
97 |
-
|
98 |
-
#: inc/gui.class.php:216
|
99 |
-
msgid "Always approve previously approved users"
|
100 |
-
msgstr "Godkänn alltid tidigare godkända användare"
|
101 |
-
|
102 |
-
#: inc/gui.class.php:223
|
103 |
-
msgid "Trust commenters with a Gravatar"
|
104 |
-
msgstr "Lita på kommenterare med Gravatar"
|
105 |
-
|
106 |
-
#: inc/gui.class.php:224
|
107 |
-
msgid "Check if commenter has a Gravatar image"
|
108 |
-
msgstr "Kontrollera om kommenterare har en Gravatarbild"
|
109 |
-
|
110 |
-
#: inc/gui.class.php:231
|
111 |
-
msgid "Consider the comment time"
|
112 |
-
msgstr "Tänk på kommentartiden"
|
113 |
-
|
114 |
-
#: inc/gui.class.php:232
|
115 |
-
msgid "Not recommended when using page caching"
|
116 |
-
msgstr "Rekommenderas inte om du använder sidcachning"
|
117 |
-
|
118 |
-
#: inc/gui.class.php:239
|
119 |
-
msgid "BBCode is spam"
|
120 |
-
msgstr "BBC ode är spam"
|
121 |
-
|
122 |
-
#: inc/gui.class.php:240
|
123 |
-
msgid "Review the comment contents for BBCode links"
|
124 |
-
msgstr "Granska kommentar som innehåller BBCode länkar"
|
125 |
-
|
126 |
-
#: inc/gui.class.php:247
|
127 |
-
msgid "Validate the ip address of commenters"
|
128 |
-
msgstr "Validera IP-adressen för kommenterare"
|
129 |
-
|
130 |
-
#: inc/gui.class.php:248
|
131 |
-
msgid "Validity check for used ip address"
|
132 |
-
msgstr "Giltighetskontroll för använd ip-adress"
|
133 |
-
|
134 |
-
#: inc/gui.class.php:255
|
135 |
-
msgid "Use regular expressions"
|
136 |
-
msgstr "Använd reguljära uttryck"
|
137 |
-
|
138 |
-
#: inc/gui.class.php:256
|
139 |
-
msgid ""
|
140 |
-
"Predefined and custom patterns by <a href=\"https://gist.github."
|
141 |
-
"com/4242142\" target=\"_blank\">plugin hook</a>"
|
142 |
-
msgstr ""
|
143 |
-
"Fördefinierade och anpassade mönster av <a href=\"https://gist.github."
|
144 |
-
"com/4242142\" target=\"_blank\">plugin hook</a>"
|
145 |
-
|
146 |
-
#: inc/gui.class.php:263
|
147 |
-
msgid "Look in the local spam database"
|
148 |
-
msgstr "Titta i den lokala spam databasen"
|
149 |
-
|
150 |
-
#: inc/gui.class.php:264
|
151 |
-
msgid "Already marked as spam? Yes? No?"
|
152 |
-
msgstr "Redan markerad som skräppost? Ja? Nej?"
|
153 |
-
|
154 |
-
#: inc/gui.class.php:271
|
155 |
-
msgid "Use a public antispam database"
|
156 |
-
msgstr "Använd en offentlig antispam databas"
|
157 |
-
|
158 |
-
#: inc/gui.class.php:272
|
159 |
-
msgid ""
|
160 |
-
"Matching the ip address with <a href=\"https://dnsbl.tornevall.org\" target="
|
161 |
-
"\"_blank\">Tornevall</a>"
|
162 |
-
msgstr ""
|
163 |
-
"Matcha IP-adressen med <a href=\"https://dnsbl.tornevall.org\" target="
|
164 |
-
"\"_blank\">Tornevall</a>"
|
165 |
-
|
166 |
-
#: inc/gui.class.php:279
|
167 |
-
msgid "Block comments from specific countries"
|
168 |
-
msgstr "Block kommentarer från vissa länder"
|
169 |
-
|
170 |
-
#: inc/gui.class.php:280
|
171 |
-
msgid "Filtering the requests depending on country"
|
172 |
-
msgstr "Filtrering av förfrågningar beroende på land"
|
173 |
-
|
174 |
-
#: inc/gui.class.php:302
|
175 |
-
msgid "Allow comments only in certain language"
|
176 |
-
msgstr "Tillåt kommentarer endast på vissa språk"
|
177 |
-
|
178 |
-
#: inc/gui.class.php:303
|
179 |
-
msgid "Detection and approval in specified language"
|
180 |
-
msgstr "Detektering och godkännande i angivet språk"
|
181 |
-
|
182 |
-
#: inc/gui.class.php:314
|
183 |
-
msgid "Language"
|
184 |
-
msgstr "Språk"
|
185 |
-
|
186 |
-
#: inc/gui.class.php:325
|
187 |
-
msgid "Advanced"
|
188 |
-
msgstr "Avancerat"
|
189 |
-
|
190 |
-
#: inc/gui.class.php:328
|
191 |
-
msgid "Other antispam tools"
|
192 |
-
msgstr "Andra antispam verktyg"
|
193 |
-
|
194 |
-
#: inc/gui.class.php:335
|
195 |
-
msgid "Mark as spam, do not delete"
|
196 |
-
msgstr "Markera som spam, radera inte"
|
197 |
-
|
198 |
-
#: inc/gui.class.php:336
|
199 |
-
msgid "Keep the spam in my blog."
|
200 |
-
msgstr "Behåll spam i min blogg."
|
201 |
-
|
202 |
-
#: inc/gui.class.php:343
|
203 |
-
msgid "Notification by email"
|
204 |
-
msgstr "Meddela via e-post"
|
205 |
-
|
206 |
-
#: inc/gui.class.php:344
|
207 |
-
msgid "Notify admins by e-mail about incoming spam"
|
208 |
-
msgstr "Meddela admins via e-post om inkommande spam"
|
209 |
-
|
210 |
-
#: inc/gui.class.php:351
|
211 |
-
msgid "Not save the spam reason"
|
212 |
-
msgstr "Spara inte spamorsaken"
|
213 |
-
|
214 |
-
#: inc/gui.class.php:352
|
215 |
-
msgid "Spam reason as table column in the spam overview"
|
216 |
-
msgstr "Spam-orsak som tabellkolumn i spam-översikten"
|
217 |
-
|
218 |
-
#: inc/gui.class.php:360
|
219 |
-
#, php-format
|
220 |
-
msgid "Delete existing spam after %s days"
|
221 |
-
msgstr "Radera befintliga skräppost efter %s dagar"
|
222 |
-
|
223 |
-
#: inc/gui.class.php:363
|
224 |
-
msgid "Cleaning up the database from old entries"
|
225 |
-
msgstr "Rensa upp databasen från gamla poster"
|
226 |
-
|
227 |
-
#: inc/gui.class.php:371
|
228 |
-
#, php-format
|
229 |
-
msgid "Limit approval to %s"
|
230 |
-
msgstr "Begränsa godkännande till %s"
|
231 |
-
|
232 |
-
#: inc/gui.class.php:381
|
233 |
-
msgid "Other types of spam will be deleted immediately"
|
234 |
-
msgstr "Andra typer av spam kommer att raderas omedelbart"
|
235 |
-
|
236 |
-
#: inc/gui.class.php:388
|
237 |
-
msgid "Delete comments by spam reasons"
|
238 |
-
msgstr "Radera kommentarer enligt spam-orsak"
|
239 |
-
|
240 |
-
#: inc/gui.class.php:389
|
241 |
-
msgid "For multiple selections press Ctrl/CMD"
|
242 |
-
msgstr "För flera val tryck Ctrl/CMD"
|
243 |
-
|
244 |
-
#: inc/gui.class.php:411
|
245 |
-
msgid "More"
|
246 |
-
msgstr "Mer"
|
247 |
-
|
248 |
-
#: inc/gui.class.php:414
|
249 |
-
msgid "A few little things"
|
250 |
-
msgstr "Några små saker"
|
251 |
-
|
252 |
-
#: inc/gui.class.php:421
|
253 |
-
msgid "Statistics on the dashboard"
|
254 |
-
msgstr "Statistik på instrumentbrädan"
|
255 |
-
|
256 |
-
#: inc/gui.class.php:422
|
257 |
-
msgid "Daily updates of spam detection rate"
|
258 |
-
msgstr "Daglig uppdatering av skräppostupptäckts-nivå"
|
259 |
-
|
260 |
-
#: inc/gui.class.php:429
|
261 |
-
msgid "Spam counter on the dashboard"
|
262 |
-
msgstr "Spamräknare på instrumentbrädan"
|
263 |
-
|
264 |
-
#: inc/gui.class.php:430
|
265 |
-
msgid "Amount of identified spam comments"
|
266 |
-
msgstr "Mängd identifierade spamkommentarer"
|
267 |
-
|
268 |
-
#: inc/gui.class.php:437
|
269 |
-
msgid "Do not check trackbacks / pingbacks"
|
270 |
-
msgstr "Kontrollera inte trackbacks / pingbacks"
|
271 |
-
|
272 |
-
#: inc/gui.class.php:438
|
273 |
-
msgid "No spam check for trackback notifications"
|
274 |
-
msgstr "Ingen spam check för trackbacknoteringar"
|
275 |
-
|
276 |
-
#: inc/gui.class.php:445
|
277 |
-
msgid "Comment form used outside of posts"
|
278 |
-
msgstr "Kommentarsformulär som används utanför inläggen"
|
279 |
-
|
280 |
-
#: inc/gui.class.php:446
|
281 |
-
msgid "Check for comment forms on archive pages"
|
282 |
-
msgstr "Kontrollera för kommentarformulär på arkivsidor"
|
283 |
-
|
284 |
-
#: inc/gui.class.php:465
|
285 |
-
msgid "Save Changes"
|
286 |
-
msgstr "Spara ändringar"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Antispam Bee #
|
2 |
+
* Contributors: pluginkollektiv
|
3 |
+
* Tags: anti-spam, antispam, block spam, comment, comments, comment spam, pingback, prevention, protect, protection, spam, spam filter, trackback
|
4 |
+
* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8CH5FPR88QYML
|
5 |
+
* Requires at least: 3.8
|
6 |
+
* Tested up to: 4.7.2
|
7 |
+
* Stable tag: 2.7.0
|
8 |
+
* License: GPLv2 or later
|
9 |
+
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Easy and extremely productive spam-fighting plugin with many sophisticated solutions. Includes protection against trackback spam and privacy hints.
|
12 |
+
|
13 |
+
## Description ##
|
14 |
+
Say Goodbye to comment spam on your WordPress blog or website. *Antispam Bee* blocks spam comments and trackbacks effectively and without captchas. It is free of charge, ad-free and compliant with European data privacy standards.
|
15 |
+
|
16 |
+
### Feature/Settings Overview ###
|
17 |
+
* Trust approved commenters.
|
18 |
+
* Trust commenters with a Gravatar.
|
19 |
+
* Consider the comment time.
|
20 |
+
* Allow comments only in a certain language.
|
21 |
+
* Block or allow commenters from certain countries.
|
22 |
+
* Treat BBCode as spam.
|
23 |
+
* Validate the IP address of commenters.
|
24 |
+
* Use regular expressions.
|
25 |
+
* Search local spam database for commenters previously marked as spammers.
|
26 |
+
* Match against a public anti-spam database.
|
27 |
+
* Notify admins by e-mail about incoming spam.
|
28 |
+
* Delete existing spam after n days.
|
29 |
+
* Limit approval to comments/pings (will delete other comment types).
|
30 |
+
* Select spam indicators to send comments to deletion directly.
|
31 |
+
* Optionally exclude trackbacks and pingbacks from spam detection.
|
32 |
+
* Optionally spam-check comment forms on archive pages.
|
33 |
+
* Display spam statistics on the dashboard, including daily updates of spam detection rate and a total of blocked spam comments.
|
34 |
+
|
35 |
+
### Support ###
|
36 |
+
* Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/antispam-bee)
|
37 |
+
* We don’t handle support via e-mail, Twitter, GitHub issues etc.
|
38 |
+
|
39 |
+
### Contribute ###
|
40 |
+
* Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/antispam-bee).
|
41 |
+
* Pull requests for documented bugs are highly appreciated.
|
42 |
+
* If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/antispam-bee) first.
|
43 |
+
* If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/antispam-bee).
|
44 |
+
|
45 |
+
### Credits ###
|
46 |
+
* Author: [Sergej Müller](https://sergejmueller.github.io/)
|
47 |
+
* Maintainers: [pluginkollektiv](http://pluginkollektiv.org)
|
48 |
+
|
49 |
+
## Installation ##
|
50 |
+
* If you don’t know how to install a plugin for WordPress, [here’s how](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
|
51 |
+
|
52 |
+
### Requirements ###
|
53 |
+
* PHP 5.2.4 or greater
|
54 |
+
* WordPress 3.8 or greater
|
55 |
+
|
56 |
+
### Settings ###
|
57 |
+
After you have activated *Antispam Bee* the plugin will block spam comments out of the box. However, you may want to visit *Settings → Antispam Bee* to configure your custom set of anti-spam options that works best for your site.
|
58 |
+
|
59 |
+
### Privacy Notice ###
|
60 |
+
On sites operating from within the EU the option *Use a public antispam database* should not be activated for privacy reasons. When that option has been activated, *Antispam Bee* will match full IP addresses from comments against a public spam database. Technically it is not possible to encrypt those IPs, because spam databases only store and operate with complete, unencrypted IP addresses.
|
61 |
+
|
62 |
+
## Frequently Asked Questions ##
|
63 |
+
|
64 |
+
### Does Antispam Bee work with Jetpack, Disqus Comments and other comment plugins? ###
|
65 |
+
Antispam Bee works best with default WordPress comments. It is not compatible with Jetpack or Disqus Comments as those plugins load the comment form within an iframe. Thus Antispam Bee can not access the comment form directly.
|
66 |
+
It also won’t work with any AJAX-powered comment forms.
|
67 |
+
|
68 |
+
### Does Antispam Bee store any private user data, IP addresses or the like? ###
|
69 |
+
Nope. Antispam Bee is developed in Germany and Switzerland. You might have heard we can be a bit nitpicky over here when it comes to privacy.
|
70 |
+
|
71 |
+
### Will I have to edit any theme templates to get Antispam Bee to work? ###
|
72 |
+
No, the plugin works as is. You may want to configure your favorite settings, though.
|
73 |
+
|
74 |
+
### Does Antispam Bee work with shortened IPs? ###
|
75 |
+
Generally yes. However, commissioning the Antispam Bee plugin for canceled or shortened IP addresses in comment metadata is not recommended. Because the name and the e-mail address of the comments are not unique, an IP address is the only reliable measure. The more complete the stored IP addresses, the more reliable the assignment or detection of spam.
|
76 |
+
|
77 |
+
### How can I submit undetected spam? ###
|
78 |
+
If the antispam plugin has passed some spam comments, these comments can be reported for analysis. A [Google table](http://goo.gl/forms/ITzVHXkLVL) was created for this purpose.
|
79 |
+
|
80 |
+
### Antispam Bee with Varnish? ###
|
81 |
+
If WordPress is operated with Apache + Varnish, the actual IP address of the visitors does not appear in WordPress. Accordingly the Antispam-Plugin lacks the base for the correct functionality. An adaptation in the Varnish configuration file /etc/varnish/default.vcl provides a remedy and forwards the original (not from Apache) IP address in the HTTP header X-Forwarded-For:
|
82 |
+
`if (req.restarts == 0) {`
|
83 |
+
`set req.http.X-Forwarded-For = client.ip;`
|
84 |
+
`}`
|
85 |
+
|
86 |
+
### Are there some paid services or limitations? ###
|
87 |
+
No, Antispam Bee is free forever, for both private and commercial projects. You can use it on as many sites as you want. There is no limitation to the number of sites you use the plugin on.
|
88 |
+
|
89 |
+
A complete documentation is available in the [GitHub repository Wiki](https://github.com/pluginkollektiv/antispam-bee/wiki).
|
90 |
+
|
91 |
+
## Changelog ##
|
92 |
+
|
93 |
+
### 2.7.0 ###
|
94 |
+
* Country check is back again (thanks to Sergej Müller for his amazing work and the service page)
|
95 |
+
* Improved Honeypot
|
96 |
+
* Language check through Google Translate API is back again (thanks to Simon Kraft of https://moenus.net/ for offering to cover the costs)
|
97 |
+
* More default Regexes
|
98 |
+
* Unit Test Framework
|
99 |
+
* Accessibility and GUI improvements
|
100 |
+
* An [english documentation](https://github.com/pluginkollektiv/antispam-bee/wiki) is now available, too. Some corrections in the german documentation.
|
101 |
+
* Some bugfixes - Among other things for WPML compatibility
|
102 |
+
* For more details see https://github.com/pluginkollektiv/antispam-bee/milestone/3?closed=1
|
103 |
+
|
104 |
+
### 2.6.9 ###
|
105 |
+
* Updates donation links throughout the plugin
|
106 |
+
* Fixes an error were JavaScript on the dashboard was erroneously being enqueued
|
107 |
+
* Ensures compatibility with the latest WordPress version
|
108 |
+
|
109 |
+
### 2.6.8 ###
|
110 |
+
* added a POT file
|
111 |
+
* updated German translation, added formal version
|
112 |
+
* updated plugin text domain to include a dash instead of an underscore
|
113 |
+
* updated, translated + formatted README.md
|
114 |
+
* updated expired link URLs in plugin and languages files
|
115 |
+
* updated [plugin authors](https://gist.github.com/glueckpress/f058c0ab973d45a72720)
|
116 |
+
|
117 |
+
### 2.6.7 ###
|
118 |
+
* Removal of functions *Block comments from specific countries* and *Allow comments only in certain language* for financial reasons - [more information](https://plus.google.com/u/0/+SergejMüller/posts/ZyquhoYjUyF) (only german)
|
119 |
+
|
120 |
+
### 2.6.6 ###
|
121 |
+
* Switch to the official Google Translation API - [more information](https://plus.google.com/u/0/+SergejMüller/posts/ZyquhoYjUyF) (only german)
|
122 |
+
* *Release time investment (Development & QA): 2.5 h*
|
123 |
+
|
124 |
+
### 2.6.5 ###
|
125 |
+
* Fix: Return parameters on `dashboard_glance_items` callback / thx [@toscho](https://twitter.com/toscho)
|
126 |
+
* New function: Trust commenters with a Gravatar / thx [@glueckpress](https://twitter.com/glueckpress)
|
127 |
+
* Additional plausibility checks and filters
|
128 |
+
* *Release time investment (Development & QA): 12 h*
|
129 |
+
|
130 |
+
### 2.6.4 ###
|
131 |
+
* Consideration of the comment time (Spam if a comment was written in less than 5 seconds) - [more information on Google+](https://plus.google.com/+SergejMüller/posts/73EbP6F1BgC) (only german)
|
132 |
+
* *Release time investment (Development & QA): 6.25 h*
|
133 |
+
|
134 |
+
### 2.6.3 ###
|
135 |
+
* Sorting for the Antispam Bee column in the spam comments overview
|
136 |
+
* Code refactoring around the use of REQUEST_URI
|
137 |
+
* *Release time investment (Development & QA): 2.75 h*
|
138 |
+
|
139 |
+
### 2.6.2 ###
|
140 |
+
* Improving detection of fake IPs
|
141 |
+
* *Release time investment (Development & QA): 11 h*
|
142 |
+
|
143 |
+
### 2.6.1 ###
|
144 |
+
* Code refactoring of options management
|
145 |
+
* Support for `HTTP_FORWARDED_FOR` header
|
146 |
+
* *Release time investment (Development & QA): 8.5 h*
|
147 |
+
|
148 |
+
### 2.6.0 ###
|
149 |
+
* Optimizations for WordPress 3.8
|
150 |
+
* Clear invalid UTF-8 characters in comment fields
|
151 |
+
* Spam reason as a column in the table with spam comments
|
152 |
+
|
153 |
+
For the complete changelog, check out our [GitHub repository](https://github.com/pluginkollektiv/antispam-bee).
|
154 |
+
|
155 |
+
## Screenshots ##
|
156 |
+
1. Antispam Bee settings
|