Add new action 'delete_user_form' in `wp-admin/users.php` and `wp-admin/network/users.php`.

Props SergeyBiryukov, usermrpapa.
Fixes #27230.

Built from https://develop.svn.wordpress.org/trunk@28885


git-svn-id: http://core.svn.wordpress.org/trunk@28684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-06-28 04:43:16 +00:00
parent 0289b98648
commit 9f1eb2b13e
2 changed files with 13 additions and 0 deletions

View File

@ -77,6 +77,9 @@ function confirm_delete_users( $users ) {
}
}
/** This action is documented in wp-admin/users.php */
do_action( 'delete_user_form', $current_user );
submit_button( __('Confirm Deletion'), 'delete' );
?>
</form>

View File

@ -244,6 +244,16 @@ case 'delete':
<?php echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?></li>
</ul></fieldset>
<?php
/**
* Fires at the end of the delete users form prior to the confirm button.
*
* @since 4.0.0
*
* @param WP_User $current_user WP_User object for the user being deleted.
*/
do_action( 'delete_user_form', $current_user );
?>
<input type="hidden" name="action" value="dodelete" />
<?php submit_button( __('Confirm Deletion'), 'secondary' ); ?>
<?php else : ?>