Changeset 21854
- Timestamp:
- 09/15/2012 07:38:23 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network/site-users.php
r21414 r21854 239 239 <?php $wp_list_table->views(); ?> 240 240 241 <form method="post" action="site-users.php?action=update-site" >241 <form method="post" action="site-users.php?action=update-site" class="site-users"> 242 242 <?php wp_nonce_field( 'edit-site' ); ?> 243 243 <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> … … 250 250 251 251 <?php if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?> 252 <h4 id="add-user"><?php _e('Add User to This Site') ?></h4> 253 <?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?> 254 <p><?php _e( 'You may add from existing network users, or set up a new user to add to this site.' ); ?></p> 255 <?php else : ?> 256 <p><?php _e( 'You may add from existing network users to this site.' ); ?></p> 257 <?php endif; ?> 258 <h5 id="add-existing-user"><?php _e('Add Existing User') ?></h5> 252 <h3 id="add-existing-user"><?php _e( 'Add Existing User' ); ?></h3> 259 253 <form action="site-users.php?action=adduser" id="adduser" method="post"> 260 254 <?php wp_nonce_field( 'edit-site' ); ?> … … 266 260 </tr> 267 261 <tr> 268 <th scope="row"><?php _e( 'Role' ); ?></th>262 <th scope="row"><?php _e( 'Role' ); ?></th> 269 263 <td><select name="new_role" id="new_role_0"> 270 264 <?php 271 265 reset( $editblog_roles ); 272 foreach ( $editblog_roles as $role => $role_assoc ) {266 foreach ( $editblog_roles as $role => $role_assoc ) { 273 267 $name = translate_user_role( $role_assoc['name'] ); 274 $selected = ( $role == $default_role ) ? 'selected="selected"' : ''; 275 echo '<option ' . $selected . ' value="' . esc_attr( $role ) . '">' . esc_html( $name ) . '</option>'; 268 echo '<option ' . selected( $default_role, $role, false ) . ' value="' . esc_attr( $role ) . '">' . esc_html( $name ) . '</option>'; 276 269 } 277 270 ?> … … 280 273 </table> 281 274 <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> 282 <?php submit_button( __( 'Add User'), 'primary', 'add-user', false, array( 'id' => 'submit-add-existing-user' ) ); ?>275 <?php submit_button( __( 'Add User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-existing-user' ) ); ?> 283 276 </form> 284 277 <?php endif; ?> 285 278 286 279 <?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?> 287 <h 5 id="add-new-user"><?php _e('Add New User') ?></h5>280 <h3 id="add-new-user"><?php _e( 'Add New User' ); ?></h3> 288 281 <form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post"> 289 282 <?php wp_nonce_field( 'edit-site' ); ?> … … 299 292 </tr> 300 293 <tr> 301 <th scope="row"><?php _e( 'Role' ); ?></th>294 <th scope="row"><?php _e( 'Role' ); ?></th> 302 295 <td><select name="new_role" id="new_role_0"> 303 296 <?php 304 297 reset( $editblog_roles ); 305 foreach ( $editblog_roles as $role => $role_assoc ) {298 foreach ( $editblog_roles as $role => $role_assoc ) { 306 299 $name = translate_user_role( $role_assoc['name'] ); 307 $selected = ( $role == $default_role ) ? 'selected="selected"' : ''; 308 echo '<option ' . $selected . ' value="' . esc_attr( $role ) . '">' . esc_html( $name ) . '</option>'; 300 echo '<option ' . selected( $default_role, $role, false ) . ' value="' . esc_attr( $role ) . '">' . esc_html( $name ) . '</option>'; 309 301 } 310 302 ?> … … 316 308 </table> 317 309 <?php wp_nonce_field( 'add-user', '_wpnonce_add-new-user' ) ?> 318 <?php submit_button( __( 'Add New User'), 'primary', 'add-user', false, array( 'id' => 'submit-add-user' ) ); ?>310 <?php submit_button( __( 'Add New User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-user' ) ); ?> 319 311 </form> 320 312 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.