AddToAny Share Buttons - Version 0.9.9.3.4

Version Description

Download this release

Release Info

Developer micropat
Plugin Icon 128x128 AddToAny Share Buttons
Version 0.9.9.3.4
Comparing to
See all releases

Code changes from version 0.9.9.3.3 to 0.9.9.3.4

Files changed (2) hide show
  1. README.txt +5 -1
  2. add-to-any.php +15 -10
README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.addtoany.com/contact/
4
  Tags: bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, sharing, share, sharethis, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, twitter, stumbleupon, technorati, wpmu, addtoany, add, any
5
  Requires at least: 2.0
6
  Tested up to: 2.8.2
7
- Stable tag: 0.9.9.3.3
8
 
9
  Help readers share, save, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Digg, Delicious and over 100 more.
10
 
@@ -106,6 +106,10 @@ This is done to overcome browser limitations that prevent the drop-down menu fro
106
 
107
  == Changelog ==
108
 
 
 
 
 
109
  = .9.9.3.3 =
110
  * Left-padding for icon+text link changed from 39px to 30px
111
  * Text-index for parent UL reset
4
  Tags: bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, sharing, share, sharethis, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, twitter, stumbleupon, technorati, wpmu, addtoany, add, any
5
  Requires at least: 2.0
6
  Tested up to: 2.8.2
7
+ Stable tag: 0.9.9.3.4
8
 
9
  Help readers share, save, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Digg, Delicious and over 100 more.
10
 
106
 
107
  == Changelog ==
108
 
109
+ = .9.9.3.4 =
110
+ * Use button IMG instead of background-image for button without text
111
+ * Defaults to 171 x 16px button
112
+
113
  = .9.9.3.3 =
114
  * Left-padding for icon+text link changed from 39px to 30px
115
  * Text-index for parent UL reset
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Add to Any: Share/Bookmark/Email Button
4
  Plugin URI: http://www.addtoany.com/
5
  Description: Help readers share, save, bookmark, and email your posts and pages using any service. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
- Version: .9.9.3.3
7
  Author: Add to Any
8
  Author URI: http://www.addtoany.com/contact/
9
  */
