Skip to content

Commit

Permalink
Merge pull request #10 from mahotilo/patch-2
Browse files Browse the repository at this point in the history
Add author's avatar 100x100 rounded
  • Loading branch information
gaffling authored Apr 19, 2021
2 parents 6582756 + 3cf851d commit 8b2e55d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions get-reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
'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
'show_authors_avatar_sm' => true, // true = show the author's avatar 100x100 rounded
);

/* -------------------- */
Expand Down Expand Up @@ -91,6 +92,9 @@ function getReviews($option) {
$return .= '<br>'; /* NEWLINE */
if (isset($option['show_txt_of_the_review']) and $option['show_txt_of_the_review'] == true) $return .= $review[3].'<br>'; /* TEXT */
if (isset($option['show_age_of_the_review']) and $option['show_age_of_the_review'] == true) $return .= '<small>'.$review[0][1].' </small>'; /* AUTHOR */
if (isset($option['show_author_of_reviews']) and $option['show_author_of_reviews'] == true and
isset($option['show_authors_avatar_sm']) and $option['show_authors_avatar_sm'] == true) $return .=
'<div class="review-avatar"><img src="'.str_replace('-rp','-rp-br25-w100-h100',$review[0][2]).'"></div>'; /* AVATAR */
if (isset($option['show_age_of_the_review']) and $option['show_age_of_the_review'] == true and /* IF AUTHOR & AGE */
isset($option['show_age_of_the_review']) and $option['show_age_of_the_review'] == true) $return .= '<small> &mdash; </small>'; /* PRINT — */
if (isset($option['show_age_of_the_review']) and $option['show_age_of_the_review'] == true) $return .= '<small>'.$review[1].' </small>'; /* AGE */
Expand Down

0 comments on commit 8b2e55d

Please sign in to comment.