diff --git a/CHANGELOG.md b/CHANGELOG.md index 02466e2..a5fa7d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.2.x +## 09/16/2016 + +1. [](#bugfix) + * Fix [#37](https://github.com/getgrav/grav-plugin-comments/issues/37) showing comments older than one week in the "latest comments" view + # v1.2.4 ## 09/15/2016 diff --git a/comments.php b/comments.php index 0629771..1363a8b 100644 --- a/comments.php +++ b/comments.php @@ -312,11 +312,6 @@ class CommentsPlugin extends Plugin for ($i = 0; $i < count($data['comments']); $i++) { $commentTimestamp = \DateTime::createFromFormat('D, d M Y H:i:s', $data['comments'][$i]['date'])->getTimestamp(); - $sevenDaysAgo = time() - (7 * 24 * 60 * 60); - - if ($commentTimestamp < $sevenDaysAgo) { - continue; - } $data['comments'][$i]['pageTitle'] = $data['title']; $data['comments'][$i]['filePath'] = $file->filePath;