WordPress Share Buttons Plugin – AddThis - Version 1.6.4

Version Description

  • Fixed parse bug with "static" menu option
  • Fixed regression of brand option
Download this release

Release Info

Developer _mjk_
Plugin Icon 128x128 WordPress Share Buttons Plugin – AddThis
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

Files changed (2) hide show
  1. addthis_social_widget.php +8 -6
  2. readme.txt +9 -0
addthis_social_widget.php CHANGED
@@ -27,7 +27,7 @@ else return;
27
  * Plugin Name: AddThis Social Bookmarking Widget
28
  * Plugin URI: http://www.addthis.com
29
  * Description: Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content--which services they're using for sharing, which content is shared the most, and more. It's all free--even the pretty charts and graphs.
30
- * Version: 1.6.3
31
  *
32
  * Author: The AddThis Team
33
  * Author URI: http://www.addthis.com
@@ -320,11 +320,11 @@ function addthis_social_widget($content, $sidebar = false)
320
  $title = urlencode($sidebar ? get_bloginfo('title') : the_title('', '', false));
321
  $addthis_options = $addthis_settings['options'];
322
 
323
- $content .= "\n<!-- AddThis Button BEGIN -->\n".'<script type="text/javascript">'."\n//<!--";
324
 
325
  if (strlen($addthis_settings['customization']))
326
  {
327
- $content .= ($addthis_settings['customization']);
328
  }
329
 
330
  if ($addthis_settings['menu_type'] === 'dropdown')
@@ -356,6 +356,7 @@ EOF;
356
  else
