diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index fd09536db2..c19551751e 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -166,8 +166,14 @@ if ( $viewable ) { } -/* translators: Publish box date format, see https://secure.php.net/date */ -$scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ); +$scheduled_date = sprintf( + /* translators: Publish box date string. 1: Date, 2: Time. */ + __( '%1$s at %2$s' ), + /* translators: Publish box date format, see https://secure.php.net/date */ + date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $post->post_date ) ), + /* translators: Publish box time format, see https://secure.php.net/date */ + date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $post->post_date ) ) +); $messages['post'] = array( 0 => '', // Unused. Messages start at index 1. diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index cff73e11f2..504b04eda1 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -194,28 +194,41 @@ function post_submit_meta_box( $post, $args = array() ) { ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date /* translators: Post date information. %s: Date on which the post is currently scheduled to be published. */ - $stamp = __( 'Scheduled for: %s' ); + $stamp = __( 'Scheduled for: %s' ); } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published /* translators: Post date information. %s: Date on which the post was published. */ - $stamp = __( 'Published on: %s' ); + $stamp = __( 'Published on: %s' ); } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified $stamp = __( 'Publish immediately' ); } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified /* translators: Post date information. %s: Date on which the post is to be published. */ - $stamp = __( 'Schedule for: %s' ); + $stamp = __( 'Schedule for: %s' ); } else { // draft, 1 or more saves, date specified /* translators: Post date information. %s: Date on which the post is to be published. */ - $stamp = __( 'Publish on: %s' ); + $stamp = __( 'Publish on: %s' ); } - $date = date_i18n( $datef, strtotime( $post->post_date ) ); + $date = sprintf( + $date_string, + date_i18n( $date_format, strtotime( $post->post_date ) ), + date_i18n( $time_format, strtotime( $post->post_date ) ) + ); } else { // draft (no saves, and thus no date specified) $stamp = __( 'Publish immediately' ); - $date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) ); + $date = sprintf( + $date_string, + date_i18n( $date_format, strtotime( current_time( 'mysql' ) ) ), + date_i18n( $time_format, strtotime( current_time( 'mysql' ) ) ) + ); } if ( ! empty( $args['args']['revisions_count'] ) ) : @@ -234,10 +247,14 @@ endif; ?>