Docs: Document the default comment data arguments for wp_new_comment()
.
Props rachelbaker, DrewAPicture Fixes #32369. git-svn-id: https://develop.svn.wordpress.org/trunk@33730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e1b1541932
commit
e853c467fd
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user