wp_delete_site example

$drop = false;
    }

    $upload_path = trim( get_option( 'upload_path' ) );

    // If ms_files_rewriting is enabled and upload_path is empty, wp_upload_dir is not reliable.     if ( $drop && get_site_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
        $drop = false;
    }

    if ( $drop ) {
        wp_delete_site( $blog_id );
    } else {
        /** This action is documented in wp-includes/ms-blogs.php */
        do_action_deprecated( 'delete_blog', array( $blog_id, false ), '5.1.0' );

        $users = get_users(
            array(
                'blog_id' => $blog_id,
                'fields'  => 'ids',
            )
        );

        
Home | Imprint | This part of the site doesn't use cookies.