Reply To: This script blocks oEmbed
sorry this is the exact code:
function content_magic($content) {
$content = get_the_content();
$m= preg_match_all(‘!http://a-z0-9\-\.\/]+\.(?:jpeg|jpg|png|gif)!Ui’ , $content , $matches);
if ($m) {
$links=$matches[0];
for ($j=0;$j<$m;$j++) {
$content=str_replace($links[$j],''‘,$content);
}
}
return $content;
}
add_filter(‘the_content’,’content_magic’);