wp-admin/includes/ms.php:858$usersarraybool2 hooks fire while confirm_delete_users() runs, in this order:
Filters whether the users being deleted have additional content associated with them outside of the `post_author` and `link_owner` relationships.
Fires at the end of the delete users form prior to the confirm button.
function confirm_delete_users( $users ) { global $wpdb; $current_user = wp_get_current_user(); if ( ! is_array( $users ) || empty( $users ) ) { return false; } ?> <h1><?php esc_html_e( 'Delete Users' ); ?></h1> <?php if ( 1 === count( $users ) ) : ?> <p><?php _e( 'You have chosen to delete the user from all networks and sites.' ); ?></p> <?php else : ?> <p><?php _e( 'You have chosen to delete the following users from all networks and sites.' ); ?></p> <?php endif; ?> <form action="users.php?action=dodelete" method="post" class="delete-and-reassign-users-form"> <input type="hidden" name="dodelete" /> <?php wp_nonce_field( 'ms-users-delete' ); $site_admins = get_super_admins(); ?> <table class="form-table" role="presentation"> <?php foreach ( $users as $user_id ) { if ( '' !== $user_id && '0' !== $user_id ) { $delete_user = get_userdata( $user_id ); if ( ! current_user_can( 'delete_user', $delete_user->ID ) ) { wp_die( sprintf( /* translators: %s: User login. */ __( 'Warning! User %s cannot be deleted.' ), $delete_user->user_login ) ); } if ( in_array( $delete_user->user_login, $site_admins, true ) ) { wp_die( sprintf( /* translators: %s: User login. */ __( 'Warning! User cannot be deleted. The user %s is a network administrator.' ), '<em>' . $delete_user->user_login . '</em>' ) ); } ?> <tr> <th scope="row"><?php echo $delete_user->user_login; ?> <?php echo '<input type="hidden" name="user[]" value="' . esc_attr( $user_id ) . '" />' . "\n"; ?> </th> <?php $blogs = get_blogs_of_user( $user_id, true ); if ( ! empty( $blogs ) ) { ?> <td><fieldset><legend> <?php printf( /* translators: 1: User login, 2: User ID. */ __( '%1$s (ID #%2$s): What should be done with the content owned by this user?' ), '<strong>' . $delete_user->user_login . '</strong>', $user_id ); ?> </legend> <?php foreach ( (array) $blogs as $key => $details ) { $blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID' ), 'exclude' => $users, ) ); $blog_users = wp_list_pluck( $blog_users, 'ID' );Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/ms.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.