Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions select/google-font-dropdown-custom-control.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -94,4 +94,4 @@ public function get_fonts( $amount = 30 )
}
}
}
?>
?>