Changeset 47808 for trunk/src/wp-admin/includes/options.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/options.php
r46586 r47808 50 50 }); 51 51 52 $( "input[name='date_format']").click(function(){53 if ( "date_format_custom_radio" != $(this).attr("id") )52 $( 'input[name="date_format"]' ).click( function() { 53 if ( 'date_format_custom_radio' !== $(this).attr( 'id' ) ) 54 54 $( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); 55 55 }); 56 56 57 $( 'input[name="date_format_custom"]' ).on( 'click input', function() { 57 58 $( '#date_format_custom_radio' ).prop( 'checked', true ); 58 59 }); 59 60 60 $( "input[name='time_format']").click(function(){61 if ( "time_format_custom_radio" != $(this).attr("id") )61 $( 'input[name="time_format"]' ).click( function() { 62 if ( 'time_format_custom_radio' !== $(this).attr( 'id' ) ) 62 63 $( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); 63 64 }); … … 81 82 82 83 $.post( ajaxurl, { 83 action: 'date_format_custom' == format.attr( 'name' ) ? 'date_format' : 'time_format',84 action: 'date_format_custom' === format.attr( 'name' ) ? 'date_format' : 'time_format', 84 85 date : format.val() 85 86 }, function( d ) { spinner.removeClass( 'is-active' ); example.text( d ); } );
Note: See TracChangeset
for help on using the changeset viewer.