HI,
for buddypress profiles I have no idea, for listings you could try this in your functions.php :
function remove_links_from_post($post){
$post_content = stripslashes($post["post_content"]);
if(!preg_match_all("/(<a.*>)(.*)(</a>)/ismU",$post_content,$outbound_links,PREG_SET_ORDER)){
return $post;
}
foreach($outbound_links as $key => $value){
preg_match("/hrefs*=s*['|"]s*(.*)s*['|"]/i",$value[1],$href);
if((substr($href[1],0,7)!="http://" && substr($href[1],0,8)!="https://") || substr($href[1],0,strlen(get_bloginfo("url")))==get_bloginfo("url")){
unset($outbound_links[$key]);
}else{
$post_content = str_replace($outbound_links[$key][0],$outbound_links[$key][2],$post_content);
}
}
$post["post_content"] = addslashes($post_content);
return $post;
}
add_filter("wp_insert_post_data", "remove_links_from_post");
Haven’t tested it, so I can’t guarantee that it’ll work. If it does work, it will not remove links from old posts.
There is no way to do that. Please let us know how this worked for you.
Thanks
p.s. this will remove links from blog posts too… just FYI