summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-10-06 23:17:07 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-10-06 23:17:07 +0200
commita3c9a67c65557c2cc6d0666ee5b5e6dfe9690bb8 (patch)
tree783d1f9e14ceee556b521bceb916e42f8f87e74c
parentc98704e4c0d697e478799cb6975078de237eeb86 (diff)
Produktbewertungen: nur die Anzahl unter dem Produktnamen ist der Link
„5 von 5 Sternen, 2 Bewertungen“: verlinkt ist „2 Bewertungen“. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--views/mods/mod_reviews/rating.phtml4
1 files changed, 2 insertions, 2 deletions
diff --git a/views/mods/mod_reviews/rating.phtml b/views/mods/mod_reviews/rating.phtml
index 3adb681..8c6fa25 100644
--- a/views/mods/mod_reviews/rating.phtml
+++ b/views/mods/mod_reviews/rating.phtml
@@ -3,11 +3,11 @@
* Sterne mit Schnitt und Anzahl (Modul Produktbewertungen)
*
* Die Sternzeichen sind aria-hidden, den Wert sagt der Text. Leere Sterne sind Umrisse, volle Sterne liegen darüber. Modus full: Text sichtbar; compact: sichtbar „4,5 (12)“,
- * der ganze Text für Screenreader; single: nur Sterne, der Text für Screenreader. Mit href ist der Text in full der Link zur Liste derselben Seite.
+ * der ganze Text für Screenreader; single: nur Sterne, der Text für Screenreader. Mit href ist in full die Anzahl der Link zur Liste derselben Seite.
* @version 4.6.1
*/
defined('ABSPATH') || exit;
$r = $this->view['wpsg_mod_reviews']['rating'];
?>
-<p class="wpsg-rating<?php if ($r['class'] !== '') echo ' '.esc_attr($r['class']); ?>"><span class="wpsg-rating__stars" aria-hidden="true"><span class="wpsg-rating__empty">☆☆☆☆☆</span><span class="wpsg-rating__fill" style="width:<?php echo intval($r['percent']); ?>%">★★★★★</span></span><?php if ($r['mode'] === 'full' && ($r['href']??'') !== '') { ?> <a class="wpsg-rating__text wpsg-rating__link" href="<?php echo esc_url($r['href']); ?>"><?php echo esc_html($r['text']); ?></a><?php } else if ($r['mode'] === 'full') { ?> <span class="wpsg-rating__text"><?php echo esc_html($r['text']); ?></span><?php } else if ($r['mode'] === 'compact') { ?> <span class="wpsg-rating__text" aria-hidden="true"><?php echo esc_html($r['short']); ?></span><span class="screen-reader-text"><?php echo esc_html($r['text']); ?></span><?php } else { ?><span class="screen-reader-text"><?php echo esc_html($r['text']); ?></span><?php } ?></p>
+<p class="wpsg-rating<?php if ($r['class'] !== '') echo ' '.esc_attr($r['class']); ?>"><span class="wpsg-rating__stars" aria-hidden="true"><span class="wpsg-rating__empty">☆☆☆☆☆</span><span class="wpsg-rating__fill" style="width:<?php echo intval($r['percent']); ?>%">★★★★★</span></span><?php if ($r['mode'] === 'full' && ($r['href']??'') !== '') { ?> <span class="wpsg-rating__text"><?php echo esc_html($r['stars']); ?>, <a class="wpsg-rating__link" href="<?php echo esc_url($r['href']); ?>"><?php echo esc_html($r['count']); ?></a></span><?php } else if ($r['mode'] === 'full') { ?> <span class="wpsg-rating__text"><?php echo esc_html($r['text']); ?></span><?php } else if ($r['mode'] === 'compact') { ?> <span class="wpsg-rating__text" aria-hidden="true"><?php echo esc_html($r['short']); ?></span><span class="screen-reader-text"><?php echo esc_html($r['text']); ?></span><?php } else { ?><span class="screen-reader-text"><?php echo esc_html($r['text']); ?></span><?php } ?></p>