Edit File by line
/home/zeestwma/ceyloniy.../wp-admin
File: user-edit.php
<?php endif; ?>
[500] Fix | Delete
</td>
[501] Fix | Delete
</tr>
[502] Fix | Delete
[503] Fix | Delete
<tr class="user-nickname-wrap">
[504] Fix | Delete
<th><label for="nickname"><?php _e( 'Nickname' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
[505] Fix | Delete
<td>
[506] Fix | Delete
<?php if ( IS_PROFILE_PAGE ) : ?>
[507] Fix | Delete
<input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profile_user->nickname ); ?>" autocomplete="nickname" class="regular-text" />
[508] Fix | Delete
<?php else : ?>
[509] Fix | Delete
<input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profile_user->nickname ); ?>" class="regular-text" />
[510] Fix | Delete
<?php endif; ?>
[511] Fix | Delete
</td>
[512] Fix | Delete
</tr>
[513] Fix | Delete
[514] Fix | Delete
<tr class="user-display-name-wrap">
[515] Fix | Delete
<th>
[516] Fix | Delete
<label for="display_name"><?php _e( 'Display name publicly as' ); ?></label>
[517] Fix | Delete
</th>
[518] Fix | Delete
<td>
[519] Fix | Delete
<select name="display_name" id="display_name">
[520] Fix | Delete
<?php
[521] Fix | Delete
$public_display = array();
[522] Fix | Delete
$public_display['display_nickname'] = $profile_user->nickname;
[523] Fix | Delete
$public_display['display_username'] = $profile_user->user_login;
[524] Fix | Delete
[525] Fix | Delete
if ( ! empty( $profile_user->first_name ) ) {
[526] Fix | Delete
$public_display['display_firstname'] = $profile_user->first_name;
[527] Fix | Delete
}
[528] Fix | Delete
[529] Fix | Delete
if ( ! empty( $profile_user->last_name ) ) {
[530] Fix | Delete
$public_display['display_lastname'] = $profile_user->last_name;
[531] Fix | Delete
}
[532] Fix | Delete
[533] Fix | Delete
if ( ! empty( $profile_user->first_name ) && ! empty( $profile_user->last_name ) ) {
[534] Fix | Delete
$public_display['display_firstlast'] = $profile_user->first_name . ' ' . $profile_user->last_name;
[535] Fix | Delete
$public_display['display_lastfirst'] = $profile_user->last_name . ' ' . $profile_user->first_name;
[536] Fix | Delete
}
[537] Fix | Delete
[538] Fix | Delete
if ( ! in_array( $profile_user->display_name, $public_display, true ) ) { // Only add this if it isn't duplicated elsewhere.
[539] Fix | Delete
$public_display = array( 'display_displayname' => $profile_user->display_name ) + $public_display;
[540] Fix | Delete
}
[541] Fix | Delete
[542] Fix | Delete
$public_display = array_map( 'trim', $public_display );
[543] Fix | Delete
$public_display = array_unique( $public_display );
[544] Fix | Delete
[545] Fix | Delete
?>
[546] Fix | Delete
<?php foreach ( $public_display as $id => $item ) : ?>
[547] Fix | Delete
<option <?php selected( $profile_user->display_name, $item ); ?>><?php echo $item; ?></option>
[548] Fix | Delete
<?php endforeach; ?>
[549] Fix | Delete
</select>
[550] Fix | Delete
</td>
[551] Fix | Delete
</tr>
[552] Fix | Delete
</table>
[553] Fix | Delete
[554] Fix | Delete
<h2><?php _e( 'Contact Info' ); ?></h2>
[555] Fix | Delete
[556] Fix | Delete
<table class="form-table" role="presentation">
[557] Fix | Delete
<tr class="user-email-wrap">
[558] Fix | Delete
<th><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
[559] Fix | Delete
<td>
[560] Fix | Delete
<?php if ( $profile_user->ID === $current_user->ID ) : ?>
[561] Fix | Delete
<input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profile_user->user_email ); ?>" autocomplete="email" class="regular-text ltr" />
[562] Fix | Delete
<p class="description" id="email-description">
[563] Fix | Delete
<?php _e( 'If you change this, an email will be sent at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
[564] Fix | Delete
</p>
[565] Fix | Delete
<?php else : ?>
[566] Fix | Delete
<input type="email" name="email" id="email" value="<?php echo esc_attr( $profile_user->user_email ); ?>" class="regular-text ltr" />
[567] Fix | Delete
<?php endif; ?>
[568] Fix | Delete
[569] Fix | Delete
<?php
[570] Fix | Delete
$new_email = get_user_meta( $current_user->ID, '_new_email', true );
[571] Fix | Delete
if ( $new_email && $new_email['newemail'] !== $current_user->user_email && $profile_user->ID === $current_user->ID ) :
[572] Fix | Delete
[573] Fix | Delete
$pending_change_message = sprintf(
[574] Fix | Delete
/* translators: %s: New email. */
[575] Fix | Delete
__( 'There is a pending change of your email to %s.' ),
[576] Fix | Delete
'<code>' . esc_html( $new_email['newemail'] ) . '</code>'
[577] Fix | Delete
);
[578] Fix | Delete
$pending_change_message .= sprintf(
[579] Fix | Delete
' <a href="%1$s">%2$s</a>',
[580] Fix | Delete
esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ), 'dismiss-' . $current_user->ID . '_new_email' ) ),
[581] Fix | Delete
__( 'Cancel' )
[582] Fix | Delete
);
[583] Fix | Delete
wp_admin_notice(
[584] Fix | Delete
$pending_change_message,
[585] Fix | Delete
array(
[586] Fix | Delete
'additional_classes' => array( 'updated', 'inline' ),
[587] Fix | Delete
)
[588] Fix | Delete
);
[589] Fix | Delete
endif;
[590] Fix | Delete
?>
[591] Fix | Delete
</td>
[592] Fix | Delete
</tr>
[593] Fix | Delete
[594] Fix | Delete
<tr class="user-url-wrap">
[595] Fix | Delete
<th><label for="url"><?php _e( 'Website' ); ?></label></th>
[596] Fix | Delete
<td><input type="url" name="url" id="url" value="<?php echo esc_attr( $profile_user->user_url ); ?>" class="regular-text code" /></td>
[597] Fix | Delete
</tr>
[598] Fix | Delete
[599] Fix | Delete
<?php foreach ( wp_get_user_contact_methods( $profile_user ) as $name => $desc ) : ?>
[600] Fix | Delete
<tr class="user-<?php echo $name; ?>-wrap">
[601] Fix | Delete
<th>
[602] Fix | Delete
<label for="<?php echo $name; ?>">
[603] Fix | Delete
<?php
[604] Fix | Delete
/**
[605] Fix | Delete
* Filters a user contactmethod label.
[606] Fix | Delete
*
[607] Fix | Delete
* The dynamic portion of the hook name, `$name`, refers to
[608] Fix | Delete
* each of the keys in the contact methods array.
[609] Fix | Delete
*
[610] Fix | Delete
* @since 2.9.0
[611] Fix | Delete
*
[612] Fix | Delete
* @param string $desc The translatable label for the contact method.
[613] Fix | Delete
*/
[614] Fix | Delete
echo apply_filters( "user_{$name}_label", $desc );
[615] Fix | Delete
?>
[616] Fix | Delete
</label>
[617] Fix | Delete
</th>
[618] Fix | Delete
<td>
[619] Fix | Delete
<input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $profile_user->$name ); ?>" class="regular-text" />
[620] Fix | Delete
</td>
[621] Fix | Delete
</tr>
[622] Fix | Delete
<?php endforeach; ?>
[623] Fix | Delete
</table>
[624] Fix | Delete
[625] Fix | Delete
<h2><?php IS_PROFILE_PAGE ? _e( 'About Yourself' ) : _e( 'About the user' ); ?></h2>
[626] Fix | Delete
[627] Fix | Delete
<table class="form-table" role="presentation">
[628] Fix | Delete
<tr class="user-description-wrap">
[629] Fix | Delete
<th><label for="description"><?php _e( 'Biographical Info' ); ?></label></th>
[630] Fix | Delete
<td><textarea name="description" id="description" rows="5" cols="30"><?php echo $profile_user->description; // textarea_escaped ?></textarea>
[631] Fix | Delete
<p class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.' ); ?></p></td>
[632] Fix | Delete
</tr>
[633] Fix | Delete
[634] Fix | Delete
<?php if ( get_option( 'show_avatars' ) ) : ?>
[635] Fix | Delete
<tr class="user-profile-picture">
[636] Fix | Delete
<th><?php _e( 'Profile Picture' ); ?></th>
[637] Fix | Delete
<td>
[638] Fix | Delete
<?php echo get_avatar( $user_id ); ?>
[639] Fix | Delete
<p class="description">
[640] Fix | Delete
<?php
[641] Fix | Delete
if ( IS_PROFILE_PAGE ) {
[642] Fix | Delete
$description = sprintf(
[643] Fix | Delete
/* translators: %s: Gravatar URL. */
[644] Fix | Delete
__( '<a href="%s">You can change your profile picture on Gravatar</a>.' ),
[645] Fix | Delete
/* translators: The localized Gravatar URL. */
[646] Fix | Delete
__( 'https://gravatar.com/' )
[647] Fix | Delete
);
[648] Fix | Delete
} else {
[649] Fix | Delete
$description = '';
[650] Fix | Delete
}
[651] Fix | Delete
[652] Fix | Delete
/**
[653] Fix | Delete
* Filters the user profile picture description displayed under the Gravatar.
[654] Fix | Delete
*
[655] Fix | Delete
* @since 4.4.0
[656] Fix | Delete
* @since 4.7.0 Added the `$profile_user` parameter.
[657] Fix | Delete
*
[658] Fix | Delete
* @param string $description The description that will be printed.
[659] Fix | Delete
* @param WP_User $profile_user The current WP_User object.
[660] Fix | Delete
*/
[661] Fix | Delete
echo apply_filters( 'user_profile_picture_description', $description, $profile_user );
[662] Fix | Delete
?>
[663] Fix | Delete
</p>
[664] Fix | Delete
</td>
[665] Fix | Delete
</tr>
[666] Fix | Delete
<?php endif; ?>
[667] Fix | Delete
<?php
[668] Fix | Delete
/**
[669] Fix | Delete
* Filters the display of the password fields.
[670] Fix | Delete
*
[671] Fix | Delete
* @since 1.5.1
[672] Fix | Delete
* @since 2.8.0 Added the `$profile_user` parameter.
[673] Fix | Delete
* @since 4.4.0 Now evaluated only in user-edit.php.
[674] Fix | Delete
*
[675] Fix | Delete
* @param bool $show Whether to show the password fields. Default true.
[676] Fix | Delete
* @param WP_User $profile_user User object for the current user to edit.
[677] Fix | Delete
*/
[678] Fix | Delete
$show_password_fields = apply_filters( 'show_password_fields', true, $profile_user );
[679] Fix | Delete
?>
[680] Fix | Delete
<?php if ( $show_password_fields ) : ?>
[681] Fix | Delete
</table>
[682] Fix | Delete
[683] Fix | Delete
<h2><?php _e( 'Account Management' ); ?></h2>
[684] Fix | Delete
[685] Fix | Delete
<table class="form-table" role="presentation">
[686] Fix | Delete
<tr id="password" class="user-pass1-wrap">
[687] Fix | Delete
<th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
[688] Fix | Delete
<td>
[689] Fix | Delete
<input type="hidden" value=" " /><!-- #24364 workaround -->
[690] Fix | Delete
<button type="button" class="button wp-generate-pw hide-if-no-js" aria-expanded="false"><?php _e( 'Set New Password' ); ?></button>
[691] Fix | Delete
<div class="wp-pwd hide-if-js">
[692] Fix | Delete
<div class="password-input-wrapper">
[693] Fix | Delete
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="new-password" spellcheck="false" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
[694] Fix | Delete
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
[695] Fix | Delete
</div>
[696] Fix | Delete
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
[697] Fix | Delete
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
[698] Fix | Delete
<span class="text"><?php _e( 'Hide' ); ?></span>
[699] Fix | Delete
</button>
[700] Fix | Delete
<button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
[701] Fix | Delete
<span class="dashicons dashicons-no" aria-hidden="true"></span>
[702] Fix | Delete
<span class="text"><?php _e( 'Cancel' ); ?></span>
[703] Fix | Delete
</button>
[704] Fix | Delete
</div>
[705] Fix | Delete
</td>
[706] Fix | Delete
</tr>
[707] Fix | Delete
<tr class="user-pass2-wrap hide-if-js">
[708] Fix | Delete
<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
[709] Fix | Delete
<td>
[710] Fix | Delete
<input type="password" name="pass2" id="pass2" class="regular-text" value="" autocomplete="new-password" spellcheck="false" aria-describedby="pass2-desc" />
[711] Fix | Delete
<?php if ( IS_PROFILE_PAGE ) : ?>
[712] Fix | Delete
<p class="description" id="pass2-desc"><?php _e( 'Type your new password again.' ); ?></p>
[713] Fix | Delete
<?php else : ?>
[714] Fix | Delete
<p class="description" id="pass2-desc"><?php _e( 'Type the new password again.' ); ?></p>
[715] Fix | Delete
<?php endif; ?>
[716] Fix | Delete
</td>
[717] Fix | Delete
</tr>
[718] Fix | Delete
<tr class="pw-weak">
[719] Fix | Delete
<th><?php _e( 'Confirm Password' ); ?></th>
[720] Fix | Delete
<td>
[721] Fix | Delete
<label>
[722] Fix | Delete
<input type="checkbox" name="pw_weak" class="pw-checkbox" />
[723] Fix | Delete
<span id="pw-weak-text-label"><?php _e( 'Confirm use of weak password' ); ?></span>
[724] Fix | Delete
</label>
[725] Fix | Delete
</td>
[726] Fix | Delete
</tr>
[727] Fix | Delete
<?php endif; // End Show Password Fields. ?>
[728] Fix | Delete
[729] Fix | Delete
<?php // Allow admins to send reset password link. ?>
[730] Fix | Delete
<?php if ( ! IS_PROFILE_PAGE && true === wp_is_password_reset_allowed_for_user( $profile_user ) ) : ?>
[731] Fix | Delete
<tr class="user-generate-reset-link-wrap hide-if-no-js">
[732] Fix | Delete
<th><?php _e( 'Password Reset' ); ?></th>
[733] Fix | Delete
<td>
[734] Fix | Delete
<div class="generate-reset-link">
[735] Fix | Delete
<button type="button" class="button button-secondary" id="generate-reset-link">
[736] Fix | Delete
<?php _e( 'Send Reset Link' ); ?>
[737] Fix | Delete
</button>
[738] Fix | Delete
</div>
[739] Fix | Delete
<p class="description">
[740] Fix | Delete
<?php
[741] Fix | Delete
printf(
[742] Fix | Delete
/* translators: %s: User's display name. */
[743] Fix | Delete
__( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ),
[744] Fix | Delete
esc_html( $profile_user->display_name )
[745] Fix | Delete
);
[746] Fix | Delete
?>
[747] Fix | Delete
</p>
[748] Fix | Delete
</td>
[749] Fix | Delete
</tr>
[750] Fix | Delete
<?php endif; ?>
[751] Fix | Delete
[752] Fix | Delete
<?php if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
[753] Fix | Delete
<tr class="user-sessions-wrap hide-if-no-js">
[754] Fix | Delete
<th><?php _e( 'Sessions' ); ?></th>
[755] Fix | Delete
<td aria-live="assertive">
[756] Fix | Delete
<div class="destroy-sessions"><button type="button" disabled class="button"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
[757] Fix | Delete
<p class="description">
[758] Fix | Delete
<?php _e( 'You are only logged in at this location.' ); ?>
[759] Fix | Delete
</p>
[760] Fix | Delete
</td>
[761] Fix | Delete
</tr>
[762] Fix | Delete
<?php elseif ( IS_PROFILE_PAGE && count( $sessions->get_all() ) > 1 ) : ?>
[763] Fix | Delete
<tr class="user-sessions-wrap hide-if-no-js">
[764] Fix | Delete
<th><?php _e( 'Sessions' ); ?></th>
[765] Fix | Delete
<td aria-live="assertive">
[766] Fix | Delete
<div class="destroy-sessions"><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
[767] Fix | Delete
<p class="description">
[768] Fix | Delete
<?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.' ); ?>
[769] Fix | Delete
</p>
[770] Fix | Delete
</td>
[771] Fix | Delete
</tr>
[772] Fix | Delete
<?php elseif ( ! IS_PROFILE_PAGE && $sessions->get_all() ) : ?>
[773] Fix | Delete
<tr class="user-sessions-wrap hide-if-no-js">
[774] Fix | Delete
<th><?php _e( 'Sessions' ); ?></th>
[775] Fix | Delete
<td>
[776] Fix | Delete
<p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
[777] Fix | Delete
<p class="description">
[778] Fix | Delete
<?php
[779] Fix | Delete
/* translators: %s: User's display name. */
[780] Fix | Delete
printf( __( 'Log %s out of all locations.' ), $profile_user->display_name );
[781] Fix | Delete
?>
[782] Fix | Delete
</p>
[783] Fix | Delete
</td>
[784] Fix | Delete
</tr>
[785] Fix | Delete
<?php endif; ?>
[786] Fix | Delete
</table>
[787] Fix | Delete
[788] Fix | Delete
<?php if ( wp_is_application_passwords_available_for_user( $user_id ) || ! wp_is_application_passwords_supported() ) : ?>
[789] Fix | Delete
<div class="application-passwords hide-if-no-js" id="application-passwords-section">
[790] Fix | Delete
<h2><?php _e( 'Application Passwords' ); ?></h2>
[791] Fix | Delete
<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>
[792] Fix | Delete
<?php if ( wp_is_application_passwords_available_for_user( $user_id ) ) : ?>
[793] Fix | Delete
<?php
[794] Fix | Delete
if ( is_multisite() ) :
[795] Fix | Delete
$blogs = get_blogs_of_user( $user_id, true );
[796] Fix | Delete
$blogs_count = count( $blogs );
[797] Fix | Delete
[798] Fix | Delete
if ( $blogs_count > 1 ) :
[799] Fix | Delete
?>
[800] Fix | Delete
<p>
[801] Fix | Delete
<?php
[802] Fix | Delete
/* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
[803] Fix | Delete
$message = _n(
[804] Fix | Delete
'Application passwords grant access to <a href="%1$s">the %2$s site in this installation that you have permissions on</a>.',
[805] Fix | Delete
'Application passwords grant access to <a href="%1$s">all %2$s sites in this installation that you have permissions on</a>.',
[806] Fix | Delete
$blogs_count
[807] Fix | Delete
);
[808] Fix | Delete
[809] Fix | Delete
if ( is_super_admin( $user_id ) ) {
[810] Fix | Delete
/* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
[811] Fix | Delete
$message = _n(
[812] Fix | Delete
'Application passwords grant access to <a href="%1$s">the %2$s site on the network as you have Super Admin rights</a>.',
[813] Fix | Delete
'Application passwords grant access to <a href="%1$s">all %2$s sites on the network as you have Super Admin rights</a>.',
[814] Fix | Delete
$blogs_count
[815] Fix | Delete
);
[816] Fix | Delete
}
[817] Fix | Delete
[818] Fix | Delete
printf(
[819] Fix | Delete
$message,
[820] Fix | Delete
admin_url( 'my-sites.php' ),
[821] Fix | Delete
number_format_i18n( $blogs_count )
[822] Fix | Delete
);
[823] Fix | Delete
?>
[824] Fix | Delete
</p>
[825] Fix | Delete
<?php
[826] Fix | Delete
endif;
[827] Fix | Delete
endif;
[828] Fix | Delete
?>
[829] Fix | Delete
[830] Fix | Delete
<?php if ( ! wp_is_site_protected_by_basic_auth( 'front' ) ) : ?>
[831] Fix | Delete
<div class="create-application-password form-wrap">
[832] Fix | Delete
<div class="form-field">
[833] Fix | Delete
<label for="new_application_password_name"><?php _e( 'New Application Password Name' ); ?></label>
[834] Fix | Delete
<input type="text" size="30" id="new_application_password_name" name="new_application_password_name" class="input" aria-required="true" aria-describedby="new_application_password_name_desc" spellcheck="false" />
[835] Fix | Delete
<p class="description" id="new_application_password_name_desc"><?php _e( 'Required to create an Application Password, but not to update the user.' ); ?></p>
[836] Fix | Delete
</div>
[837] Fix | Delete
[838] Fix | Delete
<?php
[839] Fix | Delete
/**
[840] Fix | Delete
* Fires in the create Application Passwords form.
[841] Fix | Delete
*
[842] Fix | Delete
* @since 5.6.0
[843] Fix | Delete
*
[844] Fix | Delete
* @param WP_User $profile_user The current WP_User object.
[845] Fix | Delete
*/
[846] Fix | Delete
do_action( 'wp_create_application_password_form', $profile_user );
[847] Fix | Delete
?>
[848] Fix | Delete
[849] Fix | Delete
<button type="button" name="do_new_application_password" id="do_new_application_password" class="button button-secondary"><?php _e( 'Add Application Password' ); ?></button>
[850] Fix | Delete
</div>
[851] Fix | Delete
<?php
[852] Fix | Delete
else :
[853] Fix | Delete
wp_admin_notice(
[854] Fix | Delete
__( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ),
[855] Fix | Delete
array(
[856] Fix | Delete
'type' => 'error',
[857] Fix | Delete
'additional_classes' => array( 'inline' ),
[858] Fix | Delete
)
[859] Fix | Delete
);
[860] Fix | Delete
endif;
[861] Fix | Delete
?>
[862] Fix | Delete
[863] Fix | Delete
<div class="application-passwords-list-table-wrapper">
[864] Fix | Delete
<?php
[865] Fix | Delete
$application_passwords_list_table = _get_list_table( 'WP_Application_Passwords_List_Table', array( 'screen' => 'application-passwords-user' ) );
[866] Fix | Delete
$application_passwords_list_table->prepare_items();
[867] Fix | Delete
$application_passwords_list_table->display();
[868] Fix | Delete
?>
[869] Fix | Delete
</div>
[870] Fix | Delete
<?php elseif ( ! wp_is_application_passwords_supported() ) : ?>
[871] Fix | Delete
<p><?php _e( 'The application password feature requires HTTPS, which is not enabled on this site.' ); ?></p>
[872] Fix | Delete
<p>
[873] Fix | Delete
<?php
[874] Fix | Delete
printf(
[875] Fix | Delete
/* translators: %s: Documentation URL. */
[876] Fix | Delete
__( 'If this is a development website, you can <a href="%s">set the environment type accordingly</a> to enable application passwords.' ),
[877] Fix | Delete
__( 'https://developer.wordpress.org/apis/wp-config-php/#wp-environment-type' )
[878] Fix | Delete
);
[879] Fix | Delete
?>
[880] Fix | Delete
</p>
[881] Fix | Delete
<?php endif; ?>
[882] Fix | Delete
</div>
[883] Fix | Delete
<?php endif; // End Application Passwords. ?>
[884] Fix | Delete
[885] Fix | Delete
<?php
[886] Fix | Delete
if ( IS_PROFILE_PAGE ) {
[887] Fix | Delete
/**
[888] Fix | Delete
* Fires after the 'Application Passwords' section is loaded on the 'Profile' editing screen.
[889] Fix | Delete
*
[890] Fix | Delete
* The action only fires if the current user is editing their own profile.
[891] Fix | Delete
*
[892] Fix | Delete
* @since 2.0.0
[893] Fix | Delete
*
[894] Fix | Delete
* @param WP_User $profile_user The current WP_User object.
[895] Fix | Delete
*/
[896] Fix | Delete
do_action( 'show_user_profile', $profile_user );
[897] Fix | Delete
} else {
[898] Fix | Delete
/**
[899] Fix | Delete
* Fires after the 'Application Passwords' section is loaded on 'Edit User' screen.
[900] Fix | Delete
*
[901] Fix | Delete
* The action only fires if the current user is editing another user's profile.
[902] Fix | Delete
*
[903] Fix | Delete
* @since 2.0.0
[904] Fix | Delete
*
[905] Fix | Delete
* @param WP_User $profile_user The current WP_User object.
[906] Fix | Delete
*/
[907] Fix | Delete
do_action( 'edit_user_profile', $profile_user );
[908] Fix | Delete
}
[909] Fix | Delete
?>
[910] Fix | Delete
[911] Fix | Delete
<?php
[912] Fix | Delete
/**
[913] Fix | Delete
* Filters whether to display additional capabilities for the user.
[914] Fix | Delete
*
[915] Fix | Delete
* The 'Additional Capabilities' section will only be enabled if
[916] Fix | Delete
* the number of the user's capabilities exceeds their number of
[917] Fix | Delete
* roles.
[918] Fix | Delete
*
[919] Fix | Delete
* @since 2.8.0
[920] Fix | Delete
*
[921] Fix | Delete
* @param bool $enable Whether to display the capabilities. Default true.
[922] Fix | Delete
* @param WP_User $profile_user The current WP_User object.
[923] Fix | Delete
*/
[924] Fix | Delete
$display_additional_caps = apply_filters( 'additional_capabilities_display', true, $profile_user );
[925] Fix | Delete
?>
[926] Fix | Delete
[927] Fix | Delete
<?php if ( count( $profile_user->caps ) > count( $profile_user->roles ) && ( true === $display_additional_caps ) ) : ?>
[928] Fix | Delete
<h2><?php _e( 'Additional Capabilities' ); ?></h2>
[929] Fix | Delete
[930] Fix | Delete
<table class="form-table" role="presentation">
[931] Fix | Delete
<tr class="user-capabilities-wrap">
[932] Fix | Delete
<th scope="row"><?php _e( 'Capabilities' ); ?></th>
[933] Fix | Delete
<td>
[934] Fix | Delete
<?php
[935] Fix | Delete
$output = '';
[936] Fix | Delete
foreach ( $profile_user->caps as $cap => $value ) {
[937] Fix | Delete
if ( ! $wp_roles->is_role( $cap ) ) {
[938] Fix | Delete
if ( '' !== $output ) {
[939] Fix | Delete
$output .= ', ';
[940] Fix | Delete
}
[941] Fix | Delete
[942] Fix | Delete
if ( $value ) {
[943] Fix | Delete
$output .= $cap;
[944] Fix | Delete
} else {
[945] Fix | Delete
/* translators: %s: Capability name. */
[946] Fix | Delete
$output .= sprintf( __( 'Denied: %s' ), $cap );
[947] Fix | Delete
}
[948] Fix | Delete
}
[949] Fix | Delete
}
[950] Fix | Delete
echo $output;
[951] Fix | Delete
?>
[952] Fix | Delete
</td>
[953] Fix | Delete
</tr>
[954] Fix | Delete
</table>
[955] Fix | Delete
<?php endif; // End Display Additional Capabilities. ?>
[956] Fix | Delete
[957] Fix | Delete
<input type="hidden" name="action" value="update" />
[958] Fix | Delete
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr( $user_id ); ?>" />
[959] Fix | Delete
[960] Fix | Delete
<?php submit_button( IS_PROFILE_PAGE ? __( 'Update Profile' ) : __( 'Update User' ) ); ?>
[961] Fix | Delete
[962] Fix | Delete
</form>
[963] Fix | Delete
</div>
[964] Fix | Delete
<?php
[965] Fix | Delete
break;
[966] Fix | Delete
}
[967] Fix | Delete
?>
[968] Fix | Delete
<script type="text/javascript">
[969] Fix | Delete
if (window.location.hash == '#password') {
[970] Fix | Delete
document.getElementById('pass1').focus();
[971] Fix | Delete
}
[972] Fix | Delete
</script>
[973] Fix | Delete
[974] Fix | Delete
<script type="text/javascript">
[975] Fix | Delete
jQuery( function( $ ) {
[976] Fix | Delete
var languageSelect = $( '#locale' );
[977] Fix | Delete
$( 'form' ).on( 'submit', function() {
[978] Fix | Delete
/*
[979] Fix | Delete
* Don't show a spinner for English and installed languages,
[980] Fix | Delete
* as there is nothing to download.
[981] Fix | Delete
*/
[982] Fix | Delete
if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
[983] Fix | Delete
$( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' );
[984] Fix | Delete
}
[985] Fix | Delete
});
[986] Fix | Delete
} );
[987] Fix | Delete
</script>
[988] Fix | Delete
[989] Fix | Delete
<?php if ( isset( $application_passwords_list_table ) ) : ?>
[990] Fix | Delete
<script type="text/html" id="tmpl-new-application-password">
[991] Fix | Delete
<div class="notice notice-success is-dismissible new-application-password-notice" role="alert">
[992] Fix | Delete
<p class="application-password-display">
[993] Fix | Delete
<label for="new-application-password-value">
[994] Fix | Delete
<?php
[995] Fix | Delete
printf(
[996] Fix | Delete
/* translators: %s: Application name. */
[997] Fix | Delete
__( 'Your new password for %s is:' ),
[998] Fix | Delete
'<strong>{{ data.name }}</strong>'
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function