WP Offload S3 Lite - Version 1.1.5

Version Description

= 1.1 = This is a major change, which ensures S3 URLs are no longer saved in post content. Instead, local URLs are filtered on page generation and replaced with the S3 version. If you depend on the S3 URLs being stored in post content you will need to make modifications to support this version.

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

Download this release

Release Info

Developer deliciousbrains
Plugin Icon 128x128 WP Offload S3 Lite
Version 1.1.5
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.5

README.md 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:** 4.4
5
- **Tested up to:** 4.7
6
- **Stable tag:** 1.1.4
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,11 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
69
 
70
  ## Changelog ##
71
 
 
 
 
 
 
72
  ### WP Offload S3 Lite 1.1.4 - 2016-12-13 ###
73
  * New: Upgrade routine to replace all S3 URLs in post excerpts with local URLs
74
  * Improvement: Performance improvements
2
  **Contributors:** bradt, deliciousbrains
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  **Requires at least:** 4.4
5
+ **Tested up to:** 4.7.1
6
+ **Stable tag:** 1.1.5
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.1.5 - 2017-01-12 ###
73
+ * Improvement: Filter custom CSS - S3 URLs will no longer be saved to the database
74
+ * Bug fix: PDF previews have incorrect MIME type
75
+ * Bug fix: Original PDF not removed from S3 on attachment delete when image previews exist
76
+
77
  ### WP Offload S3 Lite 1.1.4 - 2016-12-13 ###
78
  * New: Upgrade routine to replace all S3 URLs in post excerpts with local URLs
79
  * Improvement: Performance improvements
classes/amazon-s3-and-cloudfront.php CHANGED
@@ -1017,9 +1017,10 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1017
  $acl = apply_filters( 'as3cf_upload_acl_sizes', self::DEFAULT_ACL, $size, $post_id, $data );
1018
 
1019
  $additional_images[] = array(
1020
- 'Key' => $prefix . basename( $file_path ),
1021
- 'SourceFile' => $file_path,
1022
- 'ACL' => $acl,
 
1023
  );
1024
 
1025
  if ( self::DEFAULT_ACL !== $acl ) {
@@ -1093,6 +1094,19 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1093
  return $s3object;
1094
  }
1095
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1096
  /**
1097
  * Should gzip file
1098
  *
@@ -3676,10 +3690,10 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3676
  * @return array
3677
  */
3678
  public function get_attachment_file_paths( $attachment_id, $exists_locally = true, $meta = false, $include_backups = true ) {
3679
- $paths = array();
3680
  $file_path = get_attached_file( $attachment_id, true );
3681
- $file_name = basename( $file_path );
3682
- $backups = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );
 
3683
 
3684
  if ( ! $meta ) {
3685
  $meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
@@ -3689,15 +3703,13 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3689
  return $paths;
3690
  }
3691
 
3692
- $original_file = $file_path; // Not all attachments will have meta
3693
 
3694
- if ( isset( $meta['file'] ) ) {
3695
- $original_file = str_replace( $file_name, basename( $meta['file'] ), $file_path );
 
3696
  }
3697
 
3698
- // Original file
3699
- $paths['full'] = $original_file;
3700
-
3701
  // Sizes
3702
  if ( isset( $meta['sizes'] ) ) {
3703
  foreach ( $meta['sizes'] as $size => $file ) {
@@ -3707,15 +3719,14 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3707
  }
3708
  }
3709
 
3710
- // Thumb
3711
- if ( isset( $meta['thumb'] ) ) {
3712
- $paths[] = str_replace( $file_name, $meta['thumb'], $file_path );
3713
- }
3714
 
3715
  // Backups
3716
  if ( $include_backups && is_array( $backups ) ) {
3717
- foreach ( $backups as $backup ) {
3718
- $paths[] = str_replace( $file_name, $backup['file'], $file_path );
 
 
3719
  }
3720
  }
3721
 
1017
  $acl = apply_filters( 'as3cf_upload_acl_sizes', self::DEFAULT_ACL, $size, $post_id, $data );
1018
 
1019
  $additional_images[] = array(
1020
+ 'Key' => $prefix . basename( $file_path ),
1021
+ 'SourceFile' => $file_path,
1022
+ 'ACL' => $acl,
1023
+ 'ContentType' => $this->get_mime_type( $file_path ),
1024
  );