@@ -96,8 +96,8 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = false ) {
96
  $button_target = (get_option('A2A_SHARE_SAVE_button_opens_new_window')=='1' && (get_option('A2A_SHARE_SAVE_onclick')!='1')) ? ' target="_blank"' : '';
97
 
98
  if( !get_option('A2A_SHARE_SAVE_button') ) {
99
- $button_fname = 'share_save_120_16.png';
100
- $button_width = ' width="120"';
101
  $button_height = ' height="16"';
102
  $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
103
  } else if( get_option('A2A_SHARE_SAVE_button') == 'CUSTOM' ) {
@@ -112,18 +112,23 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = false ) {
112
  $button_width = ' width="'.$button_attrs[1].'"';
113
  $button_height = ' height="'.$button_attrs[2].'"';
114
  $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
 
115
  }
116
- if( $button_attrs[0] == 'favicon.png' || $button_attrs[0] == 'share_16_16.png' ) {
 
117
  if( !is_feed() ) {
118
  $style_bg = 'background:url('.$A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname.') no-repeat scroll 9px 0px'; // padding-left:9 (9=other icons padding)
119
  $style_bg = ';' . $style_bg . ' !important;';
120
  $style = ' style="'.$style_bg.'padding:0 0 0 30px;display:inline-block;height:16px;line-height:16px;vertical-align:middle;"'; // padding-left:30+9 (9=other icons padding)
121
  }
122
- $button = stripslashes(get_option('A2A_SHARE_SAVE_button_text'));
123
- } else if( $button_text ) {
 
124
  $button = $button_text;
125
- } else
126
- $button = '<img src="'.$button_src.'"'.$button_width.$button_height.' alt="Share/Save/Bookmark"/>';
 
 
127
 
128
  $button_html = $html_wrap_open.'<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?'
129
  .'linkurl='.$linkurl_enc
@@ -429,13 +434,13 @@ function A2A_SHARE_SAVE_options_page() {
429
  <input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-6].checked=true" style="vertical-align:middle;width:150px"
430
  value="<?php echo (get_option('A2A_SHARE_SAVE_button_text') !== FALSE) ? stripslashes(get_option('A2A_SHARE_SAVE_button_text')) : "Share/Save"; ?>" /><br>
431
  <label>
432
- <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if( !get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button' )=='share_save_120_16.png|120|16' ) echo ' checked="checked"'; ?>
433
  style="margin:9px 0;vertical-align:middle">
434
  <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_120_16.png'; ?>" width="120" height="16" border="0" style="padding:9px;vertical-align:middle"
435
  onclick="this.parentNode.firstChild.checked=true"/>
436
  </label><br>
437
  <label>
438
- <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_171_16.png|171|16') echo ' checked="checked"'; ?>
439
  style="margin:9px 0;vertical-align:middle">
440
  <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_171_16.png'; ?>" width="171" height="16" border="0" style="padding:9px;vertical-align:middle"
441
  onclick="this.parentNode.firstChild.checked=true"/>
3
  Plugin Name: Add to Any: Share/Bookmark/Email Button
4
  Plugin URI: http://www.addtoany.com/
5
  Description: Help readers share, save, bookmark, and email your posts and pages using any service. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
+ Version: .9.9.3.4
7
  Author: Add to Any
8
  Author URI: http://www.addtoany.com/contact/
9
  */
96
  $button_target = (get_option('A2A_SHARE_SAVE_button_opens_new_window')=='1' && (get_option('A2A_SHARE_SAVE_onclick')!='1')) ? ' target="_blank"' : '';
97
 
98
  if( !get_option('A2A_SHARE_SAVE_button') ) {
99
+ $button_fname = 'share_save_171_16.png';
100
+ $button_width = ' width="171"';
101
  $button_height = ' height="16"';
102
  $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
103
  } else if( get_option('A2A_SHARE_SAVE_button') == 'CUSTOM' ) {
112
  $button_width = ' width="'.$button_attrs[1].'"';
113
  $button_height = ' height="'.$button_attrs[2].'"';
114
  $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
115
+ $button_text = stripslashes(get_option('A2A_SHARE_SAVE_button_text'));
116
  }
117
+
118
+ if( $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png' ) {
119
  if( !is_feed() ) {
120
  $style_bg = 'background:url('.$A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname.') no-repeat scroll 9px 0px'; // padding-left:9 (9=other icons padding)
121
  $style_bg = ';' . $style_bg . ' !important;';
122
  $style = ' style="'.$style_bg.'padding:0 0 0 30px;display:inline-block;height:16px;line-height:16px;vertical-align:middle;"'; // padding-left:30+9 (9=other icons padding)
123
  }
124
+ }
125
+
126
+ if( $button_text && (!$button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
127
  $button = $button_text;
128
+ } else {
129
+ $style = '';
130
+ $button = '<img src="'.$button_src.'"'.$button_width.$button_height.' alt="Share/Bookmark"/>';
131
+ }
132
 
133
  $button_html = $html_wrap_open.'<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?'
134
  .'linkurl='.$linkurl_enc
434
  <input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-6].checked=true" style="vertical-align:middle;width:150px"
435
  value="<?php echo (get_option('A2A_SHARE_SAVE_button_text') !== FALSE) ? stripslashes(get_option('A2A_SHARE_SAVE_button_text')) : "Share/Save"; ?>" /><br>
436
  <label>
437
+ <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button' )=='share_save_120_16.png|120|16') echo ' checked="checked"'; ?>
438
  style="margin:9px 0;vertical-align:middle">
439
  <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_120_16.png'; ?>" width="120" height="16" border="0" style="padding:9px;vertical-align:middle"
440
  onclick="this.parentNode.firstChild.checked=true"/>
441
  </label><br>
442
  <label>
443
+ <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if( !get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button')=='share_save_171_16.png|171|16' ) echo ' checked="checked"'; ?>
444
  style="margin:9px 0;vertical-align:middle">
445
  <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_171_16.png'; ?>" width="171" height="16" border="0" style="padding:9px;vertical-align:middle"
446
  onclick="this.parentNode.firstChild.checked=true"/>