Make WordPress Core


Ignore:
Timestamp:
12/07/2015 04:25:53 AM (8 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.