+// print the 'no role' option. Make it selected if the user has no role yet.
+if ( $user_role )
+ echo '<option value="">' . __('— No role for this site —') . '</option>';
+else
+ echo '<option value="" selected="selected">' . __('— No role for this site —') . '</option>';
+?>
+</select>
+<?php if ( is_multisite() && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
+<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.'); ?></label></p>
+<?php } ?>
+</td></tr>
+<?php endif; //!IS_PROFILE_PAGE ?>
+
+<tr>
+ <th><label for="first_name"><?php _e('First Name') ?></label></th>
+ <td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr($profileuser->first_name) ?>" class="regular-text" /></td>
+</tr>
+
+<tr>
+ <th><label for="last_name"><?php _e('Last Name') ?></label></th>
+ <td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr($profileuser->last_name) ?>" class="regular-text" /></td>
+</tr>
+
+<tr>
+ <th><label for="nickname"><?php _e('Nickname'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
+ <td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr($profileuser->nickname) ?>" class="regular-text" /></td>
+</tr>
+
+<tr>
+ <th><label for="display_name"><?php _e('Display name publicly as') ?></label></th>
+ <td>
+ <select name="display_name" id="display_name">
+ <?php
+ $public_display = array();
+ $public_display['display_username'] = $profileuser->user_login;
+ $public_display['display_nickname'] = $profileuser->nickname;
+ if ( !empty($profileuser->first_name) )
+ $public_display['display_firstname'] = $profileuser->first_name;
+ if ( !empty($profileuser->last_name) )
+ $public_display['display_lastname'] = $profileuser->last_name;
+ if ( !empty($profileuser->first_name) && !empty($profileuser->last_name) ) {
+ $public_display['display_firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name;
+ $public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name;
+ }
+ if ( !in_array( $profileuser->display_name, $public_display ) ) // Only add this if it isn't duplicated elsewhere
+ $public_display = array( 'display_displayname' => $profileuser->display_name ) + $public_display;
+ $public_display = array_map( 'trim', $public_display );
+ $public_display = array_unique( $public_display );
+ foreach ( $public_display as $id => $item ) {
+ ?>
+ <option id="<?php echo $id; ?>" value="<?php echo esc_attr($item); ?>"<?php selected( $profileuser->display_name, $item ); ?>><?php echo $item; ?></option>
+ <?php
+ }
+ ?>
+ </select>
+ </td>
+</tr>
+</table>
+
+<h3><?php _e('Contact Info') ?></h3>
+
+<table class="form-table">
+<tr>
+ <th><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
+ <td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" />
+ <?php
+ $new_email = get_option( $current_user->ID . '_new_email' );
+ if ( $new_email && $new_email != $current_user->user_email ) : ?>
+ <div class="updated inline">
+ <p><?php printf( __('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_email['newemail'], esc_url( admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) ) ); ?></p>
+ </div>
+ <?php endif; ?>
+ </td>
+</tr>
+
+<tr>
+ <th><label for="url"><?php _e('Website') ?></label></th>
+ <td><input type="text" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td>
+</tr>