PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 3.2.1
Wp Social Login and Register Social Counter v3.2.1
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 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 / lib / provider / share / facebook-sharer.php
wp-social / lib / provider / share Last commit date
digg-sharer.php 5 years ago email-sharer.php 5 years ago facebook-messenger-sharer.php 5 years ago facebook-sharer.php 5 years ago kik-sharer.php 5 years ago lineapp-sharer.php 1 week ago linkedin-sharer.php 5 years ago no-provider-share.php 5 years ago pinterest-sharer.php 5 years ago reddit-sharer.php 5 years ago share-interface.php 5 years ago sharer.php 5 years ago skype-sharer.php 5 years ago stumbleupon-sharer.php 5 years ago telegram-sharer.php 5 years ago trello-sharer.php 5 years ago twitter-sharer.php 5 years ago viber-sharer.php 5 years ago whatsapp-sharer.php 5 years ago
facebook-sharer.php
48 lines
1 <?php
2
3 namespace WP_Social\Lib\Provider\Share;
4
5 use WP_Social\App\Settings;
6
7 defined('ABSPATH') || exit;
8
9 class Facebook_Sharer extends Sharer {
10
11
12 /**
13 *
14 * @param int $global_cache_time
15 * @return int
16 */
17 public function get_count($global_cache_time = 43200) {
18
19 /**
20 * For now we are returning the default set value
21 * todo - give check for required info for calling api, if not found then return the default value
22 */
23
24
25 if(!empty($this->global_options['enable'])) {
26
27 $tran_key = $this->get_transient_key();
28 $trans_value = get_transient($tran_key);
29
30 if(true || false === $trans_value) {
31
32 $set = Settings::instance()->get_providers_settings_share();
33
34 $result = empty($set['social'][$this->key]['data']['value']) ? 0 : intval($set['social'][$this->key]['data']['value']);
35
36 $expiration_time = empty($global_cache_time) ? 43200 : intval($global_cache_time);
37
38 set_transient($tran_key, $result, $expiration_time);
39
40 return $result;
41 }
42
43 return $trans_value;
44 }
45
46 return 0;
47 }
48 }