PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / admin / settings.php

settings.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/admin/settings.php

43 lines 957 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace StoreEngine\Admin;
3
4 use StoreEngine\Admin\Settings\Base;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 class Settings {
11
12 public static function init() {
13 $self = new self();
14 $self->save_settings();
15 }
16
17 /**
18 * Load settings.
19 * Load store settings in global variable as `$storeengine_settings` and `$storeengine_addons`.
20 * use `Helper::get_settings()` to retrieve setting by settings name.
21 *
22 * @see \StoreEngine\Utils\Helper::get_settings()
23 *
24 * @since 1.6.4
25 *
26 * @return void
27 */
28 public static function load_settings() {
29 $GLOBALS['storeengine_settings'] = apply_filters( 'storeengine_settings', json_decode( get_option( STOREENGINE_SETTINGS_NAME, '{}' ) ) );
30 $GLOBALS['storeengine_addons'] = json_decode( get_option( STOREENGINE_ADDONS_SETTINGS_NAME, '{}' ) );
31 }
32
33 /**
34 * Save base settings.
35 *
36 * @return void
37 */
38 public static function save_settings() {
39 Base::save_settings();
40 self::load_settings();
41 }
42 }
43