diff --git a/includes/class-main.php b/includes/class-main.php index 4769845..eba7f33 100644 --- a/includes/class-main.php +++ b/includes/class-main.php @@ -8,11 +8,9 @@ namespace WebberZone\Top_Ten; use WebberZone\Top_Ten\Admin\Cron; - if ( ! defined( 'WPINC' ) ) { exit; } - /** * Main plugin class. * @@ -128,7 +126,6 @@ public static function get_instance() { self::$instance = new self(); self::$instance->init(); } - return self::$instance; } @@ -155,21 +152,13 @@ private function init() { $this->blocks = new Frontend\Blocks\Blocks(); $this->feed = new Frontend\Feed(); $this->cron = new Cron(); - $this->hooks(); - if ( is_admin() ) { $this->admin = new Admin\Admin(); if ( is_multisite() ) { $this->admin = new Admin\Network\Admin(); } } - - if ( tptn_freemius()->is__premium_only() ) { - if ( tptn_freemius()->can_use_premium_code() ) { - $this->pro = new Pro\Pro(); - } - } } /** @@ -199,9 +188,10 @@ public function initiate_plugin() { * @since 3.3.0 */ public function register_widgets() { - register_widget( '\WebberZone\Top_Ten\Frontend\Widgets\Posts_Widget' ); - register_widget( '\WebberZone\Top_Ten\Frontend\Widgets\Count_Widget' ); + register_widget( '\\WebberZone\\Top_Ten\\Frontend\\Widgets\\Posts_Widget' ); + register_widget( '\\WebberZone\\Top_Ten\\Frontend\\Widgets\\Count_Widget' ); } + /** * Function to register our new routes from the controller. * diff --git a/includes/load-freemius.php b/includes/load-freemius.php index f42e593..a3c888c 100644 --- a/includes/load-freemius.php +++ b/includes/load-freemius.php @@ -20,23 +20,22 @@ function tptn_freemius() { require_once TOP_TEN_PLUGIN_DIR . 'freemius/start.php'; $tptn_freemius = \fs_dynamic_init( array( - 'id' => '16384', - 'slug' => 'top-10', - 'premium_slug' => 'top-10-pro', - 'type' => 'plugin', - 'public_key' => 'pk_bc8489856ce399cf3cc8fd49fc9d3', - 'is_premium' => true, - 'has_premium_version' => true, - 'premium_suffix' => 'Pro', - 'has_addons' => false, - 'has_paid_plans' => true, - 'menu' => array( + 'id' => '16384', + 'slug' => 'top-10', + 'premium_slug' => 'top-10-pro', + 'type' => 'plugin', + 'public_key' => 'pk_bc8489856ce399cf3cc8fd49fc9d3', + 'is_premium' => false, + 'premium_suffix' => 'Pro', + 'has_addons' => false, + 'has_paid_plans' => true, + 'menu' => array( 'slug' => 'tptn_dashboard', 'contact' => false, 'support' => false, 'network' => true, ), - 'is_live' => true, + 'is_live' => true, ) ); } @@ -59,9 +58,6 @@ function tptn_freemius_get_plugin_icon() { */ function tptn_freemius_uninstall() { require_once dirname( __DIR__ ) . '/uninstaller.php'; - if ( tptn_freemius()->can_use_premium_code__premium_only() ) { - \WebberZone\Top_Ten\Pro\Pro::uninstall_pro(); - } } // Init Freemius.