Ticket #29955: 29955.options-general.patch
File 29955.options-general.patch, 8.6 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/forms.css
762 762 vertical-align: middle; 763 763 } 764 764 765 .options-general-php input.small-text { 766 width: 56px; 767 } 768 765 769 .options-general-php .spinner { 766 770 float: none; 767 margin: -3px 3px; 771 margin: 0 3px; 772 vertical-align: text-bottom; 768 773 } 769 774 770 775 .settings-php .language-install-spinner, -
src/wp-admin/options-general.php
45 45 46 46 $("input[name='date_format']").click(function(){ 47 47 if ( "date_format_custom_radio" != $(this).attr("id") ) 48 $( "input[name='date_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );48 $( "input[name='date_format_custom']" ).val( $( this ).val() ).siblings( '.example' ).text( $( this ).parent( 'label' ).text() ); 49 49 }); 50 50 $("input[name='date_format_custom']").focus(function(){ 51 51 $( '#date_format_custom_radio' ).prop( 'checked', true ); … … 53 53 54 54 $("input[name='time_format']").click(function(){ 55 55 if ( "time_format_custom_radio" != $(this).attr("id") ) 56 $( "input[name='time_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );56 $( "input[name='time_format_custom']" ).val( $( this ).val() ).siblings( '.example' ).text( $( this ).parent( 'label' ).text() ); 57 57 }); 58 58 $("input[name='time_format_custom']").focus(function(){ 59 59 $( '#time_format_custom_radio' ).prop( 'checked', true ); … … 121 121 </tr> 122 122 <tr> 123 123 <th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th> 124 <td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" />125 <p class="description" ><?php _e('In a few words, explain what this site is about.') ?></p></td>124 <td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option('blogdescription'); ?>" class="regular-text" /> 125 <p class="description" id="tagline-description"><?php _e('In a few words, explain what this site is about.') ?></p></td> 126 126 </tr> 127 127 <?php if ( !is_multisite() ) { ?> 128 128 <tr> … … 131 131 </tr> 132 132 <tr> 133 133 <th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th> 134 <td><input name="home" type="url" id="home" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />135 <p class="description" ><?php _e('Enter the address here if you want your site homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></p></td>134 <td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" /> 135 <p class="description" id="home-description"><?php _e('Enter the address here if you want your site homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></p></td> 136 136 </tr> 137 137 <tr> 138 138 <th scope="row"><label for="admin_email"><?php _e('E-mail Address') ?> </label></th> 139 <td><input name="admin_email" type="email" id="admin_email" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />140 <p class="description" ><?php _e('This address is used for admin purposes, like new user notification.') ?></p></td>139 <td><input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-description" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" /> 140 <p class="description" id="admin-email-description"><?php _e('This address is used for admin purposes, like new user notification.') ?></p></td> 141 141 </tr> 142 142 <tr> 143 143 <th scope="row"><?php _e('Membership') ?></th> … … 155 155 <?php } else { ?> 156 156 <tr> 157 157 <th scope="row"><label for="new_admin_email"><?php _e('E-mail Address') ?> </label></th> 158 <td><input name="new_admin_email" type="email" id="new_admin_email" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />159 <p class="description" ><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></p>158 <td><input name="new_admin_email" type="email" id="new_admin_email" aria-describedby="new-admin-email-description" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" /> 159 <p class="description" id="new-admin-email-description"><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></p> 160 160 <?php 161 161 $new_admin_email = get_option( 'new_admin_email' ); 162 162 if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?> … … 192 192 <th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th> 193 193 <td> 194 194 195 <select id="timezone_string" name="timezone_string" >195 <select id="timezone_string" name="timezone_string" aria-describedby="timezone-description"> 196 196 <?php echo wp_timezone_choice($tzstring); ?> 197 197 </select> 198 198 … … 200 200 <?php if ( get_option('timezone_string') || !empty($current_offset) ) : ?> 201 201 <span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'), date_i18n($timezone_format)); ?></span> 202 202 <?php endif; ?> 203 <p class="description" ><?php _e('Choose a city in the same timezone as you.'); ?></p>203 <p class="description" id="timezone-description"><?php _e('Choose a city in the same timezone as you.'); ?></p> 204 204 <?php if ($check_zone_info && $tzstring) : ?> 205 205 <br /> 206 206 <span> … … 271 271 echo " checked='checked'"; 272 272 $custom = false; 273 273 } 274 echo ' /> <span>' . date_i18n( $format ) . "</span></label><br />\n";274 echo ' /> ' . date_i18n( $format ) . "</label><br />\n"; 275 275 } 276 276 277 277 echo ' <label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"'; 278 278 checked( $custom ); 279 echo '/> ' . __('Custom:') . ' </label><input type="text" name="date_format_custom" value="' . esc_attr( get_option('date_format') ) . '" class="small-text" /> <span class="example"> ' . date_i18n( get_option('date_format') ) . "</span> <span class='spinner'></span>\n"; 279 echo '/> ' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . _x( 'enter a custom date format in the following field', 'custom date format screen reader text' ) . "</span></label>\n"; 280 echo '<label for="date_format_custom" class="screen-reader-text">' . __( 'Custom date format:' ) . '</label><input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option('date_format') ) . '" class="small-text" /> <span class="screen-reader-text">' . __( 'example:' ) . ' </span><span class="example"> ' . date_i18n( get_option('date_format') ) . "</span> <span class='spinner'></span>\n"; 280 281 ?> 281 282 </fieldset> 282 283 </td> … … 303 304 echo " checked='checked'"; 304 305 $custom = false; 305 306 } 306 echo ' /> <span>' . date_i18n( $format ) . "</span></label><br />\n";307 echo ' /> ' . date_i18n( $format ) . "</label><br />\n"; 307 308 } 308 309 309 310 echo ' <label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"'; 310 311 checked( $custom ); 311 echo '/> ' . __('Custom:') . ' </label><input type="text" name="time_format_custom" value="' . esc_attr( get_option('time_format') ) . '" class="small-text" /> <span class="example"> ' . date_i18n( get_option('time_format') ) . "</span> <span class='spinner'></span>\n"; 312 echo '/> ' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . _x( 'enter a custom time format in the following field', 'custom time formatscreen reader text' ) . "</span></label>\n"; 313 echo '<label for="time_format_custom" class="screen-reader-text">' . __( 'Custom time format:' ) . '</label><input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option('time_format') ) . '" class="small-text" /> <span class="screen-reader-text">' . __( 'example:' ) . ' </span><span class="example"> ' . date_i18n( get_option('time_format') ) . "</span> <span class='spinner'></span>\n"; 312 314 313 315 echo "\t<p>" . __('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n"; 314 316 ?>