Changeset 49029
- Timestamp:
- 09/21/2020 05:14:33 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-new.php
r48042 r49029 60 60 61 61 // Adding an existing user to this blog. 62 $new_user_email = $user_details->user_email;62 $new_user_email = array(); 63 63 $redirect = 'user-new.php'; 64 64 $username = $user_details->user_login; … … 101 101 102 102 /** 103 * Fires immediately after a user is invited to join asite, but before the notification is sent.103 * Fires immediately after an existing user is invited to join the site, but before the notification is sent. 104 104 * 105 105 * @since 4.4.0 … … 124 124 ); 125 125 126 $new_user_email['to'] = $user_details->user_email; 127 $new_user_email['subject'] = sprintf( 128 /* translators: Joining confirmation notification email subject. %s: Site title. */ 129 __( '[%s] Joining Confirmation' ), 130 wp_specialchars_decode( get_option( 'blogname' ) ) 131 ); 132 $new_user_email['message'] = sprintf( 133 $message, 134 get_option( 'blogname' ), 135 home_url(), 136 wp_specialchars_decode( translate_user_role( $role['name'] ) ), 137 home_url( "/newbloguser/$newuser_key/" ) 138 ); 139 $new_user_email['headers'] = ''; 140 141 /** 142 * Filters the contents of the email sent when an existing user is invited to join the site. 143 * 144 * @since 5.6.0 145 * 146 * @param array $new_user_email { 147 * Used to build wp_mail(). 148 * 149 * @type string $to The email address of the invited user. 150 * @type string $subject The subject of the email. 151 * @type string $message The content of the email. 152 * @type string $headers Headers. 153 * } 154 * @param int $user_id The invited user's ID. 155 * @param array $role Array containing role information for the invited user. 156 * @param string $newuser_key The key of the invitation. 157 * 158 */ 159 $new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key ); 160 126 161 wp_mail( 127 $new_user_email, 128 sprintf( 129 /* translators: Joining confirmation notification email subject. %s: Site title. */ 130 __( '[%s] Joining Confirmation' ), 131 wp_specialchars_decode( get_option( 'blogname' ) ) 132 ), 133 sprintf( 134 $message, 135 get_option( 'blogname' ), 136 home_url(), 137 wp_specialchars_decode( translate_user_role( $role['name'] ) ), 138 home_url( "/newbloguser/$newuser_key/" ) 139 ) 162 $new_user_email['to'], 163 $new_user_email['subject'], 164 $new_user_email['message'], 165 $new_user_email['headers'] 140 166 ); 141 167
Note: See TracChangeset
for help on using the changeset viewer.