Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1-build-1
3.2.1-build-2
2 changes: 1 addition & 1 deletion js/cloudinary.js

Large diffs are not rendered by default.

76 changes: 40 additions & 36 deletions languages/cloudinary.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Cloudinary STABLETAG\n"
"Report-Msgid-Bugs-To: https://github.com/cloudinary/cloudinary_wordpress\n"
"POT-Creation-Date: 2024-09-17 17:28:45+00:00\n"
"POT-Creation-Date: 2024-09-18 11:55:33+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -218,46 +218,46 @@ msgstr ""
msgid "Enable caching site assets."
msgstr ""

#: php/class-connect.php:264
#: php/class-connect.php:266
msgid "Connection to Cloudinary has been removed."
msgstr ""

#: php/class-connect.php:285
#: php/class-connect.php:287
msgid ""
"The environment variable URL must be in this format: "
"cloudinary://API_KEY:API_SECRET@CLOUD_NAME"
msgstr ""

#: php/class-connect.php:306
#: php/class-connect.php:308
msgid "Successfully connected to Cloudinary."
msgstr ""

#: php/class-connect.php:350
#: php/class-connect.php:352
#. translators: Placeholder refers the error from API.
msgid "Cloudinary Error: %s"
msgstr ""

#: php/class-connect.php:358
#: php/class-connect.php:360
#. translators: Placeholders are <a> tags.
msgid ""
"Cloudinary Account Disabled. %1$s Upgrade your plan %3$s or %2$s submit a "
"support request %3$s for assistance."
msgstr ""

#: php/class-connect.php:403
#: php/class-connect.php:405
#. translators: Placeholder refers to the expected URL format.
msgid "Incorrect Format. Expecting: %s"
msgstr ""

#: php/class-connect.php:415
#: php/class-connect.php:417
msgid "CNAME is not a valid domain name."
msgstr ""

#: php/class-connect.php:805
#: php/class-connect.php:807
msgid "upgrade your account"
msgstr ""

#: php/class-connect.php:820
#: php/class-connect.php:822
#. translators: %1$s quota size, %2$s amount in percent, %3$s link URL, %4$s
#. link anchor text.
msgid ""
Expand All @@ -269,11 +269,11 @@ msgid ""
"full functionality."
msgstr ""

#: php/class-connect.php:1015
#: php/class-connect.php:1017
msgid "Cloudinary was able to connect to the WordPress REST API."
msgstr ""

#: php/class-connect.php:1032 php/class-connect.php:1042
#: php/class-connect.php:1034 php/class-connect.php:1044
#. translators: 1: The WordPress error message. 2: The WordPress error code.
msgid "The Cloudinary REST API endpoints are not available. Error: %1$s (%2$s)"
msgstr ""
Expand Down Expand Up @@ -513,59 +513,59 @@ msgid ""
"WordPress."
msgstr ""

#: php/class-media.php:2048
#: php/class-media.php:2049
msgid "Import"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "Cloudinary"
msgstr ""

#: php/class-media.php:2404
#: php/class-media.php:2405
msgid "The delivery for this asset is disabled."
msgstr ""

#: php/class-media.php:2408
#: php/class-media.php:2409
msgid "Not syncable. This is an external media."
msgstr ""

#: php/class-media.php:2412
#: php/class-media.php:2413
msgid "This media is Fetch type."
msgstr ""

#: php/class-media.php:2416
#: php/class-media.php:2417
msgid "This media is Sprite type."
msgstr ""

#: php/class-media.php:2426
#: php/class-media.php:2427
msgid "Not Synced"
msgstr ""

#: php/class-media.php:2431
#: php/class-media.php:2432
msgid "Synced"
msgstr ""

#: php/class-media.php:3082
#: php/class-media.php:3083
msgid "No Cloudinary filters"
msgstr ""

#: php/class-media.php:3182
#: php/class-media.php:3183
msgid "Media Settings"
msgstr ""

#: php/class-media.php:3185
#: php/class-media.php:3186
msgid "Media Display"
msgstr ""

#: php/class-media.php:3189 php/media/class-global-transformations.php:620
#: php/class-media.php:3190 php/media/class-global-transformations.php:620
#: php/ui/component/class-asset-preview.php:73
#: php/ui/component/class-plan-details.php:119
#: php/ui/component/class-plan-status.php:128
#: ui-definitions/settings-sidebar.php:44
msgid "Transformations"
msgstr ""

#: php/class-media.php:3190
#: php/class-media.php:3191
msgid ""
"Cloudinary allows you to easily transform your images on-the-fly to any "
"required format, style and dimension, and also optimizes images for minimal "
Expand All @@ -574,7 +574,7 @@ msgid ""
"transformation and delivery URLs."
msgstr ""

#: php/class-media.php:3195 ui-definitions/settings-image.php:164
#: php/class-media.php:3196 ui-definitions/settings-image.php:164
#: ui-definitions/settings-video.php:250
msgid "See examples"
msgstr ""
Expand Down Expand Up @@ -1714,56 +1714,60 @@ msgstr ""
msgid "Update the connection string"
msgstr ""

#: ui-definitions/components/wizard.php:146
#: ui-definitions/components/wizard.php:145
msgid "Cancel the update"
msgstr ""

#: ui-definitions/components/wizard.php:147
msgid "Connected!"
msgstr ""

#: ui-definitions/components/wizard.php:149
#: ui-definitions/components/wizard.php:150
msgid "Incorrect connection string"
msgstr ""

#: ui-definitions/components/wizard.php:160
#: ui-definitions/components/wizard.php:161
msgid "We collected some basic settings for you"
msgstr ""

