From 5df58454cd6eec54a7888f13660051c12da6f57c Mon Sep 17 00:00:00 2001 From: Deiva Raja B <151660497+3deiva@users.noreply.github.com> Date: Tue, 13 Jan 2026 00:26:34 +0530 Subject: [PATCH 1/5] Fix gmdate() type error on dashboard recent posts --- src/wp-admin/includes/dashboard.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index cac03b1fe3630..894b1a8139e30 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1012,7 +1012,8 @@ function wp_dashboard_recent_posts( $args ) { while ( $posts->have_posts() ) { $posts->the_post(); - $time = get_the_time( 'U' ); + $time = (int) get_the_time( 'U' ); + if ( gmdate( 'Y-m-d', $time ) === $today ) { $relative = __( 'Today' ); From 887c08258bd60041691c5b733efd8ef7c8200078 Mon Sep 17 00:00:00 2001 From: Deiva Raja B <151660497+3deiva@users.noreply.github.com> Date: Tue, 13 Jan 2026 00:42:50 +0530 Subject: [PATCH 2/5] Fix gmdate() type error on dashboard recent posts (PHP 8.3) --- src/wp-admin/includes/dashboard.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 894b1a8139e30..96e85c5043ff0 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1012,7 +1012,8 @@ function wp_dashboard_recent_posts( $args ) { while ( $posts->have_posts() ) { $posts->the_post(); - $time = (int) get_the_time( 'U' ); + $time = intval( get_the_time( 'U' ) ); + if ( gmdate( 'Y-m-d', $time ) === $today ) { From ef660cb5e4bb5997accbf272bbc40e8f893ac8d7 Mon Sep 17 00:00:00 2001 From: Deiva Raja B <151660497+3deiva@users.noreply.github.com> Date: Tue, 13 Jan 2026 16:37:44 +0530 Subject: [PATCH 3/5] Remove redundant if condition for today's date --- src/wp-admin/includes/dashboard.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 96e85c5043ff0..e356f77bb2480 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1014,9 +1014,8 @@ function wp_dashboard_recent_posts( $args ) { $time = intval( get_the_time( 'U' ) ); + if ( gmdate( 'Y-m-d', $time ) === $today ) { - - if ( gmdate( 'Y-m-d', $time ) === $today ) { $relative = __( 'Today' ); } elseif ( gmdate( 'Y-m-d', $time ) === $tomorrow ) { $relative = __( 'Tomorrow' ); From ed23efef63f338ee5d0ec074850a1ca29e567499 Mon Sep 17 00:00:00 2001 From: Deiva Raja B <151660497+3deiva@users.noreply.github.com> Date: Tue, 13 Jan 2026 16:47:27 +0530 Subject: [PATCH 4/5] Update dashboard.php --- src/wp-admin/includes/dashboard.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index e356f77bb2480..0f084870ac528 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1015,7 +1015,6 @@ function wp_dashboard_recent_posts( $args ) { $time = intval( get_the_time( 'U' ) ); if ( gmdate( 'Y-m-d', $time ) === $today ) { - $relative = __( 'Today' ); } elseif ( gmdate( 'Y-m-d', $time ) === $tomorrow ) { $relative = __( 'Tomorrow' ); From 226e75ecab6780e810eabae8b6ef0cfb8409b101 Mon Sep 17 00:00:00 2001 From: Deiva Raja B <151660497+3deiva@users.noreply.github.com> Date: Tue, 13 Jan 2026 16:58:03 +0530 Subject: [PATCH 5/5] Fix formatting of if statement for today's date --- src/wp-admin/includes/dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 0f084870ac528..5af0ba19cd91a 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1013,8 +1013,8 @@ function wp_dashboard_recent_posts( $args ) { $posts->the_post(); $time = intval( get_the_time( 'U' ) ); - - if ( gmdate( 'Y-m-d', $time ) === $today ) { + + if ( gmdate( 'Y-m-d', $time ) === $today ) { $relative = __( 'Today' ); } elseif ( gmdate( 'Y-m-d', $time ) === $tomorrow ) { $relative = __( 'Tomorrow' );