Publish box: fix strange date format after change

Part props tyxla.
Fixes #30716.

Built from https://develop.svn.wordpress.org/trunk@33340


git-svn-id: http://core.svn.wordpress.org/trunk@33312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ella Iseulde Van Dorpe 2015-07-21 11:40:25 +00:00
parent 4dcfd3ec83
commit 262c1a7e54
5 changed files with 10 additions and 8 deletions

View File

@ -784,9 +784,10 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
$month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
for ( $i = 1; $i < 13; $i = $i +1 ) {
$monthnum = zeroise($i, 2);
$month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $monthnum, $mm, false ) . '>';
$monthtext = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
$month .= "\t\t\t" . '<option value="' . $monthnum . '" data-text="' . $monthtext . '" ' . selected( $monthnum, $mm, false ) . '>';
/* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
$month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
$month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $monthtext ) . "</option>\n";
}
$month .= '</select></label>';

View File

@ -558,8 +558,9 @@ jQuery(document).ready( function($) {
$('#timestamp').html(stamp);
} else {
$('#timestamp').html(
publishOn + ' <b>' +
postL10n.dateFormat.replace( '%1$s', $('option[value="' + $('#mm').val() + '"]', '#mm').text() )
'\n' + publishOn + ' <b>' +
postL10n.dateFormat
.replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) )
.replace( '%2$s', jj )
.replace( '%3$s', aa )
.replace( '%4$s', hh )

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta3-33339';
$wp_version = '4.3-beta3-33340';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.