Version Description
- Fix the
[addtoany]
shortcode'sbuttons
attribute - Use
rel="noopener"
on links that open in a new tab/window for site JavaScript performance in some browsers
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.7.12 |
Comparing to | |
See all releases |
Code changes from version 1.7.11 to 1.7.12
- README.txt +12 -5
- add-to-any.php +12 -8
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.8
|
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 |
|
@@ -86,17 +86,20 @@ In WordPress:
|
|
86 |
1. Press `Install Now` for the AddToAny plugin
|
87 |
1. Press `Activate Plugin`
|
88 |
|
89 |
-
|
90 |
|
91 |
1. Upload the `add-to-any` directory to the `/wp-content/plugins/` directory
|
92 |
1. Activate the plugin through the `Plugins` menu in WordPress
|
93 |
-
|
|
|
|
|
|
|
94 |
|
95 |
== Frequently Asked Questions ==
|
96 |
|
97 |
= Where are the options, and how can I customize the sharing plugin? =
|
98 |
|
99 |
-
In
|
100 |
|
101 |
Setup Follow buttons (like Instagram, YouTube, etc.) using the AddToAny Follow widget in `Appearance` > `Widgets` (or `Appearance` > `Customize`).
|
102 |
|
@@ -148,7 +151,7 @@ Since 2006, AddToAny is trusted across the web to always route to each service's
|
|
148 |
|
149 |
= How can I use custom icons? =
|
150 |
|
151 |
-
Upload sharing icons in a single directory to a public location, and make sure the icon filenames match the icon filenames packaged in the AddToAny plugin. In
|
152 |
|
153 |
= How can I place the share buttons in a specific area of my site? =
|
154 |
|
@@ -346,6 +349,10 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
346 |
|
347 |
== Changelog ==
|
348 |
|
|
|
|
|
|
|
|
|
349 |
= 1.7.11 =
|
350 |
* Add icon size option to Follow buttons widget
|
351 |
* Replace "Large" and "Small" icon size options with single field
|
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.8
|
6 |
+
Stable tag: 1.7.12
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
86 |
1. Press `Install Now` for the AddToAny plugin
|
87 |
1. Press `Activate Plugin`
|
88 |
|
89 |
+
Manual installation:
|
90 |
|
91 |
1. Upload the `add-to-any` directory to the `/wp-content/plugins/` directory
|
92 |
1. Activate the plugin through the `Plugins` menu in WordPress
|
93 |
+
|
94 |
+
WP-CLI installation:
|
95 |
+
|
96 |
+
1. `wp plugin install add-to-any --activate`
|
97 |
|
98 |
== Frequently Asked Questions ==
|
99 |
|
100 |
= Where are the options, and how can I customize the sharing plugin? =
|
101 |
|
102 |
+
In WordPress, go to `Settings` > `AddToAny`.
|
103 |
|
104 |
Setup Follow buttons (like Instagram, YouTube, etc.) using the AddToAny Follow widget in `Appearance` > `Widgets` (or `Appearance` > `Customize`).
|
105 |
|
151 |
|
152 |
= How can I use custom icons? =
|
153 |
|
154 |
+
Upload sharing icons in a single directory to a public location, and make sure the icon filenames match the icon filenames packaged in the AddToAny plugin. In WordPress, go to `Settings` > `AddToAny` > `Advanced Options` > check the "Use custom icons" checkbox and specify the URL to your custom icons directory (including the trailing `/`). For AddToAny's universal button, go to Universal Button, select `Image URL` and specify the exact location of your AddToAny universal share icon (including the filename).
|
155 |
|
156 |
= How can I place the share buttons in a specific area of my site? =
|
157 |
|
349 |
|
350 |
== Changelog ==
|
351 |
|
352 |
+
= 1.7.12 =
|
353 |
+
* Fix the `[addtoany]` shortcode's `buttons` attribute
|
354 |
+
* Use `rel="noopener"` on links that open in a new tab/window for site JavaScript performance in some browsers
|
355 |
+
|
356 |
= 1.7.11 =
|
357 |
* Add icon size option to Follow buttons widget
|
358 |
* Replace "Large" and "Small" icon size options with single field
|
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
|
@@ -336,11 +336,10 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
336 |
|
337 |
$amp_css .= $is_amp && ! empty( $service['color'] ) ? '.a2a_button_' . $safe_name . ' img{background-color:#' . $service['color'] . ';}' : '';
|
338 |
|
339 |
-
$url =
|
340 |
-
$src =
|
341 |
-
$counter =
|
342 |
-
$class_attr =
|
343 |
-
$rel_nofollow = $is_follow ? '' : ' rel="nofollow"'; // ($is_follow indicates a Follow Kit. 'nofollow' is for search crawlers. Different things)
|
344 |
|
345 |
if ( isset( $service['target'] ) ) {
|
346 |
$target_attr = empty( $service['target'] ) ? '' : ' target="' . $service['target'] . '"';
|
@@ -348,13 +347,18 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
348 |
$target_attr = ' target="_blank"';
|
349 |
}
|
350 |
|
|
|
|
|
|
|
|
|
|
|
351 |
// Set dimension attributes if using custom icons and dimension is specified
|
352 |
if ( isset( $custom_icons ) ) {
|
353 |
$width_attr = ! empty( $icons_width ) ? ' width="' . $icons_width . '"' : '';
|
354 |
$height_attr = ! empty( $icons_height ) ? ' height="' . $icons_height . '"' : '';
|
355 |
}
|
356 |
|
357 |
-
$link = $html_wrap_open . "<a$class_attr href=\"$url\" title=\"$name\"$
|
358 |
$link .= ( $large_icons && ! isset( $custom_icons ) && ! $custom_service ) ? "" : "<img src=\"$src\"" . $width_attr . $height_attr . " alt=\"$name\"/>";
|
359 |
$link .= "</a>" . $html_wrap_close;
|
360 |
}
|
@@ -895,7 +899,7 @@ function A2A_SHARE_SAVE_shortcode( $attributes ) {
|
|
895 |
$linkname = ! empty( $attributes['title'] ) ? $attributes['title'] : false;
|
896 |
$linkurl = ! empty( $attributes['url'] ) ? $attributes['url'] : false;
|
897 |
$linkmedia = ! empty( $attributes['media'] ) ? $attributes['media'] : false;
|
898 |
-
$buttons = ! empty( $buttons ) ? explode( ',', $buttons ) : array();
|
899 |
|
900 |
$output_later = true;
|
901 |
|
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.12
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
336 |
|
337 |
$amp_css .= $is_amp && ! empty( $service['color'] ) ? '.a2a_button_' . $safe_name . ' img{background-color:#' . $service['color'] . ';}' : '';
|
338 |
|
339 |
+
$url = isset( $href ) ? $href : 'https://www.addtoany.com/add_to/' . $safe_name . '?linkurl=' . $linkurl_enc .'&linkname=' . $linkname_enc;
|
340 |
+
$src = $icon_url ? $icon_url : $icons_dir . $icon . '.' . $icons_type;
|
341 |
+
$counter = $counter_enabled ? ' a2a_counter' : '';
|
342 |
+
$class_attr = $custom_service ? '' : ' class="a2a_button_' . $safe_name . $counter . '"';
|
|
|
343 |
|
344 |
if ( isset( $service['target'] ) ) {
|
345 |
$target_attr = empty( $service['target'] ) ? '' : ' target="' . $service['target'] . '"';
|
347 |
$target_attr = ' target="_blank"';
|
348 |
}
|
349 |
|
350 |
+
// Use rel="noopener" for links that open in a new tab/window
|
351 |
+
$rel_noopener = $custom_service || ! $target_attr ? '' : ' noopener';
|
352 |
+
$rel_noopener_only = $rel_noopener || $target_attr ? ' rel="noopener"' : '';
|
353 |
+
$rel_attr = $is_follow ? $rel_noopener_only : ' rel="nofollow' . $rel_noopener . '"'; // ($is_follow indicates a Follow Kit. 'nofollow' is for search crawlers. Different things)
|
354 |
+
|
355 |
// Set dimension attributes if using custom icons and dimension is specified
|
356 |
if ( isset( $custom_icons ) ) {
|
357 |
$width_attr = ! empty( $icons_width ) ? ' width="' . $icons_width . '"' : '';
|
358 |
$height_attr = ! empty( $icons_height ) ? ' height="' . $icons_height . '"' : '';
|
359 |
}
|
360 |
|
361 |
+
$link = $html_wrap_open . "<a$class_attr href=\"$url\" title=\"$name\"$rel_attr$target_attr>";
|
362 |
$link .= ( $large_icons && ! isset( $custom_icons ) && ! $custom_service ) ? "" : "<img src=\"$src\"" . $width_attr . $height_attr . " alt=\"$name\"/>";
|
363 |
$link .= "</a>" . $html_wrap_close;
|
364 |
}
|
899 |
$linkname = ! empty( $attributes['title'] ) ? $attributes['title'] : false;
|
900 |
$linkurl = ! empty( $attributes['url'] ) ? $attributes['url'] : false;
|
901 |
$linkmedia = ! empty( $attributes['media'] ) ? $attributes['media'] : false;
|
902 |
+
$buttons = ! empty( $attributes['buttons'] ) ? explode( ',', $attributes['buttons'] ) : array();
|
903 |
|
904 |
$output_later = true;
|
905 |
|