Skip to content

Commit

Permalink
Deploying version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
A5hleyRich committed Mar 7, 2016
1 parent e421de5 commit 8983e77
Show file tree
Hide file tree
Showing 30 changed files with 1,438 additions and 510 deletions.
23 changes: 19 additions & 4 deletions README.md
@@ -1,9 +1,9 @@
# WP Offload S3 #
# 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:** 0.9.12
**Stable tag:** 1.0
**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 @@ -54,10 +54,10 @@ You can see the minimum requirements [here](https://deliciousbrains.com/wp-offlo
## Screenshots ##

### 1. Choosing/creating a bucket ###
![Choosing/creating a bucket](https://raw.githubusercontent.com/deliciousbrains/wp-wp-offload-s3/assets/screenshot-1.png)
![Choosing/creating a bucket](https://raw.githubusercontent.com/deliciousbrains/wp-wp-offload-s3-lite/assets/screenshot-1.png)

### 2. Settings screen ###
![Settings screen](https://raw.githubusercontent.com/deliciousbrains/wp-wp-offload-s3/assets/screenshot-2.png)
![Settings screen](https://raw.githubusercontent.com/deliciousbrains/wp-wp-offload-s3-lite/assets/screenshot-2.png)


## Upgrade Notice ##
Expand All @@ -73,6 +73,21 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin

## Changelog ##

### WP Offload S3 Lite 1.0 - 2016-03-07 ###
* New: Plugin renamed to "WP Offload S3 Lite"
* New: Define any and all settings with a constant in wp-config.php
* New: Documentation links for each setting
* Improvement: Simplified domain setting UI
* Improvement: Far future expiration header set by default
* Improvement: Newly created bucket now immediately appears in the bucket list
* Improvement: Cleanup user meta on uninstall
* Improvement: WP Retina 2x integration [removed](https://deliciousbrains.com/wp-offload-s3/doc/copy-hidpi-2x-images-support/)
* Bug fix: Year/Month folder structure on S3 not created if the 'Organise my uploads into month and year-based folders' WordPress setting is disabled
* Bug fix: Responsive srcset PHP notices
* Bug fix: Compatibility addon notices displayed to non-admin users
* Bug fix: Potential PHP fatal error in MySQL version check in diagnostic log
* Bug fix: Missing image library notices displaying before plugin is setup

### WP Offload S3 0.9.12 - 2016-02-03 ###
* Improvement: Compatibility with WP Offload S3 Assets 1.1
* Bug fix: Object versioned responsive images in post content not working when served from S3 on WordPress 4.4+
Expand Down
2 changes: 1 addition & 1 deletion assets/css/styles.css

Large diffs are not rendered by default.

39 changes: 30 additions & 9 deletions assets/js/modal.js
@@ -1,4 +1,4 @@
var as3cfModal = (function ( $ ) {
var as3cfModal = (function( $ ) {

var modal = {
prefix: 'as3cf',
Expand All @@ -18,14 +18,35 @@ var as3cfModal = (function ( $ ) {
return target.replace( /[^a-z]/g, '' );
}

/**
* Check if modal exists in DOM or in Memory.
*
* @param {string} target
*
* @return {boolean}
*/
modal.exists = function( target ) {
var key = targetToKey( target );

if ( undefined !== modals[ key ] ) {
return true;
}

if ( $( target ).length ) {
return true;
}

return false;
};

/**
* Open modal
*
* @param {string} target
* @param {function} callback
* @param {string} customClass
*/
modal.open = function ( target, callback, customClass ) {
modal.open = function( target, callback, customClass ) {
var key = targetToKey( target );

// Overlay
Expand Down Expand Up @@ -66,14 +87,14 @@ var as3cfModal = (function ( $ ) {
*
* @param {function} callback
*/
modal.close = function ( callback ) {
modal.close = function( callback ) {
if ( modal.loading ) {
return;
}

var target = $( '#as3cf-modal' ).data( 'as3cf-modal-target' );

$( '#as3cf-overlay' ).fadeOut( 150, function () {
$( '#as3cf-overlay' ).fadeOut( 150, function() {
if ( 'function' === typeof callback ) {
callback( target );
}
Expand All @@ -91,19 +112,19 @@ var as3cfModal = (function ( $ ) {
*
* @param {bool} state
*/
modal.setLoadingState = function ( state ) {
modal.setLoadingState = function( state ) {
modal.loading = state;
};

// Setup click handlers
$( document ).ready( function () {
$( document ).ready( function() {

$( 'body' ).on( 'click', '[data-as3cf-modal]', function ( e ) {
$( 'body' ).on( 'click', '[data-as3cf-modal]', function( e ) {
e.preventDefault();
modal.open( $( this ).data( 'as3cf-modal' ) + '.' + modal.prefix );
} );

$( 'body' ).on( 'click', '#as3cf-overlay, .close-as3cf-modal', function ( e ) {
$( 'body' ).on( 'click', '#as3cf-overlay, .close-as3cf-modal', function( e ) {
e.preventDefault();

// Don't allow children to bubble up click event
Expand All @@ -118,4 +139,4 @@ var as3cfModal = (function ( $ ) {

return modal;

})( jQuery );
})( jQuery );
2 changes: 1 addition & 1 deletion assets/js/modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions assets/js/notice.js
Expand Up @@ -6,17 +6,17 @@
var id = $( this ).parents( '.as3cf-notice' ).attr( 'id' );
if ( id ) {
var data = {
action : 'as3cf-dismiss-notice',
action: 'as3cf-dismiss-notice',
notice_id: id,
_nonce : as3cf_notice.nonces.dismiss_notice
_nonce: as3cf_notice.nonces.dismiss_notice
};

$.ajax( {
url : ajaxurl,
type : 'POST',
url: ajaxurl,
type: 'POST',
dataType: 'JSON',
data : data,
error : function( jqXHR, textStatus, errorThrown ) {
data: data,
error: function( jqXHR, textStatus, errorThrown ) {
alert( as3cf_notice.strings.dismiss_notice_error + errorThrown );
}
} );
Expand All @@ -34,4 +34,4 @@
$link.closest( '.as3cf-notice' ).find( '.as3cf-notice-toggle-content' ).toggle();
} );

})( jQuery );
})( jQuery );

0 comments on commit 8983e77

Please sign in to comment.