Skip to content

Commit

Permalink
Deploying version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
A5hleyRich committed Dec 13, 2016
1 parent 55e6fac commit f33c2ae
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 20 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
**Contributors:** bradt, deliciousbrains
**Tags:** amazon, amazon web services
**Requires at least:** 4.4
**Tested up to:** 4.6.1
**Stable tag:** 1.0
**Tested up to:** 4.7
**Stable tag:** 1.0.1
**License:** GPLv3

Houses the Amazon Web Services (AWS) PHP libraries and manages access keys. Required by other AWS plugins.
Expand Down Expand Up @@ -35,7 +35,10 @@ This plugin is required by other plugins, which use its libraries and its settin

## Changelog ##

### 1.0 - 2016-10-29 ###
### 1.0.1 - 2016-12-13 ###
* New: Mumbai and Seoul regions added

### 1.0 - 2016-09-29 ###
* Improvement: Compatibility with WP Offload S3 Lite 1.1
* Improvement: Compatibility with WP Offload S3 1.2

Expand Down
4 changes: 2 additions & 2 deletions amazon-web-services.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://wordpress.org/extend/plugins/amazon-web-services/
Description: Includes the Amazon Web Services PHP libraries, stores access keys, and allows other plugins to hook into it.
Author: Delicious Brains
Version: 1.0
Version: 1.0.1
Author URI: http://deliciousbrains.com/
Network: True
Text Domain: amazon-web-services
Expand All @@ -22,7 +22,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// **********************************************************************

$GLOBALS['aws_meta']['amazon-web-services']['version'] = '1.0';
$GLOBALS['aws_meta']['amazon-web-services']['version'] = '1.0.1';

