diff --git a/composer.json b/composer.json index f5ea67c..afe93f9 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "stklcode/statify-blacklist", - "version": "1.4.1", + "version": "1.4.2-alpha", "description": "A blacklist extension for the famous Statify WordPress plugin", "keywords": [ "wordpress", diff --git a/inc/class-statifyblacklist.php b/inc/class-statifyblacklist.php index 879b554..73dfc95 100644 --- a/inc/class-statifyblacklist.php +++ b/inc/class-statifyblacklist.php @@ -46,17 +46,28 @@ class StatifyBlacklist { * Class self initialize. * * @since 1.0.0 + * @deprecated 1.4.2 Replaced by init(). */ public static function instance() { - new self(); + 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 + */ + public static function init() { // Skip on autosave or AJAX. if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { return; diff --git a/package.json b/package.json index 0db4ef5..14faee3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "statify-blacklist", - "version": "1.4.1", + "version": "1.4.2-alpha", "description": "A blacklist extension for the famous Statify WordPress plugin", "author": "Stefan Kalscheuer", "license": "GPLv2 or later", diff --git a/statify-blacklist.php b/statify-blacklist.php index 29ddabd..d4ad754 100644 --- a/statify-blacklist.php +++ b/statify-blacklist.php @@ -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.1 + * Version: 1.4.2-alpha * Author: Stefan Kalscheuer (@stklcode) * Author URI: https://www.stklcode.de * Text Domain: statify-blacklist @@ -40,7 +40,7 @@ define( 'STATIFYBLACKLIST_DIR', dirname( __FILE__ ) ); define( 'STATIFYBLACKLIST_BASE', plugin_basename( __FILE__ ) ); // System Hooks. -add_action( 'plugins_loaded', array( 'StatifyBlacklist', 'instance' ) ); +add_action( 'plugins_loaded', array( 'StatifyBlacklist', 'init' ) ); register_activation_hook( STATIFYBLACKLIST_FILE, array( 'StatifyBlacklist_System', 'install' ) );