Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
ae232eceb5
|
|||
93b4dd744d
|
|||
268e3933c8
|
|||
5d7a75ed31
|
|||
aaf054fb5b
|
|||
17c27a7b7c
|
|||
7757142237
|
|||
40347b0f50
|
@ -3,6 +3,7 @@
|
|||||||
/assets
|
/assets
|
||||||
/test
|
/test
|
||||||
/.distignore
|
/.distignore
|
||||||
|
/.editorconfig
|
||||||
/.gitattributes
|
/.gitattributes
|
||||||
/.gitignore
|
/.gitignore
|
||||||
/.travis.yml
|
/.travis.yml
|
||||||
|
21
.editorconfig
Normal file
21
.editorconfig
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# This file is for unifying the coding style for different editors and IDEs
|
||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
# WordPress Coding Standards
|
||||||
|
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[{.jshintrc,*.json,*.yml,*.feature}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[{*.txt,wp-config-sample.php}]
|
||||||
|
end_of_line = crlf
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
composer test
|
composer test
|
||||||
sed -i "s#<file name=\"${GITHUB_WORKSPACE}#<file name=\"/github/workspace#g" tests-clover.xml
|
sed -i "s#<file name=\"${GITHUB_WORKSPACE}#<file name=\"/github/workspace#g" tests-clover.xml
|
||||||
- name: Analyze with SonarCloud
|
- name: Analyze with SonarCloud
|
||||||
if: matrix.php == '8.0' && github.event_name != 'pull_request'
|
if: matrix.php == '8.0'
|
||||||
uses: sonarsource/sonarcloud-github-action@master
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
15
README.md
15
README.md
@ -6,9 +6,9 @@
|
|||||||
# Statify Filter #
|
# Statify Filter #
|
||||||
* Contributors: Stefan Kalscheuer
|
* Contributors: Stefan Kalscheuer
|
||||||
* Requires at least: 4.7
|
* Requires at least: 4.7
|
||||||
* Tested up to: 6.1
|
* Tested up to: 6.3
|
||||||
* Requires PHP: 5.5
|
* Requires PHP: 5.5
|
||||||
* Stable tag: 1.6.2
|
* Stable tag: 1.6.3
|
||||||
* License: GPLv2 or later
|
* License: GPLv2 or later
|
||||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ The plugin is capable of handling multisite installations.
|
|||||||
### What is blocked by default? ###
|
### What is blocked by default? ###
|
||||||
Nothing. By default, all filters are empty and disabled. They can and have to be filled by the blog administrator.
|
Nothing. By default, all filters are empty and disabled. They can and have to be filled by the blog administrator.
|
||||||
|
|
||||||
A default filter is not provided, as the plugin itself is totally neutral. If you want to filter out referer spam,
|
A default filter is not provided, as the plugin itself is totally neutral. If you want to filter out referer spam,
|
||||||
visitors from search engines, just "false" referrers from 301 redirects or you own IP address used for testing only depends on you.
|
visitors from search engines, just "false" referrers from 301 redirects or you own IP address used for testing only depends on you.
|
||||||
|
|
||||||
### Does the filter effect user experience? ###
|
### Does the filter effect user experience? ###
|
||||||
@ -71,7 +71,7 @@ No. It only prevents _Statify_ from tracking, nothing more or less.
|
|||||||
### Does live filtering impact performance? ###
|
### Does live filtering impact performance? ###
|
||||||
Yes, but probably not noticeable. Checking a single referer string against a (usually small) list should be negligible compared to the total loading procedure.
|
Yes, but probably not noticeable. Checking a single referer string against a (usually small) list should be negligible compared to the total loading procedure.
|
||||||
If this still is an issue for you, consider deactivating the filter and only run the one-time-cleanup or activate the cron job.
|
If this still is an issue for you, consider deactivating the filter and only run the one-time-cleanup or activate the cron job.
|
||||||
|
|
||||||
### Is any personal data collected? ###
|
### Is any personal data collected? ###
|
||||||
No. The privacy policy of _Statify_ is untouched. Data is only processed, not stored or exposed to anyone.
|
No. The privacy policy of _Statify_ is untouched. Data is only processed, not stored or exposed to anyone.
|
||||||
|
|
||||||
@ -93,6 +93,9 @@ Same for IPv6 prefixes like _2001:db8:a0b:12f0::/64_.
|
|||||||
|
|
||||||
## Upgrade Notice ##
|
## Upgrade Notice ##
|
||||||
|
|
||||||
|
### 1.6.3 ###
|
||||||
|
This is a service release with minor internal corrections and WP 6.3 compatibility.
|
||||||
|
|
||||||
### 1.6.2 ###
|
### 1.6.2 ###
|
||||||
This is a service release with minor internal corrections and PHP 8.2 compatibility.
|
This is a service release with minor internal corrections and PHP 8.2 compatibility.
|
||||||
|
|
||||||
@ -109,6 +112,10 @@ This version should be compatible with latest WordPress 5.6.
|
|||||||
|
|
||||||
## Changelog ##
|
## Changelog ##
|
||||||
|
|
||||||
|
### 1.6.3 / 14.08.2023 ###
|
||||||
|
* Minor internal code cleanup
|
||||||
|
* Declared compatibility with WordPress 6.3
|
||||||
|
|
||||||
### 1.6.2 / 25.02.2023 ###
|
### 1.6.2 / 25.02.2023 ###
|
||||||
* Always process IPv6 addresses lowercase
|
* Always process IPv6 addresses lowercase
|
||||||
* Optimize internally used regular expression
|
* Optimize internally used regular expression
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stklcode/statify-blacklist",
|
"name": "stklcode/statify-blacklist",
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"description": "A filter extension for the famous Statify WordPress plugin",
|
"description": "A filter extension for the famous Statify WordPress plugin",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
@ -19,10 +19,10 @@
|
|||||||
"type": "wordpress-plugin",
|
"type": "wordpress-plugin",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5",
|
"php": ">=5.5",
|
||||||
"composer/installers": "~1.12"
|
"composer/installers": "~v1.12|~v2.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
|
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0",
|
||||||
"phpunit/phpunit": "^5|^6|^7|^8|^9",
|
"phpunit/phpunit": "^5|^6|^7|^8|^9",
|
||||||
"phpunit/php-code-coverage": "*",
|
"phpunit/php-code-coverage": "*",
|
||||||
"slowprog/composer-copy-file": "~0.3",
|
"slowprog/composer-copy-file": "~0.3",
|
||||||
|
@ -163,7 +163,6 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +80,7 @@ class StatifyBlacklist {
|
|||||||
*/
|
*/
|
||||||
public static function init() {
|
public static function init() {
|
||||||
// Skip on autosave.
|
// Skip on autosave.
|
||||||
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ) {
|
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,7 +436,7 @@ class StatifyBlacklist {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ceil = ceil( $mask / 16 );
|
$ceil = ceil( $mask / 16 );
|
||||||
for ( $i = 1; $i <= $ceil; ++ $i ) {
|
for ( $i = 1; $i <= $ceil; ++$i ) {
|
||||||
$left = $mask - 16 * ( $i - 1 );
|
$left = $mask - 16 * ( $i - 1 );
|
||||||
$left = ( $left <= 16 ) ? $left : 16;
|
$left = ( $left <= 16 ) ? $left : 16;
|
||||||
$mask_b = ~( 0xffff >> $left ) & 0xffff;
|
$mask_b = ~( 0xffff >> $left ) & 0xffff;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "statify-blacklist",
|
"name": "statify-blacklist",
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"description": "A filter extension for the famous Statify WordPress plugin",
|
"description": "A filter extension for the famous Statify WordPress plugin",
|
||||||
"author": "Stefan Kalscheuer",
|
"author": "Stefan Kalscheuer",
|
||||||
"license": "GPL-2.0+"
|
"license": "GPL-2.0+"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Plugin Name: Statify Filter
|
* Plugin Name: Statify Filter
|
||||||
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
|
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
|
||||||
* Description: Extension for the Statify plugin to add customizable filters. (formerly "Statify Blacklist)
|
* Description: Extension for the Statify plugin to add customizable filters. (formerly "Statify Blacklist)
|
||||||
* Version: 1.6.2
|
* Version: 1.6.3
|
||||||
* Author: Stefan Kalscheuer (@stklcode)
|
* Author: Stefan Kalscheuer (@stklcode)
|
||||||
* Author URI: https://www.stklcode.de
|
* Author URI: https://www.stklcode.de
|
||||||
* Text Domain: statify-blacklist
|
* Text Domain: statify-blacklist
|
||||||
@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
|
|
||||||
// Constants.
|
// Constants.
|
||||||
define( 'STATIFYBLACKLIST_FILE', __FILE__ );
|
define( 'STATIFYBLACKLIST_FILE', __FILE__ );
|
||||||
define( 'STATIFYBLACKLIST_DIR', dirname( __FILE__ ) );
|
define( 'STATIFYBLACKLIST_DIR', __DIR__ );
|
||||||
define( 'STATIFYBLACKLIST_BASE', plugin_basename( __FILE__ ) );
|
define( 'STATIFYBLACKLIST_BASE', plugin_basename( __FILE__ ) );
|
||||||
|
|
||||||
// Check for compatibility.
|
// Check for compatibility.
|
||||||
|
Reference in New Issue
Block a user