diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/includes/options.php --- a/wp/wp-admin/includes/options.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/includes/options.php Tue Dec 15 13:49:49 2020 +0100 @@ -49,16 +49,17 @@ $siteName.text( title ); }); - $("input[name='date_format']").click(function(){ - if ( "date_format_custom_radio" != $(this).attr("id") ) + $( 'input[name="date_format"]' ).click( function() { + if ( 'date_format_custom_radio' !== $(this).attr( 'id' ) ) $( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); }); + $( 'input[name="date_format_custom"]' ).on( 'click input', function() { $( '#date_format_custom_radio' ).prop( 'checked', true ); }); - $("input[name='time_format']").click(function(){ - if ( "time_format_custom_radio" != $(this).attr("id") ) + $( 'input[name="time_format"]' ).click( function() { + if ( 'time_format_custom_radio' !== $(this).attr( 'id' ) ) $( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); }); @@ -80,7 +81,7 @@ spinner.addClass( 'is-active' ); $.post( ajaxurl, { - action: 'date_format_custom' == format.attr( 'name' ) ? 'date_format' : 'time_format', + action: 'date_format_custom' === format.attr( 'name' ) ? 'date_format' : 'time_format', date : format.val() }, function( d ) { spinner.removeClass( 'is-active' ); example.text( d ); } ); } @@ -129,5 +130,5 @@ */ function options_reading_blog_charset() { echo ''; - echo '

' . __( 'The character encoding of your site (UTF-8 is recommended)' ) . '

'; + echo '

' . __( 'The character encoding of your site (UTF-8 is recommended)' ) . '

'; }