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

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

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