comment_edit_pre
Filter HookHook Information
File Location |
wp-admin/includes/class-wp-comments-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 965 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Comment
|
$comment
|
The comment object. |
Usage Examples
Basic Usage
<?php
// Hook into comment_edit_pre
add_filter('comment_edit_pre', 'my_custom_filter', 10, 1);
function my_custom_filter($comment) {
// Your custom filtering logic here
return $comment;
}
Source Code Context
wp-admin/includes/class-wp-comments-list-table.php:965
- How this hook is used in WordPress core
<?php
960
961 comment_text( $comment );
962
963 if ( $this->user_can ) {
964 /** This filter is documented in wp-admin/includes/comment.php */
965 $comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content );
966 ?>
967 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden">
968 <textarea class="comment" rows="1" cols="1"><?php echo esc_textarea( $comment_content ); ?></textarea>
969 <div class="author-email"><?php echo esc_html( $comment->comment_author_email ); ?></div>
970 <div class="author"><?php echo esc_html( $comment->comment_author ); ?></div>
PHP Documentation
<?php
/**
* @param WP_Comment $comment The comment object.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/class-wp-comments-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.