1025
 
1026
  if ( self::DEFAULT_ACL !== $acl ) {
1094
  return $s3object;
1095
  }
1096
 
1097
+ /**
1098
+ * Get a file's real mime type
1099
+ *
1100
+ * @param string $file_path
1101
+ *
1102
+ * @return string
1103
+ */
1104
+ protected function get_mime_type( $file_path ) {
1105
+ $file_type = wp_check_filetype_and_ext( $file_path, basename( $file_path ) );
1106
+
1107
+ return $file_type['type'];
1108
+ }
1109
+
1110
  /**
1111
  * Should gzip file
1112
  *
3690
  * @return array
3691
  */
3692
  public function get_attachment_file_paths( $attachment_id, $exists_locally = true, $meta = false, $include_backups = true ) {
 
3693
  $file_path = get_attached_file( $attachment_id, true );
3694
+ $paths = array(
3695
+ 'original' => $file_path,
3696
+ );
3697
 
3698
  if ( ! $meta ) {
3699
  $meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
3703
  return $paths;
3704
  }
3705
 
3706
+ $file_name = basename( $file_path );
3707
 
3708
+ // Thumb
3709
+ if ( isset( $meta['thumb'] ) ) {
3710
+ $paths['thumb'] = str_replace( $file_name, $meta['thumb'], $file_path );
3711
  }
3712
 
 
 
 
3713
  // Sizes
3714
  if ( isset( $meta['sizes'] ) ) {
3715
  foreach ( $meta['sizes'] as $size => $file ) {
3719
  }
3720
  }
3721
 
3722
+ $backups = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );
 
 
 
3723
 
3724
  // Backups
3725
  if ( $include_backups && is_array( $backups ) ) {
3726
+ foreach ( $backups as $size => $file ) {
3727
+ if ( isset( $file['file'] ) ) {
3728
+ $paths[ $size ] = str_replace( $file_name, $file['file'], $file_path );
3729
+ }
3730
  }
3731
  }
3732
 
