WP Offload S3 Lite - Version 1.0.3

Version Description

= 0.6 = This version requires PHP 5.3.3+ and the Amazon Web Services plugin

= 0.6.1 = This version requires PHP 5.3.3+ and the Amazon Web Services plugin

= 0.6.2 = This version requires PHP 5.3.3+ and the Amazon Web Services plugin

Download this release

Release Info

Developer bradt
Plugin Icon 128x128 WP Offload S3 Lite
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

README.md CHANGED
@@ -3,7 +3,7 @@
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  **Requires at least:** 3.7
5
  **Tested up to:** 4.4
6
- **Stable tag:** 1.0.1
7
  **License:** GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
@@ -73,6 +73,13 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
73
 
74
  ## Changelog ##
75
 
 
 
 
 
 
 
 
76
  ### WP Offload S3 Lite 1.0.1 - 2016-03-08 ###
77
  * Bug fix: Fatal error on plugin activation
78
  * Bug fix: Unable to activate Pro upgrade
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  **Requires at least:** 3.7
5
  **Tested up to:** 4.4
6
+ **Stable tag:** 1.0.3
7
  **License:** GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
73
 
74
  ## Changelog ##
75
 
76
+ ### WP Offload S3 Lite 1.0.3 - 2016-03-23 ###
77
+ * Bug fix: Don't replace srcset URLs when Rewrite File URLs option disabled
78
+ * Bug fix: Fatal error: Cannot redeclare as3cf_get_secure_attachment_url()
79
+
80
+ ### WP Offload S3 Lite 1.0.2 - 2016-03-08 ###
81
+ * Bug fix: Uninstall would run even if pro plugin installed
82
+
83
  ### WP Offload S3 Lite 1.0.1 - 2016-03-08 ###
84
  * Bug fix: Fatal error on plugin activation
85
  * Bug fix: Unable to activate Pro upgrade
assets/js/tinymce.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("as3cf",function(a){function b(a){var b=[];if(h.each(a,function(a,c){h.has(j,a)||b.push(a)}),0!==b.length&&!(h.isUndefined(i.frame)||h.isUndefined(i.frame.states)||h.isUndefined(i.frame.states.models))){var c=h.find(i.frame.states.models,function(a){return"insert"===a.id});if(!h.isUndefined(c)&&0!==h.size(c.attributes.library.models)){var d=c.attributes.library.models,e={};h.each(a,function(a,b){var c=a.replace(/-[0-9]{1,4}x[0-9]{1,4}(\.[a-z]{2,4})$/,"$1"),f=h.find(d,function(a){return a.attributes.url===c});if(!h.isUndefined(f)){var g=h.find(f.attributes.sizes,function(b){return a===b.local_url});return h.isUndefined(g)?!1:void(e[a]=g.url)}}),h.extend(j,e)}}}function c(a){var b=[];h.each(a,function(a,c){h.has(j,a)||b.push(a)}),0!==b.length&&g.ajax({url:ajaxurl,type:"POST",dataType:"JSON",async:!1,cache:!1,data:{action:"as3cf_tinymce_fetch_urls",_nonce:as3cf_tinymce.fetch_urls_nonce,urls:b},success:function(a){j=h.extend(j,a.data)}})}function d(a){return h.has(j,a)?j[a]:!1}function e(a){var e=new RegExp("("+as3cf_tinymce.local_url_escaped+'[^"<\\s]*)',"g"),f=a.match(e);return null===f?a:(b(f),c(f),h.each(f,function(b,c){var e=d(b);!1!==e&&(a=a.replace(new RegExp(b,"g"),e))}),a)}function f(a){return h.each(j,function(b,c){!1!==b&&(a=a.replace(new RegExp(b,"g"),c))}),a}var g=window.jQuery,h=window._,i=window.wp.media,j={};a.on("BeforeSetContent",function(a){a.content=e(a.content)}),a.on("PostProcess",function(a){a.get&&(a.content=f(a.content))})});
classes/as3cf-plugin-compatibility.php CHANGED
@@ -791,7 +791,7 @@ class AS3CF_Plugin_Compatibility {
791
  }
792
 
