Skip to content

Instantly share code, notes, and snippets.

@jeffreyd00
Forked from tomhemsley/gist:c7f13eafa3b28833f078
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffreyd00/499d27b9bc5c483985aa to your computer and use it in GitHub Desktop.
Save jeffreyd00/499d27b9bc5c483985aa to your computer and use it in GitHub Desktop.
Meta Slider Video Background with Poster Image Support
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