Skip to content

Commit 622e54b

Browse files
committed
make changes as @spacemonkey suggested
1 parent bb32d60 commit 622e54b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -654,17 +654,16 @@ public function create_item( $request ) {
654654
*
655655
* @since 6.9.0
656656
*
657-
* @param string $notify Determines who gets notified. Accepts:
658-
* - 'admin' (default) or an empty string: Notify only the site administrator.
659-
* - 'user': Notify only the new user.
660-
* - 'both': Notify both admin and user.
661-
* - 'false': Disable notifications entirely.
662-
* @param int $user_id User ID.
657+
* @param string|bool $notify Determines who gets notified. Accepts:
658+
* - 'admin' or an empty string: Notify only the site administrator.
659+
* - 'user': Notify only the new user.
660+
* - 'both': Notify both admin and user.
661+
* - false: Disable notifications entirely.
662+
* @param int $user_id User ID.
663663
*/
664664
$notify = apply_filters( 'rest_wp_user_created_notification', 'both', $user_id );
665-
if ( $notify && 'false' !== $notify ) {
666-
wp_new_user_notification( $user_id, null, $notify );
667-
}
665+
666+
wp_new_user_notification( $user_id, null, $notify );
668667

669668
$user = get_user_by( 'id', $user_id );
670669

0 commit comments

Comments
 (0)