Ticket #35391: 35391.2.diff
File 35391.2.diff, 3.3 KB (added by , 5 years ago) |
---|
-
src/wp-admin/css/list-tables.css
302 302 } 303 303 304 304 .fixed .column-posts, 305 .fixed .column-date,306 305 .fixed .column-parent, 307 306 .fixed .column-links, 308 307 .fixed .column-author, … … 310 309 width: 10%; 311 310 } 312 311 312 .fixed .column-date { 313 width: 14%; 314 } 315 313 316 .column-date span[title] { 314 317 -webkit-text-decoration: dotted underline; 315 318 text-decoration: dotted underline; … … 397 400 width: 20%; 398 401 } 399 402 400 #comments-form .fixed .column-date {401 width: 14%;402 }403 404 403 #commentsdiv.postbox .inside { 405 404 margin: 0; 406 405 padding: 0; … … 1653 1652 .plugin-card .desc p:first-of-type { 1654 1653 margin-top: 0; 1655 1654 } 1656 1657 .fixed .column-date {1658 width: 14%;1659 }1660 1655 } 1661 1656 1662 1657 @media screen and (max-width: 782px) { -
src/wp-admin/includes/class-wp-posts-list-table.php
1063 1063 1064 1064 if ( '0000-00-00 00:00:00' === $post->post_date ) { 1065 1065 $t_time = __( 'Unpublished' ); 1066 $h_time = $t_time;1067 1066 $time_diff = 0; 1068 1067 } else { 1069 1068 $t_time = get_the_time( __( 'Y/m/d g:i:s a' ), $post ); 1070 1069 $time = get_post_timestamp( $post ); 1071 1070 $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 }1079 1071 } 1080 1072 1081 1073 if ( 'publish' === $post->post_status ) { … … 1106 1098 echo $status . '<br />'; 1107 1099 } 1108 1100 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 ); 1130 1115 } 1131 1116 1132 1117 /**