AddToAny Share Buttons - Version 1.1.5

Version Description

  • Fix debug mode notices when manually placed in a theme file that does not display a post/page
  • Sanitize active services output in admin
Download this release

Release Info

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

Code changes from version 1.1.4 to 1.1.5

Files changed (2) hide show
  1. README.txt +9 -5
  2. add-to-any.php +20 -5
README.txt CHANGED
@@ -1,15 +1,15 @@
1
  === Share Buttons by AddToAny ===
2
  Contributors: micropat
3
- Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, email, e-mail, seo, button, delicious, google buzz, buzz, google, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, wpmu, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
- Stable tag: 1.1.4
7
 
8
- Sharing buttons for your pages from the universal sharing platform, including Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
10
  == Description ==
11
 
12
- The WordPress plugin to help people **share**, **bookmark**, and **email** your posts and pages using any service, such as Facebook, Twitter, Pinterest, Google, Reddit, StumbleUpon, LinkedIn, and well over 100 more sharing and social bookmarking sites.
13
 
14
  3rd party buttons include the **Facebook Like Button**, **Twitter Tweet Button**, **Google+ Share Button**, **Google+ Share Button** and **Google +1 Button**.
15
 
@@ -220,9 +220,13 @@ Upload the plugin directory (including all files and directories within) to the
220
 
221
  == Changelog ==
222
 
 
 
 
 
223
  = 1.1.4 =
224
  * Fix admin panel display of 3rd party button options after saving changes
225
- * Fix debug mode notices
226
 
227
  = 1.1.3 =
228
  * Fix validation and semantics of script tag placement, particularly when button is contained in a list element
1
  === Share Buttons by AddToAny ===
2
  Contributors: micropat
3
+ Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, sidebar, widget, email, e-mail, seo, button, delicious, buzz, google, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, wpmu, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
+ Stable tag: 1.1.5
7
 
8
+ Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
10
  == Description ==
11
 
12
+ The WordPress plugin to help people **share**, **bookmark**, and **email** your posts and pages using any service, such as Facebook, Twitter, Pinterest, Google, Reddit, StumbleUpon, LinkedIn, and well over 100 more sharing and social bookmarking sites.
13
 
14
  3rd party buttons include the **Facebook Like Button**, **Twitter Tweet Button**, **Google+ Share Button**, **Google+ Share Button** and **Google +1 Button**.
15
 
220
 
221
  == Changelog ==
222
 
223
+ = 1.1.5 =
224
+ * Fix debug mode notices when manually placed in a theme file that does not display a post/page
225
+ * Sanitize active services output in admin
226
+
227
  = 1.1.4 =
228
  * Fix admin panel display of 3rd party button options after saving changes
229
+ * Fix debug mode notices in admin
230
 
231
  = 1.1.3 =
232
  * Fix validation and semantics of script tag placement, particularly when button is contained in a list element
add-to-any.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Share Buttons by AddToAny
4
  Plugin URI: http://www.addtoany.com/
5
- Description: Sharing buttons for your pages from the universal sharing platform, including Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
- Version: 1.1.4
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
@@ -64,9 +64,24 @@ add_filter('init', 'A2A_SHARE_SAVE_init');
64
  function A2A_SHARE_SAVE_link_vars($linkname = FALSE, $linkurl = FALSE) {
65
  global $post;
66
 
67
- $linkname = ($linkname) ? $linkname : get_the_title($post->ID);
 
 
 
 
 
 
 
68
  $linkname_enc = rawurlencode( html_entity_decode($linkname, ENT_QUOTES, 'UTF-8') );
69
- $linkurl = ($linkurl) ? $linkurl : get_permalink($post->ID);
 
 
 
 
 
 
 
 
70
  $linkurl_enc = rawurlencode( $linkurl );
71
 
72
  return compact( 'linkname', 'linkname_enc', 'linkurl', 'linkurl_enc' );
@@ -1304,7 +1319,7 @@ function A2A_SHARE_SAVE_admin_head() {
1304
  foreach ($active_services as $service) {
1305
  if($admin_services_saved)
1306
  $service = substr($service, 7); // Remove a2a_wp_
1307
- $active_services_quoted .= '"'.$service.'"';
1308
  if ( $service != $active_services_last )
1309
  $active_services_quoted .= ',';
1310
  }
2
  /*
3
  Plugin Name: Share Buttons by AddToAny
4
  Plugin URI: http://www.addtoany.com/
5
+ Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
+ Version: 1.1.5
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
64
  function A2A_SHARE_SAVE_link_vars($linkname = FALSE, $linkurl = FALSE) {
65
  global $post;
66
 
67
+ // Set linkname
68
+ if ( !$linkname ) {
69
+ if ( isset( $post ) )
70
+ $linkname = get_the_title($post->ID);
71
+ else
72
+ $linkname = '';
73
+ }
74
+
75
  $linkname_enc = rawurlencode( html_entity_decode($linkname, ENT_QUOTES, 'UTF-8') );
76
+
77
+ // Set linkurl
78
+ if ( !$linkurl ) {
79
+ if (isset( $post ))
80
+ $linkurl = get_permalink($post->ID);
81
+ else
82
+ $linkurl = '';
83
+ }
84
+
85
  $linkurl_enc = rawurlencode( $linkurl );
86
 
87
  return compact( 'linkname', 'linkname_enc', 'linkurl', 'linkurl_enc' );
1319
  foreach ($active_services as $service) {
1320
  if($admin_services_saved)
1321
  $service = substr($service, 7); // Remove a2a_wp_
1322
+ $active_services_quoted .= '"' . esc_js( $service ) . '"';
1323
  if ( $service != $active_services_last )
1324
  $active_services_quoted .= ',';
1325
  }