Version Description
Download this release
Release Info
Developer | joostdevalk |
Plugin | Sociable |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 2.8.1
- readme.txt +2 -1
- sociable.php +23 -23
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://yoast.com/donate/
|
|
4 |
Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
|
5 |
Requires at least: 2.2
|
6 |
Tested up to: 2.5.1
|
7 |
-
stable tag: 2.8
|
8 |
|
9 |
Automatically add links on your posts to popular social bookmarking sites.
|
10 |
|
@@ -19,6 +19,7 @@ More info:
|
|
19 |
|
20 |
**Changelog**
|
21 |
|
|
|
22 |
* 2.8 Added option to show bookmark icons in feed, added Ratimarks, fixed xhtml compliance, fixed blue dot bug
|
23 |
* 2.6.9 Fixed WP 2.6 compatibility
|
24 |
* 2.6.8 Updated documentation
|
4 |
Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
|
5 |
Requires at least: 2.2
|
6 |
Tested up to: 2.5.1
|
7 |
+
stable tag: 2.8.1
|
8 |
|
9 |
Automatically add links on your posts to popular social bookmarking sites.
|
10 |
|
19 |
|
20 |
**Changelog**
|
21 |
|
22 |
+
* 2.8.1 Fixed some small issues and made sure tagline shows up again
|
23 |
* 2.8 Added option to show bookmark icons in feed, added Ratimarks, fixed xhtml compliance, fixed blue dot bug
|
24 |
* 2.6.9 Fixed WP 2.6 compatibility
|
25 |
* 2.6.8 Updated documentation
|
sociable.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Sociable
|
4 |
Plugin URI: http://yoast.com/wordpress/sociable/
|
5 |
Description: Automatically add links on your posts to popular <a href="http://www.maxpower.ca/bookmarking">social bookmarking sites</a>. Go to Options -> Sociable for setup.
|
6 |
-
Version: 2.8
|
7 |
Author: Joost de Valk
|
8 |
Author URI: http://yoast.com/
|
9 |
|
@@ -649,7 +649,7 @@ function sociable_html($display=Array()) {
|
|
649 |
$rss = urlencode(get_bloginfo('ref_url'));
|
650 |
|
651 |
$html .= "\n<div class=\"sociable\">\n<div class=\"sociable_tagline\">\n";
|
652 |
-
|
653 |
// $html .= "\n\t<span>" . __("These icons link to social bookmarking sites where readers can share and discover new web pages.", 'sociable') . "</span>";
|
654 |
$html .= "\n</div>\n<ul>\n";
|
655 |
|
@@ -663,8 +663,8 @@ function sociable_html($display=Array()) {
|
|
663 |
$url = $site['url'];
|
664 |
$url = str_replace('PERMALINK', $permalink, $url);
|
665 |
$url = str_replace('TITLE', $title, $url);
|
666 |
-
|
667 |
-
|
668 |
|
669 |
if (isset($site['description']) && $site['description'] != "") {
|
670 |
$description = $site['description'];
|
@@ -674,8 +674,8 @@ function sociable_html($display=Array()) {
|
|
674 |
$link = "<li>";
|
675 |
$link .= "<a rel=\"nofollow\" href=\"$url\" title=\"$description\">";
|
676 |
$link .= "<img src=\"$imagepath{$site['favicon']}\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
|
677 |
-
|
678 |
-
|
679 |
$link .= "\" />";
|
680 |
$link .= "</a></li>";
|
681 |
|
@@ -702,11 +702,11 @@ if (is_array($sociable_contitionals) and in_array(true, $sociable_contitionals))
|
|
702 |
(is_date() and $conditionals['is_date']) or
|
703 |
(is_search() and $conditionals['is_search'])) {
|
704 |
$content .= sociable_html();
|
705 |
-
} elseif ((is_feed() and $conditionals['
|
706 |
$sociable_html = sociable_html();
|
707 |
$sociable_html = strip_tags($sociable_html,"<a><img>");
|
708 |
$sociable_html = str_replace('<a rel="nofollow" title="Print this article!"><img src="http://www.css3.info/wp-content/plugins/sociable//images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>','',$sociable_html);
|
709 |
-
$content .= $sociable_html . "<br/>";
|
710 |
}
|
711 |
return $content;
|
712 |
}
|
@@ -729,14 +729,8 @@ if (!function_exists('parse_w3cdtf')) {
|
|
729 |
}
|
730 |
|
731 |
// Plugin config/data setup
|
732 |
-
|
733 |
-
|
734 |
-
register_activation_hook(__FILE__, 'sociable_activation_hook');
|
735 |
-
} else {
|
736 |
-
// for WP 1.5, which doesn't have any activation hook
|
737 |
-
if (!is_array(get_option('sociable_active_sites')))
|
738 |
-
sociable_activation_hook();
|
739 |
-
}
|
740 |
function sociable_activation_hook() {
|
741 |
return sociable_restore_config(False);
|
742 |
}
|
@@ -769,7 +763,7 @@ function sociable_restore_config($force=False) {
|
|
769 |
'is_category' => False,
|
770 |
'is_date' => False,
|
771 |
'is_search' => False,
|
772 |
-
'
|
773 |
));
|
774 |
|
775 |
if ($force or !is_bool(get_option('usecss')))
|
@@ -882,10 +876,16 @@ function sociable_submenu() {
|
|
882 |
|
883 |
// update conditional displays
|
884 |
$conditionals = Array();
|
885 |
-
if (!$
|
886 |
-
$
|
887 |
-
|
888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
update_option('sociable_conditionals', $conditionals);
|
890 |
|
891 |
// update tagline
|
@@ -980,7 +980,7 @@ function sociable_submenu() {
|
|
980 |
<input type="checkbox" name="conditionals[is_category]"<?php echo ($conditionals['is_category']) ? ' checked="checked"' : ''; ?> /> <?php _e("Category archives", 'sociable'); ?><br/>
|
981 |
<input type="checkbox" name="conditionals[is_date]"<?php echo ($conditionals['is_date']) ? ' checked="checked"' : ''; ?> /> <?php _e("Date-based archives", 'sociable'); ?><br/>
|
982 |
<input type="checkbox" name="conditionals[is_search]"<?php echo ($conditionals['is_search']) ? ' checked="checked"' : ''; ?> /> <?php _e("Search results", 'sociable'); ?><br/>
|
983 |
-
<input type="checkbox" name="conditionals[
|
984 |
</td>
|
985 |
</tr>
|
986 |
<tr>
|
@@ -1016,4 +1016,4 @@ if (get_option('sociable_usecss_set_once') != true) {
|
|
1016 |
update_option('sociable_usecss_set_once', true);
|
1017 |
}
|
1018 |
|
1019 |
-
?>
|
3 |
Plugin Name: Sociable
|
4 |
Plugin URI: http://yoast.com/wordpress/sociable/
|
5 |
Description: Automatically add links on your posts to popular <a href="http://www.maxpower.ca/bookmarking">social bookmarking sites</a>. Go to Options -> Sociable for setup.
|
6 |
+
Version: 2.8.1
|
7 |
Author: Joost de Valk
|
8 |
Author URI: http://yoast.com/
|
9 |
|
649 |
$rss = urlencode(get_bloginfo('ref_url'));
|
650 |
|
651 |
$html .= "\n<div class=\"sociable\">\n<div class=\"sociable_tagline\">\n";
|
652 |
+
$html .= stripslashes(get_option("sociable_tagline"));
|
653 |
// $html .= "\n\t<span>" . __("These icons link to social bookmarking sites where readers can share and discover new web pages.", 'sociable') . "</span>";
|
654 |
$html .= "\n</div>\n<ul>\n";
|
655 |
|
663 |
$url = $site['url'];
|
664 |
$url = str_replace('PERMALINK', $permalink, $url);
|
665 |
$url = str_replace('TITLE', $title, $url);
|
666 |
+
$url = str_replace('RSS', $rss, $url);
|
667 |
+
$url = str_replace('BLOGNAME', $blogname, $url);
|
668 |
|
669 |
if (isset($site['description']) && $site['description'] != "") {
|
670 |
$description = $site['description'];
|
674 |
$link = "<li>";
|
675 |
$link .= "<a rel=\"nofollow\" href=\"$url\" title=\"$description\">";
|
676 |
$link .= "<img src=\"$imagepath{$site['favicon']}\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
|
677 |
+
if ($site['class'])
|
678 |
+
$link .= " sociable_{$site['class']}";
|
679 |
$link .= "\" />";
|
680 |
$link .= "</a></li>";
|
681 |
|
702 |
(is_date() and $conditionals['is_date']) or
|
703 |
(is_search() and $conditionals['is_search'])) {
|
704 |
$content .= sociable_html();
|
705 |
+
} elseif ((is_feed() and $conditionals['is_feed'])) {
|
706 |
$sociable_html = sociable_html();
|
707 |
$sociable_html = strip_tags($sociable_html,"<a><img>");
|
708 |
$sociable_html = str_replace('<a rel="nofollow" title="Print this article!"><img src="http://www.css3.info/wp-content/plugins/sociable//images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>','',$sociable_html);
|
709 |
+
$content .= $sociable_html . "<br/><br/>";
|
710 |
}
|
711 |
return $content;
|
712 |
}
|
729 |
}
|
730 |
|
731 |
// Plugin config/data setup
|
732 |
+
register_activation_hook(__FILE__, 'sociable_activation_hook');
|
733 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
734 |
function sociable_activation_hook() {
|
735 |
return sociable_restore_config(False);
|
736 |
}
|
763 |
'is_category' => False,
|
764 |
'is_date' => False,
|
765 |
'is_search' => False,
|
766 |
+
'is_feed' => False,
|
767 |
));
|
768 |
|
769 |
if ($force or !is_bool(get_option('usecss')))
|
876 |
|
877 |
// update conditional displays
|
878 |
$conditionals = Array();
|
879 |
+
if (!$_POST['conditionals'])
|
880 |
+
$_POST['conditionals'] = Array();
|
881 |
+
|
882 |
+
$curconditionals = get_option('sociable_conditionals');
|
883 |
+
if (!array_key_exists('is_feed',$curconditionals)) {
|
884 |
+
$curconditionals['is_feed'] = false;
|
885 |
+
}
|
886 |
+
foreach($curconditionals as $condition=>$toggled)
|
887 |
+
$conditionals[$condition] = array_key_exists($condition, $_POST['conditionals']);
|
888 |
+
|
889 |
update_option('sociable_conditionals', $conditionals);
|
890 |
|
891 |
// update tagline
|
980 |
<input type="checkbox" name="conditionals[is_category]"<?php echo ($conditionals['is_category']) ? ' checked="checked"' : ''; ?> /> <?php _e("Category archives", 'sociable'); ?><br/>
|
981 |
<input type="checkbox" name="conditionals[is_date]"<?php echo ($conditionals['is_date']) ? ' checked="checked"' : ''; ?> /> <?php _e("Date-based archives", 'sociable'); ?><br/>
|
982 |
<input type="checkbox" name="conditionals[is_search]"<?php echo ($conditionals['is_search']) ? ' checked="checked"' : ''; ?> /> <?php _e("Search results", 'sociable'); ?><br/>
|
983 |
+
<input type="checkbox" name="conditionals[is_feed]"<?php echo ($conditionals['is_feed']) ? ' checked="checked"' : ''; ?> /> <?php _e("RSS feed items", 'sociable'); ?><br/>
|
984 |
</td>
|
985 |
</tr>
|
986 |
<tr>
|
1016 |
update_option('sociable_usecss_set_once', true);
|
1017 |
}
|
1018 |
|
1019 |
+
?>
|