$add_user_errors = $user_details[ 'errors' ];
} else {
/**
- * Filter the user_login, aka the username, before it is added to the site.
+ * Filter the user_login, also known as the username, before it is added to the site.
*
- * @since 3.0.0
+ * @since 2.0.3
*
- * @param string $_REQUEST['user_login'] The sanitized username.
+ * @param string $user_login The sanitized username.
*/
$new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) );
if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {
wp_enqueue_script('user-profile');
/**
- * Allows you to enable user auto-complete for non-super admins in multisite.
+ * Filter whether to enable user auto-complete for non-super admins in Multisite.
*
* @since 3.4.0
*
- * @param bool True or false, based on if you enable auto-complete for non-super admins. Default is false.
+ * @param bool $enable Whether to enable auto-complete for non-super admins. Default false.
*/
if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' )
&& ( is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) )
}
?>
<div class="wrap">
-<?php screen_icon(); ?>
<h2 id="add-new-user"> <?php
if ( current_user_can( 'create_users' ) ) {
echo _x( 'Add New User', 'user' );
* @since 3.0.0
*/
?>
-<form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action('user_new_form_tag');?>>
+<form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action( 'user_new_form_tag' );?>>
<input name="action" type="hidden" value="adduser" />
<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
*
* @since 3.7.0
*
- * @param string A contextual string specifying which type of new user form the hook follows.
+ * @param string $type A contextual string specifying which type of new user form the hook follows.
*/
do_action( 'user_new_form', 'add-existing-user' );
?>
echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>';
?>
<p><?php _e('Create a brand new user and add them to this site.'); ?></p>
-<?php
-/** This action is documented in wp-admin/user-new.php */
-?>
-<form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>>
+<?php /** This action is documented in wp-admin/user-new.php */ ?>
+<form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action( 'user_new_form_tag' );?>>
<input name="action" type="hidden" value="createuser" />
<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?>
<?php
*
* @since 1.5.1
*
- * @param bool True or false, based on if you want to show the password fields. Default is true.
+ * @param bool $show Whether to show the password fields. Default true.
*/
if ( apply_filters( 'show_password_fields', true ) ) : ?>
<tr class="form-field form-required">