if ( wp_is_application_passwords_available_for_user( $user_id ) ) {
wp_enqueue_script( 'application-passwords' );
}
if ( IS_PROFILE_PAGE ) {
$title = __( 'Profile' );
} else {
/* translators: %s: User's display name. */
$title = __( 'Edit User %s' );
}
if ( current_user_can( 'edit_users' ) && ! IS_PROFILE_PAGE ) {
$submenu_file = 'users.php';
} else {
$submenu_file = 'profile.php';
}
if ( current_user_can( 'edit_users' ) && ! is_user_admin() ) {
$parent_file = 'users.php';
} else {
$parent_file = 'profile.php';
}
$profile_help = '<p>' . __( 'Your profile contains information about you (your “account”) as well as some personal options related to using WordPress.' ) . '</p>' .
'<p>' . __( 'You can change your password, turn on keyboard shortcuts, change the color scheme of your WordPress administration screens, and turn off the WYSIWYG (Visual) editor, among other things. You can hide the Toolbar (formerly called the Admin Bar) from the front end of your site, however it cannot be disabled on the admin screens.' ) . '</p>' .
'<p>' . __( 'You can select the language you wish to use while using the WordPress administration screen without affecting the language site visitors see.' ) . '</p>' .
'<p>' . __( 'Your username cannot be changed, but you can use other fields to enter your real name or a nickname, and change which name to display on your posts.' ) . '</p>' .
'<p>' . __( 'You can log out of other devices, such as your phone or a public computer, by clicking the Log Out Everywhere Else button.' ) . '</p>' .
'<p>' . __( 'Required fields are indicated; the rest are optional. Profile information will only be displayed if your theme is set up to do so.' ) . '</p>' .
'<p>' . __( 'Remember to click the Update Profile button when you are finished.' ) . '</p>';
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' => $profile_help,
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/support/article/users-your-profile-screen/">Documentation on User Profiles</a>' ) . '</p>' .
<p><label><input type="checkbox" id="super_admin" name="super_admin"<?phpchecked( is_super_admin( $profileuser->ID ) ); ?> /> <?php_e( 'Grant this user super admin privileges for the Network.' ); ?></label></p>
<?phpelse : ?>
<p><?php_e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p>
<?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>' ); ?>
printf( __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ), esc_html( $profileuser->display_name ) );
<?php_e( 'Did you lose your phone or leave your account logged in at a public computer? You can log out everywhere else, and stay logged in here.' ); ?>
<p><?php_e( 'Application passwords allow authentication via non-interactive systems, such as XML-RPC or the REST API, without providing your actual password. Application passwords can be easily revoked. They cannot be used for traditional logins to your website.' ); ?></p>
<?php
if ( is_multisite() ) {
$blogs = get_blogs_of_user( $user_id, true );
$blogs_count = count( $blogs );
if ( $blogs_count > 1 ) {
?>
<p>
<?php
printf(
/* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
_n(
'Application passwords grant access to <a href="%1$s">the %2$s site in this installation that you have permissions on</a>.',
'Application passwords grant access to <a href="%1$s">all %2$s sites in this installation that you have permissions on</a>.',
$blogs_count
),
admin_url( 'my-sites.php' ),
number_format_i18n( $blogs_count )
);
?>
</p>
<?php
}
}
if ( ! wp_is_site_protected_by_basic_auth( 'front' ) ) {
<input type="text" size="30" id="new_application_password_name" name="new_application_password_name" placeholder="<?phpesc_attr_e( 'WordPress App on My Phone' ); ?>" class="input" aria-required="true" aria-describedby="new_application_password_name_desc" />
<p class="description" id="new_application_password_name_desc"><?php_e( 'Required to create an Application Password, but not to update the user.' ); ?></p>
</div>
<?php
/**
* Fires in the create Application Passwords form.
*
* @since 5.6.0
*
* @param WP_User $profileuser The current WP_User object.