Last active
August 29, 2015 14:14
-
-
Save tomhemsley/c7f13eafa3b28833f078 to your computer and use it in GitHub Desktop.
Meta Slider - Add poster attribute to video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_poster_to_video( $atts, $slide_id, $slider_id, $settings, $url ) { | |
$atts['poster'] = $url; | |
unset($atts['autoplay']); // stop video auto playing | |
return $atts; | |
} | |
add_filter('metaslider_layer_video_attributes','add_poster_to_video', 10, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment