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