confirm_delete_users example

$id = (int) $_GET['id'];
            if ( $id > 1 ) {
                $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays.
                // Used in the HTML title tag.                 $title       = __( 'Users' );
                $parent_file = 'users.php';

                require_once ABSPATH . 'wp-admin/admin-header.php';

                echo '<div class="wrap">';
                confirm_delete_users( $_POST['allusers'] );
                echo '</div>';

                require_once ABSPATH . 'wp-admin/admin-footer.php';
            } else {
                wp_redirect( network_admin_url( 'users.php' ) );
            }
            exit;

        case 'allusers':
            if ( ! current_user_can( 'manage_network_users' ) ) {
                wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
            }
Home | Imprint | This part of the site doesn't use cookies.