web/wp-admin/user-edit.php
branchwordpress
changeset 132 4d4862461b8d
parent 109 03b0d1493584
equal deleted inserted replaced
131:a4642baaf829 132:4d4862461b8d
   120 
   120 
   121 <div class="wrap" id="profile-page">
   121 <div class="wrap" id="profile-page">
   122 <?php screen_icon(); ?>
   122 <?php screen_icon(); ?>
   123 <h2><?php echo esc_html( $title ); ?></h2>
   123 <h2><?php echo esc_html( $title ); ?></h2>
   124 
   124 
   125 <form id="your-profile" action="" method="post">
   125 <form id="your-profile" action="<?php if ( IS_PROFILE_PAGE ) { echo admin_url('profile.php'); } else { echo admin_url('user-edit.php'); } ?>" method="post">
   126 <?php wp_nonce_field('update-user_' . $user_id) ?>
   126 <?php wp_nonce_field('update-user_' . $user_id) ?>
   127 <?php if ( $wp_http_referer ) : ?>
   127 <?php if ( $wp_http_referer ) : ?>
   128 	<input type="hidden" name="wp_http_referer" value="<?php echo esc_url($wp_http_referer); ?>" />
   128 	<input type="hidden" name="wp_http_referer" value="<?php echo esc_url($wp_http_referer); ?>" />
   129 <?php endif; ?>
   129 <?php endif; ?>
   130 <p>
   130 <p>
   265 <tr>
   265 <tr>
   266 	<th><label for="url"><?php _e('Website') ?></label></th>
   266 	<th><label for="url"><?php _e('Website') ?></label></th>
   267 	<td><input type="text" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td>
   267 	<td><input type="text" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td>
   268 </tr>
   268 </tr>
   269 
   269 
   270 <tr>
   270 <?php
   271 	<th><label for="aim"><?php echo apply_filters('user_aim_label', __('AIM')); ?></label></th>
   271 	foreach (_wp_get_user_contactmethods() as $name => $desc) {
   272 	<td><input type="text" name="aim" id="aim" value="<?php echo esc_attr($profileuser->aim) ?>" class="regular-text" /></td>
   272 ?>
   273 </tr>
   273 <tr>
   274 
   274 	<th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th>
   275 <tr>
   275 	<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
   276 	<th><label for="yim"><?php echo apply_filters('user_yim_label', __('Yahoo IM')); ?></label></th>
   276 </tr>
   277 	<td><input type="text" name="yim" id="yim" value="<?php echo esc_attr($profileuser->yim) ?>" class="regular-text" /></td>
   277 <?php
   278 </tr>
   278 	}
   279 
   279 ?>
   280 <tr>
       
   281 	<th><label for="jabber"><?php echo apply_filters('user_jabber_label', __('Jabber / Google Talk')); ?></label></th>
       
   282 	<td><input type="text" name="jabber" id="jabber" value="<?php echo esc_attr($profileuser->jabber) ?>" class="regular-text" /></td>
       
   283 </tr>
       
   284 </table>
   280 </table>
   285 
   281 
   286 <h3><?php IS_PROFILE_PAGE ? _e('About Yourself') : _e('About the user'); ?></h3>
   282 <h3><?php IS_PROFILE_PAGE ? _e('About Yourself') : _e('About the user'); ?></h3>
   287 
   283 
   288 <table class="form-table">
   284 <table class="form-table">
   289 <tr>
   285 <tr>
   290 	<th><label for="description"><?php _e('Biographical Info'); ?></label></th>
   286 	<th><label for="description"><?php _e('Biographical Info'); ?></label></th>
   291 	<td><textarea name="description" id="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea><br />
   287 	<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html($profileuser->description); ?></textarea><br />
   292 	<span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>
   288 	<span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>
   293 </tr>
   289 </tr>
   294 
   290 
   295 <?php
   291 <?php
   296 $show_password_fields = apply_filters('show_password_fields', true, $profileuser);
   292 $show_password_fields = apply_filters('show_password_fields', true, $profileuser);
   313 	} else {
   309 	} else {
   314 		do_action('edit_user_profile', $profileuser);
   310 		do_action('edit_user_profile', $profileuser);
   315 	}
   311 	}
   316 ?>
   312 ?>
   317 
   313 
   318 <?php if (count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser)): ?>
   314 <?php if ( count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser) ) { ?>
   319 <br class="clear" />
   315 <br class="clear" />
   320 	<table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
   316 	<table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
   321 		<tr>
   317 		<tr>
   322 			<th scope="row"><?php _e('Additional Capabilities') ?></th>
   318 			<th scope="row"><?php _e('Additional Capabilities') ?></th>
   323 			<td><?php
   319 			<td><?php
   324 			$output = '';
   320 			$output = '';
   325 			foreach($profileuser->caps as $cap => $value) {
   321 			foreach ( $profileuser->caps as $cap => $value ) {
   326 				if(!$wp_roles->is_role($cap)) {
   322 				if ( !$wp_roles->is_role($cap) ) {
   327 					if($output != '') $output .= ', ';
   323 					if ( $output != '' )
       
   324 						$output .= ', ';
   328 					$output .= $value ? $cap : "Denied: {$cap}";
   325 					$output .= $value ? $cap : "Denied: {$cap}";
   329 				}
   326 				}
   330 			}
   327 			}
   331 			echo $output;
   328 			echo $output;
   332 			?></td>
   329 			?></td>
   333 		</tr>
   330 		</tr>
   334 	</table>
   331 	</table>
   335 <?php endif; ?>
   332 <?php } ?>
   336 
   333 
   337 <p class="submit">
   334 <p class="submit">
   338 	<input type="hidden" name="action" value="update" />
   335 	<input type="hidden" name="action" value="update" />
   339 	<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />
   336 	<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />
   340 	<input type="submit" class="button-primary" value="<?php IS_PROFILE_PAGE ? esc_attr_e('Update Profile') : esc_attr_e('Update User') ?>" name="submit" />
   337 	<input type="submit" class="button-primary" value="<?php IS_PROFILE_PAGE ? esc_attr_e('Update Profile') : esc_attr_e('Update User') ?>" name="submit" />