Version Description
- Another fix for the sociableoff dilemma's, no backwards compatibility unfortunately, so disable sociable again on pages where you want to disable it.
Download this release
Release Info
| Developer | sociable |
| Plugin | |
| Version | 3.4.4 |
| Comparing to | |
| See all releases | |
Code changes from version 3.4.3 to 3.4.4
- images/linkedin.png +0 -0
- images/pdf.png +0 -0
- readme.txt +10 -9
- sociable.php +31 -26
images/linkedin.png
CHANGED
|
Binary file
|
images/pdf.png
CHANGED
|
Binary file
|
readme.txt
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
=== Sociable ===
|
| 2 |
-
Contributors:
|
| 3 |
-
|
| 4 |
-
Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
|
| 5 |
Requires at least: 2.6
|
| 6 |
-
Tested up to: 2.8.
|
| 7 |
-
Stable tag: 3.4.
|
| 8 |
|
| 9 |
Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
| 10 |
|
|
@@ -13,17 +12,19 @@ Automatically add links to your favorite social bookmarking sites on your posts,
|
|
| 13 |
|
| 14 |
More info:
|
| 15 |
|
| 16 |
-
* More info on [Sociable](http://
|
| 17 |
-
|
| 18 |
|
| 19 |
== Screenshots ==
|
| 20 |
|
| 21 |
1. The Sociable backend, easily select sites and drag & drop to change the order of appearance.
|
| 22 |
2. Sociable with its default styling.
|
| 23 |
-
3. Sociable in use on [Yoast.com](http://yoast.com/), with the custom image options and its own styling.
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
= 3.4.3 =
|
| 28 |
* Fixed the bug mentioned [here](http://wordpress.org/support/topic/288487) and [here](http://wordpress.org/support/topic/290753) that made it impossible to disable Sociable on a per post/page basis (for real, now).
|
| 29 |
|
|
@@ -295,4 +296,4 @@ If you find any bugs or have any ideas, please mail me.
|
|
| 295 |
|
| 296 |
**Advanced Users**
|
| 297 |
|
| 298 |
-
For advanced use of the plugin, see the [Sociable](http://
|
| 1 |
=== Sociable ===
|
| 2 |
+
Contributors: sociable
|
| 3 |
+
Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks, blogplay
|
|
|
|
| 4 |
Requires at least: 2.6
|
| 5 |
+
Tested up to: 2.8.4
|
| 6 |
+
Stable tag: 3.4.4
|
| 7 |
|
| 8 |
Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
| 9 |
|
| 12 |
|
| 13 |
More info:
|
| 14 |
|
| 15 |
+
* More info on [Sociable](http://www.blogplay.com/plugin), with info on how to add sites to it, and how to integrate it into your WordPress in other ways.
|
| 16 |
+
+ For an update log follow [@blogplaycom](http://www.twitter.com/blogplaycom)
|
| 17 |
|
| 18 |
== Screenshots ==
|
| 19 |
|
| 20 |
1. The Sociable backend, easily select sites and drag & drop to change the order of appearance.
|
| 21 |
2. Sociable with its default styling.
|
|
|
|
| 22 |
|
| 23 |
== Changelog ==
|
| 24 |
|
| 25 |
+
= 3.4.4 =
|
| 26 |
+
* Another fix for the sociableoff dilemma's, no backwards compatibility unfortunately, so disable sociable again on pages where you want to disable it.
|
| 27 |
+
|
| 28 |
= 3.4.3 =
|
| 29 |
* Fixed the bug mentioned [here](http://wordpress.org/support/topic/288487) and [here](http://wordpress.org/support/topic/290753) that made it impossible to disable Sociable on a per post/page basis (for real, now).
|
| 30 |
|
| 296 |
|
| 297 |
**Advanced Users**
|
| 298 |
|
| 299 |
+
For advanced use of the plugin, see the [Sociable](http://www.blogplay.com/sociable-for-wordpress) page on [Blogplay](http://www.blogplay.com/plugin)
|
sociable.php
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Sociable
|
| 4 |
-
Plugin URI: http://
|
| 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://
|
| 9 |
|
| 10 |
Copyright 2006 Peter Harkins (ph@malaprop.org)
|
| 11 |
Copyright 2008-2009 Joost de Valk (joost@yoast.com)
|
|
@@ -563,16 +563,15 @@ $sociable_known_sites = Array(
|
|
| 563 |
function sociable_html($display=array()) {
|
| 564 |
global $sociable_known_sites, $sociablepluginpath, $wp_query, $post;
|
| 565 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 566 |
/**
|
| 567 |
* Make it possible for other plugins or themes to add buttons to Sociable
|
| 568 |
*/
|
| 569 |
$sociable_known_sites = apply_filters('sociable_known_sites',$sociable_known_sites);
|
| 570 |
|
| 571 |
-
$sociableoff = get_post_meta($post->ID,'sociableoff',true);
|
| 572 |
-
if ($sociableoff == true || $sociableoff == "true") {
|
| 573 |
-
return "";
|
| 574 |
-
}
|
| 575 |
-
|
| 576 |
$active_sites = get_option('sociable_active_sites');
|
| 577 |
|
| 578 |
// If a path is specified where Sociable should find its images, use that, otherwise,
|
|
@@ -652,7 +651,7 @@ function sociable_html($display=array()) {
|
|
| 652 |
/**
|
| 653 |
* if awe.sm is enabled and it is an awe.sm supported site, use awe.sm
|
| 654 |
*/
|
| 655 |
-
$permalink = str_replace('&', '%
|
| 656 |
$destination = str_replace('PERMALINK', 'TARGET', $url);
|
| 657 |
$destination = str_replace('&', '%26', $destination);
|
| 658 |
$channel = urlencode($site['awesm_channel']);
|
|
@@ -701,7 +700,7 @@ function sociable_html($display=array()) {
|
|
| 701 |
if (get_option('sociable_usetargetblank')) {
|
| 702 |
$link .= " target=\"_blank\"";
|
| 703 |
}
|
| 704 |
-
$link .= " href=\"$url
|
| 705 |
|
| 706 |
/**
|
| 707 |
* If the option to use text links is enabled in the backend, display a text link, otherwise,
|
|
@@ -771,6 +770,8 @@ if (is_array($sociable_contitionals) and in_array(true, $sociable_contitionals))
|
|
| 771 |
* Set the default settings on activation on the plugin.
|
| 772 |
*/
|
| 773 |
function sociable_activation_hook() {
|
|
|
|
|
|
|
| 774 |
return sociable_restore_config(false);
|
| 775 |
}
|
| 776 |
register_activation_hook(__FILE__, 'sociable_activation_hook');
|
|
@@ -809,7 +810,7 @@ function sociable_restore_config($force=false) {
|
|
| 809 |
'is_feed' => False,
|
| 810 |
));
|
| 811 |
|
| 812 |
-
if ($force
|
| 813 |
update_option('sociable_usecss', true);
|
| 814 |
}
|
| 815 |
|
|
@@ -885,10 +886,9 @@ function sociable_message($message) {
|
|
| 885 |
function sociable_meta() {
|
| 886 |
global $post;
|
| 887 |
$sociableoff = false;
|
| 888 |
-
|
| 889 |
-
if ($sociableoffmeta == "true" || $sociableoffmeta == true) {
|
| 890 |
$sociableoff = true;
|
| 891 |
-
}
|
| 892 |
?>
|
| 893 |
<input type="checkbox" id="sociableoff" name="sociableoff" <?php checked($sociableoff); ?>/> <label for="sociableoff"><?php _e('Sociable disabled?','sociable') ?></label>
|
| 894 |
<?php
|
|
@@ -904,11 +904,16 @@ function sociable_meta_box() {
|
|
| 904 |
add_action('admin_menu', 'sociable_meta_box');
|
| 905 |
|
| 906 |
/**
|
| 907 |
-
* If the post is inserted,
|
| 908 |
*/
|
| 909 |
function sociable_insert_post($pID) {
|
| 910 |
-
|
| 911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 912 |
}
|
| 913 |
add_action('wp_insert_post', 'sociable_insert_post');
|
| 914 |
|
|
@@ -1057,15 +1062,15 @@ function sociable_submenu() {
|
|
| 1057 |
*/
|
| 1058 |
$conditionals = get_option('sociable_conditionals');
|
| 1059 |
?>
|
| 1060 |
-
<input type="checkbox" name="conditionals[is_home]"<?php
|
| 1061 |
-
<input type="checkbox" name="conditionals[is_single]"<?php
|
| 1062 |
-
<input type="checkbox" name="conditionals[is_page]"<?php
|
| 1063 |
-
<input type="checkbox" name="conditionals[is_category]"<?php
|
| 1064 |
-
<input type="checkbox" name="conditionals[is_tag]"<?php
|
| 1065 |
-
<input type="checkbox" name="conditionals[is_date]"<?php
|
| 1066 |
-
<input type="checkbox" name="conditionals[is_author]"<?php
|
| 1067 |
-
<input type="checkbox" name="conditionals[is_search]"<?php
|
| 1068 |
-
<input type="checkbox" name="conditionals[is_feed]"<?php
|
| 1069 |
</td>
|
| 1070 |
</tr>
|
| 1071 |
<tr>
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Sociable
|
| 4 |
+
Plugin URI: http://blogplay.com/plugin
|
| 5 |
Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
| 6 |
+
Version: 3.4.4
|
| 7 |
Author: Joost de Valk
|
| 8 |
+
Author URI: http://blogplay.com
|
| 9 |
|
| 10 |
Copyright 2006 Peter Harkins (ph@malaprop.org)
|
| 11 |
Copyright 2008-2009 Joost de Valk (joost@yoast.com)
|
| 563 |
function sociable_html($display=array()) {
|
| 564 |
global $sociable_known_sites, $sociablepluginpath, $wp_query, $post;
|
| 565 |
|
| 566 |
+
if (get_post_meta($post->ID,'_sociableoff',true)) {
|
| 567 |
+
return "";
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
/**
|
| 571 |
* Make it possible for other plugins or themes to add buttons to Sociable
|
| 572 |
*/
|
| 573 |
$sociable_known_sites = apply_filters('sociable_known_sites',$sociable_known_sites);
|
| 574 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 575 |
$active_sites = get_option('sociable_active_sites');
|
| 576 |
|
| 577 |
// If a path is specified where Sociable should find its images, use that, otherwise,
|
| 651 |
/**
|
| 652 |
* if awe.sm is enabled and it is an awe.sm supported site, use awe.sm
|
| 653 |
*/
|
| 654 |
+
$permalink = str_replace('&', '%2526', $permalink);
|
| 655 |
$destination = str_replace('PERMALINK', 'TARGET', $url);
|
| 656 |
$destination = str_replace('&', '%26', $destination);
|
| 657 |
$channel = urlencode($site['awesm_channel']);
|
| 700 |
if (get_option('sociable_usetargetblank')) {
|
| 701 |
$link .= " target=\"_blank\"";
|
| 702 |
}
|
| 703 |
+
$link .= " href=\"javascript:window.location='".urlencode($url)."';\" title=\"$description\">";
|
| 704 |
|
| 705 |
/**
|
| 706 |
* If the option to use text links is enabled in the backend, display a text link, otherwise,
|
| 770 |
* Set the default settings on activation on the plugin.
|
| 771 |
*/
|
| 772 |
function sociable_activation_hook() {
|
| 773 |
+
global $wpdb;
|
| 774 |
+
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = 'sociableoff'");
|
| 775 |
return sociable_restore_config(false);
|
| 776 |
}
|
| 777 |
register_activation_hook(__FILE__, 'sociable_activation_hook');
|
| 810 |
'is_feed' => False,
|
| 811 |
));
|
| 812 |
|
| 813 |
+
if ( $force OR !( get_option('sociable_usecss') ) )
|
| 814 |
update_option('sociable_usecss', true);
|
| 815 |
}
|
| 816 |
|
| 886 |
function sociable_meta() {
|
| 887 |
global $post;
|
| 888 |
$sociableoff = false;
|
| 889 |
+
if (get_post_meta($post->ID,'_sociableoff',true)) {
|
|
|
|
| 890 |
$sociableoff = true;
|
| 891 |
+
}
|
| 892 |
?>
|
| 893 |
<input type="checkbox" id="sociableoff" name="sociableoff" <?php checked($sociableoff); ?>/> <label for="sociableoff"><?php _e('Sociable disabled?','sociable') ?></label>
|
| 894 |
<?php
|
| 904 |
add_action('admin_menu', 'sociable_meta_box');
|
| 905 |
|
| 906 |
/**
|
| 907 |
+
* If the post is inserted, set the appropriate state for the sociable off setting.
|
| 908 |
*/
|
| 909 |
function sociable_insert_post($pID) {
|
| 910 |
+
if (isset($_POST['sociableoff'])) {
|
| 911 |
+
if (!get_post_meta($post->ID,'_sociableoff',true))
|
| 912 |
+
add_post_meta($pID, '_sociableoff', true, true);
|
| 913 |
+
} else {
|
| 914 |
+
if (get_post_meta($post->ID,'_sociableoff',true))
|
| 915 |
+
delete_post_meta($pID, '_sociableoff');
|
| 916 |
+
}
|
| 917 |
}
|
| 918 |
add_action('wp_insert_post', 'sociable_insert_post');
|
| 919 |
|
| 1062 |
*/
|
| 1063 |
$conditionals = get_option('sociable_conditionals');
|
| 1064 |
?>
|
| 1065 |
+
<input type="checkbox" name="conditionals[is_home]"<?php checked($conditionals['is_home']); ?> /> <?php _e("Front page of the blog", 'sociable'); ?><br/>
|
| 1066 |
+
<input type="checkbox" name="conditionals[is_single]"<?php checked($conditionals['is_single']); ?> /> <?php _e("Individual blog posts", 'sociable'); ?><br/>
|
| 1067 |
+
<input type="checkbox" name="conditionals[is_page]"<?php checked($conditionals['is_page']); ?> /> <?php _e('Individual WordPress "Pages"', 'sociable'); ?><br/>
|
| 1068 |
+
<input type="checkbox" name="conditionals[is_category]"<?php checked($conditionals['is_category']); ?> /> <?php _e("Category archives", 'sociable'); ?><br/>
|
| 1069 |
+
<input type="checkbox" name="conditionals[is_tag]"<?php checked($conditionals['is_tag']); ?> /> <?php _e("Tag listings", 'sociable'); ?><br/>
|
| 1070 |
+
<input type="checkbox" name="conditionals[is_date]"<?php checked($conditionals['is_date']); ?> /> <?php _e("Date-based archives", 'sociable'); ?><br/>
|
| 1071 |
+
<input type="checkbox" name="conditionals[is_author]"<?php checked($conditionals['is_author']); ?> /> <?php _e("Author archives", 'sociable'); ?><br/>
|
| 1072 |
+
<input type="checkbox" name="conditionals[is_search]"<?php checked($conditionals['is_search']); ?> /> <?php _e("Search results", 'sociable'); ?><br/>
|
| 1073 |
+
<input type="checkbox" name="conditionals[is_feed]"<?php checked($conditionals['is_feed']); ?> /> <?php _e("RSS feed items", 'sociable'); ?><br/>
|
| 1074 |
</td>
|
| 1075 |
</tr>
|
| 1076 |
<tr>
|
