wp/wp-includes/customize/class-wp-customize-site-icon-control.php
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    64 					<div class="site-icon-preview wp-clearfix">
    64 					<div class="site-icon-preview wp-clearfix">
    65 						<div class="favicon-preview">
    65 						<div class="favicon-preview">
    66 							<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" />
    66 							<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" />
    67 
    67 
    68 							<div class="favicon">
    68 							<div class="favicon">
    69 								<img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>" />
    69 								<img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="{{
       
    70 									data.attachment.alt ?
       
    71 										wp.i18n.sprintf(
       
    72 											<?php
       
    73 											/* translators: %s: The selected image alt text. */
       
    74 											echo wp_json_encode( __( 'Browser icon preview: Current image: %s' ) );
       
    75 											?>
       
    76 											,
       
    77 											data.attachment.alt
       
    78 										) :
       
    79 										wp.i18n.sprintf(
       
    80 											<?php
       
    81 											/* translators: %s: The selected image filename. */
       
    82 											echo wp_json_encode( __( 'Browser icon preview: The current image has no alternative text. The file name is: %s' ) );
       
    83 											?>
       
    84 											,
       
    85 											data.attachment.filename
       
    86 										)
       
    87 								}}" />
    70 							</div>
    88 							</div>
    71 							<span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>
    89 							<span class="browser-title" aria-hidden="true"><# print( '<?php echo esc_js( get_bloginfo( 'name' ) ); ?>' ) #></span>
    72 						</div>
    90 						</div>
    73 						<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' ); ?>" />
    91 						<img class="app-icon-preview" src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="{{
       
    92 							data.attachment.alt ?
       
    93 								wp.i18n.sprintf(
       
    94 									<?php
       
    95 									/* translators: %s: The selected image alt text. */
       
    96 									echo wp_json_encode( __( 'App icon preview: Current image: %s' ) )
       
    97 									?>
       
    98 									,
       
    99 									data.attachment.alt
       
   100 								) :
       
   101 								wp.i18n.sprintf(
       
   102 									<?php
       
   103 									/* translators: %s: The selected image filename. */
       
   104 									echo wp_json_encode( __( 'App icon preview: The current image has no alternative text. The file name is: %s' ) );
       
   105 									?>
       
   106 									,
       
   107 									data.attachment.filename
       
   108 								)
       
   109 						}}"/>
    74 					</div>
   110 					</div>
    75 				<# } #>
   111 				<# } #>
    76 				<div class="actions">
   112 				<div class="actions">
    77 					<# if ( data.canUpload ) { #>
   113 					<# if ( data.canUpload ) { #>
    78 						<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
   114 						<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>