equal
deleted
inserted
replaced
153 $user_id = (int) $user_id; |
153 $user_id = (int) $user_id; |
154 |
154 |
155 // If the user doesn't already belong to the blog, bail. |
155 // If the user doesn't already belong to the blog, bail. |
156 if ( ! is_user_member_of_blog( $user_id ) ) { |
156 if ( ! is_user_member_of_blog( $user_id ) ) { |
157 wp_die( |
157 wp_die( |
158 '<h1>' . __( 'Something went wrong.' ) . '</h1>' . |
158 '<h1>' . __( 'An error occurred.' ) . '</h1>' . |
159 '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>', |
159 '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>', |
160 403 |
160 403 |
161 ); |
161 ); |
162 } |
162 } |
163 |
163 |
339 |
339 |
340 <?php |
340 <?php |
341 /** |
341 /** |
342 * Filters whether to show the Add New User form on the Multisite Users screen. |
342 * Filters whether to show the Add New User form on the Multisite Users screen. |
343 * |
343 * |
|
344 * Note: While WordPress is moving towards simplifying labels by removing "New" from "Add New X" labels, |
|
345 * we keep "Add New User" here to maintain a clear distinction from the "Add Existing User" section above. |
|
346 * |
344 * @since 3.1.0 |
347 * @since 3.1.0 |
345 * |
348 * |
346 * @param bool $bool Whether to show the Add New User form. Default true. |
349 * @param bool $bool Whether to show the Add New User form. Default true. |
347 */ |
350 */ |
348 if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : |
351 if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : |
372 <tr class="form-field"> |
375 <tr class="form-field"> |
373 <td colspan="2" class="td-full"><?php _e( 'A password reset link will be sent to the user via email.' ); ?></td> |
376 <td colspan="2" class="td-full"><?php _e( 'A password reset link will be sent to the user via email.' ); ?></td> |
374 </tr> |
377 </tr> |
375 </table> |
378 </table> |
376 <?php wp_nonce_field( 'add-user', '_wpnonce_add-new-user' ); ?> |
379 <?php wp_nonce_field( 'add-user', '_wpnonce_add-new-user' ); ?> |
377 <?php submit_button( __( 'Add New User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-user' ) ); ?> |
380 <?php submit_button( __( 'Add User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-user' ) ); ?> |
378 </form> |
381 </form> |
379 <?php endif; ?> |
382 <?php endif; ?> |
380 </div> |
383 </div> |
381 <?php |
384 <?php |
382 require_once ABSPATH . 'wp-admin/admin-footer.php'; |
385 require_once ABSPATH . 'wp-admin/admin-footer.php'; |