diff --git a/select/google-font-dropdown-custom-control.php b/select/google-font-dropdown-custom-control.php index 9738f6a..bd139f3 100644 --- a/select/google-font-dropdown-custom-control.php +++ b/select/google-font-dropdown-custom-control.php @@ -70,7 +70,7 @@ public function get_fonts( $amount = 30 ) //Total time the file will be cached in seconds, set to a week $cachetime = 86400 * 7; - if(file_exists($fontFile) && $cachetime < filemtime($fontFile)) + if(file_exists($fontFile) && time() - $cachetime < filemtime($fontFile)) { $content = json_decode(file_get_contents($fontFile)); } else { @@ -94,4 +94,4 @@ public function get_fonts( $amount = 30 ) } } } -?> \ No newline at end of file +?>