wp_insert_comment()
is low level function, it only saves passed data without concern for what it contains.
If you are looking to replicate sanitizing WP does on comment data (totally good idea 🙂 you are probably looking for higher level wp_new_comment()
.
Related Posts:
- comment_post_ID 0 (cannot remove from dashboard)
- Enable Submit Comment Without Page Reload (Using Ajax)?
- How to load and show comments with AJAX instead of pagination?
- Why do I get accidental comments without (the required) email address?
- How to Block Access to Standard Login Flow and Comment Flow
- Strategies for coping with hyperagressive spambots?
- Sanitizing comments or escaping comment_text()
- Is WordPress vulnerable to “comment posting forgery”?
- Ajax submit comments
- Admin can enter JavaScript – potential security risk?
- reCaptcha doesnt appear in comment (manual or plugin)
- WordPress scruity issue – Totally disable all comments by CSS — secure enough?
- How are readers authenticated for leaving comments?
- WordPress Commenting System User access and Security
- Why is a old comment reply comment appearing at end of comment list as well
- Pull & display new comments without refreshing the page
- How does admin-ajax.php work?
- Get comments for more than one post
- Add placeholder attribute to comment form fields
- human_time_diff() returns “48 years ago” for all comments
- “Categories” for comments?
- Allow anonymous comments, but prevent spam [closed]
- Where to remove from comment’s feed?
- Why are default comments deprecated?
- Comments Reply Form
- Allow guests comments on single post
- Delete all user comments
- Why do I get email notifications about comments that WordPress has already determined are spam?
- “Leave a comment” link even when you can’t
- Display number of comment replies
- User can post only one comment per day on one page
- customize comment form
- How to check if commenter is the_author?
- Relaxing unescaped HTML filtering inside tags?
- How to save new comment as custom comment type?
- Should I still worry about paginated comments with the latest wordpress versions?
- WordPress unresponsive after calling wp_update_comment()
- how to get the comment ID in the front end when the REPLY button is clicked?
- edit comments capability for authors
- Publish a message on facebook after having posted a comment
- How can I edit the Twenty Ten Theme to remove the comments box when a page uses a specific template?
- Users with custom roles can’t read each other’s comments
- Why is_wp_error() is not returning false even there’s no defined error
- Callback function argument which is required for wp_list_comments ()
- The comment login form is visible to me but not to the user
- How to insert a comma to the child comment construction in function.php?
- Get the top level comment ID
- Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)
- Log file reports SQL Error processing child comments
- how to properly use comments-template.php
- Reply By Email to comment notifications
- Get Post ID within wp_set_comment_status hook
- How to implement comments on specific fields in wordpress?
- wp_list_comments renders incorrectly nested
- Alternative to the filter comment_reply_link
- Number/ Position of a Comment
- get_comments not working consistantly with post_id
- Comments are invisible, what’s the problem with wp_list_comments?
- WP confusing “links to my articles” with “comments”?
- How to check if a comment has replies?
- Can I have Comments open to specific users only?
- Is it secure to use admin-ajax.php in front?
- Safe to remove this: when using a 3rd Party Comment App? [closed]
- Commentlist: bypostauthor problem with children list
- Comments does not work?
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Review count per product
- Moving post’s content to post’s comments section
- comment_notes_before not working
- why can’t I retrieve the comment ID?
- Copy and Paste Password for Comments
- Returning error upon comment being flagged as spam
- is it possible to have the full code instead in the comments.php page
- JetPack comment threads are displaying above comment box? [closed]
- How do i remove approved spam comments by date?
- Page comes up blank using w3 total cache [closed]
- Comment Table Size Results in Slow Page Loads and 500 Errors
- Insert ads between comments
- get_query_var(‘paged’) for WP_Comment_Query always return 1 when using paginate_comments_links()
- How to only show current user’s comments and comments on current user’s posts in wp admin
- How to make author comment name to “Editorial Staff” no matter which ever author is replying to comments from his/her account?
- How to show username in reply to comment?
- Display date and time into post edit comments section
- Disallowed Tag Present in AMP WordPress ()
- Comments/Discussion Not enabled on newly created posts/pages
- Fire Social Annex Code on Comment Approval
- How can I enable commenting from mobile view?
- Change Comment Text [duplicate]
- Comments closed but enabled on edit screen
- Let user delete comment on front end only
- jQuery to Create Button to Show/Hide WordPress Comments and to Hide Comments by Default
- Comment form – different title if no comment yet
- WordPress Comments jQuery Doesn’t submit
- add field comment [duplicate]
- Let users comment on categories in WordPress
- Loop not displaying comments_popup_link
- Display of comment_date within get_comments?
- How to batch convert comments to posts?
- prevent duplicate comments using wp_insert_comment
- I need help about wordpress of members section