WP Offload S3 Lite - Version 1.0.4

Version Description

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

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

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

Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.4

README.md CHANGED
@@ -1,9 +1,9 @@
1
  # WP Offload S3 Lite #
2
  **Contributors:** bradt, deliciousbrains
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
- **Requires at least:** 3.7
5
- **Tested up to:** 4.4
6
- **Stable tag:** 1.0.3
7
  **License:** GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
@@ -73,6 +73,17 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
73
 
74
  ## Changelog ##
75
 
 
 
 
 
 
 
 
 
 
 
 
76
  ### WP Offload S3 Lite 1.0.3 - 2016-03-23 ###
77
  * Bug fix: Don't replace srcset URLs when Rewrite File URLs option disabled
78
  * Bug fix: Fatal error: Cannot redeclare as3cf_get_secure_attachment_url()
1
  # WP Offload S3 Lite #
2
  **Contributors:** bradt, deliciousbrains
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
+ **Requires at least:** 4.4
5
+ **Tested up to:** 4.5.2
6
+ **Stable tag:** 1.0.4
7
  **License:** GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
73
 
74
  ## Changelog ##
75
 
76
+ ### WP Offload S3 Lite 1.0.4 - 2016-05-30 ###
77
+ * New: Now using simpler Force HTTPS setting, removed redundant Always Use HTTP setting.
78
+ * New: `as3cf_cloudfront_path_parts` filter allows changing served CloudFront path (useful when distribution pulls subdirectory).
79
+ * Improvement: Better compatibility with non-standard notices from other plugins and themes.
80
+ * Improvement: Added basic auth and proxy info to diagnostic info.
81
+ * Improvement: Added `allow_url_fopen` status to diagnostic info.
82
+ * Improvement: Added memory usage to diagnostic info.
83
+ * Improvement: Ensure notice text is 800px or less in width.
84
+ * Improvement: Reduced database queries on settings screen.
85
+ * Bug fix: Properly handle _wp_attachment_data metadata when it is a serialized WP_Error.
86
+
87
  ### WP Offload S3 Lite 1.0.3 - 2016-03-23 ###
88
  * Bug fix: Don't replace srcset URLs when Rewrite File URLs option disabled
89
  * Bug fix: Fatal error: Cannot redeclare as3cf_get_secure_attachment_url()
assets/css/notice.css ADDED
@@ -0,0 +1 @@
 
1
+ .as3cf-notice p,.aws-compatibility-notice p{max-width:800px}
assets/css/styles.css CHANGED
@@ -1 +1 @@
1
- .aws-main.wrap>h1{float:left}.aws-main.wrap .as3cf-notice,.aws-main.wrap .as3cf-updated,.aws-main.wrap .as3cf-error{-webkit-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:15px;width:650px;margin-top:10px;padding:9px 0 0 5px}.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 .more-info{white-space:nowrap}.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;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;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{margin-top:10px}.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;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 tr td .as3cf-notice:last-child{margin-bottom:0}.as3cf-tab .form-table tr td>p:first-child{margin-top:0}.as3cf-tab .form-table tr:first-of-type td{padding-top:5px}.as3cf-tab .form-table tr.as3cf-bucket-setting .as3cf-defined-in-config{float:none}.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 .as3cf-view-bucket{color:#444;text-decoration:none;margin-right:10px}.as3cf-tab .as3cf-view-bucket:hover,.as3cf-tab .as3cf-view-bucket:active{color:#00a0d2}.as3cf-tab .as3cf-view-bucket:focus{-webkit-box-shadow:none;box-shadow:none}.as3cf-tab .as3cf-view-bucket .dashicons-external{margin-top:-2px}.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;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}.as3cf-tab .as3cf-defined-in-config{background:#ccc;color:#fff;padding:2px 5px;margin:0 0 5px 5px;float:right}.as3cf-tab .as3cf-defined-setting{color:#bbb}.as3cf-tab .as3cf-defined-setting label{cursor:default}.as3cf-tab .as3cf-defined-setting p .more-info a{color:#bbb}.as3cf-tab .as3cf-defined-setting .as3cf-radio-group p{color:#bbb}.as3cf-tab .as3cf-defined-setting .as3cf-notice{display:none !important}#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]{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.as3cf-bucket-container select{-webkit-box-sizing:border-box;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 .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), (-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}.as3cf-invalid-bucket-name,.as3cf-validation-error{display:block;margin-top:2px;font-size:12px;color:#a00}.as3cf-notice-toggle-content{max-height:100px;overflow-y:scroll}.as3cf-notice-toggle-content .as3cf-notice-toggle-list{margin-top:0;margin-left:0;padding-left:26px;color:#dc3232}
1
+ .aws-main.wrap{position:relative}.aws-main.wrap>h1{float:left}.aws-main.wrap .as3cf-notice,.aws-main.wrap .as3cf-updated,.aws-main.wrap .as3cf-error{-webkit-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:15px;width:650px;margin-top:10px;padding:9px 0 0 5px}.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 .more-info{white-space:nowrap}.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;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;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-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;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 tr td .as3cf-notice:last-child{margin-bottom:0}.as3cf-tab .form-table tr td>p:first-child{margin-top:0}.as3cf-tab .form-table tr:first-of-type td{padding-top:5px}.as3cf-tab .form-table tr.as3cf-bucket-setting .as3cf-defined-in-config{float:none}.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 .as3cf-view-bucket{color:#444;text-decoration:none;margin-right:10px}.as3cf-tab .as3cf-view-bucket:hover,.as3cf-tab .as3cf-view-bucket:active{color:#00a0d2}.as3cf-tab .as3cf-view-bucket:focus{-webkit-box-shadow:none;box-shadow:none}.as3cf-tab .as3cf-view-bucket .dashicons-external{margin-top:-2px}.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;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}.as3cf-tab .as3cf-defined-in-config{background:#ccc;color:#fff;padding:2px 5px;margin:0 0 5px 5px;float:right}.as3cf-tab .as3cf-defined-setting{color:#bbb}.as3cf-tab .as3cf-defined-setting label{cursor:default}.as3cf-tab .as3cf-defined-setting p .more-info a{color:#bbb}.as3cf-tab .as3cf-defined-setting .as3cf-radio-group p{color:#bbb}.as3cf-tab .as3cf-defined-setting .as3cf-notice{display:none !important}#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]{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.as3cf-bucket-container select{-webkit-box-sizing:border-box;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 .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:9px;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), (-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:35px;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}.as3cf-invalid-bucket-name,.as3cf-validation-error{display:block;margin-top:2px;font-size:12px;color:#a00}.as3cf-notice-toggle-content{max-height:100px;overflow-y:scroll}.as3cf-notice-toggle-content .as3cf-notice-toggle-list{margin-top:0;margin-left:0;padding-left:40px;color:#dc3232}
assets/js/script.js CHANGED
@@ -61,6 +61,8 @@
61
  * @param bool persist_updated_notice
62
  */
63
  toggle: function( hash, persist_updated_notice ) {
 
 
64
  $tabs.hide();
65
  $activeTab = $( '#tab-' + hash );
66
  $activeTab.show();
@@ -73,6 +75,59 @@
73
  if ( ! persist_updated_notice ) {
74
  $( '.as3cf-updated' ).removeClass( 'show' );
75
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
77
  };
78
 
@@ -630,7 +685,7 @@
630
 
631
  // As it's the default remove the hash
632
  window.location.hash = '';
633
- if ( 'function' === typeof window.history.replaceState && '#' === window.location.href.slice( -1 ) ) {
634
 
635
  // Strip the # if still on the end of the URL
636
  history.replaceState( {}, '', window.location.href.slice( 0, -1 ) );
@@ -689,25 +744,6 @@
689
  $cloudfront.toggleClass( 'hide', ! cloudfrontSelected );
690
  } );
691
 
692
- $( '.as3cf-ssl' ).on( 'change', 'input[type="radio"]', function( e ) {
693
- if ( ! $( '#' + $activeTab.attr( 'id' ) + ' .deprecated-domain' ).length ) {
694
- return;
695
- }
696
-
697
- var ssl = $( 'input:radio[name="ssl"]:checked' ).val();
698
- if ( 'https' === ssl ) {
699
- var domain = $( 'input:radio[name="domain"]:checked' ).val();
700
- if ( 'subdomain' === domain ) {
701
- $( 'input[name="domain"][value="path"]' ).attr( 'checked', true );
702
- }
703
- $( '.subdomain-wrap input' ).attr( 'disabled', true );
704
- $( '.subdomain-wrap' ).addClass( 'disabled' );
705
- } else {
706
- $( '.subdomain-wrap input' ).removeAttr( 'disabled' );
707
- $( '.subdomain-wrap' ).removeClass( 'disabled' );
708
- }
709
- } );
710
-
711
  $( '.url-preview' ).on( 'change', 'input', function( e ) {
712
  generateUrlPreview();
713
  } );
61
  * @param bool persist_updated_notice
62
  */
63
  toggle: function( hash, persist_updated_notice ) {
64
+ hash = as3cf.tabs.sanitizeHash( hash );
65
+
66
  $tabs.hide();
67
  $activeTab = $( '#tab-' + hash );
68
  $activeTab.show();
75
  if ( ! persist_updated_notice ) {
76
  $( '.as3cf-updated' ).removeClass( 'show' );
77
  }
78
+
79
+ if ( 'support' === hash ) {
80
+ as3cf.tabs.getDiagnosticInfo();
81
+ }
82
+ },
83
+
84
+ /**
85
+ * Update display of diagnostic info.
86
+ */
87
+ getDiagnosticInfo: function() {
88
+ var $debugLog = $( '.debug-log-textarea' );
89
+
90
+ $debugLog.html( as3cf.strings.get_diagnostic_info );
91
+
92
+ var data = {
93
+ action: 'as3cf-get-diagnostic-info',
94
+ _nonce: as3cf.nonces.get_diagnostic_info
95
+ };
96
+
97
+ $.ajax( {
98
+ url: ajaxurl,
99
+ type: 'POST',
100
+ dataType: 'JSON',
101
+ data: data,
102
+ error: function( jqXHR, textStatus, errorThrown ) {
103
+ $debugLog.html( errorThrown );
104
+ },
105
+ success: function( data, textStatus, jqXHR ) {
106
+ if ( 'undefined' !== typeof data[ 'success' ] ) {
107
+ $debugLog.html( data[ 'diagnostic_info' ] );
108
+ } else {
109
+ $debugLog.html( as3cf.strings.get_diagnostic_info_error );
110
+ $debugLog.append( data[ 'error' ] );
111
+ }
112
+ }
113
+ } );
114
+ },
115
+
116
+ /**
117
+ * Sanitize hash to ensure it references a real tab.
118
+ *
119
+ * @param string hash
120
+ *
121
+ * @return string
122
+ */
123
+ sanitizeHash: function( hash ) {
124
+ var $newTab = $( '#tab-' + hash );
125
+
126
+ if ( 0 === $newTab.length ) {
127
+ hash = as3cf.tabs.defaultTab;
128
+ }
129
+
130
+ return hash;
131
  }
132
  };
133
 
685
 
686
  // As it's the default remove the hash
687
  window.location.hash = '';
688
+ if ( 'function' === typeof window.history.replaceState && '#' === window.location.href.slice( -1 ) ) {
689
 
690
  // Strip the # if still on the end of the URL
691
  history.replaceState( {}, '', window.location.href.slice( 0, -1 ) );
744
  $cloudfront.toggleClass( 'hide', ! cloudfrontSelected );
745
  } );
746
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
747
  $( '.url-preview' ).on( 'change', 'input', function( e ) {
748
  generateUrlPreview();
749
  } );
