WordPress.org

Make WordPress Core

Ticket #14856: 14856.1.diff

File 14856.1.diff, 1.8 KB (added by ericlewis, 12 months ago)
  • 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 = array() ) { 
    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 = array() ) { 
    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/** 
     
    14191421                        ?> 
    14201422                </div> 
    14211423 
    1422                 <?php comment_text() ?> 
     1424                <?php comment_text( get_comment_id(), array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ) ?> 
    14231425 
    14241426                <div class="reply"> 
    14251427                        <?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>