/**
* Display a video thumbnail
*
* Display a thumbnail of a video
*
* @since	2.0
*
* @uses		vye_get_parameters			Extract parameters from a string
* @uses		vye_generate_thumbnail_code	Get the thumbnail code
*
* @param    string		$content		YouTube video ID
* @param    string		$paras			Parameters
* @param    string		$style			CSS information
* @param    string		$alt			Alt text
* @parm     string      $nolink         Whether to add a link or not
*/
function youtube_thumb_embed($content, $paras = '', $style = '', $alt = '', $nolink = '')
{
    $class = vye_get_parameters($paras, 'class');
    $rel = vye_get_parameters($paras, 'rel');
    $target = vye_get_parameters($paras, 'target');
    $width = vye_get_parameters($paras, 'width');
    $height = vye_get_parameters($paras, 'height');
    $version = vye_get_parameters($paras, 'version');
    echo vye_generate_thumbnail_code($content, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink);
    return;
}
Exemple #2
0
/**
* Return a thumbnail URL
*
* Shortcode to return the URL for a thumbnail
*
* @since	2.0
*
* @uses		vye_generate_thumbnail_code	Generate the thumbnail code
*
* @param    string		$paras			Shortcode parameters
* @param	string		$content		Shortcode content
* @return   string						YouTube thumbnail code
*/
function vye_thumbnail_sc($paras = '', $content = '')
{
    extract(shortcode_atts(array('style' => '', 'class' => '', 'rel' => '', 'target' => '', 'width' => '', 'height' => '', 'alt' => '', 'version' => '', 'nolink' => ''), $paras));
    return do_shortcode(vye_generate_thumbnail_code($content, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink));
}