Created
May 26, 2015 21:43
-
-
Save nciske/5906d0d7001f32c89d5a to your computer and use it in GitHub Desktop.
Clean Vimeo oEmbeds
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 | |
add_filter('oembed_fetch_url','ch_add_vimeo_args',10,3); | |
function ch_add_vimeo_args($provider, $url, $args) { | |
if ( strpos($provider, '//vimeo.com/') !== false ) { | |
$args = array( | |
'title' => 0, | |
'byline' => 0, | |
'portrait' => 0, | |
'badge' => 0 | |
); | |
$provider = add_query_arg( $args, $provider ); | |
} | |
return $provider; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment