PluginProbe
Social Share Buttons / 1.6
Social Share Buttons v1.6
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.6, at classes/network/simple.php

304 lines 6.5 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 public function __construct()
90 {
91 $this->label = __('Share','mbsocial');
92 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}';
93 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
94 // Linkedin counts where killed
95 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
96 //$this->countable = true;
97 //$this->return_var = 'count';
98
99 $this->popup_dimensions = array(700,500);
100
101 parent::__construct();
102
103 }
104
105 }
106
107
108 class printNetwork extends mbNetwork
109 {
110 protected $network = 'print';
111 protected $icon = 'fa-print';
112 protected $icon_type = 'fas';
113 protected $color = '#5e5e5e';
114 protected $forcesamewindow = true;
115 protected $is_popup = false;
116
117 public function __construct()
118 {
119 $this->label = __('Print', 'mbsocial');
120 $this->share_url = 'javascript:window.print()';
121 $this->popup = false;
122
123 parent::__construct();
124
125 }
126 }
127
128
129 class stumbleuponNetwork extends mbNetwork
130 {
131 protected $network = 'stumbleupon';
132 protected $priority = 'readmore';
133 protected $icon = 'fa-stumbleupon';
134 protected $color = '#eb4924';
135
136 public function __construct()
137 {
138 $this->label = __('Share','mbsocial');
139 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
140 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
141 $this->countable = true;
142 $this->return_var = 'result|views';
143
144 parent::__construct();
145 }
146 }
147
148 class redditNetwork extends mbNetwork
149 {
150 protected $network = 'reddit';
151 protected $priority = 'unselected';
152 protected $icon = 'fa-reddit';
153 protected $color = '#ff4500';
154
155
156 public function __construct()
157 {
158 $this->label = __('Share', 'mbsocial');
159 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
160 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
161 $this->countable = true;
162 $this->profile_url = 'https://www.reddit.com/user/{profile}';
163 $this->return_var = 'data|children|0|data|score';
164 $this->popup_dimensions = array(800,500);
165
166 parent::__construct();
167
168 }
169
170 }
171
172
173 class whatappNetwork extends mbNetwork
174 {
175 protected $network = 'whatsapp';
176 protected $priority = 'readmore';
177 protected $icon = 'fa-whatsapp';
178 protected $color = '#4dc247';
179
180 protected $displayDesktop = false;
181
182 public function __construct()
183 {
184 $this->label = __('Send', 'mbsocial');
185 $this->share_url = 'whatsapp://send?text={url} {title}';
186
187 parent::__construct();
188
189 }
190
191 }
192
193 class instagramNetwork extends mbNetwork
194 {
195 protected $network = 'instagram';
196 protected $priority = 'unselected';
197 protected $icon = 'fa-instagram';
198 protected $color = '#517fa4';
199
200 public function __construct()
201 {
202 $this->popup = false;
203
204 $this->label = __('Follow', 'mbsocial');
205 $this->profile_url = 'https://instagram.com/{profile}';
206
207 parent::__construct();
208
209 }
210
211 }
212
213
214 class youtubeNetwork extends mbNetwork
215 {
216 protected $network = 'youtube';
217 protected $priority = 'readmore';
218 protected $icon = 'fa-youtube';
219 protected $color = '#bb0000';
220
221 public function __construct()
222 {
223 $this->popup = false;
224
225 $this->label = __('View', 'mbsocial');
226 $this->profile_url = 'https://youtube.com/{profile}';
227
228 parent::__construct();
229 }
230 }
231
232 class snapchatNetwork extends mbNetwork
233 {
234 protected $network = 'snapchat';
235 protected $priority = 'readmore';
236 protected $icon = 'fa-snapchat';
237 // protected $color = '#fffc00';
238 protected $color = '#000';
239 protected $displayDesktop = false;
240
241 public function __construct()
242 {
243 $this->popup = false;
244 $this->label = __('Follow', 'mbsocial');
245 $this->profile_url = 'https://snapchat.com/{profile}';
246
247 parent::__construct();
248
249 }
250
251 }
252
253 class rssNetwork extends mbNetwork
254 {
255 protected $network = 'rss';
256 protected $priority = 'readmore';
257 protected $icon = 'fa-rss';
258 protected $icon_type = 'fas';
259 protected $color = '#F99000';
260
261 protected $share_profile = false;
262 // protected $profile_placeholder = '';
263
264 public function __construct()
265 {
266 $this->nice_name = __('RSS', 'mbsocial');
267 $this->profile_placeholder = __('Feed URL', 'mbsocial');
268 $this->popup = false;
269 $this->label = __('Follow', 'mbsocial');
270 $this->profile_url = '{profile}';
271 parent::__construct();
272
273 }
274 /*
275 public function get_url()
276 {
277 $url = parent::get_url();
278
279 if (strlen(trim($url)) == 0)
280 {
281 return bloginfo('rss_url');
282 }
283 } */
284
285 }
286
287 class vimeoNetwork extends mbNetwork
288 {
289 protected $network = 'vimeo';
290 protected $priority = 'readmore';
291 protected $icon = 'fa-vimeo-v';
292 protected $color = '#1ab7ea';
293
294 public function __construct()
295 {
296 $this->popup = false;
297 $this->label = __('View', 'mbsocial');
298 $this->profile_url = 'https://vimeo.com/{profile}';
299
300 parent::__construct();
301
302 }
303 }
304