Skip to content

Instantly share code, notes, and snippets.

@jamiehs
Created October 8, 2015 05:00
Show Gist options
  • Save jamiehs/8ea302086e8e0b48ac38 to your computer and use it in GitHub Desktop.
Save jamiehs/8ea302086e8e0b48ac38 to your computer and use it in GitHub Desktop.
Force https for the scheme-relative URLs in Fluid Video Embeds (requires 1.2.9 or higher)
<?php // only keep the opening PHP tag if your functions.php doesn't have one.
// Filter the iframe URL for Vimeo
add_filter( 'fve_vimeo_iframe_url', 'fve_vimeo_iframe_url', 10, 2 );
function fve_vimeo_iframe_url( $vimeo_iframe_url, $video_meta ) {
return 'https://player.vimeo.com/video/' . $video_meta['id'] . '?portrait=0&byline=0&title=0';
}
// Filter the permalink for Vimeo
add_filter( 'fve_vimeo_permalink', 'fve_vimeo_permalink', 10, 2 );
function fve_vimeo_permalink( $vimeo_permalink, $video_meta ) {
return 'https://vimeo.com/' . $video_meta['id'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment