From 747d741293e064a979d7bf6c143ef969ea6d7629 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 24 May 2026 20:49:44 +0000
Subject: [PATCH] =GMBReview block minor tweaks. Refactored ReferralManager.php and ReferralRoutes.php to utilize the manager for all logic, and CustomTable for table interactions.
---
src/gmbreviews/render.php | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/src/gmbreviews/render.php b/src/gmbreviews/render.php
index 43d203d..779c1c4 100644
--- a/src/gmbreviews/render.php
+++ b/src/gmbreviews/render.php
@@ -57,12 +57,12 @@
ob_start();
?>
<div class="gmb-reviews">
- <div class="row btw">
+ <div class="row x-mid">
<?php
if ($showStats && !empty($average) && !empty($total)) {
?>
<p>
- <span class="stars" aria-label="<?= $average ?> out of 5 stars">
+ <span class="stars" title="<?= $average ?> out of 5 stars">
<?php
$fullStars = floor($average);
$hasHalfStar = ($average - $fullStars) >= 0.5;
@@ -91,20 +91,21 @@
}
?>
+
+ </div>
<?php
if ($showReviewLink && !empty($reviewUrl)) {
?>
<a href="<?=esc_url($reviewUrl)?>"
- class="button"
- target="_blank"
- rel="noopener noreferrer">
+ class="btn"
+ target="_blank"
+ rel="noopener noreferrer">
<?= jvbIcon('star', ['style' => 'fill']) ?>
Leave Your Review
</a>
<?php
}
?>
- </div>
<ul>
<?php
@@ -127,13 +128,14 @@
<li>
<blockquote class="review">
<?php
+ echo jvbIcon('quotes',['style' => 'fill']);
// Review text
if (!empty($comment)) { ?>
<div class="content review">
<?= apply_filters('wpautop', $comment) ?>
</div>
<?php } ?>
- <cite class="row start nowrap">
+ <cite class="row left nowrap">
<?php if (!empty($profilePhoto)) { ?>
<img src="<?=esc_url($profilePhoto)?>"
alt="<?=esc_attr($reviewer)?>"
@@ -144,7 +146,15 @@
</div>
<?php } ?>
- <div class="row start wrap">
+ <div class="row left wrap">
+ <?php if ($showRating && $rating > 0) { ?>
+ <div class="stars" title="<?= $rating ?> out of 5 stars">
+ <?php
+ for ($i = 1; $i <= 5; $i++) {
+ echo ($i <= $rating) ? jvbIcon('star', ['style' => 'fill']) : jvbIcon('star', ['style' => 'light']);
+ } ?>
+ </div>
+ <?php } ?>
<p><?= esc_html($reviewer)?></p>
<?php
// Date
@@ -155,14 +165,7 @@
<?= esc_html($formatted_date) ?>
</time>
<?php } ?>
- <?php if ($showRating && $rating > 0) { ?>
- <div class="stars" aria-label="<?= $rating ?> out of 5 stars">
- <?php
- for ($i = 1; $i <= 5; $i++) {
- echo ($i <= $rating) ? jvbIcon('star', ['style' => 'fill']) : jvbIcon('star', ['style' => 'light']);
- } ?>
- </div>
- <?php } ?>
+
</div>
</cite>
</blockquote>
@@ -177,7 +180,7 @@
?>
<div class="footer">
<a href=" <?= esc_url($viewAllUrl) ?>"
- class="button"
+ class="btn"
target="_blank"
rel="noopener noreferrer">
--
Gitblit v1.10.0