From a149d13990b59300621e7c7e002a83c70fcf7200 Mon Sep 17 00:00:00 2001 From: Ashley Rich Date: Mon, 2 Nov 2015 14:31:18 +0000 Subject: [PATCH] Deploying version 0.9.8 --- README.md | 5 +- classes/amazon-s3-and-cloudfront.php | 41 ++++-- classes/as3cf-notices.php | 127 +++++++++++++---- classes/as3cf-plugin-compatibility.php | 163 ++++++++++++++++++++++ languages/amazon-s3-and-cloudfront-en.pot | 78 +++++++---- readme.txt | 5 +- uninstall.php | 1 + view/notice.php | 12 +- wordpress-s3.php | 6 +- 9 files changed, 366 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index bedae54c..bd91519e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront **Requires at least:** 3.7 **Tested up to:** 4.3 -**Stable tag:** 0.9.7 +**Stable tag:** 0.9.8 **License:** GPLv3 Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery. @@ -67,6 +67,9 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin ## Changelog ## +### 0.9.8 - 2015-11-02 ### +* Bug fix: Attachment URLs containing query string parameters incorrectly encoded + ### 0.9.7 - 2015-10-26 ### * Improvement: Improve compatibility with third party plugins when the _Remove Files From Server_ option is enabled * Improvement: Fix inconsistent spacing on the WP Offload S3 settings screen diff --git a/classes/amazon-s3-and-cloudfront.php b/classes/amazon-s3-and-cloudfront.php index 1ee4fc56..e59d115e 100644 --- a/classes/amazon-s3-and-cloudfront.php +++ b/classes/amazon-s3-and-cloudfront.php @@ -114,9 +114,9 @@ function init( $plugin_file_path ) { add_filter( 'wp_get_attachment_url', array( $this, 'wp_get_attachment_url' ), 99, 2 ); add_filter( 'wp_handle_upload_prefilter', array( $this, 'wp_handle_upload_prefilter' ), 1 ); add_filter( 'wp_update_attachment_metadata', array( $this, 'wp_update_attachment_metadata' ), 110, 2 ); - add_filter( 'get_image_tag', array( $this, 'maybe_encode_get_image_tag' ), 10, 6 ); - add_filter( 'wp_get_attachment_image_src', array( $this, 'maybe_encode_wp_get_attachment_image_src' ), 10, 4 ); - add_filter( 'wp_prepare_attachment_for_js', array( $this, 'maybe_encode_wp_prepare_attachment_for_js' ), 10, 3 ); + add_filter( 'get_image_tag', array( $this, 'maybe_encode_get_image_tag' ), 99, 6 ); + add_filter( 'wp_get_attachment_image_src', array( $this, 'maybe_encode_wp_get_attachment_image_src' ), 99, 4 ); + add_filter( 'wp_prepare_attachment_for_js', array( $this, 'maybe_encode_wp_prepare_attachment_for_js' ), 99, 3 ); add_filter( 'delete_attachment', array( $this, 'delete_attachment' ), 20 ); add_filter( 'update_attached_file', array( $this, 'update_attached_file' ), 100, 2 ); add_filter( 'get_attached_file', array( $this, 'get_attached_file' ), 10, 2 ); @@ -1444,37 +1444,50 @@ function encode_filename_in_path( $file ) { $url = parse_url( $file ); if ( ! isset( $url['path'] ) ) { + // Can't determine path, return original return $file; } - if ( in_array( $this->leading_slash_it( $url['path'] ), $this->encode_files ) ) { - // Already encoded return original file + if ( in_array( $this->normalize_file_path( $url['path'] ), $this->encode_files ) ) { + // Already encoded, return original return $file; } $file_path = dirname( $file ); $file_path = ( '.' !== $file_path ) ? trailingslashit( $file_path ) : ''; - $file_name = basename( $file ); + $file_name = basename( $url['path'] ); $encoded_file_name = rawurlencode( $file_name ); $encoded_file_path = $file_path . $encoded_file_name; - if ( $file_name !== $encoded_file_name ) { - $encoded_url = parse_url( $encoded_file_path ); - $this->encode_files[] = $this->leading_slash_it( $encoded_url['path'] ); + if ( $file_name === $encoded_file_name ) { + // File name doesn't need encoding, return original + return $file; + } + + $normalized_file_path = $this->normalize_file_path( $encoded_file_path ); + + if ( ! in_array( $normalized_file_path, $this->encode_files ) ) { + $this->encode_files[] = $normalized_file_path; } - return $file_path . $encoded_file_name; + return str_replace( $file_name, $encoded_file_name, $file ); } /** - * Leading slash it + * Normalize file path * * @param string $path * - * @return string + * @return string mixed */ - function leading_slash_it( $path ) { - return '/' . ltrim( $path, '/\\' ); + function normalize_file_path( $path ) { + $url = parse_url( $path ); + + if ( isset( $url['scheme'] ) ) { + $path = str_replace( $url['scheme'] . '://', '', $path ); + } + + return '/' . ltrim( $path, '/' ); } /** diff --git a/classes/as3cf-notices.php b/classes/as3cf-notices.php index b0f8e433..fbcf4515 100644 --- a/classes/as3cf-notices.php +++ b/classes/as3cf-notices.php @@ -72,9 +72,11 @@ public function add_notice( $message, $args = array() ) { 'dismissible' => true, 'inline' => false, 'flash' => true, - 'only_show_to_user' => true, + 'only_show_to_user' => true, // The user who has initiated an action resulting in notice. Otherwise show to all users. 'only_show_in_settings' => false, 'custom_id' => '', + 'auto_p' => true, // Automatically wrap the message in a

