PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 2.2.4
Wp Social Login and Register Social Counter v2.2.4
trunk 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.11 1.3.2 1.3.3 1.3.4 1.3.6 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.4 1.4.5 1.4.6 1.4.8 1.4.9 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.8 2.2.9 3.0.0 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0
wp-social / app / counter-settings.php
wp-social / app Last commit date
api-routes.php 5 years ago avatar.php 4 years ago counter-settings.php 5 years ago legacy.php 5 years ago login-settings.php 3 years ago providers.php 3 years ago route.php 4 years ago settings.php 5 years ago share-settings.php 4 years ago share.php 3 years ago
counter-settings.php
96 lines
1 <?php
2
3 namespace WP_Social\App;
4
5 use WP_Social\Traits\Singleton;
6
7 defined('ABSPATH') || exit;
8
9 class Counter_Settings {
10
11 use Singleton;
12
13 const OK_GLOBAL = 'xs_counter_global_setting_data';
14 const OK_STYLES = 'xs_style_setting_data_counter';
15 const OK_PROVIDER = 'xs_counter_providers_data';
16 const OK_PROVIDER_ENABLED = 'xs_providers_enabled_counter';
17
18 private $global;
19 private $providers;
20 private $enabled;
21 private $styles;
22
23
24 public function __construct() {
25
26 $this->global = get_option(self::OK_GLOBAL, []);
27 $this->enabled = get_option(self::OK_PROVIDER_ENABLED, []);
28 $this->providers = get_option(self::OK_PROVIDER, []);
29 $this->styles = get_option(self::OK_STYLES, []);
30 }
31
32
33 public function get_enabled_providers() {
34
35 return $this->enabled;
36 }
37
38
39 public function update_enabled_providers($val) {
40
41 $this->enabled = $val;
42
43 update_option(self::OK_PROVIDER_ENABLED, $val, true);
44
45 return $this;
46 }
47
48
49 public function get_provider_settings() {
50
51 return $this->providers;
52 }
53
54
55 public function update_provider_settings($val) {
56
57 $this->providers = $val;
58
59 update_option(self::OK_PROVIDER, $val, true);
60
61 return $this;
62 }
63
64
65 public function get_style_settings() {
66
67 return $this->styles;
68 }
69
70
71 public function update_style_settings($val) {
72
73 $this->styles = $val;
74
75 update_option(self::OK_STYLES, $val, true);
76
77 return $this;
78 }
79
80
81 public function get_global_settings() {
82
83 return $this->global;
84 }
85
86
87 public function update_global_settings($val) {
88
89 $this->global = $val;
90
91 update_option(self::OK_GLOBAL, $val, true);
92
93 return $this;
94 }
95 }
96