From 9f9e1efbe71258c0b1fe1a918e8194613d9ac16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Thu, 23 Jan 2025 16:45:03 +0100 Subject: [PATCH 1/8] Fix deprecation notices in Utils::is_rest_api. --- php/class-utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/class-utils.php b/php/class-utils.php index 0f774118b..4c6569e29 100644 --- a/php/class-utils.php +++ b/php/class-utils.php @@ -574,7 +574,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; From 7a10855401d8d0405d0f2c0123a7272c76cc55af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Mon, 27 Jan 2025 20:42:02 +0100 Subject: [PATCH 2/8] Fix: Smallest image is not created with responsive image --- php/delivery/class-responsive-breakpoints.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); From 3eb212ae81710249ebac229cc56d36fad35f082f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Thu, 6 Feb 2025 12:54:51 +0100 Subject: [PATCH 3/8] Update readme.txt with WPML compatibility. --- readme.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.txt b/readme.txt index 983ede424..f527c37e0 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,12 @@ Your images may be loading locally for a number of reasons: The Cloudinary lazy loading scripts must be loaded in the page head. Ensure your site or any 3rd party plugins are not setup to move these scripts. + +**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. + + == About Cloudinary == Read more about Cloudinary: From 19128c501271c94f90acc164a12cbbd9bcac0f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Thu, 6 Feb 2025 12:57:38 +0100 Subject: [PATCH 4/8] Move the WPML information in the FAQ list. --- readme.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/readme.txt b/readme.txt index f527c37e0..3f363fcb8 100644 --- a/readme.txt +++ b/readme.txt @@ -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. @@ -86,12 +91,6 @@ Your images may be loading locally for a number of reasons: The Cloudinary lazy loading scripts must be loaded in the page head. Ensure your site or any 3rd party plugins are not setup to move these scripts. - -**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. - - == About Cloudinary == Read more about Cloudinary: From 09588523daeb724aaf9bb67629531ba188313c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Mon, 10 Feb 2025 12:50:09 +0100 Subject: [PATCH 5/8] Ensure the 'cloudinary' textdomain is not added automatically where we don't want it. --- gruntfile.js | 1 + php/class-utils.php | 13 ++----- php/misc/class-image-sizes-no-textdomain.php | 36 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 php/misc/class-image-sizes-no-textdomain.php diff --git a/gruntfile.js b/gruntfile.js index 480b9b0cd..9114273cb 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', ], }, }, diff --git a/php/class-utils.php b/php/class-utils.php index 4c6569e29..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( @@ -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/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 + ); + } +} From e4e0da59ef7c60eb6b8159c0985eba0f0d71c3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Tue, 11 Feb 2025 10:23:27 +0100 Subject: [PATCH 6/8] Pre-release build to update .pot and package-lock.json. --- gruntfile.js | 1 + languages/cloudinary.pot | 100 ++++++++++++++++----------------------- package-lock.json | 4 +- 3 files changed, 43 insertions(+), 62 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index 9114273cb..1e1e39f26 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -138,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": { From 21eac40231b7510f9b0e644a0ed86257ec8b515f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Polakovi=C4=8D?= Date: Tue, 18 Feb 2025 19:44:27 +0100 Subject: [PATCH 7/8] Add info on multilingual support to the plugin. --- ui-definitions/settings-pages.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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' ), From 77a71853690a269b3ea67bc3b4783db4db020bc8 Mon Sep 17 00:00:00 2001 From: Amit Brucker Date: Wed, 19 Feb 2025 17:12:47 +0200 Subject: [PATCH 8/8] version bump --- .version | 2 +- package.json | 2 +- readme.txt | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) 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/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/readme.txt b/readme.txt index 3f363fcb8..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 @@ -147,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: