Skip to content

Commit 9c13747

Browse files
committed
remove is_admin, and replace with is_downsize loop check.
1 parent 532c4eb commit 9c13747

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,10 @@ public function get_transformations_from_string( $str, $type = 'image' ) {
463463
* @return string Cloudinary URL.
464464
*/
465465
public function attachment_url( $url, $attachment_id ) {
466-
if ( ! doing_action( 'wp_insert_post_data' ) && ! is_admin() ) {
466+
if ( ! doing_action( 'wp_insert_post_data' ) && false === $this->in_downsize ) {
467467
$cloudinary_id = $this->cloudinary_id( $attachment_id );
468468
if ( false !== $cloudinary_id ) {
469-
$url = $this->cloudinary_url( $attachment_id, $cloudinary_id );
469+
$url = $this->cloudinary_url( $attachment_id );
470470
}
471471
}
472472

0 commit comments

Comments
 (0)