Update the DocBlock for `wp_insert_post()` to exclude now-defunct contact method arguments and clarify others.
Also clarifies information on available hooks and adds a changelog entry for when the contact method arguments were removed. Props dlh, rachelbaker. See #31588. git-svn-id: https://develop.svn.wordpress.org/trunk@32884 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f366ccf053
commit
5b56ca5ab1
|
@ -1805,40 +1805,49 @@ function validate_username( $username ) {
|
||||||
/**
|
/**
|
||||||
* Insert a user into the database.
|
* Insert a user into the database.
|
||||||
*
|
*
|
||||||
* Most of the $userdata array fields have filters associated with the values.
|
* Most of the `$userdata` array fields have filters associated with the values. Exceptions are
|
||||||
* The exceptions are 'rich_editing', 'role', 'jabber', 'aim', 'yim',
|
* 'ID', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl',
|
||||||
* 'user_registered', and 'ID'. The filters have the prefix 'pre_user_' followed
|
* 'user_registered', and 'role'. The filters have the prefix 'pre_user_' followed by the field
|
||||||
* by the field name. An example using 'description' would have the filter
|
* name. An example using 'description' would have the filter called, 'pre_user_description' that
|
||||||
* called, 'pre_user_description' that can be hooked into.
|
* can be hooked into.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
|
* @since 3.6.0 The `aim`, `jabber`, and `yim` fields were removed as default user contact
|
||||||
|
* methods for new installs. See wp_get_user_contact_methods().
|
||||||
*
|
*
|
||||||
* @global wpdb $wpdb WordPress database object for queries.
|
* @global wpdb $wpdb WordPress database object for queries.
|
||||||
*
|
*
|
||||||
* @param array $userdata {
|
* @param array|object|WP_User $userdata {
|
||||||
* An array, object, or WP_User object of user data arguments.
|
* An array, object, or WP_User object of user data arguments.
|
||||||
*
|
*
|
||||||
* @type int $ID User ID. If supplied, the user will be updated.
|
* @type int $ID User ID. If supplied, the user will be updated.
|
||||||
* @type string $user_pass The plain-text user password.
|
* @type string $user_pass The plain-text user password.
|
||||||
* @type string $user_login The user's login username.
|
* @type string $user_login The user's login username.
|
||||||
* @type string $user_nicename The URL-friendly user name.
|
* @type string $user_nicename The URL-friendly user name.
|
||||||
* @type string $user_url The user URL.
|
* @type string $user_url The user URL.
|
||||||
* @type string $user_email The user email address.
|
* @type string $user_email The user email address.
|
||||||
* @type string $display_name The user's display name.
|
* @type string $display_name The user's display name.
|
||||||
* Default is the the user's username.
|
* Default is the the user's username.
|
||||||
* @type string $nickname The user's nickname. Default
|
* @type string $nickname The user's nickname.
|
||||||
* Default is the the user's username.
|
* Default is the the user's username.
|
||||||
* @type string $first_name The user's first name. For new users, will be used
|
* @type string $first_name The user's first name. For new users, will be used
|
||||||
* to build $display_name if unspecified.
|
* to build the first part of the user's display name
|
||||||
* @type stirng $last_name The user's last name. For new users, will be used
|
* if `$display_name` is not specified.
|
||||||
* to build $display_name if unspecified.
|
* @type string $last_name The user's last name. For new users, will be used
|
||||||
* @type string|bool $rich_editing Whether to enable the rich-editor for the user. False
|
* to build the second part of the user's display name
|
||||||
* if not empty.
|
* if `$display_name` is not specified.
|
||||||
* @type string $user_registered Date the user registered. Format is 'Y-m-d H:i:s'.
|
* @type string $description The user's biographical description.
|
||||||
* @type string $role User's role.
|
* @type string|bool $rich_editing Whether to enable the rich-editor for the user.
|
||||||
* @type string $jabber User's Jabber account username.
|
* False if not empty.
|
||||||
* @type string $aim User's AIM account username.
|
* @type string|bool $comment_shortcuts Whether to enable comment moderation keyboard
|
||||||
* @type string $yim User's Yahoo! messenger username.
|
* shortcuts for the user. Default false.
|
||||||
|
* @type string $admin_color Admin color scheme for the user. Default 'fresh'.
|
||||||
|
* @type bool $use_ssl Whether the user should always access the admin over
|
||||||
|
* https. Default false.
|
||||||
|
* @type string $user_registered Date the user registered. Format is 'Y-m-d H:i:s'.
|
||||||
|
* @type string|bool $show_admin_bar_front Whether to display the Admin Bar for the user on the
|
||||||
|
* site's frontend. Default true.
|
||||||
|
* @type string $role User's role.
|
||||||
* }
|
* }
|
||||||
* @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
|
* @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
|
||||||
* be created.
|
* be created.
|
||||||
|
|
Loading…
Reference in New Issue