mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Add new action 'delete_user_form' in wp-admin/users.php and wp-admin/network/users.php.
Props SergeyBiryukov, usermrpapa. Fixes #27230. git-svn-id: https://develop.svn.wordpress.org/trunk@28885 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
79b2bb391c
commit
2d56abdd2e
@ -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>
|
||||
|
||||
@ -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 : ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user