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

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