Skip to content

Commit 958ce5c

Browse files
Remove needless null coalescing
Co-authored-by: Stephen A. Bernhardt <sabernhardt@yahoo.com>
1 parent 096cea0 commit 958ce5c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-admin/includes/dashboard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ function wp_dashboard_recent_posts( $args ) {
10151015
$time = get_the_time( 'U' );
10161016

10171017
if ( ! is_int( $time ) ) {
1018-
$relative = null;
1018+
$relative = get_the_date();
10191019
} elseif ( gmdate( 'Y-m-d', $time ) === $today ) {
10201020
$relative = __( 'Today' );
10211021
} elseif ( gmdate( 'Y-m-d', $time ) === $tomorrow ) {
@@ -1035,7 +1035,7 @@ function wp_dashboard_recent_posts( $args ) {
10351035
printf(
10361036
'<li><span>%1$s</span> <a href="%2$s" aria-label="%3$s">%4$s</a></li>',
10371037
/* translators: 1: Relative date, 2: Time. */
1038-
sprintf( _x( '%1$s, %2$s', 'dashboard' ), $relative ?? get_the_date(), get_the_time() ),
1038+
sprintf( _x( '%1$s, %2$s', 'dashboard' ), $relative, get_the_time() ),
10391039
$recent_post_link,
10401040
/* translators: %s: Post title. */
10411041
esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $draft_or_post_title ) ),

0 commit comments

Comments
 (0)