A ver si esto funciona:
Código PHP:
Ver originalfunction youtubeIframe($url) {
$code = '';
$match = preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $matches); if((int) $match > 0) {
$video = $matches[0];
$code .= "<iframe class=\"youtube-player\" type=\"text/html\" width=\"640\" height=\"480\" ";
$code .= "src=\"http://www.youtube.com/embed/$video\" frameborder=\"0\"></iframe>\n";
}
return $code;
}