Strange multisite issue where all sites return same id with get_current_site()

When Multisite was first rolled into core (from a project call “multi-user”, which is why you’ll sometimes see references to “mu-*”), the terminology was that you’d run a site of blogs. Now we refer to a network of sites, but because the functions had all already been named, get_current_site() gets the current network.

You’ll need to use get_current_blog_id() to get the current site‘s ID, or get_bloginfo() or get_blog_details() for more detailed data on the current site.

Reference