mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55632 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user