[Accessibility] Add address title to edit/add buttons on My Account page (#49171)
* Add address title to edit/add buttons on my account * Add chengelog file * Bump my-address template version * Use placeholder in the edit/add address translation * Replace sprintf with printf
This commit is contained in:
parent
4689a09ec3
commit
b796b90d68
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: enhancement
|
||||||
|
|
||||||
|
Add address title to edit/add buttons on My Account page
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
* @see https://woocommerce.com/document/template-structure/
|
* @see https://woocommerce.com/document/template-structure/
|
||||||
* @package WooCommerce\Templates
|
* @package WooCommerce\Templates
|
||||||
* @version 8.7.0
|
* @version 9.2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
defined( 'ABSPATH' ) || exit;
|
defined( 'ABSPATH' ) || exit;
|
||||||
|
@ -60,7 +60,15 @@ $col = 1;
|
||||||
<div class="u-column<?php echo $col < 0 ? 1 : 2; ?> col-<?php echo $oldcol < 0 ? 1 : 2; ?> woocommerce-Address">
|
<div class="u-column<?php echo $col < 0 ? 1 : 2; ?> col-<?php echo $oldcol < 0 ? 1 : 2; ?> woocommerce-Address">
|
||||||
<header class="woocommerce-Address-title title">
|
<header class="woocommerce-Address-title title">
|
||||||
<h3><?php echo esc_html( $address_title ); ?></h3>
|
<h3><?php echo esc_html( $address_title ); ?></h3>
|
||||||
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php echo $address ? esc_html__( 'Edit', 'woocommerce' ) : esc_html__( 'Add', 'woocommerce' ); ?></a>
|
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit">
|
||||||
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: %s: Address title */
|
||||||
|
$address ? esc_html__( 'Edit %s', 'woocommerce' ) : esc_html__( 'Add %s', 'woocommerce' ),
|
||||||
|
esc_html( $address_title )
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</a>
|
||||||
</header>
|
</header>
|
||||||
<address>
|
<address>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue