Fix Generic.WhiteSpace.ScopeIndent violations

This commit fixes all violations of the Generic.WhiteSpace.ScopeIndent sniff automatically using phpcbf.
This commit is contained in:
Rodrigo Primo 2019-12-20 14:48:11 -03:00
parent 73b5fff29e
commit 86c1b61f03
8 changed files with 65 additions and 61 deletions

View File

@ -35,28 +35,28 @@ if ( ! defined( 'ABSPATH' ) ) {
<td>
<label><?php esc_html_e( 'Customer download link', 'woocommerce' ); ?></label>
<?php
$download_link = add_query_arg(
array(
'download_file' => $download->get_product_id(),
'order' => $download->get_order_key(),
'email' => urlencode( $download->get_user_email() ),
'key' => $download->get_download_id(),
), trailingslashit( home_url() )
);
$download_link = add_query_arg(
array(
'download_file' => $download->get_product_id(),
'order' => $download->get_order_key(),
'email' => urlencode( $download->get_user_email() ),
'key' => $download->get_download_id(),
), trailingslashit( home_url() )
);
?>
<a id="copy-download-link" class="button" href="<?php echo esc_url( $download_link ); ?>" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>" data-tip-failed="<?php esc_attr_e( 'Copying to clipboard failed. You should be able to right-click the button and copy.', 'woocommerce' ); ?>"><?php esc_html_e( 'Copy link', 'woocommerce' ); ?></a>
</td>
<td>
<label><?php esc_html_e( 'Customer download log', 'woocommerce' ); ?></label>
<?php
$report_url = add_query_arg(
'permission_id',
rawurlencode( $download->get_id() ),
admin_url( 'admin.php?page=wc-reports&tab=orders&report=downloads' )
);
echo '<a class="button" href="' . esc_url( $report_url ) . '">';
esc_html_e( 'View report', 'woocommerce' );
echo '</a>';
$report_url = add_query_arg(
'permission_id',
rawurlencode( $download->get_id() ),
admin_url( 'admin.php?page=wc-reports&tab=orders&report=downloads' )
);
echo '<a class="button" href="' . esc_url( $report_url ) . '">';
esc_html_e( 'View report', 'woocommerce' );
echo '</a>';
?>
</td>
</tr>

View File

@ -7,33 +7,33 @@ if ( ! defined( 'ABSPATH' ) ) {
<div class="options_group hide_if_external hide_if_grouped">
<?php
woocommerce_wp_textarea_input(
array(
'id' => '_purchase_note',
'value' => $product_object->get_purchase_note( 'edit' ),
'label' => __( 'Purchase note', 'woocommerce' ),
'desc_tip' => true,
'description' => __( 'Enter an optional note to send the customer after purchase.', 'woocommerce' ),
)
);
woocommerce_wp_textarea_input(
array(
'id' => '_purchase_note',
'value' => $product_object->get_purchase_note( 'edit' ),
'label' => __( 'Purchase note', 'woocommerce' ),
'desc_tip' => true,
'description' => __( 'Enter an optional note to send the customer after purchase.', 'woocommerce' ),
)
);
?>
</div>
<div class="options_group">
<?php
woocommerce_wp_text_input(
array(
'id' => 'menu_order',
'value' => $product_object->get_menu_order( 'edit' ),
'label' => __( 'Menu order', 'woocommerce' ),
'desc_tip' => true,
'description' => __( 'Custom ordering position.', 'woocommerce' ),
'type' => 'number',
'custom_attributes' => array(
'step' => '1',
),
)
);
woocommerce_wp_text_input(
array(
'id' => 'menu_order',
'value' => $product_object->get_menu_order( 'edit' ),
'label' => __( 'Menu order', 'woocommerce' ),
'desc_tip' => true,
'description' => __( 'Custom ordering position.', 'woocommerce' ),
'type' => 'number',
'custom_attributes' => array(
'step' => '1',
),
)
);
?>
</div>

View File

@ -205,7 +205,7 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
);
if ( ! empty( $used_coupons ) && is_array( $used_coupons ) ) :
?>
?>
<select id="coupon_codes" name="coupon_codes" class="wc-enhanced-select" data-placeholder="<?php esc_attr_e( 'Choose coupons&hellip;', 'woocommerce' ); ?>" style="width:100%;">
<option value=""><?php esc_html_e( 'All coupons', 'woocommerce' ); ?></option>
<?php

View File

@ -529,7 +529,7 @@ class WC_Shortcodes {
);
$single_product = new WP_Query( $args );
?>
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
var $variations_form = $( '[data-product-page-preselected-id="<?php echo esc_attr( $preselected_id ); ?>"]' ).find( 'form.variations_form' );
@ -539,7 +539,7 @@ class WC_Shortcodes {
<?php } ?>
});
</script>
<?php
<?php
}
// For "is_single" to always make load comments_template() for reviews.

View File

@ -33,9 +33,9 @@ if ( ! defined( 'ABSPATH' ) ) {
<td align="center" valign="top">
<div id="template_header_image">
<?php
if ( $img = get_option( 'woocommerce_email_header_image' ) ) {
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name', 'display' ) . '" /></p>';
}
if ( $img = get_option( 'woocommerce_email_header_image' ) ) {
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name', 'display' ) . '" /></p>';
}
?>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">

View File

@ -30,17 +30,17 @@ if ( $total <= 1 ) {
?>
<nav class="woocommerce-pagination">
<?php
echo paginate_links( apply_filters( 'woocommerce_pagination_args', array( // WPCS: XSS ok.
'base' => $base,
'format' => $format,
'add_args' => false,
'current' => max( 1, $current ),
'total' => $total,
'prev_text' => '&larr;',
'next_text' => '&rarr;',
'type' => 'list',
'end_size' => 3,
'mid_size' => 3,
) ) );
echo paginate_links( apply_filters( 'woocommerce_pagination_args', array( // WPCS: XSS ok.
'base' => $base,
'format' => $format,
'add_args' => false,
'current' => max( 1, $current ),
'total' => $total,
'prev_text' => '&larr;',
'next_text' => '&rarr;',
'type' => 'list',
'end_size' => 3,
'mid_size' => 3,
) ) );
?>
</nav>

View File

@ -22,23 +22,27 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<p><?php
<p>
<?php
printf(
/* translators: 1: user display name 2: logout url */
__( 'Hello %1$s (not %1$s? <a href="%2$s">Log out</a>)', 'woocommerce' ),
'<strong>' . esc_html( $current_user->display_name ) . '</strong>',
esc_url( wc_logout_url() )
);
?></p>
?>
</p>
<p><?php
<p>
<?php
printf(
__( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ),
esc_url( wc_get_endpoint_url( 'orders' ) ),
esc_url( wc_get_endpoint_url( 'edit-address' ) ),
esc_url( wc_get_endpoint_url( 'edit-account' ) )
);
?></p>
?>
</p>
<?php
/**

View File

@ -41,5 +41,5 @@ if ( '0' === $comment->comment_approved ) { ?>
<span class="woocommerce-review__dash">&ndash;</span> <time class="woocommerce-review__published-date" datetime="<?php echo esc_attr( get_comment_date( 'c' ) ); ?>"><?php echo esc_html( get_comment_date( wc_date_format() ) ); ?></time>
</p>
<?php
<?php
}