'100%', 'align' => 'center', 'src' => 'youtube', 'hosted' => '', 'id' => '', 'disable_for_mobile' => 'on', 'loop' => 'on', 'autoplay' => 'on', 'controls' => 'off', 'viewstart' => 'off', 'viewend' => 'off', 'caption' => '', 'overlay_content' => '', 'vidwidth' => '', 'vidheight' => '', 'poster_frame' =>'', 'force_fullwidth'=>'off', 'revealfx' => '', 'overlay_revealfx' => '' ); $atts = apply_filters( 'aesop_video_defaults', shortcode_atts( $defaults, $atts ) ); $contentwidth = 'content' == $atts['width'] ? 'aesop-content' : false; $widthstyle = $atts['width'] && 'center' !== $atts['align'] ? sprintf( 'style=width:%s;', $atts['width'] ) : sprintf( 'style=max-width:%s;', $atts['width'] ); // width constraint class if $caption = !empty( $atts['caption'] ) ? sprintf( '
%s
', $atts['align'], $widthstyle, $atts['caption'] ) : false; if ( 'vine' == $atts['src'] || 'instagram' == $atts['src'] ) { $vineStagramClass = 'aesop-vine-stagram-container'; $vineStagramAlign = $atts['align'] ? sprintf( 'aesop-vine-stagram-container-%s', $atts['align'] ) : false; } else { $vineStagramAlign = null; $vineStagramClass = null; } $loopstatus = 'on' == $atts['loop'] ? true : false; $autoplaystatus = 'on' == $atts['autoplay'] ? true : false; $disable_for_mobile = 'on' == $atts['disable_for_mobile'] ? true : false; $controlstatus = 'on' == $atts['controls'] ? 'controls-visible' : 'controls-hidden'; $iframe_height = $atts['vidheight'] ? sprintf( 'height="%s"', preg_replace( '/[^0-9]/', '', $atts['vidheight'] ) ) : sprintf( 'height=""' ); $iframe_width = $atts['vidwidth'] ? sprintf( 'width="%s"', preg_replace( '/[^0-9]/', '', $atts['vidwidth'] ) ) : sprintf( 'width=""' ); $iframe_size = sprintf( '%s %s' , $iframe_height, $iframe_width ); // custom classes $classes = function_exists( 'aesop_component_classes' ) ? aesop_component_classes( 'video', '' ) : null; // waypoint filter $point = 'bottom-in-view'; $waypoint = apply_filters( 'aesop_video_component_waypoint', $point, $unique ); if ( 'on' == $atts['viewstart'] || wp_is_mobile()) { $autoplaystatus = false; } ob_start(); do_action( 'aesop_video_before', $atts, $unique ); // action ?>
class="aesop-component aesop-video-component aesop-component-align- " >
>
> >
', esc_attr( $unique ), esc_attr( $atts['id'] ), $vmparams, esc_attr( $iframe_size ) ); if (('on' == $atts['viewstart'] || 'on' == $atts['viewend'] || 'pip' == $atts['viewend'])&& !wp_is_mobile()) { ?> ', esc_attr( $atts['id'] ), esc_attr( $iframe_size ) ); break; case 'youtube': $ytparams = $loopstatus ? sprintf ("&loop=1&playlist=%s" ,esc_attr( $atts['id'])) : ""; $ytparams = $ytparams.($autoplaystatus ? "&autoplay=1" : ""); $ytparams = $ytparams.($controlstatus=='controls-visible' ? "" : "&controls=0&showinfo=0"); printf( '', esc_attr( $unique ), esc_attr( $atts['id'] ), $ytparams, esc_attr( $iframe_size ) ); if (('on' == $atts['viewstart'] || 'on' == $atts['viewend'] || 'pip' == $atts['viewend'])&& !wp_is_mobile()) { ?> ', esc_attr( $atts['id'] ), esc_attr( $iframe_size ) ); break; case 'viddler': printf( '', esc_attr( $atts['id'] ), esc_attr( $atts['id'] ), esc_attr( $iframe_size ) ); break; case 'vine': printf( '', esc_attr( $atts['id'] ) ); break; case 'wistia': printf( '
 
', esc_attr( $atts['id'] ), esc_attr( $atts['id'] ) ); break; case 'instagram': printf( '', esc_attr( $atts['id'] ) ); break; case 'self': if (!$disable_for_mobile || !wp_is_mobile() ) { if ($atts['poster_frame']!=='') { ?>
>