Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_insert_comment()

3 tags 1 category

wp_insert_comment() — Inserts a comment into the database.

Inputs: $commentdata (array): Array of arguments for inserting a new comment. Field $comment_agent (string): The HTTP user agent of the $comment_author when the comment was submitted. Default empty. Field $comment_approved (int|string): Whether the comment has been approved. Default 1. Field $comment_author (string): The name of the author of the comment. Default empty. Field $comment_author_email (string): The email address of the $comment_author. Default empty. Field $comment_author_IP (string): The IP address of the $comment_author. Default empty. Field $comment_author_url (string): The URL address of the $comment_author. Default empty. Field $comment_content (string): The content of the comment. Default empty. Field $comment_date (string): The date the comment was submitted.

Returns int|false: The new comment’s ID on success, false on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…