Version Description
- Fix custom/secondary contexts check when the WP query object is unavailable
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.7.4 |
Comparing to | |
See all releases |
Code changes from version 1.7.3 to 1.7.4
- README.txt +5 -2
- add-to-any.php +12 -5
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat, addtoany
|
|
3 |
Tags: AddToAny, share, sharing, social, share button, share buttons, social media, media, marketing, links, email, seo, woocommerce, ecommerce, google, linkedin, reddit, facebook, like, twitter, pinterest, whatsapp, instagram, youtube, addthis, 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 |
|
@@ -334,10 +334,13 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
334 |
|
335 |
== Changelog ==
|
336 |
|
|
|
|
|
|
|
337 |
= 1.7.3 =
|
338 |
* Add icon size options for the floating share buttons
|
339 |
* Replace packaged PNG icons with SVG icons
|
340 |
-
* Update settings
|
341 |
* Update standard placement to prevent the share buttons from automatically appearing in custom/secondary contexts
|
342 |
* Set feed URL & title in AddToAny Follow widgets using HTML5 data attributes
|
343 |
|
3 |
Tags: AddToAny, share, sharing, social, share button, share buttons, social media, media, marketing, links, email, seo, woocommerce, ecommerce, google, linkedin, reddit, facebook, like, twitter, pinterest, whatsapp, instagram, youtube, addthis, share this, sharethis, feed, icons
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 4.7
|
6 |
+
Stable tag: 1.7.4
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
334 |
|
335 |
== Changelog ==
|
336 |
|
337 |
+
= 1.7.4 =
|
338 |
+
* Fix custom/secondary contexts check when the WP query object is unavailable
|
339 |
+
|
340 |
= 1.7.3 =
|
341 |
* Add icon size options for the floating share buttons
|
342 |
* Replace packaged PNG icons with SVG icons
|
343 |
+
* Update services in AddToAny settings
|
344 |
* Update standard placement to prevent the share buttons from automatically appearing in custom/secondary contexts
|
345 |
* Set feed URL & title in AddToAny Follow widgets using HTML5 data attributes
|
346 |
|
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
|
@@ -767,8 +767,8 @@ add_action( 'wp_footer', 'A2A_SHARE_SAVE_footer_script' );
|
|
767 |
function A2A_SHARE_SAVE_add_to_content( $content ) {
|
768 |
global $wp_current_filter;
|
769 |
|
770 |
-
// Bail if not
|
771 |
-
if ( !
|
772 |
// Return early
|
773 |
return $content;
|
774 |
}
|
@@ -874,8 +874,15 @@ function A2A_SHARE_SAVE_add_to_content( $content ) {
|
|
874 |
return $content;
|
875 |
}
|
876 |
|
877 |
-
|
878 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
879 |
|
880 |
|
881 |
// [addtoany url="http://example.com/page.html" title="Some Example Page"]
|
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.4
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
767 |
function A2A_SHARE_SAVE_add_to_content( $content ) {
|
768 |
global $wp_current_filter;
|
769 |
|
770 |
+
// Bail if not in the loop
|
771 |
+
if ( ! in_the_loop() ) {
|
772 |
// Return early
|
773 |
return $content;
|
774 |
}
|
874 |
return $content;
|
875 |
}
|
876 |
|
877 |
+
|
878 |
+
function A2A_SHARE_SAVE_pre_get_posts( $query ) {
|
879 |
+
if ( $query->is_main_query() ) {
|
880 |
+
add_filter( 'the_content', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
881 |
+
add_filter( 'the_excerpt', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
882 |
+
}
|
883 |
+
}
|
884 |
+
|
885 |
+
add_action( 'pre_get_posts', 'A2A_SHARE_SAVE_pre_get_posts' );
|
886 |
|
887 |
|
888 |
// [addtoany url="http://example.com/page.html" title="Some Example Page"]
|