Make WordPress Core

Ticket #52322: 52322.diff

File 52322.diff, 1.0 KB (added by travisaxton, 5 years ago)
  • wp-includes/comment-template.php

    diff --git wp-includes/comment-template.php wp-includes/comment-template.php
    index e6b246c..e3c8faa 100644
    function comment_text( $comment_ID = 0, $args = array() ) { 
    10341034 * @since 1.5.0
    10351035 *
    10361036 * @param string $format    Optional. PHP date format. Defaults to the 'time_format' option.
     1037 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the date.
    10371038 * @param bool   $gmt       Optional. Whether to use the GMT date. Default false.
    10381039 * @param bool   $translate Optional. Whether to translate the time (for use in feeds).
    10391040 *                          Default true.
    10401041 * @return string The formatted time.
    10411042 */
    1042 function get_comment_time( $format = '', $gmt = false, $translate = true ) {
    1043         $comment = get_comment();
     1043function get_comment_time( $format = '', $comment_ID = 0, $gmt = false, $translate = true ) {
     1044        $comment = get_comment( $comment_ID );
    10441045
    10451046        $comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;
    10461047