Skip to content

Commit 080284d

Browse files
author
Marco Pereirinha
committed
Flag the syncing status
1 parent ad4b226 commit 080284d

File tree

1 file changed

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

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,18 @@ public function is_active() {
102102
* @return bool
103103
*/
104104
public function is_synced( $post_id ) {
105-
$return = false;
106105
$signature = $this->get_signature( $post_id );
107106
$expecting = $this->generate_signature( $post_id );
107+
108108
if ( ! empty( $signature ) && ! empty( $expecting ) && $expecting === $signature ) {
109-
$return = $signature;
109+
return true;
110110
}
111111

112-
return $return;
112+
if ( apply_filters( 'cloudinary_flag_sync', '__return_false' ) ) {
113+
update_post_meta( $post_id, Sync::META_KEYS['syncing'], true );
114+
}
115+
116+
return false;
113117
}
114118

115119
/**

0 commit comments

Comments
 (0)