Edit File by line
/home/zeestwma/ceyloniy.../wp-admin
File: user-new.php
*
[500] Fix | Delete
* @since 3.7.0
[501] Fix | Delete
*
[502] Fix | Delete
* @param string $type A contextual string specifying which type of new user form the hook follows.
[503] Fix | Delete
*/
[504] Fix | Delete
do_action( 'user_new_form', 'add-existing-user' );
[505] Fix | Delete
?>
[506] Fix | Delete
<?php submit_button( __( 'Add Existing User' ), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?>
[507] Fix | Delete
</form>
[508] Fix | Delete
<?php
[509] Fix | Delete
} // End if is_multisite().
[510] Fix | Delete
[511] Fix | Delete
if ( current_user_can( 'create_users' ) ) {
[512] Fix | Delete
if ( $do_both ) {
[513] Fix | Delete
echo '<h2 id="create-new-user">' . __( 'Add User' ) . '</h2>';
[514] Fix | Delete
}
[515] Fix | Delete
?>
[516] Fix | Delete
<p><?php _e( 'Create a brand new user and add them to this site.' ); ?></p>
[517] Fix | Delete
<form method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"
[518] Fix | Delete
<?php
[519] Fix | Delete
/** This action is documented in wp-admin/user-new.php */
[520] Fix | Delete
do_action( 'user_new_form_tag' );
[521] Fix | Delete
?>
[522] Fix | Delete
>
[523] Fix | Delete
<input name="action" type="hidden" value="createuser" />
[524] Fix | Delete
<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?>
[525] Fix | Delete
<?php
[526] Fix | Delete
// Load up the passed data, else set to a default.
[527] Fix | Delete
$creating = isset( $_POST['createuser'] );
[528] Fix | Delete
[529] Fix | Delete
$new_user_login = $creating && isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : '';
[530] Fix | Delete
$new_user_firstname = $creating && isset( $_POST['first_name'] ) ? wp_unslash( $_POST['first_name'] ) : '';
[531] Fix | Delete
$new_user_lastname = $creating && isset( $_POST['last_name'] ) ? wp_unslash( $_POST['last_name'] ) : '';
[532] Fix | Delete
$new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : '';
[533] Fix | Delete
$new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : '';
[534] Fix | Delete
$new_user_role = $creating && isset( $_POST['role'] ) ? wp_unslash( $_POST['role'] ) : '';
[535] Fix | Delete
$new_user_send_notification = $creating && ! isset( $_POST['send_user_notification'] ) ? false : true;
[536] Fix | Delete
$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unslash( $_POST['noconfirmation'] ) : '';
[537] Fix | Delete
[538] Fix | Delete
?>
[539] Fix | Delete
<table class="form-table" role="presentation">
[540] Fix | Delete
<tr class="form-field form-required">
[541] Fix | Delete
<th scope="row"><label for="user_login"><?php _e( 'Username' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
[542] Fix | Delete
<td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" autocomplete="off" maxlength="60" /></td>
[543] Fix | Delete
</tr>
[544] Fix | Delete
<tr class="form-field form-required">
[545] Fix | Delete
<th scope="row"><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
[546] Fix | Delete
<td><input name="email" type="email" id="email" value="<?php echo esc_attr( $new_user_email ); ?>" /></td>
[547] Fix | Delete
</tr>
[548] Fix | Delete
<?php if ( ! is_multisite() ) { ?>
[549] Fix | Delete
<tr class="form-field">
[550] Fix | Delete
<th scope="row"><label for="first_name"><?php _e( 'First Name' ); ?> </label></th>
[551] Fix | Delete
<td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr( $new_user_firstname ); ?>" /></td>
[552] Fix | Delete
</tr>
[553] Fix | Delete
<tr class="form-field">
[554] Fix | Delete
<th scope="row"><label for="last_name"><?php _e( 'Last Name' ); ?> </label></th>
[555] Fix | Delete
<td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr( $new_user_lastname ); ?>" /></td>
[556] Fix | Delete
</tr>
[557] Fix | Delete
<tr class="form-field">
[558] Fix | Delete
<th scope="row"><label for="url"><?php _e( 'Website' ); ?></label></th>
[559] Fix | Delete
<td><input name="url" type="url" id="url" class="code" value="<?php echo esc_attr( $new_user_uri ); ?>" /></td>
[560] Fix | Delete
</tr>
[561] Fix | Delete
<?php
[562] Fix | Delete
$languages = get_available_languages();
[563] Fix | Delete
if ( $languages ) :
[564] Fix | Delete
?>
[565] Fix | Delete
<tr class="form-field user-language-wrap">
[566] Fix | Delete
<th scope="row">
[567] Fix | Delete
<label for="locale">
[568] Fix | Delete
<?php /* translators: The user language selection field label. */ ?>
[569] Fix | Delete
<?php _e( 'Language' ); ?><span class="dashicons dashicons-translation" aria-hidden="true"></span>
[570] Fix | Delete
</label>
[571] Fix | Delete
</th>
[572] Fix | Delete
<td>
[573] Fix | Delete
<?php
[574] Fix | Delete
wp_dropdown_languages(
[575] Fix | Delete
array(
[576] Fix | Delete
'name' => 'locale',
[577] Fix | Delete
'id' => 'locale',
[578] Fix | Delete
'selected' => 'site-default',
[579] Fix | Delete
'languages' => $languages,
[580] Fix | Delete
'show_available_translations' => false,
[581] Fix | Delete
'show_option_site_default' => true,
[582] Fix | Delete
)
[583] Fix | Delete
);
[584] Fix | Delete
?>
[585] Fix | Delete
</td>
[586] Fix | Delete
</tr>
[587] Fix | Delete
<?php endif; ?>
[588] Fix | Delete
<tr class="form-field form-required user-pass1-wrap">
[589] Fix | Delete
<th scope="row">
[590] Fix | Delete
<label for="pass1">
[591] Fix | Delete
<?php _e( 'Password' ); ?>
[592] Fix | Delete
<span class="description hide-if-js"><?php _e( '(required)' ); ?></span>
[593] Fix | Delete
</label>
[594] Fix | Delete
</th>
[595] Fix | Delete
<td>
[596] Fix | Delete
<input type="hidden" value=" " /><!-- #24364 workaround -->
[597] Fix | Delete
<button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Generate password' ); ?></button>
[598] Fix | Delete
<div class="wp-pwd">
[599] Fix | Delete
<?php $initial_password = wp_generate_password( 24 ); ?>
[600] Fix | Delete
<div class="password-input-wrapper">
[601] Fix | Delete
<input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
[602] Fix | Delete
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
[603] Fix | Delete
</div>
[604] 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' ); ?>">
[605] Fix | Delete
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
[606] Fix | Delete
<span class="text"><?php _e( 'Hide' ); ?></span>
[607] Fix | Delete
</button>
[608] Fix | Delete
</div>
[609] Fix | Delete
</td>
[610] Fix | Delete
</tr>
[611] Fix | Delete
<tr class="form-field form-required user-pass2-wrap hide-if-js">
[612] Fix | Delete
<th scope="row"><label for="pass2"><?php _e( 'Repeat Password' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
[613] Fix | Delete
<td>
[614] Fix | Delete
<input type="password" name="pass2" id="pass2" autocomplete="new-password" spellcheck="false" aria-describedby="pass2-desc" />
[615] Fix | Delete
<p class="description" id="pass2-desc"><?php _e( 'Type the password again.' ); ?></p>
[616] Fix | Delete
</td>
[617] Fix | Delete
</tr>
[618] Fix | Delete
<tr class="pw-weak">
[619] Fix | Delete
<th><?php _e( 'Confirm Password' ); ?></th>
[620] Fix | Delete
<td>
[621] Fix | Delete
<label>
[622] Fix | Delete
<input type="checkbox" name="pw_weak" class="pw-checkbox" />
[623] Fix | Delete
<?php _e( 'Confirm use of weak password' ); ?>
[624] Fix | Delete
</label>
[625] Fix | Delete
</td>
[626] Fix | Delete
</tr>
[627] Fix | Delete
<tr>
[628] Fix | Delete
<th scope="row"><?php _e( 'Send User Notification' ); ?></th>
[629] Fix | Delete
<td>
[630] Fix | Delete
<input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> />
[631] Fix | Delete
<label for="send_user_notification"><?php _e( 'Send the new user an email about their account' ); ?></label>
[632] Fix | Delete
</td>
[633] Fix | Delete
</tr>
[634] Fix | Delete
<?php } // End if ! is_multisite(). ?>
[635] Fix | Delete
<?php if ( current_user_can( 'promote_users' ) ) { ?>
[636] Fix | Delete
<tr class="form-field">
[637] Fix | Delete
<th scope="row"><label for="role"><?php _e( 'Role' ); ?></label></th>
[638] Fix | Delete
<td><select name="role" id="role">
[639] Fix | Delete
<?php
[640] Fix | Delete
if ( ! $new_user_role ) {
[641] Fix | Delete
$new_user_role = get_option( 'default_role' );
[642] Fix | Delete
}
[643] Fix | Delete
wp_dropdown_roles( $new_user_role );
[644] Fix | Delete
?>
[645] Fix | Delete
</select>
[646] Fix | Delete
</td>
[647] Fix | Delete
</tr>
[648] Fix | Delete
<?php } ?>
[649] Fix | Delete
<?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?>
[650] Fix | Delete
<tr>
[651] Fix | Delete
<th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
[652] Fix | Delete
<td>
[653] Fix | Delete
<input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> />
[654] Fix | Delete
<label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation' ); ?></label>
[655] Fix | Delete
</td>
[656] Fix | Delete
</tr>
[657] Fix | Delete
<?php } ?>
[658] Fix | Delete
</table>
[659] Fix | Delete
[660] Fix | Delete
<?php
[661] Fix | Delete
/** This action is documented in wp-admin/user-new.php */
[662] Fix | Delete
do_action( 'user_new_form', 'add-new-user' );
[663] Fix | Delete
?>
[664] Fix | Delete
[665] Fix | Delete
<?php submit_button( __( 'Add User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?>
[666] Fix | Delete
[667] Fix | Delete
</form>
[668] Fix | Delete
<?php } // End if current_user_can( 'create_users' ). ?>
[669] Fix | Delete
</div>
[670] Fix | Delete
<?php
[671] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-footer.php';
[672] Fix | Delete
[673] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function