Skip to content
This repository has been archived by the owner on Dec 5, 2018. It is now read-only.

Commit

Permalink
Add user_new_form_tag and user_new_form actions. See #6
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Mar 26, 2015
1 parent 54e90a1 commit 9df64ff
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion includes/simple-user-adding-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@
}
?>

<form action="<?php echo admin_url( 'admin-post.php' ); ?>" method="post" name="sua_createuser" id="sua_createuser" novalidate>
<form action="<?php echo admin_url( 'admin-post.php' ); ?>" method="post" name="sua_createuser" id="sua_createuser" novalidate <?php
/**
* Fires inside the adduser form tag.
*
* @since 1.0.0
*/
do_action( 'user_new_form_tag' );
?>>
<table class="form-table">
<tr class="form-required">
<th scope="row">
Expand Down Expand Up @@ -146,6 +153,21 @@
</tr>
</table>

<?php
/**
* Fires at the end of the new user form.
*
* Passes a contextual string to make both types of new user forms
* uniquely targetable. Contexts are 'add-existing-user' (Multisite),
* and 'add-new-user' (single site and network admin).
*
* @since 1.0.0
*
* @param string $type A contextual string specifying which type of new user form the hook follows.
*/
do_action( 'user_new_form', 'add-existing-user' );
?>

<input type="hidden" name="action" value="simple_user_adding">
<?php wp_nonce_field( 'simple-user-adding', 'simple_user_adding_nonce' ); ?>
<?php submit_button( __( 'Add New User', 'simple-user-adding' ), 'primary', 'submit' ); ?>
Expand Down

0 comments on commit 9df64ff

Please sign in to comment.