Make WordPress Core

Changeset 15957


Ignore:
Timestamp:
10/25/2010 03:11:01 AM (14 years ago)
Author:
nacin
Message:

Pass comment ID from comment_text to get_comment_text. Also add the comment object as context to the filter. fixes #14261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r15590 r15957  
    598598function get_comment_text( $comment_ID = 0 ) {
    599599    $comment = get_comment( $comment_ID );
    600     return apply_filters('get_comment_text', $comment->comment_content);
     600    return apply_filters( 'get_comment_text', $comment->comment_content, $comment );
    601601}
    602602
     
    611611 */
    612612function comment_text( $comment_ID = 0 ) {
    613     echo apply_filters('comment_text', get_comment_text() );
     613    $comment = get_comment( $comment_ID );
     614    echo apply_filters( 'comment_text', get_comment_text( $comment_ID ), $comment );
    614615}
    615616
Note: See TracChangeset for help on using the changeset viewer.