357
  {
358
  $content .= <<<EOF
 
359
  </script>
360
  <div class="addthis_container"><a href="http://www.addthis.com/bookmark.php?v=250&amp;username=$pub" onclick="window.open('http://www.addthis.com/bookmark.php?v=250&username=$pub&amp;url=$link&amp;title=$title', 'ext_addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank">
361
  EOF;
@@ -373,6 +374,7 @@ function addthis_get_button_img()
373
  {
374
  global $addthis_settings;
375
  global $addthis_styles;
 
376
 
377
  $btnStyle = $addthis_settings['style'];
378
  if ($addthis_settings['language'] != 'en')
@@ -390,10 +392,10 @@ function addthis_get_button_img()
390
  if (!isset($addthis_styles[$btnStyle])) $btnStyle = 'share';
391
  $btnRecord = $addthis_styles[$btnStyle];
392
  $btnUrl = (strpos(trim($btnRecord['img']), 'http://') !== 0 ? "http://s7.addthis.com/static/btn/v2/" : "") . $btnRecord['img'];
393
-
394
  if (strpos($btnUrl, '%lang%') !== false)
395
  {
396
- $btnUrl = str_replace('%lang%',$addthis_settings['language'], $btnUrl);
397
  }
398
  $btnWidth = $btnRecord['w'];
399
  $btnHeight = $btnRecord['h'];
@@ -522,7 +524,7 @@ function addthis_plugin_options_php4() {
522
  <td><input type="text" name="addthis_brand" value="<?php echo get_option('addthis_brand'); ?>" /></td>
523
  </tr>
524
  <tr valign="top">
525
- <th scope="row"><?php _e("Dropdown/Toolbox Services:", 'addthis_trans_domain'); ?> <br/> <span style="font-size:10px">(comma-separated)</span></th>
526
  <td><input type="text" name="addthis_options" value="<?php echo get_option('addthis_options'); ?>" size="80"/></td>
527
  </tr>
528
  <tr valign="top">
27
  * Plugin Name: AddThis Social Bookmarking Widget
28
  * Plugin URI: http://www.addthis.com
29
  * Description: Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content--which services they're using for sharing, which content is shared the most, and more. It's all free--even the pretty charts and graphs.
30
+ * Version: 1.6.4
31
  *
32
  * Author: The AddThis Team
33
  * Author URI: http://www.addthis.com
320
  $title = urlencode($sidebar ? get_bloginfo('title') : the_title('', '', false));
321
  $addthis_options = $addthis_settings['options'];
322
 
323
+ $content .= "\n<!-- AddThis Button BEGIN -->\n".'<script type="text/javascript">'."\n//<!--\n";
324
 
325
  if (strlen($addthis_settings['customization']))
326
  {
327
+ $content .= ($addthis_settings['customization']) . "\n";
328
  }
329
 
330
  if ($addthis_settings['menu_type'] === 'dropdown')
356
  else
357
  {
358
  $content .= <<<EOF
359
+ //-->
360
  </script>
361
  <div class="addthis_container"><a href="http://www.addthis.com/bookmark.php?v=250&amp;username=$pub" onclick="window.open('http://www.addthis.com/bookmark.php?v=250&username=$pub&amp;url=$link&amp;title=$title', 'ext_addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank">
362
  EOF;
374
  {
375
  global $addthis_settings;
376
  global $addthis_styles;
377
+ $language = $addthis_settings['language'];
378
 
379
  $btnStyle = $addthis_settings['style'];
380
  if ($addthis_settings['language'] != 'en')
392
  if (!isset($addthis_styles[$btnStyle])) $btnStyle = 'share';
393
  $btnRecord = $addthis_styles[$btnStyle];
394
  $btnUrl = (strpos(trim($btnRecord['img']), 'http://') !== 0 ? "http://s7.addthis.com/static/btn/v2/" : "") . $btnRecord['img'];
395
+
396
  if (strpos($btnUrl, '%lang%') !== false)
397
  {
398
+ $btnUrl = str_replace('%lang%', strlen($language) ? $language : 'en', $btnUrl);
399
  }
400
  $btnWidth = $btnRecord['w'];
401
  $btnHeight = $btnRecord['h'];
524
  <td><input type="text" name="addthis_brand" value="<?php echo get_option('addthis_brand'); ?>" /></td>
525
  </tr>
526
  <tr valign="top">
527
+ <th scope="row"><?php _e("Dropdown/Toolbox Services:", 'addthis_trans_domain'); ?> <br/> <span style="font-size:10px">(comma-separated <a href="http://addthis.com/services">service codes</a>)</span></th>
528
  <td><input type="text" name="addthis_options" value="<?php echo get_option('addthis_options'); ?>" size="80"/></td>
529
  </tr>
530
  <tr valign="top">
readme.txt CHANGED
@@ -14,6 +14,10 @@ Sign up for a free AddThis.com account to see how your visitors are sharing your
14
 
15
  Over 900,000 sites have installed AddThis. Join us!
16
 
 
 
 
 
17
  == Installation ==
18
 
19
  1. Upload `addthis_social_widget.php` to the `/wp-content/plugins/` directory
@@ -64,10 +68,15 @@ PHP 5+ is preferred; PHP 4 is supported.
64
 
65
  == Changelog ==
66
 
 
 
 
 
67
  = 1.6.3 =
68
  * Added template tags. &lt;?php do_action( 'addthis_widget' ); ?&gt; in your template will print an AddThis button or toolbox, per your configuration.
69
  * Added <a href="http://addthis.com/blog/2010/03/11/clickback-analytics-measure-traffic-back-to-your-site-from-addthis/">clickback</a> tracking.
70
  * Added "Automatic" language option. We'll auto-translate the AddThis button and menu into our supported languages depending on your users' settings.
 
71
 
72
  = 1.6.2 =
73
  Fixed name conflict with get_wp_version() (renamed to addthis_get_wp_version()), affecting users with the k2 theme.
14
 
15
  Over 900,000 sites have installed AddThis. Join us!
16
 
17
+
18
+
19
+ <a href="http://www.addthis.com/blog">AddThis Blog</a> | <a href="http://www.addthis.com/privacy">Privacy Policy</a>
20
+
21
  == Installation ==
22
 
23
  1. Upload `addthis_social_widget.php` to the `/wp-content/plugins/` directory
68
 
69
  == Changelog ==
70
 
71
+ = 1.6.4 =
72
+ * Fixed parse bug with "static" menu option
73
+ * Fixed regression of brand option
74
+
75
  = 1.6.3 =
76
  * Added template tags. &lt;?php do_action( 'addthis_widget' ); ?&gt; in your template will print an AddThis button or toolbox, per your configuration.
77
  * Added <a href="http://addthis.com/blog/2010/03/11/clickback-analytics-measure-traffic-back-to-your-site-from-addthis/">clickback</a> tracking.
78
  * Added "Automatic" language option. We'll auto-translate the AddThis button and menu into our supported languages depending on your users' settings.
79
+ * Fixed script showing up in some trackback summaries.
80
 
81
  = 1.6.2 =
82
  Fixed name conflict with get_wp_version() (renamed to addthis_get_wp_version()), affecting users with the k2 theme.