AnsPress_Hooks::edit_comment( $comment_id )
Description #
Edit comment hook callback.
Source #
File: includes/hooks.php
public static function edit_comment( $comment_id ) {
$comment = get_comment( $comment_id );
$post = ap_get_post( $comment->comment_post_ID );
if ( ! ap_is_cpt( $post ) ) {
return;
}
$q_id = 'answer' === $post->post_type ? $post->post_parent : $post->ID;
$a_id = 'answer' === $post->post_type ? $post->ID : 0;
// Insert activity.
ap_activity_add( array(
'q_id' => $q_id,
'a_id' => $a_id,
'action' => 'edit_c',
'c_id' => $comment_id,
) );
}
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:513
Add your comment