$GLOBALS['aws_meta']['amazon-web-services']['supported_addon_versions'] = array(
'amazon-s3-and-cloudfront' => '0.9',
Expand Down
10 changes: 5 additions & 5 deletions classes/amazon-web-services.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,13 @@ function get_addon_install_link( $slug, $addon ) {
$activated = $this->is_plugin_activated( $slug );

if ( $installed && $activated ) {
echo '<li>' . esc_html( _x( 'Installed & Activated', 'Plugin already installed and activated', 'amazon-web-services' ) ) . '</li>';
echo '<li class="installed activated">' . esc_html( _x( 'Installed & Activated', 'Plugin already installed and activated', 'amazon-web-services' ) ) . '</li>';
} elseif ( $installed ) {
echo '<li>' . esc_html( _x( 'Installed', 'Plugin already installed', 'amazon-web-services' ) ) . '</li>';
echo '<li><a href="' . esc_url( $this->get_plugin_activate_url( $slug ) ) . '">' . esc_html( _x( 'Activate Now', 'Activate plugin now', 'amazon-web-services' ) ) . '</a></li>';
echo '<li class="installed">' . esc_html( _x( 'Installed', 'Plugin already installed', 'amazon-web-services' ) ) . '</li>';
echo '<li class="activate"><a href="' . esc_url( $this->get_plugin_activate_url( $slug ) ) . '">' . esc_html( _x( 'Activate Now', 'Activate plugin now', 'amazon-web-services' ) ) . '</a></li>';
} else {
if ( isset( $addon['install'] ) && $addon['install'] ) {
echo '<li><a href="' . esc_url( $this->get_plugin_install_url( $slug ) ) . '">' . esc_html( _x( 'Install Now', 'Install plugin now', 'amazon-web-services' ) ) . '</a></li>';
echo '<li class="install"><a href="' . esc_url( $this->get_plugin_install_url( $slug ) ) . '">' . esc_html( _x( 'Install Now', 'Install plugin now', 'amazon-web-services' ) ) . '</a></li>';
}
}

Expand Down Expand Up @@ -508,7 +508,7 @@ function get_addon_details_link( $slug, $addon ) {
$class = 'thickbox';
}

echo '<li><a class="' . $class . '" href="' . esc_url( $url ) . '">' . esc_html( $title ) . '</a></li>';
echo '<li class="visit-site"><a class="' . $class . '" href="' . esc_url( $url ) . '">' . esc_html( $title ) . '</a></li>';
}

/**
Expand Down
44 changes: 42 additions & 2 deletions classes/aws-plugin-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,25 @@ function set_settings( $settings ) {
/**
* Save the settings to the database
*/
function save_settings() {
update_site_option( static::SETTINGS_KEY, $this->settings );
public function save_settings() {
$this->update_site_option( static::SETTINGS_KEY, $this->settings );
}

/**
* Update site option.
*
* @param string $option
* @param mixed $value
* @param bool $autoload
*
* @return bool
*/
public function update_site_option( $option, $value, $autoload = true ) {
if ( is_multisite() ) {
return update_site_option( $option, $value );
}

return update_option( $option, $value, $autoload );
}

/**
Expand Down Expand Up @@ -319,4 +336,27 @@ public function get_asset_version() {
public function get_asset_suffix() {
return defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
}

/**
* Get all AWS regions
*
* @return array
*/
public function get_aws_regions() {
$regions = array(
'us-east-1' => 'US Standard',
'us-west-1' => 'Northern California',
'us-west-2' => 'Oregon',
'eu-west-1' => 'Ireland',
'eu-central-1' => 'Frankfurt',
'ap-southeast-1' => 'Singapore',
'ap-southeast-2' => 'Sydney',
'ap-northeast-1' => 'Tokyo',
'ap-south-1' => 'Mumbai',
'ap-northeast-2' => 'Seoul',
'sa-east-1' => 'Sao Paulo',
);

return apply_filters( 'aws_get_regions', $regions );
}
}
4 changes: 2 additions & 2 deletions classes/wp-aws-compatibility-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ function get_error_msg() {
} else {
$msg .= ' ' . __( 'It appears to be installed already.', 'amazon-web-services' );
$activate_url = $this->get_plugin_action_url( 'activate', $parent_basename );
$msg .= ' <a style="font-weight:bold;text-decoration:none;" href="' . $activate_url . '">' . _x( 'Activate it now.', 'Activate plugin', 'amazon-web-services' ) . '</a>';
$msg .= ' <a id="'. $this->plugin_slug . '-activate-parent" style="font-weight:bold;text-decoration:none;" href="' . $activate_url . '">' . _x( 'Activate it now.', 'Activate plugin', 'amazon-web-services' ) . '</a>';
}
} else {
$install_url = 'https://deliciousbrains.com/my-account/';
Expand Down Expand Up @@ -479,7 +479,7 @@ function get_admin_notice() {
* @param string $message
*/
function render_notice( $message ) {
printf( '<div class="' . $this->notice_class . ' aws-compatibility-notice"><p>%s</p></div>', $message );
printf( '<div id="aws-compat-notice' . $this->plugin_slug . '" class="' . $this->notice_class . ' aws-compatibility-notice"><p>%s</p></div>', $message );
}

/**
Expand Down
6 changes: 3 additions & 3 deletions languages/amazon-web-services-en.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# This file is distributed under the same license as the amazon-web-services package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: amazon-web-services\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2016-09-29 12:56+0100\n"
"POT-Creation-Date: 2016-12-13 11:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -154,7 +154,7 @@ msgid ""
"7.16.2+ compiled with OpenSSL and zlib. Your server currently has"
msgstr ""

#: classes/aws-plugin-base.php:279
#: classes/aws-plugin-base.php:296
msgid "Settings"
msgstr ""

Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: bradt, deliciousbrains
Tags: amazon, amazon web services
Requires at least: 4.4
Tested up to: 4.6.1
Stable tag: 1.0
Tested up to: 4.7
Stable tag: 1.0.1
License: GPLv3

Houses the Amazon Web Services (AWS) PHP libraries and manages access keys. Required by other AWS plugins.
Expand Down Expand Up @@ -33,7 +33,10 @@ This plugin is required by other plugins, which use its libraries and its settin

== Changelog ==

= 1.0 - 2016-10-29 =
= 1.0.1 - 2016-12-13 =
* New: Mumbai and Seoul regions added

= 1.0 - 2016-09-29 =
* Improvement: Compatibility with WP Offload S3 Lite 1.1
* Improvement: Compatibility with WP Offload S3 1.2

Expand Down

0 comments on commit f33c2ae

Please sign in to comment.