diff --git a/get-reviews.php b/get-reviews.php
index 11bc63d..70558c9 100644
--- a/get-reviews.php
+++ b/get-reviews.php
@@ -48,6 +48,7 @@
'show_age_of_the_review' => true, // true = show the age of each review
'show_txt_of_the_review' => true, // true = show the text of each review
'show_author_of_reviews' => true, // true = show the author of each review
+ 'show_not_more_than_max' => 0, // (0-8) only show first max reviews
);
/* -------------------- */
@@ -80,7 +81,9 @@ function getReviews($option) {
$return .= '
'; /* OPEN DIV */
if (isset($option['show_cname_as_headline']) and $option['show_cname_as_headline'] == true) $return .= ''.$customer.'
'; /* CUSTOMER */
if (isset($option['show_rule_after_review']) and $option['show_rule_after_review'] == true) $return .= '
'; /* RULER */
+ $n = 0;
foreach ($reviews as $review) { /* START LOOP */
+ if (isset($option['show_not_more_than_max']) and $option['show_not_more_than_max'] > 0 and $n >= $option['show_not_more_than_max']) continue; /* CHECK MAX NUMBER */
if (isset($option['show_only_if_with_text']) and $option['show_only_if_with_text'] == true and empty($review[3])) continue; /* CHECK TEXT */
if (isset($option['show_only_if_greater_x']) and $review[4] <= $option['show_only_if_greater_x']) continue; /* CHECK RATING */
for ($i=1; $i <= $review[4]; ++$i) $return .= '⭐'; /* RATING */
@@ -92,6 +95,7 @@ function getReviews($option) {
isset($option['show_age_of_the_review']) and $option['show_age_of_the_review'] == true) $return .= ' — '; /* PRINT — */
if (isset($option['show_age_of_the_review']) and $option['show_age_of_the_review'] == true) $return .= ''.$review[1].' '; /* AGE */
if (isset($option['show_rule_after_review']) and $option['show_rule_after_review'] == true) $return .= '
'; /* RULER */
+ $n++;
} /* END LOOP */
$return .= ''; /* CLOSE DIV */
} /* CHECK REVIEWS */