AddToAny Share Buttons - Version 1.5

Version Description

  • Custom icon sizes (applied to AddToAny vector icons)
  • Fix custom standalone service icons when used with large icons
  • Add Kakao
  • Add Qzone
  • Add Yummly
  • Update Wykop icon
Download this release

Release Info

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

Code changes from version 1.4.1 to 1.5

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat, addtoany
3
  Tags: sharing, share, share this, bookmarking, social, share button, share buttons, share links, social share, social sharing, social bookmarking, social bookmarks, socialize, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, shortcode, sidebar, widget, responsive, email, e-mail, print, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, tweet button, +1, plus 1, google +1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, wanelo, buffer, stumbleupon, bitly, whatsapp, lockerz, addthis, sociable, sharedaddy, sharethis, shareaholic, icon, icons, vector, SVG, floating, floating buttons, wpmu, Add to Any, AddToAny
4
  Requires at least: 2.8
5
  Tested up to: 4.1
6
- Stable tag: 1.4.1
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more.
9
 
@@ -97,7 +97,7 @@ To further customize AddToAny, see the <a href="https://www.addtoany.com/buttons
97
 
98
  Try temporarily switching themes and disabling other plugins to identify a potential conflict. If you find a conflict, try contacting that theme or plugin author. If an issue persists on a default theme with all other plugins disabled, perform a google search across the WordPress forums using a query such as: <a href="https://www.google.com/#q=site:wordpress.org%2Fsupport+-reviews+addtoany+">site:wordpress.org/support -reviews addtoany [your issue issue here]</a>
99
 
100
- Feel free to <a href="http://wordpress.org/support/plugin/add-to-any">post here</a>, where the community can hopefully help you. Describe the issue, what troubleshooting you have already done, and provide a link to your site, and any other potentially relevant information.
101
 
102
  = Why isn't the universal drop-down menu appearing? =
103
 
@@ -200,12 +200,12 @@ If you want to customize the shared URL and title for these icons, use the follo
200
  You can create a plugin or customize the following PHP sample code to add to your theme's function.php file:
201
 
202
  `function addtoany_add_services( $services ) {
203
- $services['google_example'] = array(
204
- 'name' => 'Google Example',
205
- 'icon_url' => 'http://www.google.com/favicon.ico',
206
  'icon_width' => 16,
207
  'icon_height' => 16,
208
- 'href' => 'http://www.example.com/add?linkurl=A2A_LINKURL&amp;linkname=A2A_LINKNAME'
209
  );
210
  return $services;
211
  }
@@ -267,7 +267,7 @@ Yes, this plugin outputs 100% W3C valid HTML5 & XHTML and W3C valid CSS 3 by def
267
 
268
  If you use the Facebook Like, Twitter Tweet or Google +1 buttons in an HTML5 theme, note that the button iframes use the `scrolling` attribute, which is valid XHTML but the attribute has been deprecated in HTML5. It's needed to prevent scrollbars from appearing over the Like, Tweet, and +1 buttons inside of the iframes.
269
 
270
- Regardless of circumstances for passing W3C tests, the plugin will always output semantically valid and robot-readable code, so publishers do not have to worry about search engine crawler errors due to invalid code. Both <a href="http://en.wikipedia.org/wiki/Web_standards">web standards</a> and <a href="http://en.wikipedia.org/wiki/Cross-browser">cross-browser</a> are taken very seriously.
271
 
272
  = How can I move the plugin's inline CSS into my theme's main external stylesheet? =
273
 
@@ -292,6 +292,14 @@ Upload the plugin directory (including all files and directories within) to the
292
 
293
  == Changelog ==
294
 
 
 
 
 
 
 
 
 
295
  = 1.4.1 =
296
  * Update CSS to fix Facebook Like button verical aligment caused by Facebook's inline styling change
297
  * Fix issue with shared titles containing unwanted HTML tags caused by some themes
3
  Tags: sharing, share, share this, bookmarking, social, share button, share buttons, share links, social share, social sharing, social bookmarking, social bookmarks, socialize, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, shortcode, sidebar, widget, responsive, email, e-mail, print, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, tweet button, +1, plus 1, google +1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, wanelo, buffer, stumbleupon, bitly, whatsapp, lockerz, addthis, sociable, sharedaddy, sharethis, shareaholic, icon, icons, vector, SVG, floating, floating buttons, wpmu, Add to Any, AddToAny
4
  Requires at least: 2.8
5
  Tested up to: 4.1
6
+ Stable tag: 1.5
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more.
9
 
97
 
98
  Try temporarily switching themes and disabling other plugins to identify a potential conflict. If you find a conflict, try contacting that theme or plugin author. If an issue persists on a default theme with all other plugins disabled, perform a google search across the WordPress forums using a query such as: <a href="https://www.google.com/#q=site:wordpress.org%2Fsupport+-reviews+addtoany+">site:wordpress.org/support -reviews addtoany [your issue issue here]</a>
99
 
100
+ Feel free to <a href="http://wordpress.org/support/plugin/add-to-any">post here</a>, where the community can hopefully help you. Describe the issue, what troubleshooting you have already done, provide a link to your site, and any other potentially relevant information.
101
 
102
  = Why isn't the universal drop-down menu appearing? =
103
 
200
  You can create a plugin or customize the following PHP sample code to add to your theme's function.php file:
201
 
202
  `function addtoany_add_services( $services ) {
203
+ $services['example_service'] = array(
204
+ 'name' => 'Example Service',
205
+ 'icon_url' => 'https://www.google.com/favicon.ico',
206
  'icon_width' => 16,
207
  'icon_height' => 16,
208
+ 'href' => 'http://www.example.com/share?url=A2A_LINKURL&amp;title=A2A_LINKNAME'
209
  );
210
  return $services;
211
  }
