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