wp_set_comment_status

wp_set_comment_status

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

do_action('wp_set_comment_status') is found 2 times:

  • /wp-includes/comment.php line 1527
     
    	clean_comment_cache( $comment->comment_ID );
    
    	/** This action is documented in wp-includes/comment.php */
    	do_action( 'wp_set_comment_status', $comment->comment_ID, 'delete' );
    
    	wp_transition_comment_status( 'delete', $comment->comment_approved, $comment );
    
    	return true;
    }
    
    
  • /wp-includes/comment.php line 2482
    	 * @param string $comment_id     Comment ID as a numeric string.
    	 * @param string $comment_status Current comment status. Possible values include
    	 *                               'hold', '0', 'approve', '1', 'spam', and 'trash'.
    	 */
    	do_action( 'wp_set_comment_status', $comment->comment_ID, $comment_status );
    
    	wp_transition_comment_status( $comment_status, $comment_old->comment_approved, $comment );
    
    	wp_update_comment_count( $comment->comment_post_ID );
    
    	return true;
    

See this hook used in plugins: