@@ -190,6 +190,7 @@ public function get_syncable_delivery_types() {
190190 */
191191 return apply_filters ( 'cloudinary_syncable_delivery_types ' , $ types );
192192 }
193+
193194 /**
194195 * Get convertible extensions and converted file types.
195196 *
@@ -273,9 +274,10 @@ public function is_media( $attachment_id ) {
273274 */
274275 public function is_local_media ( $ attachment_id ) {
275276 $ local_host = wp_parse_url ( get_site_url (), PHP_URL_HOST );
276- $ media_host = wp_parse_url ( get_the_guid ( $ attachment_id ), PHP_URL_HOST );
277+ $ guid = get_the_guid ( $ attachment_id );
278+ $ media_host = wp_parse_url ( $ guid , PHP_URL_HOST );
277279
278- return $ local_host === $ media_host ;
280+ return $ local_host === $ media_host || $ this -> is_cloudinary_url ( $ guid ) ;
279281 }
280282
281283 /**
@@ -1379,7 +1381,7 @@ public function is_cloudinary_url( $url ) {
13791381 * @return bool
13801382 */
13811383 public function is_cloudinary_sync_folder ( $ url ) {
1382- $ path = wp_parse_url ( $ url , PHP_URL_PATH );
1384+ $ path = wp_parse_url ( $ url , PHP_URL_PATH );
13831385 $ parts = explode ( '/ ' , $ path );
13841386
13851387 // Remove public id and file name.
@@ -1714,18 +1716,15 @@ public function media_column_value( $column_name, $attachment_id ) {
17141716 ?>
17151717 <span class="dashicons-cloudinary <?php echo esc_attr ( $ status ['state ' ] ); ?> " title="<?php echo esc_attr ( $ status ['note ' ] ); ?> "></span>
17161718 <?php
1717- endif ;
1718- if ( ! $ this ->is_local_media ( $ attachment_id ) ) :
1719+ elseif ( ! $ this ->is_local_media ( $ attachment_id ) ) :
17191720 ?>
17201721 <span class="dashicons-cloudinary info" title="<?php esc_attr_e ( 'Not syncable. This is an external media. ' , 'cloudinary ' ); ?> "></span>
17211722 <?php
1722- endif ;
1723- if ( 'fetch ' === $ this ->get_media_delivery ( $ attachment_id ) ) :
1723+ elseif ( 'fetch ' === $ this ->get_media_delivery ( $ attachment_id ) ) :
17241724 ?>
17251725 <span class="dashicons-cloudinary info" title="<?php esc_attr_e ( 'This media is Fetch type. ' , 'cloudinary ' ); ?> "></span>
17261726 <?php
1727- endif ;
1728- if ( 'sprite ' === $ this ->get_media_delivery ( $ attachment_id ) ) :
1727+ elseif ( 'sprite ' === $ this ->get_media_delivery ( $ attachment_id ) ) :
17291728 ?>
17301729 <span class="dashicons-cloudinary info" title="<?php esc_attr_e ( 'This media is Sprite type. ' , 'cloudinary ' ); ?> "></span>
17311730 <?php
0 commit comments