Version Description
Version 1.3.1 includes an option to display buttons in excerpts.
Download this release
Release Info
Developer | MarijnRongen |
Plugin | Social Sharing Toolkit |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- readme.txt +13 -2
- social_sharing_toolkit.php +14 -5
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Social Sharing Toolkit ===
|
2 |
Contributors: MarijnRongen
|
3 |
Donate link: http://www.marijnrongen.com/wordpress-plugins/
|
4 |
-
Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Twitter, Tweet, StumbleUpon, Stumble, Tumblr, Digg, Reddit, MySpace, Hyves, recommend, social, sharing, widget, page, post
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.2.1
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
This plugin enables sharing of your content via popular social networks and can convert Twitter names and hashtags to links. Easy & configurable.
|
@@ -45,6 +45,10 @@ The plugin uses a list to position the buttons. You can easily change the css to
|
|
45 |
|
46 |
Since version 1.3.0 it is possible to choose if the buttons should be displayed on posts, pages or both. The shortcode will work on both regardless of this choice.
|
47 |
|
|
|
|
|
|
|
|
|
48 |
= Using it somewhere else =
|
49 |
|
50 |
If you want to display the buttons outside of your content you can use the following code where you want the buttons to appear:
|
@@ -71,6 +75,10 @@ Upload the Social Sharing Toolkit plugin to the wp-content/plugins/ folder on yo
|
|
71 |
|
72 |
== Upgrade Notice ==
|
73 |
|
|
|
|
|
|
|
|
|
74 |
= 1.3.0 =
|
75 |
|
76 |
Please update to version 1.3.0 for several bug fixes and enhancements.
|
@@ -88,6 +96,9 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
91 |
= 1.3.0 =
|
92 |
* Added feature to display buttons only on posts, only on pages or on posts and pages
|
93 |
* Improved hashtag to link conversion
|
1 |
=== Social Sharing Toolkit ===
|
2 |
Contributors: MarijnRongen
|
3 |
Donate link: http://www.marijnrongen.com/wordpress-plugins/
|
4 |
+
Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Twitter, Tweet, StumbleUpon, Stumble, Tumblr, Digg, Reddit, MySpace, Hyves, recommend, social, sharing, widget, shortcode, page, post
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.2.1
|
7 |
+
Stable tag: 1.3.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
This plugin enables sharing of your content via popular social networks and can convert Twitter names and hashtags to links. Easy & configurable.
|
45 |
|
46 |
Since version 1.3.0 it is possible to choose if the buttons should be displayed on posts, pages or both. The shortcode will work on both regardless of this choice.
|
47 |
|
48 |
+
= Excerpts =
|
49 |
+
|
50 |
+
Version 1.3.0 removed the buttons from excerpts because some themes did not parse the buttons correctly in the excerpt. Version 1.3.1 includes an option where you can choose to display buttons in excerpts. This is disabled by default, you can enable it but be aware it doesn't work correctly on some themes.
|
51 |
+
|
52 |
= Using it somewhere else =
|
53 |
|
54 |
If you want to display the buttons outside of your content you can use the following code where you want the buttons to appear:
|
75 |
|
76 |
== Upgrade Notice ==
|
77 |
|
78 |
+
= 1.3.1 =
|
79 |
+
|
80 |
+
Version 1.3.1 includes an option to display buttons in excerpts.
|
81 |
+
|
82 |
= 1.3.0 =
|
83 |
|
84 |
Please update to version 1.3.0 for several bug fixes and enhancements.
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 1.3.1 =
|
100 |
+
* Added feature to choose if buttons display in excerpts (doesn't work on some themes)
|
101 |
+
|
102 |
= 1.3.0 =
|
103 |
* Added feature to display buttons only on posts, only on pages or on posts and pages
|
104 |
* Improved hashtag to link conversion
|
social_sharing_toolkit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Social Sharing Toolkit
|
4 |
Plugin URI: http://www.marijnrongen.com/wordpress-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: 1.3.
|
7 |
Author: Marijn Rongen
|
8 |
Author URI: http://www.marijnrongen.com
|
9 |
*/
|
@@ -16,7 +16,7 @@ class MR_Social_Sharing_Toolkit {
|
|
16 |
}
|
17 |
|
18 |
function get_options() {
|
19 |
-
$this->options = array('share' => 1, 'like' => 1, 'tweet' => 1, 'tumblr' => 1, 'stumble' => 1, 'plus' => 1, 'digg' => 1, 'reddit' => 1, 'myspace' => 1, 'hyves' => 1, 'twitter_handle' => '', 'position' => 'none', 'types' => 'both', 'layout' => 'none', 'linkify_content' => 0, 'linkify_comments' => 0, 'twitter_handles' => 0, 'twitter_hashtags' => 0);
|
20 |
foreach ($this->options as $key => $val) {
|
21 |
$this->options[$key] = get_option( $key, $val );
|
22 |
}
|
@@ -105,6 +105,15 @@ class MR_Social_Sharing_Toolkit {
|
|
105 |
echo '
|
106 |
</td>
|
107 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
<tr valign="top">
|
109 |
<th scope="row">
|
110 |
<label for="layout">Choose a layout</label>
|
@@ -241,7 +250,7 @@ class MR_Social_Sharing_Toolkit {
|
|
241 |
$class = 'mr_social_sharing_'.$layout;
|
242 |
$bookmarks = '<div class="mr_social_sharing">
|
243 |
<ul class="mr_social_sharing">
|
244 |
-
<!-- Social Sharing Toolkit v1.3.
|
245 |
if ($this->options['like'] == 1) {
|
246 |
$bookmarks .= '
|
247 |
<li class="'.$class.'">
|
@@ -436,7 +445,7 @@ class MR_Social_Sharing_Toolkit {
|
|
436 |
|
437 |
function share($content) {
|
438 |
$type = get_post_type().'s';
|
439 |
-
if (($this->options['types'] == $type || $this->options['types'] == 'both') && ($type != 'pages' && is_single() || $type == 'pages' && !is_single())) {
|
440 |
if ($this->options['position'] == 'top') {
|
441 |
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
|
442 |
$content = $bookmarks.$content;
|
@@ -451,7 +460,7 @@ class MR_Social_Sharing_Toolkit {
|
|
451 |
|
452 |
function share_shortcode() {
|
453 |
$bookmarks = '';
|
454 |
-
if ($this->options['position'] == 'shortcode' && is_single()) {
|
455 |
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
|
456 |
}
|
457 |
return $bookmarks;
|
3 |
Plugin Name: Social Sharing Toolkit
|
4 |
Plugin URI: http://www.marijnrongen.com/wordpress-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: 1.3.1
|
7 |
Author: Marijn Rongen
|
8 |
Author URI: http://www.marijnrongen.com
|
9 |
*/
|
16 |
}
|
17 |
|
18 |
function get_options() {
|
19 |
+
$this->options = array('share' => 1, 'like' => 1, 'tweet' => 1, 'tumblr' => 1, 'stumble' => 1, 'plus' => 1, 'digg' => 1, 'reddit' => 1, 'myspace' => 1, 'hyves' => 1, 'twitter_handle' => '', 'position' => 'none', 'types' => 'both', 'include_excerpts' => 0, 'layout' => 'none', 'linkify_content' => 0, 'linkify_comments' => 0, 'twitter_handles' => 0, 'twitter_hashtags' => 0);
|
20 |
foreach ($this->options as $key => $val) {
|
21 |
$this->options[$key] = get_option( $key, $val );
|
22 |
}
|
105 |
echo '
|
106 |
</td>
|
107 |
</tr>
|
108 |
+
<tr valign="top">
|
109 |
+
<th scope="row">
|
110 |
+
</th>
|
111 |
+
<td>
|
112 |
+
<label for="include_excerpts"><input type="checkbox" name="include_excerpts" id="include_excerpts"';
|
113 |
+
if ($this->options['include_excerpts'] == 1) { echo ' checked="checked"';}
|
114 |
+
echo ' value="1" /> Include buttons in excerpts</label><span class="description"> '.__("Some themes will not correctly display the buttons in excerpts", 'mr_social_sharing').'</span>
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
<tr valign="top">
|
118 |
<th scope="row">
|
119 |
<label for="layout">Choose a layout</label>
|
250 |
$class = 'mr_social_sharing_'.$layout;
|
251 |
$bookmarks = '<div class="mr_social_sharing">
|
252 |
<ul class="mr_social_sharing">
|
253 |
+
<!-- Social Sharing Toolkit v1.3.1 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->';
|
254 |
if ($this->options['like'] == 1) {
|
255 |
$bookmarks .= '
|
256 |
<li class="'.$class.'">
|
445 |
|
446 |
function share($content) {
|
447 |
$type = get_post_type().'s';
|
448 |
+
if (($this->options['types'] == $type || $this->options['types'] == 'both') && (($type != 'pages' && (is_single() || $this->options['include_excerpts'] == 1)) || $type == 'pages' && !is_single())) {
|
449 |
if ($this->options['position'] == 'top') {
|
450 |
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
|
451 |
$content = $bookmarks.$content;
|
460 |
|
461 |
function share_shortcode() {
|
462 |
$bookmarks = '';
|
463 |
+
if ($this->options['position'] == 'shortcode' && (is_single() || $this->options['include_excerpts'] == 1)) {
|
464 |
$bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
|
465 |
}
|
466 |
return $bookmarks;
|