Skip to content

Commit b038652

Browse files
committed
cleanup
1 parent 3933c4f commit b038652

File tree

1 file changed

+3
-25
lines changed
  • cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php

1 file changed

+3
-25
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-media.php

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ public function apply_default_transformations( array $transformations, $type = '
722722
*
723723
* @return string The converted URL.
724724
*/
725-
public function cloudinary_url( $attachment_id, $size = array(), $transformations = array(), $cloudinary_id = null, $overwrite_transformations = false, $clean = false ) {
725+
public function cloudinary_url( $attachment_id, $size = array(), $transformations = array(), $cloudinary_id = null, $overwrite_transformations = false ) {
726726

727727
if ( ! ( $cloudinary_id ) ) {
728728
$cloudinary_id = $this->cloudinary_id( $attachment_id );
@@ -742,7 +742,7 @@ public function cloudinary_url( $attachment_id, $size = array(), $transformation
742742
'resource_type' => $resource_type,
743743
);
744744

745-
$size = $this->prepare_size( $attachment_id, $size, $clean );
745+
$size = $this->prepare_size( $attachment_id, $size );
746746
if ( false === $overwrite_transformations ) {
747747
$overwrite_transformations = $this->maybe_overwrite_featured_image( $attachment_id );
748748
}
@@ -1028,7 +1028,7 @@ public function convert_url( $url, $attachment_id, $transformations = array(), $
10281028
}
10291029
$size = $this->get_crop( $url, $attachment_id );
10301030

1031-
return $this->cloudinary_url( $attachment_id, $size, $transformations, null, $overwrite_transformations, true );
1031+
return $this->cloudinary_url( $attachment_id, $size, $transformations, null, $overwrite_transformations );
10321032
}
10331033

10341034
/**
@@ -1113,28 +1113,6 @@ function ( $item ) use ( $crop ) {
11131113
return $sources;
11141114
}
11151115

1116-
/**
1117-
* Alter the image sizes metadata to match the Cloudinary ID so that WordPress can detect a matched source for responsive breakpoints.
1118-
*
1119-
* @param array $image_meta The image metadata array.
1120-
* @param array $size_array The size array.
1121-
* @param string $image_src The image src.
1122-
* @param int $attachment_id The attachment ID.
1123-
*
1124-
* @return array
1125-
*/
1126-
public function match_responsive_sources( $image_meta, $size_array, $image_src, $attachment_id ) {
1127-
if ( wp_attachment_is_image( $attachment_id ) && ! empty( $image_meta['sizes'] ) ) {
1128-
$cloudinary_id = $this->cloudinary_id( $attachment_id );
1129-
if ( $cloudinary_id ) {
1130-
// Set the file to the Cloudinary ID so that it will be matched.
1131-
$image_meta['file'] = $cloudinary_id;
1132-
}
1133-
}
1134-
1135-
return $image_meta;
1136-
}
1137-
11381116
/**
11391117
* Check if a url is a cloudinary url or not.
11401118
*

0 commit comments

Comments
 (0)