793
  foreach ( $selected_images as $image => $attachment_id ) {
794
- if ( ! ( $s3object = $this->as3cf->get_attachment_s3_info( $attachment_id ) ) ) {
795
  // Attachment not uploaded to S3, abort
796
  continue;
797
  }
@@ -910,7 +910,7 @@ class AS3CF_Plugin_Compatibility {
910
  return $image_meta;
911
  }
912
 
913
- if ( ! ( $s3object = $this->as3cf->get_attachment_s3_info( $attachment_id ) ) ) {
914
  // Attachment not uploaded to S3, abort
915
  return $image_meta;
916
  }
@@ -946,7 +946,7 @@ class AS3CF_Plugin_Compatibility {
946
  return $sources;
947
  }
948
 
949
- if ( ! ( $s3object = $this->as3cf->get_attachment_s3_info( $attachment_id ) ) ) {
950
  // Attachment not uploaded to S3, abort
951
  return $sources;
952
  }
791
  }
792
 
793
  foreach ( $selected_images as $image => $attachment_id ) {
794
+ if ( ! ( $s3object = $this->as3cf->is_attachment_served_by_s3( $attachment_id ) ) ) {
795
  // Attachment not uploaded to S3, abort
796
  continue;
797
  }
910
  return $image_meta;
911
  }
912
 
913
+ if ( ! ( $s3object = $this->as3cf->is_attachment_served_by_s3( $attachment_id ) ) ) {
914
  // Attachment not uploaded to S3, abort
915
  return $image_meta;
916
  }
946
  return $sources;
947
  }
948
 
949
+ if ( ! ( $s3object = $this->as3cf->is_attachment_served_by_s3( $attachment_id ) ) ) {
950
  // Attachment not uploaded to S3, abort
951
  return $sources;
952
  }
include/functions.php CHANGED
@@ -7,8 +7,10 @@
7
  * @param int $expires Seconds for the link to live
8
  * @param mixed $size Size of the image to get
9
  */
10
- function as3cf_get_secure_attachment_url( $post_id, $expires = 900, $size = null ) {
11
- global $as3cf;
 
12
 
13
- return $as3cf->get_secure_attachment_url( $post_id, $expires, $size );
 
14
  }
7
  * @param int $expires Seconds for the link to live
8
  * @param mixed $size Size of the image to get
9
  */
10
+ if ( ! function_exists( 'as3cf_get_secure_attachment_url' ) ) {
11
+ function as3cf_get_secure_attachment_url( $post_id, $expires = 900, $size = null ) {
12
+ global $as3cf;
13
 
14
+ return $as3cf->get_secure_attachment_url( $post_id, $expires, $size );
15
+ }
16
  }
languages/amazon-s3-and-cloudfront-en.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
- "POT-Creation-Date: 2016-03-08 14:32+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
+ "POT-Creation-Date: 2016-03-23 14:05+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: bradt, deliciousbrains
3
  Tags: uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  Requires at least: 3.7
5
- Tested up to: 4.4
6
- Stable tag: 1.0.2
7
  License: GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
@@ -69,6 +69,10 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
69
 
70
  == Changelog ==
71
 
 
 
 
 
72
  = WP Offload S3 Lite 1.0.2 - 2016-03-08 =
73
  * Bug fix: Uninstall would run even if pro plugin installed
74
 
2
  Contributors: bradt, deliciousbrains
3
  Tags: uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  Requires at least: 3.7
5
+ Tested up to: 4.5
6
+ Stable tag: 1.0.3
7
  License: GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
69
 
70
  == Changelog ==
71
 
72
+ = WP Offload S3 Lite 1.0.3 - 2016-03-23 =
73
+ * Bug fix: Don't replace srcset URLs when Rewrite File URLs option disabled
74
+ * Bug fix: Fatal error: Cannot redeclare as3cf_get_secure_attachment_url()
75
+
76
  = WP Offload S3 Lite 1.0.2 - 2016-03-08 =
77
  * Bug fix: Uninstall would run even if pro plugin installed
78
 
wordpress-s3.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Offload S3 Lite
4
  Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/
5
  Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery.
6
  Author: Delicious Brains
7
- Version: 1.0.2
8
  Author URI: http://deliciousbrains.com/
9
  Network: True
10
  Text Domain: amazon-s3-and-cloudfront
@@ -26,7 +26,7 @@ Domain Path: /languages/
26
  // Then completely rewritten.
27
  */
28
 
29
- $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '1.0.2';
30
 
31
  $aws_plugin_version_required = '0.3.5';
32
 
4
  Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/
5
  Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery.
6
  Author: Delicious Brains
7
+ Version: 1.0.3
8
  Author URI: http://deliciousbrains.com/
9
  Network: True
10
  Text Domain: amazon-s3-and-cloudfront
26
  // Then completely rewritten.
27
  */
28
 
29
+ $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '1.0.3';
30
 
31
  $aws_plugin_version_required = '0.3.5';
32