Changes in trunk/wp-admin/options-general.php [16736:15132]
- File:
-
- 1 edited
-
trunk/wp-admin/options-general.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r16736 r15132 22 22 * 23 23 * @package WordPress 24 * @subpackage General_Settings_ Screen24 * @subpackage General_Settings_Panel 25 25 */ 26 26 function add_js() { … … 31 31 $("input[name='date_format']").click(function(){ 32 32 if ( "date_format_custom_radio" != $(this).attr("id") ) 33 $("input[name='date_format_custom']").val( $(this).val() ) .siblings('.example').text( $(this).siblings('span').text() );33 $("input[name='date_format_custom']").val( $(this).val() ); 34 34 }); 35 35 $("input[name='date_format_custom']").focus(function(){ … … 39 39 $("input[name='time_format']").click(function(){ 40 40 if ( "time_format_custom_radio" != $(this).attr("id") ) 41 $("input[name='time_format_custom']").val( $(this).val() ) .siblings('.example').text( $(this).siblings('span').text() );41 $("input[name='time_format_custom']").val( $(this).val() ); 42 42 }); 43 43 $("input[name='time_format_custom']").focus(function(){ 44 44 $("#time_format_custom_radio").attr("checked", "checked"); 45 45 }); 46 $("input[name='date_format_custom'], input[name='time_format_custom']").change( function() {47 var format = $(this);48 format.siblings('img').css('visibility','visible');49 $.post(ajaxurl, {50 action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format',51 date : format.val()52 }, function(d) { format.siblings('img').css('visibility','hidden'); format.siblings('.example').text(d); } );53 });54 46 }); 55 47 //]]> … … 57 49 <?php 58 50 } 59 add_ action('admin_head', 'add_js');51 add_filter('admin_head', 'add_js'); 60 52 61 53 add_contextual_help($current_screen, … … 123 115 <th scope="row"><label for="new_admin_email"><?php _e('E-mail address') ?> </label></th> 124 116 <td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text code" /> 125 <span 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>') ?></span>117 <span class="setting-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>') ?></span> 126 118 <?php 127 119 $new_admin_email = get_option( 'new_admin_email' ); … … 274 266 $custom = false; 275 267 } 276 echo ' /> <span>' . date_i18n( $format ) . "</span></label><br />\n";268 echo ' /> ' . date_i18n( $format ) . "</label><br />\n"; 277 269 } 278 270 279 271 echo ' <label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"'; 280 272 checked( $custom ); 281 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> <img class='ajax-loading' src='" . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . "' />\n";282 283 echo "\t<p>" . __('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n";273 echo '/> ' . __('Custom:') . ' </label><input type="text" name="date_format_custom" value="' . esc_attr( get_option('date_format') ) . '" class="small-text" /> ' . date_i18n( get_option('date_format') ) . "\n"; 274 275 echo "\t<p>" . __('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click “Save Changes” to update sample output.') . "</p>\n"; 284 276 ?> 285 277 </fieldset> … … 306 298 $custom = false; 307 299 } 308 echo ' /> <span>' . date_i18n( $format ) . "</span></label><br />\n";300 echo ' /> ' . date_i18n( $format ) . "</label><br />\n"; 309 301 } 310 302 311 303 echo ' <label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"'; 312 304 checked( $custom ); 313 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> <img class='ajax-loading' src='" . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . "' />\n"; 314 ; 305 echo '/> ' . __('Custom:') . ' </label><input type="text" name="time_format_custom" value="' . esc_attr( get_option('time_format') ) . '" class="small-text" /> ' . date_i18n( get_option('time_format') ) . "\n"; 315 306 ?> 316 307 </fieldset> … … 348 339 <?php do_settings_sections('general'); ?> 349 340 350 <?php submit_button(); ?> 341 <p class="submit"> 342 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> 343 </p> 351 344 </form> 352 345
Note: See TracChangeset
for help on using the changeset viewer.