diff --git a/.version b/.version index 9b7a431d9..448ada3bd 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -3.2.4 \ No newline at end of file +3.2.5 \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index 480b9b0cd..1e1e39f26 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -121,6 +121,7 @@ module.exports = function ( grunt ) { '!vendor/**/*', '!package/**/*', '!php/media/class-filter.php', + '!php/misc/class-image-sizes-no-textdomain.php', ], }, }, @@ -137,6 +138,7 @@ module.exports = function ( grunt ) { 'build/*', 'vendor/*', 'package/*', + 'php/misc/class-image-sizes-no-textdomain.php', ], mainFile: 'cloudinary.php', potFilename: 'cloudinary.pot', diff --git a/languages/cloudinary.pot b/languages/cloudinary.pot index b39d9f8fe..3c0a6ae9e 100644 --- a/languages/cloudinary.pot +++ b/languages/cloudinary.pot @@ -1,14 +1,14 @@ -# Copyright (C) 2024 Cloudinary Ltd., XWP +# Copyright (C) 2025 Cloudinary Ltd., XWP # This file is distributed under the GPLv2+. msgid "" msgstr "" "Project-Id-Version: Cloudinary STABLETAG\n" "Report-Msgid-Bugs-To: https://github.com/cloudinary/cloudinary_wordpress\n" -"POT-Creation-Date: 2024-12-20 16:52:13+00:00\n" +"POT-Creation-Date: 2025-02-11 09:20:41+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2024-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2025-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: en\n" @@ -343,127 +343,127 @@ msgstr "" msgid "Plan details for @%s" msgstr "" -#: php/class-deactivation.php:115 +#: php/class-deactivation.php:114 msgid "Set up is too difficult" msgstr "" -#: php/class-deactivation.php:119 +#: php/class-deactivation.php:118 msgid "Lack of documentation" msgstr "" -#: php/class-deactivation.php:123 +#: php/class-deactivation.php:122 msgid "Not the features I wanted" msgstr "" -#: php/class-deactivation.php:127 +#: php/class-deactivation.php:126 msgid "Found a better plugin" msgstr "" -#: php/class-deactivation.php:131 +#: php/class-deactivation.php:130 msgid "Incompatible with theme or plugin" msgstr "" -#: php/class-deactivation.php:135 +#: php/class-deactivation.php:134 msgid "Other" msgstr "" -#: php/class-deactivation.php:149 +#: php/class-deactivation.php:148 msgid "Keep plugin data as it is" msgstr "" -#: php/class-deactivation.php:154 +#: php/class-deactivation.php:153 msgid "Remove all plugin data and settings" msgstr "" -#: php/class-deactivation.php:178 +#: php/class-deactivation.php:177 #. translators: The System Report link tag. msgid "Share a %s with Cloudinary to help improve the plugin." msgstr "" -#: php/class-deactivation.php:183 php/class-report.php:277 +#: php/class-deactivation.php:182 php/class-report.php:277 #: ui-definitions/settings-pages.php:395 #. translators: The System Report link and label. msgid "System Report" msgstr "" -#: php/class-deactivation.php:194 +#: php/class-deactivation.php:193 msgid "" "Caution: Your storage setting is currently set to \"Cloudinary only\", " "disabling the plugin will result in broken links to media assets. Are you " "sure you want to continue?" msgstr "" -#: php/class-deactivation.php:198 +#: php/class-deactivation.php:197 msgid "I understand and I want to proceed" msgstr "" -#: php/class-deactivation.php:204 +#: php/class-deactivation.php:203 msgid "" "Before you deactivate the plugin, would you quickly give us your reason for " "doing so?" msgstr "" -#: php/class-deactivation.php:214 +#: php/class-deactivation.php:213 msgid "Additional details:" msgstr "" -#: php/class-deactivation.php:221 +#: php/class-deactivation.php:220 msgid "Please, choose one option what we should do with the plugin’s settings" msgstr "" -#: php/class-deactivation.php:248 +#: php/class-deactivation.php:247 msgid "Allow Cloudinary to contact me regarding deactivation of the plugin." msgstr "" -#: php/class-deactivation.php:254 +#: php/class-deactivation.php:253 msgid "Skip and deactivate" msgstr "" -#: php/class-deactivation.php:257 php/class-deactivation.php:300 +#: php/class-deactivation.php:256 php/class-deactivation.php:299 msgid "Cancel" msgstr "" -#: php/class-deactivation.php:260 +#: php/class-deactivation.php:259 msgid "Submit and deactivate" msgstr "" -#: php/class-deactivation.php:263 php/class-deactivation.php:309 +#: php/class-deactivation.php:262 php/class-deactivation.php:308 msgid "Sending…" msgstr "" -#: php/class-deactivation.php:268 php/class-deactivation.php:314 +#: php/class-deactivation.php:267 php/class-deactivation.php:313 msgid "" "Uninstall has been started and the plugin will automatically be deactivated " "once complete." msgstr "" -#: php/class-deactivation.php:271 php/class-deactivation.php:317 +#: php/class-deactivation.php:270 php/class-deactivation.php:316 msgid "Close" msgstr "" -#: php/class-deactivation.php:290 +#: php/class-deactivation.php:289 msgid "We noticed you didn't connect your account. Maybe we can help?" msgstr "" -#: php/class-deactivation.php:291 +#: php/class-deactivation.php:290 msgid "" "Place your email below and our support will get back to you as soon as " "possible." msgstr "" -#: php/class-deactivation.php:294 php/class-deactivation.php:295 +#: php/class-deactivation.php:293 php/class-deactivation.php:294 msgid "Your email address" msgstr "" -#: php/class-deactivation.php:303 +#: php/class-deactivation.php:302 msgid "Deactivate" msgstr "" -#: php/class-deactivation.php:306 +#: php/class-deactivation.php:305 msgid "Contact me" msgstr "" -#: php/class-deactivation.php:464 +#: php/class-deactivation.php:463 msgid "Data clean up. The plugin will self deactivate once complete. " msgstr "" @@ -579,7 +579,7 @@ msgstr "" msgid "See examples" msgstr "" -#: php/class-plugin.php:751 +#: php/class-plugin.php:752 msgid "Visit plugin site" msgstr "" @@ -784,61 +784,41 @@ msgid "" "%1$sCloudinary Academy%2$s." msgstr "" -#: php/class-utils.php:469 +#: php/class-utils.php:472 #. translators: The plugin version. msgid "I need help with Cloudinary WordPress plugin version %s" msgstr "" -#: php/class-utils.php:473 +#: php/class-utils.php:476 msgid "" "Please, provide more details on your request, and if possible, attach a " "System Report" msgstr "" -#: php/class-utils.php:787 +#: php/class-utils.php:790 msgid "Debug log is empty" msgstr "" -#: php/class-utils.php:841 +#: php/class-utils.php:844 msgid "Missing SRC attribute." msgstr "" -#: php/class-utils.php:879 +#: php/class-utils.php:882 #. translators: The attachment ID. msgid "Clean up sync metadata for %d" msgstr "" -#: php/class-utils.php:927 -msgid "Thumbnail" -msgstr "" - -#: php/class-utils.php:928 -msgid "Medium" -msgstr "" - -#: php/class-utils.php:929 -msgid "Medium Large" -msgstr "" - -#: php/class-utils.php:930 -msgid "Large" -msgstr "" - -#: php/class-utils.php:931 -msgid "Full Size" -msgstr "" - -#: php/class-utils.php:1284 +#: php/class-utils.php:1279 msgid "Cloudinary global transformations" msgstr "" -#: php/class-utils.php:1291 +#: php/class-utils.php:1286 #. translators: %1$s is the taxonomy label and the %2$s is the context of the #. use. msgid "%1$s %2$s transformations" msgstr "" -#: php/class-utils.php:1301 +#: php/class-utils.php:1296 #. translators: %s is the term name. msgid "%s transformations" msgstr "" diff --git a/package-lock.json b/package-lock.json index 42f748088..c696ce19b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cloudinary", - "version": "3.2.3", + "version": "3.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cloudinary", - "version": "3.2.3", + "version": "3.2.4", "hasInstallScript": true, "license": "GPL-2.0+", "devDependencies": { diff --git a/package.json b/package.json index 1c3b837a9..01142fefc 100644 --- a/package.json +++ b/package.json @@ -143,5 +143,5 @@ "webpack-cli": "^4.2.0", "webpackbar": "^5.0.2" }, - "version": "3.2.4" + "version": "3.2.5" } diff --git a/php/class-utils.php b/php/class-utils.php index 0f774118b..f88c307e8 100644 --- a/php/class-utils.php +++ b/php/class-utils.php @@ -7,6 +7,7 @@ namespace Cloudinary; +use Cloudinary\Misc\Image_Sizes_No_Textdomain; use Cloudinary\Settings\Setting; use Google\Web_Stories\Story_Post_Type; use WP_Post; @@ -472,7 +473,7 @@ public static function get_support_link( $args = array() ) { $plugin->version ) ), - 'tf_description' => esc_attr( __( 'Please, provide more details on your request, and if possible, attach a System Report', 'cloudinary' ) ), + 'tf_description' => esc_attr( __( 'Please, provide more details on your request, and if possible, attach a System Report', 'cloudinary' ) ), ); $args = wp_parse_args( @@ -574,7 +575,7 @@ public static function is_rest_api() { // Fallback if rest engine is not setup yet. $rest_base = wp_parse_url( static::rest_url( '/' ), PHP_URL_PATH ); $request_uri = filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL ); - $is = strpos( $request_uri, $rest_base ) === 0; + $is = is_string( $request_uri ) && strpos( $request_uri, $rest_base ) === 0; } return $is; @@ -924,15 +925,7 @@ public static function get_registered_sizes( $attachment_id = null ) { /** This filter is documented in wp-admin/includes/media.php */ $image_sizes = apply_filters( 'image_size_names_choose', - array( - // phpcs:disable WordPress.WP.I18n.MissingArgDomain - 'thumbnail' => __( 'Thumbnail' ), - 'medium' => __( 'Medium' ), - 'medium_large' => __( 'Medium Large' ), - 'large' => __( 'Large' ), - 'full' => __( 'Full Size' ), - // phpcs:enable WordPress.WP.I18n.MissingArgDomain - ) + Image_Sizes_No_Textdomain::get_image_sizes() ); $labels = wp_parse_args( $labels, $image_sizes ); diff --git a/php/delivery/class-responsive-breakpoints.php b/php/delivery/class-responsive-breakpoints.php index b147ba232..c1f1814d7 100644 --- a/php/delivery/class-responsive-breakpoints.php +++ b/php/delivery/class-responsive-breakpoints.php @@ -140,7 +140,7 @@ protected function apply_breakpoints( $tag_element ) { $size_transformation = $this->media->get_crop_from_transformation( $this->media->get_transformations_from_string( $src ) ); $size_string = Api::generate_transformation_string( array( $size_transformation ) ); $breakpoints = array(); - while ( $max > $min ) { + while ( $max >= $min ) { if ( $width >= $max ) { $size_transformation['width'] = $max; $size_transformation['height'] = floor( $max / $ratio ); diff --git a/php/misc/class-image-sizes-no-textdomain.php b/php/misc/class-image-sizes-no-textdomain.php new file mode 100644 index 000000000..9f28eee0b --- /dev/null +++ b/php/misc/class-image-sizes-no-textdomain.php @@ -0,0 +1,36 @@ + __( 'Thumbnail' ), + 'medium' => __( 'Medium' ), + 'medium_large' => __( 'Medium Large' ), + 'large' => __( 'Large' ), + 'full' => __( 'Full Size' ), + // phpcs:enable WordPress.WP.I18n.MissingArgDomain + ); + } +} diff --git a/readme.txt b/readme.txt index 983ede424..20daa1b7a 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: Cloudinary, XWP, Automattic Tags: image-optimizer, core-web-vitals, video, resize, performance Requires at least: 4.7 -Tested up to: 6.7.1 +Tested up to: 6.7.2 Requires PHP: 5.6 Stable tag: STABLETAG License: GPLv2 @@ -63,6 +63,11 @@ To function correctly, the Cloudinary plugin requires an active WordPress REST A For more information, see [WordPress’s REST API Handbook](https://developer.wordpress.org/rest-api/). +**Does Cloudinary work on multilingual sites?** + +Absolutely! Cloudinary is fully compatible with WPML, the leading WordPress multilingual plugin, and is officially recommended for seamless media management across multiple languages. Cloudinary ensures that your media assets are efficiently handled on your multilingual site. For more details, visit [WPML's official page](https://wpml.org/plugin/cloudinary/) on Cloudinary compatibility. + + **I'm having an incompatibility issue with a theme, plugin, or hosting environment, what can I do?** We’re compatible with most other plugins so we expect it to work absolutely fine. If you do have any issues, please [contact our support team](https://support.cloudinary.com/hc/en-us/requests/new) who will help resolve your issue. @@ -142,6 +147,15 @@ Your site is now setup to start using Cloudinary. == Changelog == += 3.2.5 (19 February 2025) = + +Fixes and Improvements: + +* Fixed issue where the smallest image was not being generated by responsive breakpoints +* Resolved deprecation notice appearing on every page in PHP 8.0+ +* Updated FAQ to include details on our new WPML compatibility + + = 3.2.4 (14 January 2025) = Fixes and Improvements: diff --git a/ui-definitions/settings-pages.php b/ui-definitions/settings-pages.php index 125248772..be8b03046 100644 --- a/ui-definitions/settings-pages.php +++ b/ui-definitions/settings-pages.php @@ -446,12 +446,23 @@ 'collapsible' => 'closed', 'content' => sprintf( // translators: The HTML markup. - __( ' To function correctly, the Cloudinary plugin requires an active WordPress REST API connection. Ensure your WordPress setup, including multisite or headless configurations, has the REST API enabled and active for seamless plugin operation.%1$sFor more information, see %2$sWordPress’s REST API Handbook%3$s.', 'cloudinary' ), + __( 'To function correctly, the Cloudinary plugin requires an active WordPress REST API connection. Ensure your WordPress setup, including multisite or headless configurations, has the REST API enabled and active for seamless plugin operation.%1$sFor more information, see %2$sWordPress’s REST API Handbook%3$s.', 'cloudinary' ), '

', '', '' ), ), + array( + 'type' => 'panel', + 'title' => __( 'Does Cloudinary work on multilingual sites?', 'cloudinary' ), + 'collapsible' => 'closed', + 'content' => sprintf( + // translators: The HTML markup. + __( 'Absolutely! Cloudinary is fully compatible with WPML, the leading WordPress multilingual plugin, and is officially recommended for seamless media management across multiple languages. Cloudinary ensures that your media assets are efficiently handled on your multilingual site. For more details, visit %1$sWPML\'s official page%2$s on Cloudinary compatibility.', 'cloudinary' ), + '', + '' + ), + ), array( 'type' => 'panel', 'title' => __( "I'm having an incompatibility issue with a theme, plugin, or hosting environment, what can I do?", 'cloudinary' ),