diff --git a/lib/classes/class-utility.php b/lib/classes/class-utility.php index fe037e9be..596af8b97 100644 --- a/lib/classes/class-utility.php +++ b/lib/classes/class-utility.php @@ -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; diff --git a/readme.txt b/readme.txt index 7b011128c..bbaf97ea3 100644 --- a/readme.txt +++ b/readme.txt @@ -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