Changeset 25470
- Timestamp:
- 09/17/2013 08:32:07 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-new.php
r24992 r25470 112 112 } 113 113 } else { 114 // Adding a new user to this blog114 // Adding a new user to this site 115 115 $user_details = wpmu_validate_user_signup( $_REQUEST[ 'user_login' ], $_REQUEST[ 'email' ] ); 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 $new_user_login = apply_filters('pre_user_login', sanitize_user(wp_unslash($_REQUEST['user_login']), true)); 119 /** 120 * Filter the user_login, aka the username, before it is added to the site. 121 * 122 * @since 3.0.0 123 * 124 * @param string $_REQUEST['user_login'] The sanitized username. 125 */ 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 … … 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.0 195 * 196 * @param bool True or false, based on if you enable auto-complete for non-super admins. Default is false. 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 ) ) … … 267 281 } 268 282 ?> 283 <?php 284 /** 285 * Fires inside the adduser form tag. 286 * 287 * @since 3.0.0 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" /> … … 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" /> … … 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 1.5.1 370 * 371 * @param bool True or false, based on if you want to show the password fields. Default is true. 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>
Note: See TracChangeset
for help on using the changeset viewer.