Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: show_network_site_users_add_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
239
240 <?php $wp_list_table->display(); ?>
241
242 </form>
243
244 <?php do_action( 'network_site_users_after_list_table', '' );?>
245
246 <?php if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>
247 <h4 id="add-user"><?php _e('Add User to This Site') ?></h4>
248      <?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
249 <p><?php _e( 'You may add from existing network users, or set up a new user to add to this site.' ); ?></p>
250      <?php else : ?>
251 <p><?php _e( 'You may add from existing network users to this site.' ); ?></p>
252      <?php endif; ?>
253 <h5 id="add-existing-user"><?php _e('Add Existing User') ?></h5>
254 <form action="site-users.php?action=adduser" id="adduser" method="post">
255      <?php wp_nonce_field( 'edit-site' ); ?>
256      <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
257      <table class="form-table">
 
Line Code
272                ?>
273                </select></td>
274           </tr>
275      </table>
276      <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
277      <?php submit_button( __('Add User'), 'primary', 'add-user', false, array( 'id' => 'submit-add-existing-user' ) ); ?>
278 </form>
279 <?php endif; ?>
280
281 <?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
282 <h5 id="add-new-user"><?php _e('Add New User') ?></h5>
283 <form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post">
284      <?php wp_nonce_field( 'edit-site' ); ?>
285      <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
286      <table class="form-table">
287           <tr>
288                <th scope="row"><?php _e( 'Username' ) ?></th>
289                <td><input type="text" class="regular-text" name="user[username]" /></td>
290           </tr>