/** * Determines whether the cache entry needs to be updated * for a specified file. * @param string file (path) * @param int width to resize to * @param int height to resize to * @param int value between 0 and 100 for jpeg; null for any other format * @param int last modified timestamp of the file in question * @param boolean true if cache needs to be created / updated */ function cached_file_is_needed($src, $width, $height, $quality, $timestamp) { $cached_file = wpws_ImageUtils::get_cached_file($src, $width, $height, $quality); if (!$cached_file) { return true; } $cached_file_timestamp = wpws_ImageUtils::get_mtime_from_cached_file($cached_file); if ($cached_file_timestamp != $timestamp) { return true; } return false; }