WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
226 | echo '<h3 id="add-existing-user">' . __('Add Existing User') . '</h3>'; |
227 | if ( !is_super_admin() ) { |
228 | _e( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); |
229 | $label = __('E-mail'); |
230 | } else { |
231 | _e( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); |
232 | $label = __('E-mail or Username'); |
233 | } |
234 | ?> |
235 | <form action="" method="post" name="adduser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>> |
236 | <input name="action" type="hidden" value="adduser" /> |
237 | <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> |
238 |
|
239 | <table class="form-table"> |
240 | <tr class="form-field form-required"> |
241 | <th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th> |
242 | <td><input name="email" type="text" id="adduser-email" value="" /></td> |
243 | </tr> |
244 | <tr class="form-field"> |
Line | Code |
259 | </form> |
260 | <?php |
261 | } // is_multisite() |
262 |
|
263 | if ( current_user_can( 'create_users') ) { |
264 | if ( $do_both ) |
265 | echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>'; |
266 | ?> |
267 | <p><?php _e('Create a brand new user and add it to this site.'); ?></p> |
268 | <form action="" method="post" name="createuser" id="createuser" class="add:users: validate"<?php do_action('user_new_form_tag');?>> |
269 | <input name="action" type="hidden" value="createuser" /> |
270 | <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?> |
271 | <?php |
272 | // Load up the passed data, else set to a default. |
273 | foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', |
274 | 'email' => 'email', 'url' => 'uri', 'role' => 'role', 'send_password' => 'send_password', 'noconfirmation' => 'ignore_pass' ) as $post_field => $var ) { |
275 | $var = "new_user_$var"; |
276 | if( isset( $_POST['createuser'] ) ) { |
277 | if ( ! isset($$var) ) |