Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function getNetworkSites($excludeddomains="") {
	
	global $wpdb;
		
	$sites = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_blogs WHERE blog_id != '1' AND archived = '0' AND mature = 0 AND spam = 0 AND deleted = 0 ORDER BY blog_id" ) );
		
	foreach((array)$sites as $s) {
		if (!@in_array($s->domain.$s->path,$excludeddomains)) {
			$sites2[] = $s;
		}
	}

	return $sites2;
}