Changeset 32499
- Timestamp:
- 05/13/2015 02:50:56 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r32461 r32499 2083 2083 2084 2084 /** 2085 * Inserts a comment to the database. 2086 * 2087 * The available comment data key names are 'comment_author_IP', 'comment_date', 2088 * 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'. 2085 * Inserts a comment into the database. 2089 2086 * 2090 2087 * @since 2.0.0 … … 2092 2089 * @global wpdb $wpdb WordPress database abstraction object. 2093 2090 * 2094 * @param array $commentdata Contains information on the comment. 2091 * @param array $commentdata { 2092 * Array of arguments for inserting a new comment. 2093 * 2094 * @type string $comment_agent The HTTP user agent of the `$comment_author` when 2095 * the comment was submitted. Default empty. 2096 * @type int|string $comment_approved Whether the comment has been approved. Default 1. 2097 * @type string $comment_author The name of the author of the comment. Default empty. 2098 * @type string $comment_author_email The email address of the `$comment_author`. Default empty. 2099 * @type string $comment_author_IP The IP address of the `$comment_author`. Default empty. 2100 * @type string $comment_author_url The URL address of the `$comment_author`. Default empty. 2101 * @type string $comment_content The content of the comment. Default empty. 2102 * @type string $comment_date The date the comment was submitted. To set the date 2103 * manually, `$comment_date_gmt` must also be specified. 2104 * Default is the current time. 2105 * @type string $comment_date_gmt The date the comment was submitted in the GMT timezone. 2106 * Default is `$comment_date` in the site's GMT timezone. 2107 * @type int $comment_karma The karma of the comment. Default 0. 2108 * @type int $comment_parent ID of this comment's parent, if any. Default 0. 2109 * @type int $comment_post_ID ID of the post that relates to the comment, if any. 2110 * Default empty. 2111 * @type string $comment_type Comment type. Default empty. 2112 * @type int $user_id ID of the user who submitted the comment. Default 0. 2113 * } 2095 2114 * @return int|bool The new comment's ID on success, false on failure. 2096 2115 */
Note: See TracChangeset
for help on using the changeset viewer.