PorFavorDama adlı üyeden alıntı
hayır hocam wordpress link ten bakabilirsinz.youtube iframe kodları
function parse_youtube_url($url){
$pattern =
'%^# Match any youtube URL
(?:https?://)? # Optional scheme. Either http or https
(?:www\.)? # Optional www subdomain
(?: # Group host alternatives
youtu\.be/ # Either youtu.be,
| youtube\.com # or youtube.com
(?: # Group path alternatives
/embed/ # Either /embed/
| /v/ # or /v/
| /watch\?v= # or /watch\?v=
) # End path alternatives.
) # End host alternatives.
([\w-]{10,12}) # Allow 10-12 for 11 char youtube id.
$%x'
;
$result = preg_match($pattern, $url, $matches);
if (false !== $result) {
return $matches[1];
}
return false;
}
function video_source( $param , $content=null) {
$content = parse_youtube_url($content);
return "";
}
http://kbubilisim.com/wp-content/plugins/youtube-embed-plus/scripts/ytprefs.min.js?ver=3.8.1