Version Description
- Added the option to add a site to Sociable through a filter, read How to add a site to Sociable.
Download this release
Release Info
| Developer | joostdevalk |
| Plugin | |
| Version | 3.4 |
| Comparing to | |
| See all releases | |
Code changes from version 3.3.8 to 3.4
- readme.txt +4 -1
- sociable.php +26 -3
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.6
|
| 6 |
Tested up to: 2.8.1
|
| 7 |
-
Stable tag: 3.
|
| 8 |
|
| 9 |
Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
| 10 |
|
|
@@ -24,6 +24,9 @@ More info:
|
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
= 3.3.8 =
|
| 28 |
* Fixed the option to disable Sociable on a per post / page basis.
|
| 29 |
|
| 4 |
Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
|
| 5 |
Requires at least: 2.6
|
| 6 |
Tested up to: 2.8.1
|
| 7 |
+
Stable tag: 3.4
|
| 8 |
|
| 9 |
Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
| 10 |
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
| 27 |
+
= 3.4 =
|
| 28 |
+
* Added the option to add a site to Sociable through a filter, read [How to add a site to Sociable](http://yoast.com/add-sites-to-sociable/).
|
| 29 |
+
|
| 30 |
= 3.3.8 =
|
| 31 |
* Fixed the option to disable Sociable on a per post / page basis.
|
| 32 |
|
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, pages and RSS feed to your favorite social bookmarking sites.
|
| 6 |
-
Version: 3.
|
| 7 |
Author: Joost de Valk
|
| 8 |
Author URI: http://yoast.com/
|
| 9 |
|
|
@@ -548,6 +548,11 @@ $sociable_known_sites = Array(
|
|
| 548 |
function sociable_html($display=array()) {
|
| 549 |
global $sociable_known_sites, $sociablepluginpath, $wp_query, $post;
|
| 550 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 551 |
$sociableoff = get_post_meta($post->ID,'sociableoff',true);
|
| 552 |
if ($sociableoff === true || $sociableoff == "true") {
|
| 553 |
return "";
|
|
@@ -689,7 +694,12 @@ function sociable_html($display=array()) {
|
|
| 689 |
if (get_option('sociable_usetextlinks')) {
|
| 690 |
$link .= $description;
|
| 691 |
} else {
|
| 692 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 693 |
if (isset($site['class']) && $site['class'])
|
| 694 |
$link .= " sociable_{$site['class']}";
|
| 695 |
$link .= "\" />";
|
|
@@ -892,6 +902,8 @@ add_action('wp_insert_post', 'sociable_insert_post');
|
|
| 892 |
function sociable_submenu() {
|
| 893 |
global $sociable_known_sites, $sociable_date, $sociablepluginpath;
|
| 894 |
|
|
|
|
|
|
|
| 895 |
if (isset($_REQUEST['restore']) && $_REQUEST['restore']) {
|
| 896 |
check_admin_referer('sociable-config');
|
| 897 |
sociable_restore_config(true);
|
|
@@ -987,7 +999,18 @@ function sociable_submenu() {
|
|
| 987 |
name="active_sites[<?php echo $sitename; ?>]"
|
| 988 |
<?php echo (in_array($sitename, $active_sites)) ? ' checked="checked"' : ''; ?>
|
| 989 |
/>
|
| 990 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 991 |
<?php echo $sitename; ?>
|
| 992 |
</li>
|
| 993 |
<?php } ?>
|
| 3 |
Plugin Name: Sociable
|
| 4 |
Plugin URI: http://yoast.com/wordpress/sociable/
|
| 5 |
Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
| 6 |
+
Version: 3.4
|
| 7 |
Author: Joost de Valk
|
| 8 |
Author URI: http://yoast.com/
|
| 9 |
|
| 548 |
function sociable_html($display=array()) {
|
| 549 |
global $sociable_known_sites, $sociablepluginpath, $wp_query, $post;
|
| 550 |
|
| 551 |
+
/**
|
| 552 |
+
* Make it possible for other plugins or themes to add buttons to Sociable
|
| 553 |
+
*/
|
| 554 |
+
$sociable_known_sites = apply_filters('sociable_known_sites',$sociable_known_sites);
|
| 555 |
+
|
| 556 |
$sociableoff = get_post_meta($post->ID,'sociableoff',true);
|
| 557 |
if ($sociableoff === true || $sociableoff == "true") {
|
| 558 |
return "";
|
| 694 |
if (get_option('sociable_usetextlinks')) {
|
| 695 |
$link .= $description;
|
| 696 |
} else {
|
| 697 |
+
if (strpos($site['favicon'], 'http') === 0) {
|
| 698 |
+
$imgsrc = $site['favicon'];
|
| 699 |
+
} else {
|
| 700 |
+
$imgsrc = $imagepath.$site['favicon'];
|
| 701 |
+
}
|
| 702 |
+
$link .= "<img src=\"".$imgsrc."\" title=\"$description\" alt=\"$description\" class=\"sociable-hovers";
|
| 703 |
if (isset($site['class']) && $site['class'])
|
| 704 |
$link .= " sociable_{$site['class']}";
|
| 705 |
$link .= "\" />";
|
| 902 |
function sociable_submenu() {
|
| 903 |
global $sociable_known_sites, $sociable_date, $sociablepluginpath;
|
| 904 |
|
| 905 |
+
$sociable_known_sites = apply_filters('sociable_known_sites',$sociable_known_sites);
|
| 906 |
+
|
| 907 |
if (isset($_REQUEST['restore']) && $_REQUEST['restore']) {
|
| 908 |
check_admin_referer('sociable-config');
|
| 909 |
sociable_restore_config(true);
|
| 999 |
name="active_sites[<?php echo $sitename; ?>]"
|
| 1000 |
<?php echo (in_array($sitename, $active_sites)) ? ' checked="checked"' : ''; ?>
|
| 1001 |
/>
|
| 1002 |
+
<?php
|
| 1003 |
+
$imagepath = get_option('sociable_imagedir');
|
| 1004 |
+
if ($imagepath == "")
|
| 1005 |
+
$imagepath = $sociablepluginpath.'images/';
|
| 1006 |
+
|
| 1007 |
+
if (strpos($site['favicon'], 'http') === 0) {
|
| 1008 |
+
$imgsrc = $site['favicon'];
|
| 1009 |
+
} else {
|
| 1010 |
+
$imgsrc = $imagepath.$site['favicon'];
|
| 1011 |
+
}
|
| 1012 |
+
?>
|
| 1013 |
+
<img src="<?php echo $imgsrc; ?>" width="16" height="16" alt="<?php echo $site['description'] ?>" />
|
| 1014 |
<?php echo $sitename; ?>
|
| 1015 |
</li>
|
| 1016 |
<?php } ?>
|
