Changeset 57602
- Timestamp:
- 02/12/2024 09:55:44 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r57492 r57602 333 333 [ WORKING_DIR + 'wp-admin/js/tags.js' ]: [ './src/js/_enqueues/admin/tags.js' ], 334 334 [ WORKING_DIR + 'wp-admin/js/site-health.js' ]: [ './src/js/_enqueues/admin/site-health.js' ], 335 [ WORKING_DIR + 'wp-admin/js/site-icon.js' ]: [ './src/js/_enqueues/admin/site-icon.js' ], 335 336 [ WORKING_DIR + 'wp-admin/js/privacy-tools.js' ]: [ './src/js/_enqueues/admin/privacy-tools.js' ], 336 337 [ WORKING_DIR + 'wp-admin/js/theme-plugin-editor.js' ]: [ './src/js/_enqueues/wp/theme-plugin-editor.js' ], -
trunk/src/wp-admin/css/forms.css
r57572 r57602 790 790 } 791 791 792 .button-add-site-icon{ 793 width: 100%; 794 cursor: pointer; 795 text-align: center; 796 border: 1px dashed #c3c4c7; 797 box-sizing: border-box; 798 padding: 9px 0; 799 line-height: 1.6; 800 max-width: 270px; 801 } 802 803 .button-add-site-icon:focus, 804 .button-add-site-icon:hover{ 805 background: white; 806 } 807 808 .site-icon-section .favicon-preview{ 809 float: left; 810 } 811 .site-icon-section .app-icon-preview{ 812 float: left; 813 margin: 0 20px; 814 } 815 816 .site-icon-section .site-icon-preview img{ 817 max-width: 100%; 818 } 819 820 .button-ad-site-icon:focus{ 821 background-color: #fff; 822 border-color: #3582c4; 823 border-style: solid; 824 box-shadow: 0 0 0 1px #3582c4; 825 outline: 2px solid transparent; 826 } 827 792 828 /*------------------------------------------------------------------------------ 793 829 15.0 - Comments Screen -
trunk/src/wp-admin/css/site-icon.css
r46586 r57602 8 8 position: relative; 9 9 max-width: 180px; 10 float: left; 10 11 } 11 12 … … 53 54 margin-top: 9px; 54 55 } 56 57 .site-icon-section button.reset { 58 color: #b32d2e; 59 text-decoration: none; 60 border-color: transparent; 61 box-shadow: none; 62 background: transparent; 63 margin: 0 10px; 64 } 65 66 .site-icon-section button.reset:focus, 67 .site-icon-section button.reset:hover { 68 background: #b32d2e; 69 color: #fff; 70 border-color: #b32d2e; 71 box-shadow: 0 0 0 1px #b32d2e; 72 } -
trunk/src/wp-admin/options-general.php
r56680 r57602 98 98 </tr> 99 99 100 <?php 100 <?php if ( current_user_can( 'upload_files' ) ) : ?> 101 <tr class="hide-if-no-js site-icon-section"> 102 <th scope="row"><?php _e( 'Site Icon' ); ?></th> 103 <td> 104 <?php 105 wp_enqueue_media(); 106 wp_enqueue_script( 'site-icon' ); 107 108 $classes_for_upload_button = 'upload-button button-add-media button-add-site-icon'; 109 $classes_for_update_button = 'button'; 110 111 $classes_for_avatar = 'avatar avatar-150'; 112 if ( has_site_icon() ) { 113 $classes_for_avatar .= ' has-site-icon'; 114 $classes_for_button = $classes_for_update_button; 115 $classes_for_button_on_change = $classes_for_upload_button; 116 } else { 117 $classes_for_avatar .= ' hidden'; 118 $classes_for_button = $classes_for_upload_button; 119 $classes_for_button_on_change = $classes_for_update_button; 120 } 121 122 123 ?> 124 <div id="site-icon-preview" class="site-icon-preview wp-clearfix <?php echo esc_attr( $classes_for_avatar ); ?>"> 125 <div class="favicon-preview"> 126 <img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt=""> 127 <div class="favicon"> 128 <img src="<?php site_icon_url(); ?>" alt="Preview as a browser icon"> 129 </div> 130 <span class="browser-title" aria-hidden="true"><?php echo get_bloginfo( 'name' ); ?></span> 131 </div> 132 <img class="app-icon-preview" src="<?php site_icon_url(); ?>" alt="Preview as an app icon"> 133 </div> 134 <input type="hidden" name="site_icon" id="site_icon_hidden_field" value="<?php form_option( 'site_icon' ); ?>" /> 135 <p> 136 <button type="button" 137 id="choose-from-library-link" 138 type="button" 139 class="<?php echo esc_attr( $classes_for_button ); ?>" 140 data-alt-classes="<?php echo esc_attr( $classes_for_button_on_change ); ?>" 141 data-size="512" 142 data-choose-text="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" 143 data-update-text="<?php esc_attr_e( 'Change Site Icon' ); ?>" 144 data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>" 145 data-state="<?php echo esc_attr( has_site_icon() ); ?>" 146 147 > 148 <?php if ( has_site_icon() ) : ?> 149 <?php _e( 'Change Site Icon' ); ?> 150 <?php else : ?> 151 <?php _e( 'Choose a Site Icon' ); ?> 152 <?php endif; ?> 153 </button> 154 <button 155 id="js-remove-site-icon" 156 type="button" 157 <?php echo has_site_icon() ? 'class="button button-secondary reset"' : 'class="button button-secondary reset hidden"'; ?> 158 > 159 <?php _e( 'Remove Site Icon' ); ?> 160 </button> 161 </p> 162 163 <p class="description" id="site-icon-description"> 164 <?php _e( 'Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. Upload one here!' ); ?> 165 </p> 166 <p class="description" id="site-icon-further-description"> 167 <?php 168 /* translators: %s: Site Icon size in pixels. */ 169 printf( __( 'Site Icons should be square and at least %s pixels.' ), '<strong>512 × 512</strong>' ); 170 ?> 171 </p> 172 173 </td> 174 </tr> 175 176 <?php 177 endif; 178 /* End Site Icon */ 179 101 180 if ( ! is_multisite() ) { 102 181 $wp_site_url_class = ''; -
trunk/src/wp-admin/options.php
r56949 r57602 91 91 'blogname', 92 92 'blogdescription', 93 'site_icon', 93 94 'gmt_offset', 94 95 'date_format', -
trunk/src/wp-includes/css/media-views.css
r57553 r57602 850 850 } 851 851 852 .options-general-php .crop-content.site-icon, 852 853 .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { 853 854 margin-right: 300px; … … 2559 2560 .media-sidebar { 2560 2561 width: 230px; 2562 } 2563 2564 .options-general-php .crop-content.site-icon { 2565 margin-right: 262px; 2561 2566 } 2562 2567 … … 2828 2833 } 2829 2834 2835 .options-general-php .crop-content.site-icon { 2836 margin-right: 0; 2837 } 2838 2830 2839 .media-sidebar { 2831 2840 z-index: 1900; -
trunk/src/wp-includes/script-loader.php
r57557 r57602 849 849 850 850 $scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array( 'wp-ajax-response', 'jquery-color' ), false, 1 ); 851 852 $scripts->add( 'site-icon', '/wp-admin/js/site-icon.js', array( 'jquery', 'jcrop' ), false, 1 ); 851 853 852 854 // WordPress no longer uses or bundles Prototype or script.aculo.us. These are now pulled from an external source.
Note: See TracChangeset
for help on using the changeset viewer.