AddToAny Share Buttons - Version 1.7.10

Version Description

  • Fix vertical floating bar's class name and media query from the previous release
Download this release

Release Info

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

Code changes from version 1.7.9 to 1.7.10

Files changed (2) hide show
  1. README.txt +4 -1
  2. add-to-any.php +17 -11
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat, addtoany
3
  Tags: AddToAny, share, sharing, social, share buttons, share button, social media, media, marketing, links, email, seo, woocommerce, google, linkedin, reddit, facebook, like, twitter, pinterest, whatsapp, instagram, youtube, share this, sharethis, feed, icons
4
  Requires at least: 3.7
5
  Tested up to: 4.7
6
- Stable tag: 1.7.9
7
 
8
  Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
9
 
@@ -346,6 +346,9 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
346
 
347
  == Changelog ==
348
 
 
 
 
349
  = 1.7.9 =
350
  * Show optional meta box ("Show sharing buttons") below the WordPress editor by default, without having to save AddToAny settings first
351
  * Enable the `shortcode_atts_addtoany` hook to filter the default attributes of the `[addtoany]` shortcode
3
  Tags: AddToAny, share, sharing, social, share buttons, share button, social media, media, marketing, links, email, seo, woocommerce, google, linkedin, reddit, facebook, like, twitter, pinterest, whatsapp, instagram, youtube, share this, sharethis, feed, icons
4
  Requires at least: 3.7
5
  Tested up to: 4.7
6
+ Stable tag: 1.7.10
7
 
8
  Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
9
 
346
 
347
  == Changelog ==
348
 
349
+ = 1.7.10 =
350
+ * Fix vertical floating bar's class name and media query from the previous release
351
+
352
  = 1.7.9 =
353
  * Show optional meta box ("Show sharing buttons") below the WordPress editor by default, without having to save AddToAny settings first
354
  * Enable the `shortcode_atts_addtoany` hook to filter the default attributes of the `[addtoany]` shortcode
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.7.9
7
  Author: AddToAny
8
  Author URI: https://www.addtoany.com/
9
  Text Domain: add-to-any
@@ -674,46 +674,52 @@ function ADDTOANY_SHARE_SAVE_FLOATING( $args = array() ) {
674
  if ( $vertical_type || $horizontal_type ) {
675
  // Vertical type?
676
  if ( $vertical_type ) {
 
 
 
677
  // Top position
678
  $position = ( isset( $options['floating_vertical_position'] ) ) ? $options['floating_vertical_position'] . 'px' : '100px';
679
  // Left or right offset
680
  $offset = ( isset( $options['floating_vertical_offset'] ) ) ? $options['floating_vertical_offset'] . 'px' : '0px';
681
  // Icon size
682
- $args['icon_size'] = ( isset( $options['floating_vertical_icon_size'] ) ) ? $options['floating_vertical_icon_size'] : '32';
683
 
684
  // Add a2a_vertical_style className to Kit classes
685
- $args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_vertical_style' );
686
 
687
  // Add declarations to Kit style attribute
688
  if ( 'left_docked' === $vertical_type ) {
689
- $args['kit_style'] = 'left:' . $offset . ';top:' . $position . ';';
690
  } elseif ( 'right_docked' === $vertical_type ) {
691
- $args['kit_style'] = 'right:' . $offset . ';top:' . $position . ';';
692
  }
693
 
694
- $floating_html .= ADDTOANY_SHARE_SAVE_KIT( $args );
695
  }
696
 
697
  // Horizontal type?
698
  if ( $horizontal_type ) {
 
 
 
699
  // Left or right position
700
  $position = ( isset( $options['floating_horizontal_position'] ) ) ? $options['floating_horizontal_position'] . 'px' : '0px';
701
  // Bottom offset
702
  $offset = ( isset( $options['floating_horizontal_offset'] ) ) ? $options['floating_horizontal_offset'] . 'px' : '0px';
703
  // Icon size
704
- $args['icon_size'] = ( isset( $options['floating_horizontal_icon_size'] ) ) ? $options['floating_horizontal_icon_size'] : '32';
705
 
706
  // Add a2a_default_style className to Kit classes
707
- $args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_default_style' );
708
 
709
  // Add declarations to Kit style attribute
710
  if ( 'left_docked' === $horizontal_type ) {
711
- $args['kit_style'] = 'bottom:' . $offset . ';left:' . $position . ';';
712
  } elseif ( 'right_docked' === $horizontal_type ) {
713
- $args['kit_style'] = 'bottom:' . $offset . ';right:' . $position . ';';
714
  }
715
 
716
- $floating_html .= ADDTOANY_SHARE_SAVE_KIT( $args );
717
  }
718
  }
719
 
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.7.10
7
  Author: AddToAny
8
  Author URI: https://www.addtoany.com/
9
  Text Domain: add-to-any
674
  if ( $vertical_type || $horizontal_type ) {
675
  // Vertical type?
676
  if ( $vertical_type ) {
677
+ // Prevent overwriting of $args
678
+ $vertical_args = $args;
679
+
680
  // Top position
681
  $position = ( isset( $options['floating_vertical_position'] ) ) ? $options['floating_vertical_position'] . 'px' : '100px';
682
  // Left or right offset
683
  $offset = ( isset( $options['floating_vertical_offset'] ) ) ? $options['floating_vertical_offset'] . 'px' : '0px';
684
  // Icon size
685
+ $vertical_args['icon_size'] = ( isset( $options['floating_vertical_icon_size'] ) ) ? $options['floating_vertical_icon_size'] : '32';
686
 
687
  // Add a2a_vertical_style className to Kit classes
688
+ $vertical_args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_vertical_style' );
689
 
690
  // Add declarations to Kit style attribute
691
  if ( 'left_docked' === $vertical_type ) {
692
+ $vertical_args['kit_style'] = 'left:' . $offset . ';top:' . $position . ';';
693
  } elseif ( 'right_docked' === $vertical_type ) {
694
+ $vertical_args['kit_style'] = 'right:' . $offset . ';top:' . $position . ';';
695
  }
696
 
697
+ $floating_html .= ADDTOANY_SHARE_SAVE_KIT( $vertical_args );
698
  }
699
 
700
  // Horizontal type?
701
  if ( $horizontal_type ) {
702
+ // Prevent overwriting of $args values
703
+ $horizontal_args = $args;
704
+
705
  // Left or right position
706
  $position = ( isset( $options['floating_horizontal_position'] ) ) ? $options['floating_horizontal_position'] . 'px' : '0px';
707
  // Bottom offset
708
  $offset = ( isset( $options['floating_horizontal_offset'] ) ) ? $options['floating_horizontal_offset'] . 'px' : '0px';
709
  // Icon size
710
+ $horizontal_args['icon_size'] = ( isset( $options['floating_horizontal_icon_size'] ) ) ? $options['floating_horizontal_icon_size'] : '32';
711
 
712
  // Add a2a_default_style className to Kit classes
713
+ $horizontal_args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_floating_style a2a_default_style' );
714
 
715
  // Add declarations to Kit style attribute
716
  if ( 'left_docked' === $horizontal_type ) {
717
+ $horizontal_args['kit_style'] = 'bottom:' . $offset . ';left:' . $position . ';';
718
  } elseif ( 'right_docked' === $horizontal_type ) {
719
+ $horizontal_args['kit_style'] = 'bottom:' . $offset . ';right:' . $position . ';';
720
  }
721
 
722
+ $floating_html .= ADDTOANY_SHARE_SAVE_KIT( $horizontal_args );
723
  }
724
  }
725