Skip to content

Instantly share code, notes, and snippets.

@nciske
Created May 26, 2015 21:43
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 nciske/5906d0d7001f32c89d5a to your computer and use it in GitHub Desktop.
Save nciske/5906d0d7001f32c89d5a to your computer and use it in GitHub Desktop.
Clean Vimeo oEmbeds
<?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