AddToAny Share Buttons - Version 1.2.5

Version Description

  • Large SVG icons are the default sharing format
  • Default standalone services are Facebook, Twitter, Google Plus
  • Note: If your sharing button suddenly changes (because you haven't saved AddToAny settings yet), you can go back to the traditional sharing button in Settings > AddToAny. Choose "Small" for the Icon Size to see the traditional buttons, and in Standalone Buttons, click "Add/Remove Services" to deselect Facebook, Twitter, and Google Plus. Then click Save Changes to save your AddToAny Share Settings.
  • Popular services have been moved to the top of the Standalone Buttons list
Download this release

Release Info

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

Code changes from version 1.2.4 to 1.2.5

Files changed (3) hide show
  1. README.txt +7 -1
  2. add-to-any.php +30 -27
  3. services.php +32 -32
README.txt CHANGED
@@ -3,7 +3,7 @@ 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, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
- Stable tag: 1.2.4
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
@@ -231,6 +231,12 @@ Upload the plugin directory (including all files and directories within) to the
231
 
232
  == Changelog ==
233
 
 
 
 
 
 
 
234
  = 1.2.4 =
235
  * Add Pinterest Pin It Button and options
236
 
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, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
+ Stable tag: 1.2.5
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
231
 
232
  == Changelog ==
233
 
234
+ = 1.2.5 =
235
+ * Large SVG icons are the default sharing format
236
+ * Default standalone services are Facebook, Twitter, Google Plus
237
+ * Note: If your sharing button suddenly changes (because you haven't saved AddToAny settings yet), you can go back to the traditional sharing button in Settings > AddToAny. Choose "Small" for the Icon Size to see the traditional buttons, and in Standalone Buttons, click "Add/Remove Services" to deselect Facebook, Twitter, and Google Plus. Then click Save Changes to save your AddToAny Share Settings.
238
+ * Popular services have been moved to the top of the Standalone Buttons list
239
+
240
  = 1.2.4 =
241
  * Add Pinterest Pin It Button and options
242
 
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.4
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
@@ -97,8 +97,13 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
97
 
98
  $options = get_option('addtoany_options');
99
 
100
- // Set a2a_kit_size_## class name only if "icon_size" option is set and it is not '16'
101
- $icon_size = ( isset($options['icon_size']) && $options['icon_size'] != '16' ) ? ' a2a_kit_size_' . $options['icon_size']. '' : '';
 
 
 
 
 
102
 
103
  if ( ! isset($args['html_container_open'])) {
104
  $args['html_container_open'] = '<div class="a2a_kit' . $icon_size . ' a2a_target addtoany_list" id="wpa2a_' . $_addtoany_counter . '">';
@@ -164,15 +169,18 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
164
 
165
  $options = get_option('addtoany_options');
166
 
167
- // True only if "icon_size" option is set and it is not '16'
168
- $large_icons = ( isset($options['icon_size']) && $options['icon_size'] != '16' ) ? TRUE : FALSE;
169
 
170
  $active_services = $options['active_services'];
171
 
172
  $ind_html = "" . $html_container_open;
173
 
174
- if( !$active_services )
175
- $active_services = Array();
 
 
 
176
 
177
  foreach($active_services as $active_service) {
178
 
@@ -277,12 +285,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
277
  $button_href_querystring = ($is_feed) ? '#url=' . $linkurl_enc . '&amp;title=' . $linkname_enc : '';
278
  $options = get_option('addtoany_options');
279
 
280
- if( ! $options['button'] ) {
281
- $button_fname = 'share_save_171_16.png';
282
- $button_width = ' width="171"';
283
- $button_height = ' height="16"';
284
- $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
285
- } else if( $options['button'] == 'A2A_SVG_32' ) {
286
  // Skip button IMG for A2A icon insertion
287
  $button_text = '';
288
  } else if( $options['button'] == 'CUSTOM' ) {
@@ -813,7 +816,7 @@ function A2A_SHARE_SAVE_migrate_options() {
813
  'display_in_feed' => '1',
814
  'show_title' => '-1',
815
  'onclick' => '-1',
816
- 'button' => 'share_save_171_16.png|171|16',
817
  'button_custom' => '',
818
  'additional_js_variables' => '',
819
  'button_text' => 'Share',
@@ -1003,9 +1006,9 @@ function A2A_SHARE_SAVE_options_page() {
1003
  <tr valign="top">
1004
  <th scope="row"><?php _e("Icon Size", "add-to-any"); ?></th>
1005
  <td><fieldset>
1006
- <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="32"<?php if($options['icon_size']=='32' ) echo ' checked="checked"'; ?>> <?php _e('Large', 'add-to-any'); ?></label>
1007
  <br>
1008
- <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="16"<?php if( !$options['icon_size'] || $options['icon_size']=='16') echo ' checked="checked"'; ?>> <?php _e('Small', 'add-to-any'); ?></label>
1009
  </fieldset></td>
1010
  </tr>
1011
 
@@ -1034,10 +1037,6 @@ function A2A_SHARE_SAVE_options_page() {
1034
  </li>
1035
  <?php
1036
  // Show all services
1037
- $active_services = $options['active_services'];
1038
- if( !$active_services )
1039
- $active_services = Array();
1040
-
1041
  foreach ($A2A_SHARE_SAVE_services as $service_safe_name=>$site) {
1042
  if (isset($site['href']))
1043
  $custom_service = TRUE;
@@ -1060,7 +1059,7 @@ function A2A_SHARE_SAVE_options_page() {
1060
  <td><fieldset>
1061
  <div class="addtoany_icon_size_large">
1062
  <label class="addtoany_override a2a_kit_size_32">
1063
- <input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php if($options['button']=='A2A_SVG_32') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
1064
  <span class="a2a_svg a2a_s_a2a" onclick="this.parentNode.firstChild.checked=true" style="margin-left:9px"></span>
1065
  </label>
1066
  <br>
@@ -1084,7 +1083,7 @@ function A2A_SHARE_SAVE_options_page() {
1084
  </label>
1085
  <br>
1086
  <label>
1087
- <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if( !$options['button'] || $options['button']=='share_save_171_16.png|171|16' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
1088
  <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" onclick="this.parentNode.firstChild.checked=true"/>
1089
  </label>
1090
  <br>
@@ -1450,10 +1449,14 @@ function A2A_SHARE_SAVE_admin_head() {
1450
  // Auto-select active services
1451
  <?php
1452
  $admin_services_saved = isset($_POST['A2A_SHARE_SAVE_active_services']) || isset($_POST['Submit']);
1453
- $active_services = ( $admin_services_saved )
1454
- ? @$_POST['A2A_SHARE_SAVE_active_services'] : $options['active_services'];
1455
- if( ! $active_services )
1456
- $active_services = Array();
 
 
 
 
1457
  $active_services_last = end($active_services);
1458
  if($admin_services_saved)
1459
  $active_services_last = substr($active_services_last, 7); // Remove a2a_wp_
@@ -1549,7 +1552,7 @@ function A2A_SHARE_SAVE_admin_head() {
1549
  #addtoany_services_sortable .addtoany_special_service_options_selected span.down_arrow{display:none;}
1550
 
1551
  li#addtoany_show_services.addtoany_line_height_32{line-height:32px}
1552
- li#addtoany_show_services{border:1px solid #DFDFDF;background-color:#FFF;cursor:pointer;}
1553
  li#addtoany_show_services:hover{border:1px solid #AAA;}
1554
  #addtoany_services_info{clear:left;display:none;}
1555
 
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.5
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
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';
103
+ else if ($options['icon_size'] == '16')
104
+ $icon_size = '';
105
+ else
106
+ $icon_size = ' a2a_kit_size_' . $options['icon_size'] . '';
107
 
108
  if ( ! isset($args['html_container_open'])) {
109
  $args['html_container_open'] = '<div class="a2a_kit' . $icon_size . ' a2a_target addtoany_list" id="wpa2a_' . $_addtoany_counter . '">';
169
 
170
  $options = get_option('addtoany_options');
171
 
172
+ // False only if "icon_size" is set to '16'
173
+ $large_icons = ( isset($options['icon_size']) && $options['icon_size'] == '16' ) ? FALSE : TRUE;
174
 
175
  $active_services = $options['active_services'];
176
 
177
  $ind_html = "" . $html_container_open;
178
 
179
+ // Use default services if options have not been set yet
180
+ if ( false === $options )
181
+ $active_services = array( 'facebook', 'twitter', 'google_plus' );
182
+ elseif ( empty( $active_services ) )
183
+ $active_services = array();
184
 
185
  foreach($active_services as $active_service) {
186
 
285
  $button_href_querystring = ($is_feed) ? '#url=' . $linkurl_enc . '&amp;title=' . $linkname_enc : '';
286
  $options = get_option('addtoany_options');
287
 
288
+ if( ! $options['button'] || $options['button'] == 'A2A_SVG_32' ) {
 
 
 
 
 
289
  // Skip button IMG for A2A icon insertion
290
  $button_text = '';
291
  } else if( $options['button'] == 'CUSTOM' ) {
816
  'display_in_feed' => '1',
817
  'show_title' => '-1',
818
  'onclick' => '-1',
819
+ 'button' => 'A2A_SVG_32',
820
  'button_custom' => '',
821
  'additional_js_variables' => '',
822
  'button_text' => 'Share',
1006
  <tr valign="top">
1007
  <th scope="row"><?php _e("Icon Size", "add-to-any"); ?></th>
1008
  <td><fieldset>
1009
+ <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="32"<?php if( !$options['icon_size'] || $options['icon_size']=='32' ) echo ' checked="checked"'; ?>> <?php _e('Large', 'add-to-any'); ?></label>
1010
  <br>
1011
+ <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="16"<?php if($options['icon_size']=='16') echo ' checked="checked"'; ?>> <?php _e('Small', 'add-to-any'); ?></label>
1012
  </fieldset></td>
1013
  </tr>
1014
 
1037
  </li>
1038
  <?php
1039
  // Show all services
 
 
 
 
1040
  foreach ($A2A_SHARE_SAVE_services as $service_safe_name=>$site) {
1041
  if (isset($site['href']))
1042
  $custom_service = TRUE;
1059
  <td><fieldset>
1060
  <div class="addtoany_icon_size_large">
1061
  <label class="addtoany_override a2a_kit_size_32">
1062
+ <input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php if( !$options['button'] || $options['button']=='A2A_SVG_32' ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
1063
  <span class="a2a_svg a2a_s_a2a" onclick="this.parentNode.firstChild.checked=true" style="margin-left:9px"></span>
1064
  </label>
1065
  <br>
1083
  </label>
1084
  <br>
1085
  <label>
1086
+ <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if($options['button']=='share_save_171_16.png|171|16') echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
1087
  <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" onclick="this.parentNode.firstChild.checked=true"/>
1088
  </label>
1089
  <br>
1449
  // Auto-select active services
1450
  <?php
1451
  $admin_services_saved = isset($_POST['A2A_SHARE_SAVE_active_services']) || isset($_POST['Submit']);
1452
+ $active_services = ( $admin_services_saved ) ? @$_POST['A2A_SHARE_SAVE_active_services'] : $options['active_services'];
1453
+
1454
+ // Use default services if options have not been set yet (and no services were just saved in the form)
1455
+ if ( false === $options && ! $admin_services_saved )
1456
+ $active_services = array( 'facebook', 'twitter', 'google_plus' );
1457
+ elseif ( empty( $active_services ) )
1458
+ $active_services = array();
1459
+
1460
  $active_services_last = end($active_services);
1461
  if($admin_services_saved)
1462
  $active_services_last = substr($active_services_last, 7); // Remove a2a_wp_
1552
  #addtoany_services_sortable .addtoany_special_service_options_selected span.down_arrow{display:none;}
1553
 
1554
  li#addtoany_show_services.addtoany_line_height_32{line-height:32px}
1555
+ li#addtoany_show_services{border:1px solid #DFDFDF;background-color:#FFF;cursor:pointer;margin-left:9px;}
1556
  li#addtoany_show_services:hover{border:1px solid #AAA;}
1557
  #addtoany_services_info{clear:left;display:none;}
1558
 
services.php CHANGED
@@ -2,6 +2,38 @@
2
 
3
  $A2A_SHARE_SAVE_services = Array(
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "aim" => Array(
6
  "name" => "AIM",
7
  "icon" => "aim",
@@ -124,10 +156,6 @@ $A2A_SHARE_SAVE_services = Array(
124
  "name" => "Evernote",
125
  "icon" => "evernote",
126
  ),
127
- "facebook" => Array(
128
- "name" => "Facebook",
129
- "icon" => "facebook",
130
- ),
131
  "fark" => Array(
132
  "name" => "Fark",
133
  "icon" => "fark",
@@ -156,10 +184,6 @@ $A2A_SHARE_SAVE_services = Array(
156
  "name" => "Google Gmail",
157
  "icon" => "gmail",
158
  ),
159
- "google_plus" => Array(
160
- "name" => "Google+",
161
- "icon" => "google_plus",
162
- ),
163
  "grono" => Array(
164
  "name" => "Grono",
165
  "icon" => "grono",
@@ -204,10 +228,6 @@ $A2A_SHARE_SAVE_services = Array(
204
  "name" => "Linkatopia",
205
  "icon" => "linkatopia",
206
  ),
207
- "linkedin" => Array(
208
- "name" => "LinkedIn",
209
- "icon" => "linkedin",
210
- ),
211
  "livejournal" => Array(
212
  "name" => "LiveJournal",
213
  "icon" => "livejournal",
@@ -276,10 +296,6 @@ $A2A_SHARE_SAVE_services = Array(
276
  "name" => "Pinboard",
277
  "icon" => "pinboard",
278
  ),
279
- "pinterest" => Array(
280
- "name" => "Pinterest",
281
- "icon" => "pinterest",
282
- ),
283
  "plurk" => Array(
284
  "name" => "Plurk",
285
  "icon" => "plurk",
@@ -309,10 +325,6 @@ $A2A_SHARE_SAVE_services = Array(
309
  "name" => "QQ",
310
  "icon" => "qq",
311
  ),
312
- "reddit" => Array(
313
- "name" => "Reddit",
314
- "icon" => "reddit",
315
- ),
316
  "rediff" => Array(
317
  "name" => "Rediff MyPage",
318
  "icon" => "rediff",
@@ -337,10 +349,6 @@ $A2A_SHARE_SAVE_services = Array(
337
  "name" => "StartAid",
338
  "icon" => "startaid",
339
  ),
340
- "stumbleupon" => Array(
341
- "name" => "StumbleUpon",
342
- "icon" => "stumbleupon",
343
- ),
344
  "stumpedia" => Array(
345
  "name" => "Stumpedia",
346
  "icon" => "stumpedia",
@@ -361,18 +369,10 @@ $A2A_SHARE_SAVE_services = Array(
361
  "name" => "Tuenti",
362
  "icon" => "tuenti",
363
  ),
364
- "tumblr" => Array(
365
- "name" => "Tumblr",
366
- "icon" => "tumblr",
367
- ),
368
  "twiddla" => Array(
369
  "name" => "Twiddla",
370
  "icon" => "twiddla",
371
  ),
372
- "twitter" => Array(
373
- "name" => "Twitter",
374
- "icon" => "twitter",
375
- ),
376
  "typepad_post" => Array(
377
  "name" => "TypePad Post",
378
  "icon" => "typepad",
2
 
3
  $A2A_SHARE_SAVE_services = Array(
4
 
5
+ "facebook" => Array(
6
+ "name" => "Facebook",
7
+ "icon" => "facebook",
8
+ ),
9
+ "twitter" => Array(
10
+ "name" => "Twitter",
11
+ "icon" => "twitter",
12
+ ),
13
+ "google_plus" => Array(
14
+ "name" => "Google+",
15
+ "icon" => "google_plus",
16
+ ),
17
+ "pinterest" => Array(
18
+ "name" => "Pinterest",
19
+ "icon" => "pinterest",
20
+ ),
21
+ "tumblr" => Array(
22
+ "name" => "Tumblr",
23
+ "icon" => "tumblr",
24
+ ),
25
+ "stumbleupon" => Array(
26
+ "name" => "StumbleUpon",
27
+ "icon" => "stumbleupon",
28
+ ),
29
+ "reddit" => Array(
30
+ "name" => "Reddit",
31
+ "icon" => "reddit",
32
+ ),
33
+ "linkedin" => Array(
34
+ "name" => "LinkedIn",
35
+ "icon" => "linkedin",
36
+ ),
37
  "aim" => Array(
38
  "name" => "AIM",
39
  "icon" => "aim",
156
  "name" => "Evernote",
157
  "icon" => "evernote",
158
  ),
 
 
 
 
159
  "fark" => Array(
160
  "name" => "Fark",
161
  "icon" => "fark",
184
  "name" => "Google Gmail",
185
  "icon" => "gmail",
186
  ),
 
 
 
 
187
  "grono" => Array(
188
  "name" => "Grono",
189
  "icon" => "grono",
228
  "name" => "Linkatopia",
229
  "icon" => "linkatopia",
230
  ),
 
 
 
 
231
  "livejournal" => Array(
232
  "name" => "LiveJournal",
233
  "icon" => "livejournal",
296
  "name" => "Pinboard",
297
  "icon" => "pinboard",
298
  ),
 
 
 
 
299
  "plurk" => Array(
300
  "name" => "Plurk",
301
  "icon" => "plurk",
325
  "name" => "QQ",
326
  "icon" => "qq",
327
  ),
 
 
 
 
328
  "rediff" => Array(
329
  "name" => "Rediff MyPage",
330
  "icon" => "rediff",
349
  "name" => "StartAid",
350
  "icon" => "startaid",
351
  ),
 
 
 
 
352
  "stumpedia" => Array(
353
  "name" => "Stumpedia",
354
  "icon" => "stumpedia",
369
  "name" => "Tuenti",
370
  "icon" => "tuenti",
371
  ),
 
 
 
 
372
  "twiddla" => Array(
373
  "name" => "Twiddla",
374
  "icon" => "twiddla",
375
  ),
 
 
 
 
376
  "typepad_post" => Array(
377
  "name" => "TypePad Post",
378
  "icon" => "typepad",