Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
c30f07e02f | |||
cb61210685 | |||
e4fd34d036 | |||
2dd8e60bd8 | |||
902e211552 |
11
README.md
11
README.md
@ -6,9 +6,9 @@
|
|||||||
# Statify Blacklist #
|
# Statify Blacklist #
|
||||||
* Contributors: Stefan Kalscheuer
|
* Contributors: Stefan Kalscheuer
|
||||||
* Requires at least: 4.7
|
* Requires at least: 4.7
|
||||||
* Tested up to: 5.4
|
* Tested up to: 5.5
|
||||||
* Requires PHP: 5.5
|
* Requires PHP: 5.5
|
||||||
* Stable tag: 1.5.0
|
* Stable tag: 1.5.2
|
||||||
* 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
|
||||||
|
|
||||||
@ -90,6 +90,13 @@ Same for IPv6 prefixes like _2001:db8:a0b:12f0::/64_.
|
|||||||
|
|
||||||
## Changelog ##
|
## Changelog ##
|
||||||
|
|
||||||
|
### 1.5.2 / 03.09.2020 ###
|
||||||
|
* Minor translation updates
|
||||||
|
* Declared compatibility with WordPress 5.5
|
||||||
|
|
||||||
|
### 1.5.1 / 20.05.2020 ###
|
||||||
|
* Fix initialization on AJAX calls for _Statify_ 1.7 compatibility (#22)
|
||||||
|
|
||||||
### 1.5.0 / 13.05.2020 ###
|
### 1.5.0 / 13.05.2020 ###
|
||||||
* Minimum required WordPress version is 4.7
|
* Minimum required WordPress version is 4.7
|
||||||
* Removed `load_plugin_textdomain()` and `Domain Path` header
|
* Removed `load_plugin_textdomain()` and `Domain Path` header
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* @author Stefan Kalscheuer <stefan@stklcode.de>
|
* @author Stefan Kalscheuer <stefan@stklcode.de>
|
||||||
*
|
*
|
||||||
* @package Statify_Blacklist
|
* @package Statify_Blacklist
|
||||||
* @version 1.5.0
|
* @version 1.5.2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Robo\Exception\TaskException;
|
use Robo\Exception\TaskException;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stklcode/statify-blacklist",
|
"name": "stklcode/statify-blacklist",
|
||||||
"version": "1.5.0",
|
"version": "1.5.2",
|
||||||
"description": "A blacklist extension for the famous Statify WordPress plugin",
|
"description": "A blacklist extension for the famous Statify WordPress plugin",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
@ -19,17 +19,17 @@
|
|||||||
"type": "wordpress-plugin",
|
"type": "wordpress-plugin",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5",
|
"php": ">=5.5",
|
||||||
"composer/installers": "~1.7"
|
"composer/installers": "~1.9"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.5",
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
|
||||||
"consolidation/robo": "^1.4",
|
"consolidation/robo": "^1.4",
|
||||||
"phpunit/phpunit": "*",
|
"phpunit/phpunit": "*",
|
||||||
"phpunit/php-code-coverage": "*",
|
"phpunit/php-code-coverage": "*",
|
||||||
"slowprog/composer-copy-file": "~0.2",
|
"slowprog/composer-copy-file": "~0.3",
|
||||||
"squizlabs/php_codesniffer": "^3.5",
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
"phpcompatibility/php-compatibility": "^9.3",
|
"phpcompatibility/php-compatibility": "^9.3",
|
||||||
"wp-coding-standards/wpcs": "^2.1"
|
"wp-coding-standards/wpcs": "^2.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": [
|
"build": [
|
||||||
|
@ -209,7 +209,7 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
|||||||
if ( STATIFYBLACKLIST_BASE === $file && current_user_can( 'manage_options' ) ) {
|
if ( STATIFYBLACKLIST_BASE === $file && current_user_can( 'manage_options' ) ) {
|
||||||
array_unshift(
|
array_unshift(
|
||||||
$links,
|
$links,
|
||||||
sprintf( '<a href="%s">%s</a>', esc_attr( add_query_arg( 'page', 'statify-blacklist', $base ) ), __( 'Settings' ) )
|
sprintf( '<a href="%s">%s</a>', esc_attr( add_query_arg( 'page', 'statify-blacklist', $base ) ), __( 'Settings', 'statify-blacklist' ) )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
|||||||
public static function cleanup_database() {
|
public static function cleanup_database() {
|
||||||
// Check user permissions.
|
// Check user permissions.
|
||||||
if ( ! current_user_can( 'manage_options' ) && ! ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
if ( ! current_user_can( 'manage_options' ) && ! ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
||||||
die( esc_html__( 'Are you sure you want to do this?' ) );
|
die( esc_html__( 'Are you sure you want to do this?', 'statify-blacklist' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
||||||
|
@ -81,8 +81,8 @@ class StatifyBlacklist {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function init() {
|
public static function init() {
|
||||||
// Skip on autosave or AJAX.
|
// Skip on autosave.
|
||||||
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +97,11 @@ class StatifyBlacklist {
|
|||||||
add_filter( 'statify__skip_tracking', array( 'StatifyBlacklist', 'apply_blacklist_filter' ) );
|
add_filter( 'statify__skip_tracking', array( 'StatifyBlacklist', 'apply_blacklist_filter' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Statify uses WP AJAX as of 1.7, so we need to reach this point. But there are no further admin/cron actions.
|
||||||
|
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Admin only filters.
|
// Admin only filters.
|
||||||
if ( is_admin() ) {
|
if ( is_admin() ) {
|
||||||
StatifyBlacklist_Admin::init();
|
StatifyBlacklist_Admin::init();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "statify-blacklist",
|
"name": "statify-blacklist",
|
||||||
"version": "1.5.0",
|
"version": "1.5.2",
|
||||||
"description": "A blacklist extension for the famous Statify WordPress plugin",
|
"description": "A blacklist extension for the famous Statify WordPress plugin",
|
||||||
"author": "Stefan Kalscheuer",
|
"author": "Stefan Kalscheuer",
|
||||||
"license": "GPL-2.0+"
|
"license": "GPL-2.0+"
|
||||||
|
@ -18,6 +18,12 @@
|
|||||||
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
|
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="WordPress.WP.I18n">
|
||||||
|
<properties>
|
||||||
|
<property name="text_domain" type="array" value="statify-blacklist"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<!-- PHP compatibility level -->
|
<!-- PHP compatibility level -->
|
||||||
<config name="testVersion" value="5.5-"/>
|
<config name="testVersion" value="5.5-"/>
|
||||||
<rule ref="PHPCompatibility"/>
|
<rule ref="PHPCompatibility"/>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Plugin Name: Statify Blacklist
|
* Plugin Name: Statify Blacklist
|
||||||
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
|
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
|
||||||
* Description: Extension for the Statify plugin to add a customizable blacklists.
|
* Description: Extension for the Statify plugin to add a customizable blacklists.
|
||||||
* Version: 1.5.0
|
* Version: 1.5.2
|
||||||
* 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
|
||||||
|
@ -21,7 +21,7 @@ if ( ! empty( $_POST['statifyblacklist'] ) ) {
|
|||||||
|
|
||||||
// Check user capabilities.
|
// Check user capabilities.
|
||||||
if ( ! current_user_can( 'manage_options' ) ) {
|
if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
die( esc_html__( 'Are you sure you want to do this?' ) );
|
die( esc_html__( 'Are you sure you want to do this?', 'statify-blacklist' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $_POST['cleanUp'] ) ) {
|
if ( ! empty( $_POST['cleanUp'] ) ) {
|
||||||
@ -375,7 +375,7 @@ if ( ! empty( $_POST['statifyblacklist'] ) ) {
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<input class="button-primary" type="submit" name="submit" value="<?php esc_html_e( 'Save Changes' ); ?>">
|
<input class="button-primary" type="submit" name="submit" value="<?php esc_html_e( 'Save Changes', 'statify-blacklist' ); ?>">
|
||||||
<hr>
|
<hr>
|
||||||
<input class="button-secondary" type="submit" name="cleanUp"
|
<input class="button-secondary" type="submit" name="cleanUp"
|
||||||
value="<?php esc_html_e( 'CleanUp Database', 'statify-blacklist' ); ?>"
|
value="<?php esc_html_e( 'CleanUp Database', 'statify-blacklist' ); ?>"
|
||||||
|
Reference in New Issue
Block a user