Make WordPress Core

Changeset 35811


Ignore:
Timestamp:
12/07/2015 04:25:53 AM (11 years ago)
Author:
iseulde
Message:

Make date format consistent across the admin

The 'date_format' and 'time_format' options shouldn't affect the backend.

See #30864

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin.php

    r34828 r35811  
    9090set_screen_options();
    9191
    92 $date_format = get_option('date_format');
    93 $time_format = get_option('time_format');
     92$date_format = __( 'F j, Y' );
     93$time_format = __( 'g:i a' );
    9494
    9595wp_enqueue_script( 'common' );
  • trunk/src/wp-admin/comment.php

    r35665 r35811  
    200200                                /* translators: comment date format. See http://php.net/date */
    201201                                get_comment_date( __( 'Y/m/d' ), $comment ),
    202                                 get_comment_date( get_option( 'time_format' ), $comment )
     202                                get_comment_date( __( 'g:i a' ), $comment )
    203203                        );
    204204                ?></a>
  • trunk/src/wp-admin/edit-form-advanced.php

    r34925 r35811  
    632632                echo '<span id="last-edit">';
    633633                if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) {
    634                         printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     634                        printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
    635635                } else {
    636                         printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     636                        printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
    637637                }
    638638                echo '</span>';
  • trunk/src/wp-admin/includes/ajax-actions.php

    r35790 r35811  
    12381238                        $post_data['post_status'] = 'draft';
    12391239                        $now = current_time('timestamp', 1);
    1240                         $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( get_option( 'date_format' ), $now ), date( get_option( 'time_format' ), $now ) );
     1240                        $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( __( 'F j, Y' ), $now ), date( __( 'g:i a' ), $now ) );
    12411241
    12421242                        $pid = edit_post( $post_data );
    … …  
    22282228
    22292229        if ( $post ) {
    2230                 $last_date = mysql2date( get_option('date_format'), $post->post_modified );
    2231                 $last_time = mysql2date( get_option('time_format'), $post->post_modified );
     2230                $last_date = mysql2date( __( 'F j, Y' ), $post->post_modified );
     2231                $last_time = mysql2date( __( 'g:i a' ), $post->post_modified );
    22322232        } else {
    2233                 $last_date = date_i18n( get_option('date_format') );
    2234                 $last_time = date_i18n( get_option('time_format') );
     2233                $last_date = date_i18n( __( 'F j, Y' ) );
     2234                $last_time = date_i18n( __( 'g:i a' ) );
    22352235        }
    22362236
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r35748 r35811  
    721721                        /* translators: comment date format. See http://php.net/date */
    722722                        get_comment_date( __( 'Y/m/d' ), $comment ),
    723                         get_comment_date( get_option( 'time_format' ), $comment )
     723                        get_comment_date( __( 'g:i a' ), $comment )
    724724                );
    725725                echo '</a>';
  • trunk/src/wp-admin/includes/dashboard.php

    r35443 r35811  
    551551                echo "<li>\n";
    552552                echo '<div class="draft-title"><a href="' . esc_url( $url ) . '" title="' . esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ) . '">' . esc_html( $title ) . '</a>';
    553                 echo '<time datetime="' . get_the_time( 'c', $draft ) . '">' . get_the_time( get_option( 'date_format' ), $draft ) . '</time></div>';
     553                echo '<time datetime="' . get_the_time( 'c', $draft ) . '">' . get_the_time( __( 'F j, Y' ), $draft ) . '</time></div>';
    554554                if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) {
    555555                        echo '<p>' . $the_content . '</p>';
  • trunk/src/wp-admin/includes/media.php

    r35677 r35811  
    14561456                        <p><strong>" . __('File name:') . "</strong> $filename</p>
    14571457                        <p><strong>" . __('File type:') . "</strong> $post->post_mime_type</p>
    1458                         <p><strong>" . __('Upload date:') . "</strong> " . mysql2date( get_option('date_format'), $post->post_date ). '</p>';
     1458                        <p><strong>" . __('Upload date:') . "</strong> " . mysql2date( __( 'F j, Y' ), $post->post_date ). '</p>';
    14591459                        if ( !empty( $media_dims ) )
    14601460                                $item .= "<p><strong>" . __('Dimensions:') . "</strong> $media_dims</p>\n";
  • trunk/src/wp-admin/options-general.php

    r35685 r35811  
    7474<th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th>
    7575<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
    76 <?php if ( ! defined( 'WP_HOME' ) ) : ?> 
     76<?php if ( ! defined( 'WP_HOME' ) ) : ?>
    7777<p class="description" id="home-description"><?php _e( 'Enter the address here if you <a href="https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">want your site home page to be different from your WordPress installation directory.</a>' ); ?></p></td>
    7878<?php endif; ?>
    … …  
    199199                        printf( $message,
    200200                                '<code>' . date_i18n(
    201                                         get_option( 'date_format' ) . ' ' . get_option( 'time_format' ),
     201                                        __( 'F j, Y' ) . ' ' . __( 'g:i a' ),
    202202                                        $tr['ts'] + ( $tz_offset - $tr['offset'] )
    203203                                ) . '</code>'
  • trunk/src/wp-admin/update-core.php

    r35567 r35811  
    575575        echo '<p>';
    576576        /* translators: %1 date, %2 time. */
    577         printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) );
     577        printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) );
    578578        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
    579579        echo '</p>';
  • trunk/src/wp-includes/media.php

    r35755 r35811  
    29802980                'subtype'     => $subtype,
    29812981                'icon'        => wp_mime_type_icon( $attachment->ID ),
    2982                 'dateFormatted' => mysql2date( get_option('date_format'), $attachment->post_date ),
     2982                'dateFormatted' => mysql2date( __( 'F j, Y' ), $attachment->post_date ),
    29832983                'nonces'      => array(
    29842984                        'update' => false,
Note: See TracChangeset for help on using the changeset viewer.