Make WordPress Core

Changeset 29116


Ignore:
Timestamp:
07/12/2014 12:20:14 AM (11 years ago)
Author:
DrewAPicture
Message:

Convert default arguments documentation for wp_insert_user() into a hash notation.

See #28841.

File:
1 edited

Legend:

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

    r29115 r29116  
    15801580 * called, 'pre_user_description' that can be hooked into.
    15811581 *
    1582  * The $userdata array can contain the following fields:
    1583  * 'ID' - An integer that will be used for updating an existing user.
    1584  * 'user_pass' - A string that contains the plain text password for the user.
    1585  * 'user_login' - A string that contains the user's username for logging in.
    1586  * 'user_nicename' - A string that contains a URL-friendly name for the user.
    1587  *      The default is the user's username.
    1588  * 'user_url' - A string containing the user's URL for the user's web site.
    1589  * 'user_email' - A string containing the user's email address.
    1590  * 'display_name' - A string that will be shown on the site. Defaults to user's
    1591  *      username. It is likely that you will want to change this, for appearance.
    1592  * 'nickname' - The user's nickname, defaults to the user's username.
    1593  * 'first_name' - The user's first name.
    1594  * 'last_name' - The user's last name.
    1595  * 'description' - A string containing content about the user.
    1596  * 'rich_editing' - A string for whether to enable the rich editor. False
    1597  *      if not empty.
    1598  * 'user_registered' - The date the user registered. Format is 'Y-m-d H:i:s'.
    1599  * 'role' - A string used to set the user's role.
    1600  * 'jabber' - User's Jabber account.
    1601  * 'aim' - User's AOL IM account.
    1602  * 'yim' - User's Yahoo IM account.
    1603  *
    16041582 * @since 2.0.0
    16051583 *
    16061584 * @global wpdb $wpdb WordPress database object for queries.
    16071585 *
    1608  * @todo Hash-notate arguments array.
    1609  *
    1610  * @param mixed $userdata An array of user data or a user object of type stdClass or WP_User.
    1611  * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not be created.
     1586 * @param array $userdata {
     1587 *     An array, object, or WP_User object of user data arguments.
     1588 *
     1589 *     @type int         $ID              User ID. If supplied, the user will be updated.
     1590 *     @type string      $user_pass       The plain-text user password.
     1591 *     @type string      $user_login      The user's login username.
     1592 *     @type string      $user_nicename   The URL-friendly user name.
     1593 *     @type string      $user_url        The user URL.
     1594 *     @type string      $user_email      The user email address.
     1595 *     @type string      $display_name    The user's display name.
     1596 *                                        Default is the the user's username.
     1597 *     @type string      $nickname        The user's nickname. Default
     1598 *                                        Default is the the user's username.
     1599 *     @type string      $first_name      The user's first name. For new users, will be used
     1600 *                                        to build $display_name if unspecified.
     1601 *     @type stirng      $last_name       The user's last name. For new users, will be used
     1602 *                                        to build $display_name if unspecified.
     1603 *     @type string|bool $rich_editing    Whether to enable the rich-editor for the user. False
     1604 *                                        if not empty.
     1605 *     @type string      $date_registered Date the user registered. Format is 'Y-m-d H:i:s'.
     1606 *     @type string      $role            User's role.
     1607 *     @type string      $jabber          User's Jabber account username.
     1608 *     @type string      $aim             User's AIM account username.
     1609 *     @type string      $yim             User's Yahoo! messenger username.
     1610 * }
     1611 * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
     1612 *                      be created.
    16121613 */
    16131614function wp_insert_user( $userdata ) {
Note: See TracChangeset for help on using the changeset viewer.