comment_edit_pre
Filters the comment content before editing.
Usage
add_filter( 'comment_edit_pre', 'wp_kama_comment_edit_pre_filter' ); /** * Function for `comment_edit_pre` filter-hook. * * @param string $comment_content Comment content. * * @return string */ function wp_kama_comment_edit_pre_filter( $comment_content ){ // filter... return $comment_content; }
- $comment_content(string)
- Comment content.
Changelog
Since 2.0.0 | Introduced. |
Where the hook is called
comment_edit_pre
comment_edit_pre
wp-admin/includes/comment.php 127
$comment->comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content );
wp-admin/includes/class-wp-comments-list-table.php 952
$comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content );