From b4c66d31ace19deba62d2b41755b2ecea7882606 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 7 Apr 2023 14:36:21 +0000 Subject: [PATCH] Comments: Add missing arguments for `get_comment_time()` in `comment_time()`. In a recent change, `comment_time()` was updated to accept a `$comment_id` parameter for consistency with `comment_date()`, following a similar change for `get_comment_time()`. However, the new parameter was not correctly passed to `get_comment_time()` inside the function. It should be passed as the fourth parameter after `$format`, `$gmt` and `$translate`, not the second. This commit adds the missing arguments and a few unit tests to confirm the correct behavior. Follow-up to [55284], [55287], [55308]. Props costdev, tmatsuur, ugyensupport, johnbillion. Fixes #58064. Built from https://develop.svn.wordpress.org/trunk@55632 git-svn-id: http://core.svn.wordpress.org/trunk@55144 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 9a2064cec2..899fc26b72 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1109,7 +1109,7 @@ function get_comment_time( $format = '', $gmt = false, $translate = true, $comme * Default current comment. */ function comment_time( $format = '', $comment_id = 0 ) { - echo get_comment_time( $format, $comment_id ); + echo get_comment_time( $format, false, true, $comment_id ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 8a83feb6c1..e39a033185 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55631'; +$wp_version = '6.3-alpha-55632'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.