Skip to content

Commit 3a2043a

Browse files
committed
Refactor 41757 for MS functions
1 parent 903b1fe commit 3a2043a

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

src/wp-includes/ms-functions.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,9 +2302,9 @@ function add_existing_user_to_blog( $details = false ) {
23022302
*
23032303
* @see add_user_to_blog()
23042304
*
2305-
* @param int $user_id User ID.
2306-
* @param string $password User password. Ignored.
2307-
* @param array $meta Signup meta data.
2305+
* @param int $user_id
2306+
* @param mixed $password Accessible via 'added_new_user_to_blog' hook.
2307+
* @param array $meta
23082308
*/
23092309
function add_new_user_to_blog(
23102310
$user_id,
@@ -2321,6 +2321,18 @@ function add_new_user_to_blog(
23212321

23222322
if ( ! is_wp_error( $result ) ) {
23232323
update_user_meta( $user_id, 'primary_blog', $blog_id );
2324+
2325+
/**
2326+
* Fires when a new user is added to a network site without an error from $result.
2327+
*
2328+
* @since 4.9.0
2329+
*
2330+
* @param int $user_id New user's ID.
2331+
* @param mixed $password New user's password.
2332+
* @param array $meta Array of meta data from the new registration.
2333+
* @param int $blog_id Blog ID.
2334+
*/
2335+
do_action( 'added_new_user_to_blog', $user_id, $password, $meta, $blog_id );
23242336
}
23252337
}
23262338
}

0 commit comments

Comments
 (0)