Changeset 46578
- Timestamp:
- 10/25/2019 12:49:40 PM (5 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r46418 r46578 453 453 $h_time = __( 'Unpublished' ); 454 454 } else { 455 $m_time = $post->post_date; 456 $time = get_post_time( 'G', true, $post, false ); 457 $t_diff = time() - $time; 458 if ( ( abs( $t_diff ) ) < DAY_IN_SECONDS ) { 459 if ( $t_diff < 0 ) { 460 /* translators: %s: Human-readable time difference. */ 461 $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); 462 } else { 463 /* translators: %s: Human-readable time difference. */ 464 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 465 } 455 $time = get_post_timestamp( $post ); 456 $time_diff = time() - $time; 457 458 if ( $time && $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) { 459 /* translators: %s: Human-readable time difference. */ 460 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 466 461 } else { 467 $h_time = mysql2date( __( 'Y/m/d' ), $m_time);462 $h_time = get_the_time( __( 'Y/m/d' ), $post ); 468 463 } 469 464 } -
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r45932 r46578 1067 1067 $time_diff = 0; 1068 1068 } else { 1069 $t_time = get_the_time( __( 'Y/m/d g:i:s a' ) ); 1070 $m_time = $post->post_date; 1071 $time = get_post_time( 'G', true, $post ); 1072 1069 $t_time = get_the_time( __( 'Y/m/d g:i:s a' ), $post ); 1070 $time = get_post_timestamp( $post ); 1073 1071 $time_diff = time() - $time; 1074 1072 1075 if ( $time _diff > 0 && $time_diff < DAY_IN_SECONDS ) {1073 if ( $time && $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) { 1076 1074 /* translators: %s: Human-readable time difference. */ 1077 1075 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 1078 1076 } else { 1079 $h_time = mysql2date( __( 'Y/m/d' ), $m_time);1077 $h_time = get_the_time( __( 'Y/m/d' ), $post ); 1080 1078 } 1081 1079 } … … 1584 1582 $users_opt['show_option_none'] = __( '— No Change —' ); 1585 1583 } 1584 1585 /** 1586 * Filters the arguments used to generate the Quick Edit authors drop-down. 1587 * 1588 * @since 5.3.0 1589 * 1590 * @see wp_dropdown_users() 1591 * 1592 * @param array $users_opt An array of arguments for wp_dropdown_users function. 1593 * @param bool $bulk A boolean to know if it's a bulk action or not. 1594 */ 1595 $users_opt = apply_filters( 'quick_edit_authors_query_args', $users_opt, $bulk ); 1586 1596 1587 1597 $authors = wp_dropdown_users( $users_opt );
Note: See TracChangeset
for help on using the changeset viewer.