5 * @package WordPress |
5 * @package WordPress |
6 * @subpackage Administration |
6 * @subpackage Administration |
7 */ |
7 */ |
8 |
8 |
9 /** WordPress Administration Bootstrap */ |
9 /** WordPress Administration Bootstrap */ |
10 require_once( dirname( __FILE__ ) . '/admin.php' ); |
10 require_once __DIR__ . '/admin.php'; |
11 |
11 |
12 wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) ); |
12 wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) ); |
13 |
13 |
14 $user_id = (int) $user_id; |
14 $user_id = (int) $user_id; |
15 $current_user = wp_get_current_user(); |
15 $current_user = wp_get_current_user(); |
28 wp_enqueue_script( 'user-profile' ); |
28 wp_enqueue_script( 'user-profile' ); |
29 |
29 |
30 if ( IS_PROFILE_PAGE ) { |
30 if ( IS_PROFILE_PAGE ) { |
31 $title = __( 'Profile' ); |
31 $title = __( 'Profile' ); |
32 } else { |
32 } else { |
33 /* translators: %s: user's display name */ |
33 /* translators: %s: User's display name. */ |
34 $title = __( 'Edit User %s' ); |
34 $title = __( 'Edit User %s' ); |
35 } |
35 } |
36 |
36 |
37 if ( current_user_can( 'edit_users' ) && ! IS_PROFILE_PAGE ) { |
37 if ( current_user_can( 'edit_users' ) && ! IS_PROFILE_PAGE ) { |
38 $submenu_file = 'users.php'; |
38 $submenu_file = 'users.php'; |
62 ) |
62 ) |
63 ); |
63 ); |
64 |
64 |
65 get_current_screen()->set_help_sidebar( |
65 get_current_screen()->set_help_sidebar( |
66 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . |
66 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . |
67 '<p>' . __( '<a href="https://codex.wordpress.org/Users_Your_Profile_Screen">Documentation on User Profiles</a>' ) . '</p>' . |
67 '<p>' . __( '<a href="https://wordpress.org/support/article/users-your-profile-screen/">Documentation on User Profiles</a>' ) . '</p>' . |
68 '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' |
68 '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' |
69 ); |
69 ); |
70 |
70 |
71 $wp_http_referer = remove_query_arg( array( 'update', 'delete_count', 'user_id' ), $wp_http_referer ); |
71 $wp_http_referer = remove_query_arg( array( 'update', 'delete_count', 'user_id' ), $wp_http_referer ); |
72 |
72 |
125 wp_die( __( 'Sorry, you are not allowed to edit this user.' ) ); |
125 wp_die( __( 'Sorry, you are not allowed to edit this user.' ) ); |
126 } |
126 } |
127 |
127 |
128 if ( IS_PROFILE_PAGE ) { |
128 if ( IS_PROFILE_PAGE ) { |
129 /** |
129 /** |
130 * Fires before the page loads on the 'Your Profile' editing screen. |
130 * Fires before the page loads on the 'Profile' editing screen. |
131 * |
131 * |
132 * The action only fires if the current user is editing their own profile. |
132 * The action only fires if the current user is editing their own profile. |
133 * |
133 * |
134 * @since 2.0.0 |
134 * @since 2.0.0 |
135 * |
135 * |
182 } |
182 } |
183 |
183 |
184 $title = sprintf( $title, $profileuser->display_name ); |
184 $title = sprintf( $title, $profileuser->display_name ); |
185 $sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); |
185 $sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); |
186 |
186 |
187 include( ABSPATH . 'wp-admin/admin-header.php' ); |
187 require_once ABSPATH . 'wp-admin/admin-header.php'; |
188 ?> |
188 ?> |
189 |
189 |
190 <?php if ( ! IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?> |
190 <?php if ( ! IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?> |
191 <div class="notice notice-info"><p><strong><?php _e( 'Important:' ); ?></strong> <?php _e( 'This user has super admin privileges.' ); ?></p></div> |
191 <div class="notice notice-info"><p><strong><?php _e( 'Important:' ); ?></strong> <?php _e( 'This user has super admin privileges.' ); ?></p></div> |
192 <?php } ?> |
192 <?php } ?> |
202 <?php endif; ?> |
202 <?php endif; ?> |
203 </div> |
203 </div> |
204 <?php endif; ?> |
204 <?php endif; ?> |
205 <?php if ( isset( $_GET['error'] ) ) : ?> |
205 <?php if ( isset( $_GET['error'] ) ) : ?> |
206 <div class="notice notice-error"> |
206 <div class="notice notice-error"> |
207 <?php if ( 'new-email' == $_GET['error'] ) : ?> |
207 <?php if ( 'new-email' === $_GET['error'] ) : ?> |
208 <p><?php _e( 'Error while saving the new email address. Please try again.' ); ?></p> |
208 <p><?php _e( 'Error while saving the new email address. Please try again.' ); ?></p> |
209 <?php endif; ?> |
209 <?php endif; ?> |
210 </div> |
210 </div> |
211 <?php endif; ?> |
211 <?php endif; ?> |
212 <?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?> |
212 <?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?> |
233 ?> |
233 ?> |
234 |
234 |
235 <hr class="wp-header-end"> |
235 <hr class="wp-header-end"> |
236 |
236 |
237 <form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post" novalidate="novalidate" |
237 <form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post" novalidate="novalidate" |
238 <?php |
238 <?php |
239 /** |
239 /** |
240 * Fires inside the your-profile form tag on the user editing screen. |
240 * Fires inside the your-profile form tag on the user editing screen. |
241 * |
241 * |
242 * @since 3.0.0 |
242 * @since 3.0.0 |
243 */ |
243 */ |
244 do_action( 'user_edit_form_tag' ); |
244 do_action( 'user_edit_form_tag' ); |
245 ?> |
245 ?> |
246 > |
246 > |
247 <?php wp_nonce_field( 'update-user_' . $user_id ); ?> |
247 <?php wp_nonce_field( 'update-user_' . $user_id ); ?> |
248 <?php if ( $wp_http_referer ) : ?> |
248 <?php if ( $wp_http_referer ) : ?> |
249 <input type="hidden" name="wp_http_referer" value="<?php echo esc_url( $wp_http_referer ); ?>" /> |
249 <input type="hidden" name="wp_http_referer" value="<?php echo esc_url( $wp_http_referer ); ?>" /> |
250 <?php endif; ?> |
250 <?php endif; ?> |
257 |
257 |
258 <table class="form-table" role="presentation"> |
258 <table class="form-table" role="presentation"> |
259 <?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?> |
259 <?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?> |
260 <tr class="user-rich-editing-wrap"> |
260 <tr class="user-rich-editing-wrap"> |
261 <th scope="row"><?php _e( 'Visual Editor' ); ?></th> |
261 <th scope="row"><?php _e( 'Visual Editor' ); ?></th> |
262 <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked( 'false', $profileuser->rich_editing ); ?> /> <?php _e( 'Disable the visual editor when writing' ); ?></label></td> |
262 <td> |
|
263 <label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked( 'false', $profileuser->rich_editing ); ?> /> |
|
264 <?php _e( 'Disable the visual editor when writing' ); ?> |
|
265 </label> |
|
266 </td> |
263 </tr> |
267 </tr> |
264 <?php endif; ?> |
268 <?php endif; ?> |
265 <?php |
269 <?php |
266 $show_syntax_highlighting_preference = ( |
270 $show_syntax_highlighting_preference = ( |
267 // For Custom HTML widget and Additional CSS in Customizer. |
271 // For Custom HTML widget and Additional CSS in Customizer. |
272 || |
276 || |
273 // Edit themes. |
277 // Edit themes. |
274 user_can( $profileuser, 'edit_themes' ) |
278 user_can( $profileuser, 'edit_themes' ) |
275 ); |
279 ); |
276 ?> |
280 ?> |
|
281 |
277 <?php if ( $show_syntax_highlighting_preference ) : ?> |
282 <?php if ( $show_syntax_highlighting_preference ) : ?> |
278 <tr class="user-syntax-highlighting-wrap"> |
283 <tr class="user-syntax-highlighting-wrap"> |
279 <th scope="row"><?php _e( 'Syntax Highlighting' ); ?></th> |
284 <th scope="row"><?php _e( 'Syntax Highlighting' ); ?></th> |
280 <td> |
285 <td> |
281 <label for="syntax_highlighting"><input name="syntax_highlighting" type="checkbox" id="syntax_highlighting" value="false" <?php checked( 'false', $profileuser->syntax_highlighting ); ?> /> <?php _e( 'Disable syntax highlighting when editing code' ); ?></label> |
286 <label for="syntax_highlighting"><input name="syntax_highlighting" type="checkbox" id="syntax_highlighting" value="false" <?php checked( 'false', $profileuser->syntax_highlighting ); ?> /> |
282 </td> |
287 <?php _e( 'Disable syntax highlighting when editing code' ); ?> |
283 </tr> |
288 </label> |
284 <?php endif; ?> |
289 </td> |
|
290 </tr> |
|
291 <?php endif; ?> |
|
292 |
285 <?php if ( count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) : ?> |
293 <?php if ( count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) : ?> |
286 <tr class="user-admin-color-wrap"> |
294 <tr class="user-admin-color-wrap"> |
287 <th scope="row"><?php _e( 'Admin Color Scheme' ); ?></th> |
295 <th scope="row"><?php _e( 'Admin Color Scheme' ); ?></th> |
288 <td> |
296 <td> |
289 <?php |
297 <?php |
290 /** |
298 /** |
291 * Fires in the 'Admin Color Scheme' section of the user editing screen. |
299 * Fires in the 'Admin Color Scheme' section of the user editing screen. |
292 * |
300 * |
293 * The section is only enabled if a callback is hooked to the action, |
301 * The section is only enabled if a callback is hooked to the action, |
298 * |
306 * |
299 * @param int $user_id The user ID. |
307 * @param int $user_id The user ID. |
300 */ |
308 */ |
301 do_action( 'admin_color_scheme_picker', $user_id ); |
309 do_action( 'admin_color_scheme_picker', $user_id ); |
302 ?> |
310 ?> |
303 </td> |
311 </td> |
304 </tr> |
312 </tr> |
305 <?php |
313 <?php endif; // End if count ( $_wp_admin_css_colors ) > 1 ?> |
306 endif; // $_wp_admin_css_colors |
314 |
307 if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : |
315 <?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?> |
308 ?> |
316 <tr class="user-comment-shortcuts-wrap"> |
309 <tr class="user-comment-shortcuts-wrap"> |
317 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th> |
310 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th> |
318 <td> |
311 <td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e( 'Enable keyboard shortcuts for comment moderation.' ); ?></label> <?php _e( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>' ); ?></td> |
319 <label for="comment_shortcuts"> |
312 </tr> |
320 <input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php checked( 'true', $profileuser->comment_shortcuts ); ?> /> |
|
321 <?php _e( 'Enable keyboard shortcuts for comment moderation.' ); ?> |
|
322 </label> |
|
323 <?php _e( '<a href="https://wordpress.org/support/article/keyboard-shortcuts/" target="_blank">More information</a>' ); ?> |
|
324 </td> |
|
325 </tr> |
313 <?php endif; ?> |
326 <?php endif; ?> |
314 <tr class="show-admin-bar user-admin-bar-front-wrap"> |
327 |
315 <th scope="row"><?php _e( 'Toolbar' ); ?></th> |
328 <tr class="show-admin-bar user-admin-bar-front-wrap"> |
316 <td> |
329 <th scope="row"><?php _e( 'Toolbar' ); ?></th> |
317 <label for="admin_bar_front"> |
330 <td> |
318 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> /> |
331 <label for="admin_bar_front"> |
319 <?php _e( 'Show Toolbar when viewing site' ); ?></label><br /> |
332 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> /> |
320 </td> |
333 <?php _e( 'Show Toolbar when viewing site' ); ?> |
321 </tr> |
334 </label><br /> |
|
335 </td> |
|
336 </tr> |
322 |
337 |
323 <?php |
338 <?php |
324 $languages = get_available_languages(); |
339 $languages = get_available_languages(); |
325 if ( $languages ) : |
340 if ( $languages ) : |
326 ?> |
341 ?> |
327 <tr class="user-language-wrap"> |
342 <tr class="user-language-wrap"> |
328 <th scope="row"> |
343 <th scope="row"> |
329 <?php /* translators: The user language selection field label */ ?> |
344 <?php /* translators: The user language selection field label. */ ?> |
330 <label for="locale"><?php _e( 'Language' ); ?></label> |
345 <label for="locale"><?php _e( 'Language' ); ?><span class="dashicons dashicons-translation" aria-hidden="true"></span></label> |
331 </th> |
346 </th> |
332 <td> |
347 <td> |
333 <?php |
348 <?php |
334 $user_locale = $profileuser->locale; |
349 $user_locale = $profileuser->locale; |
335 |
350 |
336 if ( 'en_US' === $user_locale ) { |
351 if ( 'en_US' === $user_locale ) { |
337 $user_locale = ''; |
352 $user_locale = ''; |
393 |
408 |
394 <?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profileuser->ID ) ) : ?> |
409 <?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profileuser->ID ) ) : ?> |
395 <tr class="user-role-wrap"><th><label for="role"><?php _e( 'Role' ); ?></label></th> |
410 <tr class="user-role-wrap"><th><label for="role"><?php _e( 'Role' ); ?></label></th> |
396 <td><select name="role" id="role"> |
411 <td><select name="role" id="role"> |
397 <?php |
412 <?php |
398 // Compare user role against currently editable roles |
413 // Compare user role against currently editable roles. |
399 $user_roles = array_intersect( array_values( $profileuser->roles ), array_keys( get_editable_roles() ) ); |
414 $user_roles = array_intersect( array_values( $profileuser->roles ), array_keys( get_editable_roles() ) ); |
400 $user_role = reset( $user_roles ); |
415 $user_role = reset( $user_roles ); |
401 |
416 |
402 // print the full list of roles with the primary one selected. |
417 // Print the full list of roles with the primary one selected. |
403 wp_dropdown_roles( $user_role ); |
418 wp_dropdown_roles( $user_role ); |
404 |
419 |
405 // print the 'no role' option. Make it selected if the user has no role yet. |
420 // Print the 'no role' option. Make it selected if the user has no role yet. |
406 if ( $user_role ) { |
421 if ( $user_role ) { |
407 echo '<option value="">' . __( '— No role for this site —' ) . '</option>'; |
422 echo '<option value="">' . __( '— No role for this site —' ) . '</option>'; |
408 } else { |
423 } else { |
409 echo '<option value="" selected="selected">' . __( '— No role for this site —' ) . '</option>'; |
424 echo '<option value="" selected="selected">' . __( '— No role for this site —' ) . '</option>'; |
410 } |
425 } |
411 ?> |
426 ?> |
412 </select></td></tr> |
427 </select></td></tr> |
413 <?php |
428 <?php |
414 endif; //!IS_PROFILE_PAGE |
429 endif; // End if ! IS_PROFILE_PAGE. |
415 |
430 |
416 if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) ) { |
431 if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) ) { |
417 ?> |
432 ?> |
418 <tr class="user-super-admin-wrap"><th><?php _e( 'Super Admin' ); ?></th> |
433 <tr class="user-super-admin-wrap"><th><?php _e( 'Super Admin' ); ?></th> |
419 <td> |
434 <td> |
420 <?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?> |
435 <?php if ( 0 !== strcasecmp( $profileuser->user_email, get_site_option( 'admin_email' ) ) || ! is_super_admin( $profileuser->ID ) ) : ?> |
421 <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> |
436 <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> |
422 <?php else : ?> |
437 <?php else : ?> |
423 <p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p> |
438 <p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p> |
424 <?php endif; ?> |
439 <?php endif; ?> |
425 </td></tr> |
440 </td></tr> |
460 if ( ! empty( $profileuser->first_name ) && ! empty( $profileuser->last_name ) ) { |
475 if ( ! empty( $profileuser->first_name ) && ! empty( $profileuser->last_name ) ) { |
461 $public_display['display_firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name; |
476 $public_display['display_firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name; |
462 $public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name; |
477 $public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name; |
463 } |
478 } |
464 |
479 |
465 if ( ! in_array( $profileuser->display_name, $public_display ) ) { // Only add this if it isn't duplicated elsewhere |
480 if ( ! in_array( $profileuser->display_name, $public_display, true ) ) { // Only add this if it isn't duplicated elsewhere. |
466 $public_display = array( 'display_displayname' => $profileuser->display_name ) + $public_display; |
481 $public_display = array( 'display_displayname' => $profileuser->display_name ) + $public_display; |
467 } |
482 } |
468 |
483 |
469 $public_display = array_map( 'trim', $public_display ); |
484 $public_display = array_map( 'trim', $public_display ); |
470 $public_display = array_unique( $public_display ); |
485 $public_display = array_unique( $public_display ); |
488 <td><input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" /> |
503 <td><input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" /> |
489 <?php |
504 <?php |
490 if ( $profileuser->ID == $current_user->ID ) : |
505 if ( $profileuser->ID == $current_user->ID ) : |
491 ?> |
506 ?> |
492 <p class="description" id="email-description"> |
507 <p class="description" id="email-description"> |
493 <?php _e( 'If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?> |
508 <?php _e( 'If you change this, we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?> |
494 </p> |
509 </p> |
495 <?php |
510 <?php |
496 endif; |
511 endif; |
497 |
512 |
498 $new_email = get_user_meta( $current_user->ID, '_new_email', true ); |
513 $new_email = get_user_meta( $current_user->ID, '_new_email', true ); |
500 ?> |
515 ?> |
501 <div class="updated inline"> |
516 <div class="updated inline"> |
502 <p> |
517 <p> |
503 <?php |
518 <?php |
504 printf( |
519 printf( |
505 /* translators: %s: new email */ |
520 /* translators: %s: New email. */ |
506 __( 'There is a pending change of your email to %s.' ), |
521 __( 'There is a pending change of your email to %s.' ), |
507 '<code>' . esc_html( $new_email['newemail'] ) . '</code>' |
522 '<code>' . esc_html( $new_email['newemail'] ) . '</code>' |
508 ); |
523 ); |
509 printf( |
524 printf( |
510 ' <a href="%1$s">%2$s</a>', |
525 ' <a href="%1$s">%2$s</a>', |
564 <td> |
579 <td> |
565 <?php echo get_avatar( $user_id ); ?> |
580 <?php echo get_avatar( $user_id ); ?> |
566 <p class="description"> |
581 <p class="description"> |
567 <?php |
582 <?php |
568 if ( IS_PROFILE_PAGE ) { |
583 if ( IS_PROFILE_PAGE ) { |
569 /* translators: %s: Gravatar URL */ |
|
570 $description = sprintf( |
584 $description = sprintf( |
|
585 /* translators: %s: Gravatar URL. */ |
571 __( '<a href="%s">You can change your profile picture on Gravatar</a>.' ), |
586 __( '<a href="%s">You can change your profile picture on Gravatar</a>.' ), |
572 __( 'https://en.gravatar.com/' ) |
587 __( 'https://en.gravatar.com/' ) |
573 ); |
588 ); |
574 } else { |
589 } else { |
575 $description = ''; |
590 $description = ''; |
600 * @since 4.4.0 Now evaluated only in user-edit.php. |
615 * @since 4.4.0 Now evaluated only in user-edit.php. |
601 * |
616 * |
602 * @param bool $show Whether to show the password fields. Default true. |
617 * @param bool $show Whether to show the password fields. Default true. |
603 * @param WP_User $profileuser User object for the current user to edit. |
618 * @param WP_User $profileuser User object for the current user to edit. |
604 */ |
619 */ |
605 if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ) ) : |
620 $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ); |
|
621 if ( $show_password_fields ) : |
606 ?> |
622 ?> |
607 </table> |
623 </table> |
608 |
624 |
609 <h2><?php _e( 'Account Management' ); ?></h2> |
625 <h2><?php _e( 'Account Management' ); ?></h2> |
610 <table class="form-table" role="presentation"> |
626 <table class="form-table" role="presentation"> |
674 <th><?php _e( 'Sessions' ); ?></th> |
690 <th><?php _e( 'Sessions' ); ?></th> |
675 <td> |
691 <td> |
676 <p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p> |
692 <p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p> |
677 <p class="description"> |
693 <p class="description"> |
678 <?php |
694 <?php |
679 /* translators: %s: user's display name */ |
695 /* translators: %s: User's display name. */ |
680 printf( __( 'Log %s out of all locations.' ), $profileuser->display_name ); |
696 printf( __( 'Log %s out of all locations.' ), $profileuser->display_name ); |
681 ?> |
697 ?> |
682 </p> |
698 </p> |
683 </td> |
699 </td> |
684 </tr> |
700 </tr> |
737 foreach ( $profileuser->caps as $cap => $value ) { |
753 foreach ( $profileuser->caps as $cap => $value ) { |
738 if ( ! $wp_roles->is_role( $cap ) ) { |
754 if ( ! $wp_roles->is_role( $cap ) ) { |
739 if ( '' != $output ) { |
755 if ( '' != $output ) { |
740 $output .= ', '; |
756 $output .= ', '; |
741 } |
757 } |
742 $output .= $value ? $cap : sprintf( __( 'Denied: %s' ), $cap ); |
758 |
|
759 if ( $value ) { |
|
760 $output .= $cap; |
|
761 } else { |
|
762 /* translators: %s: Capability name. */ |
|
763 $output .= sprintf( __( 'Denied: %s' ), $cap ); |
|
764 } |
743 } |
765 } |
744 } |
766 } |
745 echo $output; |
767 echo $output; |
746 ?> |
768 ?> |
747 </td> |
769 </td> |