PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.5.0
ShopBuilder – WooCommerce Builder For Elementor v2.5.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Abstracts / AbsSettings.php

AbsSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.5.0, at app/Abstracts/AbsSettings.php

63 lines 989 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RadiusTheme\SB\Abstracts;
4
5 // Do not allow directly accessing this file.
6 use RadiusTheme\SB\Models\DataModel;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit( 'This script cannot be accessed directly.' );
10 }
11
12 /**
13 * Template Related Settings
14 */
15 abstract class AbsSettings {
16 /**
17 * @var
18 */
19 private $source;
20
21 /**
22 * Set Source
23 */
24 public function __construct() {
25 $this->source = DataModel::source( $this->source() );
26 }
27
28 /**
29 * @return string
30 */
31 abstract public function source();
32
33 /**
34 * @param $key
35 * @param $value
36 *
37 * @return void
38 */
39 public function set_option( $key, $value ) {
40 $this->source->set_option( $key, $value );
41 }
42
43 /**
44 * @param $key
45 * @param $default
46 *
47 * @return mixed|null
48 */
49 public function get_option( $key, $default = null ) {
50 return $this->source->get_option( $key, $default);
51 }
52
53 /**
54 * @param $key
55 *
56 * @return true
57 */
58 public function delete_option( $key ) {
59 return $this->source->delete_option( $key);
60 }
61
62 }
63