- Timestamp:
- 08/23/2024 10:45:54 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-site-icon-control.php
r57730 r58927 55 55 <span class="customize-control-title">{{ data.label }}</span> 56 56 <# } #> 57 <# if ( data.description ) { #>58 <span class="description customize-control-description">{{{ data.description }}}</span>59 <# } #>60 57 61 58 <# if ( data.attachment && data.attachment.id ) { #> 62 59 <div class="attachment-media-view"> 63 60 <# if ( data.attachment.sizes ) { #> 64 <div class="site-icon-preview wp-clearfix"> 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="" /> 67 68 <div class="favicon"> 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 }}" /> 61 <style> 62 :root{ 63 --site-icon-url: url( '{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}' ); 64 } 65 </style> 66 <div class="site-icon-preview customizer"> 67 <div class="direction-wrap"> 68 <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" class="app-icon-preview" alt="{{ 69 data.attachment.alt ? 70 wp.i18n.sprintf( 71 <?php 72 /* translators: %s: The selected image alt text. */ 73 echo wp_json_encode( __( 'App icon preview: Current image: %s' ) ) 74 ?> 75 , 76 data.attachment.alt 77 ) : 78 wp.i18n.sprintf( 79 <?php 80 /* translators: %s: The selected image filename. */ 81 echo wp_json_encode( __( 'App icon preview: The current image has no alternative text. The file name is: %s' ) ); 82 ?> 83 , 84 data.attachment.filename 85 ) 86 }}" /> 87 <div class="site-icon-preview-browser"> 88 <svg role="img" aria-hidden="true" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg> 89 <div class="site-icon-preview-tab"> 90 <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" class="browser-icon-preview" alt="{{ 91 data.attachment.alt ? 92 wp.i18n.sprintf( 93 <?php 94 /* translators: %s: The selected image alt text. */ 95 echo wp_json_encode( __( 'Browser icon preview: Current image: %s' ) ); 96 ?> 97 , 98 data.attachment.alt 99 ) : 100 wp.i18n.sprintf( 101 <?php 102 /* translators: %s: The selected image filename. */ 103 echo wp_json_encode( __( 'Browser icon preview: The current image has no alternative text. The file name is: %s' ) ); 104 ?> 105 , 106 data.attachment.filename 107 ) 108 }}" /> 109 <div class="site-icon-preview-site-title" aria-hidden="true"><# print( '<?php echo esc_js( get_bloginfo( 'name' ) ); ?>' ) #></div> 110 <svg role="img" aria-hidden="true" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button"> 111 <path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" /> 112 </svg> 113 </div> 114 </div> 88 115 </div> 89 <span class="browser-title" aria-hidden="true"><# print( '<?php echo esc_js( get_bloginfo( 'name' ) ); ?>' ) #></span>90 116 </div> 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 <?php95 /* translators: %s: The selected image alt text. */96 echo wp_json_encode( __( 'App icon preview: Current image: %s' ) )97 ?>98 ,99 data.attachment.alt100 ) :101 wp.i18n.sprintf(102 <?php103 /* 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.filename108 )109 }}"/>110 117 </div> 111 118 <# } #> … … 129 136 </div> 130 137 <# } #> 138 <# if ( data.description ) { #> 139 <span class="description customize-control-description">{{{ data.description }}}</span> 140 <# } #> 131 141 <?php 132 142 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)