← All changes
|
app/Hooks/Handlers/ShortCodes/ProductReviewsShortCode.php
+1
-10
1.7.0
→
1.7.1
View file →
| @@ -134,18 +134,9 @@ | ||
| 134 | 134 | // Anything else leaves the list alone — including photos="yes", |
| 135 | 135 | // which reads as "photos are welcome here" rather than "only |
| 136 | 136 | // these", and is what a list shows anyway. |
| 137 | 137 | 'hasMedia' => strtolower(trim((string) Arr::get($data, 'photos', ''))) === 'only', |
| 138 | - // No min_rating here. The block has one and the refresh endpoint | |
| 139 | - // resolves it from that block's composition token rather than | |
| 140 | - // from the query string, because a floor is the shop's setting | |
| 141 | - // and not the reader's - sent by the client, anyone could ask for | |
| 142 | - // the one-star reviews a shop had chosen not to publish. A | |
| 143 | - // shortcode has no such token, so it could only filter the first | |
| 144 | - // paint: the first sort, filter or page change would bring the | |
| 145 | - // excluded reviews back, and the count and the pager with them. | |
| 146 | - // Better absent than a filter that stops filtering. | |
| 147 | - // | |
| 138 | + 'minRating' => max(0, min(5, (int) Arr::get($data, 'min_rating', 0))), | |
| 148 | 139 | // summary="side|top|cta" — where the rating summary goes, which is |
| 149 | 140 | // a separate question from whether it appears at all. Anything else |
| 150 | 141 | // typed reads as the default rather than removing it. |
| 151 | 142 | 'summaryMode' => $this->summaryMode($data), |