PluginProbe
Social Share Buttons / 1.30
Social Share Buttons v1.30
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
← All changes | classes/network/simple.php +87 -46 1.11.30 View file →
@@ -1,22 +1,8 @@
1 1 <?php
2 2 namespace MBSocial;
3 3 defined('ABSPATH') or die('No direct access permitted');
4 4
5 -/*
6 -class blogLovingNetwork extends mbNetwork
7 -{
8 - protected $network = 'blogloving';
9 - protected $icon = 'fa-bold';
10 -
11 -
12 - public function __construct()
13 - {
14 -
15 - $this->popup = false;
16 - }
17 -} */
18 -
19 5 class diggNetwork extends mbNetwork
20 6 {
21 7 protected $network = 'digg';
22 8 protected $icon = 'fa-digg';
@@ -36,17 +22,24 @@
36 22 class emailNetwork extends mbNetwork
37 23 {
38 24 protected $network = 'email';
39 25 protected $icon = 'fa-envelope';
26 + protected $icon_type = 'fas';
40 27 protected $color = '#5e5e5e';
41 28 protected $forcesamewindow = true;
29 + protected $is_popup = false;
42 30
43 31 public function __construct()
44 32 {
33 + $this->label = __('Email', 'mbsocial');
34 + if (Install::isPro() )
35 + $this->share_url = 'mailto:?subject={email_subject}&body={email_content}';
36 + else {
37 + $this->share_url = 'mailto:?subject={title}&body={url}';
38 + }
39 +
45 40 parent::__construct();
46 - $this->label = __('Email', 'mbsocial');
47 - $this->share_url = 'mailto:?subject={title}&body={url}';
48 - $this->popup = false;
41 +
49 42 }
50 43 }
51 44
52 45 class facebookNetwork extends mbNetwork
@@ -52,15 +45,13 @@
52 45 class facebookNetwork extends mbNetwork
53 46 {
54 47 protected $network = 'facebook';
55 48
56 - protected $icon = 'fa-facebook';
49 + protected $icon = 'fa-facebook-f';
57 50 protected $color = '#3b5998';
58 51
59 52 public function __construct()
60 53 {
61 - parent::__construct();
62 -
63 54 $this->label = __('Share', 'mbsocial');
64 55 $this->share_url = 'https://www.facebook.com/sharer.php?u={url}';
65 56 $this->profile_url = 'https://www.facebook.com/{profile}';
66 57 $this->countable = true;
@@ -67,8 +58,9 @@
67 58 $this->count_api = 'https://graph.facebook.com/{url}';
68 59 $this->return_var = 'share|share_count';
69 60 $this->popup_dimensions = array(550,320);
70 61
62 + parent::__construct();
71 63 }
72 64
73 65 }
74 66
@@ -74,16 +66,19 @@
74 66
75 67 class linkedinNetwork extends mbNetwork
76 68 {
77 69 protected $network = 'linkedin';
78 - protected $icon = 'fa-linkedin';
70 + protected $icon = 'fa-linkedin-in';
79 71 protected $color = '#007bb6';
72 + protected $priority = 'unselected';
80 73
74 +
81 75 public function __construct()
82 76 {
83 - parent::__construct();
84 77 $this->label = __('Share','mbsocial');
85 78 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}';
79 + $this->alternate_url = 'https://www.linkedin.com/company/{profile}';
80 + $this->alternate_label = __('Company Profile');
86 81 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
87 82 // Linkedin counts where killed
88 83 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
89 84 //$this->countable = true;
@@ -89,8 +84,11 @@
89 84 //$this->countable = true;
90 85 //$this->return_var = 'count';
91 86
92 87 $this->popup_dimensions = array(700,500);
88 +
89 + parent::__construct();
90 +
93 91 }
94 92
95 93 }
96 94
@@ -98,17 +96,20 @@
98 96 class printNetwork extends mbNetwork
99 97 {
100 98 protected $network = 'print';
101 99 protected $icon = 'fa-print';
100 + protected $icon_type = 'fas';
102 101 protected $color = '#5e5e5e';
103 102 protected $forcesamewindow = true;
103 + protected $is_popup = false;
104 104
105 105 public function __construct()
106 106 {
107 - parent::__construct();
108 107 $this->label = __('Print', 'mbsocial');
109 108 $this->share_url = 'javascript:window.print()';
110 - $this->popup = false;
109 +
110 + parent::__construct();
111 +
111 112 }
112 113 }
113 114
114 115
@@ -120,9 +121,8 @@
120 121 protected $color = '#eb4924';
121 122
122 123 public function __construct()
123 124 {
124 - parent::__construct();
125 125 $this->label = __('Share','mbsocial');
126 126 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
127 127 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
128 128 $this->countable = true;
@@ -127,9 +127,9 @@
127 127 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
128 128 $this->countable = true;
129 129 $this->return_var = 'result|views';
130 130
131 -
131 + parent::__construct();
132 132 }
133 133 }
134 134
135 135 class redditNetwork extends mbNetwork
@@ -141,9 +141,8 @@
141 141
142 142
143 143 public function __construct()
144 144 {
145 - parent::__construct();
146 145 $this->label = __('Share', 'mbsocial');
147 146 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
148 147 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
149 148 $this->countable = true;
@@ -150,8 +149,9 @@
150 149 $this->profile_url = 'https://www.reddit.com/user/{profile}';
151 150 $this->return_var = 'data|children|0|data|score';
152 151 $this->popup_dimensions = array(800,500);
153 152
153 + parent::__construct();
154 154
155 155 }
156 156
157 157 }
@@ -167,12 +167,13 @@
167 167 protected $displayDesktop = false;
168 168
169 169 public function __construct()
170 170 {
171 - parent::__construct();
172 171 $this->label = __('Send', 'mbsocial');
173 172 $this->share_url = 'whatsapp://send?text={url} {title}';
174 173
174 + parent::__construct();
175 +
175 176 }
176 177
177 178 }
178 179
@@ -184,14 +185,14 @@
184 185 protected $color = '#517fa4';
185 186
186 187 public function __construct()
187 188 {
188 - parent::__construct();
189 - $this->popup = false;
190 189
191 190 $this->label = __('Follow', 'mbsocial');
192 191 $this->profile_url = 'https://instagram.com/{profile}';
193 192
193 + parent::__construct();
194 +
194 195 }
195 196
196 197 }
197 198
@@ -201,19 +202,16 @@
201 202 protected $network = 'youtube';
202 203 protected $priority = 'readmore';
203 204 protected $icon = 'fa-youtube';
204 205 protected $color = '#bb0000';
206 + protected $is_popup = false;
205 207
206 208 public function __construct()
207 209 {
208 - parent::__construct();
209 -
210 - $this->popup = false;
211 -
212 210 $this->label = __('View', 'mbsocial');
213 - $this->profile_url = 'https://youtube.com/user/{profile}';
211 + $this->profile_url = 'https://youtube.com/{profile}';
214 212
215 -
213 + parent::__construct();
216 214 }
217 215 }
218 216
219 217 class snapchatNetwork extends mbNetwork
@@ -222,16 +220,17 @@
222 220 protected $priority = 'readmore';
223 221 protected $icon = 'fa-snapchat';
224 222 // protected $color = '#fffc00';
225 223 protected $color = '#000';
224 + protected $displayDesktop = false;
226 225
227 226 public function __construct()
228 227 {
229 - parent::__construct();
230 - $this->popup = false;
231 228 $this->label = __('Follow', 'mbsocial');
232 229 $this->profile_url = 'https://snapchat.com/{profile}';
233 230
231 + parent::__construct();
232 +
234 233 }
235 234
236 235 }
237 236
@@ -239,22 +238,23 @@
239 238 {
240 239 protected $network = 'rss';
241 240 protected $priority = 'readmore';
242 241 protected $icon = 'fa-rss';
242 + protected $icon_type = 'fas';
243 243 protected $color = '#F99000';
244 244
245 245 protected $share_profile = false;
246 + protected $is_popup = false;
246 247 // protected $profile_placeholder = '';
247 248
248 249 public function __construct()
249 250 {
250 - parent::__construct();
251 -
252 251 $this->nice_name = __('RSS', 'mbsocial');
253 252 $this->profile_placeholder = __('Feed URL', 'mbsocial');
254 - $this->popup = false;
255 253 $this->label = __('Follow', 'mbsocial');
256 254 $this->profile_url = '{profile}';
255 + parent::__construct();
256 +
257 257 }
258 258 /*
259 259 public function get_url()
260 260 {
@@ -267,23 +267,64 @@
267 267 } */
268 268
269 269 }
270 270
271 -
272 271 class vimeoNetwork extends mbNetwork
273 272 {
274 273 protected $network = 'vimeo';
275 274 protected $priority = 'readmore';
276 - protected $icon = 'fa-vimeo';
275 + protected $icon = 'fa-vimeo-v';
277 276 protected $color = '#1ab7ea';
278 277
279 278 public function __construct()
280 279 {
280 + $this->label = __('View', 'mbsocial');
281 + $this->profile_url = 'https://vimeo.com/{profile}';
282 +
281 283 parent::__construct();
282 284
283 - $this->popup = false;
284 - $this->label = __('View', 'mbsocial');
285 - $this->profile_url = 'https://vimeo.com/{profile}';
285 + }
286 +}
286 287
288 +class tiktokNetwork extends mbNetwork
289 +{
287 290
291 + protected $network = 'tiktok';
292 + protected $priority = 'readmore';
293 + protected $icon = 'fa-tiktok';
294 + protected $icon_type = 'fab';
295 + protected $color = '#010101';
296 +
297 + public function __construct()
298 + {
299 + $this->nice_name = __('TikTok', 'mbsocial');
300 + $this->label = __('Follow', 'mbsocial');
301 + $this->profile_url = 'https://tiktok.com/{profile}';
302 +
303 + parent::__construct();
304 +
288 305 }
306 +}
307 +
308 +
309 +class phoneNetwork extends mbNetwork
310 +{
311 + protected $network = 'phone';
312 + protected $priority = 'readmore';
313 + protected $icon = 'fa-phone';
314 + protected $icon_type = 'fas';
315 + protected $color = '#00932c';
316 + protected $is_popup = false;
317 +
318 + public function __construct()
319 + {
320 + $this->nice_name = __('Phone Number', 'mbsocial');
321 + $this->label = __('Call', 'mbsocial');
322 + $this->profile_url = 'tel:{profile}';
323 + $this->profile_placeholder = __('Phone Number', 'mbsocial');
324 + $this->displayDesktop = false;
325 +
326 + parent::__construct();
327 + }
328 +
329 +
289 330 }