// Removes all duplicate posts (according to title) from all included sites across the network
$titleTemp = '';
$i = 0;
foreach ($post_list AS $post) {
$p = get_blog_post($post["blog_id"], $post["id"]);
$post_tile_compare = $p->post_title;
if ($titleTemp == $post_tile_compare) {
unset($post_list[$i]);
//echo '
Removed duplicate: '.$post_tile_compare;
unset($post_list[$i-1]);
} else if ($post["blog_id"] == 1) { // After checking for broadcasted posts, this removes root blog posts
$post_removed = get_blog_post($post["blog_id"], $post["id"])->post_title;
unset($post_list[$i]);
//echo '
Removed root site post: '.$post_removed;
}
$titleTemp = $post_tile_compare;
$i++;
}