#: ui-definitions/components/wizard.php:164
#: ui-definitions/components/wizard.php:165
msgid ""
"The options below help to optimize all of your assets, we recommend leaving "
"them on for the most optimal site performance. Click next to complete your "
"setup, the plugin will begin syncing your assets to Cloudinary and your "
"website will start being fast, optimized and responsive."
msgstr ""

#: ui-definitions/components/wizard.php:183
#: ui-definitions/components/wizard.php:184
msgid "All set! We're starting to sync your files to Cloudinary"
msgstr ""

#: ui-definitions/components/wizard.php:187
#: ui-definitions/components/wizard.php:188
msgid ""
"You have successfully set up the Cloudinary plugin for your site, your "
"media assets will now be optimized and delivered via fast CDN. To further "
"configure the plugin, take a look at the various settings available."
msgstr ""

#: ui-definitions/components/wizard.php:194
#: ui-definitions/components/wizard.php:195
msgid ""
"Once your assets have finished syncing, the plugin dashboard will show the "
"impact on performance for your site."
msgstr ""

#: ui-definitions/components/wizard.php:196
#: ui-definitions/components/wizard.php:197
msgid "Go to plugin dashboard"
msgstr ""

#: ui-definitions/components/wizard.php:202
#: ui-definitions/components/wizard.php:203
msgid "Click the lock to make changes"
msgstr ""

#: ui-definitions/components/wizard.php:206
#: ui-definitions/components/wizard.php:207
msgid "Back"
msgstr ""

#: ui-definitions/components/wizard.php:207
#: ui-definitions/components/wizard.php:208
msgid "Next"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@
"webpack-cli": "^4.2.0",
"webpackbar": "^5.0.2"
},
"version": "3.2.1-build-1"
"version": "3.2.1-build-2"
}
6 changes: 4 additions & 2 deletions php/class-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ public function rest_save_wizard( WP_REST_Request $request ) {
$advanced = true === $request->get_param( 'advanced' ) ? 'on' : 'off';

// Cloudinary URL.
$connect = $this->settings->get_setting( 'cloudinary_url' );
$connect->set_pending( $url );
if ( ! empty( $url ) && true !== $url ) {
$connect = $this->settings->get_setting( 'cloudinary_url' );
$connect->set_pending( $url );
}

// Autosync setup.
$autosync = $this->settings->get_setting( 'auto_sync' );
Expand Down
3 changes: 2 additions & 1 deletion php/class-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,8 @@ public function prepare_size( $attachment_id, $size ) {
}
} elseif ( is_string( $size ) || ( is_array( $size ) && 3 === count( $size ) ) ) {
$intermediate = image_get_intermediate_size( $attachment_id, $size );
if ( is_array( $intermediate ) ) {
// PDF's do not have intermediate URL.
if ( is_array( $intermediate ) && ! empty( $intermediate['url'] ) ) {
$size = $this->get_crop( $intermediate['url'], $attachment_id );
}
} elseif ( array_keys( $size ) === array( 0, 1 ) ) {
Expand Down
29 changes: 24 additions & 5 deletions src/js/components/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ const Wizard = {
working: document.getElementById( 'connection-working' ),
},
debounceConnect: null,
updateConnection: document.getElementById( 'update-connection' ),
cancelUpdateConnection: document.getElementById(
'cancel-update-connection'
),
config: {},
didSave: false,
init() {
if ( ! cldData.wizard ) {
return;
Expand All @@ -55,12 +60,23 @@ const Wizard = {
const connectionInput = document.getElementById(
'connect.cloudinary_url'
);
const updateConnection = document.getElementById( 'update-connection' );
const didSave = false;

updateConnection.addEventListener( 'click', () => {
this.updateConnection.addEventListener( 'click', () => {
this.lockNext();
connectionInput.parentNode.classList.remove( 'hidden' );
updateConnection.classList.add( 'hidden' );
this.cancelUpdateConnection.classList.remove( 'hidden' );
this.updateConnection.classList.add( 'hidden' );
} );

this.cancelUpdateConnection.addEventListener( 'click', () => {
this.unlockNext();
connectionInput.parentNode.classList.add( 'hidden' );
this.cancelUpdateConnection.classList.add( 'hidden' );
this.updateConnection.classList.remove( 'hidden' );
this.config.cldString = true;
connectionInput.value = '';
this.connection.error.classList.remove( 'active' );
this.connection.success.classList.add( 'active' );
} );

[ ...navs ].forEach( ( button ) => {
Expand Down Expand Up @@ -104,7 +120,7 @@ const Wizard = {

if ( this.config.cldString ) {
connectionInput.parentNode.classList.add( 'hidden' );
updateConnection.classList.remove( 'hidden' );
this.updateConnection.classList.remove( 'hidden' );
}

this.getTab( this.config.tab );
Expand Down Expand Up @@ -202,6 +218,9 @@ const Wizard = {
} else {
this.showSuccess();
}
if ( this.updateConnection.classList.contains( 'hidden' ) ) {
this.lockNext();
}
break;
case 3:
if ( ! this.config.cldString ) {
Expand Down
1 change: 1 addition & 0 deletions ui-definitions/components/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<input type="text" class="connection-string cld-ui-input regular-text" name="connect[cloudinary_url]" id="connect.cloudinary_url" value="" placeholder="cloudinary://API_KEY:API_SECRET@CLOUD_NAME">
</div>
<button id="update-connection" class="button button-primary hidden"><?php esc_html_e( 'Update the connection string', 'cloudinary' ); ?></button>
<button id="cancel-update-connection" class="button button-secondary hidden"><?php esc_html_e( 'Cancel the update', 'cloudinary' ); ?></button>
<span id="connection-success" class="cld-wizard-connect-status success">
<span class="dashicons dashicons-yes-alt"></span> <?php esc_html_e( 'Connected!', 'cloudinary' ); ?>
</span>
Expand Down