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
497       *
498       * Passes a contextual string to make both types of new user forms
499       * uniquely targetable. Contexts are 'add-existing-user' (Multisite),
500       * and 'add-new-user' (single site and network admin).
501       *
502       * @since 3.7.0
503       *
504       * @param string $type A contextual string specifying which type of new user form the hook follows.
505       */
506      do_action( 'user_new_form', 'add-existing-user' );
507      ?>
508      <?php submit_button( __( 'Add Existing User' ), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?>
509 </form>
510      <?php
511 } // End if is_multisite().
512
513 if ( current_user_can( 'create_users' ) ) {
514      if ( $do_both ) {
515           echo '<h2 id="create-new-user">' . __( 'Add User' ) . '</h2>';
 
Line Code
655                <input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> />
656                <label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation' ); ?></label>
657           </td>
658      </tr>
659      <?php } ?>
660 </table>
661
662      <?php
663      /** This action is documented in wp-admin/user-new.php */
664      do_action( 'user_new_form', 'add-new-user' );
665      ?>
666
667      <?php submit_button( __( 'Add User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?>
668
669 </form>
670 <?php } // End if current_user_can( 'create_users' ). ?>
671 </div>
672 <?php
673 require_once ABSPATH . 'wp-admin/admin-footer.php';