diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 9841d58ae2..fe03f1be07 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2326,8 +2326,25 @@ function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) * * @global wpdb $wpdb * - * @param array $commentdata Contains information on the comment. See wp_insert_comment() - * for information on accepted arguments. + * @param array $commentdata { + * Comment data. + * + * @type string $comment_author The name of the comment author. + * @type string $comment_author_email The comment author email address. + * @type string $comment_author_url The comment author URL. + * @type string $comment_content The content of the comment. + * @type string $comment_date The date the comment was submitted. Default is the current time. + * @type string $comment_date_gmt The date the comment was submitted in the GMT timezone. + * Default is `$comment_date` in the GMT timezone. + * @type int $comment_parent The ID of this comment's parent, if any. Default 0. + * @type int $comment_post_ID The ID of the post that relates to the comment. + * @type int $user_id The ID of the user who submitted the comment. Default 0. + * @type int $user_ID Kept for backward-compatibility. Use `$user_id` instead. + * @type string $comment_agent Comment author user agent. Default is the value of 'HTTP_USER_AGENT' + * in the `$_SERVER` superglobal sent in the original request. + * @type string $comment_author_IP Comment author IP address in IPv4 format. Default is the value of + * 'REMOTE_ADDR' in the `$_SERVER` superglobal sent in the original request. + * } * @return int|false The ID of the comment on success, false on failure. */ function wp_new_comment( $commentdata ) {