Skip to content

Commit 504a53d

Browse files
author
Marco Pereirinha
committed
The cloudinary_id is either null or string
1 parent c815aa4 commit 504a53d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

php/class-media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ protected function get_cache_key( $args ) {
996996
* @param int $attachment_id The id of the attachment.
997997
* @param array|string $size The wp size to set for the URL.
998998
* @param array $transformations Set of transformations to apply to this url.
999-
* @param string $cloudinary_id Optional forced cloudinary ID.
999+
* @param string|null $cloudinary_id Optional forced cloudinary ID.
10001000
* @param bool $overwrite_transformations Flag url is a breakpoint URL to stop re-applying default transformations.
10011001
*
10021002
* @return string The converted URL.

php/delivery/class-lazy-load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function add_features( $tag_element, $attachment_id, $original_tag ) {
125125
}
126126
$src = $tag_element['atts']['src'];
127127
if ( ! $this->media->is_cloudinary_url( $src ) ) {
128-
$src = $this->media->cloudinary_url( $attachment_id, array(), array(), array(), $tag_element['cld-overwrite'] );
128+
$src = $this->media->cloudinary_url( $attachment_id, array(), array(), null, $tag_element['cld-overwrite'] );
129129
}
130130
$tag_element['atts']['data-src'] = $src;
131131
$transformations = $this->media->get_transformations_from_string( $src );

php/delivery/class-responsive-breakpoints.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function setup_hooks() {
5757
public function add_features( $tag_element, $attachment_id, $original_tag ) {
5858

5959
if ( ! $this->media->is_cloudinary_url( $tag_element['atts']['src'] ) ) {
60-
$tag_element['atts']['src'] = $this->media->cloudinary_url( $attachment_id, array(), array(), array(), $tag_element['cld-overwrite'] );
60+
$tag_element['atts']['src'] = $this->media->cloudinary_url( $attachment_id, array(), array(), null, $tag_element['cld-overwrite'] );
6161
}
6262
$transformations = $this->media->get_transformations_from_string( $tag_element['atts']['src'] );
6363
$original_string = Api::generate_transformation_string( $transformations );

0 commit comments

Comments
 (0)