auth
1 year ago
block-notices
1 year ago
brands
1 year ago
cart
1 year ago
checkout
1 year ago
emails
1 year ago
global
1 year ago
loop
1 year ago
myaccount
1 year ago
notices
2 years ago
order
1 year ago
parts
1 year ago
product-form
1 year ago
single-product
1 year ago
templates
1 year ago
archive-product.php
2 years ago
content-product-cat.php
2 years ago
content-product.php
1 year ago
content-single-product.php
2 years ago
content-widget-price-filter.php
2 years ago
content-widget-product.php
2 years ago
content-widget-reviews.php
2 years ago
product-searchform.php
2 years ago
single-product-reviews.php
1 year ago
single-product.php
2 years ago
taxonomy-product-attribute.php
2 years ago
taxonomy-product-cat.php
2 years ago
taxonomy-product-tag.php
2 years ago
content-widget-reviews.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The template for displaying product widget entries. |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/content-widget-reviews.php |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 3.4.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | ?> |
| 21 | <li> |
| 22 | <?php do_action( 'woocommerce_widget_product_review_item_start', $args ); ?> |
| 23 | |
| 24 | <?php |
| 25 | // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped |
| 26 | ?> |
| 27 | |
| 28 | <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> |
| 29 | <?php echo $product->get_image(); ?> |
| 30 | <span class="product-title"><?php echo wp_kses_post( $product->get_name() ); ?></span> |
| 31 | </a> |
| 32 | |
| 33 | <?php echo wc_get_rating_html( intval( get_comment_meta( $comment->comment_ID, 'rating', true ) ) ); ?> |
| 34 | |
| 35 | <span class="reviewer"> |
| 36 | <?php |
| 37 | /* translators: %s: Comment author. */ |
| 38 | echo sprintf( esc_html__( 'by %s', 'woocommerce' ), get_comment_author( $comment->comment_ID ) ); |
| 39 | ?> |
| 40 | </span> |
| 41 | |
| 42 | <?php |
| 43 | // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped |
| 44 | ?> |
| 45 | |
| 46 | <?php do_action( 'woocommerce_widget_product_review_item_end', $args ); ?> |
| 47 | </li> |
| 48 |