WordPress.org

Make WordPress Core

Ticket #31747: 31747.patch

File 31747.patch, 2.8 KB (added by rachelbaker, 5 years ago)

Minor formatting and description adjustments

  • src/wp-includes/comment.php

     
    20842084/**
    20852085 * Inserts a comment to the database.
    20862086 *
    2087  * The available comment data key names are 'comment_author_IP', 'comment_date',
    2088  * 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'.
     2087 * Both 'comment_date' and 'comment_date_gmt' values must be specified to set the date manually.
    20892088 *
    20902089 * @since 2.0.0
    20912090 *
    20922091 * @global wpdb $wpdb WordPress database abstraction object.
    20932092 *
    2094  * @param array $commentdata Contains information on the comment.
     2093 * @param array $commentdata {
     2094 *     An array of elements that make up the comment.
     2095 *
     2096 *     @type string     $comment_agent        The HTTP user agent of the `$comment_author` when
     2097 *                                            the comment was submitted. Default empty.
     2098 *     @type int|string $comment_approved     Whether the comment has been approved. Default 1.
     2099 *     @type string     $comment_author       The name of the author of the comment. Default empty.
     2100 *     @type string     $comment_author_email The email address of the `$comment_author`. Default
     2101 *                                            empty.
     2102 *     @type string     $comment_author_IP    The IP address of the `$comment_author`. Default
     2103 *                                            empty.
     2104 *     @type string     $comment_author_url   The URL address of the `$comment_author`. Default
     2105 *                                            empty.
     2106 *     @type string     $comment_content      The content of the comment. Default empty.
     2107 *     @type string     $comment_date         The date the comment was submitted. Default is the
     2108 *                                            current time.
     2109 *     @type string     $comment_date_gmt     The date the comment was submitted in the GMT
     2110 *                                            timezone. Default is `$comment_date` in the GMT
     2111 *                                            timezone.
     2112 *     @type int        $comment_karma        The karma of the comment. Default 0.
     2113 *     @type int        $comment_parent       The ID of this comment's parent, if any. Default 0.
     2114 *     @type int        $comment_post_ID      The ID of the post that relates to the comment, if
     2115 *                                            any. Default empty.
     2116 *     @type string     $comment_type         The type of comment. Default empty.
     2117 *     @type int        $user_id              The ID of the user who submitted the comment.
     2118 *                                            Default 0.
     2119 * }
    20952120 * @return int|bool The new comment's ID on success, false on failure.
    20962121 */
    20972122function wp_insert_comment( $commentdata ) {