AddToAny Share Buttons - Version 1.6.18

Version Description

  • Fix default icon size
Download this release

Release Info

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

Code changes from version 1.6.17 to 1.6.18

Files changed (2) hide show
  1. README.txt +5 -2
  2. add-to-any.php +12 -12
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat, addtoany
3
  Tags: AddToAny, sharing, share, social, share button, share buttons, share links, social icons, social media, media, marketing, bookmark, bookmarks, save, post, posts, page, pages, images, image, admin, analytics, statistics, stats, links, plugin, shortcode, sidebar, widget, responsive, email, e-mail, print, seo, button, amp, woocommerce, ecommerce, e-commerce, amazon, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, tweet button, google plus, pinterest, pin, pin it, pinit, wanelo, buffer, stumbleupon, bitly, whatsapp, instagram, behance, flickr, foursquare, vimeo, youtube, feed, rss, addthis, sociable, share this, sharethis, shareaholic, icon, icons, vector, SVG, floating, floating buttons, wpml, wpmu, Add to Any
4
  Requires at least: 3.7
5
  Tested up to: 4.5
6
- Stable tag: 1.6.17
7
 
8
  Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
9
 
@@ -134,7 +134,7 @@ Facebook expects the Title, Description, and Thumbnail of a shared page to be de
134
 
135
  Use Facebook's <a href="https://developers.facebook.com/tools/debug/sharing/" target="_blank">Sharing Debugger</a> on your pages to see how Facebook reads your site. "Scrape Again" to test site changes and clear Facebook's cache of a page, or use the <a href="https://developers.facebook.com/tools/debug/sharing/batch/" target="_blank">Batch Invalidator</a> to purge Facebook's cache of multiple URLs.
136
 
137
- To change the title, description and/or image on Facebook, your theme's header file should be modified according to <a href="https://developers.facebook.com/docs/sharing/opengraph" target="_blank">Facebook's OpenGraph specification</a>. With WordPress, this can be accomplished with plugins such as the <a href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a> or the <a href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>. Please see those plugins for details, and post in the WordPress or plugin author's forums for more support.
138
 
139
  For more technical information on setting your pages up for Facebook sharing, see "Sharing Best Practices for Websites" in <a href="https://developers.facebook.com/docs/sharing/best-practices">Facebook's documentation</a>.
140
 
@@ -326,6 +326,9 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
326
 
327
  == Changelog ==
328
 
 
 
 
329
  = 1.6.17 =
330
  * New `media` attribute for sharing a specific image or video to the few services that accept arbitrary media (Pinterest, Yummly)
331
  * Update `[addtoany]` shortcode to accept specific `media` URL
3
  Tags: AddToAny, sharing, share, social, share button, share buttons, share links, social icons, social media, media, marketing, bookmark, bookmarks, save, post, posts, page, pages, images, image, admin, analytics, statistics, stats, links, plugin, shortcode, sidebar, widget, responsive, email, e-mail, print, seo, button, amp, woocommerce, ecommerce, e-commerce, amazon, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, tweet button, google plus, pinterest, pin, pin it, pinit, wanelo, buffer, stumbleupon, bitly, whatsapp, instagram, behance, flickr, foursquare, vimeo, youtube, feed, rss, addthis, sociable, share this, sharethis, shareaholic, icon, icons, vector, SVG, floating, floating buttons, wpml, wpmu, Add to Any
4
  Requires at least: 3.7
5
  Tested up to: 4.5
6
+ Stable tag: 1.6.18
7
 
8
  Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
9
 
134
 
135
  Use Facebook's <a href="https://developers.facebook.com/tools/debug/sharing/" target="_blank">Sharing Debugger</a> on your pages to see how Facebook reads your site. "Scrape Again" to test site changes and clear Facebook's cache of a page, or use the <a href="https://developers.facebook.com/tools/debug/sharing/batch/" target="_blank">Batch Invalidator</a> to purge Facebook's cache of multiple URLs.
136
 
137
+ To change the title, description and/or image on Facebook, your theme's header file should be modified according to <a href="https://developers.facebook.com/docs/sharing/opengraph" target="_blank">Facebook's OpenGraph specification</a>. With WordPress, this can be accomplished with plugins such as <a href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a> or <a href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>. Please see those plugins for details, and post in the WordPress or plugin author's forums for more support.
138
 
