Removed deprecated instance() and __construct() methods from base class
This commit is contained in:
parent
74826384a8
commit
74f2e0f9a7
@ -9,8 +9,10 @@
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Quit.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
// Quit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Statify Blacklist admin configuration.
|
||||
|
@ -9,8 +9,10 @@
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Quit.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
// Quit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Statify Blacklist system configuration.
|
||||
@ -25,6 +27,7 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param bool $network_wide Whether the plugin was activated network-wide or not.
|
||||
* @return void
|
||||
*/
|
||||
public static function install( $network_wide = false ) {
|
||||
// Create tables for each site in a network.
|
||||
@ -59,6 +62,7 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
* @since 1.4.3
|
||||
*
|
||||
* @param integer $site_id Site ID.
|
||||
* @return void
|
||||
*/
|
||||
public static function install_site( $site_id ) {
|
||||
switch_to_blog( (int) $site_id );
|
||||
@ -74,6 +78,8 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
* Plugin uninstall handler.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function uninstall() {
|
||||
if ( is_multisite() ) {
|
||||
@ -109,6 +115,7 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
* @since 1.4.3
|
||||
*
|
||||
* @param integer $site_id Site ID.
|
||||
* @return void
|
||||
*/
|
||||
public static function uninstall_site( $site_id ) {
|
||||
$old = get_current_blog_id();
|
||||
@ -121,6 +128,8 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
* Upgrade plugin options.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function upgrade() {
|
||||
self::update_options();
|
||||
|
@ -8,8 +8,10 @@
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Quit.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
// Quit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Statify Blacklist.
|
||||
@ -42,30 +44,12 @@ class StatifyBlacklist {
|
||||
*/
|
||||
public static $multisite;
|
||||
|
||||
/**
|
||||
* Class self initialize.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @deprecated 1.4.2 Replaced by init().
|
||||
*/
|
||||
public static function instance() {
|
||||
self::init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @deprecated 1.4.2 Replaced by init().
|
||||
*/
|
||||
public function __construct() {
|
||||
self::init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin initialization.
|
||||
*
|
||||
* @since 1.4.2
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function init() {
|
||||
// Skip on autosave or AJAX.
|
||||
@ -103,6 +87,7 @@ class StatifyBlacklist {
|
||||
* @since 1.2.1 update_options($options = null) Parameter with default value introduced.
|
||||
*
|
||||
* @param array $options Optional. New options to save.
|
||||
* @return void
|
||||
*/
|
||||
public static function update_options( $options = null ) {
|
||||
if ( self::$multisite ) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Plugin Name: Statify Blacklist
|
||||
* Plugin URI: https://wordpress.org/plugins/statify-blacklist/
|
||||
* Description: Extension for the Statify plugin to add a customizable blacklists.
|
||||
* Version: 1.4.4
|
||||
* Version: 1.5.0-alpha
|
||||
* Author: Stefan Kalscheuer (@stklcode)
|
||||
* Author URI: https://www.stklcode.de
|
||||
* Text Domain: statify-blacklist
|
||||
@ -30,8 +30,10 @@
|
||||
* along with Statify Blacklist. If not, see http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
*/
|
||||
|
||||
// Quit.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
// Quit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Constants.
|
||||
define( 'STATIFYBLACKLIST_FILE', __FILE__ );
|
||||
@ -95,6 +97,8 @@ function statify_blacklist_compatibility_check() {
|
||||
/**
|
||||
* Disable plugin if active and incompatible.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function statify_blacklist_disable() {
|
||||
@ -110,6 +114,8 @@ function statify_blacklist_disable() {
|
||||
/**
|
||||
* Admin notification for unmet requirements.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function statify_blacklist_disabled_notice() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user