Add cap checks. do the action in php. See #15793

git-svn-id: https://develop.svn.wordpress.org/trunk@16892 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-12-13 12:08:27 +00:00
parent f76d96c609
commit 30eae8ee5c

View File

@ -215,9 +215,9 @@ endif; ?>
</form>
do_action( 'network_site_users_after_list_table', '' );
<?php do_action( 'network_site_users_after_list_table', '' );?>
<?php if ( apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>
<?php if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>
<h3 id="add-existing-user"><?php _e('Add Existing User') ?></h3>
<p><?php _e( 'Enter the username of an existing user on this network.' ) ?></p>
<form action="site-users.php?action=adduser" id="adduser" method="post">
@ -247,7 +247,7 @@ do_action( 'network_site_users_after_list_table', '' );
</form>
<?php endif; ?>
<?php if ( apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
<?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
<h3 id="add-new-user"><?php _e('Create New User') ?></h3>
<p><?php _e( 'Create a brand new user and add it to this site.' ) ?></p>
<form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post">