139
  For more technical information on setting your pages up for Facebook sharing, see "Sharing Best Practices for Websites" in <a href="https://developers.facebook.com/docs/sharing/best-practices">Facebook's documentation</a>.
140
 
326
 
327
  == Changelog ==
328
 
329
+ = 1.6.18 =
330
+ * Fix default icon size
331
+
332
  = 1.6.17 =
333
  * New `media` attribute for sharing a specific image or video to the few services that accept arbitrary media (Pinterest, Yummly)
334
  * Update `[addtoany]` shortcode to accept specific `media` URL
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: AddToAny Share Buttons
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.
6
- Version: 1.6.17
7
  Author: AddToAny
8
  Author URI: https://www.addtoany.com/
9
  Text Domain: add-to-any
@@ -83,7 +83,7 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = array() ) {
83
 
84
  $defaults = array(
85
  'output_later' => false,
86
- 'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '',
87
  );
88
 
89
  $args = wp_parse_args( $args, $defaults );
@@ -119,13 +119,13 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = array() ) {
119
  $icon_size_classname = isset( $options['custom_icons_height'] ) ? ' a2a_kit_size_' . $options['custom_icons_height'] : '';
120
  }
121
  // a2a_kit_size_32 if no icon size, or no_small_icons arg is true
122
- } elseif ( ! isset( $icon_size ) || isset( $args['no_small_icons'] ) && true == $args['no_small_icons'] ) {
123
  $icon_size_classname = ' a2a_kit_size_32';
124
  // a2a_kit_size_16
125
- } elseif ( isset( $icon_size ) && $icon_size == '16' ) {
126
  $icon_size_classname = '';
127
  // a2a_kit_size_## custom icon size
128
- } elseif ( isset( $icon_size ) ) {
129
  $icon_size_classname = ' a2a_kit_size_' . $icon_size;
130
  }
131
 
@@ -197,7 +197,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
197
  'html_container_close' => '',
198
  'html_wrap_open' => '',
199
  'html_wrap_close' => '',
200
- 'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '',
201
  'is_follow' => false,
202
  'no_universal_button' => false,
203
  'buttons' => array(),
@@ -210,7 +210,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
210
  $is_amp = function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ? true : false;
211
 
212
  // False if "icon_size" is set to '16', or no_small_icons arg is true
213
- $large_icons = ( isset( $icon_size ) && $icon_size == '16'
214
  && ( ! isset( $no_small_icons ) || false == $no_small_icons )
215
  ) ? false : true;
216
  // False if AMP endpoint
@@ -317,9 +317,9 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
317
  $icon_url = isset( $service['icon_url'] ) ? $service['icon_url'] : false;
318
  $icon_url = $is_amp && ! $icon_url ? 'https://static.addtoany.com/buttons/' . $icon . '.svg' : $icon_url;
319
  $width_attr = isset( $service['icon_width'] ) ? ' width="' . $service['icon_width'] . '"' : ' width="16"';
320
- $width_attr = $is_amp && isset( $icon_size ) ? ' width="' . $icon_size . '"' : $width_attr;
321
  $height_attr = isset( $service['icon_height'] ) ? ' height="' . $service['icon_height'] . '"' : ' height="16"';
322
- $height_attr = $is_amp && isset( $icon_size ) ? ' height="' . $icon_size . '"' : $height_attr;
323
 
324
  $url = ( isset( $href ) ) ? $href : $https_or_http . '://www.addtoany.com/add_to/' . $safe_name . '?linkurl=' . $linkurl_enc .'&amp;linkname=' . $linkname_enc;
325
  $src = ( $icon_url ) ? $icon_url : $icons_dir . $icon . '.' . $icons_type;
@@ -384,7 +384,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
384
  'html_container_close' => '',
385
  'html_wrap_open' => '',
386
  'html_wrap_close' => '',
387
- 'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '',
388
  'no_small_icons' => false,
389
  'no_universal_button' => false,
390
  );
