Removed legacy code for WP prior to 4.6

Statify itself requires WP 4.7, so no reason to stick to legacy code
anymore.
This commit is contained in:
Stefan Kalscheuer 2018-03-21 18:16:25 +01:00
parent 66ddada63e
commit 8c556ca509
4 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# Statify Blacklist # # Statify Blacklist #
* Contributors: Stefan Kalscheuer * Contributors: Stefan Kalscheuer
* Requires at least: 4.4 * Requires at least: 4.7
* Tested up to: 4.9 * Tested up to: 4.9
* Requires PHP: 5.5 * Requires PHP: 5.5
* Stable tag: 1.4.3 * Stable tag: 1.4.3
@ -46,7 +46,7 @@ The plugin is capable of handling multisite installations.
### Requirements ### ### Requirements ###
* PHP 5.5 or above * PHP 5.5 or above
* WordPress 4.4 or above * WordPress 4.7 or above
* Statify plugin installed and activated (1.5.0 or above) * Statify plugin installed and activated (1.5.0 or above)
## Frequently Asked Questions ## ## Frequently Asked Questions ##
@ -82,6 +82,9 @@ Because of this, an IP blacklist can only be applied while processing the reques
## Changelog ## ## Changelog ##
### 1.5.0 / unreleased ###
* Minimum required WordPress version is 4.7
### 1.4.3 / 09.01.2018 ### ### 1.4.3 / 09.01.2018 ###
* Fix issues with multisite installation (#11) * Fix issues with multisite installation (#11)

View File

@ -1,6 +1,6 @@
{ {
"name": "stklcode/statify-blacklist", "name": "stklcode/statify-blacklist",
"version": "1.4.3", "version": "1.5.0-alpha",
"description": "A blacklist extension for the famous Statify WordPress plugin", "description": "A blacklist extension for the famous Statify WordPress plugin",
"keywords": [ "keywords": [
"wordpress", "wordpress",

View File

@ -31,9 +31,6 @@ class StatifyBlacklist_System extends StatifyBlacklist {
if ( $network_wide && is_multisite() ) { if ( $network_wide && is_multisite() ) {
if ( function_exists( 'get_sites' ) ) { if ( function_exists( 'get_sites' ) ) {
$sites = get_sites(); $sites = get_sites();
} elseif ( function_exists( 'wp_get_sites' ) ) {
// @codingStandardsIgnoreLine Legacy support for WP < 4.6.
$sites = wp_get_sites();
} else { } else {
return; return;
} }

View File

@ -10,7 +10,7 @@
<file>statify-blacklist.php</file> <file>statify-blacklist.php</file>
<!-- Compliance with WordPress Coding Standard --> <!-- Compliance with WordPress Coding Standard -->
<config name="minimum_supported_wp_version" value="4.4"/> <config name="minimum_supported_wp_version" value="4.7"/>
<rule ref="WordPress"> <rule ref="WordPress">
<!-- The plugin uses switch_to_blog for multisite handling. --> <!-- The plugin uses switch_to_blog for multisite handling. -->
<exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog"/> <exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog"/>