PluginProbe
Social Share Buttons / 1.16
Social Share Buttons v1.16
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
share-button / classes / network / simple.php

simple.php in Social Share Buttons 1.16, at classes/network/simple.php

352 lines 7.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace MBSocial;
3 defined('ABSPATH') or die('No direct access permitted');
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 class diggNetwork extends mbNetwork
20 {
21 protected $network = 'digg';
22 protected $icon = 'fa-digg';
23 protected $priority = 'readmore';
24 protected $color = '#000';
25
26 public function __construct()
27 {
28 parent::__construct();
29 $this->label = __('Share', 'mbsocial');
30 $this->share_url = 'http://digg.com/submit?url={url}&title={title}';
31 $this->popup_dimensions = array(600,600);
32
33 }
34 }
35
36 class emailNetwork extends mbNetwork
37 {
38 protected $network = 'email';
39 protected $icon = 'fa-envelope';
40 protected $icon_type = 'fas';
41 protected $color = '#5e5e5e';
42 protected $forcesamewindow = true;
43 protected $is_popup = false;
44
45 public function __construct()
46 {
47 $this->label = __('Email', 'mbsocial');
48 if (Install::isPro() )
49 $this->share_url = 'mailto:?subject={email_subject}&body={email_content}';
50 else {
51 $this->share_url = 'mailto:?subject={title}&body={url}';
52 }
53 $this->popup = false;
54
55 parent::__construct();
56
57 }
58 }
59
60 class facebookNetwork extends mbNetwork
61 {
62 protected $network = 'facebook';
63
64 protected $icon = 'fa-facebook-f';
65 protected $color = '#3b5998';
66
67 public function __construct()
68 {
69 $this->label = __('Share', 'mbsocial');
70 $this->share_url = 'https://www.facebook.com/sharer.php?u={url}';
71 $this->profile_url = 'https://www.facebook.com/{profile}';
72 $this->countable = true;
73 $this->count_api = 'https://graph.facebook.com/{url}';
74 $this->return_var = 'share|share_count';
75 $this->popup_dimensions = array(550,320);
76
77 parent::__construct();
78 }
79
80 }
81
82 class linkedinNetwork extends mbNetwork
83 {
84 protected $network = 'linkedin';
85 protected $icon = 'fa-linkedin-in';
86 protected $color = '#007bb6';
87 protected $priority = 'unselected';
88
89
90 public function __construct()
91 {
92 $this->label = __('Share','mbsocial');
93 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}';
94 $this->alternate_url = 'https://www.linkedin.com/company/{profile}';
95 $this->alternate_label = __('Company Profile');
96 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
97 // Linkedin counts where killed
98 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
99 //$this->countable = true;
100 //$this->return_var = 'count';
101
102 $this->popup_dimensions = array(700,500);
103
104 parent::__construct();
105
106 }
107
108 }
109
110
111 class printNetwork extends mbNetwork
112 {
113 protected $network = 'print';
114 protected $icon = 'fa-print';
115 protected $icon_type = 'fas';
116 protected $color = '#5e5e5e';
117 protected $forcesamewindow = true;
118 protected $is_popup = false;
119
120 public function __construct()
121 {
122 $this->label = __('Print', 'mbsocial');
123 $this->share_url = 'javascript:window.print()';
124 $this->popup = false;
125
126 parent::__construct();
127
128 }
129 }
130
131
132 class stumbleuponNetwork extends mbNetwork
133 {
134 protected $network = 'stumbleupon';
135 protected $priority = 'readmore';
136 protected $icon = 'fa-stumbleupon';
137 protected $color = '#eb4924';
138
139 public function __construct()
140 {
141 $this->label = __('Share','mbsocial');
142 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
143 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
144 $this->countable = true;
145 $this->return_var = 'result|views';
146
147 parent::__construct();
148 }
149 }
150
151 class redditNetwork extends mbNetwork
152 {
153 protected $network = 'reddit';
154 protected $priority = 'unselected';
155 protected $icon = 'fa-reddit';
156 protected $color = '#ff4500';
157
158
159 public function __construct()
160 {
161 $this->label = __('Share', 'mbsocial');
162 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
163 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
164 $this->countable = true;
165 $this->profile_url = 'https://www.reddit.com/user/{profile}';
166 $this->return_var = 'data|children|0|data|score';
167 $this->popup_dimensions = array(800,500);
168
169 parent::__construct();
170
171 }
172
173 }
174
175
176 class whatappNetwork extends mbNetwork
177 {
178 protected $network = 'whatsapp';
179 protected $priority = 'readmore';
180 protected $icon = 'fa-whatsapp';
181 protected $color = '#4dc247';
182
183 protected $displayDesktop = false;
184
185 public function __construct()
186 {
187 $this->label = __('Send', 'mbsocial');
188 $this->share_url = 'whatsapp://send?text={url} {title}';
189
190 parent::__construct();
191
192 }
193
194 }
195
196 class instagramNetwork extends mbNetwork
197 {
198 protected $network = 'instagram';
199 protected $priority = 'unselected';
200 protected $icon = 'fa-instagram';
201 protected $color = '#517fa4';
202
203 public function __construct()
204 {
205 $this->popup = false;
206
207 $this->label = __('Follow', 'mbsocial');
208 $this->profile_url = 'https://instagram.com/{profile}';
209
210 parent::__construct();
211
212 }
213
214 }
215
216
217 class youtubeNetwork extends mbNetwork
218 {
219 protected $network = 'youtube';
220 protected $priority = 'readmore';
221 protected $icon = 'fa-youtube';
222 protected $color = '#bb0000';
223
224 public function __construct()
225 {
226 $this->popup = false;
227
228 $this->label = __('View', 'mbsocial');
229 $this->profile_url = 'https://youtube.com/{profile}';
230
231 parent::__construct();
232 }
233 }
234
235 class snapchatNetwork extends mbNetwork
236 {
237 protected $network = 'snapchat';
238 protected $priority = 'readmore';
239 protected $icon = 'fa-snapchat';
240 // protected $color = '#fffc00';
241 protected $color = '#000';
242 protected $displayDesktop = false;
243
244 public function __construct()
245 {
246 $this->popup = false;
247 $this->label = __('Follow', 'mbsocial');
248 $this->profile_url = 'https://snapchat.com/{profile}';
249
250 parent::__construct();
251
252 }
253
254 }
255
256 class rssNetwork extends mbNetwork
257 {
258 protected $network = 'rss';
259 protected $priority = 'readmore';
260 protected $icon = 'fa-rss';
261 protected $icon_type = 'fas';
262 protected $color = '#F99000';
263
264 protected $share_profile = false;
265 // protected $profile_placeholder = '';
266
267 public function __construct()
268 {
269 $this->nice_name = __('RSS', 'mbsocial');
270 $this->profile_placeholder = __('Feed URL', 'mbsocial');
271 $this->popup = false;
272 $this->label = __('Follow', 'mbsocial');
273 $this->profile_url = '{profile}';
274 parent::__construct();
275
276 }
277 /*
278 public function get_url()
279 {
280 $url = parent::get_url();
281
282 if (strlen(trim($url)) == 0)
283 {
284 return bloginfo('rss_url');
285 }
286 } */
287
288 }
289
290 class vimeoNetwork extends mbNetwork
291 {
292 protected $network = 'vimeo';
293 protected $priority = 'readmore';
294 protected $icon = 'fa-vimeo-v';
295 protected $color = '#1ab7ea';
296
297 public function __construct()
298 {
299 $this->popup = false;
300 $this->label = __('View', 'mbsocial');
301 $this->profile_url = 'https://vimeo.com/{profile}';
302
303 parent::__construct();
304
305 }
306 }
307
308 class tiktokNetwork extends mbNetwork
309 {
310
311 protected $network = 'tiktok';
312 protected $priority = 'readmore';
313 protected $icon = 'fa-tiktok';
314 protected $icon_type = 'fab';
315 protected $color = '#010101';
316
317 public function __construct()
318 {
319 $this->popup = false;
320 $this->nice_name = __('TikTok', 'mbsocial');
321 $this->label = __('Follow', 'mbsocial');
322 $this->profile_url = 'https://tiktok.com/{profile}';
323
324 parent::__construct();
325
326 }
327 }
328
329
330 class phoneNetwork extends mbNetwork
331 {
332 protected $network = 'phone';
333 protected $priority = 'readmore';
334 protected $icon = 'fa-phone';
335 protected $icon_type = 'fas';
336 protected $color = '#00932c';
337
338 public function __construct()
339 {
340 $this->popup =false;
341 $this->nice_name = __('Phone Number', 'mbsocial');
342 $this->label = __('Call', 'mbsocial');
343 $this->profile_url = 'tel:{profile}';
344 $this->profile_placeholder = __('Phone Number', 'mbsocial');
345 $this->displayDesktop = false;
346
347 parent::__construct();
348 }
349
350
351 }
352