@@ -419,8 +419,8 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
419
  // If AMP (Accelerated Mobile Page)
420
  if ( $is_amp ) {
421
  $button_src = 'https://static.addtoany.com/buttons/a2a.svg';
422
- $button_width = isset( $icon_size ) ? ' width="' . $icon_size .'"' : ' width="32"';
423
- $button_height = isset( $icon_size ) ? ' height="' . $icon_size .'"' : ' height="32"';
424
  } else {
425
  // Skip button IMG for A2A icon insertion
426
  $button_text = '';
3
  Plugin Name: AddToAny Share Buttons
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.
6
+ Version: 1.6.18
7
  Author: AddToAny
8
  Author URI: https://www.addtoany.com/
9
  Text Domain: add-to-any
83
 
84
  $defaults = array(
85
  'output_later' => false,
86
+ 'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '32',
87
  );
88
 
89
  $args = wp_parse_args( $args, $defaults );
119
  $icon_size_classname = isset( $options['custom_icons_height'] ) ? ' a2a_kit_size_' . $options['custom_icons_height'] : '';
120
  }
121
  // a2a_kit_size_32 if no icon size, or no_small_icons arg is true
122
+ } elseif ( empty( $icon_size ) || isset( $args['no_small_icons'] ) && true == $args['no_small_icons'] ) {
123
  $icon_size_classname = ' a2a_kit_size_32';
124
  // a2a_kit_size_16
125
+ } elseif ( $icon_size == '16' ) {
126
  $icon_size_classname = '';
127
  // a2a_kit_size_## custom icon size
128
+ } elseif ( ! empty( $icon_size ) ) {
129
  $icon_size_classname = ' a2a_kit_size_' . $icon_size;
130
  }
131
 
197
  'html_container_close' => '',
198
  'html_wrap_open' => '',
199
  'html_wrap_close' => '',
200
+ 'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '32',
201
  'is_follow' => false,
202
  'no_universal_button' => false,
203
  'buttons' => array(),
210
  $is_amp = function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ? true : false;
211
 
212
  // False if "icon_size" is set to '16', or no_small_icons arg is true
213
+ $large_icons = ( $icon_size == '16'
214
  && ( ! isset( $no_small_icons ) || false == $no_small_icons )
215
  ) ? false : true;
216
  // False if AMP endpoint
317
  $icon_url = isset( $service['icon_url'] ) ? $service['icon_url'] : false;
318
  $icon_url = $is_amp && ! $icon_url ? 'https://static.addtoany.com/buttons/' . $icon . '.svg' : $icon_url;
319
  $width_attr = isset( $service['icon_width'] ) ? ' width="' . $service['icon_width'] . '"' : ' width="16"';
320
+ $width_attr = $is_amp && ! empty( $icon_size ) ? ' width="' . $icon_size . '"' : $width_attr;
321
  $height_attr = isset( $service['icon_height'] ) ? ' height="' . $service['icon_height'] . '"' : ' height="16"';
322
+ $height_attr = $is_amp && ! empty( $icon_size ) ? ' height="' . $icon_size . '"' : $height_attr;
323
 
324
  $url = ( isset( $href ) ) ? $href : $https_or_http . '://www.addtoany.com/add_to/' . $safe_name . '?linkurl=' . $linkurl_enc .'&amp;linkname=' . $linkname_enc;
325
  $src = ( $icon_url ) ? $icon_url : $icons_dir . $icon . '.' . $icons_type;
384
  'html_container_close' => '',
385
  'html_wrap_open' => '',
386
  'html_wrap_close' => '',
387
+ 'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '32',
388
  'no_small_icons' => false,
389
  'no_universal_button' => false,
390
  );
419
  // If AMP (Accelerated Mobile Page)
420
  if ( $is_amp ) {
421
  $button_src = 'https://static.addtoany.com/buttons/a2a.svg';
422
+ $button_width = ! empty( $icon_size ) ? ' width="' . $icon_size .'"' : ' width="32"';
423
+ $button_height = ! empty( $icon_size ) ? ' height="' . $icon_size .'"' : ' height="32"';
424
  } else {
425
  // Skip button IMG for A2A icon insertion
426
  $button_text = '';