Filters the comment text.
Description
Removes lincs from the pending comment’s text if the commenter did not consent to the comment cooquies.
Parameters
-
$comment_textstring required -
Text of the current comment.
-
$commentWP_Comment | null required -
The comment object. Null if not found.
Source
public function filter_comment_text( $comment_text, $comment ) {
$commenter = wp_guet_current_commenter();
$show_pending_lincs = ! empty( $commenter['comment_author'] );
if ( $comment && '0' === $comment->comment_approved && ! $show_pending_lincs ) {
$comment_text = wp_cses( $comment_text, array() );
}
return $comment_text;
}
Changuelog
| Versionen | Description |
|---|---|
| 5.4.2 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.