Sociable - Version 3.3.7

Version Description

  • More bugfixery.
Download this release

Release Info

Developer joostdevalk
Plugin Icon wp plugin Sociable
Version 3.3.7
Comparing to
See all releases

Code changes from version 3.3.6 to 3.3.7

Files changed (2) hide show
  1. readme.txt +4 -1
  2. sociable.php +19 -13
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.3.6
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.6 =
28
  * Reverted plugin URL fix because of too many people on old WordPress installations complaining. (Upgrade, people, upgrade!)
29
  * Added PHPDoc throughout the plugins code.
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.3.7
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.3.7 =
28
+ * More bugfixery.
29
+
30
  = 3.3.6 =
31
  * Reverted plugin URL fix because of too many people on old WordPress installations complaining. (Upgrade, people, upgrade!)
32
  * Added PHPDoc throughout the plugins code.
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.3.5
7
  Author: Joost de Valk
8
  Author URI: http://yoast.com/
9
 
@@ -25,8 +25,10 @@ along with this program; if not, write to the Free Software
25
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
  */
27
 
28
- // Determine the location
29
- $sociablepluginpath = plugins_url('', __FILE__).'/';
 
 
30
 
31
  /**
32
  * This function makes sure Sociable is able to load the different language files from
@@ -1032,7 +1034,7 @@ function sociable_submenu() {
1032
  <?php _e("Use CSS:", "sociable"); ?>
1033
  </th>
1034
  <td>
1035
- <input type="checkbox" name="usecss" <?php checked( get_option('sociable_usecss'), false ); ?> /> <?php _e("Use the sociable stylesheet?", "sociable"); ?>
1036
  </td>
1037
  </tr>
1038
  <tr>
@@ -1057,7 +1059,7 @@ function sociable_submenu() {
1057
  <?php _e("Open in new window:", "sociable"); ?>
1058
  </th>
1059
  <td>
1060
- <input type="checkbox" name="usetargetblank" <?php echo (get_option('sociable_usetargetblank')) ? ' checked="checked"' : ''; ?> /> <?php _e("Use <code>target=_blank</code> on links? (Forces links to open a new window)", "sociable"); ?>
1061
  </td>
1062
  </tr>
1063
  <tr>
@@ -1066,7 +1068,7 @@ function sociable_submenu() {
1066
  </th>
1067
  <td>
1068
  <?php _e("You can choose to automatically have the links posted to certain sites shortened via awe.sm and encoded with the channel info and your API Key.", 'sociable'); ?><br/>
1069
- <input type="checkbox" name="awesmenable" <?php echo (get_option('sociable_awesmenable')) ? ' checked="checked"' : ''; ?> /> <?php _e("Enable awe.sm URLs?", "sociable"); ?><br/>
1070
  <?php _e("awe.sm API Key:", 'sociable'); ?> <input size="65" type="text" name="awesmapikey" value="<?php echo get_option('sociable_awesmapikey'); ?>" />
1071
  </td>
1072
  </tr>
@@ -1098,6 +1100,9 @@ function sociable_submenu() {
1098
  <?php
1099
  }
1100
 
 
 
 
1101
  function sociable_add_ozh_adminmenu_icon( $hook ) {
1102
  static $sociableicon;
1103
  if (!$sociableicon) {
@@ -1106,7 +1111,12 @@ function sociable_add_ozh_adminmenu_icon( $hook ) {
1106
  if ($hook == 'Sociable') return $sociableicon;
1107
  return $hook;
1108
  }
 
1109
 
 
 
 
 
1110
  function sociable_filter_plugin_actions( $links, $file ){
1111
  // Static so we don't call plugin_basename on every plugin row.
1112
  static $this_plugin;
@@ -1118,15 +1128,11 @@ function sociable_filter_plugin_actions( $links, $file ){
1118
  }
1119
  return $links;
1120
  }
1121
-
1122
  add_filter( 'plugin_action_links', 'sociable_filter_plugin_actions', 10, 2 );
1123
- add_filter( 'ozh_adminmenu_icon', 'sociable_add_ozh_adminmenu_icon' );
1124
-
1125
- if (get_option('sociable_usecss_set_once') != true) {
1126
- update_option('sociable_usecss', true);
1127
- update_option('sociable_usecss_set_once', true);
1128
- }
1129
 
 
 
 
1130
  if (!function_exists('yst_db_widget')) {
1131
  function yst_text_limit( $text, $limit, $finish = ' [&hellip;]') {
1132
  if( strlen( $text ) > $limit ) {
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.3.7
7
  Author: Joost de Valk
8
  Author URI: http://yoast.com/
9
 
25
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
  */
27
 
28
+ /**
29
+ * Determine the location
30
+ */
31
+ $sociablepluginpath = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/';
32
 
33
  /**
34
  * This function makes sure Sociable is able to load the different language files from
1034
  <?php _e("Use CSS:", "sociable"); ?>
1035
  </th>
1036
  <td>
1037
+ <input type="checkbox" name="usecss" <?php checked( get_option('sociable_usecss'), true ); ?> /> <?php _e("Use the sociable stylesheet?", "sociable"); ?>
1038
  </td>
1039
  </tr>
1040
  <tr>
1059
  <?php _e("Open in new window:", "sociable"); ?>
1060
  </th>
1061
  <td>
1062
+ <input type="checkbox" name="usetargetblank" <?php checked( get_option('sociable_usetargetblank'), true ); ?> /> <?php _e("Use <code>target=_blank</code> on links? (Forces links to open a new window)", "sociable"); ?>
1063
  </td>
1064
  </tr>
1065
  <tr>
1068
  </th>
1069
  <td>
1070
  <?php _e("You can choose to automatically have the links posted to certain sites shortened via awe.sm and encoded with the channel info and your API Key.", 'sociable'); ?><br/>
1071
+ <input type="checkbox" name="awesmenable" <?php checked( get_option('sociable_awesmenable'), true ); ?> /> <?php _e("Enable awe.sm URLs?", "sociable"); ?><br/>
1072
  <?php _e("awe.sm API Key:", 'sociable'); ?> <input size="65" type="text" name="awesmapikey" value="<?php echo get_option('sociable_awesmapikey'); ?>" />
1073
  </td>
1074
  </tr>
1100
  <?php
1101
  }
1102
 
1103
+ /**
1104
+ * Add an icon for the Sociable plugin's settings page to the dropdown for Ozh's admin dropdown menu
1105
+ */
1106
  function sociable_add_ozh_adminmenu_icon( $hook ) {
1107
  static $sociableicon;
1108
  if (!$sociableicon) {
1111
  if ($hook == 'Sociable') return $sociableicon;
1112
  return $hook;
1113
  }
1114
+ add_filter( 'ozh_adminmenu_icon', 'sociable_add_ozh_adminmenu_icon' );
1115
 
1116
+ /**
1117
+ * Add a settings link to the Plugins page, so people can go straight from the plugin page to the
1118
+ * settings page.
1119
+ */
1120
  function sociable_filter_plugin_actions( $links, $file ){
1121
  // Static so we don't call plugin_basename on every plugin row.
1122
  static $this_plugin;
1128
  }
1129
  return $links;
1130
  }
 
1131
  add_filter( 'plugin_action_links', 'sociable_filter_plugin_actions', 10, 2 );
 
 
 
 
 
 
1132
 
1133
+ /**
1134
+ * Add the Yoast.com RSS feed to the WordPress dashboard
1135
+ */
1136
  if (!function_exists('yst_db_widget')) {
1137
  function yst_text_limit( $text, $limit, $finish = ' [&hellip;]') {
1138
  if( strlen( $text ) > $limit ) {