Edit Comments Prior to Insert
-
I’ve been playing around with a plugin that uses the comment_text hook but just realized that it’s an on the fly sort of hook.
So I then looked over at the actions such as comment_post, edit_comment but the descriptions make it sound as if those get triggered AFTER the data has been inserted/updated into the database.
What I would like to do is be able to filter the comment once it was submitted, but prior to going into the database so I can have it omit (based on a preg_match) a particular string if it is present.
Do I use the add_action comment_post or edit_comment do to this? Or is there something else I am missing that I should brush up on via the Codex?
- The topic ‘Edit Comments Prior to Insert’ is closed to new replies.