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