Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: user_new_form

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
321  *
322  * Passes a contextual string to make both types of new user forms
323  * uniquely targetable. Contexts are 'add-existing-user' (Multisite),
324  * and 'add-new-user' (single site and network admin).
325  *
326  * @since 3.7.0
327  *
328  * @param string $type A contextual string specifying which type of new user form the hook follows.
329  */
330 do_action( 'user_new_form', 'add-existing-user' );
331 ?>
332 <?php submit_button( __( 'Add Existing User' ), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?>
333 </form>
334 <?php
335 } // is_multisite()
336
337 if ( current_user_can( 'create_users') ) {
338      if ( $do_both )
339           echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>';
 
Line Code
449      <tr>
450           <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
451           <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td>
452      </tr>
453      <?php } ?>
454 </table>
455
456 <?php
457 /** This action is documented in wp-admin/user-new.php */
458 do_action( 'user_new_form', 'add-new-user' );
459 ?>
460
461 <?php submit_button( __( 'Add New User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?>
462
463 </form>
464 <?php } // current_user_can('create_users') ?>
465 </div>
466 <?php
467 include( ABSPATH . 'wp-admin/admin-footer.php' );