Skip to content

Commit 5c3321d

Browse files
authored
Merge pull request #430 from cloudinary/hotfixes
Hotfixes
2 parents e747697 + 3b79e12 commit 5c3321d

File tree

11 files changed

+35
-19
lines changed

11 files changed

+35
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ coverage/html/
4444
.vscode
4545
cloudinary-image-management-and-manipulation-in-the-cloud-cdn
4646
cloudinary-image-management-and-manipulation-in-the-cloud-cdn.zip
47+
cloudinary-wordpress-v2.zip

cloudinary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Cloudinary
44
* Plugin URI: https://cloudinary.com/documentation/wordpress_integration
55
* Description: With the Cloudinary plugin, you can upload and manage your media assets in the cloud, then deliver them to your users through a fast content delivery network, improving your website’s loading speed and overall user experience. Apply multiple transformations and take advantage of a full digital asset management solution without leaving WordPress.
6-
* Version: 2.7.1
6+
* Version: 2.7.2-rc-2
77
* Author: Cloudinary Ltd., XWP
88
* Author URI: https://cloudinary.com/
99
* License: GPLv2+

gruntfile.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ module.exports = function ( grunt ) {
5454
compress: {
5555
release: {
5656
options: {
57-
archive:
58-
'cloudinary-image-management-and-manipulation-in-the-cloud-cdn.zip',
57+
archive: 'cloudinary-wordpress-v2.zip',
5958
},
6059
cwd: 'build',
6160
dest:
@@ -71,16 +70,18 @@ module.exports = function ( grunt ) {
7170
},
7271
assets: {
7372
// Deploy only screenshots and icons.
74-
...options,
75-
deploy_trunk: false,
76-
deploy_tag: false,
73+
options: {
74+
...options,
75+
deploy_trunk: false,
76+
deploy_tag: false,
77+
},
7778
},
7879
},
7980
} );
8081

8182
grunt.registerTask( 'package', [ 'clean', 'copy', 'replace', 'compress' ] );
8283

83-
grunt.registerTask( 'deploy', [ 'package', 'wp_deploy' ] );
84+
grunt.registerTask( 'deploy', [ 'package', 'wp_deploy:default' ] );
8485

8586
grunt.registerTask( 'deploy-assets', [ 'wp_deploy:assets' ] );
8687
};

js/cloudinary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/gallery-block.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '54ddd5468cd6b1f2cef0d5b4ca5d19eb');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '95635dcdce3468c638dab46e572af7a3');

js/gallery-block.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/gallery.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4df595e09f7d7da9fac1e3e07b2944d4');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '29099104bb87442e73de687aa973be61');

js/gallery.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/class-media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ private function create_attachment( $asset, $public_id ) {
14771477

14781478
$sync_key = $asset['sync_key'];
14791479
// Capture public_id. Use core update_post_meta since this attachment data doesnt exist yet.
1480-
$this->update_post_meta( $attachment_id, Sync::META_KEYS['public_id'], $public_id );
1480+
update_post_meta( $attachment_id, Sync::META_KEYS['public_id'], $public_id );
14811481
// Capture version number.
14821482
$this->update_post_meta( $attachment_id, Sync::META_KEYS['version'], $asset['version'] );
14831483
if ( ! empty( $asset['transformations'] ) ) {

php/class-sync.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,15 @@ public function delete_cloudinary_meta( $attachment_id ) {
932932
$queued = get_post_meta( $attachment_id, self::META_KEYS['queued'] );
933933
delete_post_meta( $attachment_id, self::META_KEYS['pending'] );
934934
delete_post_meta( $attachment_id, self::META_KEYS['queued'] );
935+
delete_post_meta( $attachment_id, self::META_KEYS['suffix'] );
936+
delete_post_meta( $attachment_id, self::META_KEYS['public_id'] );
935937
delete_post_meta( $attachment_id, $queued );
938+
939+
// Signatures cleanup.
940+
$signatures = $this->get_signature( $attachment_id );
941+
foreach ( $signatures as $signature ) {
942+
delete_post_meta( $attachment_id, "_{$signature}" );
943+
}
936944
}
937945

938946
/**

0 commit comments

Comments
 (0)