WordPress.org

Make WordPress Core

Ticket #14856: 14856.patch

File 14856.patch, 1.8 KB (added by jorbin, 7 years ago)

refresh (without trailing whitespace this time)

  • wp-includes/comment-template.php

     
    593593 * @uses $comment
    594594 *
    595595 * @param int $comment_ID The ID of the comment for which to get the text. Optional.
     596 * @param array $args Formatting options passed into, for example, wp_list_comments. Optional.
    596597 * @return string The comment content
    597598 */
    598 function get_comment_text( $comment_ID = 0 ) {
     599function get_comment_text( $comment_ID = 0, $args = null ) {
    599600        $comment = get_comment( $comment_ID );
    600         return apply_filters( 'get_comment_text', $comment->comment_content, $comment );
     601        return apply_filters( 'get_comment_text', $comment->comment_content, $comment, $args );
    601602}
    602603
    603604/**
     
    608609 * @uses get_comment_text() Gets the comment content
    609610 *
    610611 * @param int $comment_ID The ID of the comment for which to print the text. Optional.
     612 * @param array $args Formatting options passed into, for example, wp_list_comments. Optional.
    611613 */
    612 function comment_text( $comment_ID = 0 ) {
     614function comment_text( $comment_ID = 0, $args ) {
    613615        $comment = get_comment( $comment_ID );
    614         echo apply_filters( 'comment_text', get_comment_text( $comment_ID ), $comment );
     616        echo apply_filters( 'comment_text', get_comment_text( $comment_ID , $args ), $comment, $args );
    615617}
    616618
    617619/**
     
    13651367                        ?>
    13661368                </div>
    13671369
    1368                 <?php comment_text() ?>
     1370                <?php comment_text( get_comment_id(), array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))  ) ?>
    13691371
    13701372                <div class="reply">
    13711373                <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>