PluginProbe
Social Share Buttons / 1.2
Social Share Buttons v1.2
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 -79 1.181.2 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
@@ -69,17 +77,14 @@
69 77 {
70 78 protected $network = 'linkedin';
71 79 protected $icon = 'fa-linkedin-in';
72 80 protected $color = '#007bb6';
73 - protected $priority = 'unselected';
74 81
75 -
76 82 public function __construct()
77 83 {
84 + parent::__construct();
78 85 $this->label = __('Share','mbsocial');
79 86 $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 87 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
83 88 // Linkedin counts where killed
84 89 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
85 90 //$this->countable = true;
@@ -85,11 +90,8 @@
85 90 //$this->countable = true;
86 91 //$this->return_var = 'count';
87 92
88 93 $this->popup_dimensions = array(700,500);
89 -
90 - parent::__construct();
91 -
92 94 }
93 95
94 96 }
95 97
@@ -100,18 +102,15 @@
100 102 protected $icon = 'fa-print';
101 103 protected $icon_type = 'fas';
102 104 protected $color = '#5e5e5e';
103 105 protected $forcesamewindow = true;
104 - protected $is_popup = false;
105 106
106 107 public function __construct()
107 108 {
109 + parent::__construct();
108 110 $this->label = __('Print', 'mbsocial');
109 111 $this->share_url = 'javascript:window.print()';
110 112 $this->popup = false;
111 -
112 - parent::__construct();
113 -
114 113 }
115 114 }
116 115
117 116
@@ -123,8 +122,9 @@
123 122 protected $color = '#eb4924';
124 123
125 124 public function __construct()
126 125 {
126 + parent::__construct();
127 127 $this->label = __('Share','mbsocial');
128 128 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
129 129 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
130 130 $this->countable = true;
@@ -129,9 +129,9 @@
129 129 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
130 130 $this->countable = true;
131 131 $this->return_var = 'result|views';
132 132
133 - parent::__construct();
133 +
134 134 }
135 135 }
136 136
137 137 class redditNetwork extends mbNetwork
@@ -143,8 +143,9 @@
143 143
144 144
145 145 public function __construct()
146 146 {
147 + parent::__construct();
147 148 $this->label = __('Share', 'mbsocial');
148 149 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
149 150 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
150 151 $this->countable = true;
@@ -151,9 +152,8 @@
151 152 $this->profile_url = 'https://www.reddit.com/user/{profile}';
152 153 $this->return_var = 'data|children|0|data|score';
153 154 $this->popup_dimensions = array(800,500);
154 155
155 - parent::__construct();
156 156
157 157 }
158 158
159 159 }
@@ -169,13 +169,12 @@
169 169 protected $displayDesktop = false;
170 170
171 171 public function __construct()
172 172 {
173 + parent::__construct();
173 174 $this->label = __('Send', 'mbsocial');
174 175 $this->share_url = 'whatsapp://send?text={url} {title}';
175 176
176 - parent::__construct();
177 -
178 177 }
179 178
180 179 }
181 180
@@ -187,15 +186,14 @@
187 186 protected $color = '#517fa4';
188 187
189 188 public function __construct()
190 189 {
190 + parent::__construct();
191 191 $this->popup = false;
192 192
193 193 $this->label = __('Follow', 'mbsocial');
194 194 $this->profile_url = 'https://instagram.com/{profile}';
195 195
196 - parent::__construct();
197 -
198 196 }
199 197
200 198 }
201 199
@@ -208,14 +206,15 @@
208 206 protected $color = '#bb0000';
209 207
210 208 public function __construct()
211 209 {
210 + parent::__construct();
211 +
212 212 $this->popup = false;
213 213
214 214 $this->label = __('View', 'mbsocial');
215 215 $this->profile_url = 'https://youtube.com/{profile}';
216 216
217 - parent::__construct();
218 217 }
219 218 }
220 219
221 220 class snapchatNetwork extends mbNetwork
@@ -224,18 +223,16 @@
224 223 protected $priority = 'readmore';
225 224 protected $icon = 'fa-snapchat';
226 225 // protected $color = '#fffc00';
227 226 protected $color = '#000';
228 - protected $displayDesktop = false;
229 227
230 228 public function __construct()
231 229 {
230 + parent::__construct();
232 231 $this->popup = false;
233 232 $this->label = __('Follow', 'mbsocial');
234 233 $this->profile_url = 'https://snapchat.com/{profile}';
235 234
236 - parent::__construct();
237 -
238 235 }
239 236
240 237 }
241 238
@@ -251,15 +248,15 @@
251 248 // protected $profile_placeholder = '';
252 249
253 250 public function __construct()
254 251 {
252 + parent::__construct();
253 +
255 254 $this->nice_name = __('RSS', 'mbsocial');
256 255 $this->profile_placeholder = __('Feed URL', 'mbsocial');
257 256 $this->popup = false;
258 257 $this->label = __('Follow', 'mbsocial');
259 258 $this->profile_url = '{profile}';
260 - parent::__construct();
261 -
262 259 }
263 260 /*
264 261 public function get_url()
265 262 {
@@ -272,8 +269,9 @@
272 269 } */
273 270
274 271 }
275 272
273 +
276 274 class vimeoNetwork extends mbNetwork
277 275 {
278 276 protected $network = 'vimeo';
279 277 protected $priority = 'readmore';
@@ -281,57 +279,13 @@
281 279 protected $color = '#1ab7ea';
282 280
283 281 public function __construct()
284 282 {
283 + parent::__construct();
284 +
285 285 $this->popup = false;
286 286 $this->label = __('View', 'mbsocial');
287 287 $this->profile_url = 'https://vimeo.com/{profile}';
288 288
289 - parent::__construct();
290 289
291 290 }
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 291 }