19 Commits

Author SHA1 Message Date
8267e408f0
simply regex quantifiers and parse IPs to lowercase
Use ? instead of {0,1} and {3} instead of {3,3} where applicable.
Number groups [ß-9] are left as is for readability, i.e. prefer
[1-9][0-9] over [1-9]\d.

The whole expression is evaluated case-insensitive now, so we can omit
the "a-fA-F" and simply use "a-f".

Unit-tests extended accordingly.
2022-11-04 10:42:36 +01:00
06a7b1677a rename plugin to "Statify Filter"
The plugins purpose is to exclude or filter certain requests from
tracking by Statify. However the current name "Statify Blacklist" is not
actually inline with today's understanding of such terms. In WordPress
Core 5.5 the word "blacklist" among others has been replaced by more
precise wording where possible.

The term "filter" has been used in various places already and clearly
describes the behavior of this plugin. So we rename the plugin to
"Statify Filter" and rephrase front-end texts.

Plugin slug (permalink), textdomain and all public class and constant
names left untouched for now, to not introduce breaking changes at this
point. To be cleaned up with next major release.
2020-10-19 10:34:09 +02:00
e4fd34d036 do not rely on WP core translation and add textdomain for all texts 2020-09-03 20:49:01 +02:00
aa9980106e update phpcs ignore statements; PHPdoc indentation 2020-05-10 12:13:39 +02:00
ac73b2316d typo fixes 2020-05-10 11:35:18 +02:00
ebc44c722e use long array syntax
For some reason short syntax is discouraged in the latest WPCS ruleset.
To stay in line with WPCS we use long syntax now.
2020-01-07 19:30:38 +01:00
3f5990f1f3 update PHPCS ruleset and re-enable warnings 2019-10-06 18:07:42 +02:00
84cf79fd04 remove underscore prefix from options field 2019-10-06 17:52:08 +02:00
44ee7ee839 Check regular expressions and prevent saving invalid settings (#13) 2019-03-17 17:34:57 +01:00
39dcce3eeb Harmonize helper funcitons to snake_case 2019-03-17 17:25:43 +01:00
b7c3b51873 implement keyword filter for referer blacklist (closes #15)
In addition to the pre-existing normal and regular expression filters a
keyword mode is added. This filter matches if the referer string
contains a given keyword (case insensitive).
2019-03-12 19:37:48 +01:00
b691f2c618 adjust sanitization of settings and warning messages 2019-03-06 17:23:06 +01:00
74f2e0f9a7 Removed deprecated instance() and __construct() methods from base class 2018-10-27 18:42:46 +02:00
74826384a8 Moved admin initialization to admin class 2018-10-27 18:34:23 +02:00
bcd42bde2a Minor code style fixes 2018-10-20 10:12:38 +02:00
5956059327 Cleaned up option handling for multisite
Multisite detection has been executed multiple times while the status is present in class variable after initialization.
2018-01-07 16:17:27 +01:00
eb63299dfc Minor code styling.
* Added some equals-alignments and removed require_once paranthesis.
* Notice: _add_menu_page() has been renamed to add_menu_page()
2017-11-12 12:12:51 +01:00
f061b4c194 _add_menu_page in admin class made static
This method has been non-static for not reason which lead to reasonable warning. Simply declared static now, as there are no instance dependencies.
2017-11-12 12:12:51 +01:00
089ed347fa Code style again
Altered variable names from camel to snake case, renamed class files from *.class.php to class-*.php, added some comments.
2017-07-16 12:34:49 +02:00