review meta template tidy up. closes #11417

* Adds class for ‘comment awaiting approval’ message
* Replaces ‘comment’ for ‘review’ in aforementioned message
* Adds class for author
* Adds class for review date
* Adds new-style class for verification notice
* Wraps dash in a span with new-style class
* Removes unnecessary colon
This commit is contained in:
James Koster 2016-08-05 14:41:02 +01:00
parent 152134ed5e
commit 8708273401
1 changed files with 6 additions and 6 deletions

View File

@ -13,11 +13,11 @@
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.6.0
* @version 2.7.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit; // Exit if accessed directly.
}
global $comment;
@ -25,18 +25,18 @@ $verified = wc_review_is_from_verified_owner( $comment->comment_ID );
if ( '0' === $comment->comment_approved ) { ?>
<p class="meta"><em><?php esc_attr_e( 'Your comment is awaiting approval', 'woocommerce' ); ?></em></p>
<p class="meta"><em class="woocommerce-review__awaiting-approval"><?php esc_attr_e( 'Your review is awaiting approval', 'woocommerce' ); ?></em></p>
<?php } else { ?>
<p class="meta">
<strong itemprop="author"><?php comment_author(); ?></strong> <?php
<strong class="woocommerce-review__author" itemprop="author"><?php comment_author(); ?></strong> <?php
if ( 'yes' === get_option( 'woocommerce_review_rating_verification_label' ) && $verified ) {
echo '<em class="verified">(' . esc_attr__( 'verified owner', 'woocommerce' ) . ')</em> ';
echo '<em class="woocommerce-review__verified verified">(' . esc_attr__( 'verified owner', 'woocommerce' ) . ')</em> ';
}
?>&ndash; <time itemprop="datePublished" datetime="<?php echo get_comment_date( 'c' ); ?>"><?php echo get_comment_date( wc_date_format() ); ?></time>:
?><span class="woocommerce-review__dash">&ndash;</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>
</p>
<?php }