Update remaining labels for dimensions units
This commit is contained in:
parent
54de988f25
commit
ad561d81bf
|
@ -30,8 +30,15 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
if ( wc_product_dimensions_enabled() ) {
|
||||
?>
|
||||
<p class="form-field dimensions_field">
|
||||
<?php /* translators: WooCommerce dimension unit*/ ?>
|
||||
<label for="product_length"><?php printf( __( 'Dimensions (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?></label>
|
||||
<label for="product_length">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: WooCommerce dimension unit */
|
||||
esc_html__( 'Dimensions (%s)', 'woocommerce' ),
|
||||
esc_html( I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit' ) ) )
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
<span class="wrap">
|
||||
<input id="product_length" placeholder="<?php esc_attr_e( 'Length', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_length" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_length( 'edit' ) ) ); ?>" />
|
||||
<input id="product_width" placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_width" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_width( 'edit' ) ) ); ?>" />
|
||||
|
|
|
@ -312,9 +312,9 @@ defined( 'ABSPATH' ) || exit;
|
|||
<label for="product_length">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: dimension unit */
|
||||
/* translators: %s dimension unit */
|
||||
esc_html__( 'Dimensions (L×W×H) (%s)', 'woocommerce' ),
|
||||
esc_html( get_option( 'woocommerce_dimension_unit' ) )
|
||||
esc_html( I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit' ) ) )
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
|
|
|
@ -171,9 +171,33 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
</span>
|
||||
</label>
|
||||
<label class="change-input">
|
||||
<input type="text" name="_length" class="text length" placeholder="<?php printf( esc_attr__( 'Length (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
||||
<input type="text" name="_width" class="text width" placeholder="<?php printf( esc_attr__( 'Width (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
||||
<input type="text" name="_height" class="text height" placeholder="<?php printf( esc_attr__( 'Height (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
||||
<?php
|
||||
$dimension_unit_label = I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit', 'cm' ) );
|
||||
?>
|
||||
<input
|
||||
type="text"
|
||||
name="_length"
|
||||
class="text length"
|
||||
<?php /* translators: %s is dimension unit label */ ?>
|
||||
placeholder="<?php printf( esc_attr__( 'Length (%s)', 'woocommerce' ), $dimension_unit_label ); ?>"
|
||||
value=""
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="_width"
|
||||
class="text width"
|
||||
<?php /* translators: %s is dimension unit label */ ?>
|
||||
placeholder="<?php printf( esc_attr__( 'Width (%s)', 'woocommerce' ), $dimension_unit_label ); ?>"
|
||||
value=""
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="_height"
|
||||
class="text height"
|
||||
<?php /* translators: %s is dimension unit label */ ?>
|
||||
placeholder="<?php printf( esc_attr__( 'Height (%s)', 'woocommerce' ), $dimension_unit_label ); ?>"
|
||||
value=""
|
||||
>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue