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