PluginProbe
Social Share Buttons / 0.9
Social Share Buttons v0.9
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
share-button / classes / network / simple.php

simple.php in Social Share Buttons 0.9, at classes/network/simple.php

157 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace MBSocial;
3 defined('ABSPATH') or die('No direct access permitted');
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 class diggNetwork extends mbNetwork
20 {
21 protected $network = 'digg';
22 protected $icon = 'fa-digg';
23 protected $priority = 'readmore';
24
25 public function __construct()
26 {
27 $this->label = __('Share', 'mbsocial');
28 $this->share_url = 'http://digg.com/submit?url={url}&title={title}';
29 $this->popup_dimensions = array(600,600);
30
31 }
32 }
33
34 class emailNetwork extends mbNetwork
35 {
36 protected $network = 'email';
37 protected $icon = 'fa-envelope';
38
39 public function __construct()
40 {
41
42 $this->label = __('Email', 'mbsocial');
43 $this->share_url = 'mailto:?subject={title}&body={url}';
44 $this->popup = false;
45 $this->countable = false;
46 }
47 }
48
49 class facebookNetwork extends mbNetwork
50 {
51 protected $network = 'facebook';
52 protected $icon = 'fa-facebook';
53
54 public function __construct()
55 {
56 $this->label = __('Share', 'mbsocial');
57 $this->share_url = 'https://www.facebook.com/sharer.php?u={url}';
58 $this->countable = true;
59 $this->count_api = 'https://graph.facebook.com/{url}';
60 $this->return_var = 'share|share_count';
61
62 }
63 }
64
65
66
67 class linkedinNetwork extends mbNetwork
68 {
69 protected $network = 'linkedin';
70 protected $icon = 'fa-linkedin';
71
72 public function __construct()
73 {
74 $this->label = __('Share','mbsocial');
75 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}';
76 $this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json';
77 $this->countable = true;
78 $this->return_var = 'count';
79 $this->popup_dimensions = array(700,500);
80 }
81
82 }
83
84
85 class printNetwork extends mbNetwork
86 {
87 protected $network = 'print';
88 protected $icon = 'fa-print';
89
90 public function __construct()
91 {
92 $this->label = __('Print', 'mbsocial');
93 $this->share_url = 'javascript:window.print()';
94 $this->countable = false;
95 $this->popup = false;
96 }
97 }
98
99
100 class stumbleuponNetwork extends mbNetwork
101 {
102 protected $network = 'stumbleupon';
103 protected $priority = 'readmore';
104 protected $icon = 'fa-stumbleupon';
105
106 public function __construct()
107 {
108 $this->label = __('Share','mbsocial');
109 $this->share_url = 'https://www.stumbleupon.com/submit?url={url}&title={title}';
110 $this->count_api = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}';
111 $this->countable = true;
112 $this->return_var = 'result|views';
113
114
115 }
116 }
117
118 class redditNetwork extends mbNetwork
119 {
120 protected $network = 'reddit';
121 protected $priority = 'readmore';
122 protected $icon = 'fa-reddit';
123
124
125 public function __construct()
126 {
127 $this->label = __('Share', 'mbsocial');
128 $this->share_url = 'https://reddit.com/submit?url={url}&title={title}';
129 $this->count_api = 'https://buttons.reddit.com/button_info.json?url={url}';
130 $this->countable = true;
131 $this->return_var = 'data|children|0|data|score';
132 $this->popup_dimensions = array(800,500);
133
134
135 }
136
137 }
138
139
140 class whatappNetwork extends mbNetwork
141 {
142 protected $network = 'whatsapp';
143 protected $priority = 'readmore';
144 protected $icon = 'fa-whatsapp';
145
146 protected $displayDesktop = false;
147
148 public function __construct()
149 {
150 $this->label = __('Send', 'mbsocial');
151 $this->share_url = 'whatsapp://send?text={url} {title}';
152 $this->countable = false;
153
154 }
155
156 }
157