You can hook comment_post
and add your logic with the comment id
// Save the data along with comment id
add_action( 'comment_post', 'wti_save_comment_data' );
function wti_save_comment_data( $comment_id ) {
// Use the comment id and add your logic
}
Related Posts:
- Turn a URL into an Attachment / Post ID
- How to make comments work for a post loaded per Ajax?
- Delete Associated Media Upon Page Deletion
- Delete post with all files attached to it
- Is it possible to Schedule Attachments in WordPress?
- Allow variable amount of comments before pagination
- what types of order can I pass to get_posts() via orderby?
- Find the post an attachment is attached to
- media_handle_upload for local files?
- How do I detach images from posts?
- get comments and get posts in loop
- Use an attachment in multiple posts
- delete post also attachments
- Replacing all attachment links in post with media file link
- Get post id by attachment id?
- How to display comments and comment form on custom post type?
- Comments are assigned to wrong or related post
- How can I export WordPress posts’ attachments?
- How to remove images from showing in a post with the_content()?
- How can I allow editors to leave comments on posts that have not yet been published?
- Update post date on every new comment?
- One comment per user email per post
- Can’t show comments count per post outside loop
- How do I create Comma Separated list of attached image ids?
- Only display posts with comments
- Comments enabled, but disabled at the same time
- Get post embedded image caption
- Comments not showing in custom post type – WordPress
- How to output comments number of a post per day?
- Enable commenting on front-end preview page for pending posts
- Hide comments awaiting moderation from user who submitted the comments
- Limit amount of results returned
- Hide Post comments when displayed via WP_Query
- post_parent is 0 when uploading new files
- Including new Javascript only after a comment is made
- Disable Post/Page comment emails for creators
- Display posts with comments closed, with pagination?
- Easy way to delete 70k posts and attached media?
- Why is WordPress redirecting users to random posts after commenting?
- How to get most recent commented post above new submitted post in WordPress?
- When trashing a post, also trash related comments
- how to find user ids of all commenters in a post
- Diplay comment date on WP_Post_Comments_List_Table
- How to access featured image?
- How to get post id of last approved comment?
- All images on one line for each post
- How to implement a WordPress comments function?
- Allow / show post comments in category pages
- Count the total views of all user posts published
- how to show comments only author which send own posts in wordpress
- Shortcode for Comments and Comment Boxes in Post Loop
- Merge get_comments & get_posts into a single query
- How do I assign an attachment to a post using only the REST API?
- Unable to delete attached file from folder programmatically
- How to convert attachment pages to Posts?
- Remove the URL author of post on all comments
- Get post attachment with post id
- Delete attached images from posts
- WordPress weird behaviour on comments
- Comments are in database, don’t show up in WordPress backend or frontend
- No comments allowed
- I want to change the WordPress comments file
- Unable to get all the Posts Attachments
- Add in the url attachment loop the wp_link_pages of the post
- Posting a comment redirects admin/users to blank page
- How to enable comments meta box for other author posts?
- Stop images from being displayed on the front-end of the site
- Comments as part of a post
- How to get images only attached from edit post page
- Some comment box wordpress in 1 post [closed]
- How to prevent people from seeing an attachment to a scheduled post that’s released in future?
- No comments on static front page
- 3rd Party Login in wordpress
- Trash a post, send associated comments into the trash bin (change status)
- Apply comment to different post (not the current post) [duplicate]
- External link not showing on post but showing on comment
- Get first comment link on the post itself
- Get url/link to latest comments in a post
- Display only posts with comments
- Bulk Attach Or Insert Media To Post Without Opening Post Editor
- wp_query select if have comments
- Display the first post’s comments of category in comments.php template
- 2 tick boxes appearing below comments
- Post Attachment missing head (stylesheets/js/what-not)
- How to display a certain template element only for posts published within certain time range?
- Admin moderates ALL comments (including post author)
- Create post from form with image
- Get Video Attachment to post
- Show List of Posts With Comments Open
- how to edit attachments?
- How can I show the positive and negative comments for a same post separately?
- How does WordPress add the comments and comment form to posts
- Broken images after importing posts and opening in Gutenberg
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- Simple shortcode to check if a user has commented on a certain post
- Undefined Function Fatal Error with Shortcode [closed]
- Best method for comment section associated with different images?
- Can`t attach image to a multiple posts
- post comment dont show the pdf file wordpress
- Comment count next to post title?