+ 'class' => '', // Extra classes for the notice ); $notice = array_intersect_key( array_merge( $defaults, $args ), $defaults ); @@ -127,7 +129,7 @@ protected function save_notice( $notice ) { * * @param array $notice */ - protected function remove_notice( $notice ) { + public function remove_notice( $notice ) { $user_id = get_current_user_id(); if ( $notice['only_show_to_user'] ) { @@ -144,17 +146,9 @@ protected function remove_notice( $notice ) { unset( $notices[ $notice['id'] ] ); if ( $notice['only_show_to_user'] ) { - if ( ! empty( $notices ) ) { - update_user_meta( $user_id, 'as3cf_notices', $notices ); - } else { - delete_user_meta( $user_id, 'as3cf_notices' ); - } + $this->update_user_meta( $user_id, 'as3cf_notices', $notices ); } else { - if ( ! empty( $notices ) ) { - set_site_transient( 'as3cf_notices', $notices ); - } else { - delete_site_transient( 'as3cf_notices' ); - } + $this->set_site_transient( 'as3cf_notices', $notices ); } } } @@ -182,17 +176,12 @@ protected function dismiss_notice( $notice_id ) { $notice = $this->find_notice_by_id( $notice_id ); if ( $notice ) { if ( $notice['only_show_to_user'] ) { - if ( ! empty( $notices ) ) { - unset( $notices[ $notice['id'] ] ); - update_user_meta( $user_id, 'as3cf_notices', $notices ); - } else { - delete_user_meta( $user_id, 'as3cf_notices' ); - } + $notices = get_user_meta( $user_id, 'as3cf_notices' ); + unset( $notices[ $notice['id'] ] ); + + $this->update_user_meta( $user_id, 'as3cf_notices', $notices ); } else { - $dismissed_notices = get_user_meta( $user_id, 'as3cf_dismissed_notices', true ); - if ( ! is_array( $dismissed_notices ) ) { - $dismissed_notices = array(); - } + $dismissed_notices = $this->get_dismissed_notices( $user_id ); if ( ! in_array( $notice['id'], $dismissed_notices ) ) { $dismissed_notices[] = $notice['id']; @@ -202,14 +191,75 @@ protected function dismiss_notice( $notice_id ) { } } + /** + * Check if a notice has been dismissed for the current user + * + * @param null|int $user_id + * + * @return array + */ + public function get_dismissed_notices( $user_id = null ) { + if ( is_null( $user_id ) ) { + $user_id = get_current_user_id(); + } + + $dismissed_notices = get_user_meta( $user_id, 'as3cf_dismissed_notices', true ); + if ( ! is_array( $dismissed_notices ) ) { + $dismissed_notices = array(); + } + + return $dismissed_notices; + } + + /** + * Un-dismiss a notice for a user + * + * @param string $notice_id + * @param null|int $user_id + * @param null|array $dismissed_notices + */ + public function undismiss_notice_for_user( $notice_id, $user_id = null, $dismissed_notices = null ) { + if ( is_null( $user_id ) ) { + $user_id = get_current_user_id(); + } + + if ( is_null( $dismissed_notices ) ) { + $dismissed_notices = $this->get_dismissed_notices( $user_id ); + } + + $key = array_search( $notice_id, $dismissed_notices ); + unset( $dismissed_notices[ $key ] ); + + $this->update_user_meta( $user_id, 'as3cf_dismissed_notices', $dismissed_notices ); + } + + /** + * Un-dismiss a notice for all users that have dismissed it + * + * @param string $notice_id + */ + public function undismiss_notice_for_all( $notice_id ) { + $args = array( + 'meta_key' => 'as3cf_dismissed_notices', + 'meta_value' => $notice_id, + 'meta_compare' => 'LIKE', + ); + + $users = get_users( $args ); + + foreach( $users as $user ) { + $this->undismiss_notice_for_user( $notice_id, $user->ID ); + } + } + /** * Find a notice by it's ID * * @param string $notice_id * - * @return mixed + * @return array|null */ - protected function find_notice_by_id( $notice_id ) { + public function find_notice_by_id( $notice_id ) { $user_id = get_current_user_id(); $user_notices = get_user_meta( $user_id, 'as3cf_notices', true ); @@ -321,4 +371,33 @@ public function ajax_dismiss_notice() { $this->as3cf->end_ajax( $out ); } + /** + * Helper to update/delete user meta + * + * @param int $user_id + * @param string $key + * @param array $value + */ + protected function update_user_meta( $user_id, $key, $value ) { + if ( empty( $value ) ) { + delete_user_meta( $user_id, $key); + } else { + update_user_meta( $user_id, $key, $value ); + } + } + + /** + * Helper to update/delete site transient + * + * @param string $key + * @param array $value + */ + protected function set_site_transient( $key, $value ) { + if ( empty( $value ) ) { + delete_site_transient( $key ); + } else { + set_site_transient( $key, $value ); + } + } + } \ No newline at end of file diff --git a/classes/as3cf-plugin-compatibility.php b/classes/as3cf-plugin-compatibility.php index dff14144..49c4ef00 100644 --- a/classes/as3cf-plugin-compatibility.php +++ b/classes/as3cf-plugin-compatibility.php @@ -46,6 +46,9 @@ function __construct( $as3cf ) { * Register the compatibility hooks */ function compatibility_init() { + // Add notices about compatibility addons to install + add_action( 'admin_init', array( $this, 'maybe_render_compatibility_addons_notice' ) ); + // Turn on stream wrapper S3 file add_filter( 'as3cf_get_attached_file', array( $this, 'get_stream_wrapper_file' ), 20, 4 ); @@ -78,6 +81,166 @@ function compatibility_init() { add_filter( 'as3cf_get_attached_file', array( $this, 'regenerate_thumbnails_download_file' ), 10, 4 ); } + /** + * Get the addons for the Pro upgrade + * + * @return array + */ + public function get_pro_addons() { + global $amazon_web_services; + + $all_addons = $amazon_web_services->get_addons( true ); + if ( ! isset( $all_addons['amazon-s3-and-cloudfront']['addons']['amazon-s3-and-cloudfront-pro']['addons'] ) ) { + return array(); + } + + $addons = $all_addons['amazon-s3-and-cloudfront']['addons']['amazon-s3-and-cloudfront-pro']['addons']; + + return $addons; + } + + /** + * Get compatibility addons that are required to be installed + * + * @return array + */ + public function get_compatibility_addons_to_install() { + $addons = $this->get_pro_addons(); + + $addons_to_install = array(); + + if ( empty ( $addons ) ) { + return $addons_to_install; + } + + foreach( $addons as $addon_slug => $addon ) { + if ( file_exists( WP_PLUGIN_DIR . '/' . $addon_slug . '/' . $addon_slug . '.php' ) ) { + // Addon already installed, ignore. + continue; + } + + if ( ! isset( $addon['parent_plugin_basename'] ) || '' === $addon['parent_plugin_basename'] ) { + // Addon doesn't have a parent plugin, ignore. + continue; + } + + if ( ! file_exists( WP_PLUGIN_DIR . '/' . $addon['parent_plugin_basename'] ) || ! is_plugin_active( $addon['parent_plugin_basename'] ) ) { + // Parent plugin not installed or not activated, ignore. + continue; + } + + $addons_to_install[ $addon_slug ] = $addon['title']; + } + + return $addons_to_install; + } + + /** + * Maybe show a notice about installing addons when the site is using the + * plugins they add compatibility for. + */ + public function maybe_render_compatibility_addons_notice() { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + return; + } + + global $as3cf_compat_check; + if ( ! $as3cf_compat_check->check_capabilities() ){ + // User can't install plugins anyway, bail. + return; + } + + $addons_to_install = $this->get_compatibility_addons_to_install(); + + $notice_id = 'as3cf-compat-addons'; + + $this->maybe_prepare_compatibility_addons_notice( $notice_id, $addons_to_install ); + + if ( empty( $addons_to_install ) ) { + return; + } + + $title = __( 'WP Offload S3 Compatibility Addons', 'amazon-s3-and-cloudfront' ); + $compat_url = 'https://deliciousbrains.com/wp-offload-s3/doc/compatibility-with-other-plugins/'; + $compat_link = sprintf( '%s', $compat_url, __( 'compatibility addons', 'amazon-s3-and-cloudfront' ) ); + $message = sprintf( __( "To get WP Offload S3 to work with certain 3rd party plugins, you must install and activate some of our %s. We've detected the following addons need to be installed.", 'amazon-s3-and-cloudfront' ), $compat_link ); + + $notice_addons_text = $this->render_addon_list( $addons_to_install ); + $notice_addons_text .= '

