Fix phpcs violations and improve indentation

This commit is contained in:
Rodrigo Primo 2018-12-13 16:14:01 -02:00
parent 73de71d8d4
commit 8c9bd03692
1 changed files with 78 additions and 95 deletions

View File

@ -41,43 +41,33 @@ if ( ! comments_open() ) {
?> ?>
</h2> </h2>
<?php <?php if ( have_comments() ) : ?>
if ( have_comments() ) :
?>
<ol class="commentlist"> <ol class="commentlist">
<?php <?php wp_list_comments( apply_filters( 'woocommerce_product_review_list_args', array( 'callback' => 'woocommerce_comments' ) ) ); ?>
wp_list_comments( apply_filters( 'woocommerce_product_review_list_args', array( 'callback' => 'woocommerce_comments' ) ) );
?>
</ol> </ol>
<?php <?php
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
echo '<nav class="woocommerce-pagination">'; echo '<nav class="woocommerce-pagination">';
paginate_comments_links( apply_filters( 'woocommerce_comment_pagination_args', array( paginate_comments_links(
apply_filters(
'woocommerce_comment_pagination_args',
array(
'prev_text' => '&larr;', 'prev_text' => '&larr;',
'next_text' => '&rarr;', 'next_text' => '&rarr;',
'type' => 'list', 'type' => 'list',
) ) ); )
)
);
echo '</nav>'; echo '</nav>';
endif; endif;
?> ?>
<?php else : ?>
<?php
else :
?>
<p class="woocommerce-noreviews"><?php esc_html_e( 'There are no reviews yet.', 'woocommerce' ); ?></p> <p class="woocommerce-noreviews"><?php esc_html_e( 'There are no reviews yet.', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php
endif;
?>
</div> </div>
<?php <?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) : ?>
if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) :
?>
<div id="review_form_wrapper"> <div id="review_form_wrapper">
<div id="review_form"> <div id="review_form">
<?php <?php
@ -125,16 +115,9 @@ if ( ! comments_open() ) {
?> ?>
</div> </div>
</div> </div>
<?php else : ?>
<?php
else :
?>
<p class="woocommerce-verification-required"><?php esc_html_e( 'Only logged in customers who have purchased this product may leave a review.', 'woocommerce' ); ?></p> <p class="woocommerce-verification-required"><?php esc_html_e( 'Only logged in customers who have purchased this product may leave a review.', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php
endif;
?>
<div class="clear"></div> <div class="clear"></div>
</div> </div>