comment_text filter used differently in two places in core
|Reported by:||ronalfy||Owned by:|
The 'comment_text' filter is being used differently in two different places in core.
For the life of me, I can't figure out why.
The first instance is being used as a comment is posted in /wp-includes/comment.php, passing only one argument:
$comment = apply_filters( 'comment_text', $comment );
The 2nd instance is being used when a comment is displayed in /wp-includes/comment-template.php, passing two arguments.
echo apply_filters( 'comment_text', get_comment_text( $comment_ID ), $comment );
The problem is, if someone is hooked into the 'comment_text' filter and is expecting two arguments, the 2nd one won't be set when a comment is posted.
I recommend changing the filter name 'comment_text' when the comment is being posted.