*/
do_action( 'invite_user', $user_id, $role, $newuser_key );
+ $switched_locale = switch_to_locale( get_user_locale( $user_details ) );
+
/* translators: 1: Site name, 2: site URL, 3: role, 4: activation URL */
$message = __( 'Hi,
Please click the following link to confirm the invite:
%4$s' );
wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) ), home_url( "/newbloguser/$newuser_key/" ) ) );
+
+ if ( $switched_locale ) {
+ restore_previous_locale();
+ }
+
$redirect = add_query_arg( array('update' => 'add'), 'user-new.php' );
}
}
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
- '<p>' . __('<a href="https://codex.wordpress.org/Users_Add_New_Screen" target="_blank">Documentation on Adding New Users</a>') . '</p>' .
- '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+ '<p>' . __('<a href="https://codex.wordpress.org/Users_Add_New_Screen">Documentation on Adding New Users</a>') . '</p>' .
+ '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
wp_enqueue_script('wp-ajax-response');
<div class="wrap">
<h1 id="add-new-user"><?php
if ( current_user_can( 'create_users' ) ) {
- echo _x( 'Add New User', 'user' );
+ _e( 'Add New User' );
} elseif ( current_user_can( 'promote_users' ) ) {
- echo _x( 'Add Existing User', 'user' );
+ _e( 'Add Existing User' );
} ?>
</h1>
</tr>
<?php if ( current_user_can( 'manage_network_users' ) ) { ?>
<tr>
- <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
- <td><label for="adduser-noconfirmation"><input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td>
+ <th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
+ <td>
+ <input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" />
+ <label for="adduser-noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
+ </td>
</tr>
<?php } ?>
</table>
</th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
- <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
+ <button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
<div class="wp-pwd hide-if-js">
<?php $initial_password = wp_generate_password( 24 ); ?>
<span class="password-input-wrapper">
<input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
</span>
- <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
+ <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden"></span>
<span class="text"><?php _e( 'Hide' ); ?></span>
</button>
- <button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
+ <button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
<span class="text"><?php _e( 'Cancel' ); ?></span>
</button>
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
</tr>
<tr>
<th scope="row"><?php _e( 'Send User Notification' ) ?></th>
- <td><label for="send_user_notification"><input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> /> <?php _e( 'Send the new user an email about their account.' ); ?></label></td>
+ <td>
+ <input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> />
+ <label for="send_user_notification"><?php _e( 'Send the new user an email about their account.' ); ?></label>
+ </td>
</tr>
<?php } // !is_multisite ?>
<tr class="form-field">
</tr>
<?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?>
<tr>
- <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
- <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td>
+ <th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
+ <td>
+ <input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> />
+ <label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
+ </td>
</tr>
<?php } ?>
</table>