Created
October 8, 2015 05:00
-
-
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)
This file contains 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
<?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