Skip to content

Commit

Permalink
Deploying version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmjones committed May 30, 2016
1 parent 1a08516 commit d9f0054
Show file tree
Hide file tree
Showing 16 changed files with 713 additions and 516 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# WP Offload S3 Lite #
**Contributors:** bradt, deliciousbrains
**Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
**Requires at least:** 3.7
**Tested up to:** 4.4
**Stable tag:** 1.0.3
**Requires at least:** 4.4
**Tested up to:** 4.5.2
**Stable tag:** 1.0.4
**License:** GPLv3

Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
Expand Down Expand Up @@ -73,6 +73,17 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin

## Changelog ##

### WP Offload S3 Lite 1.0.4 - 2016-05-30 ###
* New: Now using simpler Force HTTPS setting, removed redundant Always Use HTTP setting.
* New: `as3cf_cloudfront_path_parts` filter allows changing served CloudFront path (useful when distribution pulls subdirectory).
* Improvement: Better compatibility with non-standard notices from other plugins and themes.
* Improvement: Added basic auth and proxy info to diagnostic info.
* Improvement: Added `allow_url_fopen` status to diagnostic info.
* Improvement: Added memory usage to diagnostic info.
* Improvement: Ensure notice text is 800px or less in width.
* Improvement: Reduced database queries on settings screen.
* Bug fix: Properly handle _wp_attachment_data metadata when it is a serialized WP_Error.

### WP Offload S3 Lite 1.0.3 - 2016-03-23 ###
* Bug fix: Don't replace srcset URLs when Rewrite File URLs option disabled
* Bug fix: Fatal error: Cannot redeclare as3cf_get_secure_attachment_url()
Expand Down
1 change: 1 addition & 0 deletions assets/css/notice.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.as3cf-notice p,.aws-compatibility-notice p{max-width:800px}
2 changes: 1 addition & 1 deletion assets/css/styles.css

Large diffs are not rendered by default.

76 changes: 56 additions & 20 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
* @param bool persist_updated_notice
*/
toggle: function( hash, persist_updated_notice ) {
hash = as3cf.tabs.sanitizeHash( hash );

$tabs.hide();
$activeTab = $( '#tab-' + hash );
$activeTab.show();
Expand All @@ -73,6 +75,59 @@
if ( ! persist_updated_notice ) {
$( '.as3cf-updated' ).removeClass( 'show' );
}

if ( 'support' === hash ) {
as3cf.tabs.getDiagnosticInfo();
}
},

/**
* Update display of diagnostic info.
*/
getDiagnosticInfo: function() {
var $debugLog = $( '.debug-log-textarea' );

$debugLog.html( as3cf.strings.get_diagnostic_info );

var data = {
action: 'as3cf-get-diagnostic-info',
_nonce: as3cf.nonces.get_diagnostic_info
};

$.ajax( {
url: ajaxurl,
type: 'POST',
dataType: 'JSON',
data: data,
error: function( jqXHR, textStatus, errorThrown ) {
$debugLog.html( errorThrown );
},
success: function( data, textStatus, jqXHR ) {
if ( 'undefined' !== typeof data[ 'success' ] ) {
$debugLog.html( data[ 'diagnostic_info' ] );
} else {
$debugLog.html( as3cf.strings.get_diagnostic_info_error );
$debugLog.append( data[ 'error' ] );
}
}
} );
},

/**
* Sanitize hash to ensure it references a real tab.
*
* @param string hash
*
* @return string
*/
sanitizeHash: function( hash ) {
var $newTab = $( '#tab-' + hash );

if ( 0 === $newTab.length ) {
hash = as3cf.tabs.defaultTab;
}

return hash;
}
};

Expand Down Expand Up @@ -630,7 +685,7 @@

// As it's the default remove the hash
window.location.hash = '';
if ( 'function' === typeof window.history.replaceState && '#' === window.location.href.slice( -1 ) ) {
if ( 'function' === typeof window.history.replaceState && '#' === window.location.href.slice( -1 ) ) {

// Strip the # if still on the end of the URL
history.replaceState( {}, '', window.location.href.slice( 0, -1 ) );
Expand Down Expand Up @@ -689,25 +744,6 @@
$cloudfront.toggleClass( 'hide', ! cloudfrontSelected );
} );

$( '.as3cf-ssl' ).on( 'change', 'input[type="radio"]', function( e ) {
if ( ! $( '#' + $activeTab.attr( 'id' ) + ' .deprecated-domain' ).length ) {
return;
}

var ssl = $( 'input:radio[name="ssl"]:checked' ).val();
if ( 'https' === ssl ) {
var domain = $( 'input:radio[name="domain"]:checked' ).val();
if ( 'subdomain' === domain ) {
$( 'input[name="domain"][value="path"]' ).attr( 'checked', true );
}
$( '.subdomain-wrap input' ).attr( 'disabled', true );
$( '.subdomain-wrap' ).addClass( 'disabled' );
} else {
$( '.subdomain-wrap input' ).removeAttr( 'disabled' );
$( '.subdomain-wrap' ).removeClass( 'disabled' );
}
} );

$( '.url-preview' ).on( 'change', 'input', function( e ) {
generateUrlPreview();
} );
Expand Down
2 changes: 1 addition & 1 deletion assets/js/script.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/js/tinymce.min.js

This file was deleted.

9 changes: 9 additions & 0 deletions assets/sass/notice.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Common as3cf-notice styles.
*/
.as3cf-notice,
.aws-compatibility-notice {
p {
max-width: 800px;
}
}
16 changes: 5 additions & 11 deletions assets/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* AWS wrap
*/
.aws-main.wrap {
position: relative;

& > h1 {
float: left;
}
Expand Down Expand Up @@ -146,14 +148,6 @@
}
}

.as3cf-ssl {
margin-top: 10px;
p.info {
margin-top: 10px;
padding: 0;
}
}

.as3cf-radio-group {
label {
display: block;
Expand Down Expand Up @@ -574,7 +568,7 @@
*/
.as3cf-sidebar {
position: absolute;
top: 25px;
top: 9px;
left: 670px;
width: 292px;

Expand Down Expand Up @@ -714,7 +708,7 @@
* Misc
*/
.as3cf-banner {
margin-top: 28px;
margin-top: 35px;
width: 292px;
height: 156px;
display: block;
Expand Down Expand Up @@ -791,7 +785,7 @@
.as3cf-notice-toggle-list {
margin-top: 0;
margin-left: 0;
padding-left: 26px;
padding-left: 40px;
color: #dc3232;
}
}
Loading

0 comments on commit d9f0054

Please sign in to comment.