| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | exit( 'This script cannot be accessed directly.' ); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | |
| 11 | +use RadiusTheme\SB\Models\ExtraSettings; | |
| 11 | 12 | use RadiusTheme\SB\Traits\SingletonTrait; |
| 12 | 13 | |
| 13 | 14 | final class Compare { |
| 14 | 15 | |
| @@ -23,12 +24,18 @@ | ||
| 23 | 24 | use SingletonTrait; |
| 24 | 25 | |
| 25 | 26 | function __construct() { |
| 26 | 27 | |
| 27 | - if ( ! get_option( $this->compare_db_key, '' ) ) { | |
| 28 | + if( ! ExtraSettings::instance()->get_option( $this->compare_db_key, get_option( $this->compare_db_key, false ) ) ){ | |
| 28 | 29 | add_action( 'wp_loaded', [ $this, 'activate' ] ); |
| 29 | - update_option( $this->compare_db_key, $this->compare_db_version ); | |
| 30 | + ExtraSettings::instance()->set_option( $this->compare_db_key, $this->compare_db_version ); | |
| 30 | 31 | } |
| 32 | + | |
| 33 | + //if ( ! get_option( $this->compare_db_key, '' ) ) { | |
| 34 | + // add_action( 'wp_loaded', [ $this, 'activate' ] ); | |
| 35 | + // update_option( $this->compare_db_key, $this->compare_db_version ); | |
| 36 | + //} | |
| 37 | + | |
| 31 | 38 | CompareFrontEnd::instance(); |
| 32 | 39 | |
| 33 | 40 | new CompareRouteV1(); |
| 34 | 41 | |