AddToAny Share Buttons - Version 1.2.8.6

Version Description

  • Fix advanced caching option (most sites should not use this option)
Download this release

Release Info

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

Code changes from version 1.2.8.5 to 1.2.8.6

Files changed (2) hide show
  1. README.txt +4 -1
  2. add-to-any.php +12 -12
README.txt CHANGED
@@ -3,7 +3,7 @@ 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, shortcode, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, buffer, stumbleupon, technorati, lockerz, addthis, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
4
  Requires at least: 2.8
5
  Tested up to: 3.9
6
- Stable tag: 1.2.8.5
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
@@ -239,6 +239,9 @@ Upload the plugin directory (including all files and directories within) to the
239
 
240
  == Changelog ==
241
 
 
 
 
242
  = 1.2.8.5 =
243
  * For CSS customization, delineate between top and bottom in default sharing placement
244
  * Add .addtoany_content_top and .addtoany_content_top class names to .addtoany_share_save_container
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, shortcode, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, buffer, stumbleupon, technorati, lockerz, addthis, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
4
  Requires at least: 2.8
5
  Tested up to: 3.9
6
+ Stable tag: 1.2.8.6
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
239
 
240
  == Changelog ==
241
 
242
+ = 1.2.8.6 =
243
+ * Fix advanced caching option (most sites should not use this option)
244
+
245
  = 1.2.8.5 =
246
  * For CSS customization, delineate between top and bottom in default sharing placement
247
  * Add .addtoany_content_top and .addtoany_content_top class names to .addtoany_share_save_container
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
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.2.8.5
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
@@ -761,8 +761,8 @@ add_action('wp_print_styles', 'A2A_SHARE_SAVE_stylesheet');
761
  */
762
 
763
  function A2A_SHARE_SAVE_refresh_cache() {
764
- $contents = wp_remote_fopen("http://www.addtoany.com/ext/updater/files_list/");
765
- $file_urls = explode("\n", $contents, 20);
766
  $upload_dir = wp_upload_dir();
767
 
768
  // Make directory if needed
@@ -771,30 +771,30 @@ function A2A_SHARE_SAVE_refresh_cache() {
771
  return array( 'error' => $message );
772
  }
773
 
774
- if (count($file_urls) > 0) {
775
- for ($i = 0; $i < count($file_urls); $i++) {
776
  // Download files
777
- $file_url = $file_urls[$i];
778
- $file_name = substr(strrchr($file_url, '/'), 1, 99);
779
 
780
  // Place files in uploads/addtoany directory
781
- wp_get_http($file_url, $upload_dir['basedir'] . '/addtoany/' . $file_name);
782
  }
783
  }
784
  }
785
 
786
  function A2A_SHARE_SAVE_schedule_cache() {
787
  // WP "Cron" requires WP version 2.1
788
- $timestamp = wp_next_scheduled('A2A_SHARE_SAVE_refresh_cache');
789
  if ( ! $timestamp) {
790
  // Only schedule if currently unscheduled
791
- wp_schedule_event(time(), 'daily', 'A2A_SHARE_SAVE_refresh_cache');
792
  }
793
  }
794
 
795
  function A2A_SHARE_SAVE_unschedule_cache() {
796
- $timestamp = wp_next_scheduled('A2A_SHARE_SAVE_refresh_cache');
797
- wp_unschedule_event($timestamp, 'A2A_SHARE_SAVE_refresh_cache');
798
  }
799
 
800
 
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.2.8.6
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
761
  */
762
 
763
  function A2A_SHARE_SAVE_refresh_cache() {
764
+ $contents = wp_remote_fopen( 'http://www.addtoany.com/ext/updater/files_list/' );
765
+ $file_urls = explode( "\n", $contents, 20 );
766
  $upload_dir = wp_upload_dir();
767
 
768
  // Make directory if needed
771
  return array( 'error' => $message );
772
  }
773
 
774
+ if ( count( $file_urls ) > 0 ) {
775
+ for ( $i = 0; $i < count( $file_urls ); $i++ ) {
776
  // Download files
777
+ $file_url = trim( $file_urls[$i] );
778
+ $file_name = substr( strrchr( $file_url, '/' ), 1, 99 );
779
 
780
  // Place files in uploads/addtoany directory
781
+ wp_get_http( $file_url, $upload_dir['basedir'] . '/addtoany/' . $file_name );
782
  }
783
  }
784
  }
785
 
786
  function A2A_SHARE_SAVE_schedule_cache() {
787
  // WP "Cron" requires WP version 2.1
788
+ $timestamp = wp_next_scheduled( 'A2A_SHARE_SAVE_refresh_cache' );
789
  if ( ! $timestamp) {
790
  // Only schedule if currently unscheduled
791
+ wp_schedule_event( time(), 'daily', 'A2A_SHARE_SAVE_refresh_cache' );
792
  }
793
  }
794
 
795
  function A2A_SHARE_SAVE_unschedule_cache() {
796
+ $timestamp = wp_next_scheduled( 'A2A_SHARE_SAVE_refresh_cache' );
797
+ wp_unschedule_event( $timestamp, 'A2A_SHARE_SAVE_refresh_cache' );
798
  }
799
 
800