Forked from tomhemsley/gist:c7f13eafa3b28833f078
Last active
August 29, 2015 14:15
-
-
Save jeffreyd00/499d27b9bc5c483985aa to your computer and use it in GitHub Desktop.
Meta Slider Video Background with Poster Image Support
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']); // this stop video auto playing - remove this when site goes live | |
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