coding standards fixes

This commit is contained in:
splashingpixels 2014-01-22 20:36:24 -08:00
parent 1a416875f8
commit 454b97080a
21 changed files with 43 additions and 43 deletions

View File

@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) ); ?> echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) ); ?>
<input type="hidden" name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" value="<?php echo esc_attr( $method->id ); ?>" class="shipping_method" /> <input type="hidden" name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" value="<?php echo esc_attr( $method->id ); ?>" class="shipping_method" />
<?php elseif ( get_option('woocommerce_shipping_method_format') == 'select' ) : ?> <?php elseif ( get_option( 'woocommerce_shipping_method_format' ) === 'select' ) : ?>
<select name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" class="shipping_method"> <select name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" class="shipping_method">
<?php foreach ( $available_methods as $method ) : ?> <?php foreach ( $available_methods as $method ) : ?>

View File

@ -50,7 +50,7 @@ global $woocommerce;
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?> <?php do_action( 'woocommerce_before_order_notes', $checkout ); ?>
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) == 'yes' ) ) : ?> <?php if ( apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) === 'yes' ) ) : ?>
<?php if ( ! WC()->cart->needs_shipping() || WC()->cart->ship_to_billing_address_only() ) : ?> <?php if ( ! WC()->cart->needs_shipping() || WC()->cart->ship_to_billing_address_only() ) : ?>

View File

@ -50,8 +50,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ( WC()->cart->tax_display_cart == 'excl' ) : ?> <?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
<?php if ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ) : ?> <?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?> <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
<tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>"> <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
<th><?php echo esc_html( $tax->label ); ?></th> <th><?php echo esc_html( $tax->label ); ?></th>

View File

@ -12,7 +12,7 @@ echo $email_heading . "\n\n";
echo sprintf( __( "Thanks for creating an account on %s. Your username is <strong>%s</strong>.", 'woocommerce' ), $blogname, $user_login ) . "\n\n"; echo sprintf( __( "Thanks for creating an account on %s. Your username is <strong>%s</strong>.", 'woocommerce' ), $blogname, $user_login ) . "\n\n";
if ( get_option( 'woocommerce_registration_generate_password' ) == 'yes' && $password_generated ) if ( get_option( 'woocommerce_registration_generate_password' ) === 'yes' && $password_generated )
echo sprintf( __( "Your password is <strong>%s</strong>.", 'woocommerce' ), $user_pass ) . "\n\n"; echo sprintf( __( "Your password is <strong>%s</strong>.", 'woocommerce' ), $user_pass ) . "\n\n";
echo sprintf( __( 'You can access your account area to view your orders and change your password here: %s.', 'woocommerce' ), get_permalink( wc_get_page_id( 'myaccount' ) ) ) . "\n\n"; echo sprintf( __( 'You can access your account area to view your orders and change your password here: %s.', 'woocommerce' ), get_permalink( wc_get_page_id( 'myaccount' ) ) ) . "\n\n";

View File

@ -26,7 +26,7 @@ if ( 1 == $wp_query->found_posts || ! woocommerce_products_will_display() )
'price-desc' => __( 'Sort by price: high to low', 'woocommerce' ) 'price-desc' => __( 'Sort by price: high to low', 'woocommerce' )
) ); ) );
if ( get_option( 'woocommerce_enable_review_rating' ) == 'no' ) if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' )
unset( $catalog_orderby['rating'] ); unset( $catalog_orderby['rating'] );
foreach ( $catalog_orderby as $id => $name ) foreach ( $catalog_orderby as $id => $name )

View File

@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $product; global $product;
if ( get_option( 'woocommerce_enable_review_rating' ) == 'no' ) if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' )
return; return;
?> ?>

View File

