Make WordPress Core

Ticket #35391: 35391.diff

File 35391.diff, 3.7 KB (added by afercia, 5 years ago)
  • src/wp-admin/css/list-tables.css

     
    295295}
    296296
    297297.fixed .column-posts,
    298 .fixed .column-date,
    299298.fixed .column-parent,
    300299.fixed .column-links,
    301300.fixed .column-author,
     
    303302        width: 10%;
    304303}
    305304
     305.fixed .column-date {
     306        width: 14%;
     307}
     308
    306309.column-date span[title] {
    307310        -webkit-text-decoration: dotted underline;
    308311        text-decoration: dotted underline;
     
    390393        width: 20%;
    391394}
    392395
    393 #comments-form .fixed .column-date {
    394         width: 14%;
    395 }
    396 
    397396#commentsdiv.postbox .inside {
    398397        margin: 0;
    399398        padding: 0;
     
    16301629        .plugin-card .desc p:first-of-type {
    16311630                margin-top: 0;
    16321631        }
    1633 
    1634         .fixed .column-date {
    1635                 width: 14%;
    1636         }
    16371632}
    16381633
    16391634@media screen and (max-width: 782px) {
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    10651065
    10661066                if ( '0000-00-00 00:00:00' === $post->post_date ) {
    10671067                        $t_time    = __( 'Unpublished' );
    1068                         $h_time    = $t_time;
    10691068                        $time_diff = 0;
    10701069                } else {
    1071                         $t_time    = get_the_time( __( 'Y/m/d g:i:s a' ), $post );
     1070                        $t_time = sprintf(
     1071                                /* translators: 1: Post date, 2: Post time. */
     1072                                __( '%1$s at %2$s' ),
     1073                                /* translators: Post date format. See https://www.php.net/date */
     1074                                get_the_time( __( 'Y/m/d' ), $post ),
     1075                                /* translators: Post time format. See https://www.php.net/date */
     1076                                get_the_time( __( 'g:i a' ), $post )
     1077                        );
     1078
    10721079                        $time      = get_post_timestamp( $post );
    10731080                        $time_diff = time() - $time;
    1074 
    1075                         if ( $time && $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
    1076                                 /* translators: %s: Human-readable time difference. */
    1077                                 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
    1078                         } else {
    1079                                 $h_time = get_the_time( __( 'Y/m/d' ), $post );
    1080                         }
    10811081                }
    10821082
    10831083                if ( 'publish' === $post->post_status ) {
     
    11081108                        echo $status . '<br />';
    11091109                }
    11101110
    1111                 if ( 'excerpt' === $mode ) {
    1112                         /**
    1113                          * Filters the published time of the post.
    1114                          *
    1115                          * If `$mode` equals 'excerpt', the published time and date are both displayed.
    1116                          * If `$mode` equals 'list' (default), the publish date is displayed, with the
    1117                          * time and date together available as an abbreviation definition.
    1118                          *
    1119                          * @since 2.5.1
    1120                          *
    1121                          * @param string  $t_time      The published time.
    1122                          * @param WP_Post $post        Post object.
    1123                          * @param string  $column_name The column name.
    1124                          * @param string  $mode        The list display mode ('excerpt' or 'list').
    1125                          */
    1126                         echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
    1127                 } else {
    1128 
    1129                         /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
    1130                         echo '<span title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, 'date', $mode ) . '</span>';
    1131                 }
     1111                /**
     1112                 * Filters the published time of the post.
     1113                 *
     1114                 * @since 2.5.1
     1115                 * @since 5.5.0 Removed the difference between 'excerpt' and 'list' modes.
     1116                 *              The published time and date are both displayed now,
     1117                 *              which is equivalent to the previous 'excerpt' mode.
     1118                 *
     1119                 * @param string  $t_time      The published time.
     1120                 * @param WP_Post $post        Post object.
     1121                 * @param string  $column_name The column name.
     1122                 * @param string  $mode        The list display mode ('excerpt' or 'list').
     1123                 */
     1124                echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
    11321125        }
    11331126
    11341127        /**