WordPress.org

Make WordPress Core

Changeset 33730


Ignore:
Timestamp:
08/25/2015 05:02:51 PM (3 years ago)
Author:
DrewAPicture
Message:

Docs: Document the default comment data arguments for wp_new_comment().

Props rachelbaker, DrewAPicture
Fixes #32369.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r33654 r33730  
    23272327 * @global wpdb $wpdb
    23282328 *
    2329  * @param array $commentdata Contains information on the comment. See wp_insert_comment()
    2330  *                           for information on accepted arguments.
     2329 * @param array $commentdata {
     2330 *     Comment data.
     2331 *
     2332 *     @type string $comment_author       The name of the comment author.
     2333 *     @type string $comment_author_email The comment author email address.
     2334 *     @type string $comment_author_url   The comment author URL.
     2335 *     @type string $comment_content      The content of the comment.
     2336 *     @type string $comment_date         The date the comment was submitted. Default is the current time.
     2337 *     @type string $comment_date_gmt     The date the comment was submitted in the GMT timezone.
     2338 *                                        Default is `$comment_date` in the GMT timezone.
     2339 *     @type int    $comment_parent       The ID of this comment's parent, if any. Default 0.
     2340 *     @type int    $comment_post_ID      The ID of the post that relates to the comment.
     2341 *     @type int    $user_id              The ID of the user who submitted the comment. Default 0.
     2342 *     @type int    $user_ID              Kept for backward-compatibility. Use `$user_id` instead.
     2343 *     @type string $comment_agent        Comment author user agent. Default is the value of 'HTTP_USER_AGENT'
     2344 *                                        in the `$_SERVER` superglobal sent in the original request.
     2345 *     @type string $comment_author_IP    Comment author IP address in IPv4 format. Default is the value of
     2346 *                                        'REMOTE_ADDR' in the `$_SERVER` superglobal sent in the original request.
     2347 * }
    23312348 * @return int|false The ID of the comment on success, false on failure.
    23322349 */
Note: See TracChangeset for help on using the changeset viewer.