summaryrefslogtreecommitdiffstats
path: root/wp-includes/customize/class-wp-customize-site-icon-control.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
commit30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch)
tree39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/customize/class-wp-customize-site-icon-control.php
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz
wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/customize/class-wp-customize-site-icon-control.php')
-rw-r--r--wp-includes/customize/class-wp-customize-site-icon-control.php40
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">