Version Description
- Bug fixes.
Download this release
Release Info
Developer | linksalpha |
Plugin | Social Sharing Toolkit |
Version | 2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2 to 2.3
- includes/buttons/button.linkedin.php +4 -4
- includes/buttons/button.linksalpha.php +1 -1
- readme.txt +20 -17
- social_sharing_toolkit.php +33 -33
includes/buttons/button.linkedin.php
CHANGED
@@ -8,7 +8,7 @@ class MR_Social_Sharing_Toolkit_Linkedin extends MR_Social_Sharing_Toolkit_Butto
|
|
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':
|
@@ -34,21 +34,21 @@ class MR_Social_Sharing_Toolkit_Linkedin extends MR_Social_Sharing_Toolkit_Butto
|
|
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 |
$blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false;
|
42 |
return $this->get_icon($type, $url, $text, $icon, false, $blank);
|
43 |
}
|
44 |
-
|
45 |
function follow_linked_co($type, $id, $text = '', $icon = '') {
|
46 |
$url = 'http://www.linkedin.com/company/'.$id;
|
47 |
$text = ($text == '') ? __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
48 |
$blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false;
|
49 |
return $this->get_icon($type, $url, $text, $icon, false, $blank);
|
50 |
}
|
51 |
-
|
52 |
function follow_linked_group($type, $id, $text = '', $icon = '') {
|
53 |
$url = 'http://www.linkedin.com/groups?gid='.$id;
|
54 |
$text = ($text == '') ? __('Join my group on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
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':
|
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 |
$blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false;
|
42 |
return $this->get_icon($type, $url, $text, $icon, false, $blank);
|
43 |
}
|
44 |
+
|
45 |
function follow_linked_co($type, $id, $text = '', $icon = '') {
|
46 |
$url = 'http://www.linkedin.com/company/'.$id;
|
47 |
$text = ($text == '') ? __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
48 |
$blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false;
|
49 |
return $this->get_icon($type, $url, $text, $icon, false, $blank);
|
50 |
}
|
51 |
+
|
52 |
function follow_linked_group($type, $id, $text = '', $icon = '') {
|
53 |
$url = 'http://www.linkedin.com/groups?gid='.$id;
|
54 |
$text = ($text == '') ? __('Join my group on','mr_social_sharing_toolkit').' LinkedIn' : $text;
|
includes/buttons/button.linksalpha.php
CHANGED
@@ -22,7 +22,7 @@ class MR_Social_Sharing_Toolkit_LinksAlpha extends MR_Social_Sharing_Toolkit_But
|
|
22 |
}
|
23 |
$retval = '<a class="linksalpha_button linksalpha_link" href="//www.linksalpha.com/social/mobile" data-url="'.$url.'" data-text="'.$title.'" data-desc="'.$description.'" data-image="'.$media.'" data-button="'.$type.'">
|
24 |
<img src="//www.linksalpha.com/images/'.$image.'" alt="Share" class="linksalpha_image" />
|
25 |
-
</a><script type="text/javascript" src="//www.linksalpha.com/
|
26 |
return $retval;
|
27 |
}
|
28 |
}
|
22 |
}
|
23 |
$retval = '<a class="linksalpha_button linksalpha_link" href="//www.linksalpha.com/social/mobile" data-url="'.$url.'" data-text="'.$title.'" data-desc="'.$description.'" data-image="'.$media.'" data-button="'.$type.'">
|
24 |
<img src="//www.linksalpha.com/images/'.$image.'" alt="Share" class="linksalpha_image" />
|
25 |
+
</a><script type="text/javascript" src="//www.linksalpha.com/scripts/loader_iconbox.js?v=2.3"></script>';
|
26 |
return $retval;
|
27 |
}
|
28 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: linksalpha
|
3 |
Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, App.net, mail, Gmail, AOL, Evernote, Hotmail, Instapaper, Mail.ru, Pocket, Sonico, vkontakte, Weibo, Yahoo Mail, Yammer, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
|
@@ -42,7 +42,7 @@ The plugin currently supports the following networks for sharing your content:
|
|
42 |
|
43 |
On Tweet button you can specify a Twitter handle which is then appended to the tweet a visitor sends (like "... via @WordPress"). An email send button is also included.
|
44 |
|
45 |
-
You can decide which networks to support on your blog, where the buttons will appear (either above or below the content). Through drag and drop you can easily change the order in which the buttons appear.
|
46 |
|
47 |
For each button you can choose a different type (not all types are available for each button):
|
48 |
|
@@ -55,14 +55,14 @@ For each button you can choose a different type (not all types are available for
|
|
55 |
* medium icon with text
|
56 |
* large icon
|
57 |
|
58 |
-
You can also choose the orientation of the buttons:
|
59 |
|
60 |
* horizontal (buttons are placed side by side)
|
61 |
-
* vertical (buttons are placed below each other)
|
62 |
|
63 |
-
= Divider =
|
64 |
|
65 |
-
In version 2.0.4 three dividers were added to each list. These might be useful in ordering the buttons, especially in the case of varying button types used with a horizontal orientation. A divider will split the element containing the buttons in two, allowing for more customization.
|
66 |
|
67 |
= Shortcode =
|
68 |
|
@@ -74,7 +74,7 @@ Since version 2.1.2: Use one or both of the url and title attributes to override
|
|
74 |
|
75 |
The widget has it's own list of buttons with the same possibilities as the list for posts & pages. You can however specify a fixed title and url to use for the buttons in the widget.
|
76 |
|
77 |
-
= Follow Widget =
|
78 |
|
79 |
Since version 2.0.0 an extra widget is added with the possibility to provide easy links to your profiles on other social networks.
|
80 |
|
@@ -108,11 +108,11 @@ A button for an RSS feed is also included. Of course the type, order and orienta
|
|
108 |
* medium icon with text
|
109 |
* large icon
|
110 |
|
111 |
-
To use a button you must enter your user / profile id or username for the network. To use the RSS feed button you must enter the full url.
|
112 |
|
113 |
= Automatic Twitter links =
|
114 |
|
115 |
-
This plugin also includes a configurable & improved version of my earlier Automatic Twitter Links plugin. You can decide if you want to convert Twitter names and/or hashtags to links.
|
116 |
Twitter names will link to their Twitter profile and hashtags will link to the Twitter search page.
|
117 |
|
118 |
= Bitly =
|
@@ -121,7 +121,7 @@ Since version 2.0.5 the plugin has the option to use bitly to shorten the urls f
|
|
121 |
|
122 |
= Pinterest =
|
123 |
|
124 |
-
Since version 2.0.5 the plugin has the option to show Pinterest buttons. The plugin tries to find the featured image or first image in the content if available. If no image is available the button is omitted.
|
125 |
Since version 2.0.7 is is possible to enter the URL of a default image to use in case no image was found. You can also set the plugin to always use the default image regardless of any available images.
|
126 |
|
127 |
= Open Graph =
|
@@ -159,7 +159,7 @@ To display the follow buttons somewhere else you can use the following code:
|
|
159 |
echo $social_sharing_toolkit->create_followers();
|
160 |
?>`
|
161 |
|
162 |
-
= The LinkedIn follow link doesn't seem right =
|
163 |
|
164 |
You may need to setup you custom public profile url. To do so, use the following steps:
|
165 |
1. When signed in to LinkedIn, Go to Edit Profile
|
@@ -178,11 +178,14 @@ Upload the Social Sharing Toolkit plugin to the `/wp-content/plugins/` folder on
|
|
178 |
== Screenshots ==
|
179 |
|
180 |
1. Plugin configuration: General settings
|
181 |
-
2. Plugin configuration: Content, Shortcode and Share Widget have the same options
|
182 |
3. Advanced settings with bitly, Pinterest and Open Graph options
|
183 |
|
184 |
== Upgrade Notice ==
|
185 |
|
|
|
|
|
|
|
186 |
= 2.2 =
|
187 |
* Added option to select image size available for sharing if featured image is set.
|
188 |
* Add new button to enable sharing on more services, including Gmail, AOL, Evernote, Hotmail, Instapaper, Mail.ru, Pocket, Sonico, vkontakte, Weibo, Yahoo Mail, and Yammer.
|
@@ -310,7 +313,7 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
|
|
310 |
* Included an option to specify a default image for the Pinterest button
|
311 |
* Fixed some major issues with shortcodes and excerpts
|
312 |
|
313 |
-
= 2.0.6 =
|
314 |
* Fixed buttons not appearing on pages
|
315 |
* Fixed Pinterest issue
|
316 |
|
@@ -374,11 +377,11 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
|
|
374 |
* Added feature to choose if buttons display in excerpts (doesn't work on some themes)
|
375 |
|
376 |
= 1.3.0 =
|
377 |
-
* Added feature to display buttons only on posts, only on pages or on posts and pages
|
378 |
* Improved hashtag to link conversion
|
379 |
* Fixed Facebook language to en_US to prevent width issues
|
380 |
* Fixed excerpt issue
|
381 |
-
* Fixed some css issues
|
382 |
|
383 |
= 1.2.5 =
|
384 |
* Added title field to widget
|
@@ -391,7 +394,7 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
|
|
391 |
* Added widget
|
392 |
|
393 |
= 1.0.1 =
|
394 |
-
* Fixed unexpected printing of the page title
|
395 |
|
396 |
= 1.0.0 =
|
397 |
* First version
|
2 |
Contributors: linksalpha
|
3 |
Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, App.net, mail, Gmail, AOL, Evernote, Hotmail, Instapaper, Mail.ru, Pocket, Sonico, vkontakte, Weibo, Yahoo Mail, Yammer, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 3.9.1
|
6 |
+
Stable tag: 2.3
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
|
42 |
|
43 |
On Tweet button you can specify a Twitter handle which is then appended to the tweet a visitor sends (like "... via @WordPress"). An email send button is also included.
|
44 |
|
45 |
+
You can decide which networks to support on your blog, where the buttons will appear (either above or below the content). Through drag and drop you can easily change the order in which the buttons appear.
|
46 |
|
47 |
For each button you can choose a different type (not all types are available for each button):
|
48 |
|
55 |
* medium icon with text
|
56 |
* large icon
|
57 |
|
58 |
+
You can also choose the orientation of the buttons:
|
59 |
|
60 |
* horizontal (buttons are placed side by side)
|
61 |
+
* vertical (buttons are placed below each other)
|
62 |
|
63 |
+
= Divider =
|
64 |
|
65 |
+
In version 2.0.4 three dividers were added to each list. These might be useful in ordering the buttons, especially in the case of varying button types used with a horizontal orientation. A divider will split the element containing the buttons in two, allowing for more customization.
|
66 |
|
67 |
= Shortcode =
|
68 |
|
74 |
|
75 |
The widget has it's own list of buttons with the same possibilities as the list for posts & pages. You can however specify a fixed title and url to use for the buttons in the widget.
|
76 |
|
77 |
+
= Follow Widget =
|
78 |
|
79 |
Since version 2.0.0 an extra widget is added with the possibility to provide easy links to your profiles on other social networks.
|
80 |
|
108 |
* medium icon with text
|
109 |
* large icon
|
110 |
|
111 |
+
To use a button you must enter your user / profile id or username for the network. To use the RSS feed button you must enter the full url.
|
112 |
|
113 |
= Automatic Twitter links =
|
114 |
|
115 |
+
This plugin also includes a configurable & improved version of my earlier Automatic Twitter Links plugin. You can decide if you want to convert Twitter names and/or hashtags to links.
|
116 |
Twitter names will link to their Twitter profile and hashtags will link to the Twitter search page.
|
117 |
|
118 |
= Bitly =
|
121 |
|
122 |
= Pinterest =
|
123 |
|
124 |
+
Since version 2.0.5 the plugin has the option to show Pinterest buttons. The plugin tries to find the featured image or first image in the content if available. If no image is available the button is omitted.
|
125 |
Since version 2.0.7 is is possible to enter the URL of a default image to use in case no image was found. You can also set the plugin to always use the default image regardless of any available images.
|
126 |
|
127 |
= Open Graph =
|
159 |
echo $social_sharing_toolkit->create_followers();
|
160 |
?>`
|
161 |
|
162 |
+
= The LinkedIn follow link doesn't seem right =
|
163 |
|
164 |
You may need to setup you custom public profile url. To do so, use the following steps:
|
165 |
1. When signed in to LinkedIn, Go to Edit Profile
|
178 |
== Screenshots ==
|
179 |
|
180 |
1. Plugin configuration: General settings
|
181 |
+
2. Plugin configuration: Content, Shortcode and Share Widget have the same options
|
182 |
3. Advanced settings with bitly, Pinterest and Open Graph options
|
183 |
|
184 |
== Upgrade Notice ==
|
185 |
|
186 |
+
= 2.3 =
|
187 |
+
* Bug fixes.
|
188 |
+
|
189 |
= 2.2 =
|
190 |
* Added option to select image size available for sharing if featured image is set.
|
191 |
* Add new button to enable sharing on more services, including Gmail, AOL, Evernote, Hotmail, Instapaper, Mail.ru, Pocket, Sonico, vkontakte, Weibo, Yahoo Mail, and Yammer.
|
313 |
* Included an option to specify a default image for the Pinterest button
|
314 |
* Fixed some major issues with shortcodes and excerpts
|
315 |
|
316 |
+
= 2.0.6 =
|
317 |
* Fixed buttons not appearing on pages
|
318 |
* Fixed Pinterest issue
|
319 |
|
377 |
* Added feature to choose if buttons display in excerpts (doesn't work on some themes)
|
378 |
|
379 |
= 1.3.0 =
|
380 |
+
* Added feature to display buttons only on posts, only on pages or on posts and pages
|
381 |
* Improved hashtag to link conversion
|
382 |
* Fixed Facebook language to en_US to prevent width issues
|
383 |
* Fixed excerpt issue
|
384 |
+
* Fixed some css issues
|
385 |
|
386 |
= 1.2.5 =
|
387 |
* Added title field to widget
|
394 |
* Added widget
|
395 |
|
396 |
= 1.0.1 =
|
397 |
+
* Fixed unexpected printing of the page title
|
398 |
|
399 |
= 1.0.0 =
|
400 |
* First version
|
social_sharing_toolkit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Social Sharing Toolkit
|
4 |
Plugin URI: http://wordpress.org/plugins/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.
|
7 |
Author: linksalpha
|
8 |
Author URI: http://www.linksalpha.com
|
9 |
*/
|
@@ -254,16 +254,16 @@ class MR_Social_Sharing_Toolkit {
|
|
254 |
<form method="post" action="">
|
255 |
<input type="hidden" name="mr_social_sharing_save_options" value="Y"/>
|
256 |
<h2>Social Sharing Toolkit</h2>
|
257 |
-
|
258 |
<div id="mr_social_sharing_tabs">
|
259 |
-
<ul class="tabs">
|
260 |
<li><a href="#tab_0">' . __('General settings', 'mr_social_sharing_toolkit') . '</a><li>
|
261 |
<li><a href="#tab_1">' . __('Content', 'mr_social_sharing_toolkit') . '</a><li>
|
262 |
<li><a href="#tab_2">' . __('Shortcode', 'mr_social_sharing_toolkit') . '</a><li>
|
263 |
<li><a href="#tab_3">' . __('Share Widget', 'mr_social_sharing_toolkit') . '</a><li>
|
264 |
<li><a href="#tab_4">' . __('Follow Widget', 'mr_social_sharing_toolkit') . '</a><li>
|
265 |
<li><a href="#tab_5">' . __('Advanced settings', 'mr_social_sharing_toolkit') . '</a><li>
|
266 |
-
<li><a href="#tab_6">' . __('Custom CSS', 'mr_social_sharing_toolkit') . '</a><li>
|
267 |
</ul>
|
268 |
<div id="tab_0" class="mr_social_sharing_networks">
|
269 |
<h3>' . __('General settings', 'mr_social_sharing_toolkit') . ':</h3>
|
@@ -271,7 +271,7 @@ class MR_Social_Sharing_Toolkit {
|
|
271 |
if ($this -> options['mr_social_sharing_js_footer'] == 1) { echo ' checked="checked"';
|
272 |
}
|
273 |
echo ' value="1" /> ' . __('Load JavaScript in footer', 'mr_social_sharing_toolkit') . '</label>
|
274 |
-
|
275 |
<p>
|
276 |
<span class="description"> ' . __('Improves performance but may not work on some themes', 'mr_social_sharing_toolkit') . '</span>
|
277 |
</p>
|
@@ -330,7 +330,7 @@ class MR_Social_Sharing_Toolkit {
|
|
330 |
' . __('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).', 'mr_social_sharing_toolkit') . '
|
331 |
</p>';
|
332 |
$this -> showListAdmin($this -> share_buttons);
|
333 |
-
echo '
|
334 |
</div>
|
335 |
<div id="tab_2" class="mr_social_sharing_networks">
|
336 |
<h3>' . __('Shortcode', 'mr_social_sharing_toolkit') . '</h3>
|
@@ -338,7 +338,7 @@ class MR_Social_Sharing_Toolkit {
|
|
338 |
' . __('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).', 'mr_social_sharing_toolkit') . '
|
339 |
</p>';
|
340 |
$this -> showListAdmin($this -> share_buttons, 'shortcode_');
|
341 |
-
echo '
|
342 |
</div>
|
343 |
<div id="tab_3" class="mr_social_sharing_networks">
|
344 |
<h3>' . __('Share Widget', 'mr_social_sharing_toolkit') . '</h3>
|
@@ -365,10 +365,10 @@ class MR_Social_Sharing_Toolkit {
|
|
365 |
<label for="mr_social_sharing_follow_new" class="check"><input type="checkbox" name="mr_social_sharing_follow_new" id="mr_social_sharing_follow_new"';
|
366 |
if ($this -> options['mr_social_sharing_follow_new'] == 1) { echo ' checked="checked"';
|
367 |
}
|
368 |
-
echo ' value="1" /> ' . __("Open links in new window or tab", 'mr_social_sharing_toolkit') . '</label>
|
369 |
</div>
|
370 |
<div id="tab_5" class="mr_social_sharing_networks">
|
371 |
-
<h3>' . __('Advanced settings', 'mr_social_sharing_toolkit') . '</h3>
|
372 |
<h4>' . __('Automatic Twitter links', 'mr_social_sharing_toolkit') . '</h4>
|
373 |
<p>' . __('Select what you want to convert:', 'mr_social_sharing_toolkit') . '</p>
|
374 |
<label for="mr_social_sharing_twitter_handles" class="check"><input type="checkbox" name="mr_social_sharing_twitter_handles" id="mr_social_sharing_twitter_handles"';
|
@@ -392,7 +392,7 @@ class MR_Social_Sharing_Toolkit {
|
|
392 |
if ($this -> options['mr_social_sharing_linkify_new'] == 1) { echo ' checked="checked"';
|
393 |
}
|
394 |
echo ' value="1" /> ' . __("Open links in new window or tab", 'mr_social_sharing_toolkit') . '</label>';
|
395 |
-
|
396 |
// Image Size
|
397 |
echo '<h4>' . __('Image Size', 'mr_social_sharing_toolkit') . '</h4>
|
398 |
<p>' . __('Select the image size to be used while sharing', 'mr_social_sharing_toolkit') . '</p>
|
@@ -410,8 +410,8 @@ class MR_Social_Sharing_Toolkit {
|
|
410 |
if ($this -> options['mr_social_sharing_attachment_image_size'] == 'full') { echo ' selected="selected"';}
|
411 |
echo '>' . __('Full', 'mr_social_sharing_toolkit') . '</option>
|
412 |
</select></label><br/><br/>';
|
413 |
-
|
414 |
-
// Bitly
|
415 |
echo '<h4>' . __('Bitly', 'mr_social_sharing_toolkit') . '</h4>
|
416 |
<p>' . __('Use Bitly url shortening for the tweet button', 'mr_social_sharing_toolkit') . '</p>
|
417 |
<label for="mr_social_sharing_bitly_enable" class="check"><input type="checkbox" name="mr_social_sharing_bitly[enable]" id="mr_social_sharing_bitly_enable"';
|
@@ -444,7 +444,7 @@ class MR_Social_Sharing_Toolkit {
|
|
444 |
if (isset($this -> options['mr_social_sharing_opengraph']['fixed_image']) && $this -> options['mr_social_sharing_opengraph']['fixed_image'] == 1) { echo ' checked="checked"';
|
445 |
}
|
446 |
echo ' value="1" /> ' . __("Always use the default image", 'mr_social_sharing_toolkit') . '</label><br/>
|
447 |
-
<p><span class="description">' . __("Check this box to always display the default image with your shared content", 'mr_social_sharing_toolkit') . '</span></p>
|
448 |
</div>
|
449 |
<div id="tab_6" class="mr_social_sharing_networks">
|
450 |
<h3>' . __('Custom CSS', 'mr_social_sharing_toolkit') . '</h3>
|
@@ -477,7 +477,7 @@ class MR_Social_Sharing_Toolkit {
|
|
477 |
<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') . '"/>';
|
478 |
if (is_array($buttons[$button]['types']) && $buttons[$button]['types'][0] != '') {
|
479 |
if (count($buttons[$button]['types']) == 1) {
|
480 |
-
echo '
|
481 |
<input type="hidden" name="mr_social_sharing_' . $button_type . 'buttons[' . $button . '][type]" value="' . $buttons[$button]['types'][0] . '"/>';
|
482 |
} else {
|
483 |
echo '
|
@@ -491,7 +491,7 @@ class MR_Social_Sharing_Toolkit {
|
|
491 |
echo '</select>';
|
492 |
}
|
493 |
} else {
|
494 |
-
echo '
|
495 |
<input type="hidden" name="mr_social_sharing_' . $button_type . 'buttons[' . $button . '][type]" value=""/>';
|
496 |
}
|
497 |
if (array_key_exists('id', $buttons[$button])) {
|
@@ -518,11 +518,11 @@ class MR_Social_Sharing_Toolkit {
|
|
518 |
<input type="hidden" name="mr_social_sharing_' . $button_type . 'button_order[]" value="' . $button . '"/></span>
|
519 |
<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'] . '"/>
|
520 |
<label for="mr_social_sharing_' . $button_type . $button . '_icon" class="text">' . __('Custom icon url', 'mr_social_sharing_toolkit') . '</label>
|
521 |
-
|
522 |
<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']) . '"/>
|
523 |
<label for="mr_social_sharing_' . $button_type . $button . '_text" class="text">' . __('Custom text', 'mr_social_sharing_toolkit') . '</label></span>
|
524 |
-
|
525 |
-
|
526 |
</li>';
|
527 |
}
|
528 |
}
|
@@ -585,14 +585,14 @@ class MR_Social_Sharing_Toolkit {
|
|
585 |
<meta property="og:site_name" content="' . get_bloginfo('name') . '"/>';
|
586 |
if (isset($this -> options['mr_social_sharing_opengraph']['fixed_image']) && $this -> options['mr_social_sharing_opengraph']['fixed_image']) {
|
587 |
if ($this -> options['mr_social_sharing_opengraph']['default_image'] != '') {
|
588 |
-
echo '
|
589 |
<meta property="og:image" content="' . $this -> options['mr_social_sharing_opengraph']['default_image'] . '"/>';
|
590 |
}
|
591 |
} else {
|
592 |
$media = '';
|
593 |
if (current_theme_supports('post-thumbnails')) {
|
594 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
595 |
-
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
596 |
} else {
|
597 |
$image_size = 'thumbnail';
|
598 |
}
|
@@ -612,10 +612,10 @@ class MR_Social_Sharing_Toolkit {
|
|
612 |
}
|
613 |
}
|
614 |
if ($media != '') {
|
615 |
-
echo '
|
616 |
<meta property="og:image" content="' . $media . '"/>';
|
617 |
} elseif ($this -> options['mr_social_sharing_opengraph']['default_image'] != '') {
|
618 |
-
echo '
|
619 |
<meta property="og:image" content="' . $this -> options['mr_social_sharing_opengraph']['default_image'] . '"/>';
|
620 |
}
|
621 |
}
|
@@ -797,7 +797,7 @@ class MR_Social_Sharing_Toolkit {
|
|
797 |
} else {
|
798 |
if (current_theme_supports('post-thumbnails')) {
|
799 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
800 |
-
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
801 |
} else {
|
802 |
$image_size = 'thumbnail';
|
803 |
}
|
@@ -850,7 +850,7 @@ class MR_Social_Sharing_Toolkit {
|
|
850 |
} else {
|
851 |
if (current_theme_supports('post-thumbnails')) {
|
852 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
853 |
-
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
854 |
} else {
|
855 |
$image_size = 'thumbnail';
|
856 |
}
|
@@ -903,7 +903,7 @@ class MR_Social_Sharing_Toolkit {
|
|
903 |
} else {
|
904 |
if (current_theme_supports('post-thumbnails')) {
|
905 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
906 |
-
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
907 |
} else {
|
908 |
$image_size = 'thumbnail';
|
909 |
}
|
@@ -983,7 +983,7 @@ class MR_Social_Sharing_Toolkit {
|
|
983 |
$text = trim($text);
|
984 |
return $text;
|
985 |
}
|
986 |
-
|
987 |
function smart_truncate($string, $required_length) {
|
988 |
$parts = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE);
|
989 |
$parts_count = count($parts);
|
@@ -997,7 +997,7 @@ class MR_Social_Sharing_Toolkit {
|
|
997 |
}
|
998 |
return implode(array_slice($parts, 0, $last_part));
|
999 |
}
|
1000 |
-
|
1001 |
function prepare_string($string, $string_length) {
|
1002 |
$final_string = '';
|
1003 |
$utf8marker = chr(128);
|
@@ -1030,13 +1030,13 @@ if (is_array($buttons) && count($buttons) > 0) {
|
|
1030 |
unset($buttons);
|
1031 |
|
1032 |
define('MR_Social_Sharing_Toolkit_Admin_URL', "options-general.php?page=mr_social_sharing");
|
1033 |
-
function mr_social_sharing_actlinks( $links ) {
|
1034 |
-
$settings_link = '<a href="'.MR_Social_Sharing_Toolkit_Admin_URL.'">'.__('Settings').'</a>';
|
1035 |
-
array_unshift( $links, $settings_link );
|
1036 |
-
return $links;
|
1037 |
}
|
1038 |
-
$plugin = plugin_basename(__FILE__);
|
1039 |
-
add_filter("plugin_action_links_$plugin", 'mr_social_sharing_actlinks' );
|
1040 |
|
1041 |
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
|
1042 |
add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu'));
|
3 |
Plugin Name: Social Sharing Toolkit
|
4 |
Plugin URI: http://wordpress.org/plugins/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.3
|
7 |
Author: linksalpha
|
8 |
Author URI: http://www.linksalpha.com
|
9 |
*/
|
254 |
<form method="post" action="">
|
255 |
<input type="hidden" name="mr_social_sharing_save_options" value="Y"/>
|
256 |
<h2>Social Sharing Toolkit</h2>
|
257 |
+
|
258 |
<div id="mr_social_sharing_tabs">
|
259 |
+
<ul class="tabs">
|
260 |
<li><a href="#tab_0">' . __('General settings', 'mr_social_sharing_toolkit') . '</a><li>
|
261 |
<li><a href="#tab_1">' . __('Content', 'mr_social_sharing_toolkit') . '</a><li>
|
262 |
<li><a href="#tab_2">' . __('Shortcode', 'mr_social_sharing_toolkit') . '</a><li>
|
263 |
<li><a href="#tab_3">' . __('Share Widget', 'mr_social_sharing_toolkit') . '</a><li>
|
264 |
<li><a href="#tab_4">' . __('Follow Widget', 'mr_social_sharing_toolkit') . '</a><li>
|
265 |
<li><a href="#tab_5">' . __('Advanced settings', 'mr_social_sharing_toolkit') . '</a><li>
|
266 |
+
<li><a href="#tab_6">' . __('Custom CSS', 'mr_social_sharing_toolkit') . '</a><li>
|
267 |
</ul>
|
268 |
<div id="tab_0" class="mr_social_sharing_networks">
|
269 |
<h3>' . __('General settings', 'mr_social_sharing_toolkit') . ':</h3>
|
271 |
if ($this -> options['mr_social_sharing_js_footer'] == 1) { echo ' checked="checked"';
|
272 |
}
|
273 |
echo ' value="1" /> ' . __('Load JavaScript in footer', 'mr_social_sharing_toolkit') . '</label>
|
274 |
+
|
275 |
<p>
|
276 |
<span class="description"> ' . __('Improves performance but may not work on some themes', 'mr_social_sharing_toolkit') . '</span>
|
277 |
</p>
|
330 |
' . __('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).', 'mr_social_sharing_toolkit') . '
|
331 |
</p>';
|
332 |
$this -> showListAdmin($this -> share_buttons);
|
333 |
+
echo '
|
334 |
</div>
|
335 |
<div id="tab_2" class="mr_social_sharing_networks">
|
336 |
<h3>' . __('Shortcode', 'mr_social_sharing_toolkit') . '</h3>
|
338 |
' . __('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).', 'mr_social_sharing_toolkit') . '
|
339 |
</p>';
|
340 |
$this -> showListAdmin($this -> share_buttons, 'shortcode_');
|
341 |
+
echo '
|
342 |
</div>
|
343 |
<div id="tab_3" class="mr_social_sharing_networks">
|
344 |
<h3>' . __('Share Widget', 'mr_social_sharing_toolkit') . '</h3>
|
365 |
<label for="mr_social_sharing_follow_new" class="check"><input type="checkbox" name="mr_social_sharing_follow_new" id="mr_social_sharing_follow_new"';
|
366 |
if ($this -> options['mr_social_sharing_follow_new'] == 1) { echo ' checked="checked"';
|
367 |
}
|
368 |
+
echo ' value="1" /> ' . __("Open links in new window or tab", 'mr_social_sharing_toolkit') . '</label>
|
369 |
</div>
|
370 |
<div id="tab_5" class="mr_social_sharing_networks">
|
371 |
+
<h3>' . __('Advanced settings', 'mr_social_sharing_toolkit') . '</h3>
|
372 |
<h4>' . __('Automatic Twitter links', 'mr_social_sharing_toolkit') . '</h4>
|
373 |
<p>' . __('Select what you want to convert:', 'mr_social_sharing_toolkit') . '</p>
|
374 |
<label for="mr_social_sharing_twitter_handles" class="check"><input type="checkbox" name="mr_social_sharing_twitter_handles" id="mr_social_sharing_twitter_handles"';
|
392 |
if ($this -> options['mr_social_sharing_linkify_new'] == 1) { echo ' checked="checked"';
|
393 |
}
|
394 |
echo ' value="1" /> ' . __("Open links in new window or tab", 'mr_social_sharing_toolkit') . '</label>';
|
395 |
+
|
396 |
// Image Size
|
397 |
echo '<h4>' . __('Image Size', 'mr_social_sharing_toolkit') . '</h4>
|
398 |
<p>' . __('Select the image size to be used while sharing', 'mr_social_sharing_toolkit') . '</p>
|
410 |
if ($this -> options['mr_social_sharing_attachment_image_size'] == 'full') { echo ' selected="selected"';}
|
411 |
echo '>' . __('Full', 'mr_social_sharing_toolkit') . '</option>
|
412 |
</select></label><br/><br/>';
|
413 |
+
|
414 |
+
// Bitly
|
415 |
echo '<h4>' . __('Bitly', 'mr_social_sharing_toolkit') . '</h4>
|
416 |
<p>' . __('Use Bitly url shortening for the tweet button', 'mr_social_sharing_toolkit') . '</p>
|
417 |
<label for="mr_social_sharing_bitly_enable" class="check"><input type="checkbox" name="mr_social_sharing_bitly[enable]" id="mr_social_sharing_bitly_enable"';
|
444 |
if (isset($this -> options['mr_social_sharing_opengraph']['fixed_image']) && $this -> options['mr_social_sharing_opengraph']['fixed_image'] == 1) { echo ' checked="checked"';
|
445 |
}
|
446 |
echo ' value="1" /> ' . __("Always use the default image", 'mr_social_sharing_toolkit') . '</label><br/>
|
447 |
+
<p><span class="description">' . __("Check this box to always display the default image with your shared content", 'mr_social_sharing_toolkit') . '</span></p>
|
448 |
</div>
|
449 |
<div id="tab_6" class="mr_social_sharing_networks">
|
450 |
<h3>' . __('Custom CSS', 'mr_social_sharing_toolkit') . '</h3>
|
477 |
<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') . '"/>';
|
478 |
if (is_array($buttons[$button]['types']) && $buttons[$button]['types'][0] != '') {
|
479 |
if (count($buttons[$button]['types']) == 1) {
|
480 |
+
echo '
|
481 |
<input type="hidden" name="mr_social_sharing_' . $button_type . 'buttons[' . $button . '][type]" value="' . $buttons[$button]['types'][0] . '"/>';
|
482 |
} else {
|
483 |
echo '
|
491 |
echo '</select>';
|
492 |
}
|
493 |
} else {
|
494 |
+
echo '
|
495 |
<input type="hidden" name="mr_social_sharing_' . $button_type . 'buttons[' . $button . '][type]" value=""/>';
|
496 |
}
|
497 |
if (array_key_exists('id', $buttons[$button])) {
|
518 |
<input type="hidden" name="mr_social_sharing_' . $button_type . 'button_order[]" value="' . $button . '"/></span>
|
519 |
<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'] . '"/>
|
520 |
<label for="mr_social_sharing_' . $button_type . $button . '_icon" class="text">' . __('Custom icon url', 'mr_social_sharing_toolkit') . '</label>
|
521 |
+
|
522 |
<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']) . '"/>
|
523 |
<label for="mr_social_sharing_' . $button_type . $button . '_text" class="text">' . __('Custom text', 'mr_social_sharing_toolkit') . '</label></span>
|
524 |
+
|
525 |
+
|
526 |
</li>';
|
527 |
}
|
528 |
}
|
585 |
<meta property="og:site_name" content="' . get_bloginfo('name') . '"/>';
|
586 |
if (isset($this -> options['mr_social_sharing_opengraph']['fixed_image']) && $this -> options['mr_social_sharing_opengraph']['fixed_image']) {
|
587 |
if ($this -> options['mr_social_sharing_opengraph']['default_image'] != '') {
|
588 |
+
echo '
|
589 |
<meta property="og:image" content="' . $this -> options['mr_social_sharing_opengraph']['default_image'] . '"/>';
|
590 |
}
|
591 |
} else {
|
592 |
$media = '';
|
593 |
if (current_theme_supports('post-thumbnails')) {
|
594 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
595 |
+
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
596 |
} else {
|
597 |
$image_size = 'thumbnail';
|
598 |
}
|
612 |
}
|
613 |
}
|
614 |
if ($media != '') {
|
615 |
+
echo '
|
616 |
<meta property="og:image" content="' . $media . '"/>';
|
617 |
} elseif ($this -> options['mr_social_sharing_opengraph']['default_image'] != '') {
|
618 |
+
echo '
|
619 |
<meta property="og:image" content="' . $this -> options['mr_social_sharing_opengraph']['default_image'] . '"/>';
|
620 |
}
|
621 |
}
|
797 |
} else {
|
798 |
if (current_theme_supports('post-thumbnails')) {
|
799 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
800 |
+
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
801 |
} else {
|
802 |
$image_size = 'thumbnail';
|
803 |
}
|
850 |
} else {
|
851 |
if (current_theme_supports('post-thumbnails')) {
|
852 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
853 |
+
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
854 |
} else {
|
855 |
$image_size = 'thumbnail';
|
856 |
}
|
903 |
} else {
|
904 |
if (current_theme_supports('post-thumbnails')) {
|
905 |
if(isset($this->options['mr_social_sharing_attachment_image_size'])) {
|
906 |
+
$image_size = $this->options['mr_social_sharing_attachment_image_size'];
|
907 |
} else {
|
908 |
$image_size = 'thumbnail';
|
909 |
}
|
983 |
$text = trim($text);
|
984 |
return $text;
|
985 |
}
|
986 |
+
|
987 |
function smart_truncate($string, $required_length) {
|
988 |
$parts = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE);
|
989 |
$parts_count = count($parts);
|
997 |
}
|
998 |
return implode(array_slice($parts, 0, $last_part));
|
999 |
}
|
1000 |
+
|
1001 |
function prepare_string($string, $string_length) {
|
1002 |
$final_string = '';
|
1003 |
$utf8marker = chr(128);
|
1030 |
unset($buttons);
|
1031 |
|
1032 |
define('MR_Social_Sharing_Toolkit_Admin_URL', "options-general.php?page=mr_social_sharing");
|
1033 |
+
function mr_social_sharing_actlinks( $links ) {
|
1034 |
+
$settings_link = '<a href="'.MR_Social_Sharing_Toolkit_Admin_URL.'">'.__('Settings').'</a>';
|
1035 |
+
array_unshift( $links, $settings_link );
|
1036 |
+
return $links;
|
1037 |
}
|
1038 |
+
$plugin = plugin_basename(__FILE__);
|
1039 |
+
add_filter("plugin_action_links_$plugin", 'mr_social_sharing_actlinks' );
|
1040 |
|
1041 |
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
|
1042 |
add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu'));
|