Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: user_new_form_tag

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
281      }
282 ?>
283 <?php
284 /**
285  * Fires inside the adduser form tag.
286  *
287  * @since 3.0.0
288  */
289 ?>
290 <form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action('user_new_form_tag');?>>
291 <input name="action" type="hidden" value="adduser" />
292 <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
293
294 <table class="form-table">
295      <tr class="form-field form-required">
296           <th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th>
297           <td><input name="email" type="text" id="adduser-email" class="wp-suggest-user" value="" /></td>
298      </tr>
299      <tr class="form-field">
 
Line Code
331
332 if ( current_user_can( 'create_users') ) {
333      if ( $do_both )
334           echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>';
335 ?>
336 <p><?php _e('Create a brand new user and add them to this site.'); ?></p>
337 <?php
338 /** This action is documented in wp-admin/user-new.php */
339 ?>
340 <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>>
341 <input name="action" type="hidden" value="createuser" />
342 <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?>
343 <?php
344 // Load up the passed data, else set to a default.
345 foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_name' => 'lastname',
346                     'email' => 'email', 'url' => 'uri', 'role' => 'role', 'send_password' => 'send_password', 'noconfirmation' => 'ignore_pass' ) as $post_field => $var ) {
347      $var = "new_user_$var";
348      if( isset( $_POST['createuser'] ) ) {
349           if ( ! isset($$var) )