267
 
268
  If you use the Facebook Like, Twitter Tweet or Google +1 buttons in an HTML5 theme, note that the button iframes use the `scrolling` attribute, which is valid XHTML but the attribute has been deprecated in HTML5. It's needed to prevent scrollbars from appearing over the Like, Tweet, and +1 buttons inside of the iframes.
269
 
270
+ Regardless of circumstances for passing W3C tests, the plugin will always output semantically valid and robot-readable code, so publishers do not have to worry about search engine crawler errors due to invalid code. Both <a href="http://en.wikipedia.org/wiki/Web_standards">web standards</a> and <a href="http://en.wikipedia.org/wiki/Cross-browser">cross-browser</a> compatibility are taken seriously.
271
 
272
  = How can I move the plugin's inline CSS into my theme's main external stylesheet? =
273
 
292
 
293
  == Changelog ==
294
 
295
+ = 1.5 =
296
+ * Custom icon sizes (applied to AddToAny vector icons)
297
+ * Fix custom standalone service icons when used with large icons
298
+ * Add Kakao
299
+ * Add Qzone
300
+ * Add Yummly
301
+ * Update Wykop icon
302
+
303
  = 1.4.1 =
304
  * Update CSS to fix Facebook Like button verical aligment caused by Facebook's inline styling change
305
  * Fix issue with shared titles containing unwanted HTML tags caused by some themes
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Share Buttons by AddToAny
4
  Plugin URI: https://www.addtoany.com/
5
  Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
- Version: 1.4.1
7
  Author: AddToAny
8
  Author URI: https://www.addtoany.com/
9
  */
@@ -113,8 +113,10 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
113
  // a2a_kit_size_32 if no icon size, or no_small_icons arg is true
114
  } elseif ( ! isset( $options['icon_size'] ) || isset( $args['no_small_icons'] ) && true == $args['no_small_icons'] ) {
115
  $icon_size = ' a2a_kit_size_32';
 
116
  } elseif ( isset( $options['icon_size'] ) && $options['icon_size'] == '16' ) {
117
  $icon_size = '';
 
118
  } else {
119
  $icon_size = ' a2a_kit_size_' . $options['icon_size'] . '';
120
  }
@@ -285,7 +287,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
285
  }
286
 
287
  $link = $html_wrap_open . "<a$class_attr href=\"$url\" title=\"$name\" rel=\"nofollow\" target=\"_blank\">";
288
- $link .= ( $large_icons && ! isset( $custom_icons ) ) ? "" : "<img src=\"$src\" width=\"$width\" height=\"$height\" alt=\"$name\"/>";
289
  $link .= "</a>" . $html_wrap_close;
290
  }
291
 
3
  Plugin Name: Share Buttons by AddToAny
4
  Plugin URI: https://www.addtoany.com/
5
  Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
+ Version: 1.5
7
  Author: AddToAny
8
  Author URI: https://www.addtoany.com/
