Re: Excluding certain blogs from bp_has_site_blogs() function
I hooked it up here locally. I see what you mean. Its because we have to reset all the array keys to start at zero and have no gaps. The template loop stuff is funny like that.
$my_excluded = array();
for ($i = 0; $i < count($this->blogs['blogs'])-1; $i++){
if (in_array($this->blogs['blogs'][$i]->blog_id, $my_excluded)){
unset($this->blogs['blogs'][$i]);
$this->blogs['total'] = ((int)$this->blogs['total'])-1;
}
}
$this->blogs['blogs'] = array_merge( array(), $this->blogs['blogs'] );
The last bit with the array_merge() does that.