@ -13,7 +13,7 @@ global $woocommerce;
$customer_id = get_current_user_id(); $customer_id = get_current_user_id();
if ( get_option('woocommerce_ship_to_billing_address_only') == 'no' && get_option('woocommerce_calc_shipping') !== 'no' ) { if ( get_option( 'woocommerce_ship_to_billing_address_only' ) === 'no' && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) {
$page_title = apply_filters( 'woocommerce_my_account_my_address_title', __( 'My Addresses', 'woocommerce' ) ); $page_title = apply_filters( 'woocommerce_my_account_my_address_title', __( 'My Addresses', 'woocommerce' ) );
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array( $get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing Address', 'woocommerce' ), 'billing' => __( 'Billing Address', 'woocommerce' ),

View File

@ -17,7 +17,7 @@ if ( ! comments_open() )
<div id="reviews"> <div id="reviews">
<div id="comments"> <div id="comments">
<h2><?php <h2><?php
if ( get_option( 'woocommerce_enable_review_rating' ) == 'yes' && ( $count = $product->get_rating_count() ) ) if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' && ( $count = $product->get_rating_count() ) )
printf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), $count, get_the_title() ); printf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), $count, get_the_title() );
else else
_e( 'Reviews', 'woocommerce' ); _e( 'Reviews', 'woocommerce' );
@ -43,7 +43,7 @@ if ( ! comments_open() )
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) == 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->id ) ) : ?> <?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->id ) ) : ?>
<div id="review_form_wrapper"> <div id="review_form_wrapper">
<div id="review_form"> <div id="review_form">
@ -66,7 +66,7 @@ if ( ! comments_open() )
'comment_field' => '' 'comment_field' => ''
); );
if ( get_option('woocommerce_enable_review_rating') == 'yes' ) { if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' ) {
$comment_form['comment_field'] = '<p class="comment-form-rating"><label for="rating">' . __( 'Your Rating', 'woocommerce' ) .'</label><select name="rating" id="rating"> $comment_form['comment_field'] = '<p class="comment-form-rating"><label for="rating">' . __( 'Your Rating', 'woocommerce' ) .'</label><select name="rating" id="rating">
<option value="">' . __( 'Rate&hellip;', 'woocommerce' ) . '</option> <option value="">' . __( 'Rate&hellip;', 'woocommerce' ) . '</option>
<option value="5">' . __( 'Perfect', 'woocommerce' ) . '</option> <option value="5">' . __( 'Perfect', 'woocommerce' ) . '</option>

View File

@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $product; global $product;
if ( get_option( 'woocommerce_enable_review_rating' ) == 'no' ) if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' )
return; return;
$count = $product->get_rating_count(); $count = $product->get_rating_count();

View File

@ -38,7 +38,7 @@ $rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
<p class="meta"> <p class="meta">
<strong itemprop="author"><?php comment_author(); ?></strong> <?php <strong itemprop="author"><?php comment_author(); ?></strong> <?php
if ( get_option('woocommerce_review_rating_verification_label') == 'yes' ) if ( get_option( 'woocommerce_review_rating_verification_label' ) === 'yes' )
if ( wc_customer_bought_product( $comment->comment_author_email, $comment->user_id, $comment->comment_post_ID ) ) if ( wc_customer_bought_product( $comment->comment_author_email, $comment->user_id, $comment->comment_post_ID ) )
echo '<em class="verified">(' . __( 'verified owner', 'woocommerce' ) . ')</em> '; echo '<em class="verified">(' . __( 'verified owner', 'woocommerce' ) . ')</em> ';

View File

@ -265,7 +265,7 @@ final class WooCommerce {
// 1 = PHP_ROUND_HALF_UP, 2 = PHP_ROUND_HALF_DOWN // 1 = PHP_ROUND_HALF_UP, 2 = PHP_ROUND_HALF_DOWN
if ( ! defined( 'WC_TAX_ROUNDING_MODE' ) ) { if ( ! defined( 'WC_TAX_ROUNDING_MODE' ) ) {
define( 'WC_TAX_ROUNDING_MODE', get_option( 'woocommerce_prices_include_tax' ) == 'yes' ? 2 : 1 ); define( 'WC_TAX_ROUNDING_MODE', get_option( 'woocommerce_prices_include_tax' ) === 'yes' ? 2 : 1 );
} }
if ( ! defined( 'WC_DELIMITER' ) ) { if ( ! defined( 'WC_DELIMITER' ) ) {