Skip to content

Commit

Permalink
Video file does not get deleted #418
Browse files Browse the repository at this point in the history
  • Loading branch information
Md. Alimuzzaman Alim committed Dec 2, 2019
1 parent f324f72 commit 3a39cc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/classes/class-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,12 @@ public static function can_delete_attachment($attachment_id, $args){
){
// checks whether it's WP 5.3 and 'intermediate_image_sizes_advanced' is passed.
// To be sure that we don't delete full size image before thumbnails are generated.
if(is_wp_version_compatible('5.3-RC4-46673') && !in_array($attachment_id, self::$can_delete_attachment)){
if(
wp_attachment_is_image($attachment_id) &&
function_exists('is_wp_version_compatible') &&
is_wp_version_compatible('5.3-RC4-46673') &&
!in_array($attachment_id, self::$can_delete_attachment)
){
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.usabilitydynamics.com
Tags: google, google cloud, google cloud storage, cdn, uploads, media, stateless, backup
License: GPLv2 or later
Requires PHP: 5.5
Requires at least: 4.0
Requires at least: 4.7.0
Tested up to: 5.3
Stable tag: 2.3.1

Expand Down

0 comments on commit 3a39cc4

Please sign in to comment.