Skip to content
Browse files

Merge pull request #35 from tbnv/patch-1

Fix singular units
  • Loading branch information...
2 parents 9bed279 + 756e619 commit ebed77bf21fbe5a1c34272b99e568b4b2422436e @bastianallgeier committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 plugins/readingtime/readingtime.php
View
6 plugins/readingtime/readingtime.php
@@ -30,8 +30,8 @@ function readingtime($content, $params=array()) {
$minutesCount = floor($words / 200);
$secondsCount = floor($words % 200 / (200 / 60));
- $minutesLabel = ($minutesCount == 1) ? $options['minute'] : $options['minutes'];
- $secondsLabel = ($secondsCount == 1) ? $options['second'] : $options['seconds'];
+ $minutesLabel = ($minutesCount <= 1) ? $options['minute'] : $options['minutes'];
+ $secondsLabel = ($secondsCount <= 1) ? $options['second'] : $options['seconds'];
$replace = array(
'minutesCount' => $minutesCount,
@@ -48,4 +48,4 @@ function readingtime($content, $params=array()) {
return $result;
-}
+}

0 comments on commit ebed77b

Please sign in to comment.
Something went wrong with that request. Please try again.