PluginProbe
Social Share Buttons / 1.5
Social Share Buttons v1.5
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 +33 -77 1.181.5 View file →
@@ -1,8 +1,22 @@
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 +
5 19 class diggNetwork extends mbNetwork
6 20 {
7 21 protected $network = 'digg';
8 22 protected $icon = 'fa-digg';
@@ -25,22 +39,15 @@
25 39 protected $icon = 'fa-envelope';
26 40 protected $icon_type = 'fas';
27 41 protected $color = '#5e5e5e';
28 42 protected $forcesamewindow = true;
29 - protected $is_popup = false;
30 43
31 44 public function __construct()
32 45 {
46 + parent::__construct();
33 47 $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 - }
48 + $this->share_url = 'mailto:?subject={title}&body={url}';
39 49 $this->popup = false;
40 -
41 - parent::__construct();
42 -
43 50 }
44 51 }
45 52
46 53 class facebookNetwork extends mbNetwork
@@ -51,8 +58,10 @@
51 58 protected $color = '#3b5998';
52 59
53 60 public function __construct()
54 61 {
62 + parent::__construct();
63 +
55 64 $this->label = __('Share', 'mbsocial');
56 65 $this->share_url = 'https://www.facebook.com/sharer.php?u={url}';
57 66 $this->profile_url = 'https://www.facebook.com/{profile}';
58 67 $this->countable = true;
@@ -59,9 +68,8 @@
59 68 $this->count_api = 'https://graph.facebook.com/{url}';
60 69 $this->return_var = 'share|share_count';
61 70 $this->popup_dimensions = array(550,320);
62 71
63 - parent::__construct();
64 72 }
65 73
66 74 }
67 75
@@ -71,15 +79,13 @@
71 79 protected $icon = 'fa-linkedin-in';
72 80 protected $color = '#007bb6';
73 81 protected $priority = 'unselected';
74 82
75 -
76 83 public function __construct()
77 84 {
85 + parent::__construct();
78 86 $this->label = __('Share','mbsocial');
79 87 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}';
80 - $this->alternate_url = 'https://www.linkedin.com/company/{profile}';
81 - $this->alternate_label = __('Company Profile');
82 88 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
83 89 // Linkedin counts where killed
84 90 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
85 91 //$this->countable = true;
@@ -85,11 +91,8 @@
85 91 //$this->countable = true;
86 92 //$this->return_var = 'count';
87 93
88 94 $this->popup_dimensions = array(700,500);
89 -
90 - parent::__construct();
91 -
92 95 }
93 96
94 97 }
95 98
@@ -100,18 +103,15 @@
100 103 protected $icon = 'fa-print';
101 104 protected $icon_type = 'fas';
102 105 protected $color = '#5e5e5e';
103 106 protected $forcesamewindow = true;
104 - protected $is_popup = false;
105 107
106 108 public function __construct()
107 109 {
110 + parent::__construct();
108 111 $this->label = __('Print', 'mbsocial');
109 112 $this->share_url = 'javascript:window.print()';
110 113 $this->popup = false;
111 -
112 - parent::__construct();
113 -
114 114 }
115 115 }
116 116
117 117
@@ -123,8 +123,9 @@
123 123 protected $color = '#eb4924';
124 124
125 125 public function __construct()
126 126 {
127 + parent::__construct();
127 128 $this->label = __('Share','mbsocial');
128 129 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
129 130 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
130 131 $this->countable = true;
@@ -129,9 +130,9 @@
129 130 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
130 131 $this->countable = true;
131 132 $this->return_var = 'result|views';
132 133
133 - parent::__construct();
134 +
134 135 }
135 136 }
136 137
137 138 class redditNetwork extends mbNetwork
@@ -143,8 +144,9 @@
143 144
144 145
145 146 public function __construct()
146 147 {
148 + parent::__construct();
147 149 $this->label = __('Share', 'mbsocial');
148 150 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
149 151 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
150 152 $this->countable = true;
@@ -151,9 +153,8 @@
151 153 $this->profile_url = 'https://www.reddit.com/user/{profile}';
152 154 $this->return_var = 'data|children|0|data|score';
153 155 $this->popup_dimensions = array(800,500);
154 156
155 - parent::__construct();
156 157
157 158 }
158 159
159 160 }
@@ -169,13 +170,12 @@
169 170 protected $displayDesktop = false;
170 171
171 172 public function __construct()
172 173 {
174 + parent::__construct();
173 175 $this->label = __('Send', 'mbsocial');
174 176 $this->share_url = 'whatsapp://send?text={url} {title}';
175 177
176 - parent::__construct();
177 -
178 178 }
179 179
180 180 }
181 181
@@ -187,15 +187,14 @@
187 187 protected $color = '#517fa4';
188 188
189 189 public function __construct()
190 190 {
191 + parent::__construct();
191 192 $this->popup = false;
192 193
193 194 $this->label = __('Follow', 'mbsocial');
194 195 $this->profile_url = 'https://instagram.com/{profile}';
195 196
196 - parent::__construct();
197 -
198 197 }
199 198
200 199 }
201 200
@@ -208,14 +207,15 @@
208 207 protected $color = '#bb0000';
209 208
210 209 public function __construct()
211 210 {
211 + parent::__construct();
212 +
212 213 $this->popup = false;
213 214
214 215 $this->label = __('View', 'mbsocial');
215 216 $this->profile_url = 'https://youtube.com/{profile}';
216 217
217 - parent::__construct();
218 218 }
219 219 }
220 220
221 221 class snapchatNetwork extends mbNetwork
@@ -228,14 +228,13 @@
228 228 protected $displayDesktop = false;
229 229
230 230 public function __construct()
231 231 {
232 + parent::__construct();
232 233 $this->popup = false;
233 234 $this->label = __('Follow', 'mbsocial');
234 235 $this->profile_url = 'https://snapchat.com/{profile}';
235 236
236 - parent::__construct();
237 -
238 237 }
239 238
240 239 }
241 240
@@ -251,15 +250,15 @@
251 250 // protected $profile_placeholder = '';
252 251
253 252 public function __construct()
254 253 {
254 + parent::__construct();
255 +
255 256 $this->nice_name = __('RSS', 'mbsocial');
256 257 $this->profile_placeholder = __('Feed URL', 'mbsocial');
257 258 $this->popup = false;
258 259 $this->label = __('Follow', 'mbsocial');
259 260 $this->profile_url = '{profile}';
260 - parent::__construct();
261 -
262 261 }
263 262 /*
264 263 public function get_url()
265 264 {
@@ -272,8 +271,9 @@
272 271 } */
273 272
274 273 }
275 274
275 +
276 276 class vimeoNetwork extends mbNetwork
277 277 {
278 278 protected $network = 'vimeo';
279 279 protected $priority = 'readmore';
@@ -281,57 +281,13 @@
281 281 protected $color = '#1ab7ea';
282 282
283 283 public function __construct()
284 284 {
285 + parent::__construct();
286 +
285 287 $this->popup = false;
286 288 $this->label = __('View', 'mbsocial');
287 289 $this->profile_url = 'https://vimeo.com/{profile}';
288 290
289 - parent::__construct();
290 291
291 292 }
292 -}
293 -
294 -class tiktokNetwork extends mbNetwork
295 -{
296 -
297 - protected $network = 'tiktok';
298 - protected $priority = 'readmore';
299 - protected $icon = 'fa-tiktok';
300 - protected $icon_type = 'fab';
301 - protected $color = '#010101';
302 -
303 - public function __construct()
304 - {
305 - $this->popup = false;
306 - $this->nice_name = __('TikTok', 'mbsocial');
307 - $this->label = __('Follow', 'mbsocial');
308 - $this->profile_url = 'https://tiktok.com/{profile}';
309 -
310 - parent::__construct();
311 -
312 - }
313 -}
314 -
315 -
316 -class phoneNetwork extends mbNetwork
317 -{
318 - protected $network = 'phone';
319 - protected $priority = 'readmore';
320 - protected $icon = 'fa-phone';
321 - protected $icon_type = 'fas';
322 - protected $color = '#00932c';
323 -
324 - public function __construct()
325 - {
326 - $this->popup =false;
327 - $this->nice_name = __('Phone Number', 'mbsocial');
328 - $this->label = __('Call', 'mbsocial');
329 - $this->profile_url = 'tel:{profile}';
330 - $this->profile_placeholder = __('Phone Number', 'mbsocial');
331 - $this->displayDesktop = false;
332 -
333 - parent::__construct();
334 - }
335 -
336 -
337 293 }