WordPress通过get_sites()获取站点信息

$subsites = get_sites();
foreach( $subsites as $subsite ) {
$subsite_id = get_object_vars($subsite)["blog_id"];
$subsite_name = get_blog_details($subsite_id)->blogname;
echo 'Site ID/Name: ' . $subsite_id . ' / ' . $subsite_name . '\n';
}