PluginProbe
Wp Social Login and Register Social Counter / 1.4.2
Wp Social Login and Register Social Counter v1.4.2
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.2, at app/settings.php

54 lines 1.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_global_counter_setting = 'xs_counter_global_setting_data';
9 public static $ok_counter_provider_setting = 'xs_counter_providers_data';
10 public static $ok_counter_cached_data = 'xs_counter_options';
11
12
13 /**
14 * todo - we will finish it later
15 *
16 */
17 public function load() {
18
19 $global = get_option(self::$ok_global_counter_setting, []);
20 $provider = get_option(self::$ok_counter_provider_setting, []);
21 }
22
23
24 /**
25 * Return caching time in seconds
26 *
27 * @return int
28 */
29 public static function get_counter_cache_time() {
30
31 $opt = get_option(self::$ok_global_counter_setting, []);
32
33 return empty($opt['global']['cache']) ? 12 * 3600 : intval($opt['global']['cache']) * 3600;
34 }
35
36
37 public static function get_counter_provider_settings() {
38
39 $opt = get_option(self::$ok_counter_provider_setting, []);
40
41 return empty($opt['social']) ? [] : $opt['social'];
42 }
43
44
45 public static function get_counter_cached_data() {
46
47 $opt = get_option(self::$ok_counter_cached_data, []);
48
49 return empty($opt['data']) ? [] : $opt['data'];
50 }
51
52
53
54 }