9
  */
113
  // a2a_kit_size_32 if no icon size, or no_small_icons arg is true
114
  } elseif ( ! isset( $options['icon_size'] ) || isset( $args['no_small_icons'] ) && true == $args['no_small_icons'] ) {
115
  $icon_size = ' a2a_kit_size_32';
116
+ // a2a_kit_size_16
117
  } elseif ( isset( $options['icon_size'] ) && $options['icon_size'] == '16' ) {
118
  $icon_size = '';
119
+ // a2a_kit_size_## custom icon size
120
  } else {
121
  $icon_size = ' a2a_kit_size_' . $options['icon_size'] . '';
122
  }
287
  }
288
 
289
  $link = $html_wrap_open . "<a$class_attr href=\"$url\" title=\"$name\" rel=\"nofollow\" target=\"_blank\">";
290
+ $link .= ( $large_icons && ! isset( $custom_icons ) && ! $custom_service ) ? "" : "<img src=\"$src\" width=\"$width\" height=\"$height\" alt=\"$name\"/>";
291
  $link .= "</a>" . $html_wrap_close;
292
  }
293
 
addtoany.admin.php CHANGED
@@ -410,6 +410,10 @@ function A2A_SHARE_SAVE_options_page() {
410
  <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="32"<?php if ( ! isset( $options['icon_size'] ) || '32' == $options['icon_size'] ) echo ' checked="checked"'; ?>> <?php _e('Large', 'add-to-any'); ?></label>
411
  <br>
412
  <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="16"<?php if ( isset( $options['icon_size'] ) && '16' == $options['icon_size'] ) echo ' checked="checked"'; ?>> <?php _e('Small', 'add-to-any'); ?></label>
 
 
 
 
413
  </fieldset></td>
414
  </tr>
415
 
@@ -771,33 +775,39 @@ function A2A_SHARE_SAVE_admin_head() {
771
  jQuery('input[name="A2A_SHARE_SAVE_button"]:radio:visible:first').attr('checked', true);
772
  };
773
 
774
- if ( jQuery('input[name="A2A_SHARE_SAVE_icon_size"]:checked').val() == '32' ) {
775
- // Hide small universal buttons
776
- jQuery('.addtoany_icon_size_small').hide('fast');
777
- // Show large universal button
778
- jQuery('.addtoany_icon_size_large').show('fast', select_proper_radio);
 
 
779
 
780
- // Switch to large standalone icons
781
  jQuery('#addtoany_services_sortable li').not('.dummy, .addtoany_3p_button, #addtoany_show_services').html(function() {
782
- return jQuery(this).data('a2a_32_icon_html');
783
  });
784
 
785
  // Adjust the Add/Remove Services button
786
- jQuery('#addtoany_show_services').addClass('addtoany_line_height_32');
787
  }
788
  else {
789
  // Hide small universal buttons
790
- jQuery('.addtoany_icon_size_large').hide('fast');
791
  // Show large universal button
792
- jQuery('.addtoany_icon_size_small').show('fast', select_proper_radio);
793
 
794
- // Switch to small standalone icons
795
  jQuery('#addtoany_services_sortable li').not('.dummy, .addtoany_3p_button, #addtoany_show_services').html(function() {
796
- return jQuery(this).data('a2a_16_icon_html');
797
  });
798
 
799
  // Adjust the Add/Remove Services button
800
- jQuery('#addtoany_show_services').removeClass('addtoany_line_height_32');
 
 
 
 
801
  }
802
  };
803
 
@@ -808,6 +818,11 @@ function A2A_SHARE_SAVE_admin_head() {
808
  show_appropriate_universal_buttons();
809
  });
810
 
 
 
 
 
 
811
  // Toggle child options of 'Display in posts'
