Ticket #25229: user-new.diff
File user-new.diff, 2.8 KB (added by , 11 years ago) |
---|
-
wp-admin/user-new.php
116 116 if ( is_wp_error( $user_details[ 'errors' ] ) && !empty( $user_details[ 'errors' ]->errors ) ) { 117 117 $add_user_errors = $user_details[ 'errors' ]; 118 118 } else { 119 /** 120 * Filter the user_login (aka the username) 121 * 122 * @since Unknown 123 * 124 * @param string $_REQUEST['user_login'] The sanitzed username. 125 */ 119 126 $new_user_login = apply_filters('pre_user_login', sanitize_user(wp_unslash($_REQUEST['user_login']), true)); 120 127 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { 121 128 add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email … … 181 188 wp_enqueue_script('wp-ajax-response'); 182 189 wp_enqueue_script('user-profile'); 183 190 191 /** 192 * Allows you to enable user auto-complete for non-super admins in multisite 193 * 194 * @since 3.4 195 * 196 * @param bool True or false, based on if you enable auto-complete for non-super admins 197 */ 184 198 if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' ) 185 199 && ( is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) ) 186 200 ) { … … 266 280 $label = __('E-mail or Username'); 267 281 } 268 282 ?> 283 <?php 284 /** 285 * Adds additional tags to the adduser form 286 * 287 * @since Unknown 288 */ 289 ?> 269 290 <form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action('user_new_form_tag');?>> 270 291 <input name="action" type="hidden" value="adduser" /> 271 292 <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> … … 299 320 echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>'; 300 321 ?> 301 322 <p><?php _e('Create a brand new user and add them to this site.'); ?></p> 323 <?php 324 //duplicate_hook 325 ?> 302 326 <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>> 303 327 <input name="action" type="hidden" value="createuser" /> 304 328 <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?> … … 338 362 <th scope="row"><label for="url"><?php _e('Website') ?></label></th> 339 363 <td><input name="url" type="text" id="url" class="code" value="<?php echo esc_attr($new_user_uri); ?>" /></td> 340 364 </tr> 341 <?php if ( apply_filters('show_password_fields', true) ) : ?> 365 <?php 366 /** 367 * Filter the display of the password fields 368 * 369 * @since Unknown 370 * 371 * @param bool True or false, based on if you want to show the password fields 372 */ 373 if ( apply_filters('show_password_fields', true) ) : ?> 342 374 <tr class="form-field form-required"> 343 375 <th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php /* translators: password input field */_e('(required)'); ?></span></label></th> 344 376 <td>