From 7aff9092c7f13a3ecbfd746d7ac9d1074db42a58 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 25 Aug 2015 17:03:21 +0000 Subject: [PATCH] Docs: Document the default comment data arguments for `wp_new_comment()`. Props rachelbaker, DrewAPicture Fixes #32369. Built from https://develop.svn.wordpress.org/trunk@33730 git-svn-id: http://core.svn.wordpress.org/trunk@33698 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 21 +++++++++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 9841d58ae2..fe03f1be07 100644 --- a/wp-includes/comment.php +++ b/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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index bec63b870d..00eeeb3fe7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33729'; +$wp_version = '4.4-alpha-33730'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.