Ejemplo n.º 1
0
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
/**
 * Template file for embed the player vimeo video
 *
 * @package Yithemes
 * @author Francesco Grasso <*****@*****.**>
 * @since 1.0.0
 */
$video_id = preg_replace('/[&|&amp;]feature=([\\w\\-]*)/', '', $video_id);
$shortcode_id = 'yit_video_' . mt_rand();
$placeholder = isset($placeholder) && $placeholder != '' ? $placeholder : 'no';
if ($placeholder == 'no') {
    YIT_Video::vimeo("id={$video_id}&width={$width}&height={$height}&echo=1");
} elseif ($placeholder == 'yes' && $placeholder_img != '') {
    ob_start();
    ?>
    <a class="yit_embedded_video" id="<?php 
    echo $shortcode_id;
    ?>
" href="//player.vimeo.com/video/<?php 
    echo $video_id;
    ?>
">
        <img src="<?php 
    echo esc_url($placeholder_img);
    ?>
"/>
    </a>