Change _e to esc_html_e

Change to esc_html_e where changed on Woo files;
Change capitalization to be identical with Woo;
May contain other small changes when on same line as main change;
Formatting;
global/form-login.php Line 51 adds class;
This commit is contained in:
Unknown 2018-03-22 12:56:28 -06:00 committed by zachary
parent f3b09b7955
commit 43e14cf989
9 changed files with 33 additions and 33 deletions

View File

@ -32,10 +32,10 @@ do_action( 'woocommerce_before_cart' ); ?>
<tr>
<th class="product-remove">&nbsp;</th>
<th class="product-thumbnail">&nbsp;</th>
<th class="product-name"><?php _e( 'Product', 'understrap' ); ?></th>
<th class="product-price"><?php _e( 'Price', 'understrap' ); ?></th>
<th class="product-quantity"><?php _e( 'Quantity', 'understrap' ); ?></th>
<th class="product-subtotal"><?php _e( 'Total', 'understrap' ); ?></th>
<th class="product-name"><?php esc_html_e( 'Product', 'understrap' ); ?></th>
<th class="product-price"><?php esc_html_e( 'Price', 'understrap' ); ?></th>
<th class="product-quantity"><?php esc_html_e( 'Quantity', 'understrap' ); ?></th>
<th class="product-subtotal"><?php esc_html_e( 'Total', 'understrap' ); ?></th>
</tr>
</thead>
<tbody>
@ -134,7 +134,7 @@ do_action( 'woocommerce_before_cart' ); ?>
<?php if ( wc_coupons_enabled() ) { ?>
<div class="coupon">
<label for="coupon_code"><?php _e( 'Coupon:', 'understrap' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'understrap' ); ?>" /> <input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'understrap' ); ?>" />
<label for="coupon_code"><?php esc_html_e( 'Coupon:', 'understrap' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'understrap' ); ?>" /> <input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'understrap' ); ?>" />
<?php do_action( 'woocommerce_cart_coupon' ); ?>
</div>
<?php } ?>

View File

@ -23,6 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<a href="<?php echo esc_url( wc_get_checkout_url() ) ;?>" class="btn btn-primary btn-lg btn-block">
<?php echo __( 'Proceed to Checkout', 'understrap' ); ?>
<a href="<?php echo esc_url( wc_get_checkout_url() );?>" class="btn btn-primary btn-lg btn-block">
<?php esc_html_e( 'Proceed to checkout', 'understrap' ); ?>
</a>

View File

@ -26,9 +26,9 @@ if ( ! defined( 'ABSPATH' ) ) {
<table class="shop_table">
<thead>
<tr>
<th class="product-name"><?php _e( 'Product', 'understrap' ); ?></th>
<th class="product-quantity"><?php _e( 'Qty', 'understrap' ); ?></th>
<th class="product-total"><?php _e( 'Totals', 'understrap' ); ?></th>
<th class="product-name"><?php esc_html_e( 'Product', 'understrap' ); ?></th>
<th class="product-quantity"><?php esc_html_e( 'Qty', 'understrap' ); ?></th>
<th class="product-total"><?php esc_html_e( 'Totals', 'understrap' ); ?></th>
</tr>
</thead>
<tbody>

View File

@ -40,8 +40,8 @@ if ( ! is_ajax() ) {
<?php endif; ?>
<div class="form-row place-order">
<noscript>
<?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'understrap' ); ?>
<br/><input type="submit" class="btn btn-primary" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'understrap' ); ?>" />
<?php esc_html_e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'understrap' ); ?>
</noscript>
<?php wc_get_template( 'checkout/terms.php' ); ?>

View File

@ -32,11 +32,11 @@ if ( is_user_logged_in() ) {
<?php if ( $message ) echo wpautop( wptexturize( $message ) ); ?>
<p class="form-row form-row-first">
<label for="username"><?php _e( 'Username or email', 'understrap' ); ?> <span class="required">*</span></label>
<label for="username"><?php esc_html_e( 'Username or email', 'understrap' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="username" id="username" />
</p>
<p class="form-row form-row-last">
<label for="password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
<label for="password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
<input class="input-text form-control" type="password" name="password" id="password" />
</p>
<div class="clear"></div>
@ -48,11 +48,11 @@ if ( is_user_logged_in() ) {
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>" />
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ) ?>" />
<label for="rememberme" class="inline">
<input name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'understrap' ); ?>
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'understrap' ); ?></span>
</label>
</p>
<p class="lost_password">
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'understrap' ); ?></a>
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'understrap' ); ?></a>
</p>
<div class="clear"></div>

View File

