diff options
Diffstat (limited to '')
-rw-r--r-- | wp-includes/customize/class-wp-customize-site-icon-control.php | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/wp-includes/customize/class-wp-customize-site-icon-control.php b/wp-includes/customize/class-wp-customize-site-icon-control.php index 942000a..33694b2 100644 --- a/wp-includes/customize/class-wp-customize-site-icon-control.php +++ b/wp-includes/customize/class-wp-customize-site-icon-control.php @@ -66,11 +66,47 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control <img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" /> <div class="favicon"> - <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>" /> + <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="{{ + data.attachment.alt ? + wp.i18n.sprintf( + <?php + /* translators: %s: The selected image alt text. */ + echo wp_json_encode( __( 'Browser icon preview: Current image: %s' ) ); + ?> + , + data.attachment.alt + ) : + wp.i18n.sprintf( + <?php + /* translators: %s: The selected image filename. */ + echo wp_json_encode( __( 'Browser icon preview: The current image has no alternative text. The file name is: %s' ) ); + ?> + , + data.attachment.filename + ) + }}" /> </div> <span class="browser-title" aria-hidden="true"><# print( '<?php echo esc_js( get_bloginfo( 'name' ) ); ?>' ) #></span> </div> - <img class="app-icon-preview" src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>" /> + <img class="app-icon-preview" src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="{{ + data.attachment.alt ? + wp.i18n.sprintf( + <?php + /* translators: %s: The selected image alt text. */ + echo wp_json_encode( __( 'App icon preview: Current image: %s' ) ) + ?> + , + data.attachment.alt + ) : + wp.i18n.sprintf( + <?php + /* translators: %s: The selected image filename. */ + echo wp_json_encode( __( 'App icon preview: The current image has no alternative text. The file name is: %s' ) ); + ?> + , + data.attachment.filename + ) + }}"/> </div> <# } #> <div class="actions"> |