Version Description
- Add option to disable universal sharing button
- Disables the universal sharing button in automatic placement and ADDTOANY_SHARE_SAVE_KIT
- The universal sharing button is still available via ADDTOANY_SHARE_SAVE_BUTTON (see FAQ)
- Fix fieldset focusing in admin
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.2.7.6 |
Comparing to | |
See all releases |
Code changes from version 1.2.7.5 to 1.2.7.6
- README.txt +8 -2
- add-to-any.php +64 -43
README.txt
CHANGED
@@ -3,13 +3,13 @@ Contributors: micropat
|
|
3 |
Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.8
|
6 |
-
Stable tag: 1.2.7.
|
7 |
|
8 |
Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
-
The WordPress sharing plugin to help people
|
13 |
|
14 |
<a href="http://www.addtoany.com/" title="Sharing buttons">Share Buttons</a> (demo)
|
15 |
|
@@ -236,6 +236,12 @@ Upload the plugin directory (including all files and directories within) to the
|
|
236 |
|
237 |
== Changelog ==
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
= 1.2.7.5 =
|
240 |
* Update Facebook Like button
|
241 |
|
3 |
Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.8
|
6 |
+
Stable tag: 1.2.7.6
|
7 |
|
8 |
Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
+
The WordPress sharing plugin to help people share, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Pinterest, Google, Reddit, Tumblr, StumbleUpon, LinkedIn, and well over 100 more sharing and social bookmarking sites.
|
13 |
|
14 |
<a href="http://www.addtoany.com/" title="Sharing buttons">Share Buttons</a> (demo)
|
15 |
|
236 |
|
237 |
== Changelog ==
|
238 |
|
239 |
+
= 1.2.7.6 =
|
240 |
+
* Add option to disable universal sharing button
|
241 |
+
* Disables the universal sharing button in automatic placement and ADDTOANY_SHARE_SAVE_KIT
|
242 |
+
* The universal sharing button is still available via ADDTOANY_SHARE_SAVE_BUTTON (see FAQ)
|
243 |
+
* Fix fieldset focusing in admin
|
244 |
+
|
245 |
= 1.2.7.5 =
|
246 |
* Update Facebook Like button
|
247 |
|
add-to-any.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Share Buttons by AddToAny
|
4 |
Plugin URI: http://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
|
6 |
-
Version: 1.2.7.
|
7 |
Author: micropat
|
8 |
Author URI: http://www.addtoany.com/
|
9 |
*/
|
@@ -97,6 +97,13 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
|
97 |
|
98 |
$options = get_option('addtoany_options');
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
// Set a2a_kit_size_## class name unless "icon_size" is set to '16'
|
101 |
if ( !$options['icon_size'] )
|
102 |
$icon_size = ' a2a_kit_size_32';
|
@@ -241,7 +248,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
241 |
|
242 |
function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
243 |
|
244 |
-
// $args array = output_later, html_container_open, html_container_close, html_wrap_open, html_wrap_close, linkname, linkurl
|
245 |
|
246 |
global $A2A_SHARE_SAVE_plugin_url_path, $_addtoany_targets, $_addtoany_counter, $_addtoany_init;
|
247 |
|
@@ -263,6 +270,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
263 |
'html_container_close' => '',
|
264 |
'html_wrap_open' => '',
|
265 |
'html_wrap_close' => '',
|
|
|
266 |
);
|
267 |
|
268 |
$args = wp_parse_args( $args, $defaults );
|
@@ -285,44 +293,52 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
285 |
$button_href_querystring = ($is_feed) ? '#url=' . $linkurl_enc . '&title=' . $linkname_enc : '';
|
286 |
$options = get_option('addtoany_options');
|
287 |
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
$
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
if( isset($button_fname) && ($button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
|
309 |
-
if( ! $is_feed) {
|
310 |
-
$style_bg = 'background:url('.$A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname.') no-repeat scroll 4px 0px !important;';
|
311 |
-
$style = ' style="'.$style_bg.'padding:0 0 0 25px;display:inline-block;height:16px;vertical-align:middle"'; // padding-left:21+4 (4=other icons padding)
|
312 |
}
|
313 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
|
315 |
-
if( isset($button_text) && ( ! isset($button_fname) || ! $button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
|
316 |
-
$button = $button_text;
|
317 |
} else {
|
318 |
-
|
319 |
-
$
|
320 |
}
|
321 |
|
322 |
-
$button_html = $html_container_open . $html_wrap_open . '<a class="a2a_dd' . $button_class . ' addtoany_share_save" href="http://www.addtoany.com/share_save' .$button_href_querystring . '"' . $button_id
|
323 |
-
. $style . $button_target
|
324 |
-
. '>' . $button . '</a>';
|
325 |
-
|
326 |
// If not a feed
|
327 |
if( ! $is_feed ) {
|
328 |
if ($use_current_page) {
|
@@ -1102,15 +1118,15 @@ function A2A_SHARE_SAVE_options_page() {
|
|
1102 |
|
1103 |
<div class="addtoany_icon_size_small">
|
1104 |
<label>
|
1105 |
-
<input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if($options['button']=='favicon.png|16|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1106 |
<img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share','add-to-any'); ?>" title="+ <?php _e('Share','add-to-any'); ?>" onclick="this.parentNode.firstChild.checked=true"/>
|
1107 |
</label>
|
1108 |
-
<input name="A2A_SHARE_SAVE_button_favicon_16_16_text" type="text" class="code" size="50" onclick="
|
1109 |
<label style="padding-left:9px">
|
1110 |
-
<input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" type="radio"<?php if($options['button']=='share_16_16.png|16|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1111 |
<img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_16_16.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share','add-to-any'); ?>" title="+ <?php _e('Share','add-to-any'); ?>" onclick="this.parentNode.firstChild.checked=true"/>
|
1112 |
</label>
|
1113 |
-
<input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="
|
1114 |
<br>
|
1115 |
<label>
|
1116 |
<input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if($options['button']=='share_save_120_16.png|120|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
@@ -1130,16 +1146,21 @@ function A2A_SHARE_SAVE_options_page() {
|
|
1130 |
</div>
|
1131 |
|
1132 |
<label>
|
1133 |
-
<input name="A2A_SHARE_SAVE_button" value="CUSTOM" type="radio"<?php if( $options['button'] == 'CUSTOM' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1134 |
<span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
|
1135 |
</label>
|
1136 |
-
<input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="
|
1137 |
<br>
|
1138 |
<label>
|
1139 |
-
<input name="A2A_SHARE_SAVE_button" value="TEXT" type="radio"<?php if( $options['button'] == 'TEXT' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1140 |
<span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?>:</span>
|
1141 |
</label>
|
1142 |
-
<input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="
|
|
|
|
|
|
|
|
|
|
|
1143 |
|
1144 |
</fieldset></td>
|
1145 |
</tr>
|
3 |
Plugin Name: Share Buttons by AddToAny
|
4 |
Plugin URI: http://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
|
6 |
+
Version: 1.2.7.6
|
7 |
Author: micropat
|
8 |
Author URI: http://www.addtoany.com/
|
9 |
*/
|
97 |
|
98 |
$options = get_option('addtoany_options');
|
99 |
|
100 |
+
// If universal button disabled, and not manually disabled through args
|
101 |
+
if ( $options['button'] == 'NONE' && ! isset( $args['no_universal_button'] ) ) {
|
102 |
+
// Pass this setting on to ADDTOANY_SHARE_SAVE_BUTTON
|
103 |
+
// (and only via this ADDTOANY_SHARE_SAVE_KIT function because it is used for automatic placement)
|
104 |
+
$args['no_universal_button'] = true;
|
105 |
+
}
|
106 |
+
|
107 |
// Set a2a_kit_size_## class name unless "icon_size" is set to '16'
|
108 |
if ( !$options['icon_size'] )
|
109 |
$icon_size = ' a2a_kit_size_32';
|
248 |
|
249 |
function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
250 |
|
251 |
+
// $args array = output_later, html_container_open, html_container_close, html_wrap_open, html_wrap_close, linkname, linkurl, no_universal_button
|
252 |
|
253 |
global $A2A_SHARE_SAVE_plugin_url_path, $_addtoany_targets, $_addtoany_counter, $_addtoany_init;
|
254 |
|
270 |
'html_container_close' => '',
|
271 |
'html_wrap_open' => '',
|
272 |
'html_wrap_close' => '',
|
273 |
+
'no_universal_button' => FALSE,
|
274 |
);
|
275 |
|
276 |
$args = wp_parse_args( $args, $defaults );
|
293 |
$button_href_querystring = ($is_feed) ? '#url=' . $linkurl_enc . '&title=' . $linkname_enc : '';
|
294 |
$options = get_option('addtoany_options');
|
295 |
|
296 |
+
// If universal button is enabled
|
297 |
+
if ( ! $args['no_universal_button'] ) {
|
298 |
+
|
299 |
+
if ( ! $options['button'] || $options['button'] == 'A2A_SVG_32' ) {
|
300 |
+
// Skip button IMG for A2A icon insertion
|
301 |
+
$button_text = '';
|
302 |
+
} else if( $options['button'] == 'CUSTOM' ) {
|
303 |
+
$button_src = $options['button_custom'];
|
304 |
+
$button_width = '';
|
305 |
+
$button_height = '';
|
306 |
+
} else if( $options['button'] == 'TEXT' ) {
|
307 |
+
$button_text = stripslashes($options['button_text']);
|
308 |
+
} else {
|
309 |
+
$button_attrs = explode( '|', $options['button'] );
|
310 |
+
$button_fname = $button_attrs[0];
|
311 |
+
$button_width = ' width="'.$button_attrs[1].'"';
|
312 |
+
$button_height = ' height="'.$button_attrs[2].'"';
|
313 |
+
$button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
|
314 |
+
$button_text = stripslashes($options['button_text']);
|
|
|
|
|
|
|
|
|
|
|
315 |
}
|
316 |
+
|
317 |
+
$style = '';
|
318 |
+
|
319 |
+
if ( isset($button_fname) && ($button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
|
320 |
+
if ( ! $is_feed) {
|
321 |
+
$style_bg = 'background:url('.$A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname.') no-repeat scroll 4px 0px !important;';
|
322 |
+
$style = ' style="'.$style_bg.'padding:0 0 0 25px;display:inline-block;height:16px;vertical-align:middle"'; // padding-left:21+4 (4=other icons padding)
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
if ( isset($button_text) && ( ! isset($button_fname) || ! $button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
|
327 |
+
$button = $button_text;
|
328 |
+
} else {
|
329 |
+
$style = '';
|
330 |
+
$button = '<img src="'.$button_src.'"'.$button_width.$button_height.' alt="Share"/>';
|
331 |
+
}
|
332 |
+
|
333 |
+
$button_html = $html_container_open . $html_wrap_open . '<a class="a2a_dd' . $button_class . ' addtoany_share_save" href="http://www.addtoany.com/share_save' .$button_href_querystring . '"' . $button_id
|
334 |
+
. $style . $button_target
|
335 |
+
. '>' . $button . '</a>';
|
336 |
|
|
|
|
|
337 |
} else {
|
338 |
+
// Universal button disabled
|
339 |
+
$button_html = '';
|
340 |
}
|
341 |
|
|
|
|
|
|
|
|
|
342 |
// If not a feed
|
343 |
if( ! $is_feed ) {
|
344 |
if ($use_current_page) {
|
1118 |
|
1119 |
<div class="addtoany_icon_size_small">
|
1120 |
<label>
|
1121 |
+
<input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" id="A2A_SHARE_SAVE_button_is_favicon_16" type="radio"<?php if($options['button']=='favicon.png|16|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1122 |
<img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share','add-to-any'); ?>" title="+ <?php _e('Share','add-to-any'); ?>" onclick="this.parentNode.firstChild.checked=true"/>
|
1123 |
</label>
|
1124 |
+
<input name="A2A_SHARE_SAVE_button_favicon_16_16_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_favicon_16').checked=true" style="vertical-align:middle;width:150px" value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share','add-to-any'); ?>" />
|
1125 |
<label style="padding-left:9px">
|
1126 |
+
<input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" id="A2A_SHARE_SAVE_button_is_share_icon_16" type="radio"<?php if($options['button']=='share_16_16.png|16|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1127 |
<img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_16_16.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share','add-to-any'); ?>" title="+ <?php _e('Share','add-to-any'); ?>" onclick="this.parentNode.firstChild.checked=true"/>
|
1128 |
</label>
|
1129 |
+
<input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_share_icon_16').checked=true" style="vertical-align:middle;width:150px" value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share','add-to-any'); ?>" />
|
1130 |
<br>
|
1131 |
<label>
|
1132 |
<input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if($options['button']=='share_save_120_16.png|120|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1146 |
</div>
|
1147 |
|
1148 |
<label>
|
1149 |
+
<input name="A2A_SHARE_SAVE_button" value="CUSTOM" id="A2A_SHARE_SAVE_button_is_custom" type="radio"<?php if( $options['button'] == 'CUSTOM' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1150 |
<span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
|
1151 |
</label>
|
1152 |
+
<input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_custom').checked=true" style="vertical-align:middle" value="<?php echo $options['button_custom']; ?>" />
|
1153 |
<br>
|
1154 |
<label>
|
1155 |
+
<input name="A2A_SHARE_SAVE_button" value="TEXT" id="A2A_SHARE_SAVE_button_is_text" type="radio"<?php if( $options['button'] == 'TEXT' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1156 |
<span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?>:</span>
|
1157 |
</label>
|
1158 |
+
<input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_text').checked=true" style="vertical-align:middle;width:150px" value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share','add-to-any'); ?>" />
|
1159 |
+
<br>
|
1160 |
+
<label>
|
1161 |
+
<input name="A2A_SHARE_SAVE_button" value="NONE" type="radio"<?php if( $options['button'] == 'NONE' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
1162 |
+
<span style="margin:0 9px;vertical-align:middle"><?php _e("None"); ?></span>
|
1163 |
+
</label>
|
1164 |
|
1165 |
</fieldset></td>
|
1166 |
</tr>
|