Version Description
- Show optional meta box ("Show sharing buttons") below the WordPress editor by default, without having to save AddToAny settings first
- Enable the
shortcode_atts_addtoany
hook to filter the default attributes of the[addtoany]
shortcode - Accept
kit_additional_classes
argument in Floating and Follow button output functions (thanks Rocco Marco)
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.7.9 |
Comparing to | |
See all releases |
Code changes from version 1.7.8 to 1.7.9
- README.txt +11 -10
- add-to-any.php +12 -12
- addtoany.admin.php +4 -5
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.
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
@@ -104,7 +104,7 @@ To further customize AddToAny, see the <a href="https://www.addtoany.com/buttons
|
|
104 |
|
105 |
= Something is wrong. What should I try first? =
|
106 |
|
107 |
-
Try temporarily switching themes and deactivating 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 deactivated,
|
108 |
|
109 |
Feel free to <a href="https://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.
|
110 |
|
@@ -324,16 +324,12 @@ Yes, this plugin outputs 100% W3C valid HTML5 and W3C valid CSS 3 by default.
|
|
324 |
|
325 |
AddToAny supports the <a href="https://codex.wordpress.org/AJAX_in_Plugins#The_post-load_JavaScript_Event">standard `post-load` event</a>.
|
326 |
|
327 |
-
Ajax and infinite scroll plugins should always fire the `post-load` event after content insertion, so request <a href="https://codex.wordpress.org/AJAX_in_Plugins#The_post-load_JavaScript_Event">standard `post-load` support</a> from plugin authors as needed.
|
328 |
|
329 |
Use the following line to dispatch the `post-load` event for AddToAny and other plugins:
|
330 |
|
331 |
`jQuery( 'body' ).trigger( 'post-load' );`
|
332 |
|
333 |
-
= Why does the menu appear behind embedded objects (like Flash)? =
|
334 |
-
|
335 |
-
Please read <a href="https://www.addtoany.com/buttons/customize/show_over_embeds">this document</a> for an explanation and possible fix. For WordPress, an easier fix is to have the plugin <a href="https://www.addtoany.com/buttons/customize/wordpress/hide_embeds">hide intersecting embedded objects</a>.
|
336 |
-
|
337 |
= How can I set the plugin as a "Must-Use" plugin that is autoloaded and activated for all sites? =
|
338 |
|
339 |
Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plugins/` directory. Then create a proxy PHP loader file (such as `load.php`) in your `mu-plugins` directory, for example:
|
@@ -342,14 +338,19 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
342 |
|
343 |
== Screenshots ==
|
344 |
|
345 |
-
1. AddToAny vector share buttons (SVG icons) are pixel-perfect
|
346 |
2. Mini share menu that drops down when visitors use the universal share button
|
347 |
3. Full universal share menu modal that includes all services
|
348 |
-
4. Standard
|
349 |
-
5. Floating
|
350 |
|
351 |
== Changelog ==
|
352 |
|
|
|
|
|
|
|
|
|
|
|
353 |
= 1.7.8 =
|
354 |
* AddToAny Follow widgets will now use full URLs when specified for a service ID
|
355 |
* Add Papaly
|
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 |
|
104 |
|
105 |
= Something is wrong. What should I try first? =
|
106 |
|
107 |
+
Try temporarily switching themes and deactivating 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 deactivated, search the WordPress plugin's <a href="https://wordpress.org/support/plugin/add-to-any/">support forum</a>.
|
108 |
|
109 |
Feel free to <a href="https://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.
|
110 |
|
324 |
|
325 |
AddToAny supports the <a href="https://codex.wordpress.org/AJAX_in_Plugins#The_post-load_JavaScript_Event">standard `post-load` event</a>.
|
326 |
|
327 |
+
Ajax and infinite scroll plugins/themes should always fire the `post-load` event after content insertion, so request <a href="https://codex.wordpress.org/AJAX_in_Plugins#The_post-load_JavaScript_Event">standard `post-load` support</a> from plugin & theme authors as needed.
|
328 |
|
329 |
Use the following line to dispatch the `post-load` event for AddToAny and other plugins:
|
330 |
|
331 |
`jQuery( 'body' ).trigger( 'post-load' );`
|
332 |
|
|
|
|
|
|
|
|
|
333 |
= How can I set the plugin as a "Must-Use" plugin that is autoloaded and activated for all sites? =
|
334 |
|
335 |
Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plugins/` directory. Then create a proxy PHP loader file (such as `load.php`) in your `mu-plugins` directory, for example:
|
338 |
|
339 |
== Screenshots ==
|
340 |
|
341 |
+
1. AddToAny vector share buttons (SVG icons) are pixel-perfect and customizable
|
342 |
2. Mini share menu that drops down when visitors use the universal share button
|
343 |
3. Full universal share menu modal that includes all services
|
344 |
+
4. Settings for Standard Share Buttons
|
345 |
+
5. Settings for Floating Share Bars
|
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
|
352 |
+
* Accept `kit_additional_classes` argument in Floating and Follow button output functions (thanks Rocco Marco)
|
353 |
+
|
354 |
= 1.7.8 =
|
355 |
* AddToAny Follow widgets will now use full URLs when specified for a service ID
|
356 |
* Add Papaly
|
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.
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
@@ -604,7 +604,7 @@ function ADDTOANY_FOLLOW_KIT( $args = array() ) {
|
|
604 |
$args = wp_parse_args( $args, $defaults );
|
605 |
|
606 |
// Add a2a_follow className to Kit classes
|
607 |
-
$args['kit_additional_classes'] = 'a2a_follow';
|
608 |
|
609 |
// If $args['buttons']['feed']['id'] is set
|
610 |
$buttons = $args['buttons'];
|
@@ -682,7 +682,7 @@ function ADDTOANY_SHARE_SAVE_FLOATING( $args = array() ) {
|
|
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'] = 'a2a_floating_style a2a_vertical_style';
|
686 |
|
687 |
// Add declarations to Kit style attribute
|
688 |
if ( 'left_docked' === $vertical_type ) {
|
@@ -704,7 +704,7 @@ function ADDTOANY_SHARE_SAVE_FLOATING( $args = array() ) {
|
|
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'] = 'a2a_floating_style a2a_default_style';
|
708 |
|
709 |
// Add declarations to Kit style attribute
|
710 |
if ( 'left_docked' === $horizontal_type ) {
|
@@ -892,19 +892,19 @@ function A2A_SHARE_SAVE_pre_get_posts( $query ) {
|
|
892 |
add_action( 'pre_get_posts', 'A2A_SHARE_SAVE_pre_get_posts' );
|
893 |
|
894 |
|
895 |
-
// [addtoany url="
|
896 |
function A2A_SHARE_SAVE_shortcode( $attributes ) {
|
897 |
-
|
898 |
-
'url' => '
|
899 |
-
'title' => '
|
900 |
'media' => '',
|
901 |
'buttons' => '',
|
902 |
-
), $attributes
|
903 |
|
904 |
-
$linkname =
|
905 |
-
$linkurl =
|
906 |
$linkmedia = ! empty( $attributes['media'] ) ? $attributes['media'] : false;
|
907 |
-
$buttons = ! empty( $buttons ) ? explode
|
908 |
|
909 |
$output_later = true;
|
910 |
|
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
|
604 |
$args = wp_parse_args( $args, $defaults );
|
605 |
|
606 |
// Add a2a_follow className to Kit classes
|
607 |
+
$args['kit_additional_classes'] = trim( $args['kit_additional_classes'] . ' a2a_follow' );
|
608 |
|
609 |
// If $args['buttons']['feed']['id'] is set
|
610 |
$buttons = $args['buttons'];
|
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 ) {
|
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 ) {
|
892 |
add_action( 'pre_get_posts', 'A2A_SHARE_SAVE_pre_get_posts' );
|
893 |
|
894 |
|
895 |
+
// [addtoany url="https://www.example.com/page.html" title="Example Page"]
|
896 |
function A2A_SHARE_SAVE_shortcode( $attributes ) {
|
897 |
+
$attributes = shortcode_atts( array(
|
898 |
+
'url' => '',
|
899 |
+
'title' => '',
|
900 |
'media' => '',
|
901 |
'buttons' => '',
|
902 |
+
), $attributes, 'addtoany' );
|
903 |
|
904 |
+
$linkname = ! empty( $attributes['title'] ) ? $attributes['title'] : false;
|
905 |
+
$linkurl = ! empty( $attributes['url'] ) ? $attributes['url'] : false;
|
906 |
$linkmedia = ! empty( $attributes['media'] ) ? $attributes['media'] : false;
|
907 |
+
$buttons = ! empty( $buttons ) ? explode( ',', $buttons ) : array();
|
908 |
|
909 |
$output_later = true;
|
910 |
|
addtoany.admin.php
CHANGED
@@ -4,8 +4,7 @@
|
|
4 |
* Post options
|
5 |
*/
|
6 |
function A2A_SHARE_SAVE_add_meta_box() {
|
7 |
-
|
8 |
-
$post_types = ( function_exists( 'get_post_types' ) ) ? get_post_types( array( 'public' => true ) ) : array( 'post', 'page' ) ;
|
9 |
|
10 |
$options = get_option( 'addtoany_options' );
|
11 |
|
@@ -17,11 +16,11 @@ function A2A_SHARE_SAVE_add_meta_box() {
|
|
17 |
isset( $options['floating_vertical'] ) && 'none' != $options['floating_vertical'] ||
|
18 |
isset( $options['floating_horizontal'] ) && 'none' != $options['floating_horizontal'] ||
|
19 |
// for standard buttons in posts
|
20 |
-
'post' == $post_type && isset( $options['display_in_posts'] )
|
21 |
// for standard buttons in pages
|
22 |
-
'page' == $post_type && isset( $options['display_in_pages'] )
|
23 |
// for standard buttons in a custom post type
|
24 |
-
isset( $options['display_in_cpt_' . $post_type] )
|
25 |
) {
|
26 |
// Add meta box
|
27 |
add_meta_box( 'A2A_SHARE_SAVE_meta', $title, 'A2A_SHARE_SAVE_meta_box_content', $post_type, 'advanced', 'high' );
|
4 |
* Post options
|
5 |
*/
|
6 |
function A2A_SHARE_SAVE_add_meta_box() {
|
7 |
+
$post_types = get_post_types( array( 'public' => true ) );
|
|
|
8 |
|
9 |
$options = get_option( 'addtoany_options' );
|
10 |
|
16 |
isset( $options['floating_vertical'] ) && 'none' != $options['floating_vertical'] ||
|
17 |
isset( $options['floating_horizontal'] ) && 'none' != $options['floating_horizontal'] ||
|
18 |
// for standard buttons in posts
|
19 |
+
'post' == $post_type && ( ! isset( $options['display_in_posts'] ) || $options['display_in_posts'] != '-1' ) ||
|
20 |
// for standard buttons in pages
|
21 |
+
'page' == $post_type && ( ! isset( $options['display_in_pages'] ) || $options['display_in_pages'] != '-1' ) ||
|
22 |
// for standard buttons in a custom post type
|
23 |
+
! isset( $options['display_in_cpt_' . $post_type] ) || $options['display_in_cpt_' . $post_type] != '-1'
|
24 |
) {
|
25 |
// Add meta box
|
26 |
add_meta_box( 'A2A_SHARE_SAVE_meta', $title, 'A2A_SHARE_SAVE_meta_box_content', $post_type, 'advanced', 'high' );
|