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

git-svn-id: http://svn.automattic.com/wordpress/trunk@15957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-10-25 03:11:01 +00:00
parent 48d8763734
commit 76b4a3cac7

View File

@ -597,7 +597,7 @@ function comments_number( $zero = false, $one = false, $more = false, $deprecate
*/
function get_comment_text( $comment_ID = 0 ) {
$comment = get_comment( $comment_ID );
return apply_filters('get_comment_text', $comment->comment_content);
return apply_filters( 'get_comment_text', $comment->comment_content, $comment );
}
/**
@ -610,7 +610,8 @@ function get_comment_text( $comment_ID = 0 ) {
* @param int $comment_ID The ID of the comment for which to print the text. Optional.
*/
function comment_text( $comment_ID = 0 ) {
echo apply_filters('comment_text', get_comment_text() );
$comment = get_comment( $comment_ID );
echo apply_filters( 'comment_text', get_comment_text( $comment_ID ), $comment );
}
/**