812
  jQuery('#A2A_SHARE_SAVE_display_in_posts').bind('change click', function(e){
813
  if (jQuery(this).is(':checked'))
@@ -900,7 +915,9 @@ function A2A_SHARE_SAVE_admin_head() {
900
  }
901
 
902
  var icon_size = jQuery('input:radio[name=A2A_SHARE_SAVE_icon_size]:checked').val();
903
- new_service = this_service.toggleClass('addtoany_selected')
 
 
904
  .unbind('click', moveToSortableList)
905
  .bind('click', moveToSelectableList)
906
  .clone();
@@ -1033,7 +1050,7 @@ function A2A_SHARE_SAVE_admin_head() {
1033
  });
1034
 
1035
  // Adjust the Add/Remove Services button for large or small icons
1036
- if ( jQuery('input:radio[name=A2A_SHARE_SAVE_icon_size]:checked').val() == '32' )
1037
  jQuery('#addtoany_show_services').addClass('addtoany_line_height_32');
1038
 
1039
  // TBD
@@ -1049,6 +1066,10 @@ function A2A_SHARE_SAVE_admin_head() {
1049
  .addtoany_admin_list{list-style:none;padding:0;margin:0;}
1050
  .addtoany_admin_list li{-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
1051
 
 
 
 
 
1052
  #addtoany_services_selectable{clear:left;display:none;}
1053
  #addtoany_services_selectable li{cursor:pointer;float:left;width:150px;font-size:11px;margin:0;padding:6px;border:1px solid transparent;_border-color:#FAFAFA/*IE6*/;overflow:hidden;}
1054
  <?php // white-space:nowrap could go above, but then webkit does not wrap floats if parent has no width set; wrapping in <span> instead (below) ?>
410
  <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="32"<?php if ( ! isset( $options['icon_size'] ) || '32' == $options['icon_size'] ) echo ' checked="checked"'; ?>> <?php _e('Large', 'add-to-any'); ?></label>
411
  <br>
412
  <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="16"<?php if ( isset( $options['icon_size'] ) && '16' == $options['icon_size'] ) echo ' checked="checked"'; ?>> <?php _e('Small', 'add-to-any'); ?></label>
413
+ <br>
414
+ <label><input type="radio" name="A2A_SHARE_SAVE_icon_size"<?php if ( isset( $options['icon_size'] ) && ! in_array( $options['icon_size'], array( '32', '16' ) ) ) echo ' value="' . $options['icon_size'] . '" checked="checked"'; ?>> <?php _e('Custom', 'add-to-any'); ?></label>
415
+ <input class="addtoany_icon_size_custom small-text" id="A2A_SHARE_SAVE_icon_size_custom" maxlength="3" type="text" onclick="document.getElementsByName('A2A_SHARE_SAVE_icon_size')[2].checked=true" value="<?php if ( isset( $options['icon_size'] ) && ! in_array( $options['icon_size'], array( '32', '16' ) ) ) echo $options['icon_size']; ?>">
416
+ <label class="addtoany_icon_size_custom" for="A2A_SHARE_SAVE_icon_size_custom">pixels</label>
417
  </fieldset></td>
418
  </tr>
419
 
775
  jQuery('input[name="A2A_SHARE_SAVE_button"]:radio:visible:first').attr('checked', true);
776
  };
777
 
778
+ var icon_size_value = jQuery('input[name="A2A_SHARE_SAVE_icon_size"]:checked').val();
779
+
780
+ if ( '16' == icon_size_value ) {
781
+ // Hide large universal buttons
782
+ jQuery('.addtoany_icon_size_large').hide('fast');
783
+ // Show small universal button
784
+ jQuery('.addtoany_icon_size_small').show('fast', select_proper_radio);
785
 
786
+ // Switch to small standalone icons
787
  jQuery('#addtoany_services_sortable li').not('.dummy, .addtoany_3p_button, #addtoany_show_services').html(function() {
788
+ return jQuery(this).data('a2a_16_icon_html');
789
  });
790
 
791
  // Adjust the Add/Remove Services button
792
+ jQuery('#addtoany_show_services').removeClass('addtoany_line_height_32');
793
  }
794
  else {
795
  // Hide small universal buttons
796
+ jQuery('.addtoany_icon_size_small').hide('fast');
797
  // Show large universal button
798
+ jQuery('.addtoany_icon_size_large').show('fast', select_proper_radio);
799
 
800
+ // Switch to large standalone icons
801
  jQuery('#addtoany_services_sortable li').not('.dummy, .addtoany_3p_button, #addtoany_show_services').html(function() {
802
+ return jQuery(this).data('a2a_32_icon_html');
803
  });
804
 
805
  // Adjust the Add/Remove Services button
806
+ jQuery('#addtoany_show_services').addClass('addtoany_line_height_32');
807
+ }
808
+
809
+ if ( 0 < icon_size_value.length && 16 != icon_size_value && 32 != icon_size_value ) {
810
+ jQuery('.addtoany_icon_size_custom').show('fast');
811
  }
812
  };
813
 
818
  show_appropriate_universal_buttons();
819
  });
