Version Description
Please update to version 2.0.9 for several fixes, more features and extra networks.
Download this release
Release Info
Developer | MarijnRongen |
Plugin | Social Sharing Toolkit |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- admin.css +45 -9
- admin.js +13 -0
- googleplus.js.php +0 -6
- images/buttons/flattr.png +0 -0
- images/buttons/goodreads.png +0 -0
- images/icons_large/flattr.png +0 -0
- images/icons_large/goodreads.png +0 -0
- images/icons_large/soundcloud.png +0 -0
- images/icons_medium/flattr.png +0 -0
- images/icons_medium/goodreads.png +0 -0
- images/icons_medium/soundcloud.png +0 -0
- images/icons_small/flattr.png +0 -0
- images/icons_small/goodreads.png +0 -0
- images/icons_small/soundcloud.png +0 -0
- includes/buttons/button.500px.php +15 -0
- includes/buttons/button.buffer.php +50 -0
- delicious.js → includes/buttons/button.delicious.js +0 -0
- includes/buttons/button.delicious.php +34 -0
- includes/buttons/button.deviantart.php +15 -0
- digg.js → includes/buttons/button.digg.js +0 -0
- includes/buttons/button.digg.php +30 -0
- includes/buttons/button.email.php +15 -0
- includes/buttons/button.facebook.js +3 -0
- includes/buttons/button.facebook.php +128 -0
- includes/buttons/button.flattr.js +12 -0
- includes/buttons/button.flattr.php +30 -0
- includes/buttons/button.flickr.php +15 -0
- includes/buttons/button.goodreads.php +15 -0
- includes/buttons/button.googleplus.js +5 -0
- includes/buttons/button.googleplus.php +43 -0
- includes/buttons/button.hyves.php +21 -0
- includes/buttons/button.lastfm.php +15 -0
- includes/buttons/button.linkedin.php +56 -0
- includes/buttons/button.myspace.php +22 -0
- includes/buttons/button.picasa.php +15 -0
- includes/buttons/button.pinterest.php +42 -0
- includes/buttons/button.reddit.php +33 -0
- includes/buttons/button.rss.php +15 -0
- includes/buttons/button.soundcloud.php +15 -0
- includes/buttons/button.spotify.php +15 -0
- stumbleupon.js → includes/buttons/button.stumbleupon.js +0 -0
- includes/buttons/button.stumbleupon.php +30 -0
- includes/buttons/button.tumblr.php +22 -0
- includes/buttons/button.twitter.php +110 -0
- includes/buttons/button.xing.php +42 -0
- includes/buttons/button.youtube.php +15 -0
- includes/class.button.php +90 -0
- includes/follow.widget.php +41 -0
- includes/share.widget.php +77 -0
- languages/mr_social_sharing_toolkit-nl_NL.mo +0 -0
- languages/mr_social_sharing_toolkit-nl_NL.po +0 -364
- languages/mr_social_sharing_toolkit.pot +271 -113
- readme.txt +18 -1
- social_sharing_toolkit.php +254 -1058
admin.css
CHANGED
@@ -49,7 +49,7 @@ div.mr_social_sharing_networks {
|
|
49 |
outline-color: #222;
|
50 |
outline-style: none;
|
51 |
outline-width: 0px;
|
52 |
-
width:
|
53 |
padding: 0 0 10px 0;
|
54 |
}
|
55 |
|
@@ -63,6 +63,18 @@ div.mr_social_sharing_networks {
|
|
63 |
padding: 0 0 0 10px;
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
ul#mr_social_sharing_networks, ul#mr_social_sharing_shortcode_networks, ul#mr_social_sharing_widget_networks, ul#mr_social_sharing_follow_networks {
|
67 |
width: 520px;
|
68 |
padding: 10px;
|
@@ -76,10 +88,8 @@ ul#mr_social_sharing_networks li, ul#mr_social_sharing_shortcode_networks li, ul
|
|
76 |
background-color: whiteSmoke;
|
77 |
background-image: -webkit-linear-gradient(top, #F9F9F9, whiteSmoke);
|
78 |
background-origin: padding-box;
|
79 |
-
border
|
80 |
border-radius: 3px;
|
81 |
-
border-style: solid;
|
82 |
-
border-width: 1px;
|
83 |
box-shadow: white 0px 1px 0px 0px inset;
|
84 |
cursor: move;
|
85 |
display: block;
|
@@ -87,10 +97,10 @@ ul#mr_social_sharing_networks li, ul#mr_social_sharing_shortcode_networks li, ul
|
|
87 |
outline-color: #222;
|
88 |
outline-style: none;
|
89 |
outline-width: 0px;
|
90 |
-
padding: 3px 10px
|
91 |
text-shadow: white 0px 1px 0px;
|
92 |
-
width:
|
93 |
-
height:
|
94 |
}
|
95 |
|
96 |
ul#mr_social_sharing_networks li img, ul#mr_social_sharing_shortcode_networks li img, ul#mr_social_sharing_widget_networks li img, ul#mr_social_sharing_follow_networks li img {
|
@@ -120,7 +130,7 @@ ul#mr_social_sharing_networks li input, ul#mr_social_sharing_shortcode_networks
|
|
120 |
ul#mr_social_sharing_networks li input.text, ul#mr_social_sharing_shortcode_networks li input.text, ul#mr_social_sharing_widget_networks li input.text, ul#mr_social_sharing_follow_networks li input.text {
|
121 |
display: inline-block;
|
122 |
float: right;
|
123 |
-
width:
|
124 |
height: 20px;
|
125 |
margin: 0 10px 0 0;
|
126 |
padding: 0;
|
@@ -138,11 +148,37 @@ ul#mr_social_sharing_networks li label.text, ul#mr_social_sharing_shortcode_netw
|
|
138 |
ul#mr_social_sharing_networks li select, ul#mr_social_sharing_shortcode_networks li select, ul#mr_social_sharing_widget_networks li select, ul#mr_social_sharing_follow_networks li select {
|
139 |
display: inline-block;
|
140 |
float: right;
|
141 |
-
width:
|
142 |
height: 20px;
|
143 |
padding: 0;
|
144 |
}
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
label.check {
|
147 |
width: 400px;
|
148 |
}
|
49 |
outline-color: #222;
|
50 |
outline-style: none;
|
51 |
outline-width: 0px;
|
52 |
+
width: 600px;
|
53 |
padding: 0 0 10px 0;
|
54 |
}
|
55 |
|
63 |
padding: 0 0 0 10px;
|
64 |
}
|
65 |
|
66 |
+
.mr_social_sharing_networks textarea {
|
67 |
+
border-color: #DFDFDF;
|
68 |
+
border-radius: 3px;
|
69 |
+
border-style: solid;
|
70 |
+
border-width: 1px;
|
71 |
+
display: block;
|
72 |
+
padding: 3px 10px 0 10px;
|
73 |
+
margin: 0 10px;
|
74 |
+
width: 580px;
|
75 |
+
height: 400px;
|
76 |
+
}
|
77 |
+
|
78 |
ul#mr_social_sharing_networks, ul#mr_social_sharing_shortcode_networks, ul#mr_social_sharing_widget_networks, ul#mr_social_sharing_follow_networks {
|
79 |
width: 520px;
|
80 |
padding: 10px;
|
88 |
background-color: whiteSmoke;
|
89 |
background-image: -webkit-linear-gradient(top, #F9F9F9, whiteSmoke);
|
90 |
background-origin: padding-box;
|
91 |
+
border: 1px solid #DFDFDF;
|
92 |
border-radius: 3px;
|
|
|
|
|
93 |
box-shadow: white 0px 1px 0px 0px inset;
|
94 |
cursor: move;
|
95 |
display: block;
|
97 |
outline-color: #222;
|
98 |
outline-style: none;
|
99 |
outline-width: 0px;
|
100 |
+
padding: 3px 10px;
|
101 |
text-shadow: white 0px 1px 0px;
|
102 |
+
width: 558px;
|
103 |
+
height: auto;
|
104 |
}
|
105 |
|
106 |
ul#mr_social_sharing_networks li img, ul#mr_social_sharing_shortcode_networks li img, ul#mr_social_sharing_widget_networks li img, ul#mr_social_sharing_follow_networks li img {
|
130 |
ul#mr_social_sharing_networks li input.text, ul#mr_social_sharing_shortcode_networks li input.text, ul#mr_social_sharing_widget_networks li input.text, ul#mr_social_sharing_follow_networks li input.text {
|
131 |
display: inline-block;
|
132 |
float: right;
|
133 |
+
width: 160px;
|
134 |
height: 20px;
|
135 |
margin: 0 10px 0 0;
|
136 |
padding: 0;
|
148 |
ul#mr_social_sharing_networks li select, ul#mr_social_sharing_shortcode_networks li select, ul#mr_social_sharing_widget_networks li select, ul#mr_social_sharing_follow_networks li select {
|
149 |
display: inline-block;
|
150 |
float: right;
|
151 |
+
width: 180px;
|
152 |
height: 20px;
|
153 |
padding: 0;
|
154 |
}
|
155 |
|
156 |
+
span.mr_social_sharing_options, span.mr_social_sharing_custom {
|
157 |
+
display: block;
|
158 |
+
width: 558px;
|
159 |
+
height: 20px;
|
160 |
+
padding: 2px 0;
|
161 |
+
}
|
162 |
+
|
163 |
+
span.mr_social_sharing_custom {
|
164 |
+
width: 538px;
|
165 |
+
background-color: #EAF2FA;
|
166 |
+
border: 1px solid #DFDFDF;
|
167 |
+
border-radius: 3px;
|
168 |
+
margin: 2px 0;
|
169 |
+
padding: 4px 18px 4px 0;
|
170 |
+
}
|
171 |
+
|
172 |
+
ul#mr_social_sharing_networks li span.mr_social_sharing_custom input.text {
|
173 |
+
width: 180px;
|
174 |
+
margin: 0;
|
175 |
+
}
|
176 |
+
|
177 |
+
ul#mr_social_sharing_networks li span.mr_social_sharing_custom label.text {
|
178 |
+
margin: 0 4px 0 10px;
|
179 |
+
padding: 2px 0 0 0;
|
180 |
+
}
|
181 |
+
|
182 |
label.check {
|
183 |
width: 400px;
|
184 |
}
|
admin.js
CHANGED
@@ -4,4 +4,17 @@ jQuery(document).ready( function($) {
|
|
4 |
$( "#mr_social_sharing_shortcode_networks" ).sortable();
|
5 |
$( "#mr_social_sharing_widget_networks" ).sortable();
|
6 |
$( "#mr_social_sharing_follow_networks" ).sortable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
});
|
4 |
$( "#mr_social_sharing_shortcode_networks" ).sortable();
|
5 |
$( "#mr_social_sharing_widget_networks" ).sortable();
|
6 |
$( "#mr_social_sharing_follow_networks" ).sortable();
|
7 |
+
$( "span.mr_social_sharing_custom" ).hide();
|
8 |
+
$( "select.mr_social_sharing_type_select" ).each(function () {
|
9 |
+
if ($(this).val() == 'icon_small' || $(this).val() == 'icon_small_text' || $(this).val() == 'icon_medium' || $(this).val() == 'icon_medium_text' || $(this).val() == 'icon_large') {
|
10 |
+
$(this).parents("li").find("span.mr_social_sharing_custom").show();
|
11 |
+
}
|
12 |
+
$(this).change(function () {
|
13 |
+
if ($(this).val() == 'icon_small' || $(this).val() == 'icon_small_text' || $(this).val() == 'icon_medium' || $(this).val() == 'icon_medium_text' || $(this).val() == 'icon_large') {
|
14 |
+
$(this).parents("li").find("span.mr_social_sharing_custom").show();
|
15 |
+
} else {
|
16 |
+
$(this).parents("li").find("span.mr_social_sharing_custom").hide();
|
17 |
+
}
|
18 |
+
});
|
19 |
+
});
|
20 |
});
|
googleplus.js.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
header("Content-type: text/javascript");
|
3 |
-
if (isset($_GET['lang'])) {
|
4 |
-
echo 'window.___gcfg = {lang: \''.$_GET['lang'].'\'};';
|
5 |
-
}
|
6 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
images/buttons/flattr.png
ADDED
Binary file
|
images/buttons/goodreads.png
ADDED
Binary file
|
images/icons_large/flattr.png
ADDED
Binary file
|
images/icons_large/goodreads.png
ADDED
Binary file
|
images/icons_large/soundcloud.png
ADDED
Binary file
|
images/icons_medium/flattr.png
ADDED
Binary file
|
images/icons_medium/goodreads.png
ADDED
Binary file
|
images/icons_medium/soundcloud.png
ADDED
Binary file
|
images/icons_small/flattr.png
ADDED
Binary file
|
images/icons_small/goodreads.png
ADDED
Binary file
|
images/icons_small/soundcloud.png
ADDED
Binary file
|
includes/buttons/button.500px.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_500px extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_500px', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = '500px';
|
6 |
+
$this->icon = '500px';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_500px($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://500px.com/'.$id;
|
11 |
+
$text = ($text == '') ? __('My portfolio on','mr_social_sharing_toolkit').' 500px' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.buffer.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Buffer extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'bf_buffer', 'id' => '@', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Buffer';
|
6 |
+
$this->icon = 'buffer';
|
7 |
+
}
|
8 |
+
|
9 |
+
function bf_buffer($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
10 |
+
switch ($type) {
|
11 |
+
case 'horizontal':
|
12 |
+
$retval = '<a href="http://bufferapp.com/add" class="buffer-add-button" data-url="'.$url.'" data-count="horizontal"';
|
13 |
+
if ($id != '') {
|
14 |
+
$retval .= ' data-via="'.$id.'"';
|
15 |
+
}
|
16 |
+
$retval .= ' data-text="'.$title.'">Buffer</a>';
|
17 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
18 |
+
$this->enqueue_script('Social_sharing_buffer', 'http://static.bufferapp.com/js/button.js', $footer);
|
19 |
+
break;
|
20 |
+
case 'vertical':
|
21 |
+
$retval = '<a href="http://bufferapp.com/add" class="buffer-add-button" data-url="'.$url.'" data-count="vertical"';
|
22 |
+
if ($id != '') {
|
23 |
+
$retval .= ' data-via="'.$id.'"';
|
24 |
+
}
|
25 |
+
$retval .= ' data-text="'.$title.'">Buffer</a>';
|
26 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
27 |
+
$this->enqueue_script('Social_sharing_buffer', 'http://static.bufferapp.com/js/button.js', $footer);
|
28 |
+
break;
|
29 |
+
case 'none':
|
30 |
+
$retval = '<a href="http://bufferapp.com/add" class="buffer-add-button" data-url="'.$url.'" data-count="none"';
|
31 |
+
if ($id != '') {
|
32 |
+
$retval .= ' data-via="'.$id.'"';
|
33 |
+
}
|
34 |
+
$retval .= ' data-text="'.$title.'">Buffer</a>';
|
35 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
36 |
+
$this->enqueue_script('Social_sharing_buffer', 'http://static.bufferapp.com/js/button.js', $footer);
|
37 |
+
break;
|
38 |
+
default:
|
39 |
+
$url = 'http://bufferapp.com/add?url='.urlencode($url).'&text='.urlencode($title);
|
40 |
+
if ($id != '') {
|
41 |
+
$url .= '&via='.urlencode($id);
|
42 |
+
}
|
43 |
+
$text = ($text == '') ? __('Add to','mr_social_sharing_toolkit').' Buffer' : $text;
|
44 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
45 |
+
break;
|
46 |
+
}
|
47 |
+
return $retval;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
?>
|
delicious.js → includes/buttons/button.delicious.js
RENAMED
File without changes
|
includes/buttons/button.delicious.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Delicious extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'dl_delicious', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Delicious';
|
6 |
+
$this->icon = 'delicious';
|
7 |
+
}
|
8 |
+
|
9 |
+
function dl_delicious($url, $title, $type, $id, $text = '', $icon = '') {
|
10 |
+
switch ($type) {
|
11 |
+
case 'horizontal':
|
12 |
+
$hash = md5($url);
|
13 |
+
$retval = '<div class="delicious_horizontal"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&noui&jump=close&url='.urlencode($url).'&title='.urlencode($title).'" target="_blank"></a></div>';
|
14 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
15 |
+
$this->enqueue_script('Social_sharing_delicious', plugins_url('/button.delicious.js', __FILE__), $footer);
|
16 |
+
|
17 |
+
break;
|
18 |
+
case 'vertical':
|
19 |
+
$hash = md5($url);
|
20 |
+
$retval = '<div class="delicious_vertical"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&noui&jump=close&url='.urlencode($url).'&title='.urlencode($title).'" target="_blank"></a></div>';
|
21 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
22 |
+
$this->enqueue_script('Social_sharing_delicious', plugins_url('/button.delicious.js', __FILE__), $footer);
|
23 |
+
|
24 |
+
break;
|
25 |
+
default:
|
26 |
+
$url = 'http://del.icio.us/post?url='.urlencode($url).'&title='.urlencode($title);
|
27 |
+
$text = ($text == '') ? __('Save on','mr_social_sharing_toolkit').' Delicious' : $text;
|
28 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
29 |
+
break;
|
30 |
+
}
|
31 |
+
return $retval;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
?>
|
includes/buttons/button.deviantart.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Deviantart extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_deviant', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'deviantArt';
|
6 |
+
$this->icon = 'deviantart';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_deviant($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://'.$id.'.deviantart.com/';
|
11 |
+
$text = ($text == '') ? __('My deviantArt','mr_social_sharing_toolkit') : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
digg.js → includes/buttons/button.digg.js
RENAMED
File without changes
|
includes/buttons/button.digg.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Digg extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'dg_digg', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Digg';
|
6 |
+
$this->icon = 'digg';
|
7 |
+
}
|
8 |
+
|
9 |
+
function dg_digg($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
10 |
+
switch ($type) {
|
11 |
+
case 'horizontal':
|
12 |
+
$retval = '<a class="DiggThisButton DiggCompact" href="http://digg.com/submit?url='.urlencode($url).'&title='.urlencode($title).'"></a>';
|
13 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
14 |
+
$this->enqueue_script('Social_sharing_digg', plugins_url('/button.digg.js', __FILE__), $footer);
|
15 |
+
break;
|
16 |
+
case 'vertical':
|
17 |
+
$retval = '<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url='.urlencode($url).'&title='.urlencode($title).'"></a>';
|
18 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
19 |
+
$this->enqueue_script('Social_sharing_digg', plugins_url('/button.digg.js', __FILE__), $footer);
|
20 |
+
break;
|
21 |
+
default:
|
22 |
+
$url = 'http://digg.com/submit?url='.urlencode($url).'&title='.urlencode($title);
|
23 |
+
$text = ($text == '') ? __('Digg This','mr_social_sharing_toolkit') : $text;
|
24 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
25 |
+
break;
|
26 |
+
}
|
27 |
+
return $retval;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
?>
|
includes/buttons/button.email.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Email extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'ml_send', 'title' => __('Send email','mr_social_sharing_toolkit'), 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Email';
|
6 |
+
$this->icon = 'email';
|
7 |
+
}
|
8 |
+
|
9 |
+
function ml_send($url, $title, $type, $id = '', $media = '', $description = '', $text = '', $icon = '') {
|
10 |
+
$url = 'mailto:?subject='.$title.'&body='.$url;
|
11 |
+
$text = ($text == '') ? __('Share via email','mr_social_sharing_toolkit') : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon, false, true);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.facebook.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready( function($) {
|
2 |
+
$('body').prepend('<div id="fb-root"></div>');
|
3 |
+
});
|
includes/buttons/button.facebook.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Facebook extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'fb_like', 'title' => 'Facebook Like', 'types' => array('none', 'none_text', 'horizontal', 'vertical'));
|
5 |
+
$this->share_buttons[] = array('name' => 'fb_share', 'title' => 'Facebook Share', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->share_buttons[] = array('name' => 'fb_send', 'title' => 'Facebook Send', 'types' => array('none'));
|
7 |
+
$this->follow_buttons[] = array('name' => 'follow_facebook', 'title' => 'Facebook', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
8 |
+
$this->title = 'Facebook';
|
9 |
+
$this->icon = 'facebook';
|
10 |
+
}
|
11 |
+
|
12 |
+
function fb_like($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
13 |
+
//$retval = '<iframe src="https://www.facebook.com/plugins/like.php?locale='.__('en_US','mr_social_sharing_toolkit').'&href='.urlencode($url).'&layout=';
|
14 |
+
$retval = '<div class="fb-like" data-href="'.$url.'" data-send="false" ';
|
15 |
+
switch ($type) {
|
16 |
+
case 'horizontal':
|
17 |
+
//$retval .= 'button_count';
|
18 |
+
if ($id == 'recommend') {
|
19 |
+
$width = __('fb_horizontal_recommend_width','mr_social_sharing_toolkit');
|
20 |
+
$width = ($width == 'fb_horizontal_recommend_width') ? '120' : $width;
|
21 |
+
$retval .= 'data-layout="button_count" data-width="'.$width.'" data-action="recommend"';
|
22 |
+
} else {
|
23 |
+
$width = __('fb_horizontal_width','mr_social_sharing_toolkit');
|
24 |
+
$width = ($width == 'fb_horizontal_width') ? '90' : $width;
|
25 |
+
$retval .= 'data-layout="button_count" data-width="'.$width.'"';
|
26 |
+
}
|
27 |
+
$height = '21';
|
28 |
+
break;
|
29 |
+
case 'vertical':
|
30 |
+
//$retval .= 'box_count';
|
31 |
+
if ($id == 'recommend') {
|
32 |
+
$width = __('fb_vertical_recommend_width','mr_social_sharing_toolkit');
|
33 |
+
$width = ($width == 'fb_vertical_recommend_width') ? '92' : $width;
|
34 |
+
$retval .= 'data-layout="box_count" data-width="'.$width.'" data-action="recommend"';
|
35 |
+
} else {
|
36 |
+
$width = __('fb_vertical_width','mr_social_sharing_toolkit');
|
37 |
+
$width = ($width == 'fb_vertical_width') ? '55' : $width;
|
38 |
+
$retval .= 'data-layout="box_count" data-width="'.$width.'"';
|
39 |
+
}
|
40 |
+
$height = '62';
|
41 |
+
break;
|
42 |
+
case 'none_text':
|
43 |
+
//$retval .= 'standard';
|
44 |
+
if ($id == 'recommend') {
|
45 |
+
$width = 'auto';
|
46 |
+
$retval .= 'data-width="'.$width.'" data-action="recommend"';
|
47 |
+
} else {
|
48 |
+
$width = 'auto';
|
49 |
+
$retval .= 'data-width="'.$width.'"';
|
50 |
+
}
|
51 |
+
$height = '25';
|
52 |
+
break;
|
53 |
+
default:
|
54 |
+
//$retval .= 'standard';
|
55 |
+
if ($id == 'recommend') {
|
56 |
+
$width = __('fb_standard_recommend_width','mr_social_sharing_toolkit');
|
57 |
+
$width = ($width == 'fb_standard_standard_recommend_width') ? '91' : $width;
|
58 |
+
$retval .= 'data-width="'.$width.'" data-action="recommend"';
|
59 |
+
} else {
|
60 |
+
$width = __('fb_standard_width','mr_social_sharing_toolkit');
|
61 |
+
$width = ($width == 'fb_standard_width') ? '51' : $width;
|
62 |
+
$retval .= 'data-width="'.$width.'"';
|
63 |
+
}
|
64 |
+
$height = '24';
|
65 |
+
break;
|
66 |
+
}
|
67 |
+
//$retval .= '&show_faces=false&width='.$width.'&height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>';*/
|
68 |
+
$retval .= ' data-show-faces="false"></div>';
|
69 |
+
$lang = __('en_US','mr_social_sharing_toolkit');
|
70 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
71 |
+
$this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__));
|
72 |
+
$this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer);
|
73 |
+
return $retval;
|
74 |
+
}
|
75 |
+
|
76 |
+
function fb_share($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
77 |
+
$lang = __('en_US','mr_social_sharing_toolkit');
|
78 |
+
switch ($type) {
|
79 |
+
case 'vertical':
|
80 |
+
$retval = '<fb:share-button type="box_count" href="'.$url.'"></fb:share-button>';
|
81 |
+
//$retval = '<a name="fb_share" type="box_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>';
|
82 |
+
$this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__));
|
83 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
84 |
+
$this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer);
|
85 |
+
//$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer);
|
86 |
+
break;
|
87 |
+
case 'horizontal':
|
88 |
+
$retval = '<fb:share-button type="button_count" href="'.$url.'"></fb:share-button>';
|
89 |
+
//$retval = '<a name="fb_share" type="button_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>';
|
90 |
+
$this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__));
|
91 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
92 |
+
$this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer);
|
93 |
+
//$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer);
|
94 |
+
break;
|
95 |
+
case 'none':
|
96 |
+
$retval = '<fb:share-button type="button" href="'.$url.'"></fb:share-button>';
|
97 |
+
//$retval = '<a name="fb_share" type="button" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>';
|
98 |
+
$this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__));
|
99 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
100 |
+
$this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer);
|
101 |
+
//$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer);
|
102 |
+
break;
|
103 |
+
default:
|
104 |
+
$url = 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url).'&t='.urlencode($title);
|
105 |
+
$text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' Facebook' : $text;
|
106 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
107 |
+
break;
|
108 |
+
}
|
109 |
+
return $retval;
|
110 |
+
}
|
111 |
+
|
112 |
+
function fb_send($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
113 |
+
//$retval = '<div id="fb-root"></div><fb:send href="'.$url.'" font=""></fb:send>';
|
114 |
+
$retval = '<div class="fb-send" data-href="'.$url.'"></div>';
|
115 |
+
$lang = __('en_US','mr_social_sharing_toolkit');
|
116 |
+
$this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__));
|
117 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
118 |
+
$this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer);
|
119 |
+
return $retval;
|
120 |
+
}
|
121 |
+
|
122 |
+
function follow_facebook($type, $id, $text = '', $icon = '') {
|
123 |
+
$url = 'http://www.facebook.com/'.$id;
|
124 |
+
$text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Facebook' : $text;
|
125 |
+
return $this->get_icon($type, $url, $text, $icon);
|
126 |
+
}
|
127 |
+
}
|
128 |
+
?>
|
includes/buttons/button.flattr.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* <![CDATA[ */
|
2 |
+
(function() {
|
3 |
+
var s = document.createElement('script');
|
4 |
+
var t = document.getElementsByTagName('script')[0];
|
5 |
+
|
6 |
+
s.type = 'text/javascript';
|
7 |
+
s.async = true;
|
8 |
+
s.src = '//api.flattr.com/js/0.6/load.js?mode=auto';
|
9 |
+
|
10 |
+
t.parentNode.insertBefore(s, t);
|
11 |
+
})();
|
12 |
+
/* ]]> */
|
includes/buttons/button.flattr.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Flattr extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'fl_flattr', 'id' => 'id:', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Flattr';
|
6 |
+
$this->icon = 'flattr';
|
7 |
+
}
|
8 |
+
|
9 |
+
function fl_flattr($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
10 |
+
switch ($type) {
|
11 |
+
case 'vertical':
|
12 |
+
$retval = '<a class="FlattrButton" href="'.$url.'" title="'.$title.'" rel="flattr;uid:'.$id.';" lang="en_GB" style="display: none;">'.$description.'</a>';
|
13 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
14 |
+
$this->enqueue_script('Social_sharing_flattr', plugins_url('/button.flattr.js', __FILE__), $footer);
|
15 |
+
break;
|
16 |
+
case 'horizontal':
|
17 |
+
$retval = '<a class="FlattrButton" href="'.$url.'" title="'.$title.'" rel="flattr;button:compact;uid:'.$id.';" lang="en_GB" style="display: none;">'.$description.'</a>';
|
18 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
19 |
+
$this->enqueue_script('Social_sharing_flattr', plugins_url('/button.flattr.js', __FILE__), $footer);
|
20 |
+
break;
|
21 |
+
default:
|
22 |
+
$url = 'https://flattr.com/submit/auto?user_id='.urlencode($id).'&url='.urlencode($url).'&title='.urlencode($title).'&&language=en_GB';
|
23 |
+
$text = ($text == '') ? __('Flattr this!','mr_social_sharing_toolkit') : $text;
|
24 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
25 |
+
break;
|
26 |
+
}
|
27 |
+
return $retval;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
?>
|
includes/buttons/button.flickr.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Flickr extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_flickr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Flickr';
|
6 |
+
$this->icon = 'flickr';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_flickr($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://www.flickr.com/photos/'.$id;
|
11 |
+
$text = ($text == '') ? __('My photostream on','mr_social_sharing_toolkit').' Flickr' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.goodreads.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Goodreads extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_goodreads', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Goodreads';
|
6 |
+
$this->icon = 'goodreads';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_goodreads($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://goodreads.com/profile/'.$id;
|
11 |
+
$text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Goodreads' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.googleplus.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
3 |
+
po.src = 'https://apis.google.com/js/plusone.js';
|
4 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
5 |
+
})();
|
includes/buttons/button.googleplus.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_GooglePlus extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'gl_plus', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_plus', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Google+';
|
7 |
+
$this->icon = 'googleplus';
|
8 |
+
}
|
9 |
+
|
10 |
+
function gl_plus($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
11 |
+
$retval = '<g:plusone';
|
12 |
+
switch ($type) {
|
13 |
+
case 'horizontal':
|
14 |
+
$retval = '<div class="g-plusone" data-size="medium" data-href="'.$url.'"></div>';
|
15 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
16 |
+
$this->enqueue_script('Social_sharing_googleplus', plugins_url('/button.googleplus.js', __FILE__), $footer);
|
17 |
+
break;
|
18 |
+
case 'vertical':
|
19 |
+
$retval = '<div class="g-plusone" data-size="tall" data-href="'.$url.'"></div>';
|
20 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
21 |
+
$this->enqueue_script('Social_sharing_googleplus', plugins_url('/button.googleplus.js', __FILE__), $footer);
|
22 |
+
break;
|
23 |
+
case 'none':
|
24 |
+
$retval = '<div class="g-plusone" data-size="medium" data-annotation="none" data-href="'.$url.'"></div>';
|
25 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
26 |
+
$this->enqueue_script('Social_sharing_googleplus', plugins_url('/button.googleplus.js', __FILE__), $footer);
|
27 |
+
break;
|
28 |
+
default:
|
29 |
+
$url = 'https://plusone.google.com/_/+1/confirm?hl=en&url='.urlencode($url).'&title='.urlencode($title);
|
30 |
+
$text = ($text == '') ? '+1' : $text;
|
31 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
32 |
+
break;
|
33 |
+
}
|
34 |
+
return $retval;
|
35 |
+
}
|
36 |
+
|
37 |
+
function follow_plus($type, $id, $text = '', $icon = '') {
|
38 |
+
$url = 'http://plus.google.com/'.$id;
|
39 |
+
$text = ($text == '') ? __('Add me to your circles','mr_social_sharing_toolkit') : $text;
|
40 |
+
return $this->get_icon($type, $url, $text, $icon);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
?>
|
includes/buttons/button.hyves.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Hyves extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'hv_respect', 'title' => 'Hyves Respect', 'types' => array('horizontal'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_hyves', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Hyves';
|
7 |
+
$this->icon = 'hyves';
|
8 |
+
}
|
9 |
+
|
10 |
+
function hv_respect($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
11 |
+
$retval = '<iframe src="http://www.hyves.nl/respect/button?url='.urlencode($url).'&title='.urlencode($title).'" style="border: medium none; overflow:hidden; width:150px; height:21px;" scrolling="no" frameborder="0" allowTransparency="true" ></iframe>';
|
12 |
+
return $retval;
|
13 |
+
}
|
14 |
+
|
15 |
+
function follow_hyves($type, $id, $text = '', $icon = '') {
|
16 |
+
$url = 'http://'.$id.'.hyves.nl';
|
17 |
+
$text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Hyves' : $text;
|
18 |
+
return $this->get_icon($type, $url, $text, $icon);
|
19 |
+
}
|
20 |
+
}
|
21 |
+
?>
|
includes/buttons/button.lastfm.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Lastfm extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_lastfm', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Last.fm';
|
6 |
+
$this->icon = 'lastfm';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_lastfm($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://www.last.fm/user/'.$id;
|
11 |
+
$text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Last.fm' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.linkedin.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Linkedin extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'li_share', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_linked', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->follow_buttons[] = array('name' => 'follow_linked_co', 'title' => 'LinkedIn Company', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
7 |
+
$this->follow_buttons[] = array('name' => 'follow_linked_group', 'title' => 'LinkedIn Group', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
8 |
+
$this->title = 'LinkedIn';
|
9 |
+
$this->icon = 'linkedin';
|
10 |
+
}
|
11 |
+
|
12 |
+
function li_share($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
13 |
+
switch ($type) {
|
14 |
+
case 'horizontal':
|
15 |
+
$retval = '<script type="IN/Share" data-url="'.$url.'" data-counter="right"></script>';
|
16 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
17 |
+
$this->enqueue_script('Social_sharing_linkedin', 'http://platform.linkedin.com/in.js', $footer);
|
18 |
+
break;
|
19 |
+
case 'vertical':
|
20 |
+
$retval = '<script type="IN/Share" data-url="'.$url.'" data-counter="top"></script>';
|
21 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
22 |
+
$this->enqueue_script('Social_sharing_linkedin', 'http://platform.linkedin.com/in.js', $footer);
|
23 |
+
break;
|
24 |
+
case 'none':
|
25 |
+
$retval = '<script type="IN/Share" data-url="'.$url.'"></script>';
|
26 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
27 |
+
$this->enqueue_script('Social_sharing_linkedin', 'http://platform.linkedin.com/in.js', $footer);
|
28 |
+
break;
|
29 |
+
default:
|
30 |
+
$url = 'http://www.linkedin.com/shareArticle?mini=true&url='.urlencode($url).'&title='.urlencode($title);
|
31 |
+
$text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
32 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
33 |
+
break;
|
34 |
+
}
|
35 |
+
return $retval;
|
36 |
+
}
|
37 |
+
|
38 |
+
function follow_linked($type, $id, $text = '', $icon = '') {
|
39 |
+
$url = 'http://www.linkedin.com/in/'.$id;
|
40 |
+
$text = ($text == '') ? __('Join my network on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
41 |
+
return $this->get_icon($type, $url, $text, $icon);
|
42 |
+
}
|
43 |
+
|
44 |
+
function follow_linked_co($type, $id, $text = '', $icon = '') {
|
45 |
+
$url = 'http://www.linkedin.com/company/'.$id;
|
46 |
+
$text = ($text == '') ? __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
47 |
+
return $this->get_icon($type, $url, $text, $icon);
|
48 |
+
}
|
49 |
+
|
50 |
+
function follow_linked_group($type, $id, $text = '', $icon = '') {
|
51 |
+
$url = 'http://www.linkedin.com/groups?gid='.$id;
|
52 |
+
$text = ($text == '') ? __('Join my group on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
53 |
+
return $this->get_icon($type, $url, $text, $icon);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
?>
|
includes/buttons/button.myspace.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Myspace extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'ms_myspace', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_myspace', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Myspace';
|
7 |
+
$this->icon = 'myspace';
|
8 |
+
}
|
9 |
+
|
10 |
+
function ms_myspace($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
11 |
+
$url = 'http://www.myspace.com/Modules/PostTo/Pages/?t='.urlencode($title).'&u='.urlencode($url);
|
12 |
+
$text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' Myspace' : $text;
|
13 |
+
return $this->get_icon($type, $url, $text, $icon, true);
|
14 |
+
}
|
15 |
+
|
16 |
+
function follow_myspace($type, $id, $text = '', $icon = '') {
|
17 |
+
$url = 'http://www.myspace.com/'.$id;
|
18 |
+
$text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Myspace' : $text;
|
19 |
+
return $this->get_icon($type, $url, $text, $icon);
|
20 |
+
}
|
21 |
+
}
|
22 |
+
?>
|
includes/buttons/button.picasa.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Picasa extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_picasa', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Picasa';
|
6 |
+
$this->icon = 'picasa';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_picasa($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://picasaweb.google.com/'.$id;
|
11 |
+
$text = ($text == '') ? __('My Picasa Web Albums','mr_social_sharing_toolkit') : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.pinterest.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Pinterest extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'pn_pinterest', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_pinterest', 'id' => 'id:', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Pinterest';
|
7 |
+
$this->icon = 'pinterest';
|
8 |
+
}
|
9 |
+
|
10 |
+
function pn_pinterest($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
11 |
+
$pin_url = 'http://pinterest.com/pin/create/button/?url='.urlencode($url).'&media='.urlencode($media).'&description='.urlencode($title);
|
12 |
+
switch ($type) {
|
13 |
+
case 'horizontal':
|
14 |
+
$retval = '<a href="'.$pin_url.'" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
15 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
16 |
+
$this->enqueue_script('Social_sharing_pinterest', 'http://assets.pinterest.com/js/pinit.js', $footer);
|
17 |
+
break;
|
18 |
+
case 'vertical':
|
19 |
+
$retval = '<a href="'.$pin_url.'" class="pin-it-button" count-layout="vertical"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
20 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
21 |
+
$this->enqueue_script('Social_sharing_pinterest', 'http://assets.pinterest.com/js/pinit.js', $footer);
|
22 |
+
break;
|
23 |
+
case 'none':
|
24 |
+
$retval = '<a href="'.$pin_url.'" class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
25 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
26 |
+
$this->enqueue_script('Social_sharing_pinterest', 'http://assets.pinterest.com/js/pinit.js', $footer);
|
27 |
+
break;
|
28 |
+
default:
|
29 |
+
$text = ($text == '') ? __('Pin it on','mr_social_sharing_toolkit').' Pinterest' : $text;
|
30 |
+
$retval = $this->get_icon($type, $pin_url, $text, $icon, true);
|
31 |
+
break;
|
32 |
+
}
|
33 |
+
return $retval;
|
34 |
+
}
|
35 |
+
|
36 |
+
function follow_pinterest($type, $id, $text = '', $icon = '') {
|
37 |
+
$url = 'http://pinterest.com/'.$id.'/';
|
38 |
+
$text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Pinterest' : $text;
|
39 |
+
return $this->get_icon($type, $url, $text, $icon);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
?>
|
includes/buttons/button.reddit.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Reddit extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'rd_reddit', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Reddit';
|
6 |
+
$this->icon = 'reddit';
|
7 |
+
}
|
8 |
+
|
9 |
+
function rd_reddit($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
10 |
+
switch ($type) {
|
11 |
+
case 'horizontal':
|
12 |
+
$retval = '<script type="text/javascript">
|
13 |
+
reddit_url = "'.$url.'";
|
14 |
+
reddit_title = "'.$title.'";
|
15 |
+
</script>
|
16 |
+
<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script>';
|
17 |
+
break;
|
18 |
+
case 'vertical':
|
19 |
+
$retval = '<script type="text/javascript">
|
20 |
+
reddit_url = "'.$url.'";
|
21 |
+
reddit_title = "'.$title.'";
|
22 |
+
</script><script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>';
|
23 |
+
break;
|
24 |
+
default:
|
25 |
+
$url = 'http://www.reddit.com/submit?url='.urlencode($url);
|
26 |
+
$text = ($text == '') ? __('Submit to','mr_social_sharing_toolkit').' reddit' : $text;
|
27 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
28 |
+
break;
|
29 |
+
}
|
30 |
+
return $retval;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
?>
|
includes/buttons/button.rss.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Rss extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_rss', 'id' => 'url:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = __('RSS Feed','mr_social_sharing_toolkit');
|
6 |
+
$this->icon = 'rss';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_rss($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = $id;
|
11 |
+
$text = ($text == '') ? 'RSS Feed' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.soundcloud.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Soundcloud extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_soundcloud', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Soundcloud';
|
6 |
+
$this->icon = 'soundcloud';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_soundcloud($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://soundcloud.com/'.$id;
|
11 |
+
$text = ($text == '') ? __('My sounds on','mr_social_sharing_toolkit').' Soundcloud' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/buttons/button.spotify.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Spotify extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_spotify', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Spotify';
|
6 |
+
$this->icon = 'spotify';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_spotify($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://open.spotify.com/user/'.$id;
|
11 |
+
$text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Spotify' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
stumbleupon.js → includes/buttons/button.stumbleupon.js
RENAMED
File without changes
|
includes/buttons/button.stumbleupon.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Stumbleupon extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'su_stumble', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'StumbleUpon';
|
6 |
+
$this->icon = 'stumbleupon';
|
7 |
+
}
|
8 |
+
|
9 |
+
function su_stumble($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
10 |
+
switch ($type) {
|
11 |
+
case 'horizontal':
|
12 |
+
$retval = '<span class="stumble_horizontal"><su:badge layout="1" location="'.$url.'"></su:badge></span>';
|
13 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
14 |
+
$this->enqueue_script('Social_sharing_stumbleupon', plugins_url('/button.stumbleupon.js', __FILE__), $footer);
|
15 |
+
break;
|
16 |
+
case 'vertical':
|
17 |
+
$retval = '<span class="stumble_vertical"><su:badge layout="5" location="'.$url.'"></su:badge></span>';
|
18 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
19 |
+
$this->enqueue_script('Social_sharing_stumbleupon', plugins_url('/button.stumbleupon.js', __FILE__), $footer);
|
20 |
+
break;
|
21 |
+
default:
|
22 |
+
$url = 'http://www.stumbleupon.com/submit?url='.urlencode($url);
|
23 |
+
$text = ($text == '') ? __('Submit to','mr_social_sharing_toolkit').' StumbleUpon' : $text;
|
24 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
25 |
+
break;
|
26 |
+
}
|
27 |
+
return $retval;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
?>
|
includes/buttons/button.tumblr.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Tumblr extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'tu_tumblr', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_tumblr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Tumblr';
|
7 |
+
$this->icon = 'tumblr';
|
8 |
+
}
|
9 |
+
|
10 |
+
function tu_tumblr($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
11 |
+
$url = 'http://www.tumblr.com/share/link?url='.urlencode($url).'&name='.urlencode($title);
|
12 |
+
$text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' Tumblr' : $text;
|
13 |
+
return $this->get_icon($type, $url, $text, $icon, true);
|
14 |
+
}
|
15 |
+
|
16 |
+
function follow_tumblr($type, $id, $text = '', $icon = '') {
|
17 |
+
$url = 'http://'.$id.'.tumblr.com';
|
18 |
+
$text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Tumblr' : $text;
|
19 |
+
return $this->get_icon($type, $url, $text, $icon);
|
20 |
+
}
|
21 |
+
}
|
22 |
+
?>
|
includes/buttons/button.twitter.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Twitter extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'tw_tweet', 'id' => '@', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_twitter', 'id' => '@', 'types' => array('none', 'horizontal', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Twitter';
|
7 |
+
$this->icon = 'twitter';
|
8 |
+
//add_shortcode('social_share_twitter', array($this, 'shortcode_tweet'));
|
9 |
+
//add_shortcode('social_follow_twitter', array($this, 'shortcode_follow'));
|
10 |
+
}
|
11 |
+
|
12 |
+
function tw_tweet($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
13 |
+
$count_url = '';
|
14 |
+
$bitly = get_option('mr_social_sharing_bitly');
|
15 |
+
if ($bitly['enable'] == 1 && $bitly['username'] != '' && $bitly['key'] != '') {
|
16 |
+
if (is_array($bitly['cache']) && array_key_exists($url, $bitly['cache'])) {
|
17 |
+
$count_url = $url;
|
18 |
+
$url = $bitly['cache'][$url];
|
19 |
+
} else {
|
20 |
+
$ch = curl_init('https://api-ssl.bitly.com/v3/shorten?login='.$bitly['username'].'&apiKey='.$bitly['key'].'&longUrl='.urlencode($url).'&format=txt');
|
21 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
22 |
+
if ($short_url = curl_exec($ch)) {
|
23 |
+
$count_url = $url;
|
24 |
+
$url = trim($short_url);
|
25 |
+
$bitly['cache'][$count_url] = $url;
|
26 |
+
update_option( 'mr_social_sharing_bitly', $bitly);
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
switch ($type) {
|
31 |
+
case 'horizontal':
|
32 |
+
$retval = '<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="'.$url.'"';
|
33 |
+
if ($id != '') {
|
34 |
+
$retval .= ' data-via="'.$id.'"';
|
35 |
+
}
|
36 |
+
if ($count_url != '') {
|
37 |
+
$retval .= ' data-counturl="'.$count_url.'"';
|
38 |
+
}
|
39 |
+
$retval .= ' data-text="'.$title.'">Tweet</a>';
|
40 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
41 |
+
$this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer);
|
42 |
+
break;
|
43 |
+
case 'vertical':
|
44 |
+
$retval = '<a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical" data-url="'.$url.'"';
|
45 |
+
if ($id != '') {
|
46 |
+
$retval .= ' data-via="'.$id.'"';
|
47 |
+
}
|
48 |
+
if ($count_url != '') {
|
49 |
+
$retval .= ' data-counturl="'.$count_url.'"';
|
50 |
+
}
|
51 |
+
$retval .= ' data-text="'.$title.'">Tweet</a>';
|
52 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
53 |
+
$this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer);
|
54 |
+
break;
|
55 |
+
default:
|
56 |
+
$url = 'https://twitter.com/share?url='.urlencode($url).'&text='.urlencode($title);
|
57 |
+
if ($id != '') {
|
58 |
+
$url .= '&via='.$id;
|
59 |
+
}
|
60 |
+
if ($count_url != '') {
|
61 |
+
$url .= '&counturl='.urlencode($count_url);
|
62 |
+
}
|
63 |
+
$text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' Twitter' : $text;
|
64 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
65 |
+
break;
|
66 |
+
}
|
67 |
+
return $retval;
|
68 |
+
}
|
69 |
+
|
70 |
+
function follow_twitter($type, $id, $text = '', $icon = '') {
|
71 |
+
switch ($type) {
|
72 |
+
case 'none':
|
73 |
+
$retval = '<a href="https://twitter.com/'.$id.'" class="twitter-follow-button" data-show-count="false">Follow @'.$id.'</a>';
|
74 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
75 |
+
$this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer);
|
76 |
+
break;
|
77 |
+
case 'horizontal':
|
78 |
+
$retval = '<a href="https://twitter.com/'.$id.'" class="twitter-follow-button">Follow @'.$id.'</a>';
|
79 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
80 |
+
$this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer);
|
81 |
+
break;
|
82 |
+
default:
|
83 |
+
$url = 'https://twitter.com/'.$id;
|
84 |
+
$text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Twitter' : $text;
|
85 |
+
$retval = $this->get_icon($type, $url, $text, $icon);
|
86 |
+
break;
|
87 |
+
}
|
88 |
+
return $retval;
|
89 |
+
}
|
90 |
+
|
91 |
+
/*function shortcode_tweet() {
|
92 |
+
if (!is_feed()) {
|
93 |
+
extract(shortcode_atts(array('id' => '', 'type' => 'none', 'title' => get_the_title(), 'url' => get_permalink()), $atts));
|
94 |
+
return $this->tw_tweet($url, $title, $type, $id);
|
95 |
+
}
|
96 |
+
return '';
|
97 |
+
}
|
98 |
+
|
99 |
+
function shortcode_follow() {
|
100 |
+
if (!is_feed()) {
|
101 |
+
extract(shortcode_atts(array('id' => '', 'type' => 'none'), $atts));
|
102 |
+
if ($id != '') {
|
103 |
+
return $this->follow_twitter($type, $id);
|
104 |
+
}
|
105 |
+
}
|
106 |
+
return '';
|
107 |
+
}*/
|
108 |
+
}
|
109 |
+
$MR_Social_Sharing_Toolkit_Twitter = new MR_Social_Sharing_Toolkit_Twitter();
|
110 |
+
?>
|
includes/buttons/button.xing.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Xing extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->share_buttons[] = array('name' => 'xi_xing', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->follow_buttons[] = array('name' => 'follow_xing', 'id' => 'id:', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
6 |
+
$this->title = 'Xing';
|
7 |
+
$this->icon = 'xing';
|
8 |
+
}
|
9 |
+
|
10 |
+
function xi_xing($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
|
11 |
+
switch ($type) {
|
12 |
+
case 'horizontal':
|
13 |
+
$retval = '<script type="XING/Share" data-counter="right" data-lang="en" data-url="'.$url.'"></script>';
|
14 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
15 |
+
$this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', $footer);
|
16 |
+
break;
|
17 |
+
case 'vertical':
|
18 |
+
$retval = '<script type="XING/Share" data-counter="top" data-lang="en" data-url="'.$url.'"></script>';
|
19 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
20 |
+
$this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', $footer);
|
21 |
+
break;
|
22 |
+
case 'none':
|
23 |
+
$retval = '<script type="XING/Share" data-counter="no_count" data-lang="en" data-url="'.$url.'" data-button-shape="rectangle"></script>';
|
24 |
+
$footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
|
25 |
+
$this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', $footer);
|
26 |
+
break;
|
27 |
+
default:
|
28 |
+
$url = 'https://www.xing.com/app/startpage?op=home;func_share=1;tab=link;url='.$url;
|
29 |
+
$text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' Xing' : $text;
|
30 |
+
$retval = $this->get_icon($type, $url, $text, $icon, true);
|
31 |
+
break;
|
32 |
+
}
|
33 |
+
return $retval;
|
34 |
+
}
|
35 |
+
|
36 |
+
function follow_xing($type, $id, $text = '', $icon = '') {
|
37 |
+
$url = 'http://www.xing.com/profile/'.$id;
|
38 |
+
$text = ($text == '') ? __('Join my network on','mr_social_sharing_toolkit').' Xing' : $text;
|
39 |
+
return $this->get_icon($type, $url, $text, $icon);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
?>
|
includes/buttons/button.youtube.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Youtube extends MR_Social_Sharing_Toolkit_Button {
|
3 |
+
function __construct() {
|
4 |
+
$this->follow_buttons[] = array('name' => 'follow_youtube', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
5 |
+
$this->title = 'Youtube';
|
6 |
+
$this->icon = 'youtube';
|
7 |
+
}
|
8 |
+
|
9 |
+
function follow_youtube($type, $id, $text = '', $icon = '') {
|
10 |
+
$url = 'http://www.youtube.com/user/'.$id;
|
11 |
+
$text = ($text == '') ? __('Watch me on','mr_social_sharing_toolkit').' YouTube' : $text;
|
12 |
+
return $this->get_icon($type, $url, $text, $icon);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
includes/class.button.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Button {
|
3 |
+
protected $share_buttons;
|
4 |
+
protected $follow_buttons;
|
5 |
+
protected $title;
|
6 |
+
protected $icon;
|
7 |
+
|
8 |
+
function MR_Social_Sharing_Toolkit_Button() {
|
9 |
+
$this->share_buttons = array();
|
10 |
+
$this->follow_buttons = array();
|
11 |
+
$this->title = '';
|
12 |
+
$this->icon = '';
|
13 |
+
}
|
14 |
+
|
15 |
+
function getTitle() {
|
16 |
+
return $this->title;
|
17 |
+
}
|
18 |
+
|
19 |
+
function getIcon() {
|
20 |
+
return $this->icon;
|
21 |
+
}
|
22 |
+
|
23 |
+
function hasShare() {
|
24 |
+
if (is_array($this->share_buttons) && count($this->share_buttons) > 0) {
|
25 |
+
return true;
|
26 |
+
}
|
27 |
+
return false;
|
28 |
+
}
|
29 |
+
|
30 |
+
function getShareButtons() {
|
31 |
+
return $this->share_buttons;
|
32 |
+
}
|
33 |
+
|
34 |
+
function hasFollow() {
|
35 |
+
if (is_array($this->follow_buttons) && count($this->follow_buttons) > 0) {
|
36 |
+
return true;
|
37 |
+
}
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
|
41 |
+
function getFollowButtons() {
|
42 |
+
return $this->follow_buttons;
|
43 |
+
}
|
44 |
+
|
45 |
+
function get_icon($type, $url, $title, $icon = '', $popup = false, $blank = false) {
|
46 |
+
if ($blank) {
|
47 |
+
$url .= '" target="_blank';
|
48 |
+
}
|
49 |
+
if ($popup) {
|
50 |
+
$url .= '" class="mr_social_sharing_popup_link';
|
51 |
+
}
|
52 |
+
$text = '';
|
53 |
+
switch ($type) {
|
54 |
+
case 'none':
|
55 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/buttons/'.$this->icon.'.png', __FILE__)) : $icon;
|
56 |
+
break;
|
57 |
+
case 'icon_small':
|
58 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_small/'.$this->icon.'.png', __FILE__)) : $icon;
|
59 |
+
break;
|
60 |
+
case 'icon_small_text':
|
61 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_small/'.$this->icon.'.png', __FILE__)) : $icon;
|
62 |
+
$text = '<span class="mr_small_icon">'.$title.'</span></a>';
|
63 |
+
break;
|
64 |
+
case 'icon_medium':
|
65 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_medium/'.$this->icon.'.png', __FILE__)) : $icon;
|
66 |
+
break;
|
67 |
+
case 'icon_medium_text':
|
68 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_medium/'.$this->icon.'.png', __FILE__)) : $icon;
|
69 |
+
$text = '<span class="mr_medium_icon">'.$title.'</span></a>';
|
70 |
+
break;
|
71 |
+
case 'icon_large':
|
72 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_large/'.$this->icon.'.png', __FILE__)) : $icon;
|
73 |
+
break;
|
74 |
+
default:
|
75 |
+
$icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_small/'.$this->icon.'.png', __FILE__)) : $icon;
|
76 |
+
break;
|
77 |
+
}
|
78 |
+
$retval = '<a href="'.$url.'"><img src="'.$icon.'" alt="'.$title.'" title="'.$title.'"/>'.$text.'</a>';
|
79 |
+
return $retval;
|
80 |
+
}
|
81 |
+
|
82 |
+
function enqueue_script($name, $src, $footer = false) {
|
83 |
+
if ($footer) {
|
84 |
+
wp_enqueue_script($name, $src, array(), false, true);
|
85 |
+
} else {
|
86 |
+
wp_enqueue_script($name, $src);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
?>
|
includes/follow.widget.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Follow_Widget extends WP_Widget {
|
3 |
+
function MR_Social_Sharing_Toolkit_Follow_Widget() {
|
4 |
+
$widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Follow_Widget', 'description' => '' );
|
5 |
+
$control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-follow-widget' );
|
6 |
+
$this->WP_Widget( 'mr-social-sharing-toolkit-follow-widget', 'Social Sharing Toolkit '.__('Follow Widget','mr_social_sharing_toolkit'), $widget_ops, $control_ops );
|
7 |
+
}
|
8 |
+
|
9 |
+
function widget ( $args, $instance) {
|
10 |
+
extract( $args );
|
11 |
+
global $MR_Social_Sharing_Toolkit;
|
12 |
+
$widget_title = empty($instance['widget_title']) ? '' : $instance['widget_title'];
|
13 |
+
$followers = $MR_Social_Sharing_Toolkit->create_followers();
|
14 |
+
echo $before_widget;
|
15 |
+
if ($widget_title != '') {
|
16 |
+
echo $before_title . $widget_title . $after_title;
|
17 |
+
}
|
18 |
+
echo $followers;
|
19 |
+
echo $after_widget;
|
20 |
+
}
|
21 |
+
|
22 |
+
function update($new_instance, $old_instance) {
|
23 |
+
$instance = $old_instance;
|
24 |
+
$instance['widget_title'] = $new_instance['widget_title'];
|
25 |
+
return $instance;
|
26 |
+
}
|
27 |
+
|
28 |
+
function form($instance) {
|
29 |
+
$instance = wp_parse_args((array) $instance, array( 'widget_title' => ''));
|
30 |
+
echo '
|
31 |
+
<p>
|
32 |
+
<label for="'.$this->get_field_id( 'widget_title' ).'">'.__('Title').':</label>
|
33 |
+
<input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
|
34 |
+
</p>
|
35 |
+
<p>
|
36 |
+
'.__('Further configuration is done via the','mr_social_sharing_toolkit').' <a href="options-general.php?page=mr_social_sharing#tab_4">'.__('plugin admin screen','mr_social_sharing_toolkit').'</a>.
|
37 |
+
</p>';
|
38 |
+
}
|
39 |
+
}
|
40 |
+
add_action('widgets_init', create_function('', 'return register_widget("MR_Social_Sharing_Toolkit_Follow_Widget");'));
|
41 |
+
?>
|
includes/share.widget.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class MR_Social_Sharing_Toolkit_Widget extends WP_Widget {
|
3 |
+
function MR_Social_Sharing_Toolkit_Widget() {
|
4 |
+
$widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Widget', 'description' => '' );
|
5 |
+
$control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-widget' );
|
6 |
+
$this->WP_Widget( 'mr-social-sharing-toolkit-widget', 'Social Sharing Toolkit '.__('Share Widget','mr_social_sharing_toolkit'), $widget_ops, $control_ops );
|
7 |
+
}
|
8 |
+
|
9 |
+
function widget ( $args, $instance) {
|
10 |
+
extract( $args );
|
11 |
+
global $MR_Social_Sharing_Toolkit;
|
12 |
+
$widget_title = empty($instance['widget_title']) ? '' : $instance['widget_title'];
|
13 |
+
$url = empty($instance['fixed_url']) ? '' : $instance['fixed_url'];
|
14 |
+
$title = empty($instance['fixed_title']) ? wp_title('', false) : $instance['fixed_title'];
|
15 |
+
$media = '';
|
16 |
+
if ($this->options['mr_social_sharing_pinterest']['default_image'] != '' && $this->options['mr_social_sharing_pinterest']['fixed_image'] == 1) {
|
17 |
+
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
18 |
+
} else {
|
19 |
+
if (current_theme_supports('post-thumbnails')) {
|
20 |
+
if ($media = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()))) {
|
21 |
+
if (is_array($media)) {
|
22 |
+
$media = $media[0];
|
23 |
+
} else {
|
24 |
+
$media = '';
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
if ($media == '') {
|
29 |
+
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', get_the_content(), $matches);
|
30 |
+
$img = $matches[1][0];
|
31 |
+
if($img != '') {
|
32 |
+
$media = $img;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
36 |
+
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
37 |
+
}
|
38 |
+
}
|
39 |
+
$bookmarks = $MR_Social_Sharing_Toolkit->create_bookmarks($url, $title, 'widget_', $media);
|
40 |
+
echo $before_widget;
|
41 |
+
if ($widget_title != '') {
|
42 |
+
echo $before_title . $widget_title . $after_title;
|
43 |
+
}
|
44 |
+
echo $bookmarks;
|
45 |
+
echo $after_widget;
|
46 |
+
}
|
47 |
+
|
48 |
+
function update($new_instance, $old_instance) {
|
49 |
+
$instance = $old_instance;
|
50 |
+
$instance['widget_title'] = $new_instance['widget_title'];
|
51 |
+
$instance['fixed_title'] = $new_instance['fixed_title'];
|
52 |
+
$instance['fixed_url'] = $new_instance['fixed_url'];
|
53 |
+
return $instance;
|
54 |
+
}
|
55 |
+
|
56 |
+
function form($instance) {
|
57 |
+
$instance = wp_parse_args((array) $instance, array( 'widget_title' => '', 'fixed_title' => '', 'fixed_url' => ''));
|
58 |
+
echo '
|
59 |
+
<p>
|
60 |
+
<label for="'.$this->get_field_id( 'widget_title' ).'">'.__('Title').':</label>
|
61 |
+
<input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
|
62 |
+
</p>
|
63 |
+
<p>
|
64 |
+
<label for="'.$this->get_field_id( 'fixed_title' ).'">'.__('Fixed title','mr_social_sharing_toolkit').':</label>
|
65 |
+
<input class="widefat" id="'.$this->get_field_id( 'fixed_title' ).'" name="'.$this->get_field_name( 'fixed_title' ).'" value="'.$instance['fixed_title'].'" />
|
66 |
+
</p>
|
67 |
+
<p>
|
68 |
+
<label for="'.$this->get_field_id( 'fixed_url' ).'">'.__('Fixed url','mr_social_sharing_toolkit').':</label>
|
69 |
+
<input class="widefat" id="'.$this->get_field_id( 'fixed_url' ).'" name="'.$this->get_field_name( 'fixed_url' ).'" value="'.$instance['fixed_url'].'" />
|
70 |
+
</p>
|
71 |
+
<p>
|
72 |
+
'.__('Further configuration is done via the','mr_social_sharing_toolkit').' <a href="options-general.php?page=mr_social_sharing#tab_3">'.__('plugin admin screen','mr_social_sharing_toolkit').'</a>.
|
73 |
+
</p>';
|
74 |
+
}
|
75 |
+
}
|
76 |
+
add_action('widgets_init', create_function('', 'return register_widget("MR_Social_Sharing_Toolkit_Widget");'));
|
77 |
+
?>
|
languages/mr_social_sharing_toolkit-nl_NL.mo
DELETED
Binary file
|
languages/mr_social_sharing_toolkit-nl_NL.po
DELETED
@@ -1,364 +0,0 @@
|
|
1 |
-
# Copyright (C) 2010 Social Sharing Toolkit
|
2 |
-
# This file is distributed under the same license as the Social Sharing Toolkit package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Social Sharing Toolkit 2.0.5\n"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/social_sharing_toolkit\n"
|
7 |
-
"POT-Creation-Date: 2012-04-07 14:59:58+00:00\n"
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2012-04-09 21:31+0100\n"
|
12 |
-
"Last-Translator: Marijn Rongen <m.rongen@active-bits.nl>\n"
|
13 |
-
"Language-Team: Dutch <LL@li.org>\n"
|
14 |
-
|
15 |
-
msgid "Button"
|
16 |
-
msgstr "Knop"
|
17 |
-
|
18 |
-
msgid "Button + text"
|
19 |
-
msgstr "Knop + tekst"
|
20 |
-
|
21 |
-
msgid "Button + side counter"
|
22 |
-
msgstr "Knop + teller zijkant"
|
23 |
-
|
24 |
-
msgid "Button + top counter"
|
25 |
-
msgstr "Knop + teller boven"
|
26 |
-
|
27 |
-
msgid "Small icon"
|
28 |
-
msgstr "Klein icoon"
|
29 |
-
|
30 |
-
msgid "Small icon + text"
|
31 |
-
msgstr "Klein icoon + tekst"
|
32 |
-
|
33 |
-
msgid "Medium icon"
|
34 |
-
msgstr "Medium icoon"
|
35 |
-
|
36 |
-
msgid "Medium icon + text"
|
37 |
-
msgstr "Medium icoon + tekst"
|
38 |
-
|
39 |
-
msgid "Large icon"
|
40 |
-
msgstr "Groot icoon"
|
41 |
-
|
42 |
-
msgid "Send email"
|
43 |
-
msgstr "Stuur email"
|
44 |
-
|
45 |
-
msgid "Divider"
|
46 |
-
msgstr "Afscheiding"
|
47 |
-
|
48 |
-
msgid "RSS Feed"
|
49 |
-
msgstr "RSS Feed"
|
50 |
-
|
51 |
-
msgid "Donate"
|
52 |
-
msgstr "Doneren"
|
53 |
-
|
54 |
-
msgid "Settings saved."
|
55 |
-
msgstr "Instellingen opgeslagen"
|
56 |
-
|
57 |
-
msgid "General settings"
|
58 |
-
msgstr "Algemene instellingen"
|
59 |
-
|
60 |
-
msgid "Content"
|
61 |
-
msgstr "Inhoud"
|
62 |
-
|
63 |
-
msgid "Shortcode"
|
64 |
-
msgstr "Shortcode"
|
65 |
-
|
66 |
-
msgid "Share Widget"
|
67 |
-
msgstr "Deel Widget"
|
68 |
-
|
69 |
-
msgid "Follow Widget"
|
70 |
-
msgstr "Volg Widget"
|
71 |
-
|
72 |
-
msgid "Advanced settings"
|
73 |
-
msgstr "Geavanceerde instellingen"
|
74 |
-
|
75 |
-
msgid "Load JavaScript in footer"
|
76 |
-
msgstr "JavaScript in footer laden"
|
77 |
-
|
78 |
-
msgid "Improves performance but may not work on some themes"
|
79 |
-
msgstr "Verbeterd werking maar werkt niet op met alle thema's"
|
80 |
-
|
81 |
-
msgid "Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both."
|
82 |
-
msgstr "Kies of en waar de knoppen getoond moeten worden op berichten, pagina's of beide."
|
83 |
-
|
84 |
-
msgid "Button location"
|
85 |
-
msgstr "Locatie knoppen"
|
86 |
-
|
87 |
-
msgid "Do not display"
|
88 |
-
msgstr "Niet tonen"
|
89 |
-
|
90 |
-
msgid "Display before content"
|
91 |
-
msgstr "Vertoon voor inhoud"
|
92 |
-
|
93 |
-
msgid "Display after content"
|
94 |
-
msgstr "Vertoon na inhoud"
|
95 |
-
|
96 |
-
msgid "Display before and after content"
|
97 |
-
msgstr "Vertoon voor en na inhoud"
|
98 |
-
|
99 |
-
msgid "Place buttons on"
|
100 |
-
msgstr "Plaats knoppen op"
|
101 |
-
|
102 |
-
msgid "Enable shortcode"
|
103 |
-
msgstr "Shortcode inschakelen"
|
104 |
-
|
105 |
-
msgid "Use the shortcode [social_share/] where you want the buttons to appear"
|
106 |
-
msgstr "Gebruik de shortcode [social_share/] waar je de knoppen wilt laten zien"
|
107 |
-
|
108 |
-
msgid "Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin)."
|
109 |
-
msgstr "Ontvink dit als u problemen ondervindt met de weergave van knoppen in samenvattingen (enkele thema's gebruiken eigen functies welke niet goed samenwerken met de plugin)."
|
110 |
-
|
111 |
-
msgid "Include buttons in excerpts"
|
112 |
-
msgstr "Toon knoppen in samenvattingen"
|
113 |
-
|
114 |
-
msgid "Use rel=\"nofollow\" on links to social networks"
|
115 |
-
msgstr "Gebruik rel=\"nofollow\" voor links naar sociale networken"
|
116 |
-
|
117 |
-
msgid "Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
|
118 |
-
msgstr "Vink de knoppen aan om deze weer te geven op uw website. Voor elke knop kunt u een apart stijl selecteren uit het selectieveld. U kunt de volgorde van de knoppen wijzigen door deze naar de gewenste positie in de lijst te slepen. Voor de Tweet knop kunt u ook uw Twitter gebruikersnaam invullen om deze aan de tweet toe te voegen (zoals via @WordPress)."
|
119 |
-
|
120 |
-
msgid "Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
|
121 |
-
msgstr "Vink de knoppen aan om deze weer te geven in de Social Sharing Toolkit Deel widget. Voor elke knop kunt u een apart stijl selecteren uit het selectieveld. U kunt de volgorde van de knoppen wijzigen door deze naar de gewenste positie in de lijst te slepen. Voor de Tweet knop kunt u ook uw Twitter gebruikersnaam invullen om deze aan de tweet toe te voegen (zoals via @WordPress)."
|
122 |
-
|
123 |
-
msgid "For each widget you can enter a fixed url and title for the buttons, to do this"
|
124 |
-
msgstr "Voor elke widget kunt u een vaste url en titel opgeven, om dit te doen"
|
125 |
-
|
126 |
-
msgid "go to the widget configuration page"
|
127 |
-
msgstr "ga naar de widget configuratie pagina"
|
128 |
-
|
129 |
-
msgid "Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list."
|
130 |
-
msgstr "Vink de knoppen aan om deze weer te geven in de Social Sharing Toolkit Volg widget. Voor elke knop kunt u een apart stijl selecteren uit het selectieveld. U kunt de volgorde van de knoppen wijzigen door deze naar de gewenste positie in de lijst te slepen."
|
131 |
-
|
132 |
-
msgid "For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button."
|
133 |
-
msgstr "Voor elke knop hoeft u enkel uw id of gebruikersnaam van het netwerk op te geven zoals deze wordt weergegeven in de url van uw profielpagina. U dient de complete url op te geven voor de RSS Feed (inclusief http://) als u deze wenst weer te geven."
|
134 |
-
|
135 |
-
msgid "To add the widget to your website"
|
136 |
-
msgstr "Om de widget aan uw website toe te voegen"
|
137 |
-
|
138 |
-
msgid "Automatic Twitter links"
|
139 |
-
msgstr "Automatische Twitter links"
|
140 |
-
|
141 |
-
msgid "Select what you want to convert:"
|
142 |
-
msgstr "Selecteer wat u wilt converteren:"
|
143 |
-
|
144 |
-
msgid "Convert Twitter usernames"
|
145 |
-
msgstr "Twitter gebruikersnamen converteren"
|
146 |
-
|
147 |
-
msgid "Convert hashtags"
|
148 |
-
msgstr "Hashtags converteren"
|
149 |
-
|
150 |
-
msgid "And where it should be converted:"
|
151 |
-
msgstr "En waar het geconverteerd moet worden:"
|
152 |
-
|
153 |
-
msgid "Convert in posts and pages"
|
154 |
-
msgstr "Converteren in inhoud"
|
155 |
-
|
156 |
-
msgid "Convert in comments"
|
157 |
-
msgstr "Converteren in reacties"
|
158 |
-
|
159 |
-
msgid "Open links in new window or tab"
|
160 |
-
msgstr "Open links in een nieuw venster of tabblad"
|
161 |
-
|
162 |
-
msgid "Bitly"
|
163 |
-
msgstr "Bitly"
|
164 |
-
|
165 |
-
msgid "Use Bitly url shortening for the tweet button"
|
166 |
-
msgstr "Gebruik Bitly url verkorting voor de tweet knop"
|
167 |
-
|
168 |
-
msgid "Enable Bitly URL shortening"
|
169 |
-
msgstr "Bilty URL verkorting inschakelen"
|
170 |
-
|
171 |
-
msgid "Your bitly Username"
|
172 |
-
msgstr "Uw bitly gebruikersnaam"
|
173 |
-
|
174 |
-
msgid "Your bitly API Key"
|
175 |
-
msgstr "Uw bitly API Sleutel"
|
176 |
-
|
177 |
-
msgid "OpenGraph"
|
178 |
-
msgstr "OpenGraph"
|
179 |
-
|
180 |
-
msgid "Include Open Graph tags"
|
181 |
-
msgstr "Open Graph tags gebruiken"
|
182 |
-
|
183 |
-
msgid "Enable Open Graph"
|
184 |
-
msgstr "Open Graph inschakelen"
|
185 |
-
|
186 |
-
msgid "Default image URL"
|
187 |
-
msgstr "Standaard afbeelding URL"
|
188 |
-
|
189 |
-
msgid "You can specify a link to an image you would like to use for Pinterest pins when no image is available"
|
190 |
-
msgstr "U kunt een link naar een afbeelding invullen die u wilt gebruiken voor Pinterest pins indien geen afbeelding is gevonden"
|
191 |
-
|
192 |
-
msgid "Check this box to always display the default image with your Pins"
|
193 |
-
msgstr "Vink deze knop aan om altijd de standaard afbeelding to tonen bij uw Pins"
|
194 |
-
|
195 |
-
msgid "You can specify a link to an image you would like to include in your likes and shares"
|
196 |
-
msgstr "U kunt een link naar een afbeelding invullen die u wilt gebruiken voor gedeelde inhoud"
|
197 |
-
|
198 |
-
msgid "Always use the default image"
|
199 |
-
msgstr "Altijd de standaard afbeelding gebruiken"
|
200 |
-
|
201 |
-
msgid "Check this box to always display the default image with you shared content"
|
202 |
-
msgstr "Vink deze knop aan om altijd de standaard afbeelding to tonen bij uw gedeelde inhoud"
|
203 |
-
|
204 |
-
msgid "Save Changes"
|
205 |
-
msgstr "Veranderingen Opslaan"
|
206 |
-
|
207 |
-
msgid "Thank you for using the Social Sharing Toolkit!"
|
208 |
-
msgstr "Bedankt voor het gebruiken van de Social Sharing Toolkit!"
|
209 |
-
|
210 |
-
msgid "For questions or requests about this plugin please use the"
|
211 |
-
msgstr "Voor vragen of verzoeken over deze plugin gaat u naar de"
|
212 |
-
|
213 |
-
msgid "official plugin page"
|
214 |
-
msgstr "officiële plugin pagina"
|
215 |
-
|
216 |
-
msgid "If you like the plugin I would appreciate it if you provide a rating of the"
|
217 |
-
msgstr "Als u de plugin leuk vind waardeer ik het zeer als u een beoordeling achterlaat van de"
|
218 |
-
|
219 |
-
msgid "plugin on WordPress.org"
|
220 |
-
msgstr "plugin op WordPress.org"
|
221 |
-
|
222 |
-
msgid "If you really like the plugin you can also"
|
223 |
-
msgstr "Als u de plugin echt leuk vindt kunt u ook"
|
224 |
-
|
225 |
-
msgid "donate here"
|
226 |
-
msgstr "hier doneren"
|
227 |
-
|
228 |
-
msgid "Change button order"
|
229 |
-
msgstr "Verander volgorde van knoppen"
|
230 |
-
|
231 |
-
msgid "Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme."
|
232 |
-
msgstr "Kies horizontale knop orientatie om de knoppen langs elkaar te tonen, de verticale orientatie zal de knoppen onder elkaar plaatsen. U kunt ook een uitlijning kiezen welke beter bij uw thema past. "
|
233 |
-
|
234 |
-
msgid "Button orientation"
|
235 |
-
msgstr "Knop orientatie"
|
236 |
-
|
237 |
-
msgid "Horizontal"
|
238 |
-
msgstr "Horizontaal"
|
239 |
-
|
240 |
-
msgid "Vertical"
|
241 |
-
msgstr "Verticaal"
|
242 |
-
|
243 |
-
msgid "Button alignment"
|
244 |
-
msgstr "Knop uitlijning"
|
245 |
-
|
246 |
-
msgid "Align to bottom"
|
247 |
-
msgstr "Uitlijnen op onderkant"
|
248 |
-
|
249 |
-
msgid "Align to top"
|
250 |
-
msgstr "Uitlijnen op bovenkant"
|
251 |
-
|
252 |
-
msgid "en_US"
|
253 |
-
msgstr "nl_NL"
|
254 |
-
|
255 |
-
msgid "fb_horizontal_recommend_width"
|
256 |
-
msgstr "125"
|
257 |
-
|
258 |
-
msgid "fb_horizontal_width"
|
259 |
-
msgstr "125"
|
260 |
-
|
261 |
-
msgid "fb_vertical_recommend_width"
|
262 |
-
msgstr "91"
|
263 |
-
|
264 |
-
msgid "fb_vertical_width"
|
265 |
-
msgstr "91"
|
266 |
-
|
267 |
-
msgid "fb_standard_recommend_width"
|
268 |
-
msgstr "93"
|
269 |
-
|
270 |
-
msgid "fb_standard_width"
|
271 |
-
msgstr "93"
|
272 |
-
|
273 |
-
msgid "Share on"
|
274 |
-
msgstr "Deel op"
|
275 |
-
|
276 |
-
msgid "Add to"
|
277 |
-
msgstr "Toevoegen aan"
|
278 |
-
|
279 |
-
msgid "Pin it on"
|
280 |
-
msgstr "Pin het op"
|
281 |
-
|
282 |
-
msgid "Submit to"
|
283 |
-
msgstr "Voeg toe aan"
|
284 |
-
|
285 |
-
msgid "Save on"
|
286 |
-
msgstr "Opslaan op"
|
287 |
-
|
288 |
-
msgid "Digg This"
|
289 |
-
msgstr "Digg dit"
|
290 |
-
|
291 |
-
msgid "Share via email"
|
292 |
-
msgstr "Deel via email"
|
293 |
-
|
294 |
-
msgid "Friend me on"
|
295 |
-
msgstr "Bevriend me op"
|
296 |
-
|
297 |
-
msgid "Follow me on"
|
298 |
-
msgstr "Volg me op"
|
299 |
-
|
300 |
-
msgid "Add me to your circles"
|
301 |
-
msgstr "Voeg me toe aan je cirkels"
|
302 |
-
|
303 |
-
msgid "Join my network on"
|
304 |
-
msgstr "Wordt lid van mijn netwerk op"
|
305 |
-
|
306 |
-
msgid "Follow my company on"
|
307 |
-
msgstr "Volg mijn bedrijf op"
|
308 |
-
|
309 |
-
msgid "Join my group on"
|
310 |
-
msgstr "Wordt lid van mijn groep op"
|
311 |
-
|
312 |
-
msgid "Watch me on"
|
313 |
-
msgstr "Bekijk me op"
|
314 |
-
|
315 |
-
msgid "My photostream on"
|
316 |
-
msgstr "Mijn photostream op"
|
317 |
-
|
318 |
-
msgid "My portfolio on"
|
319 |
-
msgstr "Mijn portfolio op"
|
320 |
-
|
321 |
-
msgid "My Picasa Web Albums"
|
322 |
-
msgstr "Mijn Picasa Web Albums"
|
323 |
-
|
324 |
-
msgid "My deviantArt"
|
325 |
-
msgstr "Mijn deviantArt"
|
326 |
-
|
327 |
-
msgid "My profile on"
|
328 |
-
msgstr "Mijn profiel op"
|
329 |
-
|
330 |
-
msgid "Title"
|
331 |
-
msgstr "Titel"
|
332 |
-
|
333 |
-
msgid "Fixed title"
|
334 |
-
msgstr "Vaste titel"
|
335 |
-
|
336 |
-
msgid "Fixed url"
|
337 |
-
msgstr "Vaste url"
|
338 |
-
|
339 |
-
msgid "Further configuration is done via the"
|
340 |
-
msgstr "Verdere configuratie wordt gedaan via het"
|
341 |
-
|
342 |
-
msgid "plugin admin screen"
|
343 |
-
msgstr "plugin admin scherm"
|
344 |
-
|
345 |
-
#. Plugin Name of the plugin/theme
|
346 |
-
msgid "Social Sharing Toolkit"
|
347 |
-
msgstr "Social Sharing Toolkit"
|
348 |
-
|
349 |
-
#. Plugin URI of the plugin/theme
|
350 |
-
msgid "http://www.active-bits.nl/support/social_sharing_toolkit/"
|
351 |
-
msgstr "Social Sharing Toolkit"
|
352 |
-
|
353 |
-
#. Description of the plugin/theme
|
354 |
-
msgid "This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable."
|
355 |
-
msgstr "http://www.active-bits.nl/support/social_sharing_toolkit/"
|
356 |
-
|
357 |
-
#. Author of the plugin/theme
|
358 |
-
msgid "Marijn Rongen"
|
359 |
-
msgstr "Marijn Rongen"
|
360 |
-
|
361 |
-
#. Author URI of the plugin/theme
|
362 |
-
msgid "http://www.active-bits.nl"
|
363 |
-
msgstr "http://www.active-bits.nl"
|
364 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/mr_social_sharing_toolkit.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Social Sharing Toolkit package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Social Sharing Toolkit 2.0.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/social_sharing_toolkit\n"
|
7 |
-
"POT-Creation-Date: 2012-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,345 +12,503 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
msgid "Button"
|
16 |
msgstr ""
|
17 |
|
|
|
18 |
msgid "Button + text"
|
19 |
msgstr ""
|
20 |
|
|
|
21 |
msgid "Button + side counter"
|
22 |
msgstr ""
|
23 |
|
|
|
24 |
msgid "Button + top counter"
|
25 |
msgstr ""
|
26 |
|
|
|
27 |
msgid "Small icon"
|
28 |
msgstr ""
|
29 |
|
|
|
30 |
msgid "Small icon + text"
|
31 |
msgstr ""
|
32 |
|
|
|
33 |
msgid "Medium icon"
|
34 |
msgstr ""
|
35 |
|
|
|
36 |
msgid "Medium icon + text"
|
37 |
msgstr ""
|
38 |
|
|
|
39 |
msgid "Large icon"
|
40 |
msgstr ""
|
41 |
|
42 |
-
|
|
|
|
|
|
|
43 |
msgstr ""
|
44 |
|
45 |
-
|
|
|
46 |
msgstr ""
|
47 |
|
48 |
-
|
|
|
49 |
msgstr ""
|
50 |
|
|
|
51 |
msgid "Donate"
|
52 |
msgstr ""
|
53 |
|
|
|
54 |
msgid "You do not have sufficient permissions to access this page."
|
55 |
msgstr ""
|
56 |
|
|
|
57 |
msgid "Settings saved."
|
58 |
msgstr ""
|
59 |
|
|
|
60 |
msgid "General settings"
|
61 |
msgstr ""
|
62 |
|
|
|
63 |
msgid "Content"
|
64 |
msgstr ""
|
65 |
|
|
|
66 |
msgid "Shortcode"
|
67 |
msgstr ""
|
68 |
|
69 |
-
|
|
|
70 |
msgstr ""
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
msgid "Advanced settings"
|
76 |
msgstr ""
|
77 |
|
|
|
78 |
msgid "Load JavaScript in footer"
|
79 |
msgstr ""
|
80 |
|
|
|
81 |
msgid "Improves performance but may not work on some themes"
|
82 |
msgstr ""
|
83 |
|
|
|
84 |
msgid "Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both."
|
85 |
msgstr ""
|
86 |
|
|
|
87 |
msgid "Button location"
|
88 |
msgstr ""
|
89 |
|
|
|
90 |
msgid "Do not display"
|
91 |
msgstr ""
|
92 |
|
|
|
93 |
msgid "Display before content"
|
94 |
msgstr ""
|
95 |
|
|
|
96 |
msgid "Display after content"
|
97 |
msgstr ""
|
98 |
|
|
|
99 |
msgid "Display before and after content"
|
100 |
msgstr ""
|
101 |
|
|
|
102 |
msgid "Place buttons on"
|
103 |
msgstr ""
|
104 |
|
|
|
105 |
msgid "Enable shortcode"
|
106 |
msgstr ""
|
107 |
|
|
|
108 |
msgid "Use the shortcode [social_share/] where you want the buttons to appear"
|
109 |
msgstr ""
|
110 |
|
|
|
111 |
msgid "Include buttons in excerpts"
|
112 |
msgstr ""
|
113 |
|
|
|
114 |
msgid "Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin)."
|
115 |
msgstr ""
|
116 |
|
|
|
117 |
msgid "Use rel=\"nofollow\" on links to social networks"
|
118 |
msgstr ""
|
119 |
|
|
|
120 |
msgid "Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
|
121 |
msgstr ""
|
122 |
|
|
|
123 |
msgid "Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
|
124 |
msgstr ""
|
125 |
|
|
|
126 |
msgid "For each widget you can enter a fixed url and title for the buttons, to do this"
|
127 |
msgstr ""
|
128 |
|
|
|
129 |
msgid "go to the widget configuration page"
|
130 |
msgstr ""
|
131 |
|
|
|
132 |
msgid "Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list."
|
133 |
msgstr ""
|
134 |
|
|
|
135 |
msgid "For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button."
|
136 |
msgstr ""
|
137 |
|
|
|
138 |
msgid "To add the widget to your website"
|
139 |
msgstr ""
|
140 |
|
|
|
141 |
msgid "Automatic Twitter links"
|
142 |
msgstr ""
|
143 |
|
|
|
144 |
msgid "Select what you want to convert:"
|
145 |
msgstr ""
|
146 |
|
|
|
147 |
msgid "Convert Twitter usernames"
|
148 |
msgstr ""
|
149 |
|
|
|
150 |
msgid "Convert hashtags"
|
151 |
msgstr ""
|
152 |
|
|
|
153 |
msgid "And where it should be converted:"
|
154 |
msgstr ""
|
155 |
|
|
|
156 |
msgid "Convert in posts and pages"
|
157 |
msgstr ""
|
158 |
|
|
|
159 |
msgid "Convert in comments"
|
160 |
msgstr ""
|
161 |
|
|
|
162 |
msgid "Open links in new window or tab"
|
163 |
msgstr ""
|
164 |
|
|
|
165 |
msgid "Bitly"
|
166 |
msgstr ""
|
167 |
|
|
|
168 |
msgid "Use Bitly url shortening for the tweet button"
|
169 |
msgstr ""
|
170 |
|
|
|
171 |
msgid "Enable Bitly URL shortening"
|
172 |
msgstr ""
|
173 |
|
|
|
174 |
msgid "Your bitly Username"
|
175 |
msgstr ""
|
176 |
|
|
|
177 |
msgid "Your bitly API Key"
|
178 |
msgstr ""
|
179 |
|
180 |
-
|
|
|
181 |
msgstr ""
|
182 |
|
183 |
-
|
|
|
184 |
msgstr ""
|
185 |
|
186 |
-
|
|
|
187 |
msgstr ""
|
188 |
|
189 |
-
|
|
|
190 |
msgstr ""
|
191 |
|
192 |
-
|
|
|
193 |
msgstr ""
|
194 |
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
196 |
msgstr ""
|
197 |
|
|
|
|
|
|
|
|
|
|
|
198 |
msgid "You can specify a link to an image you would like to include in your likes and shares"
|
199 |
msgstr ""
|
200 |
|
201 |
-
|
|
|
202 |
msgstr ""
|
203 |
|
204 |
-
|
|
|
205 |
msgstr ""
|
206 |
|
|
|
207 |
msgid "Save Changes"
|
208 |
msgstr ""
|
209 |
|
|
|
210 |
msgid "Thank you for using the Social Sharing Toolkit!"
|
211 |
msgstr ""
|
212 |
|
|
|
213 |
msgid "For questions or requests about this plugin please use the"
|
214 |
msgstr ""
|
215 |
|
|
|
216 |
msgid "official plugin page"
|
217 |
msgstr ""
|
218 |
|
|
|
219 |
msgid "If you like the plugin I would appreciate it if you provide a rating of the"
|
220 |
msgstr ""
|
221 |
|
|
|
222 |
msgid "plugin on WordPress.org"
|
223 |
msgstr ""
|
224 |
|
|
|
225 |
msgid "If you really like the plugin you can also"
|
226 |
msgstr ""
|
227 |
|
|
|
228 |
msgid "donate here"
|
229 |
msgstr ""
|
230 |
|
|
|
231 |
msgid "Change button order"
|
232 |
msgstr ""
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
msgid "Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme."
|
235 |
msgstr ""
|
236 |
|
|
|
237 |
msgid "Button orientation"
|
238 |
msgstr ""
|
239 |
|
|
|
240 |
msgid "Horizontal"
|
241 |
msgstr ""
|
242 |
|
|
|
243 |
msgid "Vertical"
|
244 |
msgstr ""
|
245 |
|
|
|
246 |
msgid "Button alignment"
|
247 |
msgstr ""
|
248 |
|
|
|
249 |
msgid "Align to bottom"
|
250 |
msgstr ""
|
251 |
|
|
|
252 |
msgid "Align to top"
|
253 |
msgstr ""
|
254 |
-
|
255 |
-
msgid "en_US"
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
msgid "fb_horizontal_recommend_width"
|
259 |
-
msgstr ""
|
260 |
-
|
261 |
-
msgid "fb_horizontal_width"
|
262 |
-
msgstr ""
|
263 |
-
|
264 |
-
msgid "fb_vertical_recommend_width"
|
265 |
-
msgstr ""
|
266 |
-
|
267 |
-
msgid "fb_vertical_width"
|
268 |
-
msgstr ""
|
269 |
-
|
270 |
-
msgid "fb_standard_recommend_width"
|
271 |
-
msgstr ""
|
272 |
-
|
273 |
-
msgid "fb_standard_width"
|
274 |
-
msgstr ""
|
275 |
-
|
276 |
-
msgid "Share on"
|
277 |
-
msgstr ""
|
278 |
-
|
279 |
-
msgid "Add to"
|
280 |
-
msgstr ""
|
281 |
-
|
282 |
-
msgid "Pin it on"
|
283 |
-
msgstr ""
|
284 |
-
|
285 |
-
msgid "Submit to"
|
286 |
-
msgstr ""
|
287 |
-
|
288 |
-
msgid "Save on"
|
289 |
-
msgstr ""
|
290 |
-
|
291 |
-
msgid "Digg This"
|
292 |
-
msgstr ""
|
293 |
-
|
294 |
-
msgid "Share via email"
|
295 |
-
msgstr ""
|
296 |
-
|
297 |
-
msgid "Friend me on"
|
298 |
-
msgstr ""
|
299 |
-
|
300 |
-
msgid "Follow me on"
|
301 |
-
msgstr ""
|
302 |
-
|
303 |
-
msgid "Add me to your circles"
|
304 |
-
msgstr ""
|
305 |
-
|
306 |
-
msgid "Join my network on"
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
-
msgid "Follow my company on"
|
310 |
-
msgstr ""
|
311 |
-
|
312 |
-
msgid "Join my group on"
|
313 |
-
msgstr ""
|
314 |
-
|
315 |
-
msgid "Watch me on"
|
316 |
-
msgstr ""
|
317 |
-
|
318 |
-
msgid "My photostream on"
|
319 |
-
msgstr ""
|
320 |
-
|
321 |
-
msgid "My portfolio on"
|
322 |
-
msgstr ""
|
323 |
-
|
324 |
-
msgid "My Picasa Web Albums"
|
325 |
-
msgstr ""
|
326 |
-
|
327 |
-
msgid "My deviantArt"
|
328 |
-
msgstr ""
|
329 |
-
|
330 |
-
msgid "My profile on"
|
331 |
-
msgstr ""
|
332 |
-
|
333 |
-
msgid "Title"
|
334 |
-
msgstr ""
|
335 |
-
|
336 |
-
msgid "Fixed title"
|
337 |
-
msgstr ""
|
338 |
-
|
339 |
-
msgid "Fixed url"
|
340 |
-
msgstr ""
|
341 |
-
|
342 |
-
msgid "Further configuration is done via the"
|
343 |
-
msgstr ""
|
344 |
-
|
345 |
-
msgid "plugin admin screen"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
#. Plugin Name of the plugin/theme
|
349 |
msgid "Social Sharing Toolkit"
|
350 |
msgstr ""
|
351 |
|
352 |
#. Plugin URI of the plugin/theme
|
353 |
-
msgid "http://www.active-bits.nl/support/
|
354 |
msgstr ""
|
355 |
|
356 |
#. Description of the plugin/theme
|
2 |
# This file is distributed under the same license as the Social Sharing Toolkit package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Social Sharing Toolkit 2.0.9\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/social_sharing_toolkit\n"
|
7 |
+
"POT-Creation-Date: 2012-07-22 21:08:37+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: includes/buttons/button.500px.php:11
|
16 |
+
msgid "My portfolio on"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: includes/buttons/button.buffer.php:43
|
20 |
+
msgid "Add to"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: includes/buttons/button.delicious.php:27
|
24 |
+
msgid "Save on"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: includes/buttons/button.deviantart.php:11
|
28 |
+
msgid "My deviantArt"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: includes/buttons/button.digg.php:23
|
32 |
+
msgid "Digg This"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: includes/buttons/button.email.php:4
|
36 |
+
msgid "Send email"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: includes/buttons/button.email.php:11
|
40 |
+
msgid "Share via email"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: includes/buttons/button.facebook.php:19
|
44 |
+
msgid "fb_horizontal_recommend_width"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: includes/buttons/button.facebook.php:23
|
48 |
+
msgid "fb_horizontal_width"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: includes/buttons/button.facebook.php:32
|
52 |
+
msgid "fb_vertical_recommend_width"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: includes/buttons/button.facebook.php:36
|
56 |
+
msgid "fb_vertical_width"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/buttons/button.facebook.php:56
|
60 |
+
msgid "fb_standard_recommend_width"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: includes/buttons/button.facebook.php:60
|
64 |
+
msgid "fb_standard_width"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: includes/buttons/button.facebook.php:69
|
68 |
+
#: includes/buttons/button.facebook.php:110
|
69 |
+
msgid "en_US"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: includes/buttons/button.facebook.php:100
|
73 |
+
#: includes/buttons/button.linkedin.php:31
|
74 |
+
#: includes/buttons/button.myspace.php:12 includes/buttons/button.tumblr.php:12
|
75 |
+
#: includes/buttons/button.twitter.php:63 includes/buttons/button.xing.php:29
|
76 |
+
msgid "Share on"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: includes/buttons/button.facebook.php:118
|
80 |
+
#: includes/buttons/button.hyves.php:17 includes/buttons/button.myspace.php:18
|
81 |
+
msgid "Friend me on"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: includes/buttons/button.flattr.php:23
|
85 |
+
msgid "Flattr this!"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: includes/buttons/button.flickr.php:11
|
89 |
+
msgid "My photostream on"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: includes/buttons/button.goodreads.php:11
|
93 |
+
#: includes/buttons/button.lastfm.php:11 includes/buttons/button.spotify.php:11
|
94 |
+
msgid "My profile on"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: includes/buttons/button.googleplus.php:39
|
98 |
+
msgid "Add me to your circles"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: includes/buttons/button.linkedin.php:40 includes/buttons/button.xing.php:38
|
102 |
+
msgid "Join my network on"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: includes/buttons/button.linkedin.php:46
|
106 |
+
msgid "Follow my company on"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: includes/buttons/button.linkedin.php:52
|
110 |
+
msgid "Join my group on"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: includes/buttons/button.picasa.php:11
|
114 |
+
msgid "My Picasa Web Albums"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: includes/buttons/button.pinterest.php:29
|
118 |
+
msgid "Pin it on"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: includes/buttons/button.pinterest.php:38
|
122 |
+
#: includes/buttons/button.tumblr.php:18 includes/buttons/button.twitter.php:84
|
123 |
+
msgid "Follow me on"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: includes/buttons/button.reddit.php:26
|
127 |
+
#: includes/buttons/button.stumbleupon.php:23
|
128 |
+
msgid "Submit to"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: includes/buttons/button.rss.php:5
|
132 |
+
msgid "RSS Feed"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: includes/buttons/button.soundcloud.php:11
|
136 |
+
msgid "My sounds on"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: includes/buttons/button.youtube.php:11
|
140 |
+
msgid "Watch me on"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: includes/follow.widget.php:6 social_sharing_toolkit.php:212
|
144 |
+
#: social_sharing_toolkit.php:297
|
145 |
+
msgid "Follow Widget"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: includes/follow.widget.php:32 includes/share.widget.php:60
|
149 |
+
msgid "Title"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: includes/follow.widget.php:36 includes/share.widget.php:72
|
153 |
+
msgid "Further configuration is done via the"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: includes/follow.widget.php:36 includes/share.widget.php:72
|
157 |
+
msgid "plugin admin screen"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: includes/share.widget.php:6 social_sharing_toolkit.php:211
|
161 |
+
#: social_sharing_toolkit.php:287
|
162 |
+
msgid "Share Widget"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: includes/share.widget.php:64
|
166 |
+
msgid "Fixed title"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: includes/share.widget.php:68
|
170 |
+
msgid "Fixed url"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: social_sharing_toolkit.php:25
|
174 |
msgid "Button"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: social_sharing_toolkit.php:26
|
178 |
msgid "Button + text"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: social_sharing_toolkit.php:27
|
182 |
msgid "Button + side counter"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: social_sharing_toolkit.php:28
|
186 |
msgid "Button + top counter"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: social_sharing_toolkit.php:29
|
190 |
msgid "Small icon"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: social_sharing_toolkit.php:30
|
194 |
msgid "Small icon + text"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: social_sharing_toolkit.php:31
|
198 |
msgid "Medium icon"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: social_sharing_toolkit.php:32
|
202 |
msgid "Medium icon + text"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: social_sharing_toolkit.php:33
|
206 |
msgid "Large icon"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: social_sharing_toolkit.php:65 social_sharing_toolkit.php:66
|
210 |
+
#: social_sharing_toolkit.php:67 social_sharing_toolkit.php:68
|
211 |
+
#: social_sharing_toolkit.php:69 social_sharing_toolkit.php:70
|
212 |
+
msgid "Divider"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: social_sharing_toolkit.php:163
|
216 |
+
msgid "Could not write to CSS file, to fix this create a file called "social_sharing_custom.css" in "
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: social_sharing_toolkit.php:163
|
220 |
+
msgid ". Make sure the file has read and write permissions."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: social_sharing_toolkit.php:182
|
224 |
msgid "Donate"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: social_sharing_toolkit.php:189
|
228 |
msgid "You do not have sufficient permissions to access this page."
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: social_sharing_toolkit.php:194
|
232 |
msgid "Settings saved."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: social_sharing_toolkit.php:208 social_sharing_toolkit.php:217
|
236 |
msgid "General settings"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: social_sharing_toolkit.php:209 social_sharing_toolkit.php:271
|
240 |
msgid "Content"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: social_sharing_toolkit.php:210 social_sharing_toolkit.php:279
|
244 |
msgid "Shortcode"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: social_sharing_toolkit.php:213 social_sharing_toolkit.php:310
|
248 |
+
msgid "Advanced settings"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: social_sharing_toolkit.php:214 social_sharing_toolkit.php:360
|
252 |
+
msgid "Custom CSS"
|
|
|
|
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: social_sharing_toolkit.php:220
|
256 |
msgid "Load JavaScript in footer"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: social_sharing_toolkit.php:223
|
260 |
msgid "Improves performance but may not work on some themes"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: social_sharing_toolkit.php:226
|
264 |
msgid "Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both."
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: social_sharing_toolkit.php:228
|
268 |
msgid "Button location"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: social_sharing_toolkit.php:232
|
272 |
msgid "Do not display"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: social_sharing_toolkit.php:235
|
276 |
msgid "Display before content"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: social_sharing_toolkit.php:238
|
280 |
msgid "Display after content"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: social_sharing_toolkit.php:241
|
284 |
msgid "Display before and after content"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: social_sharing_toolkit.php:243
|
288 |
msgid "Place buttons on"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: social_sharing_toolkit.php:260
|
292 |
msgid "Enable shortcode"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: social_sharing_toolkit.php:261
|
296 |
msgid "Use the shortcode [social_share/] where you want the buttons to appear"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: social_sharing_toolkit.php:264
|
300 |
msgid "Include buttons in excerpts"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: social_sharing_toolkit.php:265
|
304 |
msgid "Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin)."
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: social_sharing_toolkit.php:268
|
308 |
msgid "Use rel=\"nofollow\" on links to social networks"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: social_sharing_toolkit.php:273 social_sharing_toolkit.php:281
|
312 |
msgid "Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: social_sharing_toolkit.php:289
|
316 |
msgid "Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: social_sharing_toolkit.php:291
|
320 |
msgid "For each widget you can enter a fixed url and title for the buttons, to do this"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: social_sharing_toolkit.php:291 social_sharing_toolkit.php:304
|
324 |
msgid "go to the widget configuration page"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: social_sharing_toolkit.php:299
|
328 |
msgid "Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list."
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: social_sharing_toolkit.php:301
|
332 |
msgid "For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button."
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: social_sharing_toolkit.php:304
|
336 |
msgid "To add the widget to your website"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: social_sharing_toolkit.php:311
|
340 |
msgid "Automatic Twitter links"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: social_sharing_toolkit.php:312
|
344 |
msgid "Select what you want to convert:"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: social_sharing_toolkit.php:315
|
348 |
msgid "Convert Twitter usernames"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: social_sharing_toolkit.php:318
|
352 |
msgid "Convert hashtags"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: social_sharing_toolkit.php:319
|
356 |
msgid "And where it should be converted:"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: social_sharing_toolkit.php:322
|
360 |
msgid "Convert in posts and pages"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: social_sharing_toolkit.php:325
|
364 |
msgid "Convert in comments"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: social_sharing_toolkit.php:328
|
368 |
msgid "Open links in new window or tab"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: social_sharing_toolkit.php:329
|
372 |
msgid "Bitly"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: social_sharing_toolkit.php:330
|
376 |
msgid "Use Bitly url shortening for the tweet button"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: social_sharing_toolkit.php:333
|
380 |
msgid "Enable Bitly URL shortening"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: social_sharing_toolkit.php:334
|
384 |
msgid "Your bitly Username"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: social_sharing_toolkit.php:336
|
388 |
msgid "Your bitly API Key"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: social_sharing_toolkit.php:338
|
392 |
+
msgid "Pinterest"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: social_sharing_toolkit.php:339 social_sharing_toolkit.php:351
|
396 |
+
msgid "Default image URL"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: social_sharing_toolkit.php:341
|
400 |
+
msgid "You can specify a link to an image you would like to use for Pinterest pins when no image is available"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: social_sharing_toolkit.php:344 social_sharing_toolkit.php:356
|
404 |
+
msgid "Always use the default image"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: social_sharing_toolkit.php:345
|
408 |
+
msgid "Check this box to always display the default image with your Pins"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: social_sharing_toolkit.php:346
|
412 |
+
msgid "OpenGraph"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: social_sharing_toolkit.php:347
|
416 |
+
msgid "Include Open Graph tags"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: social_sharing_toolkit.php:350
|
420 |
+
msgid "Enable Open Graph"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: social_sharing_toolkit.php:353
|
424 |
msgid "You can specify a link to an image you would like to include in your likes and shares"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: social_sharing_toolkit.php:357
|
428 |
+
msgid "Check this box to always display the default image with your shared content"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: social_sharing_toolkit.php:361
|
432 |
+
msgid "Enter your custom styles or CSS fixes here"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: social_sharing_toolkit.php:366
|
436 |
msgid "Save Changes"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: social_sharing_toolkit.php:369
|
440 |
msgid "Thank you for using the Social Sharing Toolkit!"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: social_sharing_toolkit.php:371
|
444 |
msgid "For questions or requests about this plugin please use the"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: social_sharing_toolkit.php:371
|
448 |
msgid "official plugin page"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: social_sharing_toolkit.php:372
|
452 |
msgid "If you like the plugin I would appreciate it if you provide a rating of the"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: social_sharing_toolkit.php:372
|
456 |
msgid "plugin on WordPress.org"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: social_sharing_toolkit.php:372
|
460 |
msgid "If you really like the plugin you can also"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: social_sharing_toolkit.php:372
|
464 |
msgid "donate here"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: social_sharing_toolkit.php:393
|
468 |
msgid "Change button order"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: social_sharing_toolkit.php:435
|
472 |
+
msgid "Custom icon url"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: social_sharing_toolkit.php:438
|
476 |
+
msgid "Custom text"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: social_sharing_toolkit.php:447
|
480 |
msgid "Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme."
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: social_sharing_toolkit.php:449
|
484 |
msgid "Button orientation"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: social_sharing_toolkit.php:453
|
488 |
msgid "Horizontal"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: social_sharing_toolkit.php:456
|
492 |
msgid "Vertical"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: social_sharing_toolkit.php:458
|
496 |
msgid "Button alignment"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: social_sharing_toolkit.php:462
|
500 |
msgid "Align to bottom"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: social_sharing_toolkit.php:465
|
504 |
msgid "Align to top"
|
505 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
#. Plugin Name of the plugin/theme
|
507 |
msgid "Social Sharing Toolkit"
|
508 |
msgstr ""
|
509 |
|
510 |
#. Plugin URI of the plugin/theme
|
511 |
+
msgid "http://www.active-bits.nl/support/social-sharing-toolkit/"
|
512 |
msgstr ""
|
513 |
|
514 |
#. Description of the plugin/theme
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVN
|
|
4 |
Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Buffer, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.3.1
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
|
@@ -71,6 +71,7 @@ The networks currently supported for the Follow Widget are:
|
|
71 |
* Twitter
|
72 |
* Google+
|
73 |
* Pinterest
|
|
|
74 |
* LinkedIn (including company and group links)
|
75 |
* Tumblr
|
76 |
* Myspace
|
@@ -82,6 +83,7 @@ The networks currently supported for the Follow Widget are:
|
|
82 |
* DeviantArt
|
83 |
* Last.fm
|
84 |
* Spotify
|
|
|
85 |
|
86 |
A button for an RSS feed is also included. Of course the type, order and orientation of the buttons is also configurable for the Follow Widget. Each button for the Follow Widget supports the following types:
|
87 |
|
@@ -163,6 +165,10 @@ Upload the Social Sharing Toolkit plugin to the `/wp-content/plugins/` folder on
|
|
163 |
|
164 |
== Upgrade Notice ==
|
165 |
|
|
|
|
|
|
|
|
|
166 |
= 2.0.8 =
|
167 |
|
168 |
Please update to version 2.0.8 for a critical fix causing server errors.
|
@@ -216,6 +222,17 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
|
|
216 |
|
217 |
== Changelog ==
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
= 2.0.8 =
|
220 |
* Fixed issue with combinations of excerpt and Read more tags resulting in errors
|
221 |
* Fixed a bug with urls and StumbleUpon counters
|
4 |
Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Buffer, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.3.1
|
7 |
+
Stable tag: 2.0.9
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
|
71 |
* Twitter
|
72 |
* Google+
|
73 |
* Pinterest
|
74 |
+
* Goodreads
|
75 |
* LinkedIn (including company and group links)
|
76 |
* Tumblr
|
77 |
* Myspace
|
83 |
* DeviantArt
|
84 |
* Last.fm
|
85 |
* Spotify
|
86 |
+
* Soundcloud
|
87 |
|
88 |
A button for an RSS feed is also included. Of course the type, order and orientation of the buttons is also configurable for the Follow Widget. Each button for the Follow Widget supports the following types:
|
89 |
|
165 |
|
166 |
== Upgrade Notice ==
|
167 |
|
168 |
+
= 2.0.9 =
|
169 |
+
|
170 |
+
Please update to version 2.0.9 for several fixes, more features and extra networks.
|
171 |
+
|
172 |
= 2.0.8 =
|
173 |
|
174 |
Please update to version 2.0.8 for a critical fix causing server errors.
|
222 |
|
223 |
== Changelog ==
|
224 |
|
225 |
+
= 2.0.9 =
|
226 |
+
* Added the possibility to use custom text and images for (most) buttons
|
227 |
+
* Added possibility to create custom css within the plugin
|
228 |
+
* Improved feed detection to prevent buttons and text appearing in feeds
|
229 |
+
* Fixed some W3C validation issues
|
230 |
+
* Added Soundcloud buttons
|
231 |
+
* Added Goodreads buttons
|
232 |
+
* Added Flattr buttons
|
233 |
+
* Fixed possible safety issue with Javascript call for +1
|
234 |
+
* Added icons to +1 button choices
|
235 |
+
|
236 |
= 2.0.8 =
|
237 |
* Fixed issue with combinations of excerpt and Read more tags resulting in errors
|
238 |
* Fixed a bug with urls and StumbleUpon counters
|
social_sharing_toolkit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Social Sharing Toolkit
|
4 |
Plugin URI: http://www.active-bits.nl/support/social-sharing-toolkit/
|
5 |
Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
|
6 |
-
Version: 2.0.
|
7 |
Author: Marijn Rongen
|
8 |
Author URI: http://www.active-bits.nl
|
9 |
*/
|
@@ -12,11 +12,14 @@ class MR_Social_Sharing_Toolkit {
|
|
12 |
var $count;
|
13 |
var $options;
|
14 |
var $types;
|
|
|
15 |
var $share_buttons;
|
16 |
var $follow_buttons;
|
|
|
17 |
|
18 |
function MR_Social_Sharing_Toolkit() {
|
19 |
$this->count = 0;
|
|
|
20 |
load_plugin_textdomain( 'mr_social_sharing_toolkit', false, dirname(plugin_basename(__FILE__)).'/languages/');
|
21 |
/* Declare button types */
|
22 |
$this->types['none'] = __('Button','mr_social_sharing_toolkit');
|
@@ -28,52 +31,45 @@ class MR_Social_Sharing_Toolkit {
|
|
28 |
$this->types['icon_medium'] = __('Medium icon','mr_social_sharing_toolkit');
|
29 |
$this->types['icon_medium_text'] = __('Medium icon + text','mr_social_sharing_toolkit');
|
30 |
$this->types['icon_large'] = __('Large icon','mr_social_sharing_toolkit');
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$this->share_buttons['ln_break_1'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 1', 'types' => array(''));
|
50 |
$this->share_buttons['ln_break_2'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 2', 'types' => array(''));
|
51 |
$this->share_buttons['ln_break_3'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 3', 'types' => array(''));
|
52 |
-
/* Declare follow buttons with options */
|
53 |
-
$this->follow_buttons['follow_facebook'] = array('icon' => 'facebook', 'title' => 'Facebook', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
54 |
-
$this->follow_buttons['follow_twitter'] = array('icon' => 'twitter', 'title' => 'Twitter', 'id' => '@', 'types' => array('none', 'horizontal', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
55 |
-
$this->follow_buttons['follow_plus'] = array('icon' => 'googleplus', 'title' => 'Google+', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
56 |
-
$this->follow_buttons['follow_pinterest'] = array('icon' => 'pinterest', 'title' => 'Pinterest', 'id' => 'id:', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
57 |
-
$this->follow_buttons['follow_linked'] = array('icon' => 'linkedin', 'title' => 'LinkedIn Person', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
58 |
-
$this->follow_buttons['follow_linked_co'] = array('icon' => 'linkedin', 'title' => 'LinkedIn Company', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
59 |
-
$this->follow_buttons['follow_linked_group'] = array('icon' => 'linkedin', 'title' => 'LinkedIn Group', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
60 |
-
$this->follow_buttons['follow_xing'] = array('icon' => 'xing', 'title' => 'Xing', 'id' => 'id:', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
61 |
-
$this->follow_buttons['follow_tumblr'] = array('icon' => 'tumblr', 'title' => 'Tumblr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
62 |
-
$this->follow_buttons['follow_myspace'] = array('icon' => 'myspace', 'title' => 'Myspace', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
63 |
-
$this->follow_buttons['follow_hyves'] = array('icon' => 'hyves', 'title' => 'Hyves', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
64 |
-
$this->follow_buttons['follow_youtube'] = array('icon' => 'youtube', 'title' => 'YouTube', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
65 |
-
$this->follow_buttons['follow_flickr'] = array('icon' => 'flickr', 'title' => 'Flickr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
66 |
-
$this->follow_buttons['follow_500px'] = array('icon' => '500px', 'title' => '500px', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
67 |
-
$this->follow_buttons['follow_picasa'] = array('icon' => 'picasa', 'title' => 'Picasa', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
68 |
-
$this->follow_buttons['follow_deviant'] = array('icon' => 'deviantart', 'title' => 'deviantArt', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
69 |
-
$this->follow_buttons['follow_lastfm'] = array('icon' => 'lastfm', 'title' => 'Last.fm', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
70 |
-
$this->follow_buttons['follow_spotify'] = array('icon' => 'spotify', 'title' => 'Spotify', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
71 |
-
$this->follow_buttons['follow_rss'] = array('icon' => 'rss', 'title' => __('RSS Feed','mr_social_sharing_toolkit'), 'id' => 'url:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
|
72 |
$this->follow_buttons['ln_break_1'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 1', 'types' => array(''));
|
73 |
$this->follow_buttons['ln_break_2'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 2', 'types' => array(''));
|
74 |
$this->follow_buttons['ln_break_3'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 3', 'types' => array(''));
|
75 |
/* Set defaults and load user options */
|
76 |
-
$this->get_options();
|
77 |
}
|
78 |
|
79 |
function get_options() {
|
@@ -92,7 +88,7 @@ class MR_Social_Sharing_Toolkit {
|
|
92 |
$pinterest_options = array('default_image' => '', 'fixed_image' => 0);
|
93 |
$bitly_options = array('enable' => 0, 'username' => '', 'key' => '', 'cache' => array());
|
94 |
$opengraph_options = array('enable' => 0, 'default_image' => '', 'fixed_image' => 0);
|
95 |
-
$this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => array('post', 'page'), 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_linkify_new' => 1, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 1, 'mr_social_sharing_no_follow' => 0, 'mr_social_sharing_pinterest' => $pinterest_options, 'mr_social_sharing_bitly' => $bitly_options, 'mr_social_sharing_opengraph' => $opengraph_options);
|
96 |
foreach ($this->options as $key => $val) {
|
97 |
$this->options[$key] = get_option( $key, $val );
|
98 |
}
|
@@ -159,6 +155,17 @@ class MR_Social_Sharing_Toolkit {
|
|
159 |
$this->options[$key] = 0;
|
160 |
}
|
161 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
}
|
163 |
|
164 |
function plugin_menu() {
|
@@ -185,7 +192,11 @@ class MR_Social_Sharing_Toolkit {
|
|
185 |
$this->save_options($_POST);
|
186 |
echo '
|
187 |
<div class="updated"><p><strong>'.__('Settings saved.','mr_social_sharing_toolkit').'</strong></p></div>';
|
188 |
-
|
|
|
|
|
|
|
|
|
189 |
echo '
|
190 |
<div class="wrap">
|
191 |
<form method="post" action="">
|
@@ -199,7 +210,8 @@ class MR_Social_Sharing_Toolkit {
|
|
199 |
<li><a href="#tab_2">'.__('Shortcode','mr_social_sharing_toolkit').'</a><li>
|
200 |
<li><a href="#tab_3">'.__('Share Widget','mr_social_sharing_toolkit').'</a><li>
|
201 |
<li><a href="#tab_4">'.__('Follow Widget','mr_social_sharing_toolkit').'</a><li>
|
202 |
-
<li><a href="#tab_5">'.__('Advanced settings','mr_social_sharing_toolkit').'</a><li>
|
|
|
203 |
</ul>
|
204 |
<div id="tab_0" class="mr_social_sharing_networks">
|
205 |
<h3>'.__('General settings','mr_social_sharing_toolkit').':</h3>
|
@@ -344,6 +356,11 @@ class MR_Social_Sharing_Toolkit {
|
|
344 |
echo ' value="1" /> '.__("Always use the default image", 'mr_social_sharing_toolkit').'</label><br/>
|
345 |
<p><span class="description">'.__("Check this box to always display the default image with your shared content", 'mr_social_sharing_toolkit').'</span></p>
|
346 |
</div>
|
|
|
|
|
|
|
|
|
|
|
347 |
</div>
|
348 |
<p class="submit">
|
349 |
<input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
|
@@ -366,55 +383,63 @@ class MR_Social_Sharing_Toolkit {
|
|
366 |
echo '
|
367 |
<ul id="mr_social_sharing_'.$button_type.'networks">';
|
368 |
foreach ($this->options['mr_social_sharing_'.$button_type.'button_order'] as $button) {
|
369 |
-
|
|
|
370 |
<li>
|
371 |
-
<img src="'.plugins_url('/images/icons_small/'.$buttons[$button]['icon'].'.png', __FILE__).'" title="'.$buttons[$button]['title'].'" alt="'.$buttons[$button]['title'].'"/>
|
372 |
<label for="mr_social_sharing_'.$button_type.$button.'"><input type="checkbox" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][enable]" id="mr_social_sharing_'.$button_type.$button.'"';
|
373 |
-
|
374 |
-
|
375 |
<img class="right" src="'.plugins_url('/images/move.png', __FILE__).'" title="'.__('Change button order','mr_social_sharing_toolkit').'" alt="'.__('Change button order','mr_social_sharing_toolkit').'"/>';
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
<input type="hidden" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" value="'.$buttons[$button]['types'][0].'"/>';
|
380 |
-
|
381 |
-
|
382 |
-
<select name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" id="mr_social_sharing_'.$button_type.$button.'_type">';
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
|
|
|
|
387 |
}
|
388 |
-
|
389 |
-
|
390 |
-
} else {
|
391 |
-
echo '
|
392 |
<input type="hidden" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" value=""/>';
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
<select name="mr_social_sharing_'.$button_type.'buttons['.$button.'][id]" id="mr_social_sharing_'.$button_type.$button.'_id">';
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
|
|
|
|
403 |
}
|
404 |
-
echo '>'.$option['label'].'</option>';
|
405 |
}
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
} else {
|
410 |
-
echo '
|
411 |
<input type="text" class="text" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][id]" id="mr_social_sharing_'.$button_type.$button.'_id" value="'.$this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['id'].'"/>
|
412 |
<label for="mr_social_sharing_'.$button_type.$button.'_id" class="text">'.$buttons[$button]['id'].'</label>';
|
|
|
413 |
}
|
414 |
-
|
415 |
-
|
416 |
-
<input type="
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
</li>';
|
|
|
418 |
}
|
419 |
echo '
|
420 |
</ul>
|
@@ -477,7 +502,7 @@ class MR_Social_Sharing_Toolkit {
|
|
477 |
/* Output functions */
|
478 |
|
479 |
function print_opengraph() {
|
480 |
-
echo '<!-- Open Graph tags provided by Social Sharing Toolkit v2.0.
|
481 |
<meta property="og:locale" content="'.str_replace('-', '_', get_bloginfo('language')).'"/>';
|
482 |
if (is_single() || is_page()) {
|
483 |
$excerpt = get_the_excerpt();
|
@@ -533,15 +558,17 @@ class MR_Social_Sharing_Toolkit {
|
|
533 |
<meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>';
|
534 |
}
|
535 |
}
|
536 |
-
}
|
537 |
-
|
538 |
|
539 |
function prepare_styles() {
|
540 |
wp_enqueue_style('mr_social_sharing', plugins_url('/style.css', __FILE__));
|
|
|
|
|
|
|
|
|
541 |
}
|
542 |
|
543 |
-
function prepare_scripts() {
|
544 |
-
$lang = __('en_US','mr_social_sharing_toolkit');
|
545 |
if ($this->options['mr_social_sharing_no_follow'] == 1) {
|
546 |
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
547 |
wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow.js', __FILE__), array('jquery'), false, true);
|
@@ -554,193 +581,10 @@ class MR_Social_Sharing_Toolkit {
|
|
554 |
} else {
|
555 |
wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery'));
|
556 |
}
|
557 |
-
}
|
558 |
-
// ###
|
559 |
-
if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['fb_send']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['fb_send']['enable'] == 1 || ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['fb_send']['enable'] == 1)) {
|
560 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
561 |
-
wp_enqueue_script('FacebookSend', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', array(), false, true);
|
562 |
-
} else {
|
563 |
-
wp_enqueue_script('FacebookSend', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1');
|
564 |
-
}
|
565 |
-
}
|
566 |
-
if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['fb_share']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['fb_share']['enable'] == 1 || ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['fb_share']['enable'] == 1)) {
|
567 |
-
if (in_array($this->options['mr_social_sharing_buttons']['fb_share']['type'], array('horizontal','vertical','none')) || in_array($this->options['mr_social_sharing_widget_buttons']['fb_share']['type'], array('horizontal','vertical','none'))) {
|
568 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
569 |
-
wp_enqueue_script('FacebookShare', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', array(), false, true);
|
570 |
-
} else {
|
571 |
-
wp_enqueue_script('FacebookShare', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share');
|
572 |
-
}
|
573 |
-
}
|
574 |
-
}
|
575 |
-
// ###
|
576 |
-
$google_script = false;
|
577 |
-
$digg_script = false;
|
578 |
-
$linked_script = false;
|
579 |
-
$tweet_script = false;
|
580 |
-
$buffer_script = false;
|
581 |
-
$stumble_script = false;
|
582 |
-
$delicious_script = false;
|
583 |
-
$pinit_script = false;
|
584 |
-
$xing_script = false;
|
585 |
-
|
586 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['gl_plus']['enable'] == 1) {
|
587 |
-
$google_script = true;
|
588 |
-
}
|
589 |
-
if ($this->options['mr_social_sharing_widget_buttons']['gl_plus']['enable'] == 1) {
|
590 |
-
$google_script = true;
|
591 |
-
}
|
592 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['gl_plus']['enable'] == 1) {
|
593 |
-
$google_script = true;
|
594 |
-
}
|
595 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['dg_digg']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['dg_digg']['type'], array('horizontal','vertical'))) {
|
596 |
-
$digg_script = true;
|
597 |
-
}
|
598 |
-
if ($this->options['mr_social_sharing_widget_buttons']['dg_digg']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['dg_digg']['type'], array('horizontal','vertical'))) {
|
599 |
-
$digg_script = true;
|
600 |
-
}
|
601 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['dg_digg']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['dg_digg']['type'], array('horizontal','vertical'))) {
|
602 |
-
$digg_script = true;
|
603 |
-
}
|
604 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['li_share']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['li_share']['type'], array('horizontal','vertical','none'))) {
|
605 |
-
$linked_script = true;
|
606 |
-
}
|
607 |
-
if ($this->options['mr_social_sharing_widget_buttons']['li_share']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['li_share']['type'], array('horizontal','vertical','none'))) {
|
608 |
-
$linked_script = true;
|
609 |
-
}
|
610 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['li_share']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['li_share']['type'], array('horizontal','vertical','none'))) {
|
611 |
-
$linked_script = true;
|
612 |
-
}
|
613 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['tw_tweet']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['tw_tweet']['type'], array('horizontal','vertical'))) {
|
614 |
-
$tweet_script = true;
|
615 |
-
}
|
616 |
-
if ($this->options['mr_social_sharing_widget_buttons']['tw_tweet']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['tw_tweet']['type'], array('horizontal','vertical'))) {
|
617 |
-
$tweet_script = true;
|
618 |
-
}
|
619 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['tw_tweet']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['tw_tweet']['type'], array('horizontal','vertical'))) {
|
620 |
-
$tweet_script = true;
|
621 |
-
}
|
622 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['bf_buffer']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['bf_buffer']['type'], array('none','horizontal','vertical'))) {
|
623 |
-
$buffer_script = true;
|
624 |
-
}
|
625 |
-
if ($this->options['mr_social_sharing_widget_buttons']['bf_buffer']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['bf_buffer']['type'], array('none','horizontal','vertical'))) {
|
626 |
-
$buffer_script = true;
|
627 |
-
}
|
628 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['bf_buffer']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['bf_buffer']['type'], array('none','horizontal','vertical'))) {
|
629 |
-
$buffer_script = true;
|
630 |
-
}
|
631 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['su_stumble']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['su_stumble']['type'], array('horizontal', 'vertical'))) {
|
632 |
-
$stumble_script = true;
|
633 |
-
}
|
634 |
-
if ($this->options['mr_social_sharing_widget_buttons']['su_stumble']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['su_stumble']['type'], array('horizontal', 'vertical'))) {
|
635 |
-
$stumble_script = true;
|
636 |
-
}
|
637 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['su_stumble']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['su_stumble']['type'], array('horizontal', 'vertical'))) {
|
638 |
-
$stumble_script = true;
|
639 |
-
}
|
640 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['dl_delicious']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['dl_delicious']['type'], array('horizontal', 'vertical'))) {
|
641 |
-
$delicious_script = true;
|
642 |
-
}
|
643 |
-
if ($this->options['mr_social_sharing_widget_buttons']['dl_delicious']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['dl_delicious']['type'], array('horizontal', 'vertical'))) {
|
644 |
-
$delicious_script = true;
|
645 |
-
}
|
646 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['dl_delicious']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['dl_delicious']['type'], array('horizontal', 'vertical'))) {
|
647 |
-
$delicious_script = true;
|
648 |
-
}
|
649 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['pn_pinterest']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['pn_pinterest']['type'], array('none', 'horizontal', 'vertical'))) {
|
650 |
-
$pinit_script = true;
|
651 |
-
}
|
652 |
-
if ($this->options['mr_social_sharing_widget_buttons']['pn_pinterest']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['pn_pinterest']['type'], array('none', 'horizontal', 'vertical'))) {
|
653 |
-
$pinit_script = true;
|
654 |
-
}
|
655 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['pn_pinterest']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['pn_pinterest']['type'], array('none', 'horizontal', 'vertical'))) {
|
656 |
-
$pinit_script = true;
|
657 |
-
}
|
658 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['xi_xing']['enable'] == 1 && in_array($this->options['mr_social_sharing_buttons']['xi_xing']['type'], array('none','horizontal','vertical'))) {
|
659 |
-
$xing_script = true;
|
660 |
-
}
|
661 |
-
if ($this->options['mr_social_sharing_widget_buttons']['xi_xing']['enable'] == 1 && in_array($this->options['mr_social_sharing_widget_buttons']['xi_xing']['type'], array('none','horizontal','vertical'))) {
|
662 |
-
$xing_script = true;
|
663 |
-
}
|
664 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && $this->options['mr_social_sharing_shortcode_buttons']['xi_xing']['enable'] == 1 && in_array($this->options['mr_social_sharing_shortcode_buttons']['xi_xing']['type'], array('none','horizontal','vertical'))) {
|
665 |
-
$xing_script = true;
|
666 |
-
}
|
667 |
-
if ($this->options['mr_social_sharing_follow_buttons']['xi_xing']['enable'] == 1 && in_array($this->options['mr_social_sharing_follow_buttons']['xi_xing']['type'], array('none','horizontal'))) {
|
668 |
-
$xing_script = true;
|
669 |
-
}
|
670 |
-
if (is_active_sidebar(is_active_widget( false, false, 'mr-social-sharing-toolkit-follow-widget', true))) {
|
671 |
-
if ($this->options['mr_social_sharing_follow_buttons']['follow_twitter']['enable'] == 1 && in_array($this->options['mr_social_sharing_follow_buttons']['follow_twitter']['type'], array('none','horizontal'))) {
|
672 |
-
$tweet_script = true;
|
673 |
-
}
|
674 |
-
}
|
675 |
-
|
676 |
-
if ($digg_script) {
|
677 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
678 |
-
wp_enqueue_script('Digg', plugins_url('/digg.js', __FILE__), array(), false, true);
|
679 |
-
} else {
|
680 |
-
wp_enqueue_script('Digg', plugins_url('/digg.js', __FILE__));
|
681 |
-
}
|
682 |
-
}
|
683 |
-
if ($linked_script) {
|
684 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
685 |
-
wp_enqueue_script('LinkedIn', 'http://platform.linkedin.com/in.js', array(), false, true);
|
686 |
-
} else {
|
687 |
-
wp_enqueue_script('LinkedIn', 'http://platform.linkedin.com/in.js');
|
688 |
-
}
|
689 |
-
}
|
690 |
-
if ($google_script) {
|
691 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
692 |
-
wp_enqueue_script('GooglePlusLang', plugins_url('/googleplus.js.php?lang='.$lang, __FILE__), array(), false, true);
|
693 |
-
wp_enqueue_script('GooglePlus', 'http://apis.google.com/js/plusone.js', array(), false, true);
|
694 |
-
} else {
|
695 |
-
wp_enqueue_script('GooglePlusLang', plugins_url('/googleplus.js.php?lang='.$lang, __FILE__));
|
696 |
-
wp_enqueue_script('GooglePlus', 'http://apis.google.com/js/plusone.js');
|
697 |
-
}
|
698 |
-
}
|
699 |
-
if ($tweet_script) {
|
700 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
701 |
-
wp_enqueue_script('Twitter', 'http://platform.twitter.com/widgets.js', array(), false, true);
|
702 |
-
} else {
|
703 |
-
wp_enqueue_script('Twitter', 'http://platform.twitter.com/widgets.js');
|
704 |
-
}
|
705 |
-
}
|
706 |
-
if ($buffer_script) {
|
707 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
708 |
-
wp_enqueue_script('Buffer', 'http://static.bufferapp.com/js/button.js', array(), false, true);
|
709 |
-
} else {
|
710 |
-
wp_enqueue_script('Buffer', 'http://static.bufferapp.com/js/button.js');
|
711 |
-
}
|
712 |
-
}
|
713 |
-
if ($stumble_script) {
|
714 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
715 |
-
wp_enqueue_script('StumbleUpon', plugins_url('/stumbleupon.js', __FILE__), array(), false, true);
|
716 |
-
} else {
|
717 |
-
wp_enqueue_script('StumbleUpon', plugins_url('/stumbleupon.js', __FILE__));
|
718 |
-
}
|
719 |
-
}
|
720 |
-
if ($delicious_script) {
|
721 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
722 |
-
wp_enqueue_script('Delicious', plugins_url('/delicious.js', __FILE__), array(), false, true);
|
723 |
-
} else {
|
724 |
-
wp_enqueue_script('Delicious', plugins_url('/delicious.js', __FILE__));
|
725 |
-
}
|
726 |
-
}
|
727 |
-
if ($pinit_script) {
|
728 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
729 |
-
wp_enqueue_script('Pinterest', 'http://assets.pinterest.com/js/pinit.js', array(), false, true);
|
730 |
-
} else {
|
731 |
-
wp_enqueue_script('Pinterest', 'http://assets.pinterest.com/js/pinit.js');
|
732 |
-
}
|
733 |
-
}
|
734 |
-
if ($xing_script) {
|
735 |
-
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
736 |
-
wp_enqueue_script('Xing', 'https://www.xing-share.com/js/external/share.js', array(), false, true);
|
737 |
-
} else {
|
738 |
-
wp_enqueue_script('Xing', 'https://www.xing-share.com/js/external/share.js');
|
739 |
-
}
|
740 |
}
|
741 |
}
|
742 |
|
743 |
-
function create_bookmarks($url = '', $title = '', $type = '', $media = '') {
|
744 |
$url = trim($url);
|
745 |
$title = trim($title);
|
746 |
$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
|
@@ -749,11 +593,13 @@ class MR_Social_Sharing_Toolkit {
|
|
749 |
}
|
750 |
$bookmarks = '
|
751 |
<div class="mr_social_sharing_wrapper">
|
752 |
-
<!-- Social Sharing Toolkit v2.0.
|
753 |
foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) {
|
754 |
if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) {
|
755 |
-
$id = array_key_exists('id', $this->options['mr_social_sharing_'.$type.'buttons'][$button]) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['id'] : '';
|
756 |
-
$
|
|
|
|
|
757 |
}
|
758 |
}
|
759 |
$bookmarks .= '</div>';
|
@@ -765,11 +611,13 @@ class MR_Social_Sharing_Toolkit {
|
|
765 |
function create_followers() {
|
766 |
$followers = '
|
767 |
<div class="mr_social_sharing_wrapper">
|
768 |
-
<!-- Social Sharing Toolkit v2.0.
|
769 |
foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
|
770 |
if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) {
|
771 |
-
$id = array_key_exists('id', $this->options['mr_social_sharing_follow_buttons'][$button]) ? $this->options['mr_social_sharing_follow_buttons'][$button]['id'] : '';
|
772 |
-
$
|
|
|
|
|
773 |
}
|
774 |
}
|
775 |
$followers .= '</div>';
|
@@ -777,595 +625,34 @@ class MR_Social_Sharing_Toolkit {
|
|
777 |
return $followers;
|
778 |
}
|
779 |
|
780 |
-
function get_bookmark_button($button, $url, $title, $type, $display = 'span', $align = '', $id = '', $media = '') {
|
|
|
781 |
if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
|
782 |
$retval = '</div><div class="mr_social_sharing_wrapper">';
|
783 |
} else {
|
784 |
-
|
785 |
-
if ($
|
786 |
-
|
787 |
-
} else {
|
788 |
-
$id = $media;
|
789 |
}
|
790 |
}
|
791 |
-
$button = 'get_'.$button;
|
792 |
-
$retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($url, $title, $type, $id).'</'.$display.'>';
|
793 |
}
|
794 |
return $retval;
|
795 |
}
|
796 |
|
797 |
-
function get_follow_button($button, $type, $display = 'span', $align = '', $id = '') {
|
|
|
798 |
if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
|
799 |
$retval = '</div><div class="mr_social_sharing_wrapper">';
|
800 |
} else {
|
801 |
-
$
|
802 |
-
|
803 |
-
|
804 |
-
return $retval;
|
805 |
-
}
|
806 |
-
|
807 |
-
function get_fb_like($url, $title, $type, $id) {
|
808 |
-
$retval = '<iframe src="https://www.facebook.com/plugins/like.php?locale='.__('en_US','mr_social_sharing_toolkit').'&href='.urlencode($url).'&layout=';
|
809 |
-
switch ($type) {
|
810 |
-
case 'horizontal':
|
811 |
-
$retval .= 'button_count';
|
812 |
-
if ($id == 'recommend') {
|
813 |
-
$width = __('fb_horizontal_recommend_width','mr_social_sharing_toolkit');
|
814 |
-
$width = ($width == 'fb_horizontal_recommend_width') ? '120' : $width;
|
815 |
-
} else {
|
816 |
-
$width = __('fb_horizontal_width','mr_social_sharing_toolkit');
|
817 |
-
$width = ($width == 'fb_horizontal_width') ? '90' : $width;
|
818 |
-
}
|
819 |
-
$height = '21';
|
820 |
-
break;
|
821 |
-
case 'vertical':
|
822 |
-
$retval .= 'box_count';
|
823 |
-
if ($id == 'recommend') {
|
824 |
-
$width = __('fb_vertical_recommend_width','mr_social_sharing_toolkit');
|
825 |
-
$width = ($width == 'fb_vertical_recommend_width') ? '92' : $width;
|
826 |
-
} else {
|
827 |
-
$width = __('fb_vertical_width','mr_social_sharing_toolkit');
|
828 |
-
$width = ($width == 'fb_vertical_width') ? '55' : $width;
|
829 |
-
}
|
830 |
-
$height = '62';
|
831 |
-
break;
|
832 |
-
case 'none_text':
|
833 |
-
$retval .= 'standard';
|
834 |
-
if ($id == 'recommend') {
|
835 |
-
$width = 'auto';
|
836 |
-
} else {
|
837 |
-
$width = 'auto';
|
838 |
-
}
|
839 |
-
$height = '25';
|
840 |
-
break;
|
841 |
-
default:
|
842 |
-
$retval .= 'standard';
|
843 |
-
if ($id == 'recommend') {
|
844 |
-
$width = __('fb_standard_recommend_width','mr_social_sharing_toolkit');
|
845 |
-
$width = ($width == 'fb_standard_standard_recommend_width') ? '91' : $width;
|
846 |
-
} else {
|
847 |
-
$width = __('fb_standard_width','mr_social_sharing_toolkit');
|
848 |
-
$width = ($width == 'fb_standard_width') ? '51' : $width;
|
849 |
-
}
|
850 |
-
$height = '24';
|
851 |
-
break;
|
852 |
-
}
|
853 |
-
$retval .= '&show_faces=false&width='.$width.'&height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>';
|
854 |
-
return $retval;
|
855 |
-
}
|
856 |
-
|
857 |
-
function get_fb_share($url, $title, $type, $id) {
|
858 |
-
switch ($type) {
|
859 |
-
case 'vertical':
|
860 |
-
$retval = '<a name="fb_share" type="box_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>';
|
861 |
-
break;
|
862 |
-
case 'horizontal':
|
863 |
-
$retval = '<a name="fb_share" type="button_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>';
|
864 |
-
break;
|
865 |
-
case 'none':
|
866 |
-
$retval = '<a name="fb_share" type="button" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>';
|
867 |
-
break;
|
868 |
-
default:
|
869 |
-
$url = 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url).'&t='.urlencode($title);
|
870 |
-
$title = __('Share on','mr_social_sharing_toolkit').' Facebook';
|
871 |
-
$text = __('Share on','mr_social_sharing_toolkit').' Facebook';
|
872 |
-
$icon = 'facebook';
|
873 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
874 |
-
break;
|
875 |
-
}
|
876 |
-
return $retval;
|
877 |
-
}
|
878 |
-
|
879 |
-
function get_fb_send($url, $title, $type, $id) {
|
880 |
-
$retval = '<div id="fb-root"></div><fb:send href="'.$url.'" font=""></fb:send>';
|
881 |
-
return $retval;
|
882 |
-
}
|
883 |
-
|
884 |
-
function get_tw_tweet($url, $title, $type, $id) {
|
885 |
-
$count_url = '';
|
886 |
-
if ($this->options['mr_social_sharing_bitly']['enable'] == 1 && $this->options['mr_social_sharing_bitly']['username'] != '' && $this->options['mr_social_sharing_bitly']['key'] != '') {
|
887 |
-
if (is_array($this->options['mr_social_sharing_bitly']['cache']) && array_key_exists($url, $this->options['mr_social_sharing_bitly']['cache'])) {
|
888 |
-
$count_url = $url;
|
889 |
-
$url = $this->options['mr_social_sharing_bitly']['cache'][$url];
|
890 |
-
} else {
|
891 |
-
$ch = curl_init('https://api-ssl.bitly.com/v3/shorten?login='.$this->options['mr_social_sharing_bitly']['username'].'&apiKey='.$this->options['mr_social_sharing_bitly']['key'].'&longUrl='.urlencode($url).'&format=txt');
|
892 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
893 |
-
if ($short_url = curl_exec($ch)) {
|
894 |
-
$count_url = $url;
|
895 |
-
$url = trim($short_url);
|
896 |
-
$this->options['mr_social_sharing_bitly']['cache'][$count_url] = $url;
|
897 |
-
update_option( 'mr_social_sharing_bitly', $this->options['mr_social_sharing_bitly']);
|
898 |
}
|
899 |
}
|
900 |
}
|
901 |
-
switch ($type) {
|
902 |
-
case 'horizontal':
|
903 |
-
$retval = '<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="'.$url.'"';
|
904 |
-
if ($id != '') {
|
905 |
-
$retval .= ' data-via="'.$id.'"';
|
906 |
-
}
|
907 |
-
if ($count_url != '') {
|
908 |
-
$retval .= ' data-counturl="'.$count_url.'"';
|
909 |
-
}
|
910 |
-
$retval .= ' data-text="'.$title.'">Tweet</a>';
|
911 |
-
break;
|
912 |
-
case 'vertical':
|
913 |
-
$retval = '<a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical" data-url="'.$url.'"';
|
914 |
-
if ($id != '') {
|
915 |
-
$retval .= ' data-via="'.$id.'"';
|
916 |
-
}
|
917 |
-
if ($count_url != '') {
|
918 |
-
$retval .= ' data-counturl="'.$count_url.'"';
|
919 |
-
}
|
920 |
-
$retval .= ' data-text="'.$title.'">Tweet</a>';
|
921 |
-
break;
|
922 |
-
default:
|
923 |
-
$url = 'https://twitter.com/share?url='.urlencode($url).'&text='.urlencode($title);
|
924 |
-
if ($id != '') {
|
925 |
-
$url .= '&via='.$id;
|
926 |
-
}
|
927 |
-
if ($count_url != '') {
|
928 |
-
$url .= '&counturl='.urlencode($count_url);
|
929 |
-
}
|
930 |
-
$title = __('Share on','mr_social_sharing_toolkit').' Twitter';
|
931 |
-
$text = __('Share on','mr_social_sharing_toolkit').' Twitter';
|
932 |
-
$icon = 'twitter';
|
933 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
934 |
-
break;
|
935 |
-
}
|
936 |
return $retval;
|
937 |
}
|
938 |
|
939 |
-
function get_bf_buffer($url, $title, $type, $id) {
|
940 |
-
switch ($type) {
|
941 |
-
case 'horizontal':
|
942 |
-
$retval = '<a href="http://bufferapp.com/add" class="buffer-add-button" data-url="'.$url.'" data-count="horizontal"';
|
943 |
-
if ($id != '') {
|
944 |
-
$retval .= ' data-via="'.$id.'"';
|
945 |
-
}
|
946 |
-
$retval .= ' data-text="'.$title.'">Buffer</a>';
|
947 |
-
break;
|
948 |
-
case 'vertical':
|
949 |
-
$retval = '<a href="http://bufferapp.com/add" class="buffer-add-button" data-url="'.$url.'" data-count="vertical"';
|
950 |
-
if ($id != '') {
|
951 |
-
$retval .= ' data-via="'.$id.'"';
|
952 |
-
}
|
953 |
-
$retval .= ' data-text="'.$title.'">Buffer</a>';
|
954 |
-
break;
|
955 |
-
case 'none':
|
956 |
-
$retval = '<a href="http://bufferapp.com/add" class="buffer-add-button" data-url="'.$url.'" data-count="none"';
|
957 |
-
if ($id != '') {
|
958 |
-
$retval .= ' data-via="'.$id.'"';
|
959 |
-
}
|
960 |
-
$retval .= ' data-text="'.$title.'">Buffer</a>';
|
961 |
-
break;
|
962 |
-
default:
|
963 |
-
$url = 'http://bufferapp.com/add?url='.urlencode($url).'&text='.urlencode($title);
|
964 |
-
if ($id != '') {
|
965 |
-
$url .= '&via='.urlencode($id);
|
966 |
-
}
|
967 |
-
$title = __('Add to','mr_social_sharing_toolkit').' Buffer';
|
968 |
-
$text = __('Add to','mr_social_sharing_toolkit').' Buffer';
|
969 |
-
$icon = 'buffer';
|
970 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
971 |
-
break;
|
972 |
-
}
|
973 |
-
return $retval;
|
974 |
-
}
|
975 |
-
|
976 |
-
function get_pn_pinterest($url, $title, $type, $media) {
|
977 |
-
$pin_url = 'http://pinterest.com/pin/create/button/?url='.urlencode($url).'&media='.urlencode($media).'&description='.urlencode($title);
|
978 |
-
switch ($type) {
|
979 |
-
case 'horizontal':
|
980 |
-
$retval = '<a href="'.$pin_url.'" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
981 |
-
break;
|
982 |
-
case 'vertical':
|
983 |
-
$retval = '<a href="'.$pin_url.'" class="pin-it-button" count-layout="vertical"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
984 |
-
break;
|
985 |
-
case 'none':
|
986 |
-
$retval = '<a href="'.$pin_url.'" class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
987 |
-
break;
|
988 |
-
default:
|
989 |
-
$title = __('Pin it on','mr_social_sharing_toolkit').' Pinterest';
|
990 |
-
$text = __('Pin it on','mr_social_sharing_toolkit').' Pinterest';
|
991 |
-
$icon = 'pinterest';
|
992 |
-
$retval = $this->get_icon($type, $pin_url, $title, $text, $icon, true);
|
993 |
-
break;
|
994 |
-
}
|
995 |
-
return $retval;
|
996 |
-
}
|
997 |
-
|
998 |
-
function get_gl_plus($url, $title, $type, $id) {
|
999 |
-
$retval = '<g:plusone';
|
1000 |
-
switch ($type) {
|
1001 |
-
case 'horizontal':
|
1002 |
-
$retval .= ' size="medium"';
|
1003 |
-
break;
|
1004 |
-
case 'vertical':
|
1005 |
-
$retval .= ' size="tall"';
|
1006 |
-
break;
|
1007 |
-
default:
|
1008 |
-
$retval .= ' size="medium" count="false"';
|
1009 |
-
break;
|
1010 |
-
}
|
1011 |
-
$retval .= ' href="'.$url.'"></g:plusone>';
|
1012 |
-
return $retval;
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
function get_li_share($url, $title, $type, $id) {
|
1016 |
-
switch ($type) {
|
1017 |
-
case 'horizontal':
|
1018 |
-
$retval = '<script type="IN/Share" data-url="'.$url.'" data-counter="right"></script>';
|
1019 |
-
break;
|
1020 |
-
case 'vertical':
|
1021 |
-
$retval = '<script type="IN/Share" data-url="'.$url.'" data-counter="top"></script>';
|
1022 |
-
break;
|
1023 |
-
case 'none':
|
1024 |
-
$retval = '<script type="IN/Share" data-url="'.$url.'"></script>';
|
1025 |
-
break;
|
1026 |
-
default:
|
1027 |
-
$url = 'http://www.linkedin.com/shareArticle?mini=true&url='.urlencode($url).'&title='.urlencode($title);
|
1028 |
-
$title = __('Share on','mr_social_sharing_toolkit').' LinkedIn';
|
1029 |
-
$text = __('Share on','mr_social_sharing_toolkit').' LinkedIn';
|
1030 |
-
$icon = 'linkedin';
|
1031 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
1032 |
-
break;
|
1033 |
-
}
|
1034 |
-
return $retval;
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
function get_xi_xing($url, $title, $type, $id) {
|
1038 |
-
switch ($type) {
|
1039 |
-
case 'horizontal':
|
1040 |
-
$retval = '<script type="XING/Share" data-counter="right" data-lang="en" data-url="'.$url.'"></script>';
|
1041 |
-
break;
|
1042 |
-
case 'vertical':
|
1043 |
-
$retval = '<script type="XING/Share" data-counter="top" data-lang="en" data-url="'.$url.'"></script>';
|
1044 |
-
break;
|
1045 |
-
case 'none':
|
1046 |
-
$retval = '<script type="XING/Share" data-counter="no_count" data-lang="en" data-url="'.$url.'" data-button-shape="rectangle"></script>';
|
1047 |
-
break;
|
1048 |
-
default:
|
1049 |
-
$url = 'https://www.xing.com/app/startpage?op=home;func_share=1;tab=link;url='.$url;
|
1050 |
-
$title = __('Share on','mr_social_sharing_toolkit').' Xing';
|
1051 |
-
$text = __('Share on','mr_social_sharing_toolkit').' Xing';
|
1052 |
-
$icon = 'xing';
|
1053 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
1054 |
-
break;
|
1055 |
-
}
|
1056 |
-
return $retval;
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
function get_tu_tumblr($url, $title, $type, $id) {
|
1060 |
-
$url = 'http://www.tumblr.com/share/link?url='.urlencode($url).'&name='.urlencode($title);
|
1061 |
-
$title = __('Share on','mr_social_sharing_toolkit').' Tumblr';
|
1062 |
-
$text = __('Share on','mr_social_sharing_toolkit').' Tumblr';
|
1063 |
-
$icon = 'tumblr';
|
1064 |
-
return $this->get_icon($type, $url, $title, $text, $icon, true);
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
function get_su_stumble($url, $title, $type, $id) {
|
1068 |
-
switch ($type) {
|
1069 |
-
case 'horizontal':
|
1070 |
-
$retval = '<span class="stumble_horizontal"><su:badge layout="1" location="'.$url.'"></su:badge></span>';
|
1071 |
-
break;
|
1072 |
-
case 'vertical':
|
1073 |
-
$retval = '<span class="stumble_vertical"><su:badge layout="5" location="'.$url.'"></su:badge></span>';
|
1074 |
-
break;
|
1075 |
-
default:
|
1076 |
-
$url = 'http://www.stumbleupon.com/submit?url='.urlencode($url);
|
1077 |
-
$title = __('Submit to','mr_social_sharing_toolkit').' StumbleUpon';
|
1078 |
-
$text = __('Submit to','mr_social_sharing_toolkit').' StumbleUpon';
|
1079 |
-
$icon = 'stumbleupon';
|
1080 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
1081 |
-
break;
|
1082 |
-
}
|
1083 |
-
return $retval;
|
1084 |
-
}
|
1085 |
-
|
1086 |
-
function get_dl_delicious($url, $title, $type, $id) {
|
1087 |
-
switch ($type) {
|
1088 |
-
case 'horizontal':
|
1089 |
-
$hash = md5($url);
|
1090 |
-
$retval = '<div class="delicious_horizontal"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&noui&jump=close&url='.urlencode($url).'&title='.urlencode($title).'" target="_blank"></a></div>';
|
1091 |
-
break;
|
1092 |
-
case 'vertical':
|
1093 |
-
$hash = md5($url);
|
1094 |
-
$retval = '<div class="delicious_vertical"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&noui&jump=close&url='.urlencode($url).'&title='.urlencode($title).'" target="_blank"></a></div>';
|
1095 |
-
break;
|
1096 |
-
default:
|
1097 |
-
$url = 'http://del.icio.us/post?url='.urlencode($url).'&title='.urlencode($title);
|
1098 |
-
$title = __('Save on','mr_social_sharing_toolkit').' Delicious';
|
1099 |
-
$text = __('Save on','mr_social_sharing_toolkit').' Delicious';
|
1100 |
-
$icon = 'delicious';
|
1101 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
1102 |
-
break;
|
1103 |
-
}
|
1104 |
-
return $retval;
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
function get_dg_digg($url, $title, $type, $id) {
|
1108 |
-
switch ($type) {
|
1109 |
-
case 'horizontal':
|
1110 |
-
$retval = '<a class="DiggThisButton DiggCompact" href="http://digg.com/submit?url='.urlencode($url).'&title='.urlencode($title).'"></a>';
|
1111 |
-
break;
|
1112 |
-
case 'vertical':
|
1113 |
-
$retval = '<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url='.urlencode($url).'&title='.urlencode($title).'"></a>';
|
1114 |
-
break;
|
1115 |
-
default:
|
1116 |
-
$url = 'http://digg.com/submit?url='.urlencode($url).'&title='.urlencode($title);
|
1117 |
-
$title = __('Digg This','mr_social_sharing_toolkit');
|
1118 |
-
$text = __('Digg This','mr_social_sharing_toolkit');
|
1119 |
-
$icon = 'digg';
|
1120 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
1121 |
-
break;
|
1122 |
-
}
|
1123 |
-
return $retval;
|
1124 |
-
}
|
1125 |
-
|
1126 |
-
function get_rd_reddit($url, $title, $type, $id) {
|
1127 |
-
switch ($type) {
|
1128 |
-
case 'horizontal':
|
1129 |
-
$retval = '<script type="text/javascript">
|
1130 |
-
reddit_url = "'.$url.'";
|
1131 |
-
reddit_title = "'.$title.'";
|
1132 |
-
</script>
|
1133 |
-
<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script>';
|
1134 |
-
break;
|
1135 |
-
case 'vertical':
|
1136 |
-
$retval = '<script type="text/javascript">
|
1137 |
-
reddit_url = "'.$url.'";
|
1138 |
-
reddit_title = "'.$title.'";
|
1139 |
-
</script><script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>';
|
1140 |
-
break;
|
1141 |
-
default:
|
1142 |
-
$url = 'http://www.reddit.com/submit?url='.urlencode($url);
|
1143 |
-
$title = __('Submit to','mr_social_sharing_toolkit').' reddit';
|
1144 |
-
$text = __('Submit to','mr_social_sharing_toolkit').' reddit';
|
1145 |
-
$icon = 'reddit';
|
1146 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon, true);
|
1147 |
-
break;
|
1148 |
-
}
|
1149 |
-
return $retval;
|
1150 |
-
}
|
1151 |
-
|
1152 |
-
function get_ms_myspace($url, $title, $type, $id) {
|
1153 |
-
$url = 'http://www.myspace.com/Modules/PostTo/Pages/?t='.urlencode($title).'&u='.urlencode($url);
|
1154 |
-
$title = __('Share on','mr_social_sharing_toolkit').' Myspace';
|
1155 |
-
$text = __('Share on','mr_social_sharing_toolkit').' Myspace';
|
1156 |
-
$icon = 'myspace';
|
1157 |
-
return $this->get_icon($type, $url, $title, $text, $icon, true);
|
1158 |
-
}
|
1159 |
-
|
1160 |
-
function get_hv_respect($url, $title, $type, $id) {
|
1161 |
-
$retval = '<iframe src="http://www.hyves.nl/respect/button?url='.urlencode($url).'&title='.urlencode($title).'" style="border: medium none; overflow:hidden; width:150px; height:21px;" scrolling="no" frameborder="0" allowTransparency="true" ></iframe>';
|
1162 |
-
return $retval;
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
function get_ml_send($url, $title, $type, $id) {
|
1166 |
-
$url = 'mailto:?subject='.$title.'&body='.$url;
|
1167 |
-
$title = __('Share via email','mr_social_sharing_toolkit');
|
1168 |
-
$text = __('Share via email','mr_social_sharing_toolkit');
|
1169 |
-
$icon = 'email';
|
1170 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
function get_follow_facebook($type, $id) {
|
1174 |
-
$url = 'http://www.facebook.com/'.$id;
|
1175 |
-
$title = __('Friend me on','mr_social_sharing_toolkit').' Facebook';
|
1176 |
-
$text = 'Facebook';
|
1177 |
-
$icon = 'facebook';
|
1178 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1179 |
-
}
|
1180 |
-
|
1181 |
-
function get_follow_twitter($type, $id) {
|
1182 |
-
switch ($type) {
|
1183 |
-
case 'none':
|
1184 |
-
$retval = '<a href="http://twitter.com/'.$id.'" class="twitter-follow-button" data-show-count="false">Follow @'.$id.'</a>';
|
1185 |
-
break;
|
1186 |
-
case 'horizontal':
|
1187 |
-
$retval = '<a href="http://twitter.com/'.$id.'" class="twitter-follow-button">Follow @'.$id.'</a>';
|
1188 |
-
break;
|
1189 |
-
default:
|
1190 |
-
$url = 'http://twitter.com/'.$id;
|
1191 |
-
$title = __('Follow me on','mr_social_sharing_toolkit').' Twitter';
|
1192 |
-
$text = 'Twitter';
|
1193 |
-
$icon = 'twitter';
|
1194 |
-
$retval = $this->get_icon($type, $url, $title, $text, $icon);
|
1195 |
-
break;
|
1196 |
-
}
|
1197 |
-
return $retval;
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
function get_follow_plus($type, $id) {
|
1201 |
-
$url = 'http://plus.google.com/'.$id;
|
1202 |
-
$title = __('Add me to your circles','mr_social_sharing_toolkit');
|
1203 |
-
$text = 'Google+';
|
1204 |
-
$icon = 'googleplus';
|
1205 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1206 |
-
}
|
1207 |
-
|
1208 |
-
function get_follow_pinterest($type, $id) {
|
1209 |
-
$url = 'http://pinterest.com/'.$id.'/';
|
1210 |
-
$title = __('Follow Me on Pinterest','mr_social_sharing_toolkit');
|
1211 |
-
$text = 'Pinterest';
|
1212 |
-
$icon = 'pinterest';
|
1213 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1214 |
-
}
|
1215 |
-
|
1216 |
-
function get_follow_linked($type, $id) {
|
1217 |
-
$url = 'http://www.linkedin.com/in/'.$id;
|
1218 |
-
$title = __('Join my network on','mr_social_sharing_toolkit').' LinkedIn';
|
1219 |
-
$text = 'LinkedIn';
|
1220 |
-
$icon = 'linkedin';
|
1221 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1222 |
-
}
|
1223 |
-
|
1224 |
-
function get_follow_linked_co($type, $id) {
|
1225 |
-
$url = 'http://www.linkedin.com/company/'.$id;
|
1226 |
-
$title = __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn';
|
1227 |
-
$text = 'LinkedIn';
|
1228 |
-
$icon = 'linkedin';
|
1229 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1230 |
-
}
|
1231 |
-
|
1232 |
-
function get_follow_linked_group($type, $id) {
|
1233 |
-
$url = 'http://www.linkedin.com/groups?gid='.$id;
|
1234 |
-
$title = __('Join my group on','mr_social_sharing_toolkit').' LinkedIn';
|
1235 |
-
$text = 'LinkedIn';
|
1236 |
-
$icon = 'linkedin';
|
1237 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1238 |
-
}
|
1239 |
-
|
1240 |
-
function get_follow_xing($type, $id) {
|
1241 |
-
$url = 'http://www.xing.com/profile/'.$id;
|
1242 |
-
$title = __('Join my network on','mr_social_sharing_toolkit').' Xing';
|
1243 |
-
$text = 'Xing';
|
1244 |
-
$icon = 'xing';
|
1245 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
function get_follow_tumblr($type, $id) {
|
1249 |
-
$url = 'http://'.$id.'.tumblr.com';
|
1250 |
-
$title = __('Follow me on','mr_social_sharing_toolkit').' Tumblr';
|
1251 |
-
$text = 'Tumblr';
|
1252 |
-
$icon = 'tumblr';
|
1253 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1254 |
-
}
|
1255 |
-
|
1256 |
-
function get_follow_myspace($type, $id) {
|
1257 |
-
$url = 'http://www.myspace.com/'.$id;
|
1258 |
-
$title = __('Friend me on','mr_social_sharing_toolkit').' Myspace';
|
1259 |
-
$text = 'Myspace';
|
1260 |
-
$icon = 'myspace';
|
1261 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1262 |
-
}
|
1263 |
-
|
1264 |
-
function get_follow_hyves($type, $id) {
|
1265 |
-
$url = 'http://'.$id.'.hyves.nl';
|
1266 |
-
$title = __('Friend me on','mr_social_sharing_toolkit').' Hyves';
|
1267 |
-
$text = 'Hyves';
|
1268 |
-
$icon = 'hyves';
|
1269 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
function get_follow_youtube($type, $id) {
|
1273 |
-
$url = 'http://www.youtube.com/user/'.$id;
|
1274 |
-
$title = __('Watch me on','mr_social_sharing_toolkit').' YouTube';
|
1275 |
-
$text = 'YouTube';
|
1276 |
-
$icon = 'youtube';
|
1277 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1278 |
-
}
|
1279 |
-
|
1280 |
-
function get_follow_flickr($type, $id) {
|
1281 |
-
$url = 'http://www.flickr.com/photos/'.$id;
|
1282 |
-
$title = __('My photostream on','mr_social_sharing_toolkit').' Flickr';
|
1283 |
-
$text = 'Flickr';
|
1284 |
-
$icon = 'flickr';
|
1285 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
function get_follow_500px($type, $id) {
|
1289 |
-
$url = 'http://500px.com/'.$id;
|
1290 |
-
$title = __('My portfolio on','mr_social_sharing_toolkit').' 500px';
|
1291 |
-
$text = '500px';
|
1292 |
-
$icon = '500px';
|
1293 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1294 |
-
}
|
1295 |
-
|
1296 |
-
function get_follow_picasa($type, $id) {
|
1297 |
-
$url = 'http://picasaweb.google.com/'.$id;
|
1298 |
-
$title = __('My Picasa Web Albums','mr_social_sharing_toolkit');
|
1299 |
-
$text = 'Picasa';
|
1300 |
-
$icon = 'picasa';
|
1301 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1302 |
-
}
|
1303 |
-
|
1304 |
-
function get_follow_deviant($type, $id) {
|
1305 |
-
$url = 'http://'.$id.'.deviantart.com/';
|
1306 |
-
$title = __('My deviantArt','mr_social_sharing_toolkit');
|
1307 |
-
$text = 'deviantArt';
|
1308 |
-
$icon = 'deviantart';
|
1309 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1310 |
-
}
|
1311 |
-
|
1312 |
-
function get_follow_lastfm($type, $id) {
|
1313 |
-
$url = 'http://www.last.fm/user/'.$id;
|
1314 |
-
$title = __('My profile on','mr_social_sharing_toolkit').' Last.fm';
|
1315 |
-
$text = 'Last.fm';
|
1316 |
-
$icon = 'lastfm';
|
1317 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1318 |
-
}
|
1319 |
-
|
1320 |
-
function get_follow_spotify($type, $id) {
|
1321 |
-
$url = 'http://open.spotify.com/user/'.$id;
|
1322 |
-
$title = __('My profile on','mr_social_sharing_toolkit').' Spotify';
|
1323 |
-
$text = 'Spotify';
|
1324 |
-
$icon = 'spotify';
|
1325 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1326 |
-
}
|
1327 |
-
|
1328 |
-
function get_follow_rss($type, $id) {
|
1329 |
-
$url = $id;
|
1330 |
-
$title = __('RSS Feed','mr_social_sharing_toolkit');
|
1331 |
-
$text = __('RSS Feed','mr_social_sharing_toolkit');
|
1332 |
-
$icon = 'rss';
|
1333 |
-
return $this->get_icon($type, $url, $title, $text, $icon);
|
1334 |
-
}
|
1335 |
-
|
1336 |
-
function get_icon($type, $url, $title, $text, $icon, $popup = false) {
|
1337 |
-
if ($icon != 'email') {
|
1338 |
-
$url .= '" target="_blank';
|
1339 |
-
}
|
1340 |
-
if ($popup) {
|
1341 |
-
$url .= '" class="mr_social_sharing_popup_link';
|
1342 |
-
}
|
1343 |
-
switch ($type) {
|
1344 |
-
case 'none':
|
1345 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/buttons/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
|
1346 |
-
break;
|
1347 |
-
case 'icon_small':
|
1348 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
|
1349 |
-
break;
|
1350 |
-
case 'icon_small_text':
|
1351 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/><span class="mr_small_icon">'.$text.'</span></a>';
|
1352 |
-
break;
|
1353 |
-
case 'icon_medium':
|
1354 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_medium/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
|
1355 |
-
break;
|
1356 |
-
case 'icon_medium_text':
|
1357 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_medium/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/><span class="mr_medium_icon">'.$text.'</span></a>';
|
1358 |
-
break;
|
1359 |
-
case 'icon_large':
|
1360 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_large/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
|
1361 |
-
break;
|
1362 |
-
default:
|
1363 |
-
$retval = '<a href="'.$url.'"><img src="'.plugins_url('/images/icons_small/'.$icon.'.png', __FILE__).'" alt="'.$title.'" title="'.$title.'"/></a>';
|
1364 |
-
break;
|
1365 |
-
}
|
1366 |
-
return $retval;
|
1367 |
-
}
|
1368 |
-
|
1369 |
function should_print_opengraph() {
|
1370 |
if ($this->options['mr_social_sharing_opengraph']['enable'] == 1) {
|
1371 |
return true;
|
@@ -1373,143 +660,155 @@ class MR_Social_Sharing_Toolkit {
|
|
1373 |
}
|
1374 |
|
1375 |
function should_share_content() {
|
1376 |
-
if ($this->options['mr_social_sharing_position'] != 'none'
|
1377 |
return true;
|
1378 |
}
|
1379 |
return false;
|
1380 |
}
|
1381 |
|
1382 |
function should_share_excerpt() {
|
1383 |
-
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_include_excerpts'] == 1
|
1384 |
return true;
|
1385 |
}
|
1386 |
return false;
|
1387 |
}
|
1388 |
|
1389 |
function share($content) {
|
1390 |
-
|
1391 |
-
|
1392 |
-
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
1393 |
} else {
|
1394 |
-
|
1395 |
-
|
1396 |
-
if (is_array($media)) {
|
1397 |
-
$media = $media[0];
|
1398 |
-
} else {
|
1399 |
-
$media = '';
|
1400 |
-
}
|
1401 |
-
}
|
1402 |
-
}
|
1403 |
-
if ($media == '') {
|
1404 |
-
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
|
1405 |
-
$img = $matches[1][0];
|
1406 |
-
if($img != '') {
|
1407 |
-
$media = $img;
|
1408 |
-
}
|
1409 |
-
}
|
1410 |
-
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
1411 |
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1412 |
}
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
}
|
|
|
1428 |
}
|
1429 |
-
return $content;
|
1430 |
}
|
1431 |
|
1432 |
function share_excerpt($content) {
|
1433 |
-
|
1434 |
-
|
1435 |
-
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
1436 |
} else {
|
1437 |
-
|
1438 |
-
|
1439 |
-
if (is_array($media)) {
|
1440 |
-
$media = $media[0];
|
1441 |
-
} else {
|
1442 |
-
$media = '';
|
1443 |
-
}
|
1444 |
-
}
|
1445 |
-
}
|
1446 |
-
if ($media == '') {
|
1447 |
-
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
|
1448 |
-
$img = $matches[1][0];
|
1449 |
-
if($img != '') {
|
1450 |
-
$media = $img;
|
1451 |
-
}
|
1452 |
-
}
|
1453 |
-
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
1454 |
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1455 |
}
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
}
|
|
|
1471 |
}
|
1472 |
-
return $content;
|
1473 |
}
|
1474 |
|
1475 |
function should_use_shortcode() {
|
1476 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1
|
1477 |
return true;
|
1478 |
}
|
1479 |
return false;
|
1480 |
}
|
1481 |
|
1482 |
function share_shortcode() {
|
1483 |
-
|
1484 |
-
|
1485 |
-
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
1486 |
} else {
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1494 |
}
|
1495 |
-
}
|
1496 |
-
if ($media == '') {
|
1497 |
-
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', get_the_content(), $matches);
|
1498 |
-
$img = $matches[1][0];
|
1499 |
-
if($img != '') {
|
1500 |
-
$media = $img;
|
1501 |
-
}
|
1502 |
}
|
1503 |
-
|
1504 |
-
|
|
|
|
|
1505 |
}
|
|
|
1506 |
}
|
1507 |
-
$type = get_post_type();
|
1508 |
-
$bookmarks = '';
|
1509 |
-
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && ((is_single() || $type == 'page') || $this->options['mr_social_sharing_include_excerpts'] == 1)) {
|
1510 |
-
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), 'shortcode_', $media);
|
1511 |
-
}
|
1512 |
-
return $bookmarks;
|
1513 |
}
|
1514 |
|
1515 |
function should_linkify_content() {
|
@@ -1545,119 +844,18 @@ class MR_Social_Sharing_Toolkit {
|
|
1545 |
return $content;
|
1546 |
}
|
1547 |
}
|
1548 |
-
class
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
}
|
1554 |
-
|
1555 |
-
function widget ( $args, $instance) {
|
1556 |
-
extract( $args );
|
1557 |
-
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
|
1558 |
-
$widget_title = empty($instance['widget_title']) ? '' : $instance['widget_title'];
|
1559 |
-
$url = empty($instance['fixed_url']) ? '' : $instance['fixed_url'];
|
1560 |
-
$title = empty($instance['fixed_title']) ? wp_title('', false) : $instance['fixed_title'];
|
1561 |
-
$media = '';
|
1562 |
-
if ($this->options['mr_social_sharing_pinterest']['default_image'] != '' && $this->options['mr_social_sharing_pinterest']['fixed_image'] == 1) {
|
1563 |
-
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
1564 |
-
} else {
|
1565 |
-
if (current_theme_supports('post-thumbnails')) {
|
1566 |
-
if ($media = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()))) {
|
1567 |
-
if (is_array($media)) {
|
1568 |
-
$media = $media[0];
|
1569 |
-
} else {
|
1570 |
-
$media = '';
|
1571 |
-
}
|
1572 |
-
}
|
1573 |
-
}
|
1574 |
-
if ($media == '') {
|
1575 |
-
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', get_the_content(), $matches);
|
1576 |
-
$img = $matches[1][0];
|
1577 |
-
if($img != '') {
|
1578 |
-
$media = $img;
|
1579 |
-
}
|
1580 |
-
}
|
1581 |
-
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
1582 |
-
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
1583 |
-
}
|
1584 |
-
}
|
1585 |
-
$bookmarks = $MR_Social_Sharing_Toolkit->create_bookmarks($url, $title, 'widget_', $media);
|
1586 |
-
echo $before_widget;
|
1587 |
-
if ($widget_title != '') {
|
1588 |
-
echo $before_title . $widget_title . $after_title;
|
1589 |
-
}
|
1590 |
-
echo $bookmarks;
|
1591 |
-
echo $after_widget;
|
1592 |
-
}
|
1593 |
-
|
1594 |
-
function update($new_instance, $old_instance) {
|
1595 |
-
$instance = $old_instance;
|
1596 |
-
$instance['widget_title'] = $new_instance['widget_title'];
|
1597 |
-
$instance['fixed_title'] = $new_instance['fixed_title'];
|
1598 |
-
$instance['fixed_url'] = $new_instance['fixed_url'];
|
1599 |
-
return $instance;
|
1600 |
-
}
|
1601 |
-
|
1602 |
-
function form($instance) {
|
1603 |
-
$instance = wp_parse_args((array) $instance, array( 'widget_title' => '', 'fixed_title' => '', 'fixed_url' => ''));
|
1604 |
-
echo '
|
1605 |
-
<p>
|
1606 |
-
<label for="'.$this->get_field_id( 'widget_title' ).'">'.__('Title').':</label>
|
1607 |
-
<input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
|
1608 |
-
</p>
|
1609 |
-
<p>
|
1610 |
-
<label for="'.$this->get_field_id( 'fixed_title' ).'">'.__('Fixed title','mr_social_sharing_toolkit').':</label>
|
1611 |
-
<input class="widefat" id="'.$this->get_field_id( 'fixed_title' ).'" name="'.$this->get_field_name( 'fixed_title' ).'" value="'.$instance['fixed_title'].'" />
|
1612 |
-
</p>
|
1613 |
-
<p>
|
1614 |
-
<label for="'.$this->get_field_id( 'fixed_url' ).'">'.__('Fixed url','mr_social_sharing_toolkit').':</label>
|
1615 |
-
<input class="widefat" id="'.$this->get_field_id( 'fixed_url' ).'" name="'.$this->get_field_name( 'fixed_url' ).'" value="'.$instance['fixed_url'].'" />
|
1616 |
-
</p>
|
1617 |
-
<p>
|
1618 |
-
'.__('Further configuration is done via the','mr_social_sharing_toolkit').' <a href="options-general.php?page=mr_social_sharing#tab_3">'.__('plugin admin screen','mr_social_sharing_toolkit').'</a>.
|
1619 |
-
</p>';
|
1620 |
-
}
|
1621 |
}
|
1622 |
-
|
1623 |
-
function MR_Social_Sharing_Toolkit_Follow_Widget() {
|
1624 |
-
$widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Follow_Widget', 'description' => '' );
|
1625 |
-
$control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-follow-widget' );
|
1626 |
-
$this->WP_Widget( 'mr-social-sharing-toolkit-follow-widget', 'Social Sharing Toolkit '.__('Follow Widget','mr_social_sharing_toolkit'), $widget_ops, $control_ops );
|
1627 |
-
}
|
1628 |
|
1629 |
-
|
1630 |
-
extract( $args );
|
1631 |
-
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
|
1632 |
-
$widget_title = empty($instance['widget_title']) ? '' : $instance['widget_title'];
|
1633 |
-
$followers = $MR_Social_Sharing_Toolkit->create_followers();
|
1634 |
-
echo $before_widget;
|
1635 |
-
if ($widget_title != '') {
|
1636 |
-
echo $before_title . $widget_title . $after_title;
|
1637 |
-
}
|
1638 |
-
echo $followers;
|
1639 |
-
echo $after_widget;
|
1640 |
-
}
|
1641 |
-
|
1642 |
-
function update($new_instance, $old_instance) {
|
1643 |
-
$instance = $old_instance;
|
1644 |
-
$instance['widget_title'] = $new_instance['widget_title'];
|
1645 |
-
return $instance;
|
1646 |
-
}
|
1647 |
-
|
1648 |
-
function form($instance) {
|
1649 |
-
$instance = wp_parse_args((array) $instance, array( 'widget_title' => ''));
|
1650 |
-
echo '
|
1651 |
-
<p>
|
1652 |
-
<label for="'.$this->get_field_id( 'widget_title' ).'">'.__('Title').':</label>
|
1653 |
-
<input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
|
1654 |
-
</p>
|
1655 |
-
<p>
|
1656 |
-
'.__('Further configuration is done via the','mr_social_sharing_toolkit').' <a href="options-general.php?page=mr_social_sharing#tab_4">'.__('plugin admin screen','mr_social_sharing_toolkit').'</a>.
|
1657 |
-
</p>';
|
1658 |
-
}
|
1659 |
-
}
|
1660 |
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
|
|
|
1661 |
add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles'));
|
1662 |
add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts'));
|
1663 |
if ($MR_Social_Sharing_Toolkit->should_print_opengraph()) {
|
@@ -1678,8 +876,6 @@ if ($MR_Social_Sharing_Toolkit->should_share_content()) {
|
|
1678 |
if ($MR_Social_Sharing_Toolkit->should_use_shortcode()) {
|
1679 |
add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode'));
|
1680 |
}
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
/* Register plugin admin page */
|
1685 |
-
add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu'));
|
3 |
Plugin Name: Social Sharing Toolkit
|
4 |
Plugin URI: http://www.active-bits.nl/support/social-sharing-toolkit/
|
5 |
Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
|
6 |
+
Version: 2.0.9
|
7 |
Author: Marijn Rongen
|
8 |
Author URI: http://www.active-bits.nl
|
9 |
*/
|
12 |
var $count;
|
13 |
var $options;
|
14 |
var $types;
|
15 |
+
var $buttons;
|
16 |
var $share_buttons;
|
17 |
var $follow_buttons;
|
18 |
+
var $error;
|
19 |
|
20 |
function MR_Social_Sharing_Toolkit() {
|
21 |
$this->count = 0;
|
22 |
+
$this->error = '';
|
23 |
load_plugin_textdomain( 'mr_social_sharing_toolkit', false, dirname(plugin_basename(__FILE__)).'/languages/');
|
24 |
/* Declare button types */
|
25 |
$this->types['none'] = __('Button','mr_social_sharing_toolkit');
|
31 |
$this->types['icon_medium'] = __('Medium icon','mr_social_sharing_toolkit');
|
32 |
$this->types['icon_medium_text'] = __('Medium icon + text','mr_social_sharing_toolkit');
|
33 |
$this->types['icon_large'] = __('Large icon','mr_social_sharing_toolkit');
|
34 |
+
$buttons = glob(dirname(__FILE__).'/includes/buttons/button.*.php');
|
35 |
+
if (is_array($buttons) && count($buttons) > 0) {
|
36 |
+
foreach ($buttons as $button) {
|
37 |
+
$name = str_replace(dirname(__FILE__).'/includes/buttons/button.','',str_replace('.php','',$button));
|
38 |
+
$class_name = 'MR_Social_Sharing_Toolkit_'.ucfirst($name);
|
39 |
+
if (class_exists($class_name)) {
|
40 |
+
$this->buttons[$name] = new $class_name();
|
41 |
+
if ($this->buttons[$name]->hasShare()) {
|
42 |
+
foreach ($this->buttons[$name]->getShareButtons() as $tmp) {
|
43 |
+
$this->share_buttons[$tmp['name']] = array('icon' => $this->buttons[$name]->getIcon(), 'types' => $tmp['types']);
|
44 |
+
$this->share_buttons[$tmp['name']]['title'] = (array_key_exists('title', $tmp)) ? $tmp['title'] : $this->buttons[$name]->getTitle();
|
45 |
+
if (array_key_exists('id', $tmp)) {
|
46 |
+
$this->share_buttons[$tmp['name']]['id'] = $tmp['id'];
|
47 |
+
}
|
48 |
+
unset($tmp);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
if ($this->buttons[$name]->hasFollow()) {
|
52 |
+
foreach ($this->buttons[$name]->getFollowButtons() as $tmp) {
|
53 |
+
$this->follow_buttons[$tmp['name']] = array('icon' => $this->buttons[$name]->getIcon(), 'types' => $tmp['types']);
|
54 |
+
$this->follow_buttons[$tmp['name']]['title'] = (array_key_exists('title', $tmp)) ? $tmp['title'] : $this->buttons[$name]->getTitle();
|
55 |
+
if (array_key_exists('id', $tmp)) {
|
56 |
+
$this->follow_buttons[$tmp['name']]['id'] = $tmp['id'];
|
57 |
+
}
|
58 |
+
unset($tmp);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
unset($buttons);
|
65 |
$this->share_buttons['ln_break_1'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 1', 'types' => array(''));
|
66 |
$this->share_buttons['ln_break_2'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 2', 'types' => array(''));
|
67 |
$this->share_buttons['ln_break_3'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 3', 'types' => array(''));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
$this->follow_buttons['ln_break_1'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 1', 'types' => array(''));
|
69 |
$this->follow_buttons['ln_break_2'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 2', 'types' => array(''));
|
70 |
$this->follow_buttons['ln_break_3'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 3', 'types' => array(''));
|
71 |
/* Set defaults and load user options */
|
72 |
+
$this->get_options();
|
73 |
}
|
74 |
|
75 |
function get_options() {
|
88 |
$pinterest_options = array('default_image' => '', 'fixed_image' => 0);
|
89 |
$bitly_options = array('enable' => 0, 'username' => '', 'key' => '', 'cache' => array());
|
90 |
$opengraph_options = array('enable' => 0, 'default_image' => '', 'fixed_image' => 0);
|
91 |
+
$this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => array('post', 'page'), 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_linkify_new' => 1, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 1, 'mr_social_sharing_no_follow' => 0, 'mr_social_sharing_pinterest' => $pinterest_options, 'mr_social_sharing_bitly' => $bitly_options, 'mr_social_sharing_opengraph' => $opengraph_options, 'mr_social_sharing_custom_css' => '');
|
92 |
foreach ($this->options as $key => $val) {
|
93 |
$this->options[$key] = get_option( $key, $val );
|
94 |
}
|
155 |
$this->options[$key] = 0;
|
156 |
}
|
157 |
}
|
158 |
+
// Write to custom CSS file:
|
159 |
+
if ($this->options['mr_social_sharing_custom_css'] != '') {
|
160 |
+
$upload = wp_upload_dir();
|
161 |
+
try {
|
162 |
+
if (!@file_put_contents($upload['basedir'].'/social_sharing_custom.css', $this->options['mr_social_sharing_custom_css'])) {
|
163 |
+
throw new Exception(__('Could not write to CSS file, to fix this create a file called "social_sharing_custom.css" in ','mr_social_sharing_toolkit').$upload['basedir'].__('. Make sure the file has read and write permissions.','mr_social_sharing_toolkit'));
|
164 |
+
}
|
165 |
+
} catch (Exception $e) {
|
166 |
+
$this->error = $e->getMessage();
|
167 |
+
}
|
168 |
+
}
|
169 |
}
|
170 |
|
171 |
function plugin_menu() {
|
192 |
$this->save_options($_POST);
|
193 |
echo '
|
194 |
<div class="updated"><p><strong>'.__('Settings saved.','mr_social_sharing_toolkit').'</strong></p></div>';
|
195 |
+
if ($this->error != '') {
|
196 |
+
echo '
|
197 |
+
<div class="error"><p><strong>'.$this->error.'</strong></p></div>';
|
198 |
+
}
|
199 |
+
}
|
200 |
echo '
|
201 |
<div class="wrap">
|
202 |
<form method="post" action="">
|
210 |
<li><a href="#tab_2">'.__('Shortcode','mr_social_sharing_toolkit').'</a><li>
|
211 |
<li><a href="#tab_3">'.__('Share Widget','mr_social_sharing_toolkit').'</a><li>
|
212 |
<li><a href="#tab_4">'.__('Follow Widget','mr_social_sharing_toolkit').'</a><li>
|
213 |
+
<li><a href="#tab_5">'.__('Advanced settings','mr_social_sharing_toolkit').'</a><li>
|
214 |
+
<li><a href="#tab_6">'.__('Custom CSS','mr_social_sharing_toolkit').'</a><li>
|
215 |
</ul>
|
216 |
<div id="tab_0" class="mr_social_sharing_networks">
|
217 |
<h3>'.__('General settings','mr_social_sharing_toolkit').':</h3>
|
356 |
echo ' value="1" /> '.__("Always use the default image", 'mr_social_sharing_toolkit').'</label><br/>
|
357 |
<p><span class="description">'.__("Check this box to always display the default image with your shared content", 'mr_social_sharing_toolkit').'</span></p>
|
358 |
</div>
|
359 |
+
<div id="tab_6" class="mr_social_sharing_networks">
|
360 |
+
<h3>'.__('Custom CSS','mr_social_sharing_toolkit').'</h3>
|
361 |
+
<p>'.__('Enter your custom styles or CSS fixes here','mr_social_sharing_toolkit').'</p>
|
362 |
+
<textarea name="mr_social_sharing_custom_css" id="mr_social_sharing_custom_css">'.$this->options['mr_social_sharing_custom_css'].'</textarea>
|
363 |
+
</div>
|
364 |
</div>
|
365 |
<p class="submit">
|
366 |
<input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
|
383 |
echo '
|
384 |
<ul id="mr_social_sharing_'.$button_type.'networks">';
|
385 |
foreach ($this->options['mr_social_sharing_'.$button_type.'button_order'] as $button) {
|
386 |
+
if (array_key_exists($button, $buttons)) {
|
387 |
+
echo '
|
388 |
<li>
|
389 |
+
<span class="mr_social_sharing_options"><img src="'.plugins_url('/images/icons_small/'.$buttons[$button]['icon'].'.png', __FILE__).'" title="'.$buttons[$button]['title'].'" alt="'.$buttons[$button]['title'].'"/>
|
390 |
<label for="mr_social_sharing_'.$button_type.$button.'"><input type="checkbox" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][enable]" id="mr_social_sharing_'.$button_type.$button.'"';
|
391 |
+
if ($this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['enable'] == 1) { echo ' checked="checked"';}
|
392 |
+
echo ' value="1" />'.$buttons[$button]['title'].'</label>
|
393 |
<img class="right" src="'.plugins_url('/images/move.png', __FILE__).'" title="'.__('Change button order','mr_social_sharing_toolkit').'" alt="'.__('Change button order','mr_social_sharing_toolkit').'"/>';
|
394 |
+
if (is_array($buttons[$button]['types']) && $buttons[$button]['types'][0] != '') {
|
395 |
+
if (count($buttons[$button]['types']) == 1) {
|
396 |
+
echo '
|
397 |
<input type="hidden" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" value="'.$buttons[$button]['types'][0].'"/>';
|
398 |
+
} else {
|
399 |
+
echo '
|
400 |
+
<select name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" id="mr_social_sharing_'.$button_type.$button.'_type" class="mr_social_sharing_type_select">';
|
401 |
+
foreach ($buttons[$button]['types'] as $type) {
|
402 |
+
echo '<option value="'.$type.'"';
|
403 |
+
if ($this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['type'] == $type) { echo ' selected="selected"';}
|
404 |
+
echo '>'.$this->types[$type].'</option>';
|
405 |
+
}
|
406 |
+
echo '</select>';
|
407 |
}
|
408 |
+
} else {
|
409 |
+
echo '
|
|
|
|
|
410 |
<input type="hidden" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" value=""/>';
|
411 |
+
}
|
412 |
+
if (array_key_exists('id', $buttons[$button])) {
|
413 |
+
if (is_array($buttons[$button]['id']) && array_key_exists('label', $buttons[$button]['id']) && array_key_exists('options', $buttons[$button]['id']) && is_array($buttons[$button]['id']['options'])) {
|
414 |
+
echo '
|
415 |
<select name="mr_social_sharing_'.$button_type.'buttons['.$button.'][id]" id="mr_social_sharing_'.$button_type.$button.'_id">';
|
416 |
+
foreach ($buttons[$button]['id']['options'] as $option) {
|
417 |
+
if (array_key_exists('label', $option) && array_key_exists('value', $option)) {
|
418 |
+
echo '<option value="'.$option['value'].'"';
|
419 |
+
if ($option['value'] == $this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['id']) {
|
420 |
+
echo ' selected="selected"';
|
421 |
+
}
|
422 |
+
echo '>'.$option['label'].'</option>';
|
423 |
}
|
|
|
424 |
}
|
425 |
+
echo '</select>';
|
426 |
+
} else {
|
427 |
+
echo '
|
|
|
|
|
428 |
<input type="text" class="text" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][id]" id="mr_social_sharing_'.$button_type.$button.'_id" value="'.$this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['id'].'"/>
|
429 |
<label for="mr_social_sharing_'.$button_type.$button.'_id" class="text">'.$buttons[$button]['id'].'</label>';
|
430 |
+
}
|
431 |
}
|
432 |
+
echo '
|
433 |
+
<input type="hidden" name="mr_social_sharing_'.$button_type.'button_order[]" value="'.$button.'"/></span>
|
434 |
+
<span class="mr_social_sharing_custom"><input type="text" class="text" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][icon]" id="mr_social_sharing_'.$button_type.$button.'_icon" value="'.$this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['icon'].'"/>
|
435 |
+
<label for="mr_social_sharing_'.$button_type.$button.'_icon" class="text">'.__('Custom icon url','mr_social_sharing_toolkit').'</label>
|
436 |
+
|
437 |
+
<input type="text" class="text" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][text]" id="mr_social_sharing_'.$button_type.$button.'_text" value="'.stripslashes($this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['text']).'"/>
|
438 |
+
<label for="mr_social_sharing_'.$button_type.$button.'_text" class="text">'.__('Custom text','mr_social_sharing_toolkit').'</label></span>
|
439 |
+
|
440 |
+
|
441 |
</li>';
|
442 |
+
}
|
443 |
}
|
444 |
echo '
|
445 |
</ul>
|
502 |
/* Output functions */
|
503 |
|
504 |
function print_opengraph() {
|
505 |
+
echo '<!-- Open Graph tags provided by Social Sharing Toolkit v2.0.9 -->
|
506 |
<meta property="og:locale" content="'.str_replace('-', '_', get_bloginfo('language')).'"/>';
|
507 |
if (is_single() || is_page()) {
|
508 |
$excerpt = get_the_excerpt();
|
558 |
<meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>';
|
559 |
}
|
560 |
}
|
561 |
+
}
|
|
|
562 |
|
563 |
function prepare_styles() {
|
564 |
wp_enqueue_style('mr_social_sharing', plugins_url('/style.css', __FILE__));
|
565 |
+
$upload = wp_upload_dir();
|
566 |
+
if (file_exists($upload['basedir'].'/social_sharing_custom.css') && $this->options['mr_social_sharing_custom_css'] != '') {
|
567 |
+
wp_enqueue_style('mr_social_sharing_custom', $upload['baseurl'].'/social_sharing_custom.css');
|
568 |
+
}
|
569 |
}
|
570 |
|
571 |
+
function prepare_scripts() {
|
|
|
572 |
if ($this->options['mr_social_sharing_no_follow'] == 1) {
|
573 |
if ($this->options['mr_social_sharing_js_footer'] == 1) {
|
574 |
wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow.js', __FILE__), array('jquery'), false, true);
|
581 |
} else {
|
582 |
wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery'));
|
583 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
}
|
585 |
}
|
586 |
|
587 |
+
function create_bookmarks($url = '', $title = '', $type = '', $media = '', $description = '') {
|
588 |
$url = trim($url);
|
589 |
$title = trim($title);
|
590 |
$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
|
593 |
}
|
594 |
$bookmarks = '
|
595 |
<div class="mr_social_sharing_wrapper">
|
596 |
+
<!-- Social Sharing Toolkit v2.0.9 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->';
|
597 |
foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) {
|
598 |
if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) {
|
599 |
+
$id = (array_key_exists('id', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['id'] : '';
|
600 |
+
$text = (array_key_exists('text', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? stripslashes($this->options['mr_social_sharing_'.$type.'buttons'][$button]['text']) : '';
|
601 |
+
$icon = (array_key_exists('icon', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['icon'] : '';
|
602 |
+
$bookmarks .= $this->get_bookmark_button($button, $url, $title, $this->options['mr_social_sharing_'.$type.'buttons'][$button]['type'], $this->options['mr_social_sharing_'.$type.'display'], $this->options['mr_social_sharing_'.$type.'align'], $id, $media, $description, $text, $icon);
|
603 |
}
|
604 |
}
|
605 |
$bookmarks .= '</div>';
|
611 |
function create_followers() {
|
612 |
$followers = '
|
613 |
<div class="mr_social_sharing_wrapper">
|
614 |
+
<!-- Social Sharing Toolkit v2.0.9 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->';
|
615 |
foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
|
616 |
if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) {
|
617 |
+
$id = (array_key_exists('id', $this->options['mr_social_sharing_follow_buttons'][$button])) ? $this->options['mr_social_sharing_follow_buttons'][$button]['id'] : '';
|
618 |
+
$text = (array_key_exists('text', $this->options['mr_social_sharing_follow_buttons'][$button])) ? stripslashes($this->options['mr_social_sharing_follow_buttons'][$button]['text']) : '';
|
619 |
+
$icon = (array_key_exists('icon', $this->options['mr_social_sharing_follow_buttons'][$button])) ? $this->options['mr_social_sharing_follow_buttons'][$button]['icon'] : '';
|
620 |
+
$followers .= $this->get_follow_button($button, $this->options['mr_social_sharing_follow_buttons'][$button]['type'], $this->options['mr_social_sharing_follow_display'], $this->options['mr_social_sharing_follow_align'], $id, $text, $icon);
|
621 |
}
|
622 |
}
|
623 |
$followers .= '</div>';
|
625 |
return $followers;
|
626 |
}
|
627 |
|
628 |
+
function get_bookmark_button($button, $url, $title, $type, $display = 'span', $align = '', $id = '', $media = '', $description = '', $text = '', $icon = '') {
|
629 |
+
$retval = '';
|
630 |
if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
|
631 |
$retval = '</div><div class="mr_social_sharing_wrapper">';
|
632 |
} else {
|
633 |
+
foreach ($this->buttons as $tmp) {
|
634 |
+
if (method_exists($tmp, $button)) {
|
635 |
+
$retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$tmp->$button($url, $title, $type, $id, $media, $description, $text, $icon).'</'.$display.'>';
|
|
|
|
|
636 |
}
|
637 |
}
|
|
|
|
|
638 |
}
|
639 |
return $retval;
|
640 |
}
|
641 |
|
642 |
+
function get_follow_button($button, $type, $display = 'span', $align = '', $id = '', $text = '', $icon = '') {
|
643 |
+
$retval = '';
|
644 |
if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
|
645 |
$retval = '</div><div class="mr_social_sharing_wrapper">';
|
646 |
} else {
|
647 |
+
foreach ($this->buttons as $tmp) {
|
648 |
+
if (method_exists($tmp, $button)) {
|
649 |
+
$retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$tmp->$button($type, $id, $text, $icon).'</'.$display.'>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
}
|
651 |
}
|
652 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
return $retval;
|
654 |
}
|
655 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
function should_print_opengraph() {
|
657 |
if ($this->options['mr_social_sharing_opengraph']['enable'] == 1) {
|
658 |
return true;
|
660 |
}
|
661 |
|
662 |
function should_share_content() {
|
663 |
+
if ($this->options['mr_social_sharing_position'] != 'none') {
|
664 |
return true;
|
665 |
}
|
666 |
return false;
|
667 |
}
|
668 |
|
669 |
function should_share_excerpt() {
|
670 |
+
if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_include_excerpts'] == 1) {
|
671 |
return true;
|
672 |
}
|
673 |
return false;
|
674 |
}
|
675 |
|
676 |
function share($content) {
|
677 |
+
if (is_feed()) {
|
678 |
+
return $content;
|
|
|
679 |
} else {
|
680 |
+
$media = '';
|
681 |
+
if ($this->options['mr_social_sharing_pinterest']['default_image'] != '' && $this->options['mr_social_sharing_pinterest']['fixed_image'] == 1) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
682 |
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
683 |
+
} else {
|
684 |
+
if (current_theme_supports('post-thumbnails')) {
|
685 |
+
if ($media = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()))) {
|
686 |
+
if (is_array($media)) {
|
687 |
+
$media = $media[0];
|
688 |
+
} else {
|
689 |
+
$media = '';
|
690 |
+
}
|
691 |
+
}
|
692 |
+
}
|
693 |
+
if ($media == '') {
|
694 |
+
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
|
695 |
+
$img = $matches[1][0];
|
696 |
+
if($img != '') {
|
697 |
+
$media = $img;
|
698 |
+
}
|
699 |
+
}
|
700 |
+
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
701 |
+
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
702 |
+
}
|
703 |
}
|
704 |
+
$type = get_post_type();
|
705 |
+
if (in_array($type, $this->options['mr_social_sharing_types']) && ((is_single() || $this->options['mr_social_sharing_include_excerpts'] == 1) || $type == 'page')) {
|
706 |
+
if ($this->options['mr_social_sharing_position'] == 'top') {
|
707 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), '', $media, '');
|
708 |
+
$content = $bookmarks.$content;
|
709 |
+
}
|
710 |
+
if ($this->options['mr_social_sharing_position'] == 'bottom') {
|
711 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), '', $media, '');
|
712 |
+
$content .= $bookmarks;
|
713 |
+
}
|
714 |
+
if ($this->options['mr_social_sharing_position'] == 'both') {
|
715 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), '', $media, '');
|
716 |
+
$content = $bookmarks.$content.$bookmarks;
|
717 |
+
}
|
718 |
}
|
719 |
+
return $content;
|
720 |
}
|
|
|
721 |
}
|
722 |
|
723 |
function share_excerpt($content) {
|
724 |
+
if (is_feed()) {
|
725 |
+
return $content;
|
|
|
726 |
} else {
|
727 |
+
$media = '';
|
728 |
+
if ($this->options['mr_social_sharing_pinterest']['default_image'] != '' && $this->options['mr_social_sharing_pinterest']['fixed_image'] == 1) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
729 |
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
730 |
+
} else {
|
731 |
+
if (current_theme_supports('post-thumbnails')) {
|
732 |
+
if ($media = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()))) {
|
733 |
+
if (is_array($media)) {
|
734 |
+
$media = $media[0];
|
735 |
+
} else {
|
736 |
+
$media = '';
|
737 |
+
}
|
738 |
+
}
|
739 |
+
}
|
740 |
+
if ($media == '') {
|
741 |
+
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
|
742 |
+
$img = $matches[1][0];
|
743 |
+
if($img != '') {
|
744 |
+
$media = $img;
|
745 |
+
}
|
746 |
+
}
|
747 |
+
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
748 |
+
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
749 |
+
}
|
750 |
}
|
751 |
+
$type = get_post_type();
|
752 |
+
if (in_array($type, $this->options['mr_social_sharing_types'])) {
|
753 |
+
if ($this->options['mr_social_sharing_position'] == 'top') {
|
754 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), '', $media, '');
|
755 |
+
$content = $bookmarks.$content;
|
756 |
+
}
|
757 |
+
if ($this->options['mr_social_sharing_position'] == 'bottom') {
|
758 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), '', $media, '');
|
759 |
+
$content .= $bookmarks;
|
760 |
+
}
|
761 |
+
if ($this->options['mr_social_sharing_position'] == 'both') {
|
762 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), '', $media, '');
|
763 |
+
$content = $bookmarks.$content.$bookmarks;
|
764 |
+
}
|
765 |
}
|
766 |
+
return $content;
|
767 |
}
|
|
|
768 |
}
|
769 |
|
770 |
function should_use_shortcode() {
|
771 |
+
if ($this->options['mr_social_sharing_enable_shortcode'] == 1) {
|
772 |
return true;
|
773 |
}
|
774 |
return false;
|
775 |
}
|
776 |
|
777 |
function share_shortcode() {
|
778 |
+
if (is_feed()) {
|
779 |
+
return '';
|
|
|
780 |
} else {
|
781 |
+
$media = '';
|
782 |
+
if ($this->options['mr_social_sharing_pinterest']['default_image'] != '' && $this->options['mr_social_sharing_pinterest']['fixed_image'] == 1) {
|
783 |
+
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
784 |
+
} else {
|
785 |
+
if (current_theme_supports('post-thumbnails')) {
|
786 |
+
if ($media = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()))) {
|
787 |
+
if (is_array($media)) {
|
788 |
+
$media = $media[0];
|
789 |
+
} else {
|
790 |
+
$media = '';
|
791 |
+
}
|
792 |
+
}
|
793 |
+
}
|
794 |
+
if ($media == '') {
|
795 |
+
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', get_the_content(), $matches);
|
796 |
+
$img = $matches[1][0];
|
797 |
+
if($img != '') {
|
798 |
+
$media = $img;
|
799 |
+
}
|
800 |
+
}
|
801 |
+
if ($media == '' && $this->options['mr_social_sharing_pinterest']['default_image'] != '') {
|
802 |
+
$media = $this->options['mr_social_sharing_pinterest']['default_image'];
|
803 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
}
|
805 |
+
$type = get_post_type();
|
806 |
+
$bookmarks = '';
|
807 |
+
if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && ((is_single() || $type == 'page') || $this->options['mr_social_sharing_include_excerpts'] == 1)) {
|
808 |
+
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), 'shortcode_', $media, '');
|
809 |
}
|
810 |
+
return $bookmarks;
|
811 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
812 |
}
|
813 |
|
814 |
function should_linkify_content() {
|
844 |
return $content;
|
845 |
}
|
846 |
}
|
847 |
+
require 'includes/class.button.php';
|
848 |
+
$buttons = glob(dirname(__FILE__).'/includes/buttons/button.*.php');
|
849 |
+
if (is_array($buttons) && count($buttons) > 0) {
|
850 |
+
foreach ($buttons as $button) {
|
851 |
+
include str_replace(dirname(__FILE__).'/', '', $button);
|
852 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
853 |
}
|
854 |
+
unset($buttons);
|
|
|
|
|
|
|
|
|
|
|
855 |
|
856 |
+
//global $MR_Social_Sharing_Toolkit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
857 |
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
|
858 |
+
add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu'));
|
859 |
add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles'));
|
860 |
add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts'));
|
861 |
if ($MR_Social_Sharing_Toolkit->should_print_opengraph()) {
|
876 |
if ($MR_Social_Sharing_Toolkit->should_use_shortcode()) {
|
877 |
add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode'));
|
878 |
}
|
879 |
+
include 'includes/share.widget.php';
|
880 |
+
include 'includes/follow.widget.php';
|
881 |
+
?>
|
|
|
|