PluginProbe
Wp Social Login and Register Social Counter / 1.4.4
Wp Social Login and Register Social Counter v1.4.4
3.2.1 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 All 70 releases
wp-social / app / settings.php

settings.php in Wp Social Login and Register Social Counter 1.4.4, at app/settings.php

92 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WP_Social\App;
4
5
6 class Settings {
7
8 public static $ok_counter_cached_data = 'xs_counter_options';
9 public static $ok_global_counter_setting = 'xs_counter_global_setting_data';
10 public static $ok_counter_provider_setting = 'xs_counter_providers_data';
11 public static $ok_enabled_providers_counter = 'xs_providers_enabled_counter';
12 public static $ok_enabled_providers_share = 'xs_providers_enabled_share';
13
14
15 /**
16 * todo - we will finish it later
17 *
18 */
19 public function load() {
20
21 $global = get_option(self::$ok_global_counter_setting, []);
22 $provider = get_option(self::$ok_counter_provider_setting, []);
23 }
24
25
26 /**
27 * Return caching time in seconds as set in global counter settings
28 *
29 * @return int
30 */
31 public static function get_counter_cache_time() {
32
33 $opt = get_option(self::$ok_global_counter_setting, []);
34
35 return empty($opt['global']['cache']) ? 12 * 3600 : intval(floatval($opt['global']['cache']) * 3600);
36 }
37
38
39 public static function get_counter_provider_settings() {
40
41 $opt = get_option(self::$ok_counter_provider_setting, []);
42
43 return empty($opt['social']) ? [] : $opt['social'];
44 }
45
46 public static function get_counter_provider_conf() {
47
48 $opt = get_option(self::$ok_counter_provider_setting, []);
49
50 return $opt;
51 }
52
53 public static function update_counter_provider_conf($val) {
54
55 return update_option(self::$ok_counter_provider_setting, $val);
56 }
57
58
59
60 public static function get_enabled_provider_conf_counter() {
61
62 $opt = get_option(self::$ok_enabled_providers_counter, []);
63
64 return $opt;
65 }
66
67 public static function update_enabled_provider_conf_counter($val) {
68
69 return update_option(self::$ok_enabled_providers_counter, $val);
70 }
71
72
73 public static function get_enabled_provider_conf_share() {
74
75 $opt = get_option(self::$ok_enabled_providers_share, []);
76
77 return $opt;
78 }
79
80 public static function update_enabled_provider_conf_share($val) {
81
82 return update_option(self::$ok_enabled_providers_share, $val);
83 }
84
85 public static function get_counter_cached_data() {
86
87 $opt = get_option(self::$ok_counter_cached_data, []);
88
89 return empty($opt['data']) ? [] : $opt['data'];
90 }
91 }
92