We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12589c5 commit c60cfabCopy full SHA for c60cfab
php/media/class-upgrade.php
@@ -94,11 +94,10 @@ public function convert_cloudinary_version( $attachment_id ) {
94
}
95
96
// Build public_id.
97
- $parts = array_filter( $id_parts );
98
- $public_id = implode( '/', $parts );
99
- // Remove extension.
100
- $path = pathinfo( $public_id );
101
- $public_id = str_replace( $path['basename'], $path['filename'], $public_id );
+ $parts = array_filter( $id_parts );
+ if ( empty( $public_id ) ) {
+ $public_id = implode( '/', $parts );
+ }
102
update_post_meta( $attachment_id, Sync::META_KEYS['public_id'], $public_id );
103
$this->media->update_post_meta( $attachment_id, Sync::META_KEYS['version'], $asset_version );
104
if ( ! empty( $asset_transformations ) ) {
0 commit comments