WordPress Share Buttons Plugin – AddThis - Version 2.2.1

Version Description

  • Fix compatability with 3.2
  • Fix over agressive regular expression
Download this release

Release Info

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

Code changes from version 2.2.0 to 2.2.1

addthis_settings_functions.php CHANGED
@@ -45,7 +45,7 @@ function addthis_kses($string)
45
  }
46
  foreach($posttags as $attr)
47
  {
48
- $post_pattern[] = '/'.$attr.'/';
49
  }
50
  $temp_string = preg_replace( $pre_pattern, $posttags, $string);
51
  $new_temp_string = wp_kses($temp_string, $mytags);
@@ -63,6 +63,8 @@ function addthis_kses($string)
63
  function _addthis_choose_icons($name, $options)
64
  {
65
  $addthis_new_styles = _get_style_options();
 
 
66
  extract($options);
67
  if ($name == 'above')
68
  {
@@ -135,6 +137,7 @@ function addthis_kses($string)
135
  echo "</ul></div>";
136
 
137
  $class = 'hidden';
 
138
  if ($option == 'custom_string' || $option == 'none' && 'custom_strin' == $addthis_default_options[$name] )
139
  {
140
  $checked = 'checked="checked"';
@@ -142,9 +145,8 @@ function addthis_kses($string)
142
  }
143
 
144
  echo "<div class='$name"."_option select_row $class '> <input $checked type='radio' value='custom_string' name='addthis_settings[$name]' id='$name"."_custom_string' />Custom Button</input>";
145
-
146
  echo "<br />";
147
- echo "<textarea rows='5' cols='120' name='addthis_settings[$name"."_custom_string]' value=' $custom_string' id='$name"."_custom_string_input' />".($custom_string)."</textarea>";
148
 
149
  echo '</div>';
150
  ?>
45
  }
46
  foreach($posttags as $attr)
47
  {
48
+ $post_pattern[] = '/[^_]'.$attr.'/';
49
  }
50
  $temp_string = preg_replace( $pre_pattern, $posttags, $string);
51
  $new_temp_string = wp_kses($temp_string, $mytags);
63
  function _addthis_choose_icons($name, $options)
64
  {
65
  $addthis_new_styles = _get_style_options();
66
+ global $addthis_default_options;
67
+
68
  extract($options);
69
  if ($name == 'above')
70
  {
137
  echo "</ul></div>";
138
 
139
  $class = 'hidden';
140
+ $checked = '';
141
  if ($option == 'custom_string' || $option == 'none' && 'custom_strin' == $addthis_default_options[$name] )
142
  {
143
  $checked = 'checked="checked"';
145
  }
146
 
147
  echo "<div class='$name"."_option select_row $class '> <input $checked type='radio' value='custom_string' name='addthis_settings[$name]' id='$name"."_custom_string' />Custom Button</input>";
 
148
  echo "<br />";
149
+ echo "<textarea rows='5' cols='120' name='addthis_settings[$name"."_custom_string]' id='$name"."_custom_string_input' />".esc_textarea($custom_string)."</textarea>";
150
 
151
  echo '</div>';
152
  ?>
addthis_social_widget.php CHANGED
@@ -26,14 +26,14 @@ else return;
26
  * Plugin Name: AddThis Social Bookmarking Widget
27
  * Plugin URI: http://www.addthis.com
28
  * 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.
29
- * Version: 2.2.0
30
  *
31
  * Author: The AddThis Team
32
  * Author URI: http://www.addthis.com/blog
33
  */
34
 
35
  define( 'addthis_style_default' , 'small_toolbox_with_share');
36
- define( 'ADDTHIS_PLUGIN_VERSION', '2.2.0');
37
 
38
  $addthis_settings = array();
39
  $addthis_settings['isdropdown'] = 'true';
@@ -60,7 +60,7 @@ $addthis_new_styles = array(
60
 
61
  'small_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_" %s ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>', 'img' => 'toolbox-small.png', 'name' => 'Small Toolbox', 'above' => 'hidden ', 'below' => ''
62
  ), // 32x32
63
- 'plus_one_share_counter' => array( 'src' => '<div class="addthis_toolbox addthis_default_style" %s ><a class="addthis_button_google_plusone"></a><a class="addthis_counter addthis_pill_style"></a></div>', 'img' => 'plusone-share.gif', 'name' => 'Plus One and Share Counter', 'above'=> 'hidden', 'below'=>'hidden'), // +1
64
  'small_toolbox_with_share' => array( 'src' => '<div class="addthis_toolbox addthis_default_style " %s ><a href="//addthis.com/bookmark.php?v=250&amp;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>', 'img' => 'small-toolbox.jpg', 'name' => 'Small Toolbox with Share first', 'above' => '', 'below' => 'hidden'
65
  ), // Plus sign share | four buttons
66
  'large_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_32x32_style" %s ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>', 'img' => 'toolbox-large.png', 'name' => 'Large Toolbox', 'above' => 'hidden ', 'below' => ''
@@ -379,7 +379,7 @@ function addthis_admin_notices(){
379
  {
380
  echo '<div class="updated addthis_setup_nag"><p>';
381
  printf(__('Setup the AddThis plugin so you can start having your users share your content around the web<br /> <a href="%1$s">Setup options</a> | <a href="%2$s" id="php_below_min_nag-no">Ignore this notice</a>'),
382
- admin_url('options-general.php?page=' . __FILE__ ),
383
  '?addthis_nag_ignore=0');
384
  echo "</p></div>";
385
  }
@@ -388,7 +388,7 @@ function addthis_admin_notices(){
388
  {
389
  echo '<div class="updated addthis_setup_nag"><p>';
390
  printf( __('Sign up for AddThis and add your username/password to recieve analytics about how people are sharing your content.<br /> <a href="%1$s">Enter username and password</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="%2$s" target="_blank">Sign Up</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="%3$s">Ignore this notice</a>'),
391
- admin_url('options-general.php?page=' . __FILE__ ),
392
  'https://www.addthis.com/register?profile=wpp',
393
  '?addthis_nag_username_ignore=0');
394
  echo "</p></div>";
@@ -397,7 +397,7 @@ function addthis_admin_notices(){
397
  {
398
  echo '<div class="updated addthis_setup_nag"><p>';
399
  printf( __('We have updated the options for the AddThis plugin. Check out the <a href="%1$s">AddThis settings page</a> to see the new styles and options.<br /> <a href="%1$s">See New Options</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="%2$s">Ignore this notice</a>'),
400
- admin_url('options-general.php?page=' . __FILE__ ),
401
  '?addthis_nag_updated_ignore=0');
402
  echo "</p></div>";
403
  }
@@ -1115,7 +1115,7 @@ function addthis_late_widget($link_text)
1115
 
1116
 
1117
  $url_below = "addthis:url='$url' ";
1118
- $url_below .= "addthis:title='$title'";
1119
 
1120
  if (has_excerpt() && ! is_attachment() && isset($options['below']) && $options['below'] == 'custom')
1121
  {
@@ -1196,9 +1196,9 @@ function addthis_display_social_widget($content, $filtered = true, $below_excerp
1196
  $url = get_permalink();
1197
  $title = get_the_title();
1198
  $url_above = "addthis:url='$url' ";
1199
- $url_above .= "addthis:title='$title'";
1200
  $url_below = "addthis:url='$url' ";
1201
- $url_below .= "addthis:title='$title'";
1202
  $above = '';
1203
  $below = '';
1204
 
@@ -1266,9 +1266,19 @@ function addthis_display_social_widget($content, $filtered = true, $below_excerp
1266
  if ($display)
1267
  {
1268
  if ( isset($above) )
1269
- $content = sprintf($above, $url_above) . $content;
 
 
 
 
 
1270
  if ( isset($below) )
1271
- $content = $content . sprintf($below, $url_below);
 
 
 
 
 
1272
  if ($filtered == true)
1273
  add_filter('wp_trim_excerpt', 'addthis_remove_tag', 11, 2);
1274
  }
@@ -1517,7 +1527,7 @@ function addthis_options_page_style()
1517
 
1518
  function addthis_admin_menu()
1519
  {
1520
- $addthis = add_options_page('AddThis Plugin Options', 'AddThis', 'manage_options', __FILE__, 'addthis_plugin_options_php4');
1521
  add_action('admin_print_scripts-' . $addthis, 'addthis_options_page_scripts');
1522
  add_action('admin_print_styles-' . $addthis, 'addthis_options_page_style');
1523
  }
@@ -1817,6 +1827,17 @@ if (! function_exists('__return_true'))
1817
  }
1818
  }
1819
 
 
 
 
 
 
 
 
 
 
 
 
1820
  /**
1821
  * Make sure the option gets added on registration
1822
  * @since 2.0.6
26
  * Plugin Name: AddThis Social Bookmarking Widget
27
  * Plugin URI: http://www.addthis.com
28
  * 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.
29
+ * Version: 2.2.1
30
  *
31
  * Author: The AddThis Team
32
  * Author URI: http://www.addthis.com/blog
33
  */
34
 
35
  define( 'addthis_style_default' , 'small_toolbox_with_share');
36
+ define( 'ADDTHIS_PLUGIN_VERSION', '2.2.1');
37
 
38
  $addthis_settings = array();
39
  $addthis_settings['isdropdown'] = 'true';
60
 
61
  'small_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_" %s ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>', 'img' => 'toolbox-small.png', 'name' => 'Small Toolbox', 'above' => 'hidden ', 'below' => ''
62
  ), // 32x32
63
+ 'plus_one_share_counter' => array( 'src' => '<div class="addthis_toolbox addthis_default_style" %s ><a class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a class="addthis_counter addthis_pill_style"></a></div>', 'img' => 'plusone-share.gif', 'name' => 'Plus One and Share Counter', 'above'=> 'hidden', 'below'=>'hidden'), // +1
64
  'small_toolbox_with_share' => array( 'src' => '<div class="addthis_toolbox addthis_default_style " %s ><a href="//addthis.com/bookmark.php?v=250&amp;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>', 'img' => 'small-toolbox.jpg', 'name' => 'Small Toolbox with Share first', 'above' => '', 'below' => 'hidden'
65
  ), // Plus sign share | four buttons
66
  'large_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_32x32_style" %s ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>', 'img' => 'toolbox-large.png', 'name' => 'Large Toolbox', 'above' => 'hidden ', 'below' => ''
379
  {
380
  echo '<div class="updated addthis_setup_nag"><p>';
381
  printf(__('Setup the AddThis plugin so you can start having your users share your content around the web<br /> <a href="%1$s">Setup options</a> | <a href="%2$s" id="php_below_min_nag-no">Ignore this notice</a>'),
382
+ admin_url('options-general.php?page=' . basename(__FILE__) ),
383
  '?addthis_nag_ignore=0');
384
  echo "</p></div>";
385
  }
388
  {
389
  echo '<div class="updated addthis_setup_nag"><p>';
390
  printf( __('Sign up for AddThis and add your username/password to recieve analytics about how people are sharing your content.<br /> <a href="%1$s">Enter username and password</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="%2$s" target="_blank">Sign Up</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="%3$s">Ignore this notice</a>'),
391
+ admin_url('options-general.php?page=' . basename(__FILE__) ),
392
  'https://www.addthis.com/register?profile=wpp',
393
  '?addthis_nag_username_ignore=0');
394
  echo "</p></div>";
397
  {
398
  echo '<div class="updated addthis_setup_nag"><p>';
399
  printf( __('We have updated the options for the AddThis plugin. Check out the <a href="%1$s">AddThis settings page</a> to see the new styles and options.<br /> <a href="%1$s">See New Options</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="%2$s">Ignore this notice</a>'),
400
+ admin_url('options-general.php?page=' . basename(__FILE__) ),
401
  '?addthis_nag_updated_ignore=0');
402
  echo "</p></div>";
403
  }
1115
 
1116
 
1117
  $url_below = "addthis:url='$url' ";
1118
+ $url_below .= "addthis:title='". esc_attr( $title) ." '";
1119
 
1120
  if (has_excerpt() && ! is_attachment() && isset($options['below']) && $options['below'] == 'custom')
1121
  {
1196
  $url = get_permalink();
1197
  $title = get_the_title();
1198
  $url_above = "addthis:url='$url' ";
1199
+ $url_above .= "addthis:title='". esc_attr( $title) ." '";
1200
  $url_below = "addthis:url='$url' ";
1201
+ $url_below .= "addthis:title='". esc_attr( $title) ." '";
1202
  $above = '';
1203
  $below = '';
1204
 
1266
  if ($display)
1267
  {
1268
  if ( isset($above) )
1269
+ {
1270
+ if ($options['above'] == 'custom')
1271
+ $content = $above . $content;
1272
+ else
1273
+ $content = sprintf($above, $url_above) . $content;
1274
+ }
1275
  if ( isset($below) )
1276
+ {
1277
+ if ($options['below'] == 'custom')
1278
+ $content = $content . $below;
1279
+ else
1280
+ $content = $content . sprintf($below, $url_below);
1281
+ }
1282
  if ($filtered == true)
1283
  add_filter('wp_trim_excerpt', 'addthis_remove_tag', 11, 2);
1284
  }
1527
 
1528
  function addthis_admin_menu()
1529
  {
1530
+ $addthis = add_options_page('AddThis Plugin Options', 'AddThis', 'manage_options', basename(__FILE__), 'addthis_plugin_options_php4');
1531
  add_action('admin_print_scripts-' . $addthis, 'addthis_options_page_scripts');
1532
  add_action('admin_print_styles-' . $addthis, 'addthis_options_page_style');
1533
  }
1827
  }
1828
  }
1829
 
1830
+ if (! function_exists('esc_textarea'))
1831
+ {
1832
+ function esc_textarea($text)
1833
+ {
1834
+ $safe_text = htmlspecialchars( $text, ENT_QUOTES );
1835
+ return $safe_text;
1836
+ }
1837
+
1838
+ }
1839
+
1840
+
1841
  /**
1842
  * Make sure the option gets added on registration
1843
  * @since 2.0.6
img/plusone-share.gif ADDED
Binary file
js/options-page.32.js ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ $( "#tabs" ).tabs();
3
+
4
+ var thickDims, tbWidth, tbHeight;
5
+ thickDims = function() {
6
+ var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
7
+
8
+ w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 90;
9
+ h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 60;
10
+ if ( tbWindow.size() ) {
11
+ tbWindow.width(w).height(h);
12
+ $('#TB_iframeContent').width(w).height(h - 27);
13
+ tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
14
+ if ( typeof document.body.style.maxWidth != 'undefined' )
15
+ tbWindow.css({'top':'30px','margin-top':'0'});
16
+ }
17
+ };
18
+
19
+ $('a.thickbox-preview').click( function() {
20
+
21
+ var previewLink = this;
22
+
23
+ var $inputs = $('#addthis_settings :input');
24
+
25
+ var values = {};
26
+ $.each($('#addthis_settings').serializeArray(), function(i, field) {
27
+
28
+ var thisName = field.name
29
+ if (thisName.indexOf("addthis_settings[") != -1 )
30
+ {
31
+ thisName = thisName.replace("addthis_settings[", '');
32
+ thisName = thisName.replace("]", '');
33
+ }
34
+
35
+ values[thisName] = field.value;
36
+ });
37
+
38
+ var stuff = $.param(values, true);
39
+
40
+ var data = {
41
+ action: 'at_save_transient',
42
+ value : stuff
43
+ };
44
+
45
+ jQuery.post(ajaxurl, data, function(response) {
46
+ // Fix for WP 2.9's version of lightbox
47
+ if ( typeof tb_click != 'undefined' && $.isFunction(tb_click.call))
48
+ {
49
+ tb_click.call(previewLink);
50
+ }
51
+ var href = $(previewLink).attr('href');
52
+ var link = '';
53
+
54
+
55
+ if ( tbWidth = href.match(/&tbWidth=[0-9]+/) )
56
+ tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
57
+ else
58
+ tbWidth = $(window).width() - 90;
59
+
60
+ if ( tbHeight = href.match(/&tbHeight=[0-9]+/) )
61
+ tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
62
+ else
63
+ tbHeight = $(window).height() - 60;
64
+
65
+ $('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
66
+ $('#TB_closeAjaxWindow').css({'float':'left'});
67
+ $('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
68
+
69
+ $('#TB_iframeContent').width('100%');
70
+
71
+ thickDims();
72
+
73
+ });
74
+ return false;
75
+ });
76
+
77
+ $('#above_more').click( function() {
78
+ $('#above .select_row').removeClass('hidden');
79
+ $(this).hide();
80
+ return false;
81
+ });
82
+ $('#below_more').click( function() {
83
+ $('#below .select_row').removeClass('hidden');
84
+ $(this).hide();
85
+ return false;
86
+ });
87
+
88
+ var show_above = $('input[name="addthis_settings[show_above]"]');
89
+ var show_below = $('input[name="addthis_settings[show_below]"]');
90
+ if ( show_above.prop('checked') != "undefined" && show_above.prop('checked') == true)
91
+ {
92
+ $('.above_option').toggleClass('hide');
93
+ }
94
+
95
+ if ( show_below.prop('checked') != "undefined" && show_below.prop('checked') == true)
96
+ {
97
+ $('.below_option').toggleClass('hide');
98
+ }
99
+
100
+ $('input[name="addthis_settings[show_above]"]').change( function() {
101
+ $('.above_option').toggleClass('hide');
102
+ });
103
+
104
+ $('input[name="addthis_settings[show_below]"]').change( function() {
105
+ $('.below_option').toggleClass('hide');
106
+ });
107
+
108
+
109
+ var aboveCustom = $('#above_custom_button');
110
+ var aboveCustomShow = function(){
111
+ if ( aboveCustom.prop('checked') != 'undefined' && aboveCustom.prop('checked') == true)
112
+ {
113
+ $('.above_option_custom').removeClass('hidden');
114
+ }
115
+ else
116
+ {
117
+ $('.above_option_custom').addClass('hidden');
118
+ }
119
+ };
120
+ var belowCustom = $('#below_custom_button');
121
+ var belowCustomShow = function(){
122
+ if ( belowCustom.prop('checked') != 'undefined' && belowCustom.prop('checked') == true)
123
+ {
124
+ $('.below_option_custom').removeClass('hidden');
125
+ }
126
+ else
127
+ {
128
+ $('.below_option_custom').addClass('hidden');
129
+ }
130
+ };
131
+
132
+ var aboveCustomString = $('#above_custom_string');
133
+ var aboveCustomStringShow = function(){
134
+ if ( aboveCustomString.prop('checked') != 'undefined' && aboveCustomString.prop('checked') == true)
135
+ {
136
+ $('#above_custom_string_input').removeClass('hidden');
137
+ }
138
+ else
139
+ {
140
+ $('#above_custom_string_input').addClass('hidden');
141
+ }
142
+ };
143
+ var belowCustomString = $('#below_custom_string');
144
+ var belowCustomStringShow = function(){
145
+ if ( belowCustomString.prop('checked') != 'undefined' && belowCustomString.prop('checked') == true)
146
+ {
147
+ $('#below_custom_string_input').removeClass('hidden');
148
+ }
149
+ else
150
+ {
151
+ $('#below_custom_string_input').addClass('hidden');
152
+ }
153
+ };
154
+
155
+ aboveCustomShow();
156
+ belowCustomShow();
157
+ aboveCustomStringShow();
158
+ belowCustomStringShow();
159
+
160
+ $('input[name="addthis_settings[above]"]').change( function(){aboveCustomShow(); aboveCustomStringShow();} );
161
+ $('input[name="addthis_settings[below]"]').change( function(){belowCustomShow(); belowCustomStringShow();} );
162
+
163
+
164
+ });
js/options-page.js CHANGED
@@ -108,4 +108,57 @@ jQuery(document).ready(function($) {
108
  });
109
 
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  });
108
  });
109
 
110
 
111
+ var aboveCustom = $('#above_custom_button');
112
+ var aboveCustomShow = function(){
113
+ if ( aboveCustom.attr('checked') != 'undefined' && aboveCustom.attr('checked') == true)
114
+ {
115
+ $('.above_option_custom').removeClass('hidden');
116
+ }
117
+ else
118
+ {
119
+ $('.above_option_custom').addClass('hidden');
120
+ }
121
+ };
122
+ var belowCustom = $('#below_custom_button');
123
+ var belowCustomShow = function(){
124
+ if ( belowCustom.attr('checked') != 'undefined' && belowCustom.attr('checked') == true)
125
+ {
126
+ $('.below_option_custom').removeClass('hidden');
127
+ }
128
+ else
129
+ {
130
+ $('.below_option_custom').addClass('hidden');
131
+ }
132
+ };
133
+
134
+ var aboveCustomString = $('#above_custom_string');
135
+ var aboveCustomStringShow = function(){
136
+ if ( aboveCustomString.attr('checked') != 'undefined' && aboveCustomString.attr('checked') == true)
137
+ {
138
+ $('#above_custom_string_input').removeClass('hidden');
139
+ }
140
+ else
141
+ {
142
+ $('#above_custom_string_input').addClass('hidden');
143
+ }
144
+ };
145
+ var belowCustomString = $('#below_custom_string');
146
+ var belowCustomStringShow = function(){
147
+ if ( belowCustomString.attr('checked') != 'undefined' && belowCustomString.attr('checked') == true)
148
+ {
149
+ $('#below_custom_string_input').removeClass('hidden');
150
+ }
151
+ else
152
+ {
153
+ $('#below_custom_string_input').addClass('hidden');
154
+ }
155
+ };
156
+
157
+ aboveCustomShow();
158
+ belowCustomShow();
159
+ aboveCustomStringShow();
160
+ belowCustomStringShow();
161
+
162
+ $('input[name="addthis_settings[above]"]').change( function(){aboveCustomShow(); aboveCustomStringShow();} );
163
+ $('input[name="addthis_settings[below]"]').change( function(){belowCustomShow(); belowCustomStringShow();} );
164
  });
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: _mjk_, jorbin
3
  Tags: share, addthis, social, bookmark, sharing, bookmarking, widget,AddThis, addtoany, aim, bookmark, buzz, del.icio.us, Digg,e-mail, email, Facebook, google bookmarks, google buzz, myspace,network, NewsVine, Reddit, Share, share this, sharethis, social, socialize, stumbleupon, twitter, windows live, yahoo buzz
4
  Requires at least: 2.9
5
- Tested up to: 3.1.3
6
- Stable tag: 2.2.0
7
 
8
  The AddThis Social Bookmarking Widget allows any visitor to bookmark and share your site easily with many popular services.
9
 
@@ -74,6 +74,10 @@ In the screen options you can enable the AddThis meta box. Check the box and sa
74
  PHP 5+ is preferred; PHP 4 is supported.
75
 
76
  == Changelog ==
 
 
 
 
77
  = 2.2.0 =
78
  * More Customization Option
79
  * optionally shorten urls with one bit.ly account
@@ -163,6 +167,9 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
163
 
164
 
165
  == Upgrade Notice ==
 
 
 
166
  = 2.2.0 =
167
  More Customization options
168
 
2
  Contributors: _mjk_, jorbin
3
  Tags: share, addthis, social, bookmark, sharing, bookmarking, widget,AddThis, addtoany, aim, bookmark, buzz, del.icio.us, Digg,e-mail, email, Facebook, google bookmarks, google buzz, myspace,network, NewsVine, Reddit, Share, share this, sharethis, social, socialize, stumbleupon, twitter, windows live, yahoo buzz
4
  Requires at least: 2.9
5
+ Tested up to: 3.2.0
6
+ Stable tag: 2.2.1
7
 
8
  The AddThis Social Bookmarking Widget allows any visitor to bookmark and share your site easily with many popular services.
9
 
74
  PHP 5+ is preferred; PHP 4 is supported.
75
 
76
  == Changelog ==
77
+ = 2.2.1 =
78
+ * Fix compatability with 3.2
79
+ * Fix over agressive regular expression
80
+
81
  = 2.2.0 =
82
  * More Customization Option
83
  * optionally shorten urls with one bit.ly account
167
 
168
 
169
  == Upgrade Notice ==
170
+ = 2.2.1 =
171
+ Add 3.2 compatability
172
+
173
  = 2.2.0 =
174
  More Customization options
175