'',
'api_params' => '',
'autoplay' => 'no',
'center' => 'no',
'height' => 360,
'id' => '',
'width' => 600
), $args
);
extract( $defaults );
self::$args = $defaults;
if( is_ssl() ) {
$protocol = 'https';
} else {
$protocol = 'http';
}
if( $autoplay == 'true' ||
$autoplay == 'yes'
) {
$autoplay = '?autoplay=1';
} else {
$autoplay = '?autoplay=0';
}
$html = sprintf( '
',
FusionCore_Plugin::attributes( 'vimeo-shortcode' ), FusionCore_Plugin::attributes( 'vimeo-shortcode-video-sc' ), $protocol, $id, $autoplay, $api_params, $width, $height );
return $html;
}
function attr() {
$attr = array();
$attr['class'] = 'fusion-video fusion-vimeo';
if( self::$args['center'] == 'yes' ) {
$attr['class'] .= ' center-video';
} else {
$attr['style'] = sprintf( 'max-width:%spx;max-height:%spx;', self::$args['width'], self::$args['height'] );
}
if( self::$args['class'] ) {
$attr['class'] .= ' ' . self::$args['class'];
}
return $attr;
}
function video_sc_attr() {
$attr = array();
$attr['class'] = 'video-shortcode';
if( self::$args['center'] == 'yes' ) {
$attr['style'] = sprintf( 'max-width:%spx;max-height:%spx;', self::$args['width'], self::$args['height'] );
}
return $attr;
}
}
new FusionSC_Vimeo();