| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | use Elementor\Plugin; |
| 7 | 7 | use Elementor\TemplateLibrary\Source_Base; |
| 8 | 8 | use RadiusTheme\SB\Helpers\BuilderFns; |
| 9 | 9 | use RadiusTheme\SB\Helpers\Fns; |
| 10 | -use RadiusTheme\SB\Models\TemplateSettings; | |
| 11 | 10 | use RadiusTheme\SB\Traits\SingletonTrait; |
| 12 | 11 | |
| 13 | 12 | // Do not allow directly accessing this file. |
| 14 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -147,16 +146,13 @@ | ||
| 147 | 146 | $category_archive = array_unique( isset( $_POST['category_archive'] ) && is_array( $_POST['category_archive'] ) ? array_map( 'sanitize_text_field', $_POST['category_archive'] ) : [] ); |
| 148 | 147 | $the_products = array_unique( isset( $_POST['the_products'] ) && is_array( $_POST['the_products'] ) ? array_map( 'absint', $_POST['the_products'] ) : [] ); |
| 149 | 148 | if ( ! count( $the_products ) && ! count( $category_archive ) ) { |
| 150 | 149 | if ( 'default_template' === $default_template ) { |
| 151 | - // update_option( $option_name, $page_id ); | |
| 152 | - TemplateSettings::instance()->set_option( $option_name, $page_id ); | |
| 150 | + update_option( $option_name, $page_id ); | |
| 153 | 151 | } else { |
| 154 | - // $has_default = get_option( $option_name ); | |
| 155 | - $has_default = TemplateSettings::instance()->get_option( $option_name ); | |
| 152 | + $has_default = get_option( $option_name ); | |
| 156 | 153 | if ( ! $has_default ) { |
| 157 | - // update_option( $option_name, '' ); | |
| 158 | - TemplateSettings::instance()->set_option( $option_name, '' ); | |
| 154 | + update_option( $option_name, '' ); | |
| 159 | 155 | } |
| 160 | 156 | } |
| 161 | 157 | } |
| 162 | 158 | |