| 1 |
<?php |
| 2 |
namespace MBSocial; |
| 3 |
defined('ABSPATH') or die('No direct access permitted'); |
| 4 |
|
| 5 |
class diggNetwork extends mbNetwork |
| 6 |
{ |
| 7 |
protected $network = 'digg'; |
| 8 |
protected $icon = 'fa-digg'; |
| 9 |
protected $priority = 'readmore'; |
| 10 |
protected $color = '#000'; |
| 11 |
|
| 12 |
public function __construct() |
| 13 |
{ |
| 14 |
parent::__construct(); |
| 15 |
$this->label = __('Share', 'mbsocial'); |
| 16 |
$this->share_url = 'http://digg.com/submit?url={url}&title={title}'; |
| 17 |
$this->popup_dimensions = array(600,600); |
| 18 |
|
| 19 |
} |
| 20 |
} |
| 21 |
|
| 22 |
class emailNetwork extends mbNetwork |
| 23 |
{ |
| 24 |
protected $network = 'email'; |
| 25 |
protected $icon = 'fa-envelope'; |
| 26 |
protected $icon_type = 'fas'; |
| 27 |
protected $color = '#5e5e5e'; |
| 28 |
protected $forcesamewindow = true; |
| 29 |
protected $is_popup = false; |
| 30 |
|
| 31 |
public function __construct() |
| 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 |
|
| 40 |
parent::__construct(); |
| 41 |
|
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
class facebookNetwork extends mbNetwork |
| 46 |
{ |
| 47 |
protected $network = 'facebook'; |
| 48 |
|
| 49 |
protected $icon = 'fa-facebook-f'; |
| 50 |
protected $color = '#3b5998'; |
| 51 |
|
| 52 |
public function __construct() |
| 53 |
{ |
| 54 |
$this->label = __('Share', 'mbsocial'); |
| 55 |
$this->share_url = 'https://www.facebook.com/sharer.php?u={url}'; |
| 56 |
$this->profile_url = 'https://www.facebook.com/{profile}'; |
| 57 |
$this->countable = true; |
| 58 |
$this->count_api = 'https://graph.facebook.com/{url}'; |
| 59 |
$this->return_var = 'share|share_count'; |
| 60 |
$this->popup_dimensions = array(550,320); |
| 61 |
|
| 62 |
parent::__construct(); |
| 63 |
} |
| 64 |
|
| 65 |
} |
| 66 |
|
| 67 |
class linkedinNetwork extends mbNetwork |
| 68 |
{ |
| 69 |
protected $network = 'linkedin'; |
| 70 |
protected $icon = 'fa-linkedin-in'; |
| 71 |
protected $color = '#007bb6'; |
| 72 |
protected $priority = 'unselected'; |
| 73 |
|
| 74 |
|
| 75 |
public function __construct() |
| 76 |
{ |
| 77 |
$this->label = __('Share','mbsocial'); |
| 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'); |
| 81 |
$this->profile_url = 'https://www.linkedin.com/in/{profile}'; |
| 82 |
// Linkedin counts where killed |
| 83 |
//$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json'; |
| 84 |
//$this->countable = true; |
| 85 |
//$this->return_var = 'count'; |
| 86 |
|
| 87 |
$this->popup_dimensions = array(700,500); |
| 88 |
|
| 89 |
parent::__construct(); |
| 90 |
|
| 91 |
} |
| 92 |
|
| 93 |
} |
| 94 |
|
| 95 |
|
| 96 |
class printNetwork extends mbNetwork |
| 97 |
{ |
| 98 |
protected $network = 'print'; |
| 99 |
protected $icon = 'fa-print'; |
| 100 |
protected $icon_type = 'fas'; |
| 101 |
protected $color = '#5e5e5e'; |
| 102 |
protected $forcesamewindow = true; |
| 103 |
protected $is_popup = false; |
| 104 |
|
| 105 |
public function __construct() |
| 106 |
{ |
| 107 |
$this->label = __('Print', 'mbsocial'); |
| 108 |
$this->share_url = 'javascript:window.print()'; |
| 109 |
|
| 110 |
parent::__construct(); |
| 111 |
|
| 112 |
} |
| 113 |
} |
| 114 |
|
| 115 |
|
| 116 |
class stumbleuponNetwork extends mbNetwork |
| 117 |
{ |
| 118 |
protected $network = 'stumbleupon'; |
| 119 |
protected $priority = 'readmore'; |
| 120 |
protected $icon = 'fa-stumbleupon'; |
| 121 |
protected $color = '#eb4924'; |
| 122 |
|
| 123 |
public function __construct() |
| 124 |
{ |
| 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 |
parent::__construct(); |
| 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 |
$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 |
parent::__construct(); |
| 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 |
$this->label = __('Send', 'mbsocial'); |
| 172 |
$this->share_url = 'whatsapp://send?text={url} {title}'; |
| 173 |
|
| 174 |
parent::__construct(); |
| 175 |
|
| 176 |
} |
| 177 |
|
| 178 |
} |
| 179 |
|
| 180 |
class instagramNetwork extends mbNetwork |
| 181 |
{ |
| 182 |
protected $network = 'instagram'; |
| 183 |
protected $priority = 'unselected'; |
| 184 |
protected $icon = 'fa-instagram'; |
| 185 |
protected $color = '#517fa4'; |
| 186 |
|
| 187 |
public function __construct() |
| 188 |
{ |
| 189 |
|
| 190 |
$this->label = __('Follow', 'mbsocial'); |
| 191 |
$this->profile_url = 'https://instagram.com/{profile}'; |
| 192 |
|
| 193 |
parent::__construct(); |
| 194 |
|
| 195 |
} |
| 196 |
|
| 197 |
} |
| 198 |
|
| 199 |
|
| 200 |
class youtubeNetwork extends mbNetwork |
| 201 |
{ |
| 202 |
protected $network = 'youtube'; |
| 203 |
protected $priority = 'readmore'; |
| 204 |
protected $icon = 'fa-youtube'; |
| 205 |
protected $color = '#bb0000'; |
| 206 |
protected $is_popup = false; |
| 207 |
|
| 208 |
public function __construct() |
| 209 |
{ |
| 210 |
$this->label = __('View', 'mbsocial'); |
| 211 |
$this->profile_url = 'https://youtube.com/{profile}'; |
| 212 |
|
| 213 |
parent::__construct(); |
| 214 |
} |
| 215 |
} |
| 216 |
|
| 217 |
class snapchatNetwork extends mbNetwork |
| 218 |
{ |
| 219 |
protected $network = 'snapchat'; |
| 220 |
protected $priority = 'readmore'; |
| 221 |
protected $icon = 'fa-snapchat'; |
| 222 |
// protected $color = '#fffc00'; |
| 223 |
protected $color = '#000'; |
| 224 |
protected $displayDesktop = false; |
| 225 |
|
| 226 |
public function __construct() |
| 227 |
{ |
| 228 |
$this->label = __('Follow', 'mbsocial'); |
| 229 |
$this->profile_url = 'https://snapchat.com/{profile}'; |
| 230 |
|
| 231 |
parent::__construct(); |
| 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 $icon_type = 'fas'; |
| 243 |
protected $color = '#F99000'; |
| 244 |
|
| 245 |
protected $share_profile = false; |
| 246 |
protected $is_popup = false; |
| 247 |
// protected $profile_placeholder = ''; |
| 248 |
|
| 249 |
public function __construct() |
| 250 |
{ |
| 251 |
$this->nice_name = __('RSS', 'mbsocial'); |
| 252 |
$this->profile_placeholder = __('Feed URL', 'mbsocial'); |
| 253 |
$this->label = __('Follow', 'mbsocial'); |
| 254 |
$this->profile_url = '{profile}'; |
| 255 |
parent::__construct(); |
| 256 |
|
| 257 |
} |
| 258 |
/* |
| 259 |
public function get_url() |
| 260 |
{ |
| 261 |
$url = parent::get_url(); |
| 262 |
|
| 263 |
if (strlen(trim($url)) == 0) |
| 264 |
{ |
| 265 |
return bloginfo('rss_url'); |
| 266 |
} |
| 267 |
} */ |
| 268 |
|
| 269 |
} |
| 270 |
|
| 271 |
class vimeoNetwork extends mbNetwork |
| 272 |
{ |
| 273 |
protected $network = 'vimeo'; |
| 274 |
protected $priority = 'readmore'; |
| 275 |
protected $icon = 'fa-vimeo-v'; |
| 276 |
protected $color = '#1ab7ea'; |
| 277 |
|
| 278 |
public function __construct() |
| 279 |
{ |
| 280 |
$this->label = __('View', 'mbsocial'); |
| 281 |
$this->profile_url = 'https://vimeo.com/{profile}'; |
| 282 |
|
| 283 |
parent::__construct(); |
| 284 |
|
| 285 |
} |
| 286 |
} |
| 287 |
|
| 288 |
class tiktokNetwork extends mbNetwork |
| 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 |
|
| 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 |
|
| 330 |
} |
| 331 |
|