' . __( 'You will need to purchase a license to get access to these addons.', 'amazon-s3-and-cloudfront' ) . '

'; + $notice_addons_text .= sprintf( '

%s

', 'https://deliciousbrains.com/wp-offload-s3/pricing/', __( 'View Licenses', 'amazon-s3-and-cloudfront' ) ); + + $notice_addons_text = apply_filters( 'wpos3_compat_addons_notice', $notice_addons_text, $addons_to_install ); + + if ( false === $notice_addons_text ) { + // Allow the notice to be aborted. + return; + } + + $notice = '

' . $title . ' — ' . $message . '

' . $notice_addons_text; + + $notice_args = array( + 'type' => 'notice-warning', + 'custom_id' => $notice_id, + 'only_show_to_user' => false, + 'flash' => false, + 'auto_p' => false, + ); + + $notice_args = apply_filters( 'wpos3_compat_addons_notice_args', $notice_args, $addons_to_install ); + + update_site_option( 'as3cf_compat_addons_to_install', $addons_to_install ); + + $this->as3cf->notices->add_notice( $notice, $notice_args ); + } + + /** + * Remove the notice if exists already and undismiss the notice + * if the addons available have changed. + * + * @param int $notice_id + * @param array $addons_to_install + */ + protected function maybe_prepare_compatibility_addons_notice( $notice_id, $addons_to_install ) { + $notice = $this->as3cf->notices->find_notice_by_id( $notice_id ); + + if ( is_null( $notice ) ) { + return; + } + + $previous_addons_to_install = get_site_option( 'as3cf_compat_addons_to_install', array() ); + + if ( ! empty( $previous_addons_to_install ) && $addons_to_install !== $previous_addons_to_install ) { + // Remove dismissed flag for all users, so we reshow the notice with new addons + $this->as3cf->notices->undismiss_notice_for_all( $notice_id ); + } + + // Remove the notice so we refresh it later on + $this->as3cf->notices->remove_notice( $notice ); + } + + /** + * Render list of addons for a notice + * + * @param array $addons + * + * @return string + */ + protected function render_addon_list( $addons ) { + if ( ! is_array( $addons ) || empty( $addons ) ) { + return ''; + } + + sort( $addons ); + + $html = ''; + + return $html; + } + /** * Allow any process to trigger the copy back to local with * the filter 'as3cf_get_attached_file_copy_back_to_local' diff --git a/languages/amazon-s3-and-cloudfront-en.pot b/languages/amazon-s3-and-cloudfront-en.pot index 9663cbd3..fcfe830e 100644 --- a/languages/amazon-s3-and-cloudfront-en.pot +++ b/languages/amazon-s3-and-cloudfront-en.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: amazon-s3-and-cloudfront\n" "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n" -"POT-Creation-Date: 2015-10-26 13:57+0000\n" +"POT-Creation-Date: 2015-11-02 14:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -44,93 +44,93 @@ msgstr "" msgid "Error uploading %s to S3: %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1541 +#: classes/amazon-s3-and-cloudfront.php:1554 msgid "Cheatin’ eh?" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1545 +#: classes/amazon-s3-and-cloudfront.php:1558 msgid "You do not have sufficient permissions to access this page." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1551 +#: classes/amazon-s3-and-cloudfront.php:1564 msgid "No bucket name provided." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1826 +#: classes/amazon-s3-and-cloudfront.php:1839 msgid "Error Getting Bucket Region" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1827 +#: classes/amazon-s3-and-cloudfront.php:1840 #, php-format msgid "There was an error attempting to get the region of the bucket %s: %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1947 +#: classes/amazon-s3-and-cloudfront.php:1960 msgid "" "This is a test file to check if the user has write permission to S3. Delete " "me if found." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1979 +#: classes/amazon-s3-and-cloudfront.php:1992 #, php-format msgid "" "There was an error attempting to check the permissions of the bucket %s: %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2037 +#: classes/amazon-s3-and-cloudfront.php:2050 msgid "Error creating bucket" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2038 +#: classes/amazon-s3-and-cloudfront.php:2051 msgid "Bucket name too short." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2039 +#: classes/amazon-s3-and-cloudfront.php:2052 msgid "Bucket name too long." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2040 +#: classes/amazon-s3-and-cloudfront.php:2053 msgid "" "Invalid character. Bucket names can contain lowercase letters, numbers, " "periods and hyphens." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2041 +#: classes/amazon-s3-and-cloudfront.php:2054 msgid "Error saving bucket" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2042 +#: classes/amazon-s3-and-cloudfront.php:2055 msgid "Error fetching buckets" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2043 +#: classes/amazon-s3-and-cloudfront.php:2056 msgid "Error getting URL preview: " msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2044 +#: classes/amazon-s3-and-cloudfront.php:2057 msgid "The changes you made will be lost if you navigate away from this page" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2104 +#: classes/amazon-s3-and-cloudfront.php:2117 msgid "Cheatin' eh?" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2207 +#: classes/amazon-s3-and-cloudfront.php:2220 msgctxt "Show the media library tab" msgid "Media Library" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2208 +#: classes/amazon-s3-and-cloudfront.php:2221 msgctxt "Show the support tab" msgid "Support" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2360 +#: classes/amazon-s3-and-cloudfront.php:2373 #, php-format msgid "The file %s has been given %s permissions on Amazon S3." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2372 +#: classes/amazon-s3-and-cloudfront.php:2385 msgid "" "Image Manipulation Library Missing — Looks like you " "don't have an image manipulation library installed on this server and " @@ -138,11 +138,11 @@ msgid "" "Please setup GD or ImageMagick." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2902 +#: classes/amazon-s3-and-cloudfront.php:2915 msgid "Quick Start Guide" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2904 +#: classes/amazon-s3-and-cloudfront.php:2917 #, php-format msgid "" "Looks like we don't have write access to this bucket. It's likely that the " @@ -151,7 +151,7 @@ msgid "" "correctly." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2906 +#: classes/amazon-s3-and-cloudfront.php:2919 #, php-format msgid "" "Looks like we don't have access to the buckets. It's likely that the user " @@ -159,15 +159,39 @@ msgid "" "Please see our %s for instructions on setting up permissions correctly." msgstr "" -#: classes/as3cf-notices.php:297 +#: classes/as3cf-notices.php:347 msgid "Error dismissing notice." msgstr "" -#: classes/as3cf-notices.php:312 +#: classes/as3cf-notices.php:362 msgid "Invalid notice ID." msgstr "" -#: classes/as3cf-plugin-compatibility.php:444 +#: classes/as3cf-plugin-compatibility.php:163 +msgid "WP Offload S3 Compatibility Addons" +msgstr "" + +#: classes/as3cf-plugin-compatibility.php:165 +msgid "compatibility addons" +msgstr "" + +#: classes/as3cf-plugin-compatibility.php:166 +#, php-format +msgid "" +"To get WP Offload S3 to work with certain 3rd party plugins, you must " +"install and activate some of our %s. We've detected the following addons " +"need to be installed." +msgstr "" + +#: classes/as3cf-plugin-compatibility.php:169 +msgid "You will need to purchase a license to get access to these addons." +msgstr "" + +#: classes/as3cf-plugin-compatibility.php:170 +msgid "View Licenses" +msgstr "" + +#: classes/as3cf-plugin-compatibility.php:607 #: classes/upgrades/as3cf-meta-wp-error.php:72 #, php-format msgid "There was an error attempting to download the file %s from S3: %s" diff --git a/readme.txt b/readme.txt index b0348524..7b30af30 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: bradt, deliciousbrains Tags: uploads, amazon, s3, mirror, admin, media, cdn, cloudfront Requires at least: 3.7 Tested up to: 4.3 -Stable tag: 0.9.7 +Stable tag: 0.9.8 License: GPLv3 Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery. @@ -63,6 +63,9 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin == Changelog == += 0.9.8 - 2015-11-02 = +* Bug fix: Attachment URLs containing query string parameters incorrectly encoded + = 0.9.7 - 2015-10-26 = * Improvement: Improve compatibility with third party plugins when the _Remove Files From Server_ option is enabled * Improvement: Fix inconsistent spacing on the WP Offload S3 settings screen diff --git a/uninstall.php b/uninstall.php index 2b46bac5..bd25c1db 100644 --- a/uninstall.php +++ b/uninstall.php @@ -20,6 +20,7 @@ 'tantan_wordpress_s3', 'update_meta_with_region_session', 'update_file_sizes_session', + 'as3cf_compat_addons_to_install' ); $postmeta = array( diff --git a/view/notice.php b/view/notice.php index 9d03d4e2..0193f3a4 100644 --- a/view/notice.php +++ b/view/notice.php @@ -4,7 +4,15 @@ $inline = ( isset( $inline ) ) ? $inline : false; $id = ( isset( $id ) ) ? 'id="' . $id . '"' : ''; $style = ( isset( $style ) ) ? $style : ''; +$auto_p = ( isset( $auto_p ) ) ? $auto_p : 'true'; +$class = ( isset( $class ) ) ? $class : ''; ?> -
class="notice as3cf-notice " style=""> -

+
class="notice as3cf-notice " style=""> + +

+ + + +

+
\ No newline at end of file diff --git a/wordpress-s3.php b/wordpress-s3.php index 7b7cb7e7..77efb1c2 100644 --- a/wordpress-s3.php +++ b/wordpress-s3.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/ Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery. Author: Delicious Brains -Version: 0.9.7 +Version: 0.9.8 Author URI: http://deliciousbrains.com/ Network: True Text Domain: amazon-s3-and-cloudfront @@ -26,13 +26,13 @@ // Then completely rewritten. */ -$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '0.9.7'; +$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '0.9.8'; $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['supported_addon_versions'] = array( 'amazon-s3-and-cloudfront-pro' => '1.0b1', ); -$aws_plugin_version_required = '0.3'; +$aws_plugin_version_required = '0.3.4'; require dirname( __FILE__ ) . '/classes/wp-aws-compatibility-check.php'; global $as3cf_compat_check;