~canonical-sysadmins/wordpress/4.8.3

« back to all changes in this revision

Viewing changes to wp-admin/user-edit.php

  • Committer: Barry Price
  • Date: 2017-06-09 02:09:58 UTC
  • mfrom: (1.1.26 upstream)
  • Revision ID: barry.price@canonical.com-20170609020958-838whhwt2196f2vk
Merge WP4.8 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
wp_enqueue_script('user-profile');
27
27
 
28
 
$title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User');
 
28
if ( IS_PROFILE_PAGE ) {
 
29
        $title = __( 'Profile' );
 
30
} else {
 
31
        /* translators: %s: user's display name */
 
32
        $title = __( 'Edit User %s' );
 
33
}
 
34
 
29
35
if ( current_user_can('edit_users') && !IS_PROFILE_PAGE )
30
36
        $submenu_file = 'users.php';
31
37
else
166
172
if ( !current_user_can('edit_user', $user_id) )
167
173
        wp_die(__('Sorry, you are not allowed to edit this user.'));
168
174
 
 
175
$title = sprintf( $title, $profileuser->display_name );
169
176
$sessions = WP_Session_Tokens::get_instance( $profileuser->ID );
170
177
 
171
178
include(ABSPATH . 'wp-admin/admin-header.php');
172
179
?>
173
180
 
174
181
<?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?>
175
 
        <div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
 
182
        <div class="notice notice-info"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
176
183
<?php } ?>
177
184
<?php if ( isset($_GET['updated']) ) : ?>
178
185
<div id="message" class="updated notice is-dismissible">
198
205
<?php endif; ?>
199
206
 
200
207
<div class="wrap" id="profile-page">
201
 
<h1>
202
 
<?php
 
208
<h1 class="wp-heading-inline"><?php
203
209
echo esc_html( $title );
 
210
?></h1>
 
211
 
 
212
<?php
204
213
if ( ! IS_PROFILE_PAGE ) {
205
214
        if ( current_user_can( 'create_users' ) ) { ?>
206
215
                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
207
216
        <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
208
217
                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
209
218
        <?php }
210
 
} ?>
211
 
</h1>
 
219
}
 
220
?>
 
221
 
 
222
<hr class="wp-header-end">
 
223
 
212
224
<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post" novalidate="novalidate"<?php
213
225
        /**
214
226
         * Fires inside the your-profile form tag on the user editing screen.