Skip to content

Commit

Permalink
Deploying version 0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bradt committed Aug 17, 2015
1 parent 870b19e commit a0659e0
Show file tree
Hide file tree
Showing 10 changed files with 207 additions and 102 deletions.
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,36 @@
**Contributors:** bradt
**Donate link:** https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC
**Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
**Requires at least:** 3.5
**Requires at least:** 3.7
**Tested up to:** 4.3
**Stable tag:** 0.9.2
**Stable tag:** 0.9.3
**License:** GPLv3

Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.

## Description ##

https://www.youtube.com/watch?v=_PVybEGaRXc

This plugin automatically copies images, videos, documents, and any other media added through WordPress' media uploader to [Amazon Simple Storage Service](http://aws.amazon.com/s3/) (S3). It then automatically replaces the URL to each media file with their respective S3 URL or, if you have configured [Amazon CloudFront](http://aws.amazon.com/cloudfront/), the respective CloudFront URL. Image thumbnails are also copied to S3 and delivered through S3/CloudFront.

Uploading files *directly* to your S3 account is not currently supported by this plugin. They are uploaded to your server first, then copied to S3. There is an option to automatically remove the files from your server once they are copied to S3 however.

If you're adding this plugin to a site that's been around for a while, your existing media files will not be copied or served from S3. Only newly uploaded files will be copied and served from S3.

**Pro Version**

We’re working on a pro version that will include the following features:
**PRO Upgrade with Email Support and More Features**

* Copy existing Media Library to S3
* Serve theme JS & CSS from S3/CloudFront
* WooCommerce & EDD integration
* Awesome email support
* Upload existing Media Library to S3
* Find & replace file URLs in content
* Control S3 files from the Media Library
* [Assets addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#assets-addon) - Serve your CSS & JS from S3/CloudFront
* [WooCommerce addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#woocommerce-addon)
* [Easy Digital Downloads addon](https://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin#edd-addon)
* PriorityExpert™ email support

[Sign up for news about the pro version](https://confirmsubscription.com/h/t/295CA85AEB94E879)
See the video below or [visit the web site](http://deliciousbrains.com/wp-offload-s3/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin) to learn more about the pro version.

[Request features, report bugs, and submit pull requests on Github](https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/issues)
https://www.youtube.com/watch?v=55xNGnbJ_CY

*This plugin has been completely rewritten, but was originally a fork of
[Amazon S3 for WordPress with CloudFront](http://wordpress.org/extend/plugins/tantan-s3-cloudfront/)
Expand Down Expand Up @@ -63,10 +66,14 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin

## Changelog ##

### 0.9.2 - 2015-07-29- ###
### 0.9.3 - 2015-08-17 ###
* New: Pro upgrade sidebar
* Bug fix: Create buckets in US standard region causing S3 URLs to 404 errors

### 0.9.2 - 2015-07-29 ###
* Bug fix: Accidentally released the sidebar for after we launch the pro version

### 0.9.1 - 2015-07-29- ###
### 0.9.1 - 2015-07-29 ###
* Improvement: Access denied sample IAM policy replaced with link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/)
* Improvement: Access denied messages on bucket selection or bucket creation now link to [Quick Start Guide](https://deliciousbrains.com/wp-offload-s3/doc/quick-start-guide/)
* Improvement: Object expires time can now be filtered using the `as3cf_object_meta` filter
Expand Down
2 changes: 1 addition & 1 deletion assets/css/styles.css

Large diffs are not rendered by default.

66 changes: 50 additions & 16 deletions assets/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,6 @@
line-height: 1.4;
}

ul {
margin-left: 20px;
list-style-type: disc;
}

li {
line-height: 1.4;
}
Expand Down Expand Up @@ -642,15 +637,8 @@
(min-resolution: 1.3dppx) {

.as3cf-banner {
background-image: url(../img/snail-banner@2x.jpg);
background-size: 292px 156px;
width: 292px;
height: 156px;
display: block;

img {
display: none;
}
background-image: url(../img/snail-banner@2x.jpg);
background-size: 292px 156px;
}
}

Expand All @@ -666,8 +654,54 @@
* Misc
*/
.as3cf-banner {
img {
display: block;
margin-top: 28px;
width: 292px;
height: 156px;
display: block;
background-image: url(../img/snail-banner.jpg);
position: relative;

h1 {
font-size: 28px;
color: #fff;
font-weight: 200;
margin: 0;
position: absolute;
bottom: 25px;
left: 20px;
text-decoration: none;
}
}

.as3cf-upgrade-details {
background-color: #73833b;
padding: 20px;
color: #fff;
font-size: 13px;
margin: 0;
display: block;
text-decoration: none;

p {
margin: 0;
}

a {
color: #fff;
font-weight: bold;
text-decoration: none;
font-size: 16px;

&:hover {
color: #fff;
opacity: 0.9;
}
}

ul {
margin-top: 0;
margin-left: 16px;
list-style-type: disc;
}
}

Expand Down
9 changes: 6 additions & 3 deletions classes/amazon-s3-and-cloudfront.php
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,9 @@ function get_attachment_url( $post_id, $expires = null, $size = null, $meta = nu

// We don't use $this->get_s3object_region() here because we don't want
// to make an AWS API call and slow down page loading
if ( isset( $s3object['region'] ) ) {
if ( isset( $s3object['region'] ) && self::DEFAULT_REGION !== $s3object['region'] ) {
$region = $this->translate_region( $s3object['region'] );
}
else {
} else {
$region = '';
}

Expand Down Expand Up @@ -1358,6 +1357,10 @@ function save_bucket( $bucket_name, $manual = false, $region = null ) {
}
}

if ( self::DEFAULT_REGION === $region ) {
$region = '';
}

$this->set_setting( 'region', $region );

if ( $manual ) {
Expand Down
26 changes: 26 additions & 0 deletions classes/wp-aws-compatibility-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,5 +440,31 @@ function get_admin_notice() {
function render_notice( $message ) {
printf( '<div class="' . $this->notice_class . ' aws-compatibility-notice"><p>%s</p></div>', $message );
}

/**
* Is the current process an install or upgrade of plugin(s)
*
* @return bool
*/
public static function is_installing_or_updating_plugins() {
global $pagenow;

if ( 'update.php' === $pagenow && isset( $_GET['action'] ) && 'install-plugin' === $_GET['action'] ) {
// We are installing a plugin
return true;
}

if ( 'plugins.php' === $pagenow && isset( $_POST['action'] ) && 'update-selected' === $_POST['action'] ) {
// We are updating plugins from the plugin page
return true;
}

if ( 'update-core.php' === $pagenow && isset( $_GET['action'] ) && 'do-plugin-upgrade' === $_GET['action'] ) {
// We are updating plugins from the updates page
return true;
}

return false;
}
}
}
Loading

0 comments on commit a0659e0

Please sign in to comment.