820
 
821
+ // Set value on radio from custom text input
822
+ jQuery('#A2A_SHARE_SAVE_icon_size_custom').bind('change', function(e){
823
+ jQuery('input[name="A2A_SHARE_SAVE_icon_size"]').eq(2).val( jQuery('#A2A_SHARE_SAVE_icon_size_custom').val() );
824
+ });
825
+
826
  // Toggle child options of 'Display in posts'
827
  jQuery('#A2A_SHARE_SAVE_display_in_posts').bind('change click', function(e){
828
  if (jQuery(this).is(':checked'))
915
  }
916
 
917
  var icon_size = jQuery('input:radio[name=A2A_SHARE_SAVE_icon_size]:checked').val();
918
+ icon_size = ('16' == icon_size) ? '16' : '32';
919
+
920
+ var new_service = this_service.toggleClass('addtoany_selected')
921
  .unbind('click', moveToSortableList)
922
  .bind('click', moveToSelectableList)
923
  .clone();
1050
  });
1051
 
1052
  // Adjust the Add/Remove Services button for large or small icons
1053
+ if ( jQuery('input:radio[name=A2A_SHARE_SAVE_icon_size]:checked').val() != '16' )
1054
  jQuery('#addtoany_show_services').addClass('addtoany_line_height_32');
1055
 
1056
  // TBD
1066
  .addtoany_admin_list{list-style:none;padding:0;margin:0;}
1067
  .addtoany_admin_list li{-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
1068
 
1069
+ .addtoany_icon_size_custom,
1070
+ /* Override WP display */
1071
+ .form-table td fieldset label.addtoany_icon_size_custom{display:none;}
1072
+
1073
  #addtoany_services_selectable{clear:left;display:none;}
1074
  #addtoany_services_selectable li{cursor:pointer;float:left;width:150px;font-size:11px;margin:0;padding:6px;border:1px solid transparent;_border-color:#FAFAFA/*IE6*/;overflow:hidden;}
1075
  <?php // white-space:nowrap could go above, but then webkit does not wrap floats if parent has no width set; wrapping in <span> instead (below) ?>
addtoany.services.php CHANGED
@@ -212,6 +212,10 @@ $A2A_SHARE_SAVE_services = array(
212
  "name" => "Jumptags",
213
  "icon" => "jumptags",
214
  ),
 
 
 
 
215
  "khabbr" => array(
216
  "name" => "Khabbr",
217
  "icon" => "khabbr",
@@ -333,6 +337,10 @@ $A2A_SHARE_SAVE_services = array(
333
  "name" => "QQ",
334
  "icon" => "qq",
335
  ),
 
 
 
 
336
  "rediff" => array(
337
  "name" => "Rediff MyPage",
338
  "icon" => "rediff",
@@ -449,6 +457,10 @@ $A2A_SHARE_SAVE_services = array(
449
  "name" => "YouMob",
450
  "icon" => "youmob",
451
  ),
 
 
 
 
452
  "dihitt" => array(
453
  "name" => "diHITT",
454
  "icon" => "dihitt",
212
  "name" => "Jumptags",
213
  "icon" => "jumptags",
214
  ),
215
+ "kakao" => array(
216
+ "name" => "Kakao",
217
+ "icon" => "kakao",
218
+ ),
219
  "khabbr" => array(
220
  "name" => "Khabbr",
221
  "icon" => "khabbr",
337
  "name" => "QQ",
338
  "icon" => "qq",
339
  ),
340
+ "qzone" => array(
341
+ "name" => "Qzone",
342
+ "icon" => "qzone",
343
+ ),
344
  "rediff" => array(
345
  "name" => "Rediff MyPage",
346
  "icon" => "rediff",
457
  "name" => "YouMob",
458
  "icon" => "youmob",
459
  ),
460
+ "yummly" => array(
461
+ "name" => "Yummly",
462
+ "icon" => "yummly",
463
+ ),
464
  "dihitt" => array(
465
  "name" => "diHITT",
466
  "icon" => "dihitt",
icons/kakao.png ADDED
Binary file
icons/qzone.png ADDED
Binary file
icons/wykop.png CHANGED
Binary file
icons/yummly.png ADDED
Binary file