public static function make_and_remove_thumbnails($moved_files, $additional_sizes_key = null) { foreach ($moved_files as $moved_file) { if (!empty($moved_file['to']) && !empty($moved_file['filepath_prefix'])) { Site_Upload::make_thumbnails($moved_file['to'], $moved_file['filepath_prefix'], true, $additional_sizes_key); } if (!empty($moved_file['from']) && file_exists($moved_file['from'])) { Util_file::remove($moved_file['from']); } if (!empty($moved_file['from_thumbnail'])) { Util_file::remove($moved_file['from_thumbnail']); } } }