Make WordPress Core

Ticket #47832: 47832.2.diff

File 47832.2.diff, 4.0 KB (added by audrasjb, 5 years ago)

Adding back the link to PHP Date documentation

  • src/wp-admin/edit-form-advanced.php

    diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php
    index 977448a..709ee24 100644
    a b if ( $viewable ) { 
    166166
    167167}
    168168
    169 /* translators: Publish box date format, see https://secure.php.net/date */
    170 $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) );
     169$scheduled_date = sprintf(
     170        /* translators: Publish box datetime format. 1: date, 2: time */
     171        __( '%1$s at %2$s' ),
     172        date_i18n( _x( 'M j, Y', 'publish box date format. See https://secure.php.net/date' ), strtotime( $post->post_date ) ),
     173        date_i18n( _x( 'H:i', 'publish box time format. See https://secure.php.net/date' ), strtotime( $post->post_date ) )
     174);
    171175
    172176$messages['post']       = array(
    173177        0  => '', // Unused. Messages start at index 1.
  • src/wp-admin/includes/meta-boxes.php

    diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php
    index 188d8d2..bffa883 100644
    a b function post_submit_meta_box( $post, $args = array() ) { 
    194194</div><!-- .misc-pub-section -->
    195195
    196196        <?php
    197         /* translators: Publish box date format, see https://secure.php.net/date */
    198         $datef = __( 'M j, Y @ H:i' );
     197        /* translators: Publish box datetime format. 1: date, 2: time */
     198        $datef = __( '%1$s at %2$s' );
     199        $datef_date = _x( 'M j, Y', 'publish box date format. See https://secure.php.net/date' );
     200        $datef_time = _x( 'H:i', 'publish box time format. See https://secure.php.net/date' );
    199201        if ( 0 != $post->ID ) {
    200202                if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
    201203                        /* translators: Post date information. %s: Date on which the post is currently scheduled to be published */
    function post_submit_meta_box( $post, $args = array() ) { 
    212214                        /* translators: Post date information. %s: Date on which the post is to be published */
    213215                        $stamp = __( 'Publish on: <b>%s</b>' );
    214216                }
    215                 $date = date_i18n( $datef, strtotime( $post->post_date ) );
     217                $date = sprintf(
     218                        $datef,
     219                        date_i18n( $datef_date, strtotime( $post->post_date ) ),
     220                        date_i18n( $datef_time, strtotime( $post->post_date ) )
     221                );
    216222        } else { // draft (no saves, and thus no date specified)
    217223                $stamp = __( 'Publish <b>immediately</b>' );
    218                 $date  = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) );
     224                $date = sprintf(
     225                        $datef,
     226                        date_i18n( $datef_date, strtotime( current_time( 'mysql' ) ) ),
     227                        date_i18n( $datef_time, strtotime( current_time( 'mysql' ) ) )
     228                );
    219229        }
    220230
    221231        if ( ! empty( $args['args']['revisions_count'] ) ) :
  • src/wp-admin/includes/template.php

    diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
    index 8740c59..a804657 100644
    a b function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { 
    812812
    813813        echo '<div class="timestamp-wrap">';
    814814        /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
    815         printf( __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), $month, $day, $year, $hour, $minute );
     815        printf( __( '%1$s %2$s, %3$s at %4$s:%5$s' ), $month, $day, $year, $hour, $minute );
    816816
    817817        echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
    818818
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index c06680c..9b6ab4f 100644
    a b function wp_default_scripts( &$scripts ) { 
    15791579                                'publishOnFuture'    => __( 'Schedule for:' ),
    15801580                                'publishOnPast'      => __( 'Published on:' ),
    15811581                                /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
    1582                                 'dateFormat'         => __( '%1$s %2$s, %3$s @ %4$s:%5$s' ),
     1582                                'dateFormat'         => __( '%1$s %2$s, %3$s at %4$s:%5$s' ),
    15831583                                'showcomm'           => __( 'Show more comments' ),
    15841584                                'endcomm'            => __( 'No more comments found.' ),
    15851585                                'publish'            => __( 'Publish' ),