コード例 #1
0
ファイル: functions.php プロジェクト: nilmadhab/webtutplus
function video_embed($url, $width = 640, $height = 480)
{
    if (strpos($url, 'youtube')) {
        return video_youtube($url, $width, $height);
    } else {
        return video_vimeo($url, $width, $height);
    }
}
コード例 #2
0
 function adelante_video($atts)
 {
     if (isset($atts['type'])) {
         switch ($atts['type']) {
             case 'html5':
                 return video_html5($atts);
                 break;
             case 'flash':
                 return video_flash($atts);
                 break;
             case 'youtube':
                 return video_youtube($atts);
                 break;
             case 'vimeo':
                 return video_vimeo($atts);
                 break;
             case 'dailymotion':
                 return video_dailymotion($atts);
                 break;
             case 'hulu':
                 return video_hulu($atts);
                 break;
             case 'viddler':
                 return video_viddler($atts);
                 break;
         }
     }
     return '';
 }