classes/as3cf-filter.php CHANGED
@@ -248,7 +248,7 @@ abstract class AS3CF_Filter {
248
  protected function get_urls_from_content( $content, $cache, &$to_cache ) {
249
  $url_pairs = array();
250
 
251
- if ( ! preg_match_all( '/(http|https)?:?\/\/[^"\'\s<>\\\]*/', $content, $matches ) || ! isset( $matches[0] ) ) {
252
  // No URLs found, return
253
  return $url_pairs;
254
  }
@@ -495,17 +495,19 @@ abstract class AS3CF_Filter {
495
  /**
496
  * Get post cache
497
  *
 
 
498
  * @return array
499
  */
500
- protected function get_post_cache() {
501
- global $post;
502
 
503
- if ( ! isset( $post->ID ) ) {
504
  // Post ID not found, return empty cache
505
  return array();
506
  }
507
 
508
- $cache = get_post_meta( $post->ID, 'amazonS3_cache', true );
509
 
510
  if ( empty( $cache ) ) {
511
  $cache = array();
@@ -517,18 +519,40 @@ abstract class AS3CF_Filter {
517
  /**
518
  * Maybe update post cache
519
  *
520
- * @param array $to_cache
 
521
  */
522
- protected function maybe_update_post_cache( $to_cache ) {
523
- global $post;
524
 
525
- if ( ! isset( $post->ID ) || empty( $to_cache ) ) {
526
  return;
527
  }
528
 
529
- $urls = array_merge( $this->get_post_cache(), $to_cache );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
 
531
- update_post_meta( $post->ID, 'amazonS3_cache', $urls );
532
  }
533
 
534
  /**
@@ -644,6 +668,46 @@ abstract class AS3CF_Filter {
644
  return $content;
645
  }
646
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
647
  /**
648
  * Does URL need replacing?
649
  *
248
  protected function get_urls_from_content( $content, $cache, &$to_cache ) {
249
  $url_pairs = array();
250
 
251
+ if ( ! preg_match_all( '/(http|https)?:?\/\/[^"\'\s<>()\\\]*/', $content, $matches ) || ! isset( $matches[0] ) ) {
252
  // No URLs found, return
253
  return $url_pairs;
254
  }
495
  /**
496
  * Get post cache
497
  *
498
+ * @param bool|int $post_id
499
+ *
500
  * @return array
501
  */
502
+ protected function get_post_cache( $post_id = false ) {
503
+ $post_id = $this->get_post_id( $post_id );
504
 
505
+ if ( ! $post_id ) {
506
  // Post ID not found, return empty cache
507
  return array();
508
  }
509
 
510
+ $cache = get_post_meta( $post_id, 'amazonS3_cache', true );
511
 
512
  if ( empty( $cache ) ) {
513
  $cache = array();
519
  /**
520
  * Maybe update post cache
521
  *
522
+ * @param array $to_cache
523
+ * @param bool|int $post_id
524
  */
525
+ protected function maybe_update_post_cache( $to_cache, $post_id = false ) {
526
+ $post_id = $this->get_post_id( $post_id );
527
 
528
+ if ( ! $post_id || empty( $to_cache ) ) {
529
  return;
530
  }
531
 
532
+ $urls = array_merge( $this->get_post_cache( $post_id ), $to_cache );
533
+
534
+ update_post_meta( $post_id, 'amazonS3_cache', $urls );
535
+ }
536
+
537
+ /**
538
+ * Get post ID.
539
+ *
540
+ * @param bool|int $post_id
541
+ *
542
+ * @return bool|int
543
+ */
544
+ protected function get_post_id( $post_id ) {
545
+ if ( false !== $post_id ) {
546
+ return $post_id;
547
+ }
548
+
549
+ global $post;
550
+
551
+ if ( isset( $post->ID ) ) {
552
+ return $post->ID;
553
+ }
554
 
555
+ return false;
556
  }
557
 
558
  /**
668
  return $content;
669
  }
670
 
671
+ /**
672
+ * Filter custom CSS.
673
+ *
674
+ * @param string $css
675
+ * @param string $stylesheet
676
+ *
677
+ * @return string
678
+ */
679
+ protected function filter_custom_css( $css, $stylesheet ) {
680
+ if ( empty( $css ) ) {
681
+ return $css;
682
+ }
683
+
684
+ $post_id = $this->get_custom_css_post_id( $stylesheet );
685
+ $cache = $this->get_post_cache( $post_id );
686
+ $to_cache = array();
687
+ $css = $this->process_content( $css, $cache, $to_cache );
688
+
689
+ $this->maybe_update_post_cache( $to_cache, $post_id );
690
+
691
+ return $css;
692
+ }
693
+
694
+ /**
695
+ * Get custom CSS post ID.
696
+ *
697
+ * @param string $stylesheet
698
+ *
699
+ * @return int
700
+ */
701
+ protected function get_custom_css_post_id( $stylesheet ) {
702
+ $post = wp_get_custom_css_post( $stylesheet );
703
+
704
+ if ( ! $post ) {
705
+ return 0;
706
+ }
707
+
708
+ return $post->ID;
709
+ }
710
+
711
  /**
712
  * Does URL need replacing?
713
  *
classes/filters/as3cf-local-to-s3.php CHANGED
@@ -11,6 +11,8 @@ class AS3CF_Local_To_S3 extends AS3CF_Filter {
11
  // Customizer
12
  add_filter( 'theme_mod_background_image', array( $this, 'filter_customizer_image' ) );
13
  add_filter( 'theme_mod_header_image', array( $this, 'filter_customizer_image' ) );
 
 
14
  // Posts
15
  add_action( 'the_post', array( $this, 'filter_post_data' ) );
16
  add_filter( 'content_pagination', array( $this, 'filter_content_pagination' ) );
@@ -23,6 +25,30 @@ class AS3CF_Local_To_S3 extends AS3CF_Filter {
23
  add_filter( 'widget_form_callback', array( $this, 'filter_widget_form' ), 10, 2 );
24
  }
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Filter post data.
28
  *
@@ -34,7 +60,7 @@ class AS3CF_Local_To_S3 extends AS3CF_Filter {
34
  $cache = $this->get_post_cache();
35
  $to_cache = array();
36
 
37
- if ( count( $pages ) === 1 ) {
38
  // Post already filtered and available on global $page array, continue
39
  $post->post_content = $pages[0];
40
  } else {
11
  // Customizer
12
  add_filter( 'theme_mod_background_image', array( $this, 'filter_customizer_image' ) );
13
  add_filter( 'theme_mod_header_image', array( $this, 'filter_customizer_image' ) );
14
+ add_filter( 'customize_value_custom_css', array( $this, 'filter_customize_value_custom_css' ), 10, 2 );
15
+ add_filter( 'wp_get_custom_css', array( $this, 'filter_wp_get_custom_css' ), 10, 2 );
16
  // Posts
17
  add_action( 'the_post', array( $this, 'filter_post_data' ) );
18
  add_filter( 'content_pagination', array( $this, 'filter_content_pagination' ) );
25
  add_filter( 'widget_form_callback', array( $this, 'filter_widget_form' ), 10, 2 );
26
  }
27
 
28
+ /**
29
+ * Filter customize value custom CSS.
30
+ *
31
+ * @param mixed $value
32
+ * @param WP_Customize_Custom_CSS_Setting $setting
33
+ *
34
+ * @return mixed
35
+ */
36
+ public function filter_customize_value_custom_css( $value, $setting ) {
37
+ return $this->filter_custom_css( $value, $setting->stylesheet );
38
+ }
39
+
40
+ /**
41
+ * Filter `wp_get_custom_css`.
42
+ *
43
+ * @param string $css
44
+ * @param string $stylesheet
45
+ *
46
+ * @return string
47
+ */
48
+ public function filter_wp_get_custom_css( $css, $stylesheet ) {
49
+ return $this->filter_custom_css( $css, $stylesheet );
50
+ }
51
+
52
  /**
53
  * Filter post data.
54
  *
60
  $cache = $this->get_post_cache();
61
  $to_cache = array();
62
 
63
+ if ( 1 === count( $pages ) && ! empty( $pages[0] ) ) {
64
  // Post already filtered and available on global $page array, continue
65
  $post->post_content = $pages[0];
66
  } else {
classes/filters/as3cf-s3-to-local.php CHANGED
@@ -12,6 +12,7 @@ class AS3CF_S3_To_Local extends AS3CF_Filter {
12
  add_filter( 'pre_set_theme_mod_background_image', array( $this, 'filter_customizer_image' ), 10, 2 );
13
  add_filter( 'pre_set_theme_mod_header_image', array( $this, 'filter_customizer_image' ), 10, 2 );
14
  add_filter( 'pre_set_theme_mod_header_image_data', array( $this, 'filter_header_image_data' ), 10, 2 );
 
15
  // Posts
16
  add_filter( 'content_save_pre', array( $this, 'filter_post' ) );
17
  add_filter( 'excerpt_save_pre', array( $this, 'filter_post' ) );
@@ -19,6 +20,20 @@ class AS3CF_S3_To_Local extends AS3CF_Filter {
19
  add_filter( 'widget_update_callback', array( $this, 'filter_widget_update' ), 10, 4 );
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * Filter widget update.
24
  *
@@ -44,6 +59,15 @@ class AS3CF_S3_To_Local extends AS3CF_Filter {
44
  return $instance;
45
  }
46
 
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Does URL need replacing?
49
  *
12
  add_filter( 'pre_set_theme_mod_background_image', array( $this, 'filter_customizer_image' ), 10, 2 );
13
  add_filter( 'pre_set_theme_mod_header_image', array( $this, 'filter_customizer_image' ), 10, 2 );
14
  add_filter( 'pre_set_theme_mod_header_image_data', array( $this, 'filter_header_image_data' ), 10, 2 );
15
+ add_filter( 'update_custom_css_data', array( $this, 'filter_update_custom_css_data' ), 10, 2 );
16
  // Posts
17
  add_filter( 'content_save_pre', array( $this, 'filter_post' ) );
18
  add_filter( 'excerpt_save_pre', array( $this, 'filter_post' ) );
20
  add_filter( 'widget_update_callback', array( $this, 'filter_widget_update' ), 10, 4 );
21
  }
22
 
23
+ /**
24
+ * Filter update custom CSS data.
25
+ *
26
+ * @param array $data
27
+ * @param array $args
28
+ *
29
+ * @return array
30
+ */
31
+ public function filter_update_custom_css_data( $data, $args ) {
32
+ $data['css'] = $this->filter_custom_css( $data['css'], $args['stylesheet'] );
33
+
34
+ return $data;
35
+ }
36
+
37
  /**
38
  * Filter widget update.
39
  *
59
  return $instance;
60
  }
61
 
62
+ /**
63
+ * Should filter content.
64
+ *
65
+ * @return bool
66
+ */
67
+ protected function should_filter_content() {
68
+ return true;
69
+ }
70
+
71
  /**
72
  * Does URL need replacing?
73
  *
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-12-13 11:56+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"
@@ -49,103 +49,103 @@ msgstr ""
49
  msgid "Error uploading %s to S3: %s"
50
  msgstr ""
51
 
52
- #: classes/amazon-s3-and-cloudfront.php:2170
53
  msgid "Cheatin&#8217; eh?"
54
  msgstr ""
55
 
56
- #: classes/amazon-s3-and-cloudfront.php:2174
57
  msgid "You do not have sufficient permissions to access this page."
58
  msgstr ""
59
 
60
- #: classes/amazon-s3-and-cloudfront.php:2180
61
  msgid "No bucket name provided."
62
  msgstr ""
63
 
64
- #: classes/amazon-s3-and-cloudfront.php:2439
65
  msgid "Error Getting Bucket Region"
66
  msgstr ""
67
 
68
- #: classes/amazon-s3-and-cloudfront.php:2440
69
  #, php-format
70
  msgid "There was an error attempting to get the region of the bucket %s: %s"
71
  msgstr ""
72
 
73
- #: classes/amazon-s3-and-cloudfront.php:2560
74
  msgid ""
75
  "This is a test file to check if the user has write permission to S3. Delete "
76
  "me if found."
77
  msgstr ""
78
 
79
- #: classes/amazon-s3-and-cloudfront.php:2592
80
  #, php-format
81
  msgid ""
82
  "There was an error attempting to check the permissions of the bucket %s: %s"
83
  msgstr ""
84
 
85
- #: classes/amazon-s3-and-cloudfront.php:2649
86
  msgid "Error creating bucket"
87
  msgstr ""
88
 
89
- #: classes/amazon-s3-and-cloudfront.php:2650
90
  msgid "Bucket name too short."
91
  msgstr ""
92
 
93
- #: classes/amazon-s3-and-cloudfront.php:2651
94
  msgid "Bucket name too long."
95
  msgstr ""
96
 
97
- #: classes/amazon-s3-and-cloudfront.php:2652
98
  msgid ""
99
  "Invalid character. Bucket names can contain lowercase letters, numbers, "
100
  "periods and hyphens."
101
  msgstr ""
102
 
103
- #: classes/amazon-s3-and-cloudfront.php:2653
104
  msgid "Error saving bucket"
105
  msgstr ""
106
 
107
- #: classes/amazon-s3-and-cloudfront.php:2654
108
  msgid "Error fetching buckets"
109
  msgstr ""
110
 
111
- #: classes/amazon-s3-and-cloudfront.php:2655
112
  msgid "Error getting URL preview: "
113
  msgstr ""
114
 
115
- #: classes/amazon-s3-and-cloudfront.php:2656
116
  msgid "The changes you made will be lost if you navigate away from this page"
117
  msgstr ""
118
 
119
- #: classes/amazon-s3-and-cloudfront.php:2657
120
  msgid "Getting diagnostic info..."
121
  msgstr ""
122
 
123
- #: classes/amazon-s3-and-cloudfront.php:2658
124
  msgid "Error getting diagnostic info: "
125
  msgstr ""
126
 
127
- #: classes/amazon-s3-and-cloudfront.php:2726
128
  msgid "Cheatin' eh?"
129
  msgstr ""
130
 
131
- #: classes/amazon-s3-and-cloudfront.php:2834
132
  msgctxt "Show the media library tab"
133
  msgid "Media Library"
134
  msgstr ""
135
 
136
- #: classes/amazon-s3-and-cloudfront.php:2835
137
  msgctxt "Show the support tab"
138
  msgid "Support"
139
  msgstr ""
140
 
141
- #: classes/amazon-s3-and-cloudfront.php:3052
142
  #, php-format
143
  msgid ""
144
  "<strong>WP Offload S3</strong> &mdash; The file %s has been given %s "
145
  "permissions on Amazon S3."
146
  msgstr ""
147
 
148
- #: classes/amazon-s3-and-cloudfront.php:3071
149
  msgid ""
150
  "<strong>WP Offload S3 Requirement Missing</strong> &mdash; Looks like you "
151
  "don't have an image manipulation library installed on this server and "
@@ -153,11 +153,11 @@ msgid ""
153
  "Please setup GD or ImageMagick."
154
  msgstr ""
155
 
156
- #: classes/amazon-s3-and-cloudfront.php:3748
157
  msgid "Quick Start Guide"
158
  msgstr ""
159
 
160
- #: classes/amazon-s3-and-cloudfront.php:3750
161
  #, php-format
162
  msgid ""
163
  "Looks like we don't have write access to this bucket. It's likely that the "
@@ -166,7 +166,7 @@ msgid ""
166
  "correctly."
167
  msgstr ""
168
 
169
- #: classes/amazon-s3-and-cloudfront.php:3752
170
  #, php-format
171
  msgid ""
172
  "Looks like we don't have access to the buckets. It's likely that the user "
@@ -174,39 +174,39 @@ msgid ""
174
  "Please see our %s for instructions on setting up permissions correctly."
175
  msgstr ""
176
 
177
- #: classes/amazon-s3-and-cloudfront.php:3903
178
  msgid "WP Offload S3 Activation"
179
  msgstr ""
180
 
181
- #: classes/amazon-s3-and-cloudfront.php:3904
182
  msgid ""
183
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
184
  "automatically deactivated WP Offload S3 Lite."
185
  msgstr ""
186
 
187
- #: classes/amazon-s3-and-cloudfront.php:3906
188
  msgid "WP Offload S3 Lite Activation"
189
  msgstr ""
190
 
191
- #: classes/amazon-s3-and-cloudfront.php:3907
192
  msgid ""
193
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
194
  "automatically deactivated WP Offload S3."
195
  msgstr ""
196
 
197
- #: classes/amazon-s3-and-cloudfront.php:3981
198
  msgid "More info"
199
  msgstr ""
200
 
201
- #: classes/amazon-s3-and-cloudfront.php:4072
202
  msgid "this doc"
203
  msgstr ""
204
 
205
- #: classes/amazon-s3-and-cloudfront.php:4074
206
  msgid "WP Offload S3 Feature Removed"
207
  msgstr ""
208
 
209
- #: classes/amazon-s3-and-cloudfront.php:4075
210
  #, php-format
211
  msgid ""
212
  "You had the \"Always non-SSL\" option selected in your settings, but we've "
@@ -217,32 +217,32 @@ msgid ""
217
  "to the old behavior."
218
  msgstr ""
219
 
220
- #: classes/amazon-s3-and-cloudfront.php:4103
221
- #: classes/amazon-s3-and-cloudfront.php:4196
222
  msgid "Amazon S3"
223
  msgstr ""
224
 
225
- #: classes/amazon-s3-and-cloudfront.php:4197
226
  msgctxt "Amazon S3 bucket"
227
  msgid "Bucket"
228
  msgstr ""
229
 
230
- #: classes/amazon-s3-and-cloudfront.php:4198
231
  msgctxt "Path to file on Amazon S3"
232
  msgid "Path"
233
  msgstr ""
234
 
235
- #: classes/amazon-s3-and-cloudfront.php:4199
236
  msgctxt "Location of Amazon S3 bucket"
237
  msgid "Region"
238
  msgstr ""
239
 
240
- #: classes/amazon-s3-and-cloudfront.php:4200
241
  msgctxt "Access control list of the file on Amazon S3"
242
  msgid "Access"
243
  msgstr ""
244
 
245
- #: classes/amazon-s3-and-cloudfront.php:4201
246
  msgid "URL"
247
  msgstr ""
248
 
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
+ "POT-Creation-Date: 2017-01-12 08:46-0500\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"
49
  msgid "Error uploading %s to S3: %s"
50
  msgstr ""
51
 
52
+ #: classes/amazon-s3-and-cloudfront.php:2184
53
  msgid "Cheatin&#8217; eh?"
54
  msgstr ""
55
 
56
+ #: classes/amazon-s3-and-cloudfront.php:2188
57
  msgid "You do not have sufficient permissions to access this page."
58
  msgstr ""
59
 
60
+ #: classes/amazon-s3-and-cloudfront.php:2194
61
  msgid "No bucket name provided."
62
  msgstr ""
63
 
64
+ #: classes/amazon-s3-and-cloudfront.php:2453
65
  msgid "Error Getting Bucket Region"
66
  msgstr ""
67
 
68
+ #: classes/amazon-s3-and-cloudfront.php:2454
69
  #, php-format
70
  msgid "There was an error attempting to get the region of the bucket %s: %s"
71
  msgstr ""
72
 
73
+ #: classes/amazon-s3-and-cloudfront.php:2574
74
  msgid ""
75
  "This is a test file to check if the user has write permission to S3. Delete "
76
  "me if found."
77
  msgstr ""
78
 
79
+ #: classes/amazon-s3-and-cloudfront.php:2606
80
  #, php-format
81
  msgid ""
82
  "There was an error attempting to check the permissions of the bucket %s: %s"
83
  msgstr ""
84
 
85
+ #: classes/amazon-s3-and-cloudfront.php:2663
86
  msgid "Error creating bucket"
87
  msgstr ""
88
 
89
+ #: classes/amazon-s3-and-cloudfront.php:2664
90
  msgid "Bucket name too short."
91
  msgstr ""
92
 
93
+ #: classes/amazon-s3-and-cloudfront.php:2665
94
  msgid "Bucket name too long."
95
  msgstr ""
96
 
97
+ #: classes/amazon-s3-and-cloudfront.php:2666
98
  msgid ""
99
  "Invalid character. Bucket names can contain lowercase letters, numbers, "
100
  "periods and hyphens."
101
  msgstr ""
102
 
103
+ #: classes/amazon-s3-and-cloudfront.php:2667
104
  msgid "Error saving bucket"
105
  msgstr ""
106
 
107
+ #: classes/amazon-s3-and-cloudfront.php:2668
108
  msgid "Error fetching buckets"
109
  msgstr ""
110
 
111
+ #: classes/amazon-s3-and-cloudfront.php:2669
112
  msgid "Error getting URL preview: "
113
  msgstr ""
114
 
115
+ #: classes/amazon-s3-and-cloudfront.php:2670
116
  msgid "The changes you made will be lost if you navigate away from this page"
117
  msgstr ""
118
 
119
+ #: classes/amazon-s3-and-cloudfront.php:2671
120
  msgid "Getting diagnostic info..."
121
  msgstr ""
122
 
123
+ #: classes/amazon-s3-and-cloudfront.php:2672
124
  msgid "Error getting diagnostic info: "
125
  msgstr ""
126
 
127
+ #: classes/amazon-s3-and-cloudfront.php:2740
128
  msgid "Cheatin' eh?"
129
  msgstr ""
130
 
131
+ #: classes/amazon-s3-and-cloudfront.php:2848
132
  msgctxt "Show the media library tab"
133
  msgid "Media Library"
134
  msgstr ""
135
 
136
+ #: classes/amazon-s3-and-cloudfront.php:2849
137
  msgctxt "Show the support tab"
138
  msgid "Support"
139
  msgstr ""
140
 
141
+ #: classes/amazon-s3-and-cloudfront.php:3066
142
  #, php-format
143
  msgid ""
144
  "<strong>WP Offload S3</strong> &mdash; The file %s has been given %s "
145
  "permissions on Amazon S3."
146
  msgstr ""
147
 
148
+ #: classes/amazon-s3-and-cloudfront.php:3085
149
  msgid ""
150
  "<strong>WP Offload S3 Requirement Missing</strong> &mdash; Looks like you "
151
  "don't have an image manipulation library installed on this server and "
153
  "Please setup GD or ImageMagick."
154
  msgstr ""
155
 
156
+ #: classes/amazon-s3-and-cloudfront.php:3759
157
  msgid "Quick Start Guide"
158
  msgstr ""
159
 
160
+ #: classes/amazon-s3-and-cloudfront.php:3761
161
  #, php-format
162
  msgid ""
163
  "Looks like we don't have write access to this bucket. It's likely that the "
166
  "correctly."
167
  msgstr ""
168
 
169
+ #: classes/amazon-s3-and-cloudfront.php:3763
170
  #, php-format
171
  msgid ""
172
  "Looks like we don't have access to the buckets. It's likely that the user "
174
  "Please see our %s for instructions on setting up permissions correctly."
175
  msgstr ""
176
 
177
+ #: classes/amazon-s3-and-cloudfront.php:3914
178
  msgid "WP Offload S3 Activation"
179
  msgstr ""
180
 
181
+ #: classes/amazon-s3-and-cloudfront.php:3915
182
  msgid ""
183
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
184
  "automatically deactivated WP Offload S3 Lite."
185
  msgstr ""
186
 
187
+ #: classes/amazon-s3-and-cloudfront.php:3917
188
  msgid "WP Offload S3 Lite Activation"
189
  msgstr ""
190
 
191
+ #: classes/amazon-s3-and-cloudfront.php:3918
192
  msgid ""
193
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
194
  "automatically deactivated WP Offload S3."
195
  msgstr ""
196
 
197
+ #: classes/amazon-s3-and-cloudfront.php:3992
198
  msgid "More info"
199
  msgstr ""
200
 
201
+ #: classes/amazon-s3-and-cloudfront.php:4083
202
  msgid "this doc"
203
  msgstr ""
204
 
205
+ #: classes/amazon-s3-and-cloudfront.php:4085
206
  msgid "WP Offload S3 Feature Removed"
207
  msgstr ""
208
 
209
+ #: classes/amazon-s3-and-cloudfront.php:4086
210
  #, php-format
211
  msgid ""
212
  "You had the \"Always non-SSL\" option selected in your settings, but we've "
217
  "to the old behavior."
218
  msgstr ""
219
 
220
+ #: classes/amazon-s3-and-cloudfront.php:4114
221
+ #: classes/amazon-s3-and-cloudfront.php:4207
222
  msgid "Amazon S3"
223
  msgstr ""
224
 
225
+ #: classes/amazon-s3-and-cloudfront.php:4208
226
  msgctxt "Amazon S3 bucket"
227
  msgid "Bucket"
228
  msgstr ""
229
 
230
+ #: classes/amazon-s3-and-cloudfront.php:4209
231
  msgctxt "Path to file on Amazon S3"
232
  msgid "Path"
233
  msgstr ""
234
 
235
+ #: classes/amazon-s3-and-cloudfront.php:4210
236
  msgctxt "Location of Amazon S3 bucket"
237
  msgid "Region"
238
  msgstr ""
239
 
240
+ #: classes/amazon-s3-and-cloudfront.php:4211
241
  msgctxt "Access control list of the file on Amazon S3"
242
  msgid "Access"
243
  msgstr ""
244
 
245
+ #: classes/amazon-s3-and-cloudfront.php:4212
246
  msgid "URL"
247
  msgstr ""
248
 
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: 4.4
5
- Tested up to: 4.7
6
- Stable tag: 1.1.4
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.
@@ -65,6 +65,11 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
68
  = WP Offload S3 Lite 1.1.4 - 2016-12-13 =
69
  * New: Upgrade routine to replace all S3 URLs in post excerpts with local URLs
70
  * Improvement: Performance improvements
2
  Contributors: bradt, deliciousbrains
3
  Tags: uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  Requires at least: 4.4
5
+ Tested up to: 4.7.1
6
+ Stable tag: 1.1.5
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.
65
 
66
  == Changelog ==
67
 
68
+ = WP Offload S3 Lite 1.1.5 - 2017-01-12 =
69
+ * Improvement: Filter custom CSS - S3 URLs will no longer be saved to the database
70
+ * Bug fix: PDF previews have incorrect MIME type
71
+ * Bug fix: Original PDF not removed from S3 on attachment delete when image previews exist
72
+
73
  = WP Offload S3 Lite 1.1.4 - 2016-12-13 =
74
  * New: Upgrade routine to replace all S3 URLs in post excerpts with local URLs
75
  * Improvement: Performance improvements
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.1.4
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.1.4';
30
 
31
  $aws_plugin_version_required = '1.0.1';
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.1.5
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.1.5';
30
 
31
  $aws_plugin_version_required = '1.0.1';
32