PluginProbe
Social Share Buttons / 1.19
Social Share Buttons v1.19
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 +80 -41 1.21.19 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';
@@ -39,15 +25,21 @@
39 25 protected $icon = 'fa-envelope';
40 26 protected $icon_type = 'fas';
41 27 protected $color = '#5e5e5e';
42 28 protected $forcesamewindow = true;
29 + protected $is_popup = false;
43 30
44 31 public function __construct()
45 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 +
46 40 parent::__construct();
47 - $this->label = __('Email', 'mbsocial');
48 - $this->share_url = 'mailto:?subject={title}&body={url}';
49 - $this->popup = false;
41 +
50 42 }
51 43 }
52 44
53 45 class facebookNetwork extends mbNetwork
@@ -58,10 +50,8 @@
58 50 protected $color = '#3b5998';
59 51
60 52 public function __construct()
61 53 {
62 - parent::__construct();
63 -
64 54 $this->label = __('Share', 'mbsocial');
65 55 $this->share_url = 'https://www.facebook.com/sharer.php?u={url}';
66 56 $this->profile_url = 'https://www.facebook.com/{profile}';
67 57 $this->countable = true;
@@ -68,8 +58,9 @@
68 58 $this->count_api = 'https://graph.facebook.com/{url}';
69 59 $this->return_var = 'share|share_count';
70 60 $this->popup_dimensions = array(550,320);
71 61
62 + parent::__construct();
72 63 }
73 64
74 65 }
75 66
@@ -77,14 +68,17 @@
77 68 {
78 69 protected $network = 'linkedin';
79 70 protected $icon = 'fa-linkedin-in';
80 71 protected $color = '#007bb6';
72 + protected $priority = 'unselected';
81 73
74 +
82 75 public function __construct()
83 76 {
84 - parent::__construct();
85 77 $this->label = __('Share','mbsocial');
86 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');
87 81 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
88 82 // Linkedin counts where killed
89 83 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
90 84 //$this->countable = true;
@@ -90,8 +84,11 @@
90 84 //$this->countable = true;
91 85 //$this->return_var = 'count';
92 86
93 87 $this->popup_dimensions = array(700,500);
88 +
89 + parent::__construct();
90 +
94 91 }
95 92
96 93 }
97 94
@@ -102,15 +99,17 @@
102 99 protected $icon = 'fa-print';
103 100 protected $icon_type = 'fas';
104 101 protected $color = '#5e5e5e';
105 102 protected $forcesamewindow = true;
103 + protected $is_popup = false;
106 104
107 105 public function __construct()
108 106 {
109 - parent::__construct();
110 107 $this->label = __('Print', 'mbsocial');
111 108 $this->share_url = 'javascript:window.print()';
112 - $this->popup = false;
109 +
110 + parent::__construct();
111 +
113 112 }
114 113 }
115 114
116 115
@@ -122,9 +121,8 @@
122 121 protected $color = '#eb4924';
123 122
124 123 public function __construct()
125 124 {
126 - parent::__construct();
127 125 $this->label = __('Share','mbsocial');
128 126 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
129 127 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
130 128 $this->countable = true;
@@ -129,9 +127,9 @@
129 127 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
130 128 $this->countable = true;
131 129 $this->return_var = 'result|views';
132 130
133 -
131 + parent::__construct();
134 132 }
135 133 }
136 134
137 135 class redditNetwork extends mbNetwork
@@ -143,9 +141,8 @@
143 141
144 142
145 143 public function __construct()
146 144 {
147 - parent::__construct();
148 145 $this->label = __('Share', 'mbsocial');
149 146 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
150 147 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
151 148 $this->countable = true;
@@ -152,8 +149,9 @@
152 149 $this->profile_url = 'https://www.reddit.com/user/{profile}';
153 150 $this->return_var = 'data|children|0|data|score';
154 151 $this->popup_dimensions = array(800,500);
155 152
153 + parent::__construct();
156 154
157 155 }
158 156
159 157 }
@@ -169,12 +167,13 @@
169 167 protected $displayDesktop = false;
170 168
171 169 public function __construct()
172 170 {
173 - parent::__construct();
174 171 $this->label = __('Send', 'mbsocial');
175 172 $this->share_url = 'whatsapp://send?text={url} {title}';
176 173
174 + parent::__construct();
175 +
177 176 }
178 177
179 178 }
180 179
@@ -186,14 +185,14 @@
186 185 protected $color = '#517fa4';
187 186
188 187 public function __construct()
189 188 {
190 - parent::__construct();
191 - $this->popup = false;
192 189
193 190 $this->label = __('Follow', 'mbsocial');
194 191 $this->profile_url = 'https://instagram.com/{profile}';
195 192
193 + parent::__construct();
194 +
196 195 }
197 196
198 197 }
199 198
@@ -203,18 +202,16 @@
203 202 protected $network = 'youtube';
204 203 protected $priority = 'readmore';
205 204 protected $icon = 'fa-youtube';
206 205 protected $color = '#bb0000';
206 + protected $is_popup = false;
207 207
208 208 public function __construct()
209 209 {
210 - parent::__construct();
211 -
212 - $this->popup = false;
213 -
214 210 $this->label = __('View', 'mbsocial');
215 211 $this->profile_url = 'https://youtube.com/{profile}';
216 212
213 + parent::__construct();
217 214 }
218 215 }
219 216
220 217 class snapchatNetwork extends mbNetwork
@@ -223,16 +220,17 @@
223 220 protected $priority = 'readmore';
224 221 protected $icon = 'fa-snapchat';
225 222 // protected $color = '#fffc00';
226 223 protected $color = '#000';
224 + protected $displayDesktop = false;
227 225
228 226 public function __construct()
229 227 {
230 - parent::__construct();
231 - $this->popup = false;
232 228 $this->label = __('Follow', 'mbsocial');
233 229 $this->profile_url = 'https://snapchat.com/{profile}';
234 230
231 + parent::__construct();
232 +
235 233 }
236 234
237 235 }
238 236
@@ -244,19 +242,19 @@
244 242 protected $icon_type = 'fas';
245 243 protected $color = '#F99000';
246 244
247 245 protected $share_profile = false;
246 + protected $is_popup = false;
248 247 // protected $profile_placeholder = '';
249 248
250 249 public function __construct()
251 250 {
252 - parent::__construct();
253 -
254 251 $this->nice_name = __('RSS', 'mbsocial');
255 252 $this->profile_placeholder = __('Feed URL', 'mbsocial');
256 - $this->popup = false;
257 253 $this->label = __('Follow', 'mbsocial');
258 254 $this->profile_url = '{profile}';
255 + parent::__construct();
256 +
259 257 }
260 258 /*
261 259 public function get_url()
262 260 {
@@ -269,9 +267,8 @@
269 267 } */
270 268
271 269 }
272 270
273 -
274 271 class vimeoNetwork extends mbNetwork
275 272 {
276 273 protected $network = 'vimeo';
277 274 protected $priority = 'readmore';
@@ -279,13 +276,55 @@
279 276 protected $color = '#1ab7ea';
280 277
281 278 public function __construct()
282 279 {
280 + $this->label = __('View', 'mbsocial');
281 + $this->profile_url = 'https://vimeo.com/{profile}';
282 +
283 283 parent::__construct();
284 284
285 - $this->popup = false;
286 - $this->label = __('View', 'mbsocial');
287 - $this->profile_url = 'https://vimeo.com/{profile}';
285 + }
286 +}
288 287
288 +class tiktokNetwork extends mbNetwork
289 +{
289 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 +
290 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 +
291 330 }