Make WordPress Core

Ticket #35391: 35391.2.diff

File 35391.2.diff, 3.3 KB (added by SergeyBiryukov, 5 years ago)
  • src/wp-admin/css/list-tables.css

     
    302302}
    303303
    304304.fixed .column-posts,
    305 .fixed .column-date,
    306305.fixed .column-parent,
    307306.fixed .column-links,
    308307.fixed .column-author,
     
    310309        width: 10%;
    311310}
    312311
     312.fixed .column-date {
     313        width: 14%;
     314}
     315
    313316.column-date span[title] {
    314317        -webkit-text-decoration: dotted underline;
    315318        text-decoration: dotted underline;
     
    397400        width: 20%;
    398401}
    399402
    400 #comments-form .fixed .column-date {
    401         width: 14%;
    402 }
    403 
    404403#commentsdiv.postbox .inside {
    405404        margin: 0;
    406405        padding: 0;
     
    16531652        .plugin-card .desc p:first-of-type {
    16541653                margin-top: 0;
    16551654        }
    1656 
    1657         .fixed .column-date {
    1658                 width: 14%;
    1659         }
    16601655}
    16611656
    16621657@media screen and (max-width: 782px) {
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    10631063
    10641064                if ( '0000-00-00 00:00:00' === $post->post_date ) {
    10651065                        $t_time    = __( 'Unpublished' );
    1066                         $h_time    = $t_time;
    10671066                        $time_diff = 0;
    10681067                } else {
    10691068                        $t_time    = get_the_time( __( 'Y/m/d g:i:s a' ), $post );
    10701069                        $time      = get_post_timestamp( $post );
    10711070                        $time_diff = time() - $time;
    1072 
    1073                         if ( $time && $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
    1074                                 /* translators: %s: Human-readable time difference. */
    1075                                 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
    1076                         } else {
    1077                                 $h_time = get_the_time( __( 'Y/m/d' ), $post );
    1078                         }
    10791071                }
    10801072
    10811073                if ( 'publish' === $post->post_status ) {
     
    11061098                        echo $status . '<br />';
    11071099                }
    11081100
    1109                 if ( 'excerpt' === $mode ) {
    1110                         /**
    1111                          * Filters the published time of the post.
    1112                          *
    1113                          * If `$mode` equals 'excerpt', the published time and date are both displayed.
    1114                          * If `$mode` equals 'list' (default), the publish date is displayed, with the
    1115                          * time and date together available as an abbreviation definition.
    1116                          *
    1117                          * @since 2.5.1
    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 );
    1125                 } else {
    1126 
    1127                         /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
    1128                         echo '<span title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, 'date', $mode ) . '</span>';
    1129                 }
     1101                /**
     1102                 * Filters the published time of the post.
     1103                 *
     1104                 * @since 2.5.1
     1105                 * @since 5.4.0 Removed the difference between 'excerpt' and 'list' modes.
     1106                 *              The published time and date are both displayed now,
     1107                 *              which is equivalent to the previous 'excerpt' mode.
     1108                 *
     1109                 * @param string  $t_time      The published time.
     1110                 * @param WP_Post $post        Post object.
     1111                 * @param string  $column_name The column name.
     1112                 * @param string  $mode        The list display mode ('excerpt' or 'list').
     1113                 */
     1114                echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
    11301115        }
    11311116
    11321117        /**