Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: show_network_site_users_add_existing_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
165 add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) );
166
167 $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
168 $title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
169 $title = sprintf( __('Edit Site: %s'), $site_url_no_http );
170
171 $parent_file = 'sites.php';
172 $submenu_file = 'sites.php';
173
174 if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) )
175      wp_enqueue_script( 'user-suggest' );
176
177 require('../admin-header.php'); ?>
178
179 <script type='text/javascript'>
180 /* <![CDATA[ */
181 var current_site_id = <?php echo $id; ?>;
182 /* ]]> */
183 </script>
 
Line Code
247      <?php wp_nonce_field( 'edit-site' ); ?>
248      <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
249
250 <?php $wp_list_table->display(); ?>
251
252 </form>
253
254 <?php do_action( 'network_site_users_after_list_table', '' );?>
255
256 <?php if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>
257 <h4 id="add-user"><?php _e('Add User to This Site') ?></h4>
258      <?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
259 <p><?php _e( 'You may add from existing network users, or set up a new user to add to this site.' ); ?></p>
260      <?php else : ?>
261 <p><?php _e( 'You may add from existing network users to this site.' ); ?></p>
262      <?php endif; ?>
263 <h5 id="add-existing-user"><?php _e('Add Existing User') ?></h5>
264 <form action="site-users.php?action=adduser" id="adduser" method="post">
265      <?php wp_nonce_field( 'edit-site' ); ?>