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
- 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?
- media_handle_upload for local files?
- How do I detach images from posts?
- Use an attachment in multiple posts
- 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 can I allow editors to leave comments on posts that have not yet been published?
- Update post date on every new comment?
- 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
- Enable commenting on front-end preview page for pending posts
- Hide Post comments when displayed via WP_Query
- post_parent is 0 when uploading new files
- Disable Post/Page comment emails for creators
- 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
- count the total number of comments the user has received for his published posts
- How to Orderby Comments by post title?
- If modified on same day, show only time
- Load post attached images on a single page site with fancybox
- How to allow logged in users to post anonymously
- Email entire post contents
- Add the description field on the attached media
- I have a site where attachments in the wp_posts table have guid values of guid, how did this happen?
- Prevent Delete Attachment by URL or When Submit
- Posts and Attachments with “Published” status in Search
- Emojis replaced by ‘?’ automatically
- Move comments only from one WP installation to another
- Get Image tag from content of post
- A friend wants to make a comment on one of my articles, she has to be logged to wordpress?
- Get all images in post and comments like Twitter before post title
- Can’t update old posts 3.5.2
- Is it possible to paste a link without tags and make it directly a link in a post?
- Customizing Comments on Posts
- How would one change the default url structure of attachments?
- WordPress Comment posting problem
- What do these phpMyAdmin errors mean on my WordPress databaes?
- Internal post link creates comments on its own
- How to get posts and comments amount per hour, per year and per month?
- SQL Command for restoring trashed comments
- Howto show comment count by post in post?
- How do you change the comment count in the back end posts list, to reflect unapproved comments, rather than all comments?
- Let both the admin and post author update comment meta
- Get attachments only for this post
- Upload attachment from external site
- Reinstall WordPress while keeping attachments
- How to style archive post titles… but only those posts who have comments?
- How does WP decide how to display a page
- Display on page every post in blog WITH comments
- Showing recent post of category in page
- If post exists, make it a comment in existing post with same name?
- How To Download WordPress Audio Attachments
- How to get the next and previous image title from attachment or gallery?
- How to implement a WordPress comments function?
- Allow / show post comments in category pages
- Count the total views of all user posts published
- Shortcode for Comments and Comment Boxes in Post Loop
- How do I assign an attachment to a post using only the REST API?
- How to convert attachment pages to Posts?
- Delete attached images from posts
- WordPress weird behaviour on comments
- I want to change the WordPress comments file
- 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 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 url/link to latest comments in a post
- 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
- 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
- Show List of Posts With Comments Open
- how to edit attachments?
- How does WordPress add the comments and comment form to posts
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- Undefined Function Fatal Error with Shortcode [closed]
- Best method for comment section associated with different images?
- Can`t attach image to a multiple posts