edit_comment
Fires immediately after a comment is updated in the database.
The hook also fires immediately before comment status transition hooks are fired.
Usage
add_action( 'edit_comment', 'wp_kama_edit_comment_action', 10, 2 );
/**
* Function for `edit_comment` action-hook.
*
* @param int $comment_id The comment ID.
* @param array $data Comment data.
*
* @return void
*/
function wp_kama_edit_comment_action( $comment_id, $data ){
// action...
}
- $comment_id(int)
- The comment ID.
- $data(array)
- Comment data.
Changelog
| Since 1.2.0 | Introduced. |
| Since 4.6.0 | Added the $data parameter. |
Where the hook is called
wp-includes/comment.php 2752
do_action( 'edit_comment', $comment_id, $data );