+
+ // Now count the number of external media links
+ preg_match_all("(\[vimeo\](.*?)\[\/vimeo\])ism", $body, $links1, PREG_SET_ORDER);
+ preg_match_all("(\[youtube\\](.*?)\[\/youtube\\])ism", $body, $links2, PREG_SET_ORDER);
+ preg_match_all("(\[video\\](.*?)\[\/video\\])ism", $body, $links3, PREG_SET_ORDER);
+ preg_match_all("(\[audio\\](.*?)\[\/audio\\])ism", $body, $links4, PREG_SET_ORDER);
+
+ // Add them to the other external links
+ $links = array_merge($links, $links1, $links2, $links3, $links4);
+
+ // Are there more than one?
+ if (count($links) > 1) {
+ // The post will be the type "text", which means a blog post
+ unset($post["type"]);
+ $post["url"] = $plink;
+ }
+