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

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