WP Offload S3 Lite - Version 0.9.9

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 0.9.9
Comparing to
See all releases

Code changes from version 0.9.8 to 0.9.9

README.md CHANGED
@@ -3,7 +3,7 @@
3
**Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
4
**Requires at least:** 3.7
5
**Tested up to:** 4.3
6
- **Stable tag:** 0.9.8
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.
@@ -67,6 +67,14 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
67
68
## Changelog ##
69
70
### 0.9.8 - 2015-11-02 ###
71
* Bug fix: Attachment URLs containing query string parameters incorrectly encoded
72
3
**Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
4
**Requires at least:** 3.7
5
**Tested up to:** 4.3
6
+ **Stable tag:** 0.9.9
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.
67
68
## Changelog ##
69
70
+ ### 0.9.9 - 2015-11-12 ###
71
+ * Improvement: Improve wording of compatibility notices
72
+ * Improvement: Compatibility with Easy Digital Downloads 1.0.1 and WooCommerce 1.0.3 addons
73
+ * Improvement: Better determine available memory for background processes
74
+ * Bug fix: URL previews incorrect due to stripping `/` characters
75
+ * Bug fix: PHP Warning: stream_wrapper_register(): Protocol s3:// is already defined
76
+ * Bug fix: PHP Fatal error: Call to undefined method WP_Error::get()
77
+
78
### 0.9.8 - 2015-11-02 ###
79
* Bug fix: Attachment URLs containing query string parameters incorrectly encoded
80
classes/amazon-s3-and-cloudfront.php CHANGED
@@ -104,24 +104,30 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
104
new AS3CF_Upgrade_File_Sizes( $this );
105
new AS3CF_Upgrade_Meta_WP_Error( $this );
106
107
add_action( 'aws_admin_menu', array( $this, 'admin_menu' ) );
108
add_action( 'wp_ajax_as3cf-get-buckets', array( $this, 'ajax_get_buckets' ) );
109
add_action( 'wp_ajax_as3cf-save-bucket', array( $this, 'ajax_save_bucket' ) );
110
add_action( 'wp_ajax_as3cf-create-bucket', array( $this, 'ajax_create_bucket' ) );
111
add_action( 'wp_ajax_as3cf-manual-save-bucket', array( $this, 'ajax_save_bucket' ) );
112
add_action( 'wp_ajax_as3cf-get-url-preview', array( $this, 'ajax_get_url_preview' ) );
113
114
add_filter( 'wp_get_attachment_url', array( $this, 'wp_get_attachment_url' ), 99, 2 );
115
- add_filter( 'wp_handle_upload_prefilter', array( $this, 'wp_handle_upload_prefilter' ), 1 );
116
- add_filter( 'wp_update_attachment_metadata', array( $this, 'wp_update_attachment_metadata' ), 110, 2 );
117
add_filter( 'get_image_tag', array( $this, 'maybe_encode_get_image_tag' ), 99, 6 );
118
add_filter( 'wp_get_attachment_image_src', array( $this, 'maybe_encode_wp_get_attachment_image_src' ), 99, 4 );
119
add_filter( 'wp_prepare_attachment_for_js', array( $this, 'maybe_encode_wp_prepare_attachment_for_js' ), 99, 3 );
120
add_filter( 'delete_attachment', array( $this, 'delete_attachment' ), 20 );
121
add_filter( 'update_attached_file', array( $this, 'update_attached_file' ), 100, 2 );
122
- add_filter( 'get_attached_file', array( $this, 'get_attached_file' ), 10, 2 );
123
- add_filter( 'plugin_action_links', array( $this, 'plugin_actions_settings_link' ), 10, 2 );
124
- add_filter( 'pre_get_space_used', array( $this, 'multisite_get_spaced_used' ) );
125
126
// include compatibility code for other plugins
127
$this->plugin_compat = new AS3CF_Plugin_Compatibility( $this );
@@ -387,7 +393,8 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
387
if ( is_wp_error( $region ) ) {
388
$region = '';
389
}
390
- $domain = $this->sanitize_custom_domain( $this->get_s3_url_domain( $bucket, $region ) );
391
392
$url = $scheme . '://' . $domain . '/' . $path . $suffix;
393
@@ -1117,14 +1124,15 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1117
* @param int|null $expires Seconds for the link to live
1118
* @param string|null $size Size of the image to get
1119
* @param array $headers Header overrides for request
1120
*
1121
* @return mixed|void|WP_Error
1122
*/
1123
- function get_secure_attachment_url( $post_id, $expires = null, $size = null, $headers = array() ) {
1124
if ( is_null( $expires ) ) {
1125
$expires = self::DEFAULT_EXPIRES;
1126
}
1127
- return $this->get_attachment_url( $post_id, $expires, $size, null, $headers );
1128
}
1129
1130
/**
@@ -1236,10 +1244,11 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1236
* @param string $region
1237
* @param int $expires
1238
* @param array $args Allows you to specify custom URL settings
1239
*
1240
* @return mixed|string|void
1241
*/
1242
- function get_s3_url_domain( $bucket, $region = '', $expires = null, $args = array() ) {
1243
if ( ! isset( $args['cloudfront'] ) ) {
1244
$args['cloudfront'] = $this->get_setting( 'cloudfront' );
1245
}
@@ -1255,7 +1264,12 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1255
$prefix = $this->get_s3_url_prefix( $region, $expires );
1256
1257
if ( 'cloudfront' === $args['domain'] && is_null( $expires ) && $args['cloudfront'] ) {
1258
- $s3_domain = $args['cloudfront'];
1259
}
1260
elseif ( 'virtual-host' === $args['domain'] ) {
1261
$s3_domain = $bucket;
@@ -1273,16 +1287,19 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1273
/**
1274
* Get the url of the file from Amazon S3
1275
*
1276
- * @param int $post_id Post ID of the attachment
1277
- * @param int|null $expires Seconds for the link to live
1278
- * @param string|null $size Size of the image to get
1279
- * @param array|null $meta Pre retrieved _wp_attachment_metadata for the attachment
1280
- * @param array $headers Header overrides for request
1281
*
1282
* @return bool|mixed|void|WP_Error
1283
*/
1284
- function get_attachment_url( $post_id, $expires = null, $size = null, $meta = null, $headers = array() ) {
1285
- if ( ! $this->get_setting( 'serve-from-s3' ) ) {
1286
return false;
1287
}
1288
@@ -1317,7 +1334,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1317
}
1318
}
1319
1320
- if ( ! is_null( $expires ) ) {
1321
try {
1322
$expires = time() + $expires;
1323
$secure_url = $this->get_s3client( $region )->getObjectUrl( $s3object['bucket'], $s3object['key'], $expires, $headers );
@@ -2021,8 +2038,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
2021
/**
2022
* Register modal scripts and styles so they can be enqueued later
2023
*/
2024
- function register_modal_assets()
2025
- {
2026
$version = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : $this->plugin_version;
2027
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
2028
@@ -2963,8 +2979,8 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
2963
* @return bool
2964
*/
2965
public function memory_exceeded( $filter_name = null ) {
2966
$current_memory = memory_get_usage( true );
2967
- $memory_limit = ( intval( WP_MEMORY_LIMIT ) * 1024 * 1024 ) * 0.9; // 90% of max memory
2968
$return = false;
2969
2970
if ( $current_memory >= $memory_limit ) {
@@ -2978,6 +2994,27 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
2978
return apply_filters( $filter_name, $return );
2979
}
2980
2981
/**
2982
* Count attachments on a site
2983
*
104
new AS3CF_Upgrade_File_Sizes( $this );
105
new AS3CF_Upgrade_Meta_WP_Error( $this );
106
107
+ // Plugin setup
108
add_action( 'aws_admin_menu', array( $this, 'admin_menu' ) );
109
+ add_filter( 'plugin_action_links', array( $this, 'plugin_actions_settings_link' ), 10, 2 );
110
+ add_filter( 'pre_get_space_used', array( $this, 'multisite_get_spaced_used' ) );
111
+
112
+ // UI AJAX
113
add_action( 'wp_ajax_as3cf-get-buckets', array( $this, 'ajax_get_buckets' ) );
114
add_action( 'wp_ajax_as3cf-save-bucket', array( $this, 'ajax_save_bucket' ) );
115
add_action( 'wp_ajax_as3cf-create-bucket', array( $this, 'ajax_create_bucket' ) );
116
add_action( 'wp_ajax_as3cf-manual-save-bucket', array( $this, 'ajax_save_bucket' ) );
117
add_action( 'wp_ajax_as3cf-get-url-preview', array( $this, 'ajax_get_url_preview' ) );
118
119
+ // Rewriting URLs, doesn't depend on plugin being setup
120
add_filter( 'wp_get_attachment_url', array( $this, 'wp_get_attachment_url' ), 99, 2 );
121
add_filter( 'get_image_tag', array( $this, 'maybe_encode_get_image_tag' ), 99, 6 );
122
add_filter( 'wp_get_attachment_image_src', array( $this, 'maybe_encode_wp_get_attachment_image_src' ), 99, 4 );
123
add_filter( 'wp_prepare_attachment_for_js', array( $this, 'maybe_encode_wp_prepare_attachment_for_js' ), 99, 3 );
124
+ add_filter( 'get_attached_file', array( $this, 'get_attached_file' ), 10, 2 );
125
+
126
+ // Communication with S3, plugin needs to be setup
127
+ add_filter( 'wp_handle_upload_prefilter', array( $this, 'wp_handle_upload_prefilter' ), 1 );
128
+ add_filter( 'wp_update_attachment_metadata', array( $this, 'wp_update_attachment_metadata' ), 110, 2 );
129
add_filter( 'delete_attachment', array( $this, 'delete_attachment' ), 20 );
130
add_filter( 'update_attached_file', array( $this, 'update_attached_file' ), 100, 2 );
131
132
// include compatibility code for other plugins
133
$this->plugin_compat = new AS3CF_Plugin_Compatibility( $this );
393
if ( is_wp_error( $region ) ) {
394
$region = '';
395
}
396
+
397
+ $domain = $this->get_s3_url_domain( $bucket, $region, null, array(), true );
398
399
$url = $scheme . '://' . $domain . '/' . $path . $suffix;
400
1124
* @param int|null $expires Seconds for the link to live
1125
* @param string|null $size Size of the image to get
1126
* @param array $headers Header overrides for request
1127
+ * @param bool $skip_rewrite_check
1128
*
1129
* @return mixed|void|WP_Error
1130
*/
1131
+ function get_secure_attachment_url( $post_id, $expires = null, $size = null, $headers = array(), $skip_rewrite_check = false ) {
1132
if ( is_null( $expires ) ) {
1133
$expires = self::DEFAULT_EXPIRES;
1134
}
1135
+ return $this->get_attachment_url( $post_id, $expires, $size, null, $headers, $skip_rewrite_check );
1136
}
1137
1138
/**
1244
* @param string $region
1245
* @param int $expires
1246
* @param array $args Allows you to specify custom URL settings
1247
+ * @param bool $preview When generating the URL preview sanitize certain output
1248
*
1249
* @return mixed|string|void
1250
*/
1251
+ function get_s3_url_domain( $bucket, $region = '', $expires = null, $args = array(), $preview = false ) {
1252
if ( ! isset( $args['cloudfront'] ) ) {
1253
$args['cloudfront'] = $this->get_setting( 'cloudfront' );
1254
}
1264
$prefix = $this->get_s3_url_prefix( $region, $expires );
1265
1266
if ( 'cloudfront' === $args['domain'] && is_null( $expires ) && $args['cloudfront'] ) {
1267
+ $cloudfront = $args['cloudfront'];
1268
+ if ( $preview ) {
1269
+ $cloudfront = $this->sanitize_custom_domain( $cloudfront );
1270
+ }
1271
+
1272
+ $s3_domain = $cloudfront;
1273
}
1274
elseif ( 'virtual-host' === $args['domain'] ) {
1275
$s3_domain = $bucket;
1287
/**
1288
* Get the url of the file from Amazon S3
1289
*
1290
+ * @param int $post_id Post ID of the attachment
1291
+ * @param int|null $expires Seconds for the link to live
1292
+ * @param string|null $size Size of the image to get
1293
+ * @param array|null $meta Pre retrieved _wp_attachment_metadata for the attachment
1294
+ * @param array $headers Header overrides for request
1295
+ * @param bool $skip_rewrite_check Always return the URL regardless of the 'Rewrite File URLs' setting.
1296
+ * Useful for the EDD and Woo addons to not break download URLs when the
1297
+ * option is disabled.
1298
*
1299
* @return bool|mixed|void|WP_Error
1300
*/
1301
+ function get_attachment_url( $post_id, $expires = null, $size = null, $meta = null, $headers = array(), $skip_rewrite_check = false ) {
1302
+ if ( ! $skip_rewrite_check && ! $this->get_setting( 'serve-from-s3' ) ) {
1303
return false;
1304
}
1305
1334
}
1335
}
1336
1337
+ if ( ! is_null( $expires ) && $this->is_plugin_setup() ) {
1338
try {
1339
$expires = time() + $expires;
1340
$secure_url = $this->get_s3client( $region )->getObjectUrl( $s3object['bucket'], $s3object['key'], $expires, $headers );
2038
/**
2039
* Register modal scripts and styles so they can be enqueued later
2040
*/
2041
+ function register_modal_assets() {
2042
$version = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : $this->plugin_version;
2043
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
2044
2979
* @return bool
2980
*/
2981
public function memory_exceeded( $filter_name = null ) {
2982
+ $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
2983
$current_memory = memory_get_usage( true );
2984
$return = false;
2985
2986
if ( $current_memory >= $memory_limit ) {
2994
return apply_filters( $filter_name, $return );
2995
}
2996
2997
+ /**
2998
+ * Get memory limit
2999
+ *
3000
+ * @return int
3001
+ */
3002
+ public function get_memory_limit() {
3003
+ if ( function_exists( 'ini_get' ) ) {
3004
+ $memory_limit = ini_get( 'memory_limit' );
3005
+ } else {
3006
+ // Sensible default
3007
+ $memory_limit = '128M';
3008
+ }
3009
+
3010
+ if ( ! $memory_limit || -1 == $memory_limit ) {
3011
+ // Unlimited, set to 32GB
3012
+ $memory_limit = '32000M';
3013
+ }
3014
+
3015
+ return intval( $memory_limit ) * 1024 * 1024;
3016
+ }
3017
+
3018
/**
3019
* Count attachments on a site
3020
*
classes/as3cf-notices.php CHANGED
@@ -176,7 +176,7 @@ class AS3CF_Notices {
176
$notice = $this->find_notice_by_id( $notice_id );
177
if ( $notice ) {
178
if ( $notice['only_show_to_user'] ) {
179
- $notices = get_user_meta( $user_id, 'as3cf_notices' );
180
unset( $notices[ $notice['id'] ] );
181
182
$this->update_user_meta( $user_id, 'as3cf_notices', $notices );
@@ -291,6 +291,7 @@ class AS3CF_Notices {
291
}
292
293
$user_notices = get_user_meta( $user_id, 'as3cf_notices', true );
294
if ( is_array( $user_notices ) && ! empty( $user_notices ) ) {
295
foreach ( $user_notices as $notice ) {
296
$this->maybe_show_notice( $notice, $dismissed_notices );
@@ -305,6 +306,32 @@ class AS3CF_Notices {
305
}
306
}
307
308
/**
309
* If it should be shown, display an individual notice
310
*
176
$notice = $this->find_notice_by_id( $notice_id );
177
if ( $notice ) {
178
if ( $notice['only_show_to_user'] ) {
179
+ $notices = get_user_meta( $user_id, 'as3cf_notices', true );
180
unset( $notices[ $notice['id'] ] );
181
182
$this->update_user_meta( $user_id, 'as3cf_notices', $notices );
291
}
292
293
$user_notices = get_user_meta( $user_id, 'as3cf_notices', true );
294
+ $user_notices = $this->cleanup_corrupt_user_notices( $user_id, $user_notices );
295
if ( is_array( $user_notices ) && ! empty( $user_notices ) ) {
296
foreach ( $user_notices as $notice ) {
297
$this->maybe_show_notice( $notice, $dismissed_notices );
306
}
307
}
308
309
+ /**
310
+ * Cleanup corrupt user notices. Corrupt notices start with a
311
+ * numerically indexed array, opposed to string ID
312
+ *
313
+ * @param int $user_id
314
+ * @param array $notices
315
+ *
316
+ * @return array
317
+ */
318
+ protected function cleanup_corrupt_user_notices( $user_id, $notices ) {
319
+ if ( ! is_array( $notices ) || empty( $notices ) ) {
320
+ return $notices;
321
+ }
322
+
323
+ foreach ( $notices as $key => $notice ) {
324
+ if ( is_int( $key ) ) {
325
+ // Corrupt, remove
326
+ unset( $notices[ $key ] );
327
+
328
+ $this->update_user_meta( $user_id, 'as3cf_notices', $notices );
329
+ }
330
+ }
331
+
332
+ return $notices;
333
+ }
334
+
335
/**
336
* If it should be shown, display an individual notice
337
*
classes/as3cf-plugin-compatibility.php CHANGED
@@ -43,9 +43,24 @@ class AS3CF_Plugin_Compatibility {
43
}
44
45
/**
46
- * Register the compatibility hooks
47
*/
48
function compatibility_init() {
49
// Add notices about compatibility addons to install
50
add_action( 'admin_init', array( $this, 'maybe_render_compatibility_addons_notice' ) );
51
@@ -68,12 +83,6 @@ class AS3CF_Plugin_Compatibility {
68
add_filter( 'as3cf_get_attached_file', array( $this, 'customizer_crop_download_file' ), 10, 4 );
69
add_filter( 'as3cf_upload_attachment_local_files_to_remove', array( $this, 'customizer_crop_remove_original_image' ), 10, 3 );
70
71
- /*
72
- * WP_Customize_Control
73
- * /wp-includes/class-wp-customize_control.php
74
- */
75
- add_filter( 'attachment_url_to_postid', array( $this, 'customizer_background_image' ), 10, 2 );
76
-
77
/*
78
* Regenerate Thumbnails
79
* https://wordpress.org/plugins/regenerate-thumbnails/
@@ -129,7 +138,10 @@ class AS3CF_Plugin_Compatibility {
129
continue;
130
}
131
132
- $addons_to_install[ $addon_slug ] = $addon['title'];
133
}
134
135
return $addons_to_install;
@@ -163,11 +175,14 @@ class AS3CF_Plugin_Compatibility {
163
$title = __( 'WP Offload S3 Compatibility Addons', 'amazon-s3-and-cloudfront' );
164
$compat_url = 'https://deliciousbrains.com/wp-offload-s3/doc/compatibility-with-other-plugins/';
165
$compat_link = sprintf( '<a href="%s">%s</a>', $compat_url, __( 'compatibility addons', 'amazon-s3-and-cloudfront' ) );
166
- $message = sprintf( __( "To get WP Offload S3 to work with certain 3rd party plugins, you must install and activate some of our %s. We've detected the following addons need to be installed.", 'amazon-s3-and-cloudfront' ), $compat_link );
167
168
$notice_addons_text = $this->render_addon_list( $addons_to_install );
169
- $notice_addons_text .= '<p>' . __( 'You will need to purchase a license to get access to these addons.', 'amazon-s3-and-cloudfront' ) . '</p>';
170
- $notice_addons_text .= sprintf( '<p><a href="%s">%s</a></p>', 'https://deliciousbrains.com/wp-offload-s3/pricing/', __( 'View Licenses', 'amazon-s3-and-cloudfront' ) );
171
172
$notice_addons_text = apply_filters( 'wpos3_compat_addons_notice', $notice_addons_text, $addons_to_install );
173
@@ -179,7 +194,7 @@ class AS3CF_Plugin_Compatibility {
179
$notice = '<p><strong>' . $title . '</strong> &mdash; ' . $message . '</p>' . $notice_addons_text;
180
181
$notice_args = array(
182
- 'type' => 'notice-warning',
183
'custom_id' => $notice_id,
184
'only_show_to_user' => false,
185
'flash' => false,
@@ -234,7 +249,9 @@ class AS3CF_Plugin_Compatibility {
234
235
$html = '<ul style="list-style-type: disc; padding: 0 0 0 30px; margin: 5px 0;">';
236
foreach ( $addons as $addon ) {
237
- $html .= '<li style="margin: 0;">' . $addon . '</li>';
238
}
239
$html .= '</ul>';
240
43
}
44
45
/**
46
+ * Register the compatibility hooks for the plugin.
47
*/
48
function compatibility_init() {
49
+ /*
50
+ * WP_Customize_Control
51
+ * /wp-includes/class-wp-customize_control.php
52
+ */
53
+ add_filter( 'attachment_url_to_postid', array( $this, 'customizer_background_image' ), 10, 2 );
54
+
55
+ if ( $this->as3cf->is_plugin_setup() ) {
56
+ $this->compatibility_init_if_setup();
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Register the compatibility hooks as long as the plugin is setup.
62
+ */
63
+ function compatibility_init_if_setup() {
64
// Add notices about compatibility addons to install
65
add_action( 'admin_init', array( $this, 'maybe_render_compatibility_addons_notice' ) );
66
83
add_filter( 'as3cf_get_attached_file', array( $this, 'customizer_crop_download_file' ), 10, 4 );
84
add_filter( 'as3cf_upload_attachment_local_files_to_remove', array( $this, 'customizer_crop_remove_original_image' ), 10, 3 );
85
86
/*
87
* Regenerate Thumbnails
88
* https://wordpress.org/plugins/regenerate-thumbnails/
138
continue;
139
}
140
141
+ $addons_to_install[ $addon_slug ] = array(
142
+ 'title' => $addon['title'],
143
+ 'url' => $addon['url'],
144
+ );
145
}
146
147
return $addons_to_install;
175
$title = __( 'WP Offload S3 Compatibility Addons', 'amazon-s3-and-cloudfront' );
176
$compat_url = 'https://deliciousbrains.com/wp-offload-s3/doc/compatibility-with-other-plugins/';
177
$compat_link = sprintf( '<a href="%s">%s</a>', $compat_url, __( 'compatibility addons', 'amazon-s3-and-cloudfront' ) );
178
+ $message = sprintf( __( "To get WP Offload S3 to work with certain 3rd party plugins, you might need to install and activate some of our %s. We've detected the following addons might need to be installed. Please click the links for more information about each addon to determine if you need it or not.", 'amazon-s3-and-cloudfront' ), $compat_link );
179
180
$notice_addons_text = $this->render_addon_list( $addons_to_install );
181
+ $support_email = 'nom@deliciousbrains.com';
182
+ $support_link = sprintf( '<a href="mailto:%1$s">%1$s</a>', $support_email );
183
+
184
+ $notice_addons_text .= '<p>' . sprintf( __( "You will need to purchase a license to get access to these addons. If you're having trouble determining whether or not you need the addons, send an email to %s.", 'amazon-s3-and-cloudfront' ), $support_link ). '</p>';
185
+ $notice_addons_text .= sprintf( '<p><a href="%s" class="button button-large">%s</a></p>', 'https://deliciousbrains.com/wp-offload-s3/pricing/', __( 'View Licenses', 'amazon-s3-and-cloudfront' ) );
186
187
$notice_addons_text = apply_filters( 'wpos3_compat_addons_notice', $notice_addons_text, $addons_to_install );
188
194
$notice = '<p><strong>' . $title . '</strong> &mdash; ' . $message . '</p>' . $notice_addons_text;
195
196
$notice_args = array(
197
+ 'type' => 'notice-info',
198
'custom_id' => $notice_id,
199
'only_show_to_user' => false,
200
'flash' => false,
249
250
$html = '<ul style="list-style-type: disc; padding: 0 0 0 30px; margin: 5px 0;">';
251
foreach ( $addons as $addon ) {
252
+ $html .= '<li style="margin: 0;">';
253
+ $html .= '<a href="' . $addon['url'] . '">' . $addon['title'] . '</a>';
254
+ $html .= '</li>';
255
}
256
$html .= '</ul>';
257
classes/as3cf-stream-wrapper.php CHANGED
@@ -9,6 +9,10 @@ class AS3CF_Stream_Wrapper extends Aws\S3\StreamWrapper {
9
* @param string $protocol
10
*/
11
public static function register( Aws\S3\S3Client $client, $protocol = 's3' ) {
12
stream_wrapper_register( $protocol, __CLASS__, STREAM_IS_URL );
13
static::$client = $client;
14
}
9
* @param string $protocol
10
*/
11
public static function register( Aws\S3\S3Client $client, $protocol = 's3' ) {
12
+ if ( in_array( $protocol, stream_get_wrappers() ) ) {
13
+ stream_wrapper_unregister( $protocol );
14
+ }
15
+
16
stream_wrapper_register( $protocol, __CLASS__, STREAM_IS_URL );
17
static::$client = $client;
18
}
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: 2015-11-02 14:28+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"
@@ -25,112 +25,112 @@ msgstr ""
25
msgid "S3 and CloudFront"
26
msgstr ""
27
28
- #: classes/amazon-s3-and-cloudfront.php:559
29
msgid "Upload aborted by filter 'as3cf_pre_upload_attachment'"
30
msgstr ""
31
32
- #: classes/amazon-s3-and-cloudfront.php:570
33
#, php-format
34
msgid "File %s does not exist"
35
msgstr ""
36
37
- #: classes/amazon-s3-and-cloudfront.php:581
38
#, php-format
39
msgid "Mime type %s is not allowed"
40
msgstr ""
41
42
- #: classes/amazon-s3-and-cloudfront.php:661
43
#, php-format
44
msgid "Error uploading %s to S3: %s"
45
msgstr ""
46
47
- #: classes/amazon-s3-and-cloudfront.php:1554
48
msgid "Cheatin&#8217; eh?"
49
msgstr ""
50
51
- #: classes/amazon-s3-and-cloudfront.php:1558
52
msgid "You do not have sufficient permissions to access this page."
53
msgstr ""
54
55
- #: classes/amazon-s3-and-cloudfront.php:1564
56
msgid "No bucket name provided."
57
msgstr ""
58
59
- #: classes/amazon-s3-and-cloudfront.php:1839
60
msgid "Error Getting Bucket Region"
61
msgstr ""
62
63
- #: classes/amazon-s3-and-cloudfront.php:1840
64
#, php-format
65
msgid "There was an error attempting to get the region of the bucket %s: %s"
66
msgstr ""
67
68
- #: classes/amazon-s3-and-cloudfront.php:1960
69
msgid ""
70
"This is a test file to check if the user has write permission to S3. Delete "
71
"me if found."
72
msgstr ""
73
74
- #: classes/amazon-s3-and-cloudfront.php:1992
75
#, php-format
76
msgid ""
77
"There was an error attempting to check the permissions of the bucket %s: %s"
78
msgstr ""
79
80
- #: classes/amazon-s3-and-cloudfront.php:2050
81
msgid "Error creating bucket"
82
msgstr ""
83
84
- #: classes/amazon-s3-and-cloudfront.php:2051
85
msgid "Bucket name too short."
86
msgstr ""
87
88
- #: classes/amazon-s3-and-cloudfront.php:2052
89
msgid "Bucket name too long."
90
msgstr ""
91
92
- #: classes/amazon-s3-and-cloudfront.php:2053
93
msgid ""
94
"Invalid character. Bucket names can contain lowercase letters, numbers, "
95
"periods and hyphens."
96
msgstr ""
97
98
- #: classes/amazon-s3-and-cloudfront.php:2054
99
msgid "Error saving bucket"
100
msgstr ""
101
102
- #: classes/amazon-s3-and-cloudfront.php:2055
103
msgid "Error fetching buckets"
104
msgstr ""
105
106
- #: classes/amazon-s3-and-cloudfront.php:2056
107
msgid "Error getting URL preview: "
108
msgstr ""
109
110
- #: classes/amazon-s3-and-cloudfront.php:2057
111
msgid "The changes you made will be lost if you navigate away from this page"
112
msgstr ""
113
114
- #: classes/amazon-s3-and-cloudfront.php:2117
115
msgid "Cheatin' eh?"
116
msgstr ""
117
118
- #: classes/amazon-s3-and-cloudfront.php:2220
119
msgctxt "Show the media library tab"
120
msgid "Media Library"
121
msgstr ""
122
123
- #: classes/amazon-s3-and-cloudfront.php:2221
124
msgctxt "Show the support tab"
125
msgid "Support"
126
msgstr ""
127
128
- #: classes/amazon-s3-and-cloudfront.php:2373
129
#, php-format
130
msgid "The file %s has been given %s permissions on Amazon S3."
131
msgstr ""
132
133
- #: classes/amazon-s3-and-cloudfront.php:2385
134
msgid ""
135
"<strong>Image Manipulation Library Missing</strong> &mdash; Looks like you "
136
"don't have an image manipulation library installed on this server and "
@@ -138,11 +138,11 @@ msgid ""
138
"Please setup GD or ImageMagick."
139
msgstr ""
140
141
- #: classes/amazon-s3-and-cloudfront.php:2915
142
msgid "Quick Start Guide"
143
msgstr ""
144
145
- #: classes/amazon-s3-and-cloudfront.php:2917
146
#, php-format
147
msgid ""
148
"Looks like we don't have write access to this bucket. It's likely that the "
@@ -151,7 +151,7 @@ msgid ""
151
"correctly."
152
msgstr ""
153
154
- #: classes/amazon-s3-and-cloudfront.php:2919
155
#, php-format
156
msgid ""
157
"Looks like we don't have access to the buckets. It's likely that the user "
@@ -159,39 +159,44 @@ msgid ""
159
"Please see our %s for instructions on setting up permissions correctly."
160
msgstr ""
161
162
- #: classes/as3cf-notices.php:347
163
msgid "Error dismissing notice."
164
msgstr ""
165
166
- #: classes/as3cf-notices.php:362
167
msgid "Invalid notice ID."
168
msgstr ""
169
170
- #: classes/as3cf-plugin-compatibility.php:163
171
msgid "WP Offload S3 Compatibility Addons"
172
msgstr ""
173
174
- #: classes/as3cf-plugin-compatibility.php:165
175
msgid "compatibility addons"
176
msgstr ""
177
178
- #: classes/as3cf-plugin-compatibility.php:166
179
#, php-format
180
msgid ""
181
- "To get WP Offload S3 to work with certain 3rd party plugins, you must "
182
- "install and activate some of our %s. We've detected the following addons "
183
- "need to be installed."
184
msgstr ""
185
186
- #: classes/as3cf-plugin-compatibility.php:169
187
- msgid "You will need to purchase a license to get access to these addons."
188
msgstr ""
189
190
- #: classes/as3cf-plugin-compatibility.php:170
191
msgid "View Licenses"
192
msgstr ""
193
194
- #: classes/as3cf-plugin-compatibility.php:607
195
#: classes/upgrades/as3cf-meta-wp-error.php:72
196
#, php-format
197
msgid "There was an error attempting to download the file %s from S3: %s"
8
msgstr ""
9
"Project-Id-Version: amazon-s3-and-cloudfront\n"
10
"Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
+ "POT-Creation-Date: 2015-11-12 09:07+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"
25
msgid "S3 and CloudFront"
26
msgstr ""
27
28
+ #: classes/amazon-s3-and-cloudfront.php:566
29
msgid "Upload aborted by filter 'as3cf_pre_upload_attachment'"
30
msgstr ""
31
32
+ #: classes/amazon-s3-and-cloudfront.php:577
33
#, php-format
34
msgid "File %s does not exist"
35
msgstr ""
36
37
+ #: classes/amazon-s3-and-cloudfront.php:588
38
#, php-format
39
msgid "Mime type %s is not allowed"
40
msgstr ""
41
42
+ #: classes/amazon-s3-and-cloudfront.php:668
43
#, php-format
44
msgid "Error uploading %s to S3: %s"
45
msgstr ""
46
47
+ #: classes/amazon-s3-and-cloudfront.php:1571
48
msgid "Cheatin&#8217; eh?"
49
msgstr ""
50
51
+ #: classes/amazon-s3-and-cloudfront.php:1575
52
msgid "You do not have sufficient permissions to access this page."
53
msgstr ""
54
55
+ #: classes/amazon-s3-and-cloudfront.php:1581
56
msgid "No bucket name provided."
57
msgstr ""
58
59
+ #: classes/amazon-s3-and-cloudfront.php:1856
60
msgid "Error Getting Bucket Region"
61
msgstr ""
62
63
+ #: classes/amazon-s3-and-cloudfront.php:1857
64
#, php-format
65
msgid "There was an error attempting to get the region of the bucket %s: %s"
66
msgstr ""
67
68
+ #: classes/amazon-s3-and-cloudfront.php:1977
69
msgid ""
70
"This is a test file to check if the user has write permission to S3. Delete "
71
"me if found."
72
msgstr ""
73
74
+ #: classes/amazon-s3-and-cloudfront.php:2009
75
#, php-format
76
msgid ""
77
"There was an error attempting to check the permissions of the bucket %s: %s"
78
msgstr ""
79
80
+ #: classes/amazon-s3-and-cloudfront.php:2066
81
msgid "Error creating bucket"
82
msgstr ""
83
84
+ #: classes/amazon-s3-and-cloudfront.php:2067
85
msgid "Bucket name too short."
86
msgstr ""
87
88
+ #: classes/amazon-s3-and-cloudfront.php:2068
89
msgid "Bucket name too long."
90
msgstr ""
91
92
+ #: classes/amazon-s3-and-cloudfront.php:2069
93
msgid ""
94
"Invalid character. Bucket names can contain lowercase letters, numbers, "
95
"periods and hyphens."
96
msgstr ""
97
98
+ #: classes/amazon-s3-and-cloudfront.php:2070
99
msgid "Error saving bucket"
100
msgstr ""
101
102
+ #: classes/amazon-s3-and-cloudfront.php:2071
103
msgid "Error fetching buckets"
104
msgstr ""
105
106
+ #: classes/amazon-s3-and-cloudfront.php:2072
107
msgid "Error getting URL preview: "
108
msgstr ""
109
110
+ #: classes/amazon-s3-and-cloudfront.php:2073
111
msgid "The changes you made will be lost if you navigate away from this page"
112
msgstr ""
113
114
+ #: classes/amazon-s3-and-cloudfront.php:2133
115
msgid "Cheatin' eh?"
116
msgstr ""
117
118
+ #: classes/amazon-s3-and-cloudfront.php:2236
119
msgctxt "Show the media library tab"
120
msgid "Media Library"
121
msgstr ""
122
123
+ #: classes/amazon-s3-and-cloudfront.php:2237
124
msgctxt "Show the support tab"
125
msgid "Support"
126
msgstr ""
127
128
+ #: classes/amazon-s3-and-cloudfront.php:2389
129
#, php-format
130
msgid "The file %s has been given %s permissions on Amazon S3."
131
msgstr ""
132
133
+ #: classes/amazon-s3-and-cloudfront.php:2401
134
msgid ""
135
"<strong>Image Manipulation Library Missing</strong> &mdash; Looks like you "
136
"don't have an image manipulation library installed on this server and "
138
"Please setup GD or ImageMagick."
139
msgstr ""
140
141
+ #: classes/amazon-s3-and-cloudfront.php:2931
142
msgid "Quick Start Guide"
143
msgstr ""
144
145
+ #: classes/amazon-s3-and-cloudfront.php:2933
146
#, php-format
147
msgid ""
148
"Looks like we don't have write access to this bucket. It's likely that the "
151
"correctly."
152
msgstr ""
153
154
+ #: classes/amazon-s3-and-cloudfront.php:2935
155
#, php-format
156
msgid ""
157
"Looks like we don't have access to the buckets. It's likely that the user "
159
"Please see our %s for instructions on setting up permissions correctly."
160
msgstr ""
161
162
+ #: classes/as3cf-notices.php:374
163
msgid "Error dismissing notice."
164
msgstr ""
165
166
+ #: classes/as3cf-notices.php:389
167
msgid "Invalid notice ID."
168
msgstr ""
169
170
+ #: classes/as3cf-plugin-compatibility.php:175
171
msgid "WP Offload S3 Compatibility Addons"
172
msgstr ""
173
174
+ #: classes/as3cf-plugin-compatibility.php:177
175
msgid "compatibility addons"
176
msgstr ""
177
178
+ #: classes/as3cf-plugin-compatibility.php:178
179
#, php-format
180
msgid ""
181
+ "To get WP Offload S3 to work with certain 3rd party plugins, you might need "
182
+ "to install and activate some of our %s. We've detected the following addons "
183
+ "might need to be installed. Please click the links for more information "
184
+ "about each addon to determine if you need it or not."
185
msgstr ""
186
187
+ #: classes/as3cf-plugin-compatibility.php:184
188
+ #, php-format
189
+ msgid ""
190
+ "You will need to purchase a license to get access to these addons. If you're "
191
+ "having trouble determining whether or not you need the addons, send an email "
192
+ "to %s."
193
msgstr ""
194
195
+ #: classes/as3cf-plugin-compatibility.php:185
196
msgid "View Licenses"
197
msgstr ""
198
199
+ #: classes/as3cf-plugin-compatibility.php:624
200
#: classes/upgrades/as3cf-meta-wp-error.php:72
201
#, php-format
202
msgid "There was an error attempting to download the file %s from S3: %s"
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
=== WP Offload S3 ===
2
Contributors: bradt, deliciousbrains
3
- Tags: uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
4
Requires at least: 3.7
5
Tested up to: 4.3
6
- Stable tag: 0.9.8
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.
@@ -12,18 +12,18 @@ Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally
12
13
https://www.youtube.com/watch?v=_PVybEGaRXc
14
15
- This plugin automatically copies images, videos, documents, and any other media added through WordPress' media uploader to [Amazon Simple Storage Service](http://aws.amazon.com/s3/) (S3). It then automatically replaces the URL to each media file with their respective S3 URL or, if you have configured [Amazon CloudFront](http://aws.amazon.com/cloudfront/), the respective CloudFront URL. Image thumbnails are also copied to S3 and delivered through S3/CloudFront.
16
17
- Uploading files *directly* to your S3 account is not currently supported by this plugin. They are uploaded to your server first, then copied to S3. There is an option to automatically remove the files from your server once they are copied to S3 however.
18
19
- If you're adding this plugin to a site that's been around for a while, your existing media files will not be copied or served from S3. Only newly uploaded files will be copied and served from S3. The pro upgrade has an upload tool to handle existing media files.
20
21
**PRO Upgrade with Email Support and More Features**
22
23
- * Upload existing Media Library to S3
24
* Find & replace file URLs in content
25
- * Control S3 files from the Media Library
26
- * [Assets addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#assets-addon) - Serve your CSS & JS from S3/CloudFront
27
* [WooCommerce addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#woocommerce-addon)
28
* [Easy Digital Downloads addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#edd-addon)
29
* PriorityExpert&trade; email support
@@ -45,6 +45,12 @@ which is a fork of [Amazon S3 for WordPress](http://wordpress.org/extend/plugins
45
3. Install this plugin using WordPress' built-in installer
46
4. Access the *S3 and CloudFront* option under *AWS* and configure
47
48
== Screenshots ==
49
50
1. Choosing/creating a bucket
@@ -63,10 +69,18 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
63
64
== Changelog ==
65
66
- = 0.9.8 - 2015-11-02 =
67
* Bug fix: Attachment URLs containing query string parameters incorrectly encoded
68
69
- = 0.9.7 - 2015-10-26 =
70
* Improvement: Improve compatibility with third party plugins when the _Remove Files From Server_ option is enabled
71
* Improvement: Fix inconsistent spacing on the WP Offload S3 settings screen
72
* Improvement: Validate _CloudFront or custom domain_ input field
@@ -84,13 +98,13 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
84
* Bug fix: Cron tasks incorrectly scheduled due to passing the wrong time to `wp_schedule_event`
85
* Bug fix: Default options not shown in the UI after first install
86
87
- = 0.9.6 - 2015-10-01 =
88
* Improvement: Update text domains for translate.wordpress.org integration
89
90
- = 0.9.5 - 2015-09-01 =
91
* Bug fix: Fatal error: Cannot use object of type WP_Error as array
92
93
- = 0.9.4 - 2015-08-27 =
94
* New: Update all existing attachments with missing file sizes when the 'Remove Files From Server' option is enabled (automatically runs in the background)
95
* Improvement: Show when constants are used to set bucket and region options
96
* Improvement: Don't show compatibility notices on plugin update screen
@@ -101,14 +115,14 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
101
* Bug fix: Upload attempted to non existent bucket when defined by constant
102
* Bug fix: 'SignatureDoesNotMatch' error shown when using signed URLs with bucket names containing '.' characters
103
104
- = 0.9.3 - 2015-08-17 =
105
* New: Pro upgrade sidebar
106
* Bug fix: Create buckets in US standard region causing S3 URLs to 404 errors
107
108
- = 0.9.2 - 2015-07-29 =
109
* Bug fix: Accidentally released the sidebar for after we launch the pro version
110
111
- = 0.9.1 - 2015-07-29 =
112
* Improvement: Access denied sample IAM policy replaced with link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/)
113
* Improvement: Access denied messages on bucket selection or bucket creation now link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/)
114
* Improvement: Object expires time can now be filtered using the `as3cf_object_meta` filter
@@ -122,7 +136,7 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
122
* Bug fix: WordPress footer overlaps WP Offload S3 sidebar
123
* Bug fix: Upon initial setup the settings changed alert shows when no settings have changed
124
125
- = 0.9 - 2015-07-08 =
126
* New: Plugin rebranded to WP Offload S3
127
* New: Support tab added to _Offload S3_ screen containing diagnostic information
128
* New: Compatibility with the [Media Replace](https://wordpress.org/plugins/enable-media-replace/) plugin
@@ -152,19 +166,19 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
152
* Bug fix: Subsite upload paths repeated on multisite installs
153
* Bug fix: Handle multisite installs where `BLOG_ID_CURRENT_SITE` is not 1
154
155
- = 0.8.2 - 2015-01-31 =
156
* New: Input bucket in settings to avoid listing all buckets
157
* New: Specify bucket with 'AS3CF_BUCKET' constant
158
* Improvement: Compatibility with beta release of Pro plugin
159
* Bug Fix: Incorrect file prefix in S3 permission check
160
161
- = 0.8.1 - 2015-01-19 =
162
* Bug Fix: Permission problems on installs running on EC2s
163
* Bug Fix: Blank settings page due to WP_Error on S3 permission check
164
* Bug Fix: Warning: strtolower() expects parameter 1 to be string, object given
165
* Bug Fix: Region post meta update running on subsites of Multisite installs
166
167
- = 0.8 - 2015-01-10 =
168
* New: Redesigned settings UI
169
* Improvement: SSL setting can be fully controlled, HTTPS for urls always, based on request or never
170
* Improvement: Download files from S3 that are not found on server when running Regenerate Thumbnails plugin
@@ -173,14 +187,14 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
173
* Bug Fix: Files for all subsites going into the same S3 folder on multisite installs setup prior to WP 3.5
174
* Bug Fix: 'attempting to access local file system' error for some installs
175
176
- = 0.7.2 - 2014-12-11 =
177
* Bug: Some buckets in the EU region causing permission and HTTP errors
178
* Bug: Undefined variable: message in view/error.php also causing white screens
179
180
- = 0.7.1 - 2014-12-05 =
181
* Bug: Read-only error on settings page sometimes false positive
182
183
- = 0.7 - 2014-12-04 =
184
* New: Proper S3 region subdomain in URLs for buckets not in the US Standard region (e.g. https://s3-us-west-2.amazonaws.com/...)
185
* New: Update all existing attachment meta with bucket region (automatically runs in the background)
186
* New: Get secure URL for different image sizes (iamzozo)
@@ -203,10 +217,10 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
203
* Bug Fix: S3 file overwritten when file with same name uploaded and local file removed (dataferret)
204
* Bug Fix: Manually resized images not uploaded (gmauricio)
205
206
- = 0.6.1 - 2013-09-21 =
207
* WP.org download of Amazon Web Services plugin is giving a 404 Not Found, so directing people to download from Github instead
208
209
- = 0.6 - 2013-09-20 =
210
* Complete rewrite
211
* Now requires PHP 5.3.3+
212
* Now requires the [Amazon Web Services plugin](http://wordpress.org/extend/plugins/amazon-web-services/) which contains the latest PHP libraries from Amazon
@@ -217,7 +231,7 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
217
* New Option: Remove uploaded file from local filesystem once it has been copied to S3
218
* New Option: Copy any HiDPI (@2x) images to S3 (works with WP Retina 2x plugin)
219
220
- = 0.5 - 2013-01-29 =
221
* Forked [Amazon S3 for WordPress with CloudFront](http://wordpress.org/extend/plugins/tantan-s3-cloudfront/)
222
* Cleaned up the UI to fit with today's WP UI
223
* Fixed issues causing error messages when WP_DEBUG is on
1
=== WP Offload S3 ===
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.3
6
+ Stable tag: 0.9.9
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.
12
13
https://www.youtube.com/watch?v=_PVybEGaRXc
14
15
+ This plugin automatically copies images, videos, documents, and any other media added through WordPress' media uploader to [Amazon S3](http://aws.amazon.com/s3/). It then automatically replaces the URL to each media file with their respective Amazon S3 URL or, if you have configured [Amazon CloudFront](http://aws.amazon.com/cloudfront/), the respective CloudFront URL. Image thumbnails are also copied to Amazon S3 and delivered through S3/CloudFront.
16
17
+ Uploading files *directly* to your Amazon S3 account is not currently supported by this plugin. They are uploaded to your server first, then copied to Amazon S3. There is an option to automatically remove the files from your server once they are copied to Amazon S3 however.
18
19
+ If you're adding this plugin to a site that's been around for a while, your existing media files will not be copied or served from Amazon S3. Only newly uploaded files will be copied and served from Amazon S3. The pro upgrade has an upload tool to handle existing media files.
20
21
**PRO Upgrade with Email Support and More Features**
22
23
+ * Upload existing Media Library to Amazon S3
24
* Find & replace file URLs in content
25
+ * Control Amazon S3 files from the Media Library
26
+ * [Assets addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#assets-addon) - Serve your CSS & JS from Amazon S3/CloudFront
27
* [WooCommerce addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#woocommerce-addon)
28
* [Easy Digital Downloads addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#edd-addon)
29
* PriorityExpert&trade; email support
45
3. Install this plugin using WordPress' built-in installer
46
4. Access the *S3 and CloudFront* option under *AWS* and configure
47
48
+ == Frequently Asked Questions ==
49
+
50
+ = What are the minimum requirements? =
51
+
52
+ You can see the minimum requirements [here](https://deliciousbrains.com/wp-offload-s3/pricing/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=os3-free-plugin#requirements).
53
+
54
== Screenshots ==
55
56
1. Choosing/creating a bucket
69
70
== Changelog ==
71
72
+ = WP Offload S3 0.9.9 - 2015-11-12 =
73
+ * Improvement: Improve wording of compatibility notices
74
+ * Improvement: Compatibility with Easy Digital Downloads 1.0.1 and WooCommerce 1.0.3 addons
75
+ * Improvement: Better determine available memory for background processes
76
+ * Bug fix: URL previews incorrect due to stripping `/` characters
77
+ * Bug fix: PHP Warning: stream_wrapper_register(): Protocol s3:// is already defined
78
+ * Bug fix: PHP Fatal error: Call to undefined method WP_Error::get()
79
+
80
+ = WP Offload S3 0.9.8 - 2015-11-02 =
81
* Bug fix: Attachment URLs containing query string parameters incorrectly encoded
82
83
+ = WP Offload S3 0.9.7 - 2015-10-26 =
84
* Improvement: Improve compatibility with third party plugins when the _Remove Files From Server_ option is enabled
85
* Improvement: Fix inconsistent spacing on the WP Offload S3 settings screen
86
* Improvement: Validate _CloudFront or custom domain_ input field
98
* Bug fix: Cron tasks incorrectly scheduled due to passing the wrong time to `wp_schedule_event`
99
* Bug fix: Default options not shown in the UI after first install
100
101
+ = WP Offload S3 0.9.6 - 2015-10-01 =
102
* Improvement: Update text domains for translate.wordpress.org integration
103
104
+ = WP Offload S3 0.9.5 - 2015-09-01 =
105
* Bug fix: Fatal error: Cannot use object of type WP_Error as array
106
107
+ = WP Offload S3 0.9.4 - 2015-08-27 =
108
* New: Update all existing attachments with missing file sizes when the 'Remove Files From Server' option is enabled (automatically runs in the background)
109
* Improvement: Show when constants are used to set bucket and region options
110
* Improvement: Don't show compatibility notices on plugin update screen
115
* Bug fix: Upload attempted to non existent bucket when defined by constant
116
* Bug fix: 'SignatureDoesNotMatch' error shown when using signed URLs with bucket names containing '.' characters
117
118
+ = WP Offload S3 0.9.3 - 2015-08-17 =
119
* New: Pro upgrade sidebar
120
* Bug fix: Create buckets in US standard region causing S3 URLs to 404 errors
121
122
+ = WP Offload S3 0.9.2 - 2015-07-29 =
123
* Bug fix: Accidentally released the sidebar for after we launch the pro version
124
125
+ = WP Offload S3 0.9.1 - 2015-07-29 =
126
* Improvement: Access denied sample IAM policy replaced with link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/)
127
* Improvement: Access denied messages on bucket selection or bucket creation now link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/)
128
* Improvement: Object expires time can now be filtered using the `as3cf_object_meta` filter
136
* Bug fix: WordPress footer overlaps WP Offload S3 sidebar
137
* Bug fix: Upon initial setup the settings changed alert shows when no settings have changed
138
139
+ = WP Offload S3 0.9 - 2015-07-08 =
140
* New: Plugin rebranded to WP Offload S3
141
* New: Support tab added to _Offload S3_ screen containing diagnostic information
142
* New: Compatibility with the [Media Replace](https://wordpress.org/plugins/enable-media-replace/) plugin
166
* Bug fix: Subsite upload paths repeated on multisite installs
167
* Bug fix: Handle multisite installs where `BLOG_ID_CURRENT_SITE` is not 1
168
169
+ = WP Offload S3 0.8.2 - 2015-01-31 =
170
* New: Input bucket in settings to avoid listing all buckets
171
* New: Specify bucket with 'AS3CF_BUCKET' constant
172
* Improvement: Compatibility with beta release of Pro plugin
173
* Bug Fix: Incorrect file prefix in S3 permission check
174
175
+ = WP Offload S3 0.8.1 - 2015-01-19 =
176
* Bug Fix: Permission problems on installs running on EC2s
177
* Bug Fix: Blank settings page due to WP_Error on S3 permission check
178
* Bug Fix: Warning: strtolower() expects parameter 1 to be string, object given
179
* Bug Fix: Region post meta update running on subsites of Multisite installs
180
181
+ = WP Offload S3 0.8 - 2015-01-10 =
182
* New: Redesigned settings UI
183
* Improvement: SSL setting can be fully controlled, HTTPS for urls always, based on request or never
184
* Improvement: Download files from S3 that are not found on server when running Regenerate Thumbnails plugin
187
* Bug Fix: Files for all subsites going into the same S3 folder on multisite installs setup prior to WP 3.5
188
* Bug Fix: 'attempting to access local file system' error for some installs
189
190
+ = WP Offload S3 0.7.2 - 2014-12-11 =
191
* Bug: Some buckets in the EU region causing permission and HTTP errors
192
* Bug: Undefined variable: message in view/error.php also causing white screens
193
194
+ = WP Offload S3 0.7.1 - 2014-12-05 =
195
* Bug: Read-only error on settings page sometimes false positive
196
197
+ = WP Offload S3 0.7 - 2014-12-04 =
198
* New: Proper S3 region subdomain in URLs for buckets not in the US Standard region (e.g. https://s3-us-west-2.amazonaws.com/...)
199
* New: Update all existing attachment meta with bucket region (automatically runs in the background)
200
* New: Get secure URL for different image sizes (iamzozo)
217
* Bug Fix: S3 file overwritten when file with same name uploaded and local file removed (dataferret)
218
* Bug Fix: Manually resized images not uploaded (gmauricio)
219
220
+ = WP Offload S3 0.6.1 - 2013-09-21 =
221
* WP.org download of Amazon Web Services plugin is giving a 404 Not Found, so directing people to download from Github instead
222
223
+ = WP Offload S3 0.6 - 2013-09-20 =
224
* Complete rewrite
225
* Now requires PHP 5.3.3+
226
* Now requires the [Amazon Web Services plugin](http://wordpress.org/extend/plugins/amazon-web-services/) which contains the latest PHP libraries from Amazon
231
* New Option: Remove uploaded file from local filesystem once it has been copied to S3
232
* New Option: Copy any HiDPI (@2x) images to S3 (works with WP Retina 2x plugin)
233
234
+ = WP Offload S3 0.5 - 2013-01-29 =
235
* Forked [Amazon S3 for WordPress with CloudFront](http://wordpress.org/extend/plugins/tantan-s3-cloudfront/)
236
* Cleaned up the UI to fit with today's WP UI
237
* Fixed issues causing error messages when WP_DEBUG is on
wordpress-s3.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Offload S3
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: 0.9.8
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'] = '0.9.8';
30
31
$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['supported_addon_versions'] = array(
32
'amazon-s3-and-cloudfront-pro' => '1.0b1',
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: 0.9.9
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'] = '0.9.9';
30
31
$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['supported_addon_versions'] = array(
32
'amazon-s3-and-cloudfront-pro' => '1.0b1',