WordPress.org

Make WordPress Core

Changeset 47109


Ignore:
Timestamp:
01/24/2020 05:18:37 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for add_user_to_blog(), add_existing_user_to_blog(), and add_new_user_to_blog().

See #48303.

File:
1 edited

Legend:

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

    r46804 r47109  
    159159 * @param int    $user_id ID of the user you're adding.
    160160 * @param string $role    The role you want the user to have
    161  * @return true|WP_Error
     161 * @return true|WP_Error True on success or a WP_Error object if the user doesn't exist
     162 *                       or could not be added.
    162163 */
    163164function add_user_to_blog( $blog_id, $user_id, $role ) {
     
    11961197         * @since MU (3.0.0)
    11971198         *
    1198          * @param int   $user_id  User ID.
    1199          * @param int  $password User password.
    1200          * @param array $meta     Signup meta data.
     1199         * @param int    $user_id  User ID.
     1200         * @param string $password User password.
     1201         * @param array  $meta     Signup meta data.
    12011202         */
    12021203        do_action( 'wpmu_activate_user', $user_id, $password, $meta );
     
    21412142 * @since MU (3.0.0)
    21422143 *
    2143  * @param array $details
    2144  * @return true|WP_Error|void
     2144 * @param array $details User details.
     2145 * @return true|WP_Error|void True on success or a WP_Error object if the user doesn't exist
     2146 *                            or could not be added. Void if $details array was not provided.
    21452147 */
    21462148function add_existing_user_to_blog( $details = false ) {
     
    21542156         * @since MU (3.0.0)
    21552157         *
    2156          * @param int   $user_id User ID.
    2157          * @param mixed $result  True on success or a WP_Error object if the user doesn't exist
    2158          *                       or could not be added.
     2158         * @param int           $user_id User ID.
     2159         * @param true|WP_Error $result  True on success or a WP_Error object if the user doesn't exist
     2160         *                               or could not be added.
    21592161         */
    21602162        do_action( 'added_existing_user', $details['user_id'], $result );
     
    21732175 * @see add_user_to_blog()
    21742176 *
    2175  * @param int   $user_id
    2176  * @param mixed $password Ignored.
    2177  * @param array $meta
     2177 * @param int    $user_id  User ID.
     2178 * @param string $password User password. Ignored.
     2179 * @param array  $meta     Signup meta data.
    21782180 */
    21792181function add_new_user_to_blog( $user_id, $password, $meta ) {
Note: See TracChangeset for help on using the changeset viewer.