WordPress.org

Plugin Directory

Changeset 1771519


Ignore:
Timestamp:
11/20/17 15:10:28 (2 months ago)
Author:
deliciousbrains
Message:

Deploy version 1.0.4

Location:
amazon-web-services
Files:
1701 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • amazon-web-services/trunk/README.md

    r1681212 r1771519  
    33**Tags:** amazon, amazon web services   
    44**Requires at least:** 4.6   
    5 **Tested up to:** 4.8   
    6 **Stable tag:** 1.0.3   
     5**Tested up to:** 4.9   
     6**Stable tag:** 1.0.4   
    77**License:** GPLv3   
    88 
     
    3535 
    3636## Changelog ## 
     37 
     38### 1.0.4 - 2017-11-20 ### 
     39* Improvement: Compatibility with WordPress 4.9 
     40* Improvement: Compatibility with WP Offload S3 1.5.1 
     41* Bug fix: Reveal access keys form option shown when keys partially defined 
     42* Bug fix: WP_Error being passed to AWS methods 
     43* Bug fix: "More info" links can be broken across two lines 
    3744 
    3845### 1.0.3 - 2017-06-19 ### 
  • amazon-web-services/trunk/amazon-web-services.php

    r1681212 r1771519  
    55Description: Includes the Amazon Web Services PHP libraries, stores access keys, and allows other plugins to hook into it. 
    66Author: Delicious Brains 
    7 Version: 1.0.3 
     7Version: 1.0.4 
    88Author URI: https://deliciousbrains.com/ 
    99Network: True 
     
    2323// ********************************************************************** 
    2424 
    25 $GLOBALS['aws_meta']['amazon-web-services']['version'] = '1.0.3'; 
     25$GLOBALS['aws_meta']['amazon-web-services']['version'] = '1.0.4'; 
    2626 
    2727$GLOBALS['aws_meta']['amazon-web-services']['supported_addon_versions'] = array( 
    28     'amazon-s3-and-cloudfront'     => '0.9', 
    29     'amazon-s3-and-cloudfront-pro' => '1.0b1', 
     28    'amazon-s3-and-cloudfront'     => '1.2.1', 
     29    'amazon-s3-and-cloudfront-pro' => '1.5.1', 
    3030); 
    3131 
  • amazon-web-services/trunk/assets/css/styles.css

    r1681212 r1771519  
    1 .aws-content,.aws-updated,.aws-compatibility-notice{-webkit-box-sizing:border-box;box-sizing:border-box;max-width:650px}.toplevel_page_amazon-web-services .error,.toplevel_page_amazon-web-services .notice,.toplevel_page_amazon-web-services .updated{-webkit-box-sizing:border-box;box-sizing:border-box;max-width:650px}.aws-addons,.aws-main[data-view="addons"] .aws-compatibility-notice{max-width:772px}.aws-settings h3{font-size:20px}.aws-settings .need-help{background-color:#fff;padding:20px 20px 20px 50px;line-height:1;font-size:16px;font-weight:bold;position:relative}.aws-settings .need-help:before{font-family:"dashicons";content:"\f348";font-size:24px;line-height:1;width:24px;height:24px;position:absolute;top:16px;left:16px}.aws-settings .need-help a{text-decoration:none}.aws-settings p{font-size:14px}body.toplevel_page_amazon-web-services .wrap h1{color:#fff;font-weight:600;font-size:26px;line-height:1;margin:20px 0 15px 0;width:650px;padding:100px 0 0 25px;height:150px;background:#f7a80d url(../img/aws-logo.svg) right 40px center no-repeat;background-size:100px 79px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.aws-addons .addons-list{margin:20px 0 200px;padding-top:5px;border-top:1px solid #ddd;font-size:14px}.aws-addons .addons-list li:last-child{margin-bottom:0}.aws-addons .addons-list article{margin-top:10px;width:100%;height:250px;position:relative;font-weight:300;line-height:1;overflow:hidden}.aws-addons .addons-list article .info{position:absolute;bottom:20px;left:20px}.aws-addons .addons-list article .info ul{margin:16px 0 0;color:rgba(255,255,255,0.7)}.aws-addons .addons-list article .info ul li{display:inline-block;margin:0 30px 0 0}.aws-addons .addons-list article .info ul li:last-child{margin-right:0}.aws-addons .addons-list article .info a{color:#fff;text-decoration:none}.aws-addons .addons-list article .info a:hover{text-decoration:underline}.aws-addons .addons-list article h1,.aws-addons .addons-list article h2{padding:0;color:#fff;line-height:1;font-weight:600}.aws-addons .addons-list article h1{margin:0;font-size:26px}.aws-addons .addons-list article h2{margin:4px 0 0;font-size:18px}.aws-addons .addons-list article .label{position:absolute;top:10px;right:10px;font-style:italic;color:#fff}.aws-addons .addons-list>li>ul{background-color:#fff;border-top:0;padding:10px;overflow:hidden}.aws-addons .addons-list>li>ul article{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.aws-addons .addons-list>li>ul article img{width:100px;height:100px}.aws-addons .addons-list>li>ul article h1{margin-top:8px;font-size:30px;line-height:1.2}.aws-addons .addons-list>li>ul article .info{display:block;left:auto;bottom:auto;margin:0 auto;text-align:center}.aws-addons .addons-list>li>ul article .info ul li{margin-right:10px;font-size:13px;line-height:1.6}.aws-addons .addons-list>li>ul li{margin-bottom:0}.aws-addons .addons-list .amazon-s3-and-cloudfront>article{background-image:url(../img/as3cf-banner-bw.jpg);background-size:772px 150px;background-repeat:no-repeat;height:150px}@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){.aws-addons .addons-list .amazon-s3-and-cloudfront>article{background-image:url(../img/as3cf-banner-bw@2x.jpg)}}.aws-addons .addons-list .amazon-s3-and-cloudfront-pro>article{background-image:url(../img/as3cf-banner.jpg);background-size:772px 250px;background-repeat:no-repeat}@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){.aws-addons .addons-list .amazon-s3-and-cloudfront-pro>article{background-image:url(../img/as3cf-banner@2x.jpg)}}.aws-addons .addons-list .amazon-s3-and-cloudfront-assets>article{background-color:#0769ad;margin-top:0} 
     1.aws-content,.aws-updated,.aws-compatibility-notice{-webkit-box-sizing:border-box;box-sizing:border-box;max-width:650px}.toplevel_page_amazon-web-services .error,.toplevel_page_amazon-web-services .notice,.toplevel_page_amazon-web-services .updated{-webkit-box-sizing:border-box;box-sizing:border-box;max-width:650px}.aws-addons,.aws-main[data-view="addons"] .aws-compatibility-notice{max-width:772px}.aws-settings h3{font-size:20px}.aws-settings .need-help{background-color:#fff;padding:20px 20px 20px 50px;line-height:1;font-size:16px;font-weight:bold;position:relative}.aws-settings .need-help:before{font-family:"dashicons";content:"\f348";font-size:24px;line-height:1;width:24px;height:24px;position:absolute;top:16px;left:16px}.aws-settings .need-help a{text-decoration:none}.aws-settings p{font-size:14px}body.toplevel_page_amazon-web-services .wrap h1{color:#fff;font-weight:600;font-size:26px;line-height:1;margin:20px 0 15px 0;width:650px;padding:100px 0 0 25px;height:150px;background:#f7a80d url(../img/aws-logo.svg) right 40px center no-repeat;background-size:100px 79px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.aws-addons .addons-list{margin:20px 0 200px;padding-top:5px;border-top:1px solid #ddd;font-size:14px}.aws-addons .addons-list li:last-child{margin-bottom:0}.aws-addons .addons-list article{margin-top:10px;width:100%;height:250px;position:relative;font-weight:300;line-height:1;overflow:hidden}.aws-addons .addons-list article .info{position:absolute;bottom:20px;left:20px}.aws-addons .addons-list article .info ul{margin:16px 0 0;color:rgba(255,255,255,0.7)}.aws-addons .addons-list article .info ul li{display:inline-block;margin:0 30px 0 0}.aws-addons .addons-list article .info ul li:last-child{margin-right:0}.aws-addons .addons-list article .info a{color:#fff;text-decoration:none}.aws-addons .addons-list article .info a:hover{text-decoration:underline}.aws-addons .addons-list article h1,.aws-addons .addons-list article h2{padding:0;color:#fff;line-height:1;font-weight:600}.aws-addons .addons-list article h1{margin:0;font-size:26px}.aws-addons .addons-list article h2{margin:4px 0 0;font-size:18px}.aws-addons .addons-list article .label{position:absolute;top:10px;right:10px;font-style:italic;color:#fff}.aws-addons .addons-list>li>ul{background-color:#fff;border-top:0;padding:10px;overflow:hidden}.aws-addons .addons-list>li>ul article{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.aws-addons .addons-list>li>ul article img{width:100px;height:100px}.aws-addons .addons-list>li>ul article h1{margin-top:8px;font-size:30px;line-height:1.2}.aws-addons .addons-list>li>ul article .info{display:block;left:auto;bottom:auto;margin:0 auto;text-align:center}.aws-addons .addons-list>li>ul article .info ul li{margin-right:10px;font-size:13px;line-height:1.6}.aws-addons .addons-list>li>ul li{margin-bottom:0}.aws-addons .addons-list .amazon-s3-and-cloudfront>article{background-image:url(../img/as3cf-banner-bw.jpg);background-size:772px 150px;background-repeat:no-repeat;height:150px}@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){.aws-addons .addons-list .amazon-s3-and-cloudfront>article{background-image:url(../img/as3cf-banner-bw@2x.jpg)}}.aws-addons .addons-list .amazon-s3-and-cloudfront-pro>article{background-image:url(../img/as3cf-banner.jpg);background-size:772px 250px;background-repeat:no-repeat}@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){.aws-addons .addons-list .amazon-s3-and-cloudfront-pro>article{background-image:url(../img/as3cf-banner@2x.jpg)}}.aws-addons .addons-list .amazon-s3-and-cloudfront-assets-pull>article{background-color:#0769ad;margin-top:0} 
  • amazon-web-services/trunk/assets/sass/styles.scss

    r1681212 r1771519  
    228228        } 
    229229 
    230         .amazon-s3-and-cloudfront-assets > article { 
     230        .amazon-s3-and-cloudfront-assets-pull > article { 
    231231            background-color: #0769ad; 
    232232            margin-top: 0; 
  • amazon-web-services/trunk/classes/amazon-web-services.php

    r1681212 r1771519  
    214214     */ 
    215215    function are_key_constants_set() { 
    216         return defined( 'AWS_ACCESS_KEY_ID' ) && defined( 'AWS_SECRET_ACCESS_KEY' ); 
     216        return defined( 'AWS_ACCESS_KEY_ID' ) || defined( 'AWS_SECRET_ACCESS_KEY' ); 
    217217    } 
    218218 
     
    223223     */ 
    224224    function are_prefixed_key_constants_set() { 
    225         return defined( 'DBI_AWS_ACCESS_KEY_ID' ) && defined( 'DBI_AWS_SECRET_ACCESS_KEY' ); 
     225        return defined( 'DBI_AWS_ACCESS_KEY_ID' ) || defined( 'DBI_AWS_SECRET_ACCESS_KEY' ); 
     226    } 
     227 
     228    /** 
     229     * Whether or not IAM access keys are needed. 
     230     * 
     231     * Keys are needed if we are not using EC2 roles or not defined/set yet. 
     232     * 
     233     * @return bool 
     234     */ 
     235    public function needs_access_keys() { 
     236        if ( $this->use_ec2_iam_roles() ) { 
     237            return false; 
     238        } 
     239 
     240        return ! $this->are_access_keys_set(); 
    226241    } 
    227242 
     
    238253     * Get the AWS key from a constant or the settings 
    239254     * 
     255     * Falls back to settings only if neither constant is defined. 
     256     * 
    240257     * @return string 
    241258     */ 
    242259    function get_access_key_id() { 
    243         if ( defined( 'DBI_AWS_ACCESS_KEY_ID' ) ) { 
    244             return DBI_AWS_ACCESS_KEY_ID; 
    245         } elseif ( defined( 'AWS_ACCESS_KEY_ID' ) ) { 
    246             return AWS_ACCESS_KEY_ID; // Deprecated 
    247         } 
    248  
    249         return $this->get_setting( 'access_key_id' ); 
     260        if ( $this->are_prefixed_key_constants_set() || $this->are_key_constants_set() ) { 
     261            if ( defined( 'DBI_AWS_ACCESS_KEY_ID' ) ) { 
     262                return DBI_AWS_ACCESS_KEY_ID; 
     263            } elseif ( defined( 'AWS_ACCESS_KEY_ID' ) ) { 
     264                return AWS_ACCESS_KEY_ID; // Deprecated 
     265            } 
     266        } else { 
     267            return $this->get_setting( 'access_key_id' ); 
     268        } 
     269 
     270        return ''; 
    250271    } 
    251272 
     
    253274     * Get the AWS secret from a constant or the settings 
    254275     * 
     276     * Falls back to settings only if neither constant is defined. 
     277     * 
    255278     * @return string 
    256279     */ 
    257280    function get_secret_access_key() { 
    258         if ( defined( 'DBI_AWS_SECRET_ACCESS_KEY' ) ) { 
    259             return DBI_AWS_SECRET_ACCESS_KEY; 
    260         } elseif ( defined( 'AWS_SECRET_ACCESS_KEY' ) ) { 
    261             return AWS_SECRET_ACCESS_KEY; // Deprecated 
    262         } 
    263  
    264         return $this->get_setting( 'secret_access_key' ); 
     281        if ( $this->are_prefixed_key_constants_set() || $this->are_key_constants_set() ) { 
     282            if ( defined( 'DBI_AWS_SECRET_ACCESS_KEY' ) ) { 
     283                return DBI_AWS_SECRET_ACCESS_KEY; 
     284            } elseif ( defined( 'AWS_SECRET_ACCESS_KEY' ) ) { 
     285                return AWS_SECRET_ACCESS_KEY; // Deprecated 
     286            } 
     287        } else { 
     288            return $this->get_setting( 'secret_access_key' ); 
     289        } 
     290 
     291        return ''; 
    265292    } 
    266293 
     
    284311     * using the defined AWS key and secret 
    285312     * 
    286      * @return Aws|WP_Error 
     313     * @return Aws 
     314     * @throws Exception 
    287315     */ 
    288316    function get_client() { 
    289         if ( ! $this->use_ec2_iam_roles() && ( ! $this->get_access_key_id() || ! $this->get_secret_access_key() ) ) { 
    290             return new WP_Error( 'access_keys_missing', sprintf( __( 'You must first <a href="%s">set your AWS access keys</a> to use this addon.', 'amazon-web-services' ), 'admin.php?page=' . $this->plugin_slug ) ); // xss ok 
     317        if ( $this->needs_access_keys() ) { 
     318            throw new Exception( sprintf( __( 'You must first <a href="%s">set your AWS access keys</a> to use this addon.', 'amazon-web-services' ), 'admin.php?page=' . $this->plugin_slug ) ); 
    291319        } 
    292320 
    293321        if ( is_null( $this->client ) ) { 
    294  
    295322            $args = array(); 
    296323 
     
    363390                ) ), 
    364391                'addons' => array( 
    365                     'amazon-s3-and-cloudfront-assets' => array( 
    366                         'title' => __( 'Assets', 'amazon-web-services' ), 
    367                         'url'   => $this->dbrains_url( '/wp-offload-s3/doc/assets-addon/', array( 
     392                    'amazon-s3-and-cloudfront-assets-pull' => array( 
     393                        'title' => __( 'Assets Pull', 'amazon-web-services' ), 
     394                        'url'   => $this->dbrains_url( '/wp-offload-s3/doc/assets-pull-addon/', array( 
    368395                            'utm_campaign' => 'addons+install', 
    369396                        ) ), 
  • amazon-web-services/trunk/classes/aws-plugin-base.php

    r1681212 r1771519  
    9696     */ 
    9797    function get_defined_settings( $force = false ) { 
     98        if ( ! defined( static::SETTINGS_CONSTANT ) ) { 
     99            $this->defined_settings = array(); 
     100 
     101            return $this->defined_settings; 
     102        } 
     103 
    98104        if ( is_null( $this->defined_settings ) || $force ) { 
    99105            $this->defined_settings = array(); 
    100             $unserialized           = array(); 
    101             $class                  = get_class( $this ); 
    102  
    103             if ( defined( "$class::SETTINGS_CONSTANT" ) ) { 
    104                 $constant = static::SETTINGS_CONSTANT; 
    105                 if ( defined( $constant ) ) { 
    106                     $unserialized = maybe_unserialize( constant( $constant ) ); 
    107                 } 
    108             } 
    109  
     106            $unserialized = maybe_unserialize( constant( static::SETTINGS_CONSTANT ) ); 
    110107            $unserialized = is_array( $unserialized ) ? $unserialized : array(); 
    111108 
     
    127124                $this->defined_settings[ $key ] = $value; 
    128125            } 
     126 
     127            $this->listen_for_settings_constant_changes(); 
     128 
     129            // Normalize the defined settings before saving, so we can detect when a real change happens. 
     130            ksort( $this->defined_settings ); 
     131            update_site_option( 'as3cf_constant_' . static::SETTINGS_CONSTANT, $this->defined_settings ); 
    129132        } 
    130133 
    131134        return $this->defined_settings; 
     135    } 
     136 
     137    /** 
     138     * Subscribe to changes of the site option used to store the constant-defined settings. 
     139     */ 
     140    protected function listen_for_settings_constant_changes() { 
     141        if ( ! has_action( 'update_site_option_' . 'as3cf_constant_' . static::SETTINGS_CONSTANT, array( $this, 'settings_constant_changed' ) ) ) { 
     142            add_action( 'add_site_option_' . 'as3cf_constant_' . static::SETTINGS_CONSTANT, array( $this, 'settings_constant_added' ), 10, 3 ); 
     143            add_action( 'update_site_option_' . 'as3cf_constant_' . static::SETTINGS_CONSTANT, array( $this, 'settings_constant_changed' ), 10, 4 ); 
     144        } 
     145    } 
     146 
     147    /** 
     148     * Translate a settings constant option addition into a change. 
     149     * 
     150     * @param string $option      Name of the option. 
     151     * @param mixed  $value       Value the option is being initialized with. 
     152     * @param int    $network_id  ID of the network. 
     153     */ 
     154    public function settings_constant_added( $option, $value, $network_id ) { 
     155        $db_settings = get_site_option( static::SETTINGS_KEY, array() ); 
     156        $this->settings_constant_changed( $option, $value, $db_settings, $network_id ); 
     157    } 
     158 
     159    /** 
     160     * Callback for announcing when settings-defined values change. 
     161     * 
     162     * @param string $option        Name of the option. 
     163     * @param mixed  $new_settings  Current value of the option. 
     164     * @param mixed  $old_settings  Old value of the option. 
     165     * @param int    $network_id    ID of the network. 
     166     */ 
     167    public function settings_constant_changed( $option, $new_settings, $old_settings, $network_id ) { 
     168        $old_settings = $old_settings ?: array(); 
     169 
     170        foreach ( $this->get_settings_whitelist() as $setting ) { 
     171            $old_value = isset( $old_settings[ $setting ] ) ? $old_settings[ $setting ] : null; 
     172            $new_value = isset( $new_settings[ $setting ] ) ? $new_settings[ $setting ] : null; 
     173 
     174            if ( $old_value !== $new_value ) { 
     175                /** 
     176                 * Setting-specific hook for setting change. 
     177                 * 
     178                 * @param mixed $new_value 
     179                 * @param mixed $old_value 
     180                 * @param string $setting 
     181                 */ 
     182                do_action( 'as3cf_constant_' . static::SETTINGS_CONSTANT . '_changed_' . $setting, $new_value, $old_value, $setting ); 
     183 
     184                /** 
     185                 * Generic hook for setting change. 
     186                 * 
     187                 * @param mixed $new_value 
     188                 * @param mixed $old_value 
     189                 * @param string $setting 
     190                 */ 
     191                do_action( 'as3cf_constant_' . static::SETTINGS_CONSTANT . '_changed', $new_value, $old_value, $setting ); 
     192            } 
     193        } 
    132194    } 
    133195 
     
    230292     * Render a view template file 
    231293     * 
    232      * @param       $view View filename without the extension 
     294     * @param string $view View filename without the extension 
    233295     * @param array $args Arguments to pass to the view 
    234296     */ 
  • amazon-web-services/trunk/classes/wp-aws-compatibility-check.php

    r1553607 r1771519  
    305305         * Get the compatibility error message 
    306306         * 
    307          * @return string|void 
     307         * @return string|bool 
    308308         */ 
    309309        function get_error_msg() { 
  • amazon-web-services/trunk/languages/amazon-web-services-en.pot

    r1681212 r1771519  
    99"Project-Id-Version: amazon-web-services\n" 
    1010"Report-Msgid-Bugs-To: nom@deliciousbrains.com\n" 
    11 "POT-Creation-Date: 2017-06-19 14:44+0100\n" 
     11"POT-Creation-Date: 2017-11-20 14:50+0000\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    3232 
    3333#: classes/amazon-web-services.php:83 
    34 #: classes/amazon-web-services.php:342 
     34#: classes/amazon-web-services.php:369 
    3535#: view/settings.php:16 
    3636msgid "Access Keys" 
     
    4545msgstr "" 
    4646 
    47 #: classes/amazon-web-services.php:290 
     47#: classes/amazon-web-services.php:318 
    4848#, php-format 
    4949msgid "" 
     
    5151msgstr "" 
    5252 
    53 #: classes/amazon-web-services.php:355 
     53#: classes/amazon-web-services.php:382 
    5454msgid "WP Offload S3 Lite" 
    5555msgstr "" 
    5656 
    57 #: classes/amazon-web-services.php:360 
     57#: classes/amazon-web-services.php:387 
    5858msgid "WP Offload S3" 
    5959msgstr "" 
    6060 
    61 #: classes/amazon-web-services.php:366 
    62 msgid "Assets" 
    63 msgstr "" 
    64  
    65 #: classes/amazon-web-services.php:370 
     61#: classes/amazon-web-services.php:393 
     62msgid "Assets Pull" 
     63msgstr "" 
     64 
     65#: classes/amazon-web-services.php:397 
    6666msgid "Feature" 
    6767msgstr "" 
    6868 
    69 #: classes/amazon-web-services.php:416 
     69#: classes/amazon-web-services.php:443 
    7070msgctxt "Plugin already installed and activated" 
    7171msgid "Installed & Activated" 
    7272msgstr "" 
    7373 
    74 #: classes/amazon-web-services.php:418 
     74#: classes/amazon-web-services.php:445 
    7575msgctxt "Plugin already installed" 
    7676msgid "Installed" 
    7777msgstr "" 
    7878 
    79 #: classes/amazon-web-services.php:419 
     79#: classes/amazon-web-services.php:446 
    8080msgctxt "Activate plugin now" 
    8181msgid "Activate Now" 
    8282msgstr "" 
    8383 
    84 #: classes/amazon-web-services.php:422 
     84#: classes/amazon-web-services.php:449 
    8585msgctxt "Install plugin now" 
    8686msgid "Install Now" 
    8787msgstr "" 
    8888 
    89 #: classes/amazon-web-services.php:458 
     89#: classes/amazon-web-services.php:485 
    9090msgid "Visit Site" 
    9191msgstr "" 
    9292 
    93 #: classes/amazon-web-services.php:461 
     93#: classes/amazon-web-services.php:488 
    9494msgctxt "View plugin details" 
    9595msgid "View Details" 
     
    122122msgstr "" 
    123123 
    124 #: classes/aws-plugin-base.php:298 
     124#: classes/aws-plugin-base.php:360 
    125125msgid "Settings" 
    126126msgstr "" 
     
    218218msgstr "" 
    219219 
    220 #: view/settings.php:27 
     220#: view/settings.php:29 
     221msgid "" 
     222"Please check your wp-config.php file as it looks like one of your defines is " 
     223"missing or incorrect." 
     224msgstr "" 
     225 
     226#: view/settings.php:35 
     227#, php-format 
    221228msgid "" 
    222229"You&#8217;ve already defined your AWS access keys in your wp-config.php. If " 
    223 "you&#8217;d prefer to manage them here and store them in the database (not " 
    224 "recommended), simply remove the lines from your wp-config." 
    225 msgstr "" 
    226  
    227 #: view/settings.php:33 
     230"you&#8217;d prefer to manage them here and store them in the database (<a " 
     231"href=\"%s\">not recommended</a>), simply remove the lines from your wp-" 
     232"config." 
     233msgstr "" 
     234 
     235#: view/settings.php:43 
    228236msgid "" 
    229237"We recommend defining your Access Keys in wp-config.php so long as you " 
     
    232240msgstr "" 
    233241 
    234 #: view/settings.php:40 
     242#: view/settings.php:51 
     243#, php-format 
     244msgid "" 
     245"You&#8217;re storing your Access Keys in the database (<a href=\"%s\">not " 
     246"recommended</a>).</a>" 
     247msgstr "" 
     248 
     249#: view/settings.php:57 
    235250msgid "" 
    236251"If you&#8217;d rather store your Access Keys in the database, <a href=" 
     
    238253msgstr "" 
    239254 
    240 #: view/settings.php:56 
     255#: view/settings.php:74 
    241256msgid "Access Key ID:" 
    242257msgstr "" 
    243258 
    244 #: view/settings.php:62 
     259#: view/settings.php:80 
    245260msgid "Secret Access Key:" 
    246261msgstr "" 
    247262 
    248 #: view/settings.php:69 
     263#: view/settings.php:87 
    249264msgid "Save Changes" 
    250265msgstr "" 
    251266 
    252 #: view/settings.php:72 
     267#: view/settings.php:90 
    253268msgid "Remove Keys" 
    254269msgstr "" 
  • amazon-web-services/trunk/readme.txt

    r1681212 r1771519  
    33Tags: amazon, amazon web services 
    44Requires at least: 4.6 
    5 Tested up to: 4.8 
    6 Stable tag: 1.0.3 
     5Tested up to: 4.9 
     6Stable tag: 1.0.4 
    77License: GPLv3 
    88 
     
    3333 
    3434== Changelog == 
     35 
     36= 1.0.4 - 2017-11-20 = 
     37* Improvement: Compatibility with WordPress 4.9 
     38* Improvement: Compatibility with WP Offload S3 1.5.1 
     39* Bug fix: Reveal access keys form option shown when keys partially defined 
     40* Bug fix: WP_Error being passed to AWS methods 
     41* Bug fix: "More info" links can be broken across two lines 
    3542 
    3643= 1.0.3 - 2017-06-19 = 
  • amazon-web-services/trunk/view/settings.php

    r1681212 r1771519  
    44    $use_ec2_iam_roles = $this->use_ec2_iam_roles(); ?> 
    55 
    6     <?php if ( ! $this->are_access_keys_set() && ! $use_ec2_iam_roles ) : ?> 
     6    <?php if ( $this->needs_access_keys() ) : ?> 
    77 
    88        <p class="need-help dashicons-before dashicons-info"> 
     
    2424    <?php elseif ( ! $use_ec2_iam_roles && ( $this->are_prefixed_key_constants_set() || $this->are_key_constants_set() ) ) : ?> 
    2525 
     26        <?php if ( ! $this->are_access_keys_set() ) : ?> 
     27            <div class="notice-error notice"> 
     28                <p> 
     29                    <?php _e( 'Please check your wp-config.php file as it looks like one of your defines is missing or incorrect.', 'amazon-web-services' ); ?> 
     30                </p> 
     31            </div> 
     32        <?php endif; ?> 
     33 
    2634        <p> 
    27             <?php _e( 'You&#8217;ve already defined your AWS access keys in your wp-config.php. If you&#8217;d prefer to manage them here and store them in the database (not recommended), simply remove the lines from your wp-config.', 'amazon-web-services' ); ?> 
     35            <?php printf( __( 'You&#8217;ve already defined your AWS access keys in your wp-config.php. If you&#8217;d prefer to manage them here and store them in the database (<a href="%s">not recommended</a>), simply remove the lines from your wp-config.', 'amazon-web-services' ), $this->dbrains_url( '/wp-offload-s3/doc/quick-start-guide/#save-access-keys', array( 
     36                'utm_campaign' => 'support+docs', 
     37            ) ) ); ?> 
    2838        </p> 
    2939 
     
    3747define( 'DBI_AWS_SECRET_ACCESS_KEY', '****************************************' );</pre> 
    3848 
    39         <p class="reveal-form"> 
    40             <?php _e( 'If you&#8217;d rather store your Access Keys in the database, <a href="">click here to reveal a form.</a>', 'amazon-web-services' ); ?> 
    41         </p> 
     49        <?php if ( $this->get_access_key_id() || $this->get_secret_access_key() ) : ?> 
     50            <p> 
     51                <?php printf( __( 'You&#8217;re storing your Access Keys in the database (<a href="%s">not recommended</a>).</a>', 'amazon-web-services' ), $this->dbrains_url( '/wp-offload-s3/doc/quick-start-guide/#save-access-keys', array( 
     52                    'utm_campaign' => 'support+docs', 
     53                ) ) ); ?> 
     54            </p> 
     55        <?php else : ?> 
     56            <p class="reveal-form"> 
     57                <?php _e( 'If you&#8217;d rather store your Access Keys in the database, <a href="">click here to reveal a form.</a>', 'amazon-web-services' ); ?> 
     58            </p> 
     59        <?php endif; ?> 
    4260 
    4361        <form method="post" <?php echo ( ! $this->get_access_key_id() && ! $this->get_secret_access_key() ) ? 'style="display: none;"' : ''; // xss ok ?>> 
Note: See TracChangeset for help on using the changeset viewer.