WPDev.one
Core Function
View Source on Trac ↗

wp_insert_comment()

wp_insert_comment( mixed $commentdata )

Inserts a comment into the database.

Parameters 1 required

Name / Type Description
array

$commentdata { Array of arguments for inserting a new comment.

Required

Return Value

((int)
| false) The new comment's ID on success, false on failure.

Function Information

Since Version
2.0.0
Source File
wp-includes/comment.php
Advertisement