Ticket #21223: 21223.3.diff
File 21223.3.diff, 3.9 KB (added by , 12 years ago) |
---|
-
wp-admin/network/site-users.php
249 249 <?php do_action( 'network_site_users_after_list_table', '' );?> 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' ); ?> 261 255 <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> … … 265 259 <td><input type="text" class="regular-text wp-suggest-user" name="newuser" id="newuser" /></td> 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 ?> 278 271 </select></td> 279 272 </tr> 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' ); ?> 290 283 <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> … … 298 291 <td><input type="text" class="regular-text" name="user[email]" /></td> 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 ?> 311 303 </select></td> … … 315 307 </tr> 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; ?> 321 313 </div>