add-to-cart
9 years ago
tabs
9 years ago
meta.php
9 years ago
photoswipe.php
9 years ago
price.php
9 years ago
product-attributes.php
9 years ago
product-image.php
9 years ago
product-thumbnails.php
9 years ago
rating.php
9 years ago
related.php
9 years ago
review-meta.php
9 years ago
review-rating.php
9 years ago
review.php
9 years ago
sale-flash.php
9 years ago
share.php
9 years ago
short-description.php
9 years ago
stock.php
9 years ago
title.php
9 years ago
up-sells.php
9 years ago
review-meta.php
43 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The template to display the reviewers meta data (name, verified owner, review date) |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/content-product.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://docs.woocommerce.com/document/template-structure/ |
| 14 | * @author WooThemes |
| 15 | * @package WooCommerce/Templates |
| 16 | * @version 3.0.0 |
| 17 | */ |
| 18 | |
| 19 | if ( ! defined( 'ABSPATH' ) ) { |
| 20 | exit; // Exit if accessed directly. |
| 21 | } |
| 22 | |
| 23 | global $comment; |
| 24 | $verified = wc_review_is_from_verified_owner( $comment->comment_ID ); |
| 25 | |
| 26 | if ( '0' === $comment->comment_approved ) { ?> |
| 27 | |
| 28 | <p class="meta"><em class="woocommerce-review__awaiting-approval"><?php esc_attr_e( 'Your review is awaiting approval', 'woocommerce' ); ?></em></p> |
| 29 | |
| 30 | <?php } else { ?> |
| 31 | |
| 32 | <p class="meta"> |
| 33 | <strong class="woocommerce-review__author" itemprop="author"><?php comment_author(); ?></strong> <?php |
| 34 | |
| 35 | if ( 'yes' === get_option( 'woocommerce_review_rating_verification_label' ) && $verified ) { |
| 36 | echo '<em class="woocommerce-review__verified verified">(' . esc_attr__( 'verified owner', 'woocommerce' ) . ')</em> '; |
| 37 | } |
| 38 | |
| 39 | ?><span class="woocommerce-review__dash">–</span> <time class="woocommerce-review__published-date" itemprop="datePublished" datetime="<?php echo get_comment_date( 'c' ); ?>"><?php echo get_comment_date( wc_date_format() ); ?></time> |
| 40 | </p> |
| 41 | |
| 42 | <?php } |
| 43 |