assets/js/script.min.js CHANGED
@@ -1 +1 @@
1
- !function(a,b){function c(b){return a("#"+b+" .as3cf-main-settings form").find("input:not(.no-compare)").serialize()}function d(a){var b=k.find("#"+a),c=b.find("input[type=checkbox]");b.toggleClass("on").find("span").toggleClass("checked");var d=b.find("span.on").hasClass("checked");c.attr("checked",d).trigger("change")}function e(b){var c=b.next(".as3cf-validation-error"),d=a("#"+k.attr("id")+' form button[type="submit"]'),e=/[^a-zA-Z0-9\.\-]/;e.test(b.val())?(c.show(),d.attr("disabled",!0)):(c.hide(),d.attr("disabled",!1))}function f(){var c=a("#"+b.prefix+"-bucket").val(),d=k.find('input[name="object-prefix"]'),e=d.val();""!==e&&(e="&prefix="+encodeURIComponent(e));var f=as3cf.aws_bucket_link+c+e;a("#"+b.prefix+"-view-bucket").attr("href",f)}function g(){a(".as3cf-url-preview").html("Generating...");var b={_nonce:as3cf.nonces.get_url_preview};a.each(a("#tab-"+as3cf.tabs.defaultTab+" .as3cf-main-settings form").serializeArray(),function(c,d){var e=d.name,f=d.value;e=e.replace("[]",""),b[e]=void 0===b[e]?f:a.isArray(b[e])?b[e].concat(f):[b[e],f]}),b.action="as3cf-get-url-preview",a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:b,error:function(a,b,c){alert(as3cf.strings.get_url_preview_error+c)},success:function(b,c,d){"undefined"!=typeof b.success?a(".as3cf-url-preview").html(b.url):alert(as3cf.strings.get_url_preview_error+b.error)}})}function h(a){as3cf.buckets.bucketSelectLock=!1}function i(){a("#remove-local-file").is(":checked")&&a("#serve-from-s3").is(":not(:checked)")?a("#as3cf-lost-files-notice").show():a("#as3cf-lost-files-notice").hide()}function j(){a("#remove-local-file").is(":checked")?a("#as3cf-remove-local-notice").show():a("#as3cf-remove-local-notice").hide()}var k,l={},m=/[^a-z0-9.-]/,n=!1,o=a(".as3cf-tab");as3cf.tabs={defaultTab:"media",toggle:function(c,d){o.hide(),k=a("#tab-"+c),k.show(),a(".nav-tab").removeClass("nav-tab-active"),a('a.nav-tab[data-tab="'+c+'"]').addClass("nav-tab-active"),a(".aws-main").attr("data-tab",c),k.attr("data-prefix")&&(b.prefix=k.attr("data-prefix")),d||a(".as3cf-updated").removeClass("show")}},as3cf.buckets={validLength:3,bucketSelectLock:!1,loadList:function(c){"undefined"==typeof c&&(c=!1);var d=a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-list"),e=a("#"+b.prefix+"-bucket").val();if(!1===c&&d.find("li").length>1)return a(".as3cf-bucket-list a").removeClass("selected"),a('.as3cf-bucket-list a[data-bucket="'+e+'"]').addClass("selected"),void this.scrollToSelected();d.html('<li class="loading">'+d.attr("data-working")+"</li>");var f={action:b.prefix+"-get-buckets",_nonce:window[b.prefix.replace(/-/g,"_")].nonces.get_buckets},g=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:f,error:function(a,b,c){d.html(""),g.showError(as3cf.strings.get_buckets_error,c,"as3cf-bucket-select")},success:function(b,c,f){d.html(""),"undefined"!=typeof b.success?(a(".as3cf-bucket-error").hide(),a(b.buckets).each(function(a,b){var c=b.Name===e?"selected":"";d.append('<li><a class="'+c+'" href="#" data-bucket="'+b.Name+'"><span class="bucket"><span class="dashicons dashicons-portfolio"></span> '+b.Name+'</span><span class="spinner"></span></span></a></li>')}),g.scrollToSelected()):g.showError(as3cf.strings.get_buckets_error,b.error,"as3cf-bucket-select")}})},scrollToSelected:function(){if(a(".as3cf-bucket-list a.selected").length){var b=a("ul.as3cf-bucket-list li").first().position().top+150;a(".as3cf-bucket-list").animate({scrollTop:a("ul.as3cf-bucket-list li a.selected").position().top-b})}},resetModal:function(){var c=a(".as3cf-bucket-container."+b.prefix);!1===k.hasClass("as3cf-has-bucket")||"manual"===a("#"+b.prefix+"-bucket-select").val()?(c.find(".as3cf-bucket-manual").show().siblings().hide(),c.find(".bucket-actions.manual").show().siblings(".bucket-actions").hide()):(c.find(".as3cf-bucket-select").show().siblings().hide(),c.find(".bucket-actions.select").show().siblings(".bucket-actions").hide(),this.loadList(n),n=!1),c.find(".as3cf-bucket-error").hide();var d=a("#"+b.prefix+"-bucket").val();c.find(".as3cf-bucket-manual .as3cf-bucket-name").val(d),this.bucketSelectLock=!1},saveManual:function(){var c=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form"),d=c.find(".as3cf-bucket-name"),e=c.find("button[type=submit]"),f=d.val(),g=e.first().text();if(f===a("#"+b.prefix+"-active-bucket").text())return a(".as3cf-bucket-error").hide(),k.addClass("as3cf-has-bucket"),void b.close();a(".as3cf-bucket-error").hide(),e.text(e.attr("data-working")),e.prop("disabled",!0);var h={action:b.prefix+"-manual-save-bucket",bucket_name:f,_nonce:window[b.prefix.replace(/-/g,"_")].nonces.manual_bucket},i=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:h,error:function(a,b,c){e.text(g),i.showError(as3cf.strings.save_bucket_error,c,"as3cf-bucket-manual")},success:function(c,d,h){e.text(g),e.prop("disabled",!1),"undefined"!=typeof c.success?(i.set(f,c.region,c.can_write),a("#"+b.prefix+"-bucket-select").val("manual"),a(".as3cf-bucket-list a").removeClass("selected").filter('[data-bucket="'+f+'"]').addClass("selected"),n=!0):i.showError(as3cf.strings.save_bucket_error,c.error,"as3cf-bucket-manual")}})},saveSelected:function(c){var d=a(".as3cf-bucket-list");if(!this.bucketSelectLock){if(this.bucketSelectLock=!0,c.hasClass("selected"))return k.addClass("as3cf-has-bucket"),void b.close();var e=a(".as3cf-bucket-list a.selected").attr("data-bucket");a(".as3cf-bucket-list a").removeClass("selected"),c.addClass("selected"),d.addClass("saving"),c.find(".spinner").show().css("visibility","visible");var f=c.attr("data-bucket"),g={action:b.prefix+"-save-bucket",bucket_name:f,_nonce:window[b.prefix.replace(/-/g,"_")].nonces.save_bucket},h=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:g,error:function(b,c,f){d.removeClass("saving"),h.showError(as3cf.strings.save_bucket_error,f,"as3cf-bucket-select"),a(".as3cf-bucket-list a").removeClass("selected"),a('.as3cf-bucket-list a[data-bucket="'+e+'"]').addClass("selected")},success:function(g,i,j){c.find(".spinner").hide().css("visibility","hidden"),d.removeClass("saving"),"undefined"!=typeof g.success?(h.set(f,g.region,g.can_write),a("#"+b.prefix+"-bucket-select").val("")):(h.showError(as3cf.strings.save_bucket_error,g.error,"as3cf-bucket-select"),a(".as3cf-bucket-list a").removeClass("selected"),a('.as3cf-bucket-list a[data-bucket="'+e+'"]').addClass("selected"))}})}},disabledButtons:function(){if(0!==a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form").length){var c=a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form"),d=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form");c.find(".as3cf-bucket-name").val().length<3?c.find("button[type=submit]").attr("disabled",!0):c.find("button[type=submit]").attr("disabled",!1),d.find(".as3cf-bucket-name").val().length<3?d.find("button[type=submit]").attr("disabled",!0):d.find("button[type=submit]").attr("disabled",!1)}},showError:function(b,c,d){var e=a(".as3cf-bucket-container").children(":visible"),f=e.find(".as3cf-bucket-error");d="undefined"==typeof d?null:d,d&&!e.hasClass(d)||(f.find("span.title").html(b+" &mdash;"),f.find("span.message").html(c),f.show(),this.bucketSelectLock=!1)},set:function(e,i,j){var m=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form"),n=a("#"+b.prefix+"-active-bucket");if("as3cf"===b.prefix&&0===n.text().trim().length){d("copy-to-s3-wrap"),d("serve-from-s3-wrap");var o=k.attr("id");l[o]=c(o)}a(".as3cf-error.fatal").hide(),n.text(e),m.find(".as3cf-bucket-name").val(e),a("#"+b.prefix+"-bucket").val(e),a("#"+b.prefix+"-region").val(i),a(".updated").not(".as3cf-notice").show(),k.addClass("as3cf-has-bucket"),k.find(".as3cf-can-write-error").toggle(!j),k.find(".as3cf-bucket-error").hide(),"as3cf"===b.prefix&&g(),f(),b.close(h)},create:function(){var c=a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form"),d=c.find(".as3cf-bucket-name"),e=c.find(".bucket-create-region"),f=c.find("button[type=submit]"),g=d.val(),h=f.text();a(".as3cf-bucket-error").hide(),f.text(f.attr("data-working")),f.prop("disabled",!0);var i={action:b.prefix+"-create-bucket",bucket_name:g,_nonce:window[b.prefix.replace(/-/g,"_")].nonces.create_bucket};e.val()&&(i.region=e.val());var j=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:i,error:function(a,b,c){f.text(h),j.showError(as3cf.strings.create_bucket_error,c,"as3cf-bucket-create")},success:function(b,c,e){f.text(h),f.prop("disabled",!1),"undefined"!=typeof b.success?(j.set(g,b.region,b.can_write),a(".as3cf-bucket-select-region").hide(),a(".as3cf-bucket-select-region").removeAttr("selected"),d.val(""),f.attr("disabled",!0),n=!0):j.showError(as3cf.strings.create_bucket_error,b.error,"as3cf-bucket-create")}})},isValidName:function(a){return a.length<3||a.length>63?!1:!0!==m.test(a)},updateNameNotice:function(b){var c=null;!0===m.test(b)?c=as3cf.strings.create_bucket_invalid_chars:b.length<3?c=as3cf.strings.create_bucket_name_short:b.length>63&&(c=as3cf.strings.create_bucket_name_long),c&&b.length>0?a(".as3cf-invalid-bucket-name").html(c):a(".as3cf-invalid-bucket-name").html("")}},a(document).ready(function(){var h=a(".wrap.aws-main .nav-tab-wrapper");if(a(".aws-compatibility-notice, div.updated, div.error, div.notice").not(".below-h2, .inline").insertAfter(h),window.location.hash){var m=window.location.hash.substring(1);as3cf.tabs.toggle(m,!0)}else k=a("#tab-"+as3cf.tabs.defaultTab),a(".aws-main").attr("data-tab",as3cf.tabs.defaultTab);a(".aws-main").on("click",".nav-tab",function(b){if(b.preventDefault(),!a(this).hasClass("nav-tab-active")){var c=a(this).attr("data-tab");as3cf.tabs.toggle(c),"media"===c?(window.location.hash="","function"==typeof window.history.replaceState&&"#"===window.location.href.slice(-1)&&history.replaceState({},"",window.location.href.slice(0,-1))):window.location.hash=c}}),o.length&&o.each(function(a,b){l[b.id]=c(b.id)}),a(window).on("beforeunload.as3cf-settings",function(){if(!a.isEmptyObject(l)){var b=k.attr("id");return c(b)!==l[b]?as3cf.strings.save_alert:void 0}}),a(document).on("submit",".as3cf-main-settings form",function(b){a(window).off("beforeunload.as3cf-settings")}),a(".as3cf-switch").on("click",function(b){a(this).hasClass("disabled")||d(a(this).attr("id"))}),o.on("change",".sub-toggle",function(b){var c=a(this).attr("id");a(".as3cf-setting."+c).toggleClass("hide")}),a(".as3cf-domain").on("change",'input[type="radio"]',function(b){var c=a(this).closest('input:radio[name="domain"]:checked'),d=c.val(),e=a(this).parents(".as3cf-domain").find(".as3cf-setting.cloudfront"),f="cloudfront"===d;e.toggleClass("hide",!f)}),a(".as3cf-ssl").on("change",'input[type="radio"]',function(b){if(a("#"+k.attr("id")+" .deprecated-domain").length){var c=a('input:radio[name="ssl"]:checked').val();if("https"===c){var d=a('input:radio[name="domain"]:checked').val();"subdomain"===d&&a('input[name="domain"][value="path"]').attr("checked",!0),a(".subdomain-wrap input").attr("disabled",!0),a(".subdomain-wrap").addClass("disabled")}else a(".subdomain-wrap input").removeAttr("disabled"),a(".subdomain-wrap").removeClass("disabled")}}),a(".url-preview").on("change","input",function(a){g()}),i(),a("#serve-from-s3,#remove-local-file").on("change",function(a){i()}),j(),a("#remove-local-file").on("change",function(a){j()}),a('.as3cf-setting input[type="text"]').keypress(function(a){return 13===a.which?(a.preventDefault(),!1):void 0}),a('input[name="cloudfront"]').on("keyup",function(b){e(a(this))}),a('input[name="domain"]').on("change",function(b){var c=a(this),d=a("#"+k.attr("id")+' form button[type="submit"]');"cloudfront"!==c.val()?d.attr("disabled",!1):e(c.next(".as3cf-setting").find('input[name="cloudfront"]'))}),a('input[name="object-prefix"]').on("change",function(a){f()}),a("#tab-media > .as3cf-bucket-error").detach().insertAfter(".as3cf-bucket-container h3"),a("body").on("click",".bucket-action-manual",function(c){c.preventDefault(),a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-manual").show().siblings().hide()}),a("body").on("click",".bucket-action-browse",function(c){c.preventDefault(),a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-select").show().siblings().hide(),as3cf.buckets.loadList(n),n=!1}),a("body").on("click",".bucket-action-create",function(c){c.preventDefault(),a(".as3cf-bucket-name").val(""),a(".as3cf-invalid-bucket-name").html(""),a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-create").show().siblings().hide()}),a("body").on("click",".bucket-action-cancel",function(a){a.preventDefault(),as3cf.buckets.resetModal()}),a("body").on("click",".bucket-action-save",function(a){a.preventDefault(),as3cf.buckets.saveManual()}),a("body").on("click",'.as3cf-create-bucket-form button[type="submit"]',function(a){a.preventDefault(),as3cf.buckets.create()}),a("body").on("click",".bucket-action-refresh",function(a){a.preventDefault(),as3cf.buckets.loadList(!0)}),a("body").on("click",".as3cf-bucket-list a",function(b){b.preventDefault(),as3cf.buckets.saveSelected(a(this))}),a(".as3cf-bucket-container").on("click","a.js-link",function(b){return b.preventDefault(),window.open(a(this).attr("href")),!1}),a("body").on("as3cf-modal-open",function(c,d){if(".as3cf-bucket-container."+b.prefix===d){as3cf.buckets.resetModal();var e=a(".as3cf-bucket-manual h3").data("modal-title");a(".as3cf-bucket-manual h3").text(e),as3cf.buckets.disabledButtons()}}),as3cf.buckets.disabledButtons(),a("body").on("input keyup",".as3cf-create-bucket-form .as3cf-bucket-name",function(c){var d=a(this).val(),e=a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form");as3cf.buckets.isValidName(d)?e.find("button[type=submit]").removeAttr("disabled"):e.find("button[type=submit]").attr("disabled",!0),as3cf.buckets.updateNameNotice(d)}),a("body").on("input keyup",".as3cf-manual-save-bucket-form .as3cf-bucket-name",function(c){var d=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form");d.find(".as3cf-bucket-name").val().length<as3cf.buckets.validLength?d.find("button[type=submit]").attr("disabled",!0):d.find("button[type=submit]").removeAttr("disabled")})})}(jQuery,as3cfModal);
1
+ !function(a,b){function c(b){return a("#"+b+" .as3cf-main-settings form").find("input:not(.no-compare)").serialize()}function d(a){var b=k.find("#"+a),c=b.find("input[type=checkbox]");b.toggleClass("on").find("span").toggleClass("checked");var d=b.find("span.on").hasClass("checked");c.attr("checked",d).trigger("change")}function e(b){var c=b.next(".as3cf-validation-error"),d=a("#"+k.attr("id")+' form button[type="submit"]'),e=/[^a-zA-Z0-9\.\-]/;e.test(b.val())?(c.show(),d.attr("disabled",!0)):(c.hide(),d.attr("disabled",!1))}function f(){var c=a("#"+b.prefix+"-bucket").val(),d=k.find('input[name="object-prefix"]'),e=d.val();""!==e&&(e="&prefix="+encodeURIComponent(e));var f=as3cf.aws_bucket_link+c+e;a("#"+b.prefix+"-view-bucket").attr("href",f)}function g(){a(".as3cf-url-preview").html("Generating...");var b={_nonce:as3cf.nonces.get_url_preview};a.each(a("#tab-"+as3cf.tabs.defaultTab+" .as3cf-main-settings form").serializeArray(),function(c,d){var e=d.name,f=d.value;e=e.replace("[]",""),b[e]=void 0===b[e]?f:a.isArray(b[e])?b[e].concat(f):[b[e],f]}),b.action="as3cf-get-url-preview",a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:b,error:function(a,b,c){alert(as3cf.strings.get_url_preview_error+c)},success:function(b,c,d){"undefined"!=typeof b.success?a(".as3cf-url-preview").html(b.url):alert(as3cf.strings.get_url_preview_error+b.error)}})}function h(a){as3cf.buckets.bucketSelectLock=!1}function i(){a("#remove-local-file").is(":checked")&&a("#serve-from-s3").is(":not(:checked)")?a("#as3cf-lost-files-notice").show():a("#as3cf-lost-files-notice").hide()}function j(){a("#remove-local-file").is(":checked")?a("#as3cf-remove-local-notice").show():a("#as3cf-remove-local-notice").hide()}var k,l={},m=/[^a-z0-9.-]/,n=!1,o=a(".as3cf-tab");as3cf.tabs={defaultTab:"media",toggle:function(c,d){c=as3cf.tabs.sanitizeHash(c),o.hide(),k=a("#tab-"+c),k.show(),a(".nav-tab").removeClass("nav-tab-active"),a('a.nav-tab[data-tab="'+c+'"]').addClass("nav-tab-active"),a(".aws-main").attr("data-tab",c),k.attr("data-prefix")&&(b.prefix=k.attr("data-prefix")),d||a(".as3cf-updated").removeClass("show"),"support"===c&&as3cf.tabs.getDiagnosticInfo()},getDiagnosticInfo:function(){var b=a(".debug-log-textarea");b.html(as3cf.strings.get_diagnostic_info);var c={action:"as3cf-get-diagnostic-info",_nonce:as3cf.nonces.get_diagnostic_info};a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:c,error:function(a,c,d){b.html(d)},success:function(a,c,d){"undefined"!=typeof a.success?b.html(a.diagnostic_info):(b.html(as3cf.strings.get_diagnostic_info_error),b.append(a.error))}})},sanitizeHash:function(b){var c=a("#tab-"+b);return 0===c.length&&(b=as3cf.tabs.defaultTab),b}},as3cf.buckets={validLength:3,bucketSelectLock:!1,loadList:function(c){"undefined"==typeof c&&(c=!1);var d=a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-list"),e=a("#"+b.prefix+"-bucket").val();if(!1===c&&d.find("li").length>1)return a(".as3cf-bucket-list a").removeClass("selected"),a('.as3cf-bucket-list a[data-bucket="'+e+'"]').addClass("selected"),void this.scrollToSelected();d.html('<li class="loading">'+d.attr("data-working")+"</li>");var f={action:b.prefix+"-get-buckets",_nonce:window[b.prefix.replace(/-/g,"_")].nonces.get_buckets},g=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:f,error:function(a,b,c){d.html(""),g.showError(as3cf.strings.get_buckets_error,c,"as3cf-bucket-select")},success:function(b,c,f){d.html(""),"undefined"!=typeof b.success?(a(".as3cf-bucket-error").hide(),a(b.buckets).each(function(a,b){var c=b.Name===e?"selected":"";d.append('<li><a class="'+c+'" href="#" data-bucket="'+b.Name+'"><span class="bucket"><span class="dashicons dashicons-portfolio"></span> '+b.Name+'</span><span class="spinner"></span></span></a></li>')}),g.scrollToSelected()):g.showError(as3cf.strings.get_buckets_error,b.error,"as3cf-bucket-select")}})},scrollToSelected:function(){if(a(".as3cf-bucket-list a.selected").length){var b=a("ul.as3cf-bucket-list li").first().position().top+150;a(".as3cf-bucket-list").animate({scrollTop:a("ul.as3cf-bucket-list li a.selected").position().top-b})}},resetModal:function(){var c=a(".as3cf-bucket-container."+b.prefix);!1===k.hasClass("as3cf-has-bucket")||"manual"===a("#"+b.prefix+"-bucket-select").val()?(c.find(".as3cf-bucket-manual").show().siblings().hide(),c.find(".bucket-actions.manual").show().siblings(".bucket-actions").hide()):(c.find(".as3cf-bucket-select").show().siblings().hide(),c.find(".bucket-actions.select").show().siblings(".bucket-actions").hide(),this.loadList(n),n=!1),c.find(".as3cf-bucket-error").hide();var d=a("#"+b.prefix+"-bucket").val();c.find(".as3cf-bucket-manual .as3cf-bucket-name").val(d),this.bucketSelectLock=!1},saveManual:function(){var c=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form"),d=c.find(".as3cf-bucket-name"),e=c.find("button[type=submit]"),f=d.val(),g=e.first().text();if(f===a("#"+b.prefix+"-active-bucket").text())return a(".as3cf-bucket-error").hide(),k.addClass("as3cf-has-bucket"),void b.close();a(".as3cf-bucket-error").hide(),e.text(e.attr("data-working")),e.prop("disabled",!0);var h={action:b.prefix+"-manual-save-bucket",bucket_name:f,_nonce:window[b.prefix.replace(/-/g,"_")].nonces.manual_bucket},i=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:h,error:function(a,b,c){e.text(g),i.showError(as3cf.strings.save_bucket_error,c,"as3cf-bucket-manual")},success:function(c,d,h){e.text(g),e.prop("disabled",!1),"undefined"!=typeof c.success?(i.set(f,c.region,c.can_write),a("#"+b.prefix+"-bucket-select").val("manual"),a(".as3cf-bucket-list a").removeClass("selected").filter('[data-bucket="'+f+'"]').addClass("selected"),n=!0):i.showError(as3cf.strings.save_bucket_error,c.error,"as3cf-bucket-manual")}})},saveSelected:function(c){var d=a(".as3cf-bucket-list");if(!this.bucketSelectLock){if(this.bucketSelectLock=!0,c.hasClass("selected"))return k.addClass("as3cf-has-bucket"),void b.close();var e=a(".as3cf-bucket-list a.selected").attr("data-bucket");a(".as3cf-bucket-list a").removeClass("selected"),c.addClass("selected"),d.addClass("saving"),c.find(".spinner").show().css("visibility","visible");var f=c.attr("data-bucket"),g={action:b.prefix+"-save-bucket",bucket_name:f,_nonce:window[b.prefix.replace(/-/g,"_")].nonces.save_bucket},h=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:g,error:function(b,c,f){d.removeClass("saving"),h.showError(as3cf.strings.save_bucket_error,f,"as3cf-bucket-select"),a(".as3cf-bucket-list a").removeClass("selected"),a('.as3cf-bucket-list a[data-bucket="'+e+'"]').addClass("selected")},success:function(g,i,j){c.find(".spinner").hide().css("visibility","hidden"),d.removeClass("saving"),"undefined"!=typeof g.success?(h.set(f,g.region,g.can_write),a("#"+b.prefix+"-bucket-select").val("")):(h.showError(as3cf.strings.save_bucket_error,g.error,"as3cf-bucket-select"),a(".as3cf-bucket-list a").removeClass("selected"),a('.as3cf-bucket-list a[data-bucket="'+e+'"]').addClass("selected"))}})}},disabledButtons:function(){if(0!==a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form").length){var c=a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form"),d=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form");c.find(".as3cf-bucket-name").val().length<3?c.find("button[type=submit]").attr("disabled",!0):c.find("button[type=submit]").attr("disabled",!1),d.find(".as3cf-bucket-name").val().length<3?d.find("button[type=submit]").attr("disabled",!0):d.find("button[type=submit]").attr("disabled",!1)}},showError:function(b,c,d){var e=a(".as3cf-bucket-container").children(":visible"),f=e.find(".as3cf-bucket-error");d="undefined"==typeof d?null:d,d&&!e.hasClass(d)||(f.find("span.title").html(b+" &mdash;"),f.find("span.message").html(c),f.show(),this.bucketSelectLock=!1)},set:function(e,i,j){var m=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form"),n=a("#"+b.prefix+"-active-bucket");if("as3cf"===b.prefix&&0===n.text().trim().length){d("copy-to-s3-wrap"),d("serve-from-s3-wrap");var o=k.attr("id");l[o]=c(o)}a(".as3cf-error.fatal").hide(),n.text(e),m.find(".as3cf-bucket-name").val(e),a("#"+b.prefix+"-bucket").val(e),a("#"+b.prefix+"-region").val(i),a(".updated").not(".as3cf-notice").show(),k.addClass("as3cf-has-bucket"),k.find(".as3cf-can-write-error").toggle(!j),k.find(".as3cf-bucket-error").hide(),"as3cf"===b.prefix&&g(),f(),b.close(h)},create:function(){var c=a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form"),d=c.find(".as3cf-bucket-name"),e=c.find(".bucket-create-region"),f=c.find("button[type=submit]"),g=d.val(),h=f.text();a(".as3cf-bucket-error").hide(),f.text(f.attr("data-working")),f.prop("disabled",!0);var i={action:b.prefix+"-create-bucket",bucket_name:g,_nonce:window[b.prefix.replace(/-/g,"_")].nonces.create_bucket};e.val()&&(i.region=e.val());var j=this;a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",data:i,error:function(a,b,c){f.text(h),j.showError(as3cf.strings.create_bucket_error,c,"as3cf-bucket-create")},success:function(b,c,e){f.text(h),f.prop("disabled",!1),"undefined"!=typeof b.success?(j.set(g,b.region,b.can_write),a(".as3cf-bucket-select-region").hide(),a(".as3cf-bucket-select-region").removeAttr("selected"),d.val(""),f.attr("disabled",!0),n=!0):j.showError(as3cf.strings.create_bucket_error,b.error,"as3cf-bucket-create")}})},isValidName:function(a){return a.length<3||a.length>63?!1:!0!==m.test(a)},updateNameNotice:function(b){var c=null;!0===m.test(b)?c=as3cf.strings.create_bucket_invalid_chars:b.length<3?c=as3cf.strings.create_bucket_name_short:b.length>63&&(c=as3cf.strings.create_bucket_name_long),c&&b.length>0?a(".as3cf-invalid-bucket-name").html(c):a(".as3cf-invalid-bucket-name").html("")}},a(document).ready(function(){var h=a(".wrap.aws-main .nav-tab-wrapper");if(a(".aws-compatibility-notice, div.updated, div.error, div.notice").not(".below-h2, .inline").insertAfter(h),window.location.hash){var m=window.location.hash.substring(1);as3cf.tabs.toggle(m,!0)}else k=a("#tab-"+as3cf.tabs.defaultTab),a(".aws-main").attr("data-tab",as3cf.tabs.defaultTab);a(".aws-main").on("click",".nav-tab",function(b){if(b.preventDefault(),!a(this).hasClass("nav-tab-active")){var c=a(this).attr("data-tab");as3cf.tabs.toggle(c),"media"===c?(window.location.hash="","function"==typeof window.history.replaceState&&"#"===window.location.href.slice(-1)&&history.replaceState({},"",window.location.href.slice(0,-1))):window.location.hash=c}}),o.length&&o.each(function(a,b){l[b.id]=c(b.id)}),a(window).on("beforeunload.as3cf-settings",function(){if(!a.isEmptyObject(l)){var b=k.attr("id");return c(b)!==l[b]?as3cf.strings.save_alert:void 0}}),a(document).on("submit",".as3cf-main-settings form",function(b){a(window).off("beforeunload.as3cf-settings")}),a(".as3cf-switch").on("click",function(b){a(this).hasClass("disabled")||d(a(this).attr("id"))}),o.on("change",".sub-toggle",function(b){var c=a(this).attr("id");a(".as3cf-setting."+c).toggleClass("hide")}),a(".as3cf-domain").on("change",'input[type="radio"]',function(b){var c=a(this).closest('input:radio[name="domain"]:checked'),d=c.val(),e=a(this).parents(".as3cf-domain").find(".as3cf-setting.cloudfront"),f="cloudfront"===d;e.toggleClass("hide",!f)}),a(".url-preview").on("change","input",function(a){g()}),i(),a("#serve-from-s3,#remove-local-file").on("change",function(a){i()}),j(),a("#remove-local-file").on("change",function(a){j()}),a('.as3cf-setting input[type="text"]').keypress(function(a){return 13===a.which?(a.preventDefault(),!1):void 0}),a('input[name="cloudfront"]').on("keyup",function(b){e(a(this))}),a('input[name="domain"]').on("change",function(b){var c=a(this),d=a("#"+k.attr("id")+' form button[type="submit"]');"cloudfront"!==c.val()?d.attr("disabled",!1):e(c.next(".as3cf-setting").find('input[name="cloudfront"]'))}),a('input[name="object-prefix"]').on("change",function(a){f()}),a("#tab-media > .as3cf-bucket-error").detach().insertAfter(".as3cf-bucket-container h3"),a("body").on("click",".bucket-action-manual",function(c){c.preventDefault(),a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-manual").show().siblings().hide()}),a("body").on("click",".bucket-action-browse",function(c){c.preventDefault(),a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-select").show().siblings().hide(),as3cf.buckets.loadList(n),n=!1}),a("body").on("click",".bucket-action-create",function(c){c.preventDefault(),a(".as3cf-bucket-name").val(""),a(".as3cf-invalid-bucket-name").html(""),a(".as3cf-bucket-container."+b.prefix+" .as3cf-bucket-create").show().siblings().hide()}),a("body").on("click",".bucket-action-cancel",function(a){a.preventDefault(),as3cf.buckets.resetModal()}),a("body").on("click",".bucket-action-save",function(a){a.preventDefault(),as3cf.buckets.saveManual()}),a("body").on("click",'.as3cf-create-bucket-form button[type="submit"]',function(a){a.preventDefault(),as3cf.buckets.create()}),a("body").on("click",".bucket-action-refresh",function(a){a.preventDefault(),as3cf.buckets.loadList(!0)}),a("body").on("click",".as3cf-bucket-list a",function(b){b.preventDefault(),as3cf.buckets.saveSelected(a(this))}),a(".as3cf-bucket-container").on("click","a.js-link",function(b){return b.preventDefault(),window.open(a(this).attr("href")),!1}),a("body").on("as3cf-modal-open",function(c,d){if(".as3cf-bucket-container."+b.prefix===d){as3cf.buckets.resetModal();var e=a(".as3cf-bucket-manual h3").data("modal-title");a(".as3cf-bucket-manual h3").text(e),as3cf.buckets.disabledButtons()}}),as3cf.buckets.disabledButtons(),a("body").on("input keyup",".as3cf-create-bucket-form .as3cf-bucket-name",function(c){var d=a(this).val(),e=a(".as3cf-bucket-container."+b.prefix+" .as3cf-create-bucket-form");as3cf.buckets.isValidName(d)?e.find("button[type=submit]").removeAttr("disabled"):e.find("button[type=submit]").attr("disabled",!0),as3cf.buckets.updateNameNotice(d)}),a("body").on("input keyup",".as3cf-manual-save-bucket-form .as3cf-bucket-name",function(c){var d=a(".as3cf-bucket-container."+b.prefix+" .as3cf-manual-save-bucket-form");d.find(".as3cf-bucket-name").val().length<as3cf.buckets.validLength?d.find("button[type=submit]").attr("disabled",!0):d.find("button[type=submit]").removeAttr("disabled")})})}(jQuery,as3cfModal);
assets/js/tinymce.min.js DELETED
@@ -1 +0,0 @@
1
- tinymce.PluginManager.add("as3cf",function(a){function b(a){var b=[];if(h.each(a,function(a,c){h.has(j,a)||b.push(a)}),0!==b.length&&!(h.isUndefined(i.frame)||h.isUndefined(i.frame.states)||h.isUndefined(i.frame.states.models))){var c=h.find(i.frame.states.models,function(a){return"insert"===a.id});if(!h.isUndefined(c)&&0!==h.size(c.attributes.library.models)){var d=c.attributes.library.models,e={};h.each(a,function(a,b){var c=a.replace(/-[0-9]{1,4}x[0-9]{1,4}(\.[a-z]{2,4})$/,"$1"),f=h.find(d,function(a){return a.attributes.url===c});if(!h.isUndefined(f)){var g=h.find(f.attributes.sizes,function(b){return a===b.local_url});return h.isUndefined(g)?!1:void(e[a]=g.url)}}),h.extend(j,e)}}}function c(a){var b=[];h.each(a,function(a,c){h.has(j,a)||b.push(a)}),0!==b.length&&g.ajax({url:ajaxurl,type:"POST",dataType:"JSON",async:!1,cache:!1,data:{action:"as3cf_tinymce_fetch_urls",_nonce:as3cf_tinymce.fetch_urls_nonce,urls:b},success:function(a){j=h.extend(j,a.data)}})}function d(a){return h.has(j,a)?j[a]:!1}function e(a){var e=new RegExp("("+as3cf_tinymce.local_url_escaped+'[^"<\\s]*)',"g"),f=a.match(e);return null===f?a:(b(f),c(f),h.each(f,function(b,c){var e=d(b);!1!==e&&(a=a.replace(new RegExp(b,"g"),e))}),a)}function f(a){return h.each(j,function(b,c){!1!==b&&(a=a.replace(new RegExp(b,"g"),c))}),a}var g=window.jQuery,h=window._,i=window.wp.media,j={};a.on("BeforeSetContent",function(a){a.content=e(a.content)}),a.on("PostProcess",function(a){a.get&&(a.content=f(a.content))})});
 
assets/sass/notice.scss ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Common as3cf-notice styles.
3
+ */
4
+ .as3cf-notice,
5
+ .aws-compatibility-notice {
6
+ p {
7
+ max-width: 800px;
8
+ }
9
+ }
assets/sass/styles.scss CHANGED
@@ -3,6 +3,8 @@
3
  * AWS wrap
4
  */
5
  .aws-main.wrap {
 
 
6
  & > h1 {
7
  float: left;
8
  }
@@ -146,14 +148,6 @@
146
  }
147
  }
148
 
149
- .as3cf-ssl {
150
- margin-top: 10px;
151
- p.info {
152
- margin-top: 10px;
153
- padding: 0;
154
- }
155
- }
156
-
157
  .as3cf-radio-group {
158
  label {
159
  display: block;
@@ -574,7 +568,7 @@
574
  */
575
  .as3cf-sidebar {
576
  position: absolute;
577
- top: 25px;
578
  left: 670px;
579
  width: 292px;
580
 
@@ -714,7 +708,7 @@
714
  * Misc
715
  */
716
  .as3cf-banner {
717
- margin-top: 28px;
718
  width: 292px;
719
  height: 156px;
720
  display: block;
@@ -791,7 +785,7 @@
791
  .as3cf-notice-toggle-list {
792
  margin-top: 0;
793
  margin-left: 0;
794
- padding-left: 26px;
795
  color: #dc3232;
796
  }
797
  }
3
  * AWS wrap
4
  */
5
  .aws-main.wrap {
6
+ position: relative;
7
+
8
  & > h1 {
9
  float: left;
10
  }
148
  }
149
  }
150
 
 
 
 
 
 
 
 
 
151
  .as3cf-radio-group {
152
  label {
153
  display: block;
568
  */
569
  .as3cf-sidebar {
570
  position: absolute;
571
+ top: 9px;
572
  left: 670px;
573
  width: 292px;
574
 
708
  * Misc
709
  */
710
  .as3cf-banner {
711
+ margin-top: 35px;
712
  width: 292px;
713
  height: 156px;
714
  display: block;
785
  .as3cf-notice-toggle-list {
786
  margin-top: 0;
787
  margin-left: 0;
788
+ padding-left: 40px;
789
  color: #dc3232;
790
  }
791
  }
classes/amazon-s3-and-cloudfront.php CHANGED
@@ -119,6 +119,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
119
  add_action( 'wp_ajax_as3cf-create-bucket', array( $this, 'ajax_create_bucket' ) );
120
  add_action( 'wp_ajax_as3cf-manual-save-bucket', array( $this, 'ajax_save_bucket' ) );
121
  add_action( 'wp_ajax_as3cf-get-url-preview', array( $this, 'ajax_get_url_preview' ) );
 
122
 
123
  // Rewriting URLs, doesn't depend on plugin being setup
124
  add_filter( 'wp_get_attachment_url', array( $this, 'wp_get_attachment_url' ), 99, 2 );
@@ -289,9 +290,31 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
289
  $ssl = 'request';
290
  }
291
 
 
 
 
 
292
  return $ssl;
293
  }
294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  $value = parent::get_setting( $key, $default );
296
 
297
  // Bucket
@@ -390,20 +413,13 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
390
  );
391
  }
392
 
393
- if ( 'ssl' === $key ) {
394
- $allowed_values = array(
395
- 'request',
396
- 'https',
397
- 'http',
398
- );
399
- }
400
-
401
  $checkboxes = array(
402
  'copy-to-s3',
403
  'serve-from-s3',
404
  'enable-object-prefix',
405
  'remove-local-file',
406
  'object-versioning',
 
407
  );
408
 
409
  if ( in_array( $key, $checkboxes ) ) {
@@ -584,7 +600,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
584
  function get_url_preview( $escape = true, $suffix = 'photo.jpg' ) {
585
  $scheme = $this->get_s3_url_scheme();
586
  $bucket = $this->get_setting( 'bucket' );
587
- $path = $this->get_file_prefix();
588
  $region = $this->get_setting( 'region' );
589
  if ( is_wp_error( $region ) ) {
590
  $region = '';
@@ -618,6 +634,20 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
618
  $this->end_ajax( $out );
619
  }
620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
  /**
622
  * Delete bulk objects from an S3 bucket
623
  *
@@ -758,6 +788,10 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
758
  $return_metadata = $data;
759
  }
760
 
 
 
 
 
761
  // Allow S3 upload to be hijacked / cancelled for any reason
762
  $pre = apply_filters( 'as3cf_pre_upload_attachment', false, $post_id, $data );
763
  if ( false !== $pre ) {
@@ -873,8 +907,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
873
  $files_to_remove[] = $file_path;
874
  try {
875
  $s3client->putObject( $args );
876
- }
877
- catch ( Exception $e ) {
878
  $error_msg = sprintf( __( 'Error uploading %s to S3: %s', 'amazon-s3-and-cloudfront' ), $file_path, $e->getMessage() );
879
 
880
  return $this->return_upload_error( $error_msg, $return_metadata );
@@ -888,7 +921,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
888
  $file_paths = $this->get_attachment_file_paths( $post_id, true, $data );
889
  $additional_images = array();
890
 
891
- $filesize_total = 0;
892
  $remove_local_files_setting = $this->get_setting( 'remove-local-file' );
893
 
894
  if ( $remove_local_files_setting ) {
@@ -928,11 +961,10 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
928
 
929
  foreach ( $additional_images as $image ) {
930
  try {
931
- $args = array_merge( $args, $image );
932
  $args['ACL'] = self::DEFAULT_ACL;
933
  $s3client->putObject( $args );
934
- }
935
- catch ( Exception $e ) {
936
  AS3CF_Error::log( 'Error uploading ' . $args['SourceFile'] . ' to S3: ' . $e->getMessage() );
937
  }
938
  }
@@ -1383,15 +1415,14 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1383
  /**
1384
  * Return the scheme to be used in URLs
1385
  *
1386
- * @param string|null $ssl
1387
  *
1388
  * @return string
1389
  */
1390
- function get_s3_url_scheme( $ssl = null ) {
1391
- if ( $this->use_ssl( $ssl ) ) {
1392
  $scheme = 'https';
1393
- }
1394
- else {
1395
  $scheme = 'http';
1396
  }
1397
 
@@ -1401,21 +1432,21 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1401
  /**
1402
  * Determine when to use https in URLS
1403
  *
1404
- * @param string|null $ssl
1405
  *
1406
  * @return bool
1407
  */
1408
- function use_ssl( $ssl = null ) {
1409
- $use_ssl = false;
 
 
1410
 
1411
- if ( is_null( $ssl ) ) {
1412
- $ssl = $this->get_setting( 'ssl' );
1413
  }
1414
 
1415
- if ( 'request' == $ssl && is_ssl() ) {
1416
- $use_ssl = true;
1417
- } else if ( 'https' == $ssl ) {
1418
- $use_ssl = true;
1419
  }
1420
 
1421
  return apply_filters( 'as3cf_use_ssl', $use_ssl );
@@ -1501,8 +1532,8 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1501
  $args['domain'] = $this->get_setting( 'domain' );
1502
  }
1503
 
1504
- if ( ! isset( $args['ssl'] ) ) {
1505
- $args['ssl'] = $this->get_setting( 'ssl' );
1506
  }
1507
 
1508
  $prefix = $this->get_s3_url_prefix( $region, $expires );
@@ -1514,14 +1545,11 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1514
  }
1515
 
1516
  $s3_domain = $cloudfront;
1517
- }
1518
- elseif ( 'virtual-host' === $args['domain'] ) {
1519
  $s3_domain = $bucket;
1520
- }
1521
- elseif ( 'path' === $args['domain'] || $this->use_ssl( $args['ssl'] ) ) {
1522
  $s3_domain = $prefix . '.amazonaws.com/' . $bucket;
1523
- }
1524
- else {
1525
  $s3_domain = $bucket . '.' . $prefix . '.amazonaws.com';
1526
  }
1527
 
@@ -1584,6 +1612,11 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1584
  if ( is_null( $meta ) ) {
1585
  $meta = get_post_meta( $post_id, '_wp_attachment_metadata', true );
1586
  }
 
 
 
 
 
1587
  if ( isset( $meta['sizes'][ $size ]['file'] ) ) {
1588
  $size_prefix = dirname( $s3object['key'] );
1589
  $size_file_prefix = ( '.' === $size_prefix ) ? '' : $size_prefix . '/';
@@ -1598,12 +1631,13 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
1598
  $secure_url = $this->get_s3client( $region )->getObjectUrl( $s3object['bucket'], $s3object['key'], $expires, $headers );
1599
 
1600
  return apply_filters( 'as3cf_get_attachment_secure_url', $secure_url, $s3object, $post_id, $expires, $headers );
1601
- }
1602
- catch ( Exception $e ) {
1603
  return new WP_Error( 'exception', $e->getMessage() );
1604
  }
1605
  }
1606
 
 
 
1607
  $file = $this->encode_filename_in_path( $s3object['key'], $post_id );
1608
  $url = $scheme . '://' . $domain_bucket . '/' . $file;
1609
 
@@ -2375,14 +2409,17 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
2375
  'save_bucket_error' => __( 'Error saving bucket', 'amazon-s3-and-cloudfront' ),
2376
  'get_buckets_error' => __( 'Error fetching buckets', 'amazon-s3-and-cloudfront' ),
2377
  'get_url_preview_error' => __( 'Error getting URL preview: ', 'amazon-s3-and-cloudfront' ),
2378
- 'save_alert' => __( 'The changes you made will be lost if you navigate away from this page', 'amazon-s3-and-cloudfront' )
 
 
2379
  ),
2380
  'nonces' => array(
2381
- 'create_bucket' => wp_create_nonce( 'as3cf-create-bucket' ),
2382
- 'manual_bucket' => wp_create_nonce( 'as3cf-manual-save-bucket' ),
2383
- 'get_buckets' => wp_create_nonce( 'as3cf-get-buckets' ),
2384
- 'save_bucket' => wp_create_nonce( 'as3cf-save-bucket' ),
2385
- 'get_url_preview' => wp_create_nonce( 'as3cf-get-url-preview' ),
 
2386
  ),
2387
  'is_pro' => $this->is_pro(),
2388
  'aws_bucket_link' => $this->get_aws_bucket_link(),
@@ -2413,7 +2450,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
2413
  'copy-to-s3',
2414
  'serve-from-s3',
2415
  'remove-local-file',
2416
- 'ssl',
2417
  'object-versioning',
2418
  'use-yearmonth-folders',
2419
  'enable-object-prefix',
@@ -2799,297 +2836,328 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
2799
  * Diagnostic information for the support tab
2800
  *
2801
  * @param bool $escape
 
 
2802
  */
2803
  function output_diagnostic_info( $escape = true ) {
2804
  global $table_prefix;
2805
  global $wpdb;
2806
 
2807
- echo 'site_url(): ';
2808
- echo esc_html( site_url() );
2809
- echo "\r\n";
2810
 
2811
- echo 'home_url(): ';
2812
- echo esc_html( home_url() );
2813
- echo "\r\n";
2814
 
2815
- echo 'Database Name: ';
2816
- echo esc_html( $wpdb->dbname );
2817
- echo "\r\n";
2818
 
2819
- echo 'Table Prefix: ';
2820
- echo esc_html( $table_prefix );
2821
- echo "\r\n";
2822
 
2823
- echo 'WordPress: ';
2824
- echo bloginfo( 'version' );
2825
  if ( is_multisite() ) {
2826
- echo ' Multisite';
2827
- echo "\r\n";
2828
- echo 'Multisite Site Count: ';
2829
- echo esc_html( get_blog_count() );
2830
  }
2831
- echo "\r\n";
2832
 
2833
- echo 'Web Server: ';
2834
- echo esc_html( ! empty( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '' );
2835
- echo "\r\n";
2836
 
2837
- echo 'PHP: ';
2838
  if ( function_exists( 'phpversion' ) ) {
2839
- echo esc_html( phpversion() );
2840
  }
2841
- echo "\r\n";
2842
 
2843
- echo 'MySQL: ';
2844
- echo esc_html( $wpdb->db_version() );
2845
- echo "\r\n";
2846
 
2847
- echo 'ext/mysqli: ';
2848
- echo empty( $wpdb->use_mysqli ) ? 'no' : 'yes';
2849
- echo "\r\n";
2850
 
2851
- echo 'PHP Memory Limit: ';
2852
  if ( function_exists( 'ini_get' ) ) {
2853
- echo esc_html( ini_get( 'memory_limit' ) );
2854
  }
2855
- echo "\r\n";
 
 
 
 
2856
 
2857
- echo 'WP Memory Limit: ';
2858
- echo esc_html( WP_MEMORY_LIMIT );
2859
- echo "\r\n";
2860
 
2861
- echo 'Blocked External HTTP Requests: ';
2862
  if ( ! defined( 'WP_HTTP_BLOCK_EXTERNAL' ) || ! WP_HTTP_BLOCK_EXTERNAL ) {
2863
- echo 'None';
2864
  } else {
2865
  $accessible_hosts = ( defined( 'WP_ACCESSIBLE_HOSTS' ) ) ? WP_ACCESSIBLE_HOSTS : '';
2866
 
2867
  if ( empty( $accessible_hosts ) ) {
2868
- echo 'ALL';
2869
  } else {
2870
- echo 'Partially (Accessible Hosts: ' . esc_html( $accessible_hosts ) . ')';
2871
  }
2872
  }
2873
- echo "\r\n";
2874
 
2875
- echo 'WP Locale: ';
2876
- echo esc_html( get_locale() );
2877
- echo "\r\n";
2878
 
2879
- echo 'Organize uploads by month/year: ';
2880
- echo esc_html( get_option( 'uploads_use_yearmonth_folders' ) ? 'Enabled' : 'Disabled' );
2881
- echo "\r\n";
2882
 
2883
- echo 'WP_DEBUG: ';
2884
- echo esc_html( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? 'Yes' : 'No' );
2885
- echo "\r\n";
2886
 
2887
- echo 'WP_DEBUG_LOG: ';
2888
- echo esc_html( ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? 'Yes' : 'No' );
2889
- echo "\r\n";
2890
 
2891
- echo 'WP_DEBUG_DISPLAY: ';
2892
- echo esc_html( ( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY ) ? 'Yes' : 'No' );
2893
- echo "\r\n";
2894
 
2895
- echo 'SCRIPT_DEBUG: ';
2896
- echo esc_html( ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? 'Yes' : 'No' );
2897
- echo "\r\n";
2898
 
2899
- echo 'WP Max Upload Size: ';
2900
- echo esc_html( size_format( wp_max_upload_size() ) );
2901
- echo "\r\n";
2902
 
2903
- echo 'PHP Time Limit: ';
2904
  if ( function_exists( 'ini_get' ) ) {
2905
- echo esc_html( ini_get( 'max_execution_time' ) );
2906
  }
2907
- echo "\r\n";
2908
 
2909
- echo 'PHP Error Log: ';
2910
  if ( function_exists( 'ini_get' ) ) {
2911
- echo esc_html( ini_get( 'error_log' ) );
2912
  }
2913
- echo "\r\n";
2914
 
2915
- echo 'WP Cron: ';
2916
- echo esc_html( ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? 'Disabled' : 'Enabled' );
2917
- echo "\r\n";
2918
 
2919
- echo 'fsockopen: ';
2920
  if ( function_exists( 'fsockopen' ) ) {
2921
- echo 'Enabled';
 
 
 
 
 
 
 
 
 
2922
  } else {
2923
- echo 'Disabled';
2924
  }
2925
- echo "\r\n";
2926
 
2927
- echo 'OpenSSL: ';
2928
  if ( $this->open_ssl_enabled() ) {
2929
- echo esc_html( OPENSSL_VERSION_TEXT );
2930
  } else {
2931
- echo 'Disabled';
2932
  }
2933
- echo "\r\n";
2934
 
2935
- echo 'cURL: ';
2936
  if ( function_exists( 'curl_init' ) ) {
2937
- echo 'Enabled';
2938
  } else {
2939
- echo 'Disabled';
2940
  }
2941
- echo "\r\n";
2942
 
2943
- echo 'Zlib Compression: ';
2944
  if ( function_exists( 'gzcompress' ) ) {
2945
- echo 'Enabled';
2946
  } else {
2947
- echo 'Disabled';
2948
  }
2949
- echo "\r\n";
2950
 
2951
- echo 'PHP GD: ';
2952
  if ( $this->gd_enabled() ) {
2953
  $gd_info = gd_info();
2954
- echo isset( $gd_info['GD Version'] ) ? esc_html( $gd_info['GD Version'] ) : 'Enabled';
2955
  } else {
2956
- echo 'Disabled';
2957
  }
2958
- echo "\r\n";
2959
 
2960
- echo 'Imagick: ';
2961
  if ( $this->imagick_enabled() ) {
2962
- echo 'Enabled';
2963
  } else {
2964
- echo 'Disabled';
2965
  }
2966
- echo "\r\n\r\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2967
 
2968
  $media_counts = $this->diagnostic_media_counts();
2969
 
2970
- echo 'Media Files: ';
2971
- echo number_format_i18n( $media_counts['all'] );
2972
- echo "\r\n";
2973
 
2974
- echo 'Media Files on S3: ';
2975
- echo number_format_i18n( $media_counts['s3'] );
2976
- echo "\r\n";
2977
 
2978
- echo 'Number of Image Sizes: ';
2979
  $sizes = count( get_intermediate_image_sizes() );
2980
- echo number_format_i18n( $sizes );
2981
- echo "\r\n\r\n";
2982
 
2983
- echo 'Names and Dimensions of Image Sizes: ';
2984
- echo "\r\n";
2985
  $size_details = $this->get_image_sizes_details();
2986
- echo $size_details;
2987
- echo "\r\n";
2988
 
2989
- echo 'WP_CONTENT_DIR: ';
2990
- echo esc_html( ( defined( 'WP_CONTENT_DIR' ) ) ? WP_CONTENT_DIR : 'Not defined' );
2991
- echo "\r\n";
2992
 
2993
- echo 'WP_CONTENT_URL: ';
2994
- echo esc_html( ( defined( 'WP_CONTENT_URL' ) ) ? WP_CONTENT_URL : 'Not defined' );
2995
- echo "\r\n";
2996
 
2997
- echo 'UPLOADS: ';
2998
- echo esc_html( ( defined( 'UPLOADS' ) ) ? UPLOADS : 'Not defined' );
2999
- echo "\r\n";
3000
 
3001
- echo 'WP_PLUGIN_DIR: ';
3002
- echo esc_html( ( defined( 'WP_PLUGIN_DIR' ) ) ? WP_PLUGIN_DIR : 'Not defined' );
3003
- echo "\r\n";
3004
 
3005
- echo 'WP_PLUGIN_URL: ';
3006
- echo esc_html( ( defined( 'WP_PLUGIN_URL' ) ) ? WP_PLUGIN_URL : 'Not defined' );
3007
- echo "\r\n\r\n";
3008
 
3009
- echo 'AWS_USE_EC2_IAM_ROLE: ';
3010
- echo esc_html( ( defined( 'AWS_USE_EC2_IAM_ROLE' ) ) ? AWS_USE_EC2_IAM_ROLE : 'Not defined' );
3011
- echo "\r\n";
3012
 
3013
- echo 'AS3CF_BUCKET: ';
3014
- echo esc_html( ( defined( 'AS3CF_BUCKET' ) ) ? AS3CF_BUCKET : 'Not defined' );
3015
- echo "\r\n";
3016
 
3017
- echo 'AS3CF_ASSETS_BUCKET: ';
3018
- echo esc_html( ( defined( 'AS3CF_ASSETS_BUCKET' ) ) ? AS3CF_ASSETS_BUCKET : 'Not defined' );
3019
- echo "\r\n";
3020
 
3021
- echo 'AS3CF_REGION: ';
3022
- echo esc_html( ( defined( 'AS3CF_REGION' ) ) ? AS3CF_REGION : 'Not defined' );
3023
- echo "\r\n\r\n";
3024
 
3025
- echo 'Bucket: ';
3026
- echo $this->get_setting( 'bucket' );
3027
- echo "\r\n";
3028
- echo 'Region: ';
3029
  $region = $this->get_setting( 'region' );
3030
  if ( ! is_wp_error( $region ) ) {
3031
- echo $region;
3032
- }
3033
- echo "\r\n";
3034
- echo 'Copy Files to S3: ';
3035
- echo $this->on_off( 'copy-to-s3' );
3036
- echo "\r\n";
3037
- echo 'Rewrite File URLs: ';
3038
- echo $this->on_off( 'serve-from-s3' );
3039
- echo "\r\n";
3040
- echo "\r\n";
3041
-
3042
- echo 'URL Preview: ';
3043
- echo $this->get_url_preview( $escape );
3044
- echo "\r\n";
3045
- echo "\r\n";
3046
-
3047
- echo 'Domain: ';
3048
- echo $this->get_setting( 'domain' );
3049
- echo "\r\n";
3050
- echo 'Enable Path: ';
3051
- echo $this->on_off( 'enable-object-prefix' );
3052
- echo "\r\n";
3053
- echo 'Custom Path: ';
3054
- echo $this->get_setting( 'object-prefix' );
3055
- echo "\r\n";
3056
- echo 'Use Year/Month: ';
3057
- echo $this->on_off( 'use-yearmonth-folders' );
3058
- echo "\r\n";
3059
- echo 'SSL: ';
3060
- echo $this->get_setting( 'ssl' );
3061
- echo "\r\n";
3062
- echo 'Remove Files From Server: ';
3063
- echo $this->on_off( 'remove-local-file' );
3064
- echo "\r\n";
3065
- echo 'Object Versioning: ';
3066
- echo $this->on_off( 'object-versioning' );
3067
- echo "\r\n\r\n";
3068
-
3069
- do_action( 'as3cf_diagnostic_info' );
3070
  if ( has_action( 'as3cf_diagnostic_info' ) ) {
3071
- echo "\r\n";
3072
  }
3073
 
3074
  $theme_info = wp_get_theme();
3075
- echo "Active Theme Name: " . esc_html( $theme_info->Name ) . "\r\n";
3076
- echo "Active Theme Folder: " . esc_html( basename( $theme_info->get_stylesheet_directory() ) ) . "\r\n";
3077
  if ( $theme_info->get( 'Template' ) ) {
3078
- echo "Parent Theme Folder: " . esc_html( $theme_info->get( 'Template' ) ) . "\r\n";
3079
  }
3080
  if ( ! file_exists( $theme_info->get_stylesheet_directory() ) ) {
3081
- echo "WARNING: Active Theme Folder Not Found\r\n";
3082
  }
3083
 
3084
- echo "\r\n";
3085
 
3086
- echo "Active Plugins:\r\n";
3087
  $active_plugins = (array) get_option( 'active_plugins', array() );
3088
  $plugin_details = array();
3089
 
3090
  if ( is_multisite() ) {
3091
  $network_active_plugins = wp_get_active_network_plugins();
3092
- $active_plugins = array_map( array( $this, 'remove_wp_plugin_dir' ), $network_active_plugins );
3093
  }
3094
 
3095
  foreach ( $active_plugins as $plugin ) {
@@ -3097,21 +3165,23 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3097
  }
3098
 
3099
  asort( $plugin_details );
3100
- echo implode( '', $plugin_details );
3101
 
3102
  $mu_plugins = wp_get_mu_plugins();
3103
  if ( $mu_plugins ) {
3104
  $mu_plugin_details = array();
3105
- echo "\r\n";
3106
- echo "Must-use Plugins:\r\n";
3107
 
3108
  foreach ( $mu_plugins as $mu_plugin ) {
3109
  $mu_plugin_details[] = $this->get_plugin_details( $mu_plugin );
3110
  }
3111
 
3112
  asort( $mu_plugin_details );
3113
- echo implode( '', $mu_plugin_details );
3114
  }
 
 
3115
  }
3116
 
3117
  /**
@@ -3165,9 +3235,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3165
  */
3166
  function http_prepare_download_log() {
3167
  if ( isset( $_GET['as3cf-download-log'] ) && wp_verify_nonce( $_GET['nonce'], 'as3cf-download-log' ) ) {
3168
- ob_start();
3169
- $this->output_diagnostic_info( false );
3170
- $log = ob_get_clean();
3171
  $url = parse_url( home_url() );
3172
  $host = sanitize_file_name( $url['host'] );
3173
  $filename = sprintf( '%s-diagnostic-log-%s.txt', $host, date( 'YmdHis' ) );
@@ -3329,6 +3397,10 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3329
  $meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
3330
  }
3331
 
 
 
 
 
3332
  $original_file = $file_path; // Not all attachments will have meta
3333
 
3334
  if ( isset( $meta['file'] ) ) {
@@ -3569,25 +3641,58 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3569
  }
3570
 
3571
  /**
3572
- * More info link
3573
  *
3574
  * @param string $url
3575
- * @param string $hash
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3576
  * @param bool $append_campaign
3577
  *
3578
  * @return string
3579
  */
3580
- public function more_info_link( $url, $hash = '', $append_campaign = true ) {
3581
  if ( $append_campaign ) {
3582
- $campaign = $this->is_pro() ? 'os3-pro-plugin' : 'os3-free-plugin';
3583
- $url .= '?utm_source=insideplugin&utm_medium=web&utm_content=more-info&utm_campaign=' . $campaign;
3584
  }
3585
 
3586
  if ( ! empty( $hash ) ) {
3587
  $url .= '#' . $hash;
3588
  }
3589
 
3590
- return sprintf( '<span class="more-info"><a href="%s">%s</a> &raquo;</span>', esc_url( $url ), __( 'More info', 'amazon-s3-and-cloudfront' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3591
  }
3592
 
3593
  /**
@@ -3677,11 +3782,53 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
3677
  );
3678
 
3679
  $doc_url = 'https://deliciousbrains.com/wp-offload-s3/doc/copy-hidpi-2x-images-support/';
3680
- $doc_link = sprintf( '<a href="%s">%s</a>', $doc_url, __( 'this doc' ) );
3681
 
3682
  $message = sprintf( '<strong>%s</strong> &mdash; ', __( 'WP Offload S3 Feature Removed', 'amazon-s3-and-cloudfront' ) );
3683
  $message .= sprintf( __( 'The "Copy HiDPI (@2x) Images" feature has been removed as of version 1.1 of WP Offload S3. It looks like you had this feature turned on. Please see %s for why we removed this feature and how you can continue copying @2x images to S3.', 'amazon-s3-and-cloudfront' ), $doc_link );
3684
 
3685
  $this->notices->add_notice( $message, $notice_args );
3686
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3687
  }
119
  add_action( 'wp_ajax_as3cf-create-bucket', array( $this, 'ajax_create_bucket' ) );
120
  add_action( 'wp_ajax_as3cf-manual-save-bucket', array( $this, 'ajax_save_bucket' ) );
121
  add_action( 'wp_ajax_as3cf-get-url-preview', array( $this, 'ajax_get_url_preview' ) );
122
+ add_action( 'wp_ajax_as3cf-get-diagnostic-info', array( $this, 'ajax_get_diagnostic_info' ) );
123
 
124
  // Rewriting URLs, doesn't depend on plugin being setup
125
  add_filter( 'wp_get_attachment_url', array( $this, 'wp_get_attachment_url' ), 99, 2 );
290
  $ssl = 'request';
291
  }
292
 
293
+ $this->set_setting( 'ssl', $ssl );
294
+ $this->remove_setting( 'force-ssl' );
295
+ $this->save_settings();
296
+
297
  return $ssl;
298
  }
299
 
300
+ // Force HTTPS since 1.3
301
+ if ( 'force-https' === $key && ! isset( $settings['force-https'] ) ) {
302
+ $ssl = $this->get_setting( 'ssl', 'request' );
303
+
304
+ $force_https = false;
305
+ if ( 'https' === $ssl ) {
306
+ $force_https = true;
307
+ } elseif ( 'http' === $ssl ) {
308
+ $this->maybe_display_deprecated_http_notice();
309
+ }
310
+
311
+ $this->set_setting( 'force-https', $force_https );
312
+ $this->remove_setting( 'ssl' );
313
+ $this->save_settings();
314
+
315
+ return $force_https;
316
+ }
317
+
318
  $value = parent::get_setting( $key, $default );
319
 
320
  // Bucket
413
  );
414
  }
415
 
 
 
 
 
 
 
 
 
416
  $checkboxes = array(
417
  'copy-to-s3',
418
  'serve-from-s3',
419
  'enable-object-prefix',
420
  'remove-local-file',
421
  'object-versioning',
422
+ 'force-https',
423
  );
424
 
425
  if ( in_array( $key, $checkboxes ) ) {
600
  function get_url_preview( $escape = true, $suffix = 'photo.jpg' ) {
601
  $scheme = $this->get_s3_url_scheme();
602
  $bucket = $this->get_setting( 'bucket' );
603
+ $path = $this->maybe_update_cloudfront_path( $this->get_file_prefix() );
604
  $region = $this->get_setting( 'region' );
605
  if ( is_wp_error( $region ) ) {
606
  $region = '';
634
  $this->end_ajax( $out );
635
  }
636
 
637
+ /**
638
+ * AJAX handler for get_diagnostic_info()
639
+ */
640
+ function ajax_get_diagnostic_info() {
641
+ $this->verify_ajax_request();
642
+
643
+ $out = array(
644
+ 'success' => '1',
645
+ 'diagnostic_info' => $this->output_diagnostic_info(),
646
+ );
647
+
648
+ $this->end_ajax( $out );
649
+ }
650
+
651
  /**
652
  * Delete bulk objects from an S3 bucket
653
  *
788
  $return_metadata = $data;
789
  }
790
 
791
+ if ( is_wp_error( $data ) ) {
792
+ return $data;
793
+ }
794
+
795
  // Allow S3 upload to be hijacked / cancelled for any reason
796
  $pre = apply_filters( 'as3cf_pre_upload_attachment', false, $post_id, $data );
797
  if ( false !== $pre ) {
907
  $files_to_remove[] = $file_path;
908
  try {
909
  $s3client->putObject( $args );
910
+ } catch ( Exception $e ) {
 
911
  $error_msg = sprintf( __( 'Error uploading %s to S3: %s', 'amazon-s3-and-cloudfront' ), $file_path, $e->getMessage() );
912
 
913
  return $this->return_upload_error( $error_msg, $return_metadata );
921
  $file_paths = $this->get_attachment_file_paths( $post_id, true, $data );
922
  $additional_images = array();
923
 
924
+ $filesize_total = 0;
925
  $remove_local_files_setting = $this->get_setting( 'remove-local-file' );
926
 
927
  if ( $remove_local_files_setting ) {
961
 
962
  foreach ( $additional_images as $image ) {
963
  try {
964
+ $args = array_merge( $args, $image );
965
  $args['ACL'] = self::DEFAULT_ACL;
966
  $s3client->putObject( $args );
967
+ } catch ( Exception $e ) {
 
968
  AS3CF_Error::log( 'Error uploading ' . $args['SourceFile'] . ' to S3: ' . $e->getMessage() );
969
  }
970
  }
1415
  /**
1416
  * Return the scheme to be used in URLs
1417
  *
1418
+ * @param bool|null $use_ssl
1419
  *
1420
  * @return string
1421
  */
1422
+ function get_s3_url_scheme( $use_ssl = null ) {
1423
+ if ( $this->use_ssl( $use_ssl ) ) {
1424
  $scheme = 'https';
1425
+ } else {
 
1426
  $scheme = 'http';
1427
  }
1428
 
1432
  /**
1433
  * Determine when to use https in URLS
1434
  *
1435
+ * @param bool|null $use_ssl
1436
  *
1437
  * @return bool
1438
  */
1439
+ function use_ssl( $use_ssl = null ) {
1440
+ if ( is_ssl() ) {
1441
+ $use_ssl = true;
1442
+ }
1443
 
1444
+ if ( ! is_bool( $use_ssl ) ) {
1445
+ $use_ssl = $this->get_setting( 'force-https' );
1446
  }
1447
 
1448
+ if ( empty( $use_ssl ) ) {
1449
+ $use_ssl = false;
 
 
1450
  }
1451
 
1452
  return apply_filters( 'as3cf_use_ssl', $use_ssl );
1532
  $args['domain'] = $this->get_setting( 'domain' );
1533
  }
1534
 
1535
+ if ( ! isset( $args['force-https'] ) ) {
1536
+ $args['force-https'] = $this->get_setting( 'force-https' );
1537
  }
1538
 
1539
  $prefix = $this->get_s3_url_prefix( $region, $expires );
1545
  }
1546
 
1547
  $s3_domain = $cloudfront;
1548
+ } elseif ( 'virtual-host' === $args['domain'] ) {
 
1549
  $s3_domain = $bucket;
1550
+ } elseif ( 'path' === $args['domain'] || $this->use_ssl( $args['force-https'] ) ) {
 
1551
  $s3_domain = $prefix . '.amazonaws.com/' . $bucket;
1552
+ } else {
 
1553
  $s3_domain = $bucket . '.' . $prefix . '.amazonaws.com';
1554
  }
1555
 
1612
  if ( is_null( $meta ) ) {
1613
  $meta = get_post_meta( $post_id, '_wp_attachment_metadata', true );
1614
  }
1615
+
1616
+ if ( is_wp_error( $meta ) ) {
1617
+ return $meta;
1618
+ }
1619
+
1620
  if ( isset( $meta['sizes'][ $size ]['file'] ) ) {
1621
  $size_prefix = dirname( $s3object['key'] );
1622
  $size_file_prefix = ( '.' === $size_prefix ) ? '' : $size_prefix . '/';
1631
  $secure_url = $this->get_s3client( $region )->getObjectUrl( $s3object['bucket'], $s3object['key'], $expires, $headers );
1632
 
1633
  return apply_filters( 'as3cf_get_attachment_secure_url', $secure_url, $s3object, $post_id, $expires, $headers );
1634
+ } catch ( Exception $e ) {
 
1635
  return new WP_Error( 'exception', $e->getMessage() );
1636
  }
1637
  }
1638
 
1639
+ $s3object['key'] = $this->maybe_update_cloudfront_path( $s3object['key'] );
1640
+
1641
  $file = $this->encode_filename_in_path( $s3object['key'], $post_id );
1642
  $url = $scheme . '://' . $domain_bucket . '/' . $file;
1643
 
2409
  'save_bucket_error' => __( 'Error saving bucket', 'amazon-s3-and-cloudfront' ),
2410
  'get_buckets_error' => __( 'Error fetching buckets', 'amazon-s3-and-cloudfront' ),
2411
  'get_url_preview_error' => __( 'Error getting URL preview: ', 'amazon-s3-and-cloudfront' ),
2412
+ 'save_alert' => __( 'The changes you made will be lost if you navigate away from this page', 'amazon-s3-and-cloudfront' ),
2413
+ 'get_diagnostic_info' => __( 'Getting diagnostic info...', 'amazon-s3-and-cloudfront' ),
2414
+ 'get_diagnostic_info_error' => __( 'Error getting diagnostic info: ', 'amazon-s3-and-cloudfront' ),
2415
  ),
2416
  'nonces' => array(
2417
+ 'create_bucket' => wp_create_nonce( 'as3cf-create-bucket' ),
2418
+ 'manual_bucket' => wp_create_nonce( 'as3cf-manual-save-bucket' ),
2419
+ 'get_buckets' => wp_create_nonce( 'as3cf-get-buckets' ),
2420
+ 'save_bucket' => wp_create_nonce( 'as3cf-save-bucket' ),
2421
+ 'get_url_preview' => wp_create_nonce( 'as3cf-get-url-preview' ),
2422
+ 'get_diagnostic_info' => wp_create_nonce( 'as3cf-get-diagnostic-info' ),
2423
  ),
2424
  'is_pro' => $this->is_pro(),
2425
  'aws_bucket_link' => $this->get_aws_bucket_link(),
2450
  'copy-to-s3',
2451
  'serve-from-s3',
2452
  'remove-local-file',
2453
+ 'force-https',
2454
  'object-versioning',
2455
  'use-yearmonth-folders',
2456
  'enable-object-prefix',
2836
  * Diagnostic information for the support tab
2837
  *
2838
  * @param bool $escape
2839
+ *
2840
+ * @return string
2841
  */
2842
  function output_diagnostic_info( $escape = true ) {
2843
  global $table_prefix;
2844
  global $wpdb;
2845
 
2846
+ $output = 'site_url(): ';
2847
+ $output .= esc_html( site_url() );
2848
+ $output .= "\r\n";
2849
 
2850
+ $output .= 'home_url(): ';
2851
+ $output .= esc_html( home_url() );
2852
+ $output .= "\r\n";
2853
 
2854
+ $output .= 'Database Name: ';
2855
+ $output .= esc_html( $wpdb->dbname );
2856
+ $output .= "\r\n";
2857
 
2858
+ $output .= 'Table Prefix: ';
2859
+ $output .= esc_html( $table_prefix );
2860
+ $output .= "\r\n";
2861
 
2862
+ $output .= 'WordPress: ';
2863
+ $output .= get_bloginfo( 'version', 'display' );
2864
  if ( is_multisite() ) {
2865
+ $output .= ' Multisite';
2866
+ $output .= "\r\n";
2867
+ $output .= 'Multisite Site Count: ';
2868
+ $output .= esc_html( get_blog_count() );
2869
  }
2870
+ $output .= "\r\n";
2871
 
2872
+ $output .= 'Web Server: ';
2873
+ $output .= esc_html( ! empty( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '' );
2874
+ $output .= "\r\n";
2875
 
2876
+ $output .= 'PHP: ';
2877
  if ( function_exists( 'phpversion' ) ) {
2878
+ $output .= esc_html( phpversion() );
2879
  }
2880
+ $output .= "\r\n";
2881
 
2882
+ $output .= 'MySQL: ';
2883
+ $output .= esc_html( $wpdb->db_version() );
2884
+ $output .= "\r\n";
2885
 
2886
+ $output .= 'ext/mysqli: ';
2887
+ $output .= empty( $wpdb->use_mysqli ) ? 'no' : 'yes';
2888
+ $output .= "\r\n";
2889
 
2890
+ $output .= 'PHP Memory Limit: ';
2891
  if ( function_exists( 'ini_get' ) ) {
2892
+ $output .= esc_html( ini_get( 'memory_limit' ) );
2893
  }
2894
+ $output .= "\r\n";
2895
+
2896
+ $output .= 'WP Memory Limit: ';
2897
+ $output .= esc_html( WP_MEMORY_LIMIT );
2898
+ $output .= "\r\n";
2899
 
2900
+ $output .= 'Memory Usage: ';
2901
+ $output .= size_format( memory_get_usage( true ) );
2902
+ $output .= "\r\n";
2903
 
2904
+ $output .= 'Blocked External HTTP Requests: ';
2905
  if ( ! defined( 'WP_HTTP_BLOCK_EXTERNAL' ) || ! WP_HTTP_BLOCK_EXTERNAL ) {
2906
+ $output .= 'None';
2907
  } else {
2908
  $accessible_hosts = ( defined( 'WP_ACCESSIBLE_HOSTS' ) ) ? WP_ACCESSIBLE_HOSTS : '';
2909
 
2910
  if ( empty( $accessible_hosts ) ) {
2911
+ $output .= 'ALL';
2912
  } else {
2913
+ $output .= 'Partially (Accessible Hosts: ' . esc_html( $accessible_hosts ) . ')';
2914
  }
2915
  }
2916
+ $output .= "\r\n";
2917
 
2918
+ $output .= 'WP Locale: ';
2919
+ $output .= esc_html( get_locale() );
2920
+ $output .= "\r\n";
2921
 
2922
+ $output .= 'Organize uploads by month/year: ';
2923
+ $output .= esc_html( get_option( 'uploads_use_yearmonth_folders' ) ? 'Enabled' : 'Disabled' );
2924
+ $output .= "\r\n";
2925
 
2926
+ $output .= 'WP_DEBUG: ';
2927
+ $output .= esc_html( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? 'Yes' : 'No' );
2928
+ $output .= "\r\n";
2929
 
2930
+ $output .= 'WP_DEBUG_LOG: ';
2931
+ $output .= esc_html( ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? 'Yes' : 'No' );
2932
+ $output .= "\r\n";
2933
 
2934
+ $output .= 'WP_DEBUG_DISPLAY: ';
2935
+ $output .= esc_html( ( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY ) ? 'Yes' : 'No' );
2936
+ $output .= "\r\n";
2937
 
2938
+ $output .= 'SCRIPT_DEBUG: ';
2939
+ $output .= esc_html( ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? 'Yes' : 'No' );
2940
+ $output .= "\r\n";
2941
 
2942
+ $output .= 'WP Max Upload Size: ';
2943
+ $output .= esc_html( size_format( wp_max_upload_size() ) );
2944
+ $output .= "\r\n";
2945
 
2946
+ $output .= 'PHP Time Limit: ';
2947
  if ( function_exists( 'ini_get' ) ) {
2948
+ $output .= esc_html( ini_get( 'max_execution_time' ) );
2949
  }
2950
+ $output .= "\r\n";
2951
 
2952
+ $output .= 'PHP Error Log: ';
2953
  if ( function_exists( 'ini_get' ) ) {
2954
+ $output .= esc_html( ini_get( 'error_log' ) );
2955
  }
2956
+ $output .= "\r\n";
2957
 
2958
+ $output .= 'WP Cron: ';
2959
+ $output .= esc_html( ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? 'Disabled' : 'Enabled' );
2960
+ $output .= "\r\n";
2961
 
2962
+ $output .= 'fsockopen: ';
2963
  if ( function_exists( 'fsockopen' ) ) {
2964
+ $output .= 'Enabled';
2965
+ } else {
2966
+ $output .= 'Disabled';
2967
+ }
2968
+ $output .= "\r\n";
2969
+
2970
+ $output .= 'allow_url_fopen: ';
2971
+ $allow_url_fopen = ini_get( 'allow_url_fopen' );
2972
+ if ( empty( $allow_url_fopen ) ) {
2973
+ $output .= 'Disabled';
2974
  } else {
2975
+ $output .= 'Enabled';
2976
  }
2977
+ $output .= "\r\n";
2978
 
2979
+ $output .= 'OpenSSL: ';
2980
  if ( $this->open_ssl_enabled() ) {
2981
+ $output .= esc_html( OPENSSL_VERSION_TEXT );
2982
  } else {
2983
+ $output .= 'Disabled';
2984
  }
2985
+ $output .= "\r\n";
2986
 
2987
+ $output .= 'cURL: ';
2988
  if ( function_exists( 'curl_init' ) ) {
2989
+ $output .= 'Enabled';
2990
  } else {
2991
+ $output .= 'Disabled';
2992
  }
2993
+ $output .= "\r\n";
2994
 
2995
+ $output .= 'Zlib Compression: ';
2996
  if ( function_exists( 'gzcompress' ) ) {
2997
+ $output .= 'Enabled';
2998
  } else {
2999
+ $output .= 'Disabled';
3000
  }
3001
+ $output .= "\r\n";
3002
 
3003
+ $output .= 'PHP GD: ';
3004
  if ( $this->gd_enabled() ) {
3005
  $gd_info = gd_info();
3006
+ $output .= isset( $gd_info['GD Version'] ) ? esc_html( $gd_info['GD Version'] ) : 'Enabled';
3007
  } else {
3008
+ $output .= 'Disabled';
3009
  }
3010
+ $output .= "\r\n";
3011
 
3012
+ $output .= 'Imagick: ';
3013
  if ( $this->imagick_enabled() ) {
3014
+ $output .= 'Enabled';
3015
  } else {
3016
+ $output .= 'Disabled';
3017
  }
3018
+ $output .= "\r\n";
3019
+
3020
+ $output .= 'Basic Auth: ';
3021
+ if ( isset( $_SERVER['REMOTE_USER'] ) || isset( $_SERVER['PHP_AUTH_USER'] ) || isset( $_SERVER['REDIRECT_REMOTE_USER'] ) ) {
3022
+ $output .= 'Enabled';
3023
+ } else {
3024
+ $output .= 'Disabled';
3025
+ }
3026
+ $output .= "\r\n";
3027
+
3028
+ $output .= 'Proxy: ';
3029
+ if ( defined( 'WP_PROXY_HOST' ) || defined( 'WP_PROXY_PORT' ) ) {
3030
+ $output .= 'Enabled';
3031
+ } else {
3032
+ $output .= 'Disabled';
3033
+ }
3034
+ $output .= "\r\n\r\n";
3035
 
3036
  $media_counts = $this->diagnostic_media_counts();
3037
 
3038
+ $output .= 'Media Files: ';
3039
+ $output .= number_format_i18n( $media_counts['all'] );
3040
+ $output .= "\r\n";
3041
 
3042
+ $output .= 'Media Files on S3: ';
3043
+ $output .= number_format_i18n( $media_counts['s3'] );
3044
+ $output .= "\r\n";
3045
 
3046
+ $output .= 'Number of Image Sizes: ';
3047
  $sizes = count( get_intermediate_image_sizes() );
3048
+ $output .= number_format_i18n( $sizes );
3049
+ $output .= "\r\n\r\n";
3050
 
3051
+ $output .= 'Names and Dimensions of Image Sizes: ';
3052
+ $output .= "\r\n";
3053
  $size_details = $this->get_image_sizes_details();
3054
+ $output .= $size_details;
3055
+ $output .= "\r\n";
3056
 
3057
+ $output .= 'WP_CONTENT_DIR: ';
3058
+ $output .= esc_html( ( defined( 'WP_CONTENT_DIR' ) ) ? WP_CONTENT_DIR : 'Not defined' );
3059
+ $output .= "\r\n";
3060
 
3061
+ $output .= 'WP_CONTENT_URL: ';
3062
+ $output .= esc_html( ( defined( 'WP_CONTENT_URL' ) ) ? WP_CONTENT_URL : 'Not defined' );
3063
+ $output .= "\r\n";
3064
 
3065
+ $output .= 'UPLOADS: ';
3066
+ $output .= esc_html( ( defined( 'UPLOADS' ) ) ? UPLOADS : 'Not defined' );
3067
+ $output .= "\r\n";
3068
 
3069
+ $output .= 'WP_PLUGIN_DIR: ';
3070
+ $output .= esc_html( ( defined( 'WP_PLUGIN_DIR' ) ) ? WP_PLUGIN_DIR : 'Not defined' );
3071
+ $output .= "\r\n";
3072
 
3073
+ $output .= 'WP_PLUGIN_URL: ';
3074
+ $output .= esc_html( ( defined( 'WP_PLUGIN_URL' ) ) ? WP_PLUGIN_URL : 'Not defined' );
3075
+ $output .= "\r\n\r\n";
3076
 
3077
+ $output .= 'AWS_USE_EC2_IAM_ROLE: ';
3078
+ $output .= esc_html( ( defined( 'AWS_USE_EC2_IAM_ROLE' ) ) ? AWS_USE_EC2_IAM_ROLE : 'Not defined' );
3079
+ $output .= "\r\n";
3080
 
3081
+ $output .= 'AS3CF_BUCKET: ';
3082
+ $output .= esc_html( ( defined( 'AS3CF_BUCKET' ) ) ? AS3CF_BUCKET : 'Not defined' );
3083
+ $output .= "\r\n";
3084
 
3085
+ $output .= 'AS3CF_ASSETS_BUCKET: ';
3086
+ $output .= esc_html( ( defined( 'AS3CF_ASSETS_BUCKET' ) ) ? AS3CF_ASSETS_BUCKET : 'Not defined' );
3087
+ $output .= "\r\n";
3088
 
3089
+ $output .= 'AS3CF_REGION: ';
3090
+ $output .= esc_html( ( defined( 'AS3CF_REGION' ) ) ? AS3CF_REGION : 'Not defined' );
3091
+ $output .= "\r\n\r\n";
3092
 
3093
+ $output .= 'Bucket: ';
3094
+ $output .= $this->get_setting( 'bucket' );
3095
+ $output .= "\r\n";
3096
+ $output .= 'Region: ';
3097
  $region = $this->get_setting( 'region' );
3098
  if ( ! is_wp_error( $region ) ) {
3099
+ $output .= $region;
3100
+ }
3101
+ $output .= "\r\n";
3102
+ $output .= 'Copy Files to S3: ';
3103
+ $output .= $this->on_off( 'copy-to-s3' );
3104
+ $output .= "\r\n";
3105
+ $output .= 'Rewrite File URLs: ';
3106
+ $output .= $this->on_off( 'serve-from-s3' );
3107
+ $output .= "\r\n";
3108
+ $output .= "\r\n";
3109
+
3110
+ $output .= 'URL Preview: ';
3111
+ $output .= $this->get_url_preview( $escape );
3112
+ $output .= "\r\n";
3113
+ $output .= "\r\n";
3114
+
3115
+ $output .= 'Domain: ';
3116
+ $output .= $this->get_setting( 'domain' );
3117
+ $output .= "\r\n";
3118
+ $output .= 'Enable Path: ';
3119
+ $output .= $this->on_off( 'enable-object-prefix' );
3120
+ $output .= "\r\n";
3121
+ $output .= 'Custom Path: ';
3122
+ $output .= $this->get_setting( 'object-prefix' );
3123
+ $output .= "\r\n";
3124
+ $output .= 'Use Year/Month: ';
3125
+ $output .= $this->on_off( 'use-yearmonth-folders' );
3126
+ $output .= "\r\n";
3127
+ $output .= 'Force HTTPS: ';
3128
+ $output .= $this->on_off( 'force-https' );
3129
+ $output .= "\r\n";
3130
+ $output .= 'Remove Files From Server: ';
3131
+ $output .= $this->on_off( 'remove-local-file' );
3132
+ $output .= "\r\n";
3133
+ $output .= 'Object Versioning: ';
3134
+ $output .= $this->on_off( 'object-versioning' );
3135
+ $output .= "\r\n\r\n";
3136
+
3137
+ $output = apply_filters( 'as3cf_diagnostic_info', $output );
3138
  if ( has_action( 'as3cf_diagnostic_info' ) ) {
3139
+ $output .= "\r\n";
3140
  }
3141
 
3142
  $theme_info = wp_get_theme();
3143
+ $output .= "Active Theme Name: " . esc_html( $theme_info->get( 'Name' ) ) . "\r\n";
3144
+ $output .= "Active Theme Folder: " . esc_html( basename( $theme_info->get_stylesheet_directory() ) ) . "\r\n";
3145
  if ( $theme_info->get( 'Template' ) ) {
3146
+ $output .= "Parent Theme Folder: " . esc_html( $theme_info->get( 'Template' ) ) . "\r\n";
3147
  }
3148
  if ( ! file_exists( $theme_info->get_stylesheet_directory() ) ) {
3149
+ $output .= "WARNING: Active Theme Folder Not Found\r\n";
3150
  }
3151
 
3152
+ $output .= "\r\n";
3153
 
3154
+ $output .= "Active Plugins:\r\n";
3155
  $active_plugins = (array) get_option( 'active_plugins', array() );
3156
  $plugin_details = array();
3157
 
3158
  if ( is_multisite() ) {
3159
  $network_active_plugins = wp_get_active_network_plugins();
3160
+ $active_plugins = array_map( array( $this, 'remove_wp_plugin_dir' ), $network_active_plugins );
3161
  }
3162
 
3163
  foreach ( $active_plugins as $plugin ) {
3165
  }
3166
 
3167
  asort( $plugin_details );
3168
+ $output .= implode( '', $plugin_details );
3169
 
3170
  $mu_plugins = wp_get_mu_plugins();
3171
  if ( $mu_plugins ) {
3172
  $mu_plugin_details = array();
3173
+ $output .= "\r\n";
3174
+ $output .= "Must-use Plugins:\r\n";
3175
 
3176
  foreach ( $mu_plugins as $mu_plugin ) {
3177
  $mu_plugin_details[] = $this->get_plugin_details( $mu_plugin );
3178
  }
3179
 
3180
  asort( $mu_plugin_details );
3181
+ $output .= implode( '', $mu_plugin_details );
3182
  }
3183
+
3184
+ return $output;
3185
  }
3186
 
3187
  /**
3235
  */
3236
  function http_prepare_download_log() {
3237
  if ( isset( $_GET['as3cf-download-log'] ) && wp_verify_nonce( $_GET['nonce'], 'as3cf-download-log' ) ) {
3238
+ $log = $this->output_diagnostic_info( false );
 
 
3239
  $url = parse_url( home_url() );
3240
  $host = sanitize_file_name( $url['host'] );
3241
  $filename = sprintf( '%s-diagnostic-log-%s.txt', $host, date( 'YmdHis' ) );
3397
  $meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
3398
  }
3399
 
3400
+ if ( is_wp_error( $meta ) ) {
3401
+ return $paths;
3402
+ }
3403
+
3404
  $original_file = $file_path; // Not all attachments will have meta
3405
 
3406
  if ( isset( $meta['file'] ) ) {
3641
  }
3642
 
3643
  /**
3644
+ * Create a More Info campaign url for given url.
3645
  *
3646
  * @param string $url
3647
+ *
3648
+ * @return string
3649
+ */
3650
+ private function more_info_campaign_url( $url ) {
3651
+ $campaign = $this->is_pro() ? 'os3-pro-plugin' : 'os3-free-plugin';
3652
+ $url .= '?utm_source=insideplugin&utm_medium=web&utm_content=more-info&utm_campaign=' . $campaign;
3653
+
3654
+ return $url;
3655
+ }
3656
+
3657
+ /**
3658
+ * Create a site link for given url, link text and optional anchor, usually with campaign.
3659
+ *
3660
+ * TODO: Update *all* hardcoded https://deliciousbrains.com urls to use relative path
3661
+ * that this function then prepends with configured base URL.
3662
+ * https://github.com/deliciousbrains/wp-aws/issues/1291
3663
+ *
3664
+ * @param string $url
3665
+ * @param string $text
3666
+ * @param string $hash Optional anchor text.
3667
  * @param bool $append_campaign
3668
  *
3669
  * @return string
3670
  */
3671
+ public function dbrains_link( $url, $text, $hash = '', $append_campaign = true ) {
3672
  if ( $append_campaign ) {
3673
+ $url = $this->more_info_campaign_url( $url );
 
3674
  }
3675
 
3676
  if ( ! empty( $hash ) ) {
3677
  $url .= '#' . $hash;
3678
  }
3679
 
3680
+ return sprintf( '<a href="%s">%s</a>', esc_url( $url ), esc_html( $text ) );
3681
+ }
3682
+
3683
+ /**
3684
+ * More info link
3685
+ *
3686
+ * @param string $url
3687
+ * @param string $hash
3688
+ * @param bool $append_campaign
3689
+ *
3690
+ * @return string
3691
+ */
3692
+ public function more_info_link( $url, $hash = '', $append_campaign = true ) {
3693
+ $link = $this->dbrains_link( $url, __( 'More info', 'amazon-s3-and-cloudfront' ), $hash, $append_campaign );
3694
+
3695
+ return sprintf( '<span class="more-info">%s &raquo;</span>', $link );
3696
  }
3697
 
3698
  /**
3782
  );
3783
 
3784
  $doc_url = 'https://deliciousbrains.com/wp-offload-s3/doc/copy-hidpi-2x-images-support/';
3785
+ $doc_link = $this->dbrains_link( $doc_url, __( 'this doc' ) );
3786
 
3787
  $message = sprintf( '<strong>%s</strong> &mdash; ', __( 'WP Offload S3 Feature Removed', 'amazon-s3-and-cloudfront' ) );
3788
  $message .= sprintf( __( 'The "Copy HiDPI (@2x) Images" feature has been removed as of version 1.1 of WP Offload S3. It looks like you had this feature turned on. Please see %s for why we removed this feature and how you can continue copying @2x images to S3.', 'amazon-s3-and-cloudfront' ), $doc_link );
3789
 
3790
  $this->notices->add_notice( $message, $notice_args );
3791
  }
3792
+
3793
+ /**
3794
+ * Display a notice if using setting to force HTTP as url scheme, removed in 1.3.
3795
+ */
3796
+ protected function maybe_display_deprecated_http_notice() {
3797
+ if ( 'http' !== $this->get_setting( 'ssl', 'request' ) || ! $this->is_plugin_setup() ) {
3798
+ return;
3799
+ }
3800
+
3801
+ $notice_args = array(
3802
+ 'type' => 'notice-info',
3803
+ 'only_show_to_user' => false,
3804
+ 'flash' => false,
3805
+ );
3806
+
3807
+ $doc_url = 'https://deliciousbrains.com/wp-offload-s3/doc/force-http-setting/';
3808
+ $doc_link = $this->dbrains_link( $doc_url, __( 'this doc' ) );
3809
+
3810
+ $message = sprintf( '<strong>%s</strong> &mdash; ', __( 'WP Offload S3 Feature Removed', 'amazon-s3-and-cloudfront' ) );
3811
+ $message .= sprintf( __( 'You had the "Always non-SSL" option selected in your settings, but we\'ve removed this option in version 1.3. We\'ll now use HTTPS when the request is HTTPS and regular HTTP when the request is HTTP. This should work fine for your site, but please take a poke around and make sure things are working ok. See %s for more details on why we did this and how you can revert back to the old behavior.', 'amazon-s3-and-cloudfront' ), $doc_link );
3812
+
3813
+ $this->notices->add_notice( $message, $notice_args );
3814
+ }
3815
+
3816
+ /**
3817
+ * Potentially update path for CloudFront URLs.
3818
+ *
3819
+ * @param string $path
3820
+ *
3821
+ * @return string
3822
+ */
3823
+ public function maybe_update_cloudfront_path( $path ) {
3824
+ if ( 'cloudfront' === $this->get_setting( 'domain' ) ) {
3825
+ $path_parts = apply_filters( 'as3cf_cloudfront_path_parts', explode( '/', $path ), $this->get_setting( 'cloudfront' ) );
3826
+
3827
+ if ( ! empty( $path_parts ) ) {
3828
+ $path = implode( '/', $path_parts );
3829
+ }
3830
+ }
3831
+
3832
+ return $path;
3833
+ }
3834
  }
classes/as3cf-notices.php CHANGED
@@ -82,6 +82,7 @@ class AS3CF_Notices {
82
  'class' => '', // Extra classes for the notice
83
  'show_callback' => false, // Callback to display extra info on notices. Passing a callback automatically handles show/hide toggle.
84
  'callback_args' => array(), // Arguments to pass to the callback.
 
85
  );
86
 
87
  $notice = array_intersect_key( array_merge( $defaults, $args ), $defaults );
@@ -92,7 +93,7 @@ class AS3CF_Notices {
92
  if ( $notice['custom_id'] ) {
93
  $notice['id'] = $notice['custom_id'];
94
  } else {
95
- $notice['id'] = apply_filters( 'as3cf_notice_id_prefix', 'as3cf-notice-' ) . sha1( $notice['message'] );
96
  }
97
 
98
  if ( isset( $notice['only_show_on_tab'] ) && false !== $notice['only_show_on_tab'] ) {
@@ -377,6 +378,10 @@ class AS3CF_Notices {
377
  return;
378
  }
379
 
 
 
 
 
380
  if ( 'info' === $notice['type'] ) {
381
  $notice['type'] = 'notice-info';
382
  }
@@ -424,7 +429,10 @@ class AS3CF_Notices {
424
  $version = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'];
425
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
426
 
427
- // Enqueue notice.js globally as notices can be dismissed on any admin page
 
 
 
428
  $src = plugins_url( 'assets/js/notice' . $suffix . '.js', $this->plugin_file_path );
429
  wp_enqueue_script( 'as3cf-notice', $src, array( 'jquery' ), $version, true );
430
 
82
  'class' => '', // Extra classes for the notice
83
  'show_callback' => false, // Callback to display extra info on notices. Passing a callback automatically handles show/hide toggle.
84
  'callback_args' => array(), // Arguments to pass to the callback.
85
+ 'lock_key' => '', // If lock key set, do not show message until lock released.
86
  );
87
 
88
  $notice = array_intersect_key( array_merge( $defaults, $args ), $defaults );
93
  if ( $notice['custom_id'] ) {
94
  $notice['id'] = $notice['custom_id'];
95
  } else {
96
+ $notice['id'] = apply_filters( 'as3cf_notice_id_prefix', 'as3cf-notice-' ) . sha1( trim( $notice['message'] ) . trim( $notice['lock_key'] ) );
97
  }
98
 
99
  if ( isset( $notice['only_show_on_tab'] ) && false !== $notice['only_show_on_tab'] ) {
378
  return;
379
  }
380
 
381
+ if ( ! empty( $notice['lock_key'] ) && class_exists( 'AS3CF_Tool' ) && AS3CF_Tool::lock_key_exists( $notice['lock_key'] ) ) {
382
+ return;
383
+ }
384
+
385
  if ( 'info' === $notice['type'] ) {
386
  $notice['type'] = 'notice-info';
387
  }
429
  $version = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'];
430
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
431
 
432
+ // Enqueue notice.css & notice.js globally as some notices can be shown & dismissed on any admin page.
433
+ $src = plugins_url( 'assets/css/notice.css', $this->plugin_file_path );
434
+ wp_enqueue_style( 'as3cf-notice', $src, array(), $version );
435
+
436
  $src = plugins_url( 'assets/js/notice' . $suffix . '.js', $this->plugin_file_path );
437
  wp_enqueue_script( 'as3cf-notice', $src, array( 'jquery' ), $version, true );
438
 
languages/amazon-s3-and-cloudfront-en.pot CHANGED
@@ -1,6 +1,6 @@
1
  # SOME DESCRIPTIVE TITLE.
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
  #
6
  #, fuzzy
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
- "POT-Creation-Date: 2016-03-23 14:05+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,127 +17,135 @@ msgstr ""
17
  "Content-Type: text/plain; charset=UTF-8\n"
18
  "Content-Transfer-Encoding: 8bit\n"
19
 
20
- #: classes/amazon-s3-and-cloudfront.php:101
21
  msgid "Offload S3 Lite"
22
  msgstr ""
23
 
24
- #: classes/amazon-s3-and-cloudfront.php:102
25
  msgid "S3 and CloudFront"
26
  msgstr ""
27
 
28
- #: classes/amazon-s3-and-cloudfront.php:195
29
- #: view/bucket-setting.php:18
30
  msgid "defined in wp-config.php"
31
  msgstr ""
32
 
33
- #: classes/amazon-s3-and-cloudfront.php:769
34
  msgid "Upload aborted by filter 'as3cf_pre_upload_attachment'"
35
  msgstr ""
36
 
37
- #: classes/amazon-s3-and-cloudfront.php:780
38
  #, php-format
39
  msgid "File %s does not exist"
40
  msgstr ""
41
 
42
- #: classes/amazon-s3-and-cloudfront.php:791
43
  #, php-format
44
  msgid "Mime type %s is not allowed"
45
  msgstr ""
46
 
47
- #: classes/amazon-s3-and-cloudfront.php:878
48
  #, php-format
49
  msgid "Error uploading %s to S3: %s"
50
  msgstr ""
51
 
52
- #: classes/amazon-s3-and-cloudfront.php:1866
53
  msgid "Cheatin&#8217; eh?"
54
  msgstr ""
55
 
56
- #: classes/amazon-s3-and-cloudfront.php:1870
57
  msgid "You do not have sufficient permissions to access this page."
58
  msgstr ""
59
 
60
- #: classes/amazon-s3-and-cloudfront.php:1876
61
  msgid "No bucket name provided."
62
  msgstr ""
63
 
64
- #: classes/amazon-s3-and-cloudfront.php:2161
65
  msgid "Error Getting Bucket Region"
66
  msgstr ""
67
 
68
- #: classes/amazon-s3-and-cloudfront.php:2162
69
  #, php-format
70
  msgid "There was an error attempting to get the region of the bucket %s: %s"
71
  msgstr ""
72
 
73
- #: classes/amazon-s3-and-cloudfront.php:2282
74
  msgid ""
75
  "This is a test file to check if the user has write permission to S3. Delete "
76
  "me if found."
77
  msgstr ""
78
 
79
- #: classes/amazon-s3-and-cloudfront.php:2314
80
  #, php-format
81
  msgid ""
82
  "There was an error attempting to check the permissions of the bucket %s: %s"
83
  msgstr ""
84
 
85
- #: classes/amazon-s3-and-cloudfront.php:2371
86
  msgid "Error creating bucket"
87
  msgstr ""
88
 
89
- #: classes/amazon-s3-and-cloudfront.php:2372
90
  msgid "Bucket name too short."
91
  msgstr ""
92
 
93
- #: classes/amazon-s3-and-cloudfront.php:2373
94
  msgid "Bucket name too long."
95
  msgstr ""
96
 
97
- #: classes/amazon-s3-and-cloudfront.php:2374
98
  msgid ""
99
  "Invalid character. Bucket names can contain lowercase letters, numbers, "
100
  "periods and hyphens."
101
  msgstr ""
102
 
103
- #: classes/amazon-s3-and-cloudfront.php:2375
104
  msgid "Error saving bucket"
105
  msgstr ""
106
 
107
- #: classes/amazon-s3-and-cloudfront.php:2376
108
  msgid "Error fetching buckets"
109
  msgstr ""
110
 
111
- #: classes/amazon-s3-and-cloudfront.php:2377
112
  msgid "Error getting URL preview: "
113
  msgstr ""
114
 
115
- #: classes/amazon-s3-and-cloudfront.php:2378
116
  msgid "The changes you made will be lost if you navigate away from this page"
117
  msgstr ""
118
 
119
- #: classes/amazon-s3-and-cloudfront.php:2436
 
 
 
 
 
 
 
 
120
  msgid "Cheatin' eh?"
121
  msgstr ""
122
 
123
- #: classes/amazon-s3-and-cloudfront.php:2539
124
  msgctxt "Show the media library tab"
125
  msgid "Media Library"
126
  msgstr ""
127
 
128
- #: classes/amazon-s3-and-cloudfront.php:2540
129
  msgctxt "Show the support tab"
130
  msgid "Support"
131
  msgstr ""
132
 
133
- #: classes/amazon-s3-and-cloudfront.php:2744
134
  #, php-format
135
  msgid ""
136
  "<strong>WP Offload S3</strong> &mdash; The file %s has been given %s "
137
  "permissions on Amazon S3."
138
  msgstr ""
139
 
140
- #: classes/amazon-s3-and-cloudfront.php:2763
141
  msgid ""
142
  "<strong>WP Offload S3 Requirement Missing</strong> &mdash; Looks like you "
143
  "don't have an image manipulation library installed on this server and "
@@ -145,11 +153,11 @@ msgid ""
145
  "Please setup GD or ImageMagick."
146
  msgstr ""
147
 
148
- #: classes/amazon-s3-and-cloudfront.php:3388
149
  msgid "Quick Start Guide"
150
  msgstr ""
151
 
152
- #: classes/amazon-s3-and-cloudfront.php:3390
153
  #, php-format
154
  msgid ""
155
  "Looks like we don't have write access to this bucket. It's likely that the "
@@ -158,7 +166,7 @@ msgid ""
158
  "correctly."
159
  msgstr ""
160
 
161
- #: classes/amazon-s3-and-cloudfront.php:3392
162
  #, php-format
163
  msgid ""
164
  "Looks like we don't have access to the buckets. It's likely that the user "
@@ -166,39 +174,41 @@ msgid ""
166
  "Please see our %s for instructions on setting up permissions correctly."
167
  msgstr ""
168
 
169
- #: classes/amazon-s3-and-cloudfront.php:3543
170
  msgid "WP Offload S3 Activation"
171
  msgstr ""
172
 
173
- #: classes/amazon-s3-and-cloudfront.php:3544
174
  msgid ""
175
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
176
  "automatically deactivated WP Offload S3 Lite."
177
  msgstr ""
178
 
179
- #: classes/amazon-s3-and-cloudfront.php:3546
180
  msgid "WP Offload S3 Lite Activation"
181
  msgstr ""
182
 
183
- #: classes/amazon-s3-and-cloudfront.php:3547
184
  msgid ""
185
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
186
  "automatically deactivated WP Offload S3."
187
  msgstr ""
188
 
189
- #: classes/amazon-s3-and-cloudfront.php:3590
190
  msgid "More info"
191
  msgstr ""
192
 
193
- #: classes/amazon-s3-and-cloudfront.php:3680
 
194
  msgid "this doc"
195
  msgstr ""
196
 
197
- #: classes/amazon-s3-and-cloudfront.php:3682
 
198
  msgid "WP Offload S3 Feature Removed"
199
  msgstr ""
200
 
201
- #: classes/amazon-s3-and-cloudfront.php:3683
202
  #, php-format
203
  msgid ""
204
  "The \"Copy HiDPI (@2x) Images\" feature has been removed as of version 1.1 "
@@ -207,23 +217,34 @@ msgid ""
207
  "images to S3."
208
  msgstr ""
209
 
210
- #: classes/as3cf-notices.php:433
 
 
 
 
 
 
 
 
 
 
 
211
  msgid "Error dismissing notice."
212
  msgstr ""
213
 
214
- #: classes/as3cf-notices.php:448
215
  msgid "Invalid notice ID."
216
  msgstr ""
217
 
218
- #: classes/as3cf-plugin-compatibility.php:202
219
  msgid "WP Offload S3 Compatibility Addons"
220
  msgstr ""
221
 
222
- #: classes/as3cf-plugin-compatibility.php:204
223
  msgid "compatibility addons"
224
  msgstr ""
225
 
226
- #: classes/as3cf-plugin-compatibility.php:205
227
  #, php-format
228
  msgid ""
229
  "To get WP Offload S3 to work with certain 3rd party plugins, you might need "
@@ -232,7 +253,7 @@ msgid ""
232
  "about each addon to determine if you need it or not."
233
  msgstr ""
234
 
235
- #: classes/as3cf-plugin-compatibility.php:211
236
  #, php-format
237
  msgid ""
238
  "You will need to purchase a license to get access to these addons. If you're "
@@ -240,23 +261,23 @@ msgid ""
240
  "to %s."
241
  msgstr ""
242
 
243
- #: classes/as3cf-plugin-compatibility.php:212
244
  msgid "View Licenses"
245
  msgstr ""
246
 
247
- #: classes/as3cf-plugin-compatibility.php:667
248
  #, php-format
249
  msgid "The local directory %s does not exist and could not be created."
250
  msgstr ""
251
 
252
- #: classes/as3cf-plugin-compatibility.php:668
253
- #: classes/as3cf-plugin-compatibility.php:682
254
- #: classes/upgrades/as3cf-meta-wp-error.php:72
255
  #, php-format
256
  msgid "There was an error attempting to download the file %s from S3: %s"
257
  msgstr ""
258
 
259
- #: classes/as3cf-upgrade.php:283
260
  #, php-format
261
  msgid ""
262
  "<strong>Running %s Update</strong> &mdash; We&#8217;re going through all the "
@@ -266,22 +287,22 @@ msgid ""
266
  "performance."
267
  msgstr ""
268
 
269
- #: classes/as3cf-upgrade.php:284
270
  msgid "Pause Update"
271
  msgstr ""
272
 
273
- #: classes/as3cf-upgrade.php:288
274
  #, php-format
275
  msgid ""
276
  "<strong>%s Update Paused</strong> &mdash; Updating Media Library %s has been "
277
  "paused."
278
  msgstr ""
279
 
280
- #: classes/as3cf-upgrade.php:289
281
  msgid "Restart Update"
282
  msgstr ""
283
 
284
- #: classes/as3cf-upgrade.php:292
285
  #, php-format
286
  msgid ""
287
  "<strong>Error Updating %s</strong> &mdash; We ran into some errors "
@@ -289,454 +310,428 @@ msgid ""
289
  "uploaded to S3. Please check your error log for details. (#%d)"
290
  msgstr ""
291
 
292
- #: classes/as3cf-upgrade.php:293
293
  msgid "Try Run It Again"
294
  msgstr ""
295
 
296
- #: classes/as3cf-upgrade.php:408
297
  #, php-format
298
  msgid "Every %d Minutes"
299
  msgstr ""
300
 
301
- #: classes/upgrades/as3cf-file-sizes.php:37
302
  msgid ""
303
  "and updating the metadata with the sizes of files that have been removed "
304
  "from the server. This will allow us to serve the correct size for media "
305
  "items and the total space used in Multisite subsites."
306
  msgstr ""
307
 
308
- #: classes/upgrades/as3cf-meta-wp-error.php:38
309
  msgid ""
310
  "and rebuilding the metadata for attachments that may have been corrupted."
311
  msgstr ""
312
 
313
- #: classes/upgrades/as3cf-region-meta.php:36
314
  msgid ""
315
  "and updating the metadata with the bucket region it is served from. This "
316
  "will allow us to serve your files from the proper S3 region subdomain <span "
317
  "style=\"white-space:nowrap;\">(e.g. s3-us-west-2.amazonaws.com)</span>."
318
  msgstr ""
319
 
320
- #: classes/wp-aws-compatibility-check.php:323
321
  msgid "deactivate"
322
  msgstr ""
323
 
324
- #: classes/wp-aws-compatibility-check.php:324
325
  #, php-format
326
  msgid "You can %s the %s plugin to get rid of this notice."
327
  msgstr ""
328
 
329
- #: classes/wp-aws-compatibility-check.php:327
330
  #, php-format
331
  msgid "%s has been disabled as it requires the %s plugin."
332
  msgstr ""
333
 
334
- #: classes/wp-aws-compatibility-check.php:331
335
  msgid "which is currently disabled."
336
  msgstr ""
337
 
338
- #: classes/wp-aws-compatibility-check.php:333
339
  msgid "It appears to be installed already."
340
  msgstr ""
341
 
342
- #: classes/wp-aws-compatibility-check.php:335
343
  msgctxt "Activate plugin"
344
  msgid "Activate it now."
345
  msgstr ""
346
 
347
- #: classes/wp-aws-compatibility-check.php:342
348
  #, php-format
349
  msgid "<a href=\"%s\">Install</a> and activate it."
350
  msgstr ""
351
 
352
- #: classes/wp-aws-compatibility-check.php:353
353
  #, php-format
354
  msgid ""
355
  "%s has been disabled as it requires version %s or later of the %s plugin."
356
  msgstr ""
357
 
358
- #: classes/wp-aws-compatibility-check.php:356
359
  #, php-format
360
  msgid "You currently have version %s installed."
361
  msgstr ""
362
 
363
- #: classes/wp-aws-compatibility-check.php:363
364
- #: classes/wp-aws-compatibility-check.php:401
365
  #, php-format
366
  msgid "A valid license for %s is required to update."
367
  msgstr ""
368
 
369
- #: classes/wp-aws-compatibility-check.php:371
370
  msgid "Update to the latest version"
371
  msgstr ""
372
 
373
- #: classes/wp-aws-compatibility-check.php:383
374
  #, php-format
375
  msgid ""
376
  "%1$s has been disabled because it is not a supported addon of the %2$s "
377
  "plugin."
378
  msgstr ""
379
 
380
- #: classes/wp-aws-compatibility-check.php:392
381
  #, php-format
382
  msgid ""
383
  "%1$s has been disabled because it will not work with the version of the %2$s "
384
  "plugin installed. %1$s %3$s or later is required."
385
  msgstr ""
386
 
387
- #: classes/wp-aws-compatibility-check.php:395
388
  #, php-format
389
  msgid "Update %s to the latest version"
390
  msgstr ""
391
 
392
- #: classes/wp-aws-compatibility-check.php:464
393
  #, php-format
394
  msgid "The %s plugin has been deactivated."
395
  msgstr ""
396
 
397
- #: view/bucket-select.php:3
398
  msgid "Change bucket"
399
  msgstr ""
400
 
401
- #: view/bucket-select.php:3
402
  msgid "What bucket would you like to use?"
403
  msgstr ""
404
 
405
- #: view/bucket-select.php:5
406
  msgid "Existing bucket name"
407
  msgstr ""
408
 
409
- #: view/bucket-select.php:7
410
- #: view/bucket-select.php:12
411
  msgid "Saving..."
412
  msgstr ""
413
 
414
- #: view/bucket-select.php:7
415
- #: view/bucket-select.php:12
416
  msgid "Save Bucket"
417
  msgstr ""
418
 
419
- #: view/bucket-select.php:8
420
  msgid "Browse existing buckets"
421
  msgstr ""
422
 
423
- #: view/bucket-select.php:9
424
- #: view/bucket-select.php:26
425
- #: view/bucket-select.php:31
426
  msgid "Create new bucket"
427
  msgstr ""
428
 
429
- #: view/bucket-select.php:13
430
- #: view/bucket-select.php:21
431
- #: view/bucket-select.php:67
432
  msgid "Cancel"
433
  msgstr ""
434
 
435
- #: view/bucket-select.php:18
436
  msgid "Select bucket"
437
  msgstr ""
438
 
439
- #: view/bucket-select.php:19
440
  msgid "Loading..."
441
  msgstr ""
442
 
443
- #: view/bucket-select.php:22
444
- #: view/bucket-select.php:27
445
  msgid "Refresh"
446
  msgstr ""
447
 
448
- #: view/bucket-select.php:25
449
  msgid "Enter bucket name"
450
  msgstr ""
451
 
452
- #: view/bucket-select.php:37
453
  msgid "Bucket Name:"
454
  msgstr ""
455
 
456
- #: view/bucket-select.php:40
457
  msgid "Bucket Name"
458
  msgstr ""
459
 
460
- #: view/bucket-select.php:46
461
  msgid "Region:"
462
  msgstr ""
463
 
464
- #: view/bucket-select.php:60
465
  #, php-format
466
  msgid "%s (defined in wp-config.php)"
467
  msgstr ""
468
 
469
- #: view/bucket-select.php:66
470
  msgid "Creating..."
471
  msgstr ""
472
 
473
- #: view/bucket-select.php:66
474
  msgid "Create New Bucket"
475
  msgstr ""
476
 
477
- #: view/bucket-setting.php:7
478
  msgid "Bucket"
479
  msgstr ""
480
 
481
- #: view/bucket-setting.php:12
482
  msgid "View in S3 console"
483
  msgstr ""
484
 
485
- #: view/bucket-setting.php:16
486
  msgid "Change"
487
  msgstr ""
488
 
489
- #: view/cloudfront-setting.php:4
490
- #: view/deprecated-domain-setting.php:49
491
  msgid "Invalid character. Letters, numbers, periods and hyphens are allowed."
492
  msgstr ""
493
 
494
- #: view/debug-info.php:2
495
  msgid "Diagnostic Info"
496
  msgstr ""
497
 
498
- #: view/debug-info.php:11
499
  msgctxt "Download to your computer"
500
  msgid "Download"
501
  msgstr ""
502
 
503
- #: view/deprecated-domain-setting.php:5
504
  msgid "Domain:"
505
  msgstr ""
506
 
507
- #: view/deprecated-domain-setting.php:30
508
  msgid "Bucket name as subdomain"
509
  msgstr ""
510
 
511
- #: view/deprecated-domain-setting.php:35
512
  msgid "Bucket name in path"
513
  msgstr ""
514
 
515
- #: view/deprecated-domain-setting.php:40
516
  msgid "Bucket name as domain"
517
  msgstr ""
518
 
519
- #: view/deprecated-domain-setting.php:45
520
  msgid "CloudFront or custom domain"
521
  msgstr ""
522
 
523
- #: view/domain-setting.php:19
524
  msgid "CloudFront or Custom Domain"
525
  msgstr ""
526
 
527
- #: view/domain-setting.php:21
528
  msgid ""
529
  "Replace the default S3 domain and path with your CloudFront domain or any "
530
  "domain."
531
  msgstr ""
532
 
533
- #: view/error-access.php:4
534
  msgid "Access Denied to Bucket"
535
  msgstr ""
536
 
537
- #: view/notice.php:18
538
  msgid "Hide"
539
  msgstr ""
540
 
541
- #: view/notice.php:18
542
  msgid "Show"
543
  msgstr ""
544
 
545
- #: view/settings.php:10
546
  msgid "Settings saved."
547
  msgstr ""
548
 
549
- #: view/settings.php:48
550
  msgid "Enable/Disable the Plugin"
551
  msgstr ""
552
 
553
- #: view/settings.php:56
554
  msgid "Copy Files to S3"
555
  msgstr ""
556
 
557
- #: view/settings.php:58
558
  msgid ""
559
  "When a file is uploaded to the Media Library, copy it to S3. Existing files "
560
  "are <em>not</em> copied to S3."
561
  msgstr ""
562
 
563
- #: view/settings.php:71
564
  msgid "Rewrite File URLs"
565
  msgstr ""
566
 
567
- #: view/settings.php:73
568
  msgid ""
569
  "For Media Library files that have been copied to S3, rewrite the URLs so "
570
  "that they are served from S3/CloudFront instead of your server."
571
  msgstr ""
572
 
573
- #: view/settings.php:80
574
  msgid "Configure File URLs"
575
  msgstr ""
576
 
577
- #: view/settings.php:101
578
  msgid "Path"
579
  msgstr ""
580
 
581
- #: view/settings.php:103
582
  msgid "By default the path is the same as your local WordPress files."
583
  msgstr ""
584
 
585
- #: view/settings.php:127
586
  msgid "Year/Month"
587
  msgstr ""
588
 
589
- #: view/settings.php:129
590
  msgid "Add the Year/Month in the URL."
591
  msgstr ""
592
 
593
- #: view/settings.php:138
594
- msgid "SSL"
595
- msgstr ""
596
-
597
- #: view/settings.php:142
598
- msgid "Controls the protocol of the S3 URLs."
599
- msgstr ""
600
-
601
- #: view/settings.php:152
602
- msgid "Same as request"
603
- msgstr ""
604
-
605
- #: view/settings.php:153
606
- msgid "When the request is https://, use https:// for the file URL as well."
607
  msgstr ""
608
 
609
- #: view/settings.php:157
610
- msgid "Always SSL"
611
- msgstr ""
612
-
613
- #: view/settings.php:158
614
- msgid "Forces https:// to be used."
615
- msgstr ""
616
-
617
- #: view/settings.php:160
618
  msgid ""
619
- "You cannot use the \"Bucket as a subdomain\" domain option when using SSL."
620
- msgstr ""
621
-
622
- #: view/settings.php:165
623
- msgid "Always non-SSL"
624
- msgstr ""
625
-
626
- #: view/settings.php:166
627
- msgid "Forces http:// to be used."
628
  msgstr ""
629
 
630
- #: view/settings.php:172
631
  msgid "Advanced Options"
632
  msgstr ""
633
 
634
- #: view/settings.php:181
635
  msgid "Remove Files From Server"
636
  msgstr ""
637
 
638
- #: view/settings.php:182
639
  msgid "Once a file has been copied to S3, remove it from the local server."
640
  msgstr ""
641
 
642
- #: view/settings.php:186
643
  msgid ""
644
  "<strong>Broken URLs</strong> &mdash; There will be broken URLs for files "
645
  "that don't exist locally. You can fix this by enabling <strong>Rewrite File "
646
  "URLs</strong> to use the S3 URLs."
647
  msgstr ""
648
 
649
- #: view/settings.php:197
650
  #, php-format
651
  msgid ""
652
  "<strong>Warning</strong> &mdash; Some plugins depend on the file being "
653
  "present on the local server and may not work when the file is removed. %s"
654
  msgstr ""
655
 
656
- #: view/settings.php:215
657
  msgid "Object Versioning"
658
  msgstr ""
659
 
660
- #: view/settings.php:217
661
  msgid ""
662
  "Append a timestamp to the S3 file path. Recommended when using CloudFront so "
663
  "you don't have to worry about cache invalidation."
664
  msgstr ""
665
 
666
- #: view/settings.php:224
667
  msgid "Save Changes"
668
  msgstr ""
669
 
670
- #: view/sidebar.php:10
671
  msgid "Upload existing Media Library to S3"
672
  msgstr ""
673
 
674
- #: view/sidebar.php:11
675
  msgid "Find & replace file URLs in content"
676
  msgstr ""
677
 
678
- #: view/sidebar.php:12
679
  msgid "Manage S3 files in WordPress"
680
  msgstr ""
681
 
682
- #: view/sidebar.php:13
683
  msgid "Assets addon - Serve your CSS & JS from S3/CloudFront"
684
  msgstr ""
685
 
686
- #: view/sidebar.php:14
687
  msgid "WooCommerce addon"
688
  msgstr ""
689
 
690
- #: view/sidebar.php:15
691
  msgid "Easy Digital Downloads addon"
692
  msgstr ""
693
 
694
- #: view/sidebar.php:16
695
  msgid "PriorityExpert™ email support"
696
  msgstr ""
697
 
698
- #: view/sidebar.php:19
699
  msgid "Visit deliciousbrains.com &rarr;"
700
  msgstr ""
701
 
702
- #: view/sidebar.php:26
703
  msgid "Get 20% Off!"
704
  msgstr ""
705
 
706
- #: view/sidebar.php:29
707
  #, php-format
708
  msgid ""
709
  "Submit your name and email and we’ll send you a coupon for 20% off your "
710
  "upgrade."
711
  msgstr ""
712
 
713
- #: view/sidebar.php:33
714
  msgid "Your Email"
715
  msgstr ""
716
 
717
- #: view/sidebar.php:37
718
  msgid "First Name"
719
  msgstr ""
720
 
721
- #: view/sidebar.php:41
722
  msgid "Last Name"
723
  msgstr ""
724
 
725
- #: view/sidebar.php:48
726
  msgid "Send me the coupon"
727
  msgstr ""
728
 
729
- #: view/sidebar.php:52
730
  msgid ""
731
  "We promise we will not use your email for anything else and you can "
732
  "unsubscribe with 1-click anytime."
733
  msgstr ""
734
 
735
- #: view/wordpress-org-support.php:2
736
  msgid "As this is a free plugin, we do not provide support."
737
  msgstr ""
738
 
739
- #: view/wordpress-org-support.php:4
740
  #, php-format
741
  msgid ""
742
  "You may ask the WordPress community for help by posting to the <a href=\"%s"
@@ -744,14 +739,14 @@ msgid ""
744
  "to a few weeks and will likely be from a non-developer."
745
  msgstr ""
746
 
747
- #: view/wordpress-org-support.php:6
748
  #, php-format
749
  msgid ""
750
  "If you want a <strong>timely response via email from a developer</strong> "
751
  "who works on this plugin, <a href=\"%s\">upgrade</a> and send us an email."
752
  msgstr ""
753
 
754
- #: view/wordpress-org-support.php:8
755
  #, php-format
756
  msgid ""
757
  "If you've found a bug, please <a href=\"%s\">submit an issue on GitHub</a>."
1
  # SOME DESCRIPTIVE TITLE.
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the amazon-s3-and-cloudfront package.
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
  #
6
  #, fuzzy
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
+ "POT-Creation-Date: 2016-05-30 12:56+0100\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"
17
  "Content-Type: text/plain; charset=UTF-8\n"
18
  "Content-Transfer-Encoding: 8bit\n"
19
 
20
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:101
21
  msgid "Offload S3 Lite"
22
  msgstr ""
23
 
24
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:102
25
  msgid "S3 and CloudFront"
26
  msgstr ""
27
 
28
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:196
29
+ #: builds/amazon-s3-and-cloudfront/view/bucket-setting.php:18
30
  msgid "defined in wp-config.php"
31
  msgstr ""
32
 
33
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:803
34
  msgid "Upload aborted by filter 'as3cf_pre_upload_attachment'"
35
  msgstr ""
36
 
37
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:814
38
  #, php-format
39
  msgid "File %s does not exist"
40
  msgstr ""
41
 
42
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:825
43
  #, php-format
44
  msgid "Mime type %s is not allowed"
45
  msgstr ""
46
 
47
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:911
48
  #, php-format
49
  msgid "Error uploading %s to S3: %s"
50
  msgstr ""
51
 
52
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1900
53
  msgid "Cheatin&#8217; eh?"
54
  msgstr ""
55
 
56
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1904
57
  msgid "You do not have sufficient permissions to access this page."
58
  msgstr ""
59
 
60
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:1910
61
  msgid "No bucket name provided."
62
  msgstr ""
63
 
64
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2195
65
  msgid "Error Getting Bucket Region"
66
  msgstr ""
67
 
68
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2196
69
  #, php-format
70
  msgid "There was an error attempting to get the region of the bucket %s: %s"
71
  msgstr ""
72
 
73
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2316
74
  msgid ""
75
  "This is a test file to check if the user has write permission to S3. Delete "
76
  "me if found."
77
  msgstr ""
78
 
79
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2348
80
  #, php-format
81
  msgid ""
82
  "There was an error attempting to check the permissions of the bucket %s: %s"
83
  msgstr ""
84
 
85
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2405
86
  msgid "Error creating bucket"
87
  msgstr ""
88
 
89
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2406
90
  msgid "Bucket name too short."
91
  msgstr ""
92
 
93
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2407
94
  msgid "Bucket name too long."
95
  msgstr ""
96
 
97
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2408
98
  msgid ""
99
  "Invalid character. Bucket names can contain lowercase letters, numbers, "
100
  "periods and hyphens."
101
  msgstr ""
102
 
103
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2409
104
  msgid "Error saving bucket"
105
  msgstr ""
106
 
107
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2410
108
  msgid "Error fetching buckets"
109
  msgstr ""
110
 
111
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2411
112
  msgid "Error getting URL preview: "
113
  msgstr ""
114
 
115
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2412
116
  msgid "The changes you made will be lost if you navigate away from this page"
117
  msgstr ""
118
 
119
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2413
120
+ msgid "Getting diagnostic info..."
121
+ msgstr ""
122
+
123
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2414
124
+ msgid "Error getting diagnostic info: "
125
+ msgstr ""
126
+
127
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2473
128
  msgid "Cheatin' eh?"
129
  msgstr ""
130
 
131
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2576
132
  msgctxt "Show the media library tab"
133
  msgid "Media Library"
134
  msgstr ""
135
 
136
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2577
137
  msgctxt "Show the support tab"
138
  msgid "Support"
139
  msgstr ""
140
 
141
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2781
142
  #, php-format
143
  msgid ""
144
  "<strong>WP Offload S3</strong> &mdash; The file %s has been given %s "
145
  "permissions on Amazon S3."
146
  msgstr ""
147
 
148
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:2800
149
  msgid ""
150
  "<strong>WP Offload S3 Requirement Missing</strong> &mdash; Looks like you "
151
  "don't have an image manipulation library installed on this server and "
153
  "Please setup GD or ImageMagick."
154
  msgstr ""
155
 
156
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3460
157
  msgid "Quick Start Guide"
158
  msgstr ""
159
 
160
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3462
161
  #, php-format
162
  msgid ""
163
  "Looks like we don't have write access to this bucket. It's likely that the "
166
  "correctly."
167
  msgstr ""
168
 
169
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3464
170
  #, php-format
171
  msgid ""
172
  "Looks like we don't have access to the buckets. It's likely that the user "
174
  "Please see our %s for instructions on setting up permissions correctly."
175
  msgstr ""
176
 
177
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3615
178
  msgid "WP Offload S3 Activation"
179
  msgstr ""
180
 
181
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3616
182
  msgid ""
183
  "WP Offload S3 Lite and WP Offload S3 cannot both be active. We've "
184
  "automatically deactivated WP Offload S3 Lite."
185
  msgstr ""
186
 
187
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3618
188
  msgid "WP Offload S3 Lite Activation"
189
  msgstr ""
190
 
191
+ #: builds/amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:3619
192
  msgid ""