PluginProbe
Social Share Buttons / 1.0
Social Share Buttons v1.0
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.0, 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 protected $icon = 'fa-facebook';
56 protected $color = '#3b5998';
57
58 public function __construct()
59 {
60 parent::__construct();
61
62 $this->label = __('Share', 'mbsocial');
63 $this->share_url = 'https://www.facebook.com/sharer.php?u={url}';
64 $this->profile_url = 'https://www.facebook.com/{profile}';
65 $this->countable = true;
66 $this->count_api = 'https://graph.facebook.com/{url}';
67 $this->return_var = 'share|share_count';
68 $this->popup_dimensions = array(550,320);
69
70 }
71
72 }
73
74 class linkedinNetwork extends mbNetwork
75 {
76 protected $network = 'linkedin';
77 protected $icon = 'fa-linkedin';
78 protected $color = '#007bb6';
79
80 public function __construct()
81 {
82 parent::__construct();
83 $this->label = __('Share','mbsocial');
84 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}';
85 $this->profile_url = 'https://www.linkedin.com/in/{profile}';
86 // Linkedin counts where killed
87 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
88 //$this->countable = true;
89 //$this->return_var = 'count';
90
91 $this->popup_dimensions = array(700,500);
92 }
93
94 }
95
96
97 class printNetwork extends mbNetwork
98 {
99 protected $network = 'print';
100 protected $icon = 'fa-print';
101 protected $color = '#5e5e5e';
102 protected $forcesamewindow = true;
103
104 public function __construct()
105 {
106 parent::__construct();
107 $this->label = __('Print', 'mbsocial');
108 $this->share_url = 'javascript:window.print()';
109 $this->popup = false;
110 }
111 }
112
113
114 class stumbleuponNetwork extends mbNetwork
115 {
116 protected $network = 'stumbleupon';
117 protected $priority = 'readmore';
118 protected $icon = 'fa-stumbleupon';
119 protected $color = '#eb4924';
120
121 public function __construct()
122 {
123 parent::__construct();
124 $this->label = __('Share','mbsocial');
125 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
126 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
127 $this->countable = true;
128 $this->return_var = 'result|views';
129
130
131 }
132 }
133
134 class redditNetwork extends mbNetwork
135 {
136 protected $network = 'reddit';
137 protected $priority = 'unselected';
138 protected $icon = 'fa-reddit';
139 protected $color = '#ff4500';
140
141
142 public function __construct()
143 {
144 parent::__construct();
145 $this->label = __('Share', 'mbsocial');
146 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
147 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
148 $this->countable = true;
149 $this->profile_url = 'https://www.reddit.com/user/{profile}';
150 $this->return_var = 'data|children|0|data|score';
151 $this->popup_dimensions = array(800,500);
152
153
154 }
155
156 }
157
158
159 class whatappNetwork extends mbNetwork
160 {
161 protected $network = 'whatsapp';
162 protected $priority = 'readmore';
163 protected $icon = 'fa-whatsapp';
164 protected $color = '#4dc247';
165
166 protected $displayDesktop = false;
167
168 public function __construct()
169 {
170 parent::__construct();
171 $this->label = __('Send', 'mbsocial');
172 $this->share_url = 'whatsapp://send?text={url} {title}';
173
174 }
175
176 }
177
178 class instagramNetwork extends mbNetwork
179 {
180 protected $network = 'instagram';
181 protected $priority = 'unselected';
182 protected $icon = 'fa-instagram';
183 protected $color = '#517fa4';
184
185 public function __construct()
186 {
187 parent::__construct();
188 $this->popup = false;
189
190 $this->label = __('Follow', 'mbsocial');
191 $this->profile_url = 'https://instagram.com/{profile}';
192
193 }
194
195 }
196
197
198 class youtubeNetwork extends mbNetwork
199 {
200 protected $network = 'youtube';
201 protected $priority = 'readmore';
202 protected $icon = 'fa-youtube';
203 protected $color = '#bb0000';
204
205 public function __construct()
206 {
207 parent::__construct();
208
209 $this->popup = false;
210
211 $this->label = __('View', 'mbsocial');
212 $this->profile_url = 'https://youtube.com/user/{profile}';
213
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