diff --git a/README.md b/README.md index 8f20186d..3130f743 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,36 @@ **Contributors:** bradt **Donate link:** https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC **Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront -**Requires at least:** 3.5 +**Requires at least:** 3.7 **Tested up to:** 4.3 -**Stable tag:** 0.9.2 +**Stable tag:** 0.9.3 **License:** GPLv3 Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery. ## Description ## +https://www.youtube.com/watch?v=_PVybEGaRXc + 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. 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. 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. -**Pro Version** - -We’re working on a pro version that will include the following features: +**PRO Upgrade with Email Support and More Features** -* Copy existing Media Library to S3 -* Serve theme JS & CSS from S3/CloudFront -* WooCommerce & EDD integration -* Awesome email support +* Upload existing Media Library to S3 +* Find & replace file URLs in content +* Control S3 files from the Media Library +* [Assets addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#assets-addon) - Serve your CSS & JS from S3/CloudFront +* [WooCommerce addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#woocommerce-addon) +* [Easy Digital Downloads addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#edd-addon) +* PriorityExpert™ email support -[Sign up for news about the pro version](https://confirmsubscription.com/h/t/295CA85AEB94E879) +See the video below or [visit the web site](http://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin) to learn more about the pro version. -[Request features, report bugs, and submit pull requests on Github](https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/issues) +https://www.youtube.com/watch?v=55xNGnbJ_CY *This plugin has been completely rewritten, but was originally a fork of [Amazon S3 for WordPress with CloudFront](http://wordpress.org/extend/plugins/tantan-s3-cloudfront/) @@ -63,10 +66,14 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin ## Changelog ## -### 0.9.2 - 2015-07-29- ### +### 0.9.3 - 2015-08-17 ### +* New: Pro upgrade sidebar +* Bug fix: Create buckets in US standard region causing S3 URLs to 404 errors + +### 0.9.2 - 2015-07-29 ### * Bug fix: Accidentally released the sidebar for after we launch the pro version -### 0.9.1 - 2015-07-29- ### +### 0.9.1 - 2015-07-29 ### * Improvement: Access denied sample IAM policy replaced with link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/) * 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/) * Improvement: Object expires time can now be filtered using the `as3cf_object_meta` filter diff --git a/assets/css/styles.css b/assets/css/styles.css index ae12b71e..3b459498 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -1 +1 @@ -.aws-main.wrap>h2{float:left}.aws-main.wrap .as3cf-notice,.aws-main.wrap .as3cf-updated,.aws-main.wrap .as3cf-error{margin-bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.aws-main.wrap .as3cf-error.fatal{clear:both;float:left}.aws-main.wrap h2.nav-tab-wrapper{float:none;margin-bottom:0;width:650px;margin-top:10px;padding-left:5px;padding-right:0}.aws-main.wrap h2.nav-tab-wrapper a.nav-tab-active{color:#464646;cursor:default}.aws-main.wrap h2.nav-tab-wrapper a:focus{-webkit-box-shadow:none;box-shadow:none}.aws-main.wrap .error pre{background:#eaeaea;background:rgba(0,0,0,0.07);display:block;padding:10px 15px}.aws-main.wrap .error pre code{padding:0;background:none}.aws-main.wrap[data-tab="support"] .as3cf-notice,.aws-main.wrap[data-tab="support"] .error,.aws-main.wrap[data-tab="support"] .updated,.aws-main.wrap[data-tab="support"] .updated.show{display:none}.aws-main.wrap[data-tab="support"] .fatal .error,.aws-main.wrap[data-tab="support"] .as3cf-notice.important,.aws-main.wrap[data-tab="support"] .dbrains-api-down{display:block}.aws-main.wrap .as3cf-notice,.aws-main.wrap .error,.aws-main.wrap .updated{max-width:650px;margin-top:15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.aws-main.wrap .as3cf-updated{display:none}.aws-main.wrap .as3cf-updated.as3cf-notice,.aws-main.wrap .as3cf-updated.show{display:block}.as3cf-tab .as3cf-main-settings{display:none}.as3cf-tab .as3cf-bucket-container{display:block}.as3cf-tab.as3cf-has-bucket .as3cf-main-settings{display:block}.as3cf-tab.as3cf-has-bucket .as3cf-bucket-container{display:none}.as3cf-tab{display:none;position:relative;width:650px}.as3cf-tab .as3cf-main-settings p{font-size:13px}.as3cf-tab .as3cf-main-settings p a{color:#444}.as3cf-tab .object-prefix-desc em{white-space:nowrap}.as3cf-tab .as3cf-url-preview-wrap{background:#fff;text-align:center;padding:20px 0 0;max-width:650px;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.as3cf-tab .as3cf-url-preview-wrap .as3cf-url-preview{margin-top:10px;padding:0 20px 10px;overflow-x:scroll}.as3cf-tab .as3cf-url-preview-wrap span{color:#aaa;text-transform:uppercase;font-weight:bold}.as3cf-tab .as3cf-ssl p.info{margin-top:10px;padding:0}.as3cf-tab .as3cf-radio-group label{display:block;margin-bottom:10px}.as3cf-tab .as3cf-radio-group label.disabled,.as3cf-tab .as3cf-radio-group label.disabled p{color:#bbbbbb;cursor:default}.as3cf-tab .as3cf-radio-group p{padding-left:25px;color:#6b6b6b;margin:0;font-size:12px}.as3cf-tab .as3cf-radio-group p.as3cf-setting{margin-top:5px}.as3cf-tab .as3cf-switch{position:relative;display:inline-block;padding:2px;overflow:hidden;border-radius:2px;-webkit-border-radius:2px;background-color:#d4d3d3;cursor:pointer}.as3cf-tab .as3cf-switch.on{background-color:#ade7b5}.as3cf-tab .as3cf-switch span{visibility:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;display:inline-block;height:100%;font-size:12px;line-height:20px;border-radius:2px;-webkit-border-radius:2px;font-weight:bold;padding:4px 8px;background:#fff;color:#8d8d8d;z-index:1}.as3cf-tab .as3cf-switch span.on{color:#82d78b}.as3cf-tab .as3cf-switch span.checked{visibility:visible}.as3cf-tab .as3cf-switch.disabled{cursor:default;background:#e6e6e6}.as3cf-tab .as3cf-switch.disabled span{background:#f1f1f1;color:#d6d6d6}.as3cf-tab .as3cf-switch input[type="checkbox"]{position:absolute !important;top:0;left:0;opacity:0;filter:alpha(opacity=0);z-index:-1}.as3cf-tab .as3cf-setting.hide{display:none}.as3cf-tab h3{font-weight:normal;text-transform:uppercase;margin:15px 0}.as3cf-tab .form-table{margin:0}.as3cf-tab .form-table tr.as3cf-border-bottom td{border-bottom:1px solid #ddd;padding:20px 0px}.as3cf-tab .form-table tr.as3cf-setting-title td{padding-bottom:0}.as3cf-tab .form-table tr.as3cf-setting-title:first-child td{padding-top:20px}.as3cf-tab .form-table tr td{padding:15px 0}.as3cf-tab .form-table tr td:first-child{vertical-align:top;min-width:120px}.as3cf-tab .form-table h3{padding:0;margin:0}.as3cf-tab .form-table h4{margin:0}.as3cf-tab .as3cf-active-bucket{font-weight:bold;margin-right:10px}.as3cf-tab .tooltip{position:relative;z-index:2;cursor:pointer}.as3cf-tab .tooltip:before,.as3cf-tab .tooltip:after{visibility:hidden;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;pointer-events:none}.as3cf-tab .tooltip:before{position:absolute;bottom:150%;left:50%;margin-bottom:5px;margin-left:-250px;padding:10px;width:500px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,0.9);color:#fff;content:attr(data-tooltip);text-align:center;font-size:14px;line-height:1.3}.as3cf-tab .tooltip:after{position:absolute;bottom:150%;left:50%;margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,0.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.as3cf-tab .tooltip:hover:before,.as3cf-tab .tooltip:hover:after{visibility:visible;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}#tab-media{display:block}#tab-media .as3cf-main-settings{display:none}#tab-media .as3cf-bucket-container{display:block}#tab-media.as3cf-has-bucket .as3cf-main-settings{display:block}#tab-media.as3cf-has-bucket .as3cf-bucket-container{display:none}.as3cf-bucket-container h3{line-height:1.3;text-transform:none}.as3cf-bucket-container a:focus{-webkit-box-shadow:none;box-shadow:none;outline:none}.as3cf-bucket-container input[type=text]{box-sizing:border-box;width:100%}.as3cf-bucket-container select{box-sizing:border-box;width:50%}.as3cf-bucket-container .form-table td{padding:5px 0}.as3cf-bucket-container .form-table td:first-child{width:100px;line-height:30px;vertical-align:top}.as3cf-bucket-container .as3cf-invalid-bucket-name{font-size:12px;color:#a00}.as3cf-bucket-container .bucket-actions{margin:15px 0;border-top:1px solid #ccc;padding-top:15px;overflow:hidden}.as3cf-bucket-container .bucket-actions button,.as3cf-bucket-container .bucket-actions .right{float:right;margin-right:0}.as3cf-bucket-container .bucket-actions span{display:inline-block;margin-right:20px;line-height:28px}.as3cf-bucket-container .bucket-actions .bucket-action-cancel{color:#a00;text-decoration:none}.as3cf-bucket-container .bucket-actions .bucket-action-cancel:hover{color:red}.as3cf-bucket-container .as3cf-bucket-list{padding:15px;max-height:200px;overflow-x:hidden;overflow-y:auto;background-color:#fff;font-size:14px}.as3cf-bucket-container .as3cf-bucket-list li:last-of-type{margin-bottom:0}.as3cf-bucket-container .as3cf-bucket-list a{color:#444;text-decoration:none}.as3cf-bucket-container .as3cf-bucket-list a:hover{color:#0074A2}.as3cf-bucket-container .as3cf-bucket-list a.selected{font-weight:bold;color:#0074A2}.as3cf-bucket-container .as3cf-bucket-list a .dashicons{margin-right:5px}.as3cf-bucket-container .as3cf-bucket-select,.as3cf-bucket-container .as3cf-bucket-create{display:none}.as3cf-bucket-container .bucket-actions.select{display:none}.as3cf-tab{display:none}#tab-media{display:block}#tab-support{min-height:900px}#tab-support .as3cf-sidebar{top:11px}#tab-support .support-section{border-bottom:1px solid #ccc;padding-bottom:20px;margin-bottom:20px}#tab-support .debug textarea{width:100%;min-height:200px;font-family:Consolas, Monaco, monospace;margin-bottom:5px}.as3cf-sidebar{position:absolute;top:25px;left:670px;width:292px}.as3cf-sidebar .block{padding:20px;border:1px solid #ccc}.as3cf-sidebar .subscribe{border-top:none}.as3cf-sidebar .subscribe h2{padding:0;margin:0;margin-bottom:0.5em;color:#666;font-size:20px;line-height:1.2em;float:none}.as3cf-sidebar .subscribe h3{font-size:16px;margin:0}.as3cf-sidebar .subscribe p{margin:0}.as3cf-sidebar .subscribe .intro{margin-bottom:1em;line-height:1.4}.as3cf-sidebar .subscribe ul{margin-left:20px;list-style-type:disc}.as3cf-sidebar .subscribe li{line-height:1.4}.as3cf-sidebar .subscribe .links{margin-bottom:2em}.as3cf-sidebar .subscribe .links a{text-decoration:none}.as3cf-sidebar .subscribe .promise{color:#999;font-size:12px;line-height:1.4em}.as3cf-sidebar .subscribe .field{margin-bottom:0.5em}.as3cf-sidebar .subscribe .field p{margin-bottom:0.3em}.as3cf-sidebar .subscribe .field input[type=text],.as3cf-sidebar .subscribe .field input[type=email]{width:100%}.as3cf-sidebar .subscribe .field.submit-button{margin-bottom:1em}.as3cf-sidebar .credits{border-top:0}.as3cf-sidebar .credits h4{font-size:16px;margin-top:0;margin-bottom:10px}.as3cf-sidebar .credits ul{margin:0}.as3cf-sidebar .credits li{overflow:hidden}.as3cf-sidebar .credits li:last-child{margin-bottom:0}.as3cf-sidebar .credits img{float:left;margin-right:10px}.as3cf-sidebar .credits span{float:left;display:block;line-height:32px}.as3cf-sidebar .credits a{display:block;text-decoration:none;color:#444;font-size:16px;text-align:center}.as3cf-sidebar .credits a:hover{color:#888}@media (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6 / 2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx){.as3cf-sidebar .as3cf-banner{background-image:url(../img/snail-banner@2x.jpg);background-size:292px 156px;width:292px;height:156px;display:block}.as3cf-sidebar .as3cf-banner img{display:none}}@media screen and (max-width: 1052px){.as3cf-sidebar{position:relative;top:auto;right:auto;margin-top:50px}}.as3cf-banner img{display:block}.aws-compatibility-notice.error{clear:both;margin:5px 20px 5px 0}.as3cf-bucket-error span.title{font-weight:bold} +.aws-main.wrap>h2{float:left}.aws-main.wrap .as3cf-notice,.aws-main.wrap .as3cf-updated,.aws-main.wrap .as3cf-error{margin-bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.aws-main.wrap .as3cf-error.fatal{clear:both;float:left}.aws-main.wrap h2.nav-tab-wrapper{float:none;margin-bottom:0;width:650px;margin-top:10px;padding-left:5px;padding-right:0}.aws-main.wrap h2.nav-tab-wrapper a.nav-tab-active{color:#464646;cursor:default}.aws-main.wrap h2.nav-tab-wrapper a:focus{-webkit-box-shadow:none;box-shadow:none}.aws-main.wrap .error pre{background:#eaeaea;background:rgba(0,0,0,0.07);display:block;padding:10px 15px}.aws-main.wrap .error pre code{padding:0;background:none}.aws-main.wrap[data-tab="support"] .as3cf-notice,.aws-main.wrap[data-tab="support"] .error,.aws-main.wrap[data-tab="support"] .updated,.aws-main.wrap[data-tab="support"] .updated.show{display:none}.aws-main.wrap[data-tab="support"] .fatal .error,.aws-main.wrap[data-tab="support"] .as3cf-notice.important,.aws-main.wrap[data-tab="support"] .dbrains-api-down{display:block}.aws-main.wrap .as3cf-notice,.aws-main.wrap .error,.aws-main.wrap .updated{max-width:650px;margin-top:15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.aws-main.wrap .as3cf-updated{display:none}.aws-main.wrap .as3cf-updated.as3cf-notice,.aws-main.wrap .as3cf-updated.show{display:block}.as3cf-tab .as3cf-main-settings{display:none}.as3cf-tab .as3cf-bucket-container{display:block}.as3cf-tab.as3cf-has-bucket .as3cf-main-settings{display:block}.as3cf-tab.as3cf-has-bucket .as3cf-bucket-container{display:none}.as3cf-tab{display:none;position:relative;width:650px}.as3cf-tab .as3cf-main-settings p{font-size:13px}.as3cf-tab .as3cf-main-settings p a{color:#444}.as3cf-tab .object-prefix-desc em{white-space:nowrap}.as3cf-tab .as3cf-url-preview-wrap{background:#fff;text-align:center;padding:20px 0 0;max-width:650px;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.as3cf-tab .as3cf-url-preview-wrap .as3cf-url-preview{margin-top:10px;padding:0 20px 10px;overflow-x:scroll}.as3cf-tab .as3cf-url-preview-wrap span{color:#aaa;text-transform:uppercase;font-weight:bold}.as3cf-tab .as3cf-ssl p.info{margin-top:10px;padding:0}.as3cf-tab .as3cf-radio-group label{display:block;margin-bottom:10px}.as3cf-tab .as3cf-radio-group label.disabled,.as3cf-tab .as3cf-radio-group label.disabled p{color:#bbbbbb;cursor:default}.as3cf-tab .as3cf-radio-group p{padding-left:25px;color:#6b6b6b;margin:0;font-size:12px}.as3cf-tab .as3cf-radio-group p.as3cf-setting{margin-top:5px}.as3cf-tab .as3cf-switch{position:relative;display:inline-block;padding:2px;overflow:hidden;border-radius:2px;-webkit-border-radius:2px;background-color:#d4d3d3;cursor:pointer}.as3cf-tab .as3cf-switch.on{background-color:#ade7b5}.as3cf-tab .as3cf-switch span{visibility:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;display:inline-block;height:100%;font-size:12px;line-height:20px;border-radius:2px;-webkit-border-radius:2px;font-weight:bold;padding:4px 8px;background:#fff;color:#8d8d8d;z-index:1}.as3cf-tab .as3cf-switch span.on{color:#82d78b}.as3cf-tab .as3cf-switch span.checked{visibility:visible}.as3cf-tab .as3cf-switch.disabled{cursor:default;background:#e6e6e6}.as3cf-tab .as3cf-switch.disabled span{background:#f1f1f1;color:#d6d6d6}.as3cf-tab .as3cf-switch input[type="checkbox"]{position:absolute !important;top:0;left:0;opacity:0;filter:alpha(opacity=0);z-index:-1}.as3cf-tab .as3cf-setting.hide{display:none}.as3cf-tab h3{font-weight:normal;text-transform:uppercase;margin:15px 0}.as3cf-tab .form-table{margin:0}.as3cf-tab .form-table tr.as3cf-border-bottom td{border-bottom:1px solid #ddd;padding:20px 0px}.as3cf-tab .form-table tr.as3cf-setting-title td{padding-bottom:0}.as3cf-tab .form-table tr.as3cf-setting-title:first-child td{padding-top:20px}.as3cf-tab .form-table tr td{padding:15px 0}.as3cf-tab .form-table tr td:first-child{vertical-align:top;min-width:120px}.as3cf-tab .form-table h3{padding:0;margin:0}.as3cf-tab .form-table h4{margin:0}.as3cf-tab .as3cf-active-bucket{font-weight:bold;margin-right:10px}.as3cf-tab .tooltip{position:relative;z-index:2;cursor:pointer}.as3cf-tab .tooltip:before,.as3cf-tab .tooltip:after{visibility:hidden;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;pointer-events:none}.as3cf-tab .tooltip:before{position:absolute;bottom:150%;left:50%;margin-bottom:5px;margin-left:-250px;padding:10px;width:500px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,0.9);color:#fff;content:attr(data-tooltip);text-align:center;font-size:14px;line-height:1.3}.as3cf-tab .tooltip:after{position:absolute;bottom:150%;left:50%;margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,0.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.as3cf-tab .tooltip:hover:before,.as3cf-tab .tooltip:hover:after{visibility:visible;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}#tab-media{display:block}#tab-media .as3cf-main-settings{display:none}#tab-media .as3cf-bucket-container{display:block}#tab-media.as3cf-has-bucket .as3cf-main-settings{display:block}#tab-media.as3cf-has-bucket .as3cf-bucket-container{display:none}.as3cf-bucket-container h3{line-height:1.3;text-transform:none}.as3cf-bucket-container a:focus{-webkit-box-shadow:none;box-shadow:none;outline:none}.as3cf-bucket-container input[type=text]{box-sizing:border-box;width:100%}.as3cf-bucket-container select{box-sizing:border-box;width:50%}.as3cf-bucket-container .form-table td{padding:5px 0}.as3cf-bucket-container .form-table td:first-child{width:100px;line-height:30px;vertical-align:top}.as3cf-bucket-container .as3cf-invalid-bucket-name{font-size:12px;color:#a00}.as3cf-bucket-container .bucket-actions{margin:15px 0;border-top:1px solid #ccc;padding-top:15px;overflow:hidden}.as3cf-bucket-container .bucket-actions button,.as3cf-bucket-container .bucket-actions .right{float:right;margin-right:0}.as3cf-bucket-container .bucket-actions span{display:inline-block;margin-right:20px;line-height:28px}.as3cf-bucket-container .bucket-actions .bucket-action-cancel{color:#a00;text-decoration:none}.as3cf-bucket-container .bucket-actions .bucket-action-cancel:hover{color:red}.as3cf-bucket-container .as3cf-bucket-list{padding:15px;max-height:200px;overflow-x:hidden;overflow-y:auto;background-color:#fff;font-size:14px}.as3cf-bucket-container .as3cf-bucket-list li:last-of-type{margin-bottom:0}.as3cf-bucket-container .as3cf-bucket-list a{color:#444;text-decoration:none}.as3cf-bucket-container .as3cf-bucket-list a:hover{color:#0074A2}.as3cf-bucket-container .as3cf-bucket-list a.selected{font-weight:bold;color:#0074A2}.as3cf-bucket-container .as3cf-bucket-list a .dashicons{margin-right:5px}.as3cf-bucket-container .as3cf-bucket-select,.as3cf-bucket-container .as3cf-bucket-create{display:none}.as3cf-bucket-container .bucket-actions.select{display:none}.as3cf-tab{display:none}#tab-media{display:block}#tab-support{min-height:900px}#tab-support .as3cf-sidebar{top:11px}#tab-support .support-section{border-bottom:1px solid #ccc;padding-bottom:20px;margin-bottom:20px}#tab-support .debug textarea{width:100%;min-height:200px;font-family:Consolas, Monaco, monospace;margin-bottom:5px}.as3cf-sidebar{position:absolute;top:25px;left:670px;width:292px}.as3cf-sidebar .block{padding:20px;border:1px solid #ccc}.as3cf-sidebar .subscribe{border-top:none}.as3cf-sidebar .subscribe h2{padding:0;margin:0;margin-bottom:0.5em;color:#666;font-size:20px;line-height:1.2em;float:none}.as3cf-sidebar .subscribe h3{font-size:16px;margin:0}.as3cf-sidebar .subscribe p{margin:0}.as3cf-sidebar .subscribe .intro{margin-bottom:1em;line-height:1.4}.as3cf-sidebar .subscribe li{line-height:1.4}.as3cf-sidebar .subscribe .links{margin-bottom:2em}.as3cf-sidebar .subscribe .links a{text-decoration:none}.as3cf-sidebar .subscribe .promise{color:#999;font-size:12px;line-height:1.4em}.as3cf-sidebar .subscribe .field{margin-bottom:0.5em}.as3cf-sidebar .subscribe .field p{margin-bottom:0.3em}.as3cf-sidebar .subscribe .field input[type=text],.as3cf-sidebar .subscribe .field input[type=email]{width:100%}.as3cf-sidebar .subscribe .field.submit-button{margin-bottom:1em}.as3cf-sidebar .credits{border-top:0}.as3cf-sidebar .credits h4{font-size:16px;margin-top:0;margin-bottom:10px}.as3cf-sidebar .credits ul{margin:0}.as3cf-sidebar .credits li{overflow:hidden}.as3cf-sidebar .credits li:last-child{margin-bottom:0}.as3cf-sidebar .credits img{float:left;margin-right:10px}.as3cf-sidebar .credits span{float:left;display:block;line-height:32px}.as3cf-sidebar .credits a{display:block;text-decoration:none;color:#444;font-size:16px;text-align:center}.as3cf-sidebar .credits a:hover{color:#888}@media (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6 / 2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx){.as3cf-sidebar .as3cf-banner{background-image:url(../img/snail-banner@2x.jpg);background-size:292px 156px}}@media screen and (max-width: 1052px){.as3cf-sidebar{position:relative;top:auto;right:auto;margin-top:50px}}.as3cf-banner{margin-top:28px;width:292px;height:156px;display:block;background-image:url(../img/snail-banner.jpg);position:relative}.as3cf-banner h1{font-size:28px;color:#fff;font-weight:200;margin:0;position:absolute;bottom:25px;left:20px;text-decoration:none}.as3cf-upgrade-details{background-color:#73833b;padding:20px;color:#fff;font-size:13px;margin:0;display:block;text-decoration:none}.as3cf-upgrade-details p{margin:0}.as3cf-upgrade-details a{color:#fff;font-weight:bold;text-decoration:none;font-size:16px}.as3cf-upgrade-details a:hover{color:#fff;opacity:0.9}.as3cf-upgrade-details ul{margin-top:0;margin-left:16px;list-style-type:disc}.aws-compatibility-notice.error{clear:both;margin:5px 20px 5px 0}.as3cf-bucket-error span.title{font-weight:bold} diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index a3104449..892c269c 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -550,11 +550,6 @@ line-height: 1.4; } - ul { - margin-left: 20px; - list-style-type: disc; - } - li { line-height: 1.4; } @@ -642,15 +637,8 @@ (min-resolution: 1.3dppx) { .as3cf-banner { - background-image: url(../img/snail-banner@2x.jpg); - background-size: 292px 156px; - width: 292px; - height: 156px; - display: block; - - img { - display: none; - } + background-image: url(../img/snail-banner@2x.jpg); + background-size: 292px 156px; } } @@ -666,8 +654,54 @@ * Misc */ .as3cf-banner { - img { - display: block; + margin-top: 28px; + width: 292px; + height: 156px; + display: block; + background-image: url(../img/snail-banner.jpg); + position: relative; + + h1 { + font-size: 28px; + color: #fff; + font-weight: 200; + margin: 0; + position: absolute; + bottom: 25px; + left: 20px; + text-decoration: none; + } +} + +.as3cf-upgrade-details { + background-color: #73833b; + padding: 20px; + color: #fff; + font-size: 13px; + margin: 0; + display: block; + text-decoration: none; + + p { + margin: 0; + } + + a { + color: #fff; + font-weight: bold; + text-decoration: none; + font-size: 16px; + + &:hover { + color: #fff; + opacity: 0.9; + } + } + + ul { + margin-top: 0; + margin-left: 16px; + list-style-type: disc; } } diff --git a/classes/amazon-s3-and-cloudfront.php b/classes/amazon-s3-and-cloudfront.php index 026ddfac..f2943264 100644 --- a/classes/amazon-s3-and-cloudfront.php +++ b/classes/amazon-s3-and-cloudfront.php @@ -1003,10 +1003,9 @@ function get_attachment_url( $post_id, $expires = null, $size = null, $meta = nu // We don't use $this->get_s3object_region() here because we don't want // to make an AWS API call and slow down page loading - if ( isset( $s3object['region'] ) ) { + if ( isset( $s3object['region'] ) && self::DEFAULT_REGION !== $s3object['region'] ) { $region = $this->translate_region( $s3object['region'] ); - } - else { + } else { $region = ''; } @@ -1358,6 +1357,10 @@ function save_bucket( $bucket_name, $manual = false, $region = null ) { } } + if ( self::DEFAULT_REGION === $region ) { + $region = ''; + } + $this->set_setting( 'region', $region ); if ( $manual ) { diff --git a/classes/wp-aws-compatibility-check.php b/classes/wp-aws-compatibility-check.php index 2087ff32..38d83198 100644 --- a/classes/wp-aws-compatibility-check.php +++ b/classes/wp-aws-compatibility-check.php @@ -440,5 +440,31 @@ function get_admin_notice() { function render_notice( $message ) { printf( '

