PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 1.8.2
Wp Social Login and Register Social Counter v1.8.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 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 / template / share / primary_content.php
wp-social / template / share Last commit date
primary_content.php 4 years ago share-html.php 4 years ago
primary_content.php
135 lines
1 <?php
2
3 use WP_Social\App\Settings;
4
5 defined('ABSPATH') || exit;
6
7
8 $uri_hash = md5($current_url);
9
10
11 if(!empty($styles[$selected_share_style]['package']) && $styles[$selected_share_style]['package'] == 'pro' && !WP_Social::is_pro_active()) {
12
13 ?>
14 <div class="xs_social_share_widget xs_share_url">
15 <ul>
16 <li class="xs-share-li wslu-no-extra-data">Pro plugin deactivated or invalid</li>
17 </ul>
18 </div>
19 <?php
20
21 return;
22 }
23
24 if(empty($wanted_providers)) {
25
26 return;
27 }
28
29 ?>
30
31 <div class="xs_social_share_widget xs_share_url <?php echo esc_attr($widget_style) ?>">
32
33 <?php if($show_count_markup): ?>
34
35 <div class="wslu-share-count">
36 <span class="wslu-share-count--total"><?php echo xs_format_num($total_share_count); ?></span>
37 <span class="wslu-share-count--text"><?php esc_html_e('Shares', 'wp-social') ?></span>
38 </div>
39
40 <?php endif; ?>
41
42 <ul>
43 <?php
44 $content = isset($styles[$selected_share_style]['content']) ? $styles[$selected_share_style]['content'] : '';
45
46 foreach($wanted_providers as $key => $inf) {
47
48 $counter = $share_counting[$key]['count'];
49
50 $label = isset($share_settings[$key]['data']['label']) ? $share_settings[$key]['data']['label'] : ucfirst($key);
51 $def = isset($share_settings[$key]['data']['value']) ? intval($share_settings[$key]['data']['value']) : 0;
52 $text = isset($share_settings[$key]['data']['text']) ? $share_settings[$key]['data']['text'] : '';
53
54 $getUrl = isset($core_provider[$key]['url']) ? $core_provider[$key]['url'] : '';
55 $pData = isset($core_provider[$key]['params']) ? $core_provider[$key]['params'] : [];
56
57 $urlCon = empty($core_provider[$key]['params']) ? [] : $core_provider[$key]['params'];
58
59 $old_count = isset($share_settings[$key]['data']['old_count']) ? intval($share_settings[$key]['data']['old_count']) : 0;
60 $old_count = apply_filters('wp_social_pro/provider/share/old_count', $old_count, $key);
61 $counter = $counter + $old_count;
62
63 foreach($urlCon as $k => $v) {
64
65 $urlCon[$k] = str_replace(
66 ['[%url%]', '[%title%]', '[%author%]', '[%details%]', '[%source%]', '[%media%]', '[%app_id%]'],
67 [$current_url, $title, $author, $details, $source, $media, $app_id],
68 $v
69 );
70 }
71
72 $params = http_build_query($urlCon, '&');
73
74 $cls = $key . ' ' . $extra_data_cls;
75
76 ?>
77 <li class="xs-share-li <?php echo esc_attr($cls) ?>">
78 <a href="javascript:void();"
79 id="xs_feed_<?php echo $key ?>"
80 onclick="xs_social_sharer(this);"
81 data-pid="<?php echo $postId ?>"
82 data-uri_hash="<?php echo $uri_hash ?>"
83 data-key="<?php echo $key; ?>"
84 data-xs-href="<?php echo $getUrl . '?' . $params; ?>">
85
86 <div class="xs-social-icon">
87 <span class="met-social met-social-<?php echo $key; ?>"> </span>
88 </div>
89
90 <?php
91
92 if(!empty($styles[$selected_share_style]['content']) != '') : ?>
93 <div class="wslu-both-counter-text ">
94
95 <?php if(Settings::has_number_content_in_selected_style($selected_share_style, $styles)) : ?>
96 <div class="xs-social-follower">
97 <?php echo xs_format_num($counter); ?>
98 </div>
99 <?php endif; ?>
100
101 <?php if(Settings::has_text_content_in_selected_style($selected_share_style, $styles)) : ?>
102 <div class="xs-social-follower-text">
103 <?php echo $text; ?>
104 </div>
105 <?php endif; ?>
106
107 <?php if(Settings::has_label_content_in_selected_style($selected_share_style, $styles)) : ?>
108 <div class="xs-social-follower-label">
109 <?php echo $label; ?>
110 </div>
111 <?php endif; ?>
112 </div>
113 <?php endif; ?>
114
115 <div class="wslu-hover-content">
116 <div class="xs-social-followers">
117 <?php echo xs_format_num($counter); ?>
118 </div>
119 <div class="xs-social-follower-text">
120 <?php echo $text; ?>
121 </div>
122 <div class="xs-social-follower-label">
123 <?php echo $label; ?>
124 </div>
125 </div>
126 </a>
127 </li>
128 <?php
129
130 } ?>
131 </ul>
132
133 </div>
134 <?php
135