| @@ -1,51 +1,52 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -namespace RadiusTheme\SB\Modules\Compare; | |
| 4 | - | |
| 5 | -// Do not allow directly accessing this file. | |
| 6 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 7 | - exit( 'This script cannot be accessed directly.' ); | |
| 8 | -} | |
| 9 | - | |
| 10 | - | |
| 11 | -use RadiusTheme\SB\Traits\SingletonTrait; | |
| 12 | - | |
| 13 | -final class Compare { | |
| 14 | - | |
| 15 | - /** | |
| 16 | - * @var array | |
| 17 | - */ | |
| 18 | - public $settings = []; | |
| 19 | - | |
| 20 | - private $compare_db_key = 'rtsb_compare_db_version'; | |
| 21 | - private $compare_db_version = '1.0.0'; | |
| 22 | - | |
| 23 | - use SingletonTrait; | |
| 24 | - | |
| 25 | - function __construct() { | |
| 26 | - | |
| 27 | - if ( ! get_option( $this->compare_db_key, '' ) ) { | |
| 28 | - add_action( 'wp_loaded', [ $this, 'activate' ] ); | |
| 29 | - update_option( $this->compare_db_key, $this->compare_db_version ); | |
| 30 | - } | |
| 31 | - CompareFrontEnd::instance(); | |
| 32 | - | |
| 33 | - new CompareRouteV1(); | |
| 34 | - | |
| 35 | - if ( is_admin() ) { | |
| 36 | - CompareAdmin::instance(); | |
| 37 | - } | |
| 38 | - | |
| 39 | - do_action( 'rtsb/module/compare/loaded' ); | |
| 40 | - } | |
| 41 | - | |
| 42 | - /** | |
| 43 | - * Do stuff upon plugin activation | |
| 44 | - * | |
| 45 | - * @return void | |
| 46 | - */ | |
| 47 | - public function activate() { | |
| 48 | - ( new CompareInstaller() )->run(); | |
| 49 | - } | |
| 50 | - | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +namespace RadiusTheme\SB\Modules\Compare; | |
| 4 | + | |
| 5 | +// Do not allow directly accessing this file. | |
| 6 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 7 | + exit( 'This script cannot be accessed directly.' ); | |
| 8 | +} | |
| 9 | + | |
| 10 | + | |
| 11 | +use RadiusTheme\SB\Traits\SingletonTrait; | |
| 12 | + | |
| 13 | +final class Compare { | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * @var array | |
| 17 | + */ | |
| 18 | + public $settings = []; | |
| 19 | + | |
| 20 | + //protected $module_id = 'compare'; | |
| 21 | + private $compare_db_key = 'rtsb_compare_db_version'; | |
| 22 | + private $compare_db_version = '1.0.0'; | |
| 23 | + | |
| 24 | + use SingletonTrait; | |
| 25 | + | |
| 26 | + function __construct() { | |
| 27 | + | |
| 28 | + if ( ! get_option( $this->compare_db_key, '' ) ) { | |
| 29 | + add_action( 'wp_loaded', [ $this, 'activate' ] ); | |
| 30 | + update_option( $this->compare_db_key, $this->compare_db_version ); | |
| 31 | + } | |
| 32 | + CompareFrontEnd::instance(); | |
| 33 | + | |
| 34 | + new CompareRouteV1(); | |
| 35 | + | |
| 36 | + if ( is_admin() ) { | |
| 37 | + CompareAdmin::instance(); | |
| 38 | + } | |
| 39 | + | |
| 40 | + do_action( 'rtsb/module/compare/loaded' ); | |
| 41 | + } | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * Do stuff upon plugin activation | |
| 45 | + * | |
| 46 | + * @return void | |
| 47 | + */ | |
| 48 | + public function activate() { | |
| 49 | + ( new CompareInstaller() )->run(); | |
| 50 | + } | |
| 51 | + | |
| 51 | 52 | } |