%s

', $message ); } + + /** + * Is the current process an install or upgrade of plugin(s) + * + * @return bool + */ + public static function is_installing_or_updating_plugins() { + global $pagenow; + + if ( 'update.php' === $pagenow && isset( $_GET['action'] ) && 'install-plugin' === $_GET['action'] ) { + // We are installing a plugin + return true; + } + + if ( 'plugins.php' === $pagenow && isset( $_POST['action'] ) && 'update-selected' === $_POST['action'] ) { + // We are updating plugins from the plugin page + return true; + } + + if ( 'update-core.php' === $pagenow && isset( $_GET['action'] ) && 'do-plugin-upgrade' === $_GET['action'] ) { + // We are updating plugins from the updates page + return true; + } + + return false; + } } } \ No newline at end of file diff --git a/languages/amazon-s3-and-cloudfront-en.pot b/languages/amazon-s3-and-cloudfront-en.pot index 02839721..5d724686 100644 --- a/languages/amazon-s3-and-cloudfront-en.pot +++ b/languages/amazon-s3-and-cloudfront-en.pot @@ -8,13 +8,13 @@ msgid "" msgstr "" "Project-Id-Version: amazon-s3-and-cloudfront\n" "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n" -"POT-Creation-Date: 2015-07-29 16:53-0300\n" +"POT-Creation-Date: 2015-08-17 15:41-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:84 @@ -40,93 +40,93 @@ msgstr "" msgid "Error uploading %s to S3: %s" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1174 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1173 msgid "Cheatin’ eh?" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1178 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1177 msgid "You do not have sufficient permissions to access this page." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1184 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1183 msgid "No bucket name provided." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1452 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1455 #, php-format msgid "There was an error attempting to get the region of the bucket %s: %s" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1572 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1575 msgid "" "This is a test file to check if the user has write permission to S3. Delete " "me if found." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1604 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1607 #, php-format msgid "" "There was an error attempting to check the permissions of the bucket %s: %s" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1662 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1665 msgid "Error creating bucket" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1663 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1666 msgid "Bucket name too short." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1664 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1667 msgid "Bucket name too long." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1665 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1668 msgid "" "Invalid character. Bucket names can contain lowercase letters, numbers, " "periods and hyphens." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1666 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1669 msgid "Error saving bucket" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1667 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1670 msgid "Error fetching buckets" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1668 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1671 msgid "Error getting URL preview: " msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1669 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1672 msgid "The changes you made will be lost if you navigate away from this page" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1727 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1730 msgid "Cheatin' eh?" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1830 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1833 msgctxt "Show the media library tab" msgid "Media Library" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1831 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1834 msgctxt "Show the support tab" msgid "Support" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1967 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1970 #, php-format msgid "The file %s has been given %s permissions on Amazon S3." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2427 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2430 msgid "Quick Start Guide" msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2429 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2432 #, php-format msgid "" "Looks like we don't have write access to this bucket. It's likely that the " @@ -135,7 +135,7 @@ msgid "" "correctly." msgstr "" -#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2431 +#: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2434 #, php-format msgid "" "Looks like we don't have access to the buckets. It's likely that the user " @@ -518,49 +518,66 @@ msgstr "" msgid "Save Changes" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:6 -msgid "Pro Version?" +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:10 +msgid "Upload existing Media Library to S3" msgstr "" #: builds/amazon-s3-and-cloudfront/view/sidebar.php:11 -msgid "" -"We're working on a pro version that will include the following features:" +msgid "Find & replace file URLs in content" +msgstr "" + +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:12 +msgid "Manage S3 files in WordPress" +msgstr "" + +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:13 +msgid "Assets addon - Serve your CSS & JS from S3/CloudFront" +msgstr "" + +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:14 +msgid "WooCommerce addon" msgstr "" #: builds/amazon-s3-and-cloudfront/view/sidebar.php:15 -msgid "Copy existing Media Library to S3" +msgid "Easy Digital Downloads addon" msgstr "" #: builds/amazon-s3-and-cloudfront/view/sidebar.php:16 -msgid "Serve theme JS & CSS from S3/CloudFront" +msgid "PriorityExpert™ email support" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:17 -msgid "" -"WooCommerce & EDD integration" +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:19 +msgid "Visit deliciousbrains.com →" +msgstr "" + +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:26 +msgid "Get 20% Off!" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:18 -msgid "Awesome email support" +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:29 +#, php-format +msgid "" +"Submit your name and email and we’ll send you a coupon for 20% off your " +"upgrade." msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:22 +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:33 msgid "Your Email" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:26 +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:37 msgid "First Name" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:30 +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:41 msgid "Last Name" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:37 -msgid "Send me news about a pro version" +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:48 +msgid "Send me the coupon" msgstr "" -#: builds/amazon-s3-and-cloudfront/view/sidebar.php:41 +#: builds/amazon-s3-and-cloudfront/view/sidebar.php:52 msgid "" "We promise we will not use your email for anything else and you can " "unsubscribe with 1-click anytime." diff --git a/languages/as3cf-pt-br.mo b/languages/as3cf-pt-br.mo new file mode 100644 index 00000000..e2994000 Binary files /dev/null and b/languages/as3cf-pt-br.mo differ diff --git a/readme.txt b/readme.txt index 06d3bc19..62ae336b 100644 --- a/readme.txt +++ b/readme.txt @@ -2,33 +2,36 @@ Contributors: bradt Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC Tags: uploads, amazon, s3, mirror, admin, media, cdn, cloudfront -Requires at least: 3.5 +Requires at least: 3.7 Tested up to: 4.3 -Stable tag: 0.9.2 +Stable tag: 0.9.3 License: GPLv3 Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery. == Description == +https://www.youtube.com/watch?v=_PVybEGaRXc + 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. 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. 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. -**Pro Version** - -We’re working on a pro version that will include the following features: +**PRO Upgrade with Email Support and More Features** -* Copy existing Media Library to S3 -* Serve theme JS & CSS from S3/CloudFront -* WooCommerce & EDD integration -* Awesome email support +* Upload existing Media Library to S3 +* Find & replace file URLs in content +* Control S3 files from the Media Library +* [Assets addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#assets-addon) - Serve your CSS & JS from S3/CloudFront +* [WooCommerce addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#woocommerce-addon) +* [Easy Digital Downloads addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#edd-addon) +* PriorityExpert™ email support -[Sign up for news about the pro version](https://confirmsubscription.com/h/t/295CA85AEB94E879) +See the video below or [visit the web site](http://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin) to learn more about the pro version. -[Request features, report bugs, and submit pull requests on Github](https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/issues) +https://www.youtube.com/watch?v=55xNGnbJ_CY *This plugin has been completely rewritten, but was originally a fork of [Amazon S3 for WordPress with CloudFront](http://wordpress.org/extend/plugins/tantan-s3-cloudfront/) @@ -59,10 +62,14 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin == Changelog == -= 0.9.2 - 2015-07-29- = += 0.9.3 - 2015-08-17 = +* New: Pro upgrade sidebar +* Bug fix: Create buckets in US standard region causing S3 URLs to 404 errors + += 0.9.2 - 2015-07-29 = * Bug fix: Accidentally released the sidebar for after we launch the pro version -= 0.9.1 - 2015-07-29- = += 0.9.1 - 2015-07-29 = * Improvement: Access denied sample IAM policy replaced with link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/) * 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/) * Improvement: Object expires time can now be filtered using the `as3cf_object_meta` filter diff --git a/view/sidebar.php b/view/sidebar.php index 728a6e75..0b4ad88b 100644 --- a/view/sidebar.php +++ b/view/sidebar.php @@ -1,23 +1,34 @@
-
+ +

Upgrade

+
-
- +
- +

@@ -52,7 +63,7 @@

  • - + Delicious Brains Inc. diff --git a/wordpress-s3.php b/wordpress-s3.php index 9dae5c2f..69dd40d6 100644 --- a/wordpress-s3.php +++ b/wordpress-s3.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/ Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery. Author: Brad Touesnard -Version: 0.9.2 +Version: 0.9.3 Author URI: http://bradt.ca Network: True Text Domain: as3cf @@ -26,7 +26,7 @@ // Then completely rewritten. */ -$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '0.9.2'; +$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '0.9.3'; $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['supported_addon_versions'] = array( 'amazon-s3-and-cloudfront-pro' => '1.0b1',