Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public function can_delete_asset( $all_caps, $caps, $args ) {
$has_error = $this->plugin->components['media']->get_post_meta( $post_id, Sync::META_KEYS['sync_error'], true );
if ( empty( $has_error ) ) {
$all_caps['delete_posts'] = false;
if ( filter_input( INPUT_GET, 'action', FILTER_DEFAULT ) ) {
$action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
if ( ! empty( $action ) && '-1' !== $action ) {
wp_die( esc_html__( 'Sorry, you can’t delete an asset until it has fully synced with Cloudinary. Try again once syncing is complete.', 'cloudinary' ) );
}
}
Expand Down