@ -27,33 +27,33 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>
<?php do_action( 'woocommerce_edit_account_form_start' ); ?>
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
<label for="account_first_name"><?php _e( 'First name', 'understrap' ); ?> <span class="required">*</span></label>
<label for="account_first_name"><?php esc_html_e( 'First name', 'understrap' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_first_name" id="account_first_name" value="<?php echo esc_attr( $user->first_name ); ?>" />
</p>
<p class="woocommerce-FormRow woocommerce-FormRow--last form-row form-row-last">
<label for="account_last_name"><?php _e( 'Last name', 'understrap' ); ?> <span class="required">*</span></label>
<label for="account_last_name"><?php esc_html_e( 'Last name', 'understrap' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_last_name" id="account_last_name" value="<?php echo esc_attr( $user->last_name ); ?>" />
</p>
<div class="clear"></div>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<label for="account_email"><?php _e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
<label for="account_email"><?php esc_html_e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
<input type="email" class="woocommerce-Input woocommerce-Input--email input-text form-control" name="account_email" id="account_email" value="<?php echo esc_attr( $user->user_email ); ?>" />
</p>
<fieldset>
<legend><?php _e( 'Password Change', 'understrap' ); ?></legend>
<legend><?php esc_html_e( 'Password change', 'understrap' ); ?></legend>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<label for="password_current"><?php _e( 'Current Password (leave blank to leave unchanged)', 'understrap' ); ?></label>
<label for="password_current"><?php esc_html_e( 'Current password (leave blank to leave unchanged)', 'understrap' ); ?></label>
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_current" id="password_current" />
</p>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<label for="password_1"><?php _e( 'New Password (leave blank to leave unchanged)', 'understrap' ); ?></label>
<label for="password_1"><?php esc_html_e( 'New password (leave blank to leave unchanged)', 'understrap' ); ?></label>
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_1" id="password_1" />
</p>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<label for="password_2"><?php _e( 'Confirm New Password', 'understrap' ); ?></label>
<label for="password_2"><?php esc_html_e( 'Confirm new password', 'understrap' ); ?></label>
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_2" id="password_2" />
</p>
</fieldset>

View File

@ -34,15 +34,15 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php endif; ?>
<h2><?php _e( 'Login', 'understrap' ); ?></h2>
<h2><?php esc_html_e( 'Login', 'understrap' ); ?></h2>
<form class="woocommerce-form woocommerce-form-login login" method="post">
<?php do_action( 'woocommerce_login_form_start' ); ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="username"><?php _e( 'Username or email address', 'understrap' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
<label for="username"><?php esc_html_e( 'Username or email address', 'understrap' ); ?> <span class="required">*</span></label>
</p>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
@ -55,11 +55,11 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>" />
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php _e( 'Remember me', 'understrap' ); ?></span>
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'understrap' ); ?></span>
</label>
</p>
<p class="woocommerce-LostPassword lost_password">
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'understrap' ); ?></a>
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'understrap' ); ?></a>
</p>
<?php do_action( 'woocommerce_login_form_end' ); ?>
@ -72,7 +72,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<div class="u-column2 col-md-6">
<h2><?php _e( 'Register', 'understrap' ); ?></h2>
<h2><?php esc_html_e( 'Register', 'understrap' ); ?></h2>
<form method="post" class="register">
@ -81,22 +81,22 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_username"><?php _e( 'Username', 'understrap' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
<label for="reg_username"><?php esc_html_e( 'Username', 'understrap' ); ?> <span class="required">*</span></label>
</p>
<?php endif; ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_email"><?php _e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( $_POST['email'] ) : ''; ?>" />
<label for="reg_email"><?php esc_html_e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
</p>
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" />
<label for="reg_password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
</p>
<?php endif; ?>

View File

@ -27,7 +27,7 @@ wc_print_notices(); ?>
<p><?php echo apply_filters( 'woocommerce_lost_password_message', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'understrap' ) ); ?></p>
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
<label for="user_login"><?php _e( 'Username or email', 'understrap' ); ?></label>
<label for="user_login"><?php esc_html_e( 'Username or email', 'understrap' ); ?></label>
<input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="text" name="user_login" id="user_login" />
</p>

View File

@ -27,11 +27,11 @@ wc_print_notices(); ?>
<p><?php echo apply_filters( 'woocommerce_reset_password_message', __( 'Enter a new password below.', 'understrap') ); ?></p>
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
<label for="password_1"><?php _e( 'New password', 'understrap' ); ?> <span class="required">*</span></label>
<label for="password_1"><?php esc_html_e( 'New password', 'understrap' ); ?> <span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_1" id="password_1" />
</p>
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
<label for="password_2"><?php _e( 'Re-enter new password', 'understrap' ); ?> <span class="required">*</span></label>
<label for="password_2"><?php esc_html_e( 'Re-enter new password', 'understrap' ); ?> <span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_2" id="password_2" />
</p>