I'm looking for a way to add a DELETE button to the "Edit User" (/wp-admin/user-edit.php?user_id=???) page. This is what I have so far but I'd like to place the link next to the "Update User" button.
<?php
add_action('edit_user_profile', 'add_delete_button_to_edit_profile', 10, 1);
function add_delete_button_to_edit_profile() {
if (current_user_can('administrator')) {
echo '<a class="delete_user" href="/wp-admin/users.php?action=delete&user='.$user_id.'&_wpnonce='.$nonce.'>DELETE USER</a>';
}
}
?>