Saturday, 15 May 2010

function - Adding parameters to vimeo videos via wordpress oembed -



function - Adding parameters to vimeo videos via wordpress oembed -

i'm trying add together parameters vimeo video's embedden via wordpress' oembed. i've managed youtube video's code below. utilize function in functions.php , works charm. i've edited code same vimeo video's, can't seem create work.

this code:

function oembed_vimeo_no_title($html,$url,$args){ // run vimeo embeds if ( !strstr($url, 'vimeo.com') ) homecoming $html; $url_string = parse_url($url, php_url_query); parse_str($url_string, $id); if (isset($id['v'])) { homecoming '<div id="video_full_width"><iframe width="100%" height="394" src="//player.vimeo.com/video/'.$id['v'].'?title=0&amp;byline=0&amp;portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>'; } homecoming $html; } add_filter('oembed_result','oembed_vimeo_no_title',10,3);

any suggestion on i'm doing wrong?

wordpress function vimeo oembed

No comments:

Post a Comment