blob: 985b2d8f2595cee3770ff44e773bb87ef157d377 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<?php
/**
* Freigegebene Bewertungen unter dem Produkt (Modul Produktbewertungen)
*
* Mit Hinweis zur Echtheit (§ 5b Abs. 3 UWG). „Verifizierter Kauf“ steht nur an Bewertungen über den Link einer
* Bestellung (doc/bewertungen.md).
* @version 4.6.1
*/
defined('ABSPATH') || exit;
$v = $this->view['wpsg_mod_reviews']['list'];
$section_id = 'wpsg-reviews-'.intval($v['product_id']);
?>
<section class="wpsg-reviews<?php if ($v['wide']) echo ' alignwide'; ?>" id="<?php echo esc_attr($section_id); ?>" aria-labelledby="<?php echo esc_attr($section_id.'-title'); ?>">
<h2 class="wpsg-reviews__title" id="<?php echo esc_attr($section_id.'-title'); ?>"><?php echo esc_html($v['title']); ?></h2>
<?php echo $v['summary']; ?>
<p class="wpsg-reviews__hint"><?php echo nl2br(esc_html($v['hint'])); ?></p>
<ol class="wpsg-reviews__list">
<?php foreach ($v['reviews'] as $review) { ?>
<li class="wpsg-review">
<?php echo $review['rating']; ?>
<?php if ($review['title'] !== '') { ?>
<h3 class="wpsg-review__title"><?php echo esc_html($review['title']); ?></h3>
<?php } ?>
<p class="wpsg-review__meta">
<span class="wpsg-review__author"><?php echo esc_html($review['name']); ?></span>
<time class="wpsg-review__date" datetime="<?php echo esc_attr($review['datetime']); ?>"><?php echo esc_html($review['date']); ?></time>
<?php if ($review['verified']) { ?><span class="wpsg-review__verified"><?php echo esc_html__('Verifizierter Kauf', 'wpsg'); ?></span><?php } ?>
</p>
<?php if ($review['text'] !== '') { ?>
<div class="wpsg-review__text"><?php echo nl2br(esc_html($review['text'])); ?></div>
<?php } ?>
<?php if ($review['reply'] !== '') { ?>
<div class="wpsg-review__reply">
<p class="wpsg-review__reply-title"><?php echo esc_html__('Antwort des Shops', 'wpsg'); ?></p>
<div><?php echo nl2br(esc_html($review['reply'])); ?></div>
</div>
<?php } ?>
</li>
<?php } ?>
</ol>
<?php if ($v['more_url'] !== '') { ?>
<p class="wpsg-reviews__more"><a href="<?php echo esc_url($v['more_url']); ?>"><?php /* translators: %s: Anzahl der Bewertungen */ echo esc_html(sprintf(__('Alle %s Bewertungen anzeigen', 'wpsg'), number_format_i18n($v['count']))); ?></a></p>
<?php } ?>
</section>
|