Skip to content

Commit

Permalink
Do not use output buffering for getting the comment text
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Feb 19, 2017
1 parent 74ed18f commit 873c0cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions classes/Message/Comment_Moderation.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,12 @@ protected function get_single_comment_content( WP_Comment $comment, $time ) {
* @return string The filtered comment text
*/
protected function get_comment_text( $comment_id ) {
ob_start();
$comment = get_comment( $comment_id );

comment_text( $comment_id );
$comment_text = get_comment_text( $comment );

return ob_get_clean();
/** This filter is documented in wp-includes/comment-template.php */
return apply_filters( 'comment_text', $comment_text, $comment, array() );
}

/**
Expand Down

0 comments on commit 873c0cf

Please sign in to comment.