Compare commits

...

15 Commits

Author SHA1 Message Date
ea9366a9ce
ci: add PHP 8.4 to test matrix
All checks were successful
CI / unit-test (7.4) (push) Successful in 54s
CI / unit-test (8.0) (push) Successful in 53s
CI / quality (push) Successful in 44s
CI / unit-test (5.6) (push) Successful in 1m26s
CI / unit-test (8.2) (push) Successful in 52s
CI / unit-test (8.4) (push) Successful in 41s
2025-04-19 17:39:02 +02:00
0432861e95
declare compatibility with WordPress 6.8 2025-04-19 17:38:16 +02:00
1243eef2d2
deps: update dev-dependencies
All checks were successful
CI / unit-test (7.4) (push) Successful in 59s
CI / unit-test (5.6) (push) Successful in 1m39s
CI / unit-test (8.0) (push) Successful in 55s
CI / unit-test (8.1) (push) Successful in 53s
CI / unit-test (8.2) (push) Successful in 53s
CI / unit-test (8.3) (push) Successful in 42s
CI / quality (push) Successful in 47s
2025-04-19 17:36:42 +02:00
b4898abd5b
docs: add missing quote in plugin description 2025-03-02 17:29:50 +01:00
c02263f373
declare compatibility with WordPress 6.7
All checks were successful
CI / unit-test (5.6) (push) Successful in 1m16s
CI / unit-test (7.4) (push) Successful in 1m13s
CI / unit-test (8.0) (push) Successful in 1m13s
CI / unit-test (8.3) (push) Successful in 1m3s
CI / unit-test (8.1) (push) Successful in 1m13s
CI / unit-test (8.2) (push) Successful in 1m14s
CI / quality (push) Successful in 1m7s
2024-11-14 11:36:07 +01:00
b34a79068c
ci: fix branches in plugin check workflow
All checks were successful
CI / unit-test (7.4) (push) Successful in 1m8s
CI / unit-test (8.0) (push) Successful in 1m6s
CI / unit-test (8.1) (push) Successful in 1m8s
CI / unit-test (8.3) (push) Successful in 1m1s
CI / unit-test (8.2) (push) Successful in 1m6s
CI / quality (push) Successful in 1m2s
CI / unit-test (5.6) (push) Successful in 1m13s
2024-11-12 16:16:02 +01:00
00aa79cb1e
fix: typo and deprecated options in blueprint.json 2024-11-12 16:13:22 +01:00
96cd17c3e2
ci: add workflow to run wp plugin checks
All checks were successful
CI / unit-test (5.6) (push) Successful in 1m4s
CI / unit-test (8.1) (push) Successful in 1m0s
CI / unit-test (7.4) (push) Successful in 1m3s
CI / unit-test (8.0) (push) Successful in 1m2s
CI / unit-test (8.2) (push) Successful in 1m3s
CI / unit-test (8.3) (push) Successful in 51s
CI / quality (push) Successful in 54s
2024-10-03 15:03:05 +02:00
96214d55a0
docs: update badges in README.md 2024-10-03 15:00:55 +02:00
fbb8229c3e
ci: explicitly enable xdebug coverage and add condition for analysis
All checks were successful
CI / unit-test (5.6) (push) Successful in 1m6s
CI / unit-test (7.4) (push) Successful in 1m9s
CI / unit-test (8.0) (push) Successful in 1m9s
CI / unit-test (8.1) (push) Successful in 1m4s
CI / unit-test (8.3) (push) Successful in 41s
CI / unit-test (8.2) (push) Successful in 1m2s
CI / quality (push) Successful in 56s
2024-08-08 17:37:36 +02:00
a693e0b9c0
declare compatibility with WordPress 6.6
Some checks failed
CI / unit-test (7.4) (push) Failing after 44s
CI / unit-test (5.6) (push) Failing after 47s
CI / unit-test (8.0) (push) Failing after 44s
CI / unit-test (8.1) (push) Failing after 44s
CI / unit-test (8.3) (push) Successful in 36s
CI / unit-test (8.2) (push) Failing after 45s
CI / quality (push) Successful in 50s
2024-08-08 16:41:57 +02:00
0636367e79
docs: add missing short description to README.md 2024-08-08 16:41:22 +02:00
7537261387
deps: update dev-dependencies
Some checks failed
CI / unit-test (7.4) (push) Failing after 38s
CI / unit-test (8.0) (push) Failing after 39s
CI / unit-test (8.1) (push) Failing after 39s
CI / unit-test (8.2) (push) Failing after 38s
CI / unit-test (8.3) (push) Successful in 59s
CI / unit-test (5.6) (push) Failing after 41s
CI / quality (push) Successful in 38s
2024-08-03 17:28:20 +02:00
38c1e569e6
prepare release 1.7.2 2024-06-06 20:29:05 +02:00
4290aed9ce
fix: restore database cleanup functionality (#37) (#38)
The cleanup request was no longer precessed since we refactored the
settings page in v1.7.0 to use the WP settings API. Process the request
including nonce verification during page creation restores it.
2024-06-06 20:17:19 +02:00
10 changed files with 77 additions and 20 deletions

View File

@ -1,7 +1,9 @@
/.git
/.github
/assets
/dist
/test
/vendor
/.distignore
/.editorconfig
/.gitattributes

1
.gitattributes vendored
View File

@ -1,5 +1,6 @@
/.github export-ignore
/assets export-ignore
/dist export-ignore
/test export-ignore
.distignore export-ignore
.gitattributes export-ignore

View File

@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '5.6', '7.4', '8.0', '8.1', '8.2', '8.3' ]
php: [ '5.6', '7.4', '8.0', '8.2', '8.4' ]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -15,6 +15,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: composer
- name: Install
run: composer install --no-interaction
@ -23,7 +24,7 @@ jobs:
composer test
sed -i "s#<file name=\"${GITHUB_WORKSPACE}#<file name=\"/github/workspace#g" tests-clover.xml
- name: Analyze with SonarCloud
if: matrix.php == '8.2'
if: matrix.php == '8.2' && env.SONAR_TOKEN != ''
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,23 @@
name: Plugin check
on:
push:
branches: [ 'stable', 'release/*' ]
pull_request:
branches: [ 'stable' ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Package plugin
run: |
mkdir -p ./dist
tail -n +6 README.md > README.md.tmp && mv README.md.tmp README.md
rsync -rc --exclude-from=.distignore ./ ./dist/statify-blacklist --delete --delete-excluded
- name: Check WP plugin
uses: wordpress/plugin-check-action@v1
with:
build-dir: ./dist/statify-blacklist

View File

@ -1,23 +1,25 @@
[![Build Status](https://github.com/stklcode/statify-blacklist/actions/workflows/test.yml/badge.svg?branch=stable)](https://github.com/stklcode/statify-blacklist/actions/workflows/test.yml?query=branch%3Astable)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=stklcode%3Astatify-blacklist&metric=alert_status)](https://sonarcloud.io/dashboard?id=stklcode%3Astatify-blacklist)
[![Packagist Version](https://img.shields.io/packagist/v/stklcode/statify-blacklist.svg)](https://packagist.org/packages/stklcode/statify-blacklist)
[![CI](https://github.com/stklcode/statify-blacklist/actions/workflows/test.yml/badge.svg?branch=stable)](https://github.com/stklcode/statify-blacklist/actions/workflows/test.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=stklcode%3Astatify-blacklist&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=stklcode%3Astatify-blacklist)
[![Packagist Version](https://img.shields.io/packagist/v/stklcode/statify-blacklist)](https://packagist.org/packages/stklcode/statify-blacklist)
[![License](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://github.com/stklcode/statify-blacklist/blob/stable/LICENSE.md)
# Statify Filter #
* Contributors: stklcode
* Requires at least: 4.7
* Tested up to: 6.5
* Tested up to: 6.8
* Requires PHP: 5.5
* Stable tag: 1.7.1
* Stable tag: 1.7.2
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Filter extension for the famous Statify WordPress plugin.
## Description ##
A filter extension for the famous [Statify](https://wordpress.org/plugins/statify/) WordPress plugin.
This plugin adds customizable filters to Statify to allow blocking of referer spam or internal interactions.
### Features ##
### Features ###
#### Referer Filter ####
Add a list of domains (for simplicity only second-level, e.g. _example.com_ which blocks _everything.example.com_).
@ -93,6 +95,9 @@ Same for IPv6 prefixes like _2001:db8:a0b:12f0::/64_.
## Upgrade Notice ##
### 1.7.2 ###
This is a bugfix release to restore the manual cleanup function that was broken since 1.7.0.
### 1.7.1 ###
This is a service release with minor corrections. Recommended for all users. Tested up to 6.5.
@ -100,7 +105,10 @@ This is a service release with minor corrections. Recommended for all users. Tes
This is a service release with primarily internal rework. Tested up to 6.4 and PHP 8.3.
## Changelog ##
## Changelog
### 1.7.2 / 06.06.2024 ###
* Restore manual database cleanup functionality
### 1.7.1 / 24.03.2024 ###
* Fix HTML syntax for checkboxes on settings page

View File

@ -12,7 +12,7 @@
},
{
"step": "installPlugin",
"pluginZipFile": {
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "statify"
}
@ -23,14 +23,14 @@
},
{
"step": "installPlugin",
"pluginZipFile": {
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "statify-blacklist"
}
},
{
"step": "activatePlugin",
"pluginPath": "statify-blacklis/statify-blacklist.php"
"pluginPath": "statify-blacklist/statify-blacklist.php"
}
]
}

View File

@ -1,6 +1,6 @@
{
"name": "stklcode/statify-blacklist",
"version": "1.7.1",
"version": "1.7.2",
"description": "A filter extension for the famous Statify WordPress plugin",
"keywords": [
"wordpress",
@ -19,16 +19,16 @@
"type": "wordpress-plugin",
"require": {
"php": ">=5.5",
"composer/installers": "~v1.12|~v2.2"
"composer/installers": "~v1.12|~v2.3"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0",
"phpunit/phpunit": "^5|^6|^7|^8|^9",
"phpunit/php-code-coverage": "*",
"slowprog/composer-copy-file": "~0.3",
"squizlabs/php_codesniffer": "^3.9",
"squizlabs/php_codesniffer": "^3.12",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"wp-coding-standards/wpcs": "^3.0"
"wp-coding-standards/wpcs": "^3.1"
},
"scripts": {
"test-all": [

View File

@ -170,6 +170,27 @@ class StatifyBlacklist_Settings extends StatifyBlacklist {
?>
<div class="wrap">
<h1><?php esc_html_e( 'Statify Filter', 'statify-blacklist' ); ?></h1>
<?php
if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && ! empty( $_POST['cleanup'] ) ) {
// Database cleanup requested.
if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'statify-blacklist-options' ) ) {
// Nonce verification successful, proceed with cleanup.
StatifyBlacklist_Admin::cleanup_database();
?>
<div class="notice notice-success is-dismissible">
<p><?php esc_html_e( 'Database cleanup successful', 'statify-blacklist' ); ?></p>
</div>
<?php
} else {
// Nonce verification failed.
?>
<div class="notice notice-error is-dismissible">
<p><?php esc_html_e( 'Database cleanup request failed', 'statify-blacklist' ); ?></p>
</div>
<?php
}
}
?>
<form id="statify-settings" method="post" action="options.php">
<?php
@ -178,7 +199,8 @@ class StatifyBlacklist_Settings extends StatifyBlacklist {
submit_button();
?>
<hr>
<input class="button-secondary" type="submit" name="cleanUp"
<input class="button-secondary" type="submit" name="cleanup"
formaction=""
value="<?php esc_html_e( 'CleanUp Database', 'statify-blacklist' ); ?>"
onclick="return confirm('<?php echo esc_js( __( 'Do you really want to apply filters to database? This cannot be undone.', 'statify-blacklist' ) ); ?>');">
<p class="description">

View File

@ -1,6 +1,6 @@
{
"name": "statify-blacklist",
"version": "1.7.1",
"version": "1.7.2",
"description": "A filter extension for the famous Statify WordPress plugin",
"author": "Stefan Kalscheuer",
"license": "GPL-2.0+"

View File

@ -9,8 +9,8 @@
* @wordpress-plugin
* Plugin Name: Statify Filter
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
* Description: Extension for the Statify plugin to add customizable filters. (formerly "Statify Blacklist)
* Version: 1.7.1
* Description: Extension for the Statify plugin to add customizable filters. (formerly "Statify Blacklist")
* Version: 1.7.2
* Requires at least: 4.7
* Requires PHP: 5.5
* Requires Plugins: statify