How can i create a function to get youtube video time

The following are the functions that I use to extract data from a YouTube response to wp_remote_get. It’s just the basic stuff, you’ll have to adjust, complement and integrate into your code. add_action( ‘save_post’, ‘brsfl_save_postdata’ ); function brsfl_save_postdata( $post_id ) { // IMPORTANT! // Check for DOING_AUTOSAVE and wp_verify_nonce() $consult = brsfl_yt_api( $_POST[‘yt_id’] ); if( … Read more

Any way to use a custom Parameter for youtube embed without using an iframe?

No need for a plugin, You can simply use the Oembed class’s oembed_result filter hook like this: function Oembed_youtube_no_title($html,$url,$args){ $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $id); if (isset($id[‘v’])) { return ‘<iframe width=”‘.$args[‘width’].'” height=”‘.$args[‘height’].'” src=”http://www.youtube.com/embed/’.$id[‘v’].’?rel=0&showinfo=0″ frameborder=”0″ allowfullscreen></iframe>’; } return $html; } add_filter(‘oembed_result’,’Oembed_youtube_no_title’,10,3); so just paste this code in your theme’s functions.php file, setup the width and height … Read more

Youtube – Embed as IFRAME

If you don’t want to utilize the latest oembed functions and want the old iframe way from any page or post, you can do these: Get the embed code from any youtube video. While editing/creating your post/page, select the Text(HTML) mode of the editor Simply paste the embed code As noted by PayteR, this will … Read more

Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer

You can filter the HTML output for oEmbed with oembed_result. Now test the HTTP host of the URL for www.youtube.com and add the parameter. The oEmbed result is cached in a post meta field to avoid too many requests. To update old posts I have added an activation helper that clears those cached content for … Read more

add_filter to youtube embeds?

Yes, there is a filter for Oembeds. Two (or even more) in fact: oembed_result will be called before it is put in the cache (so only once per external embed), and embed_oembed_html after the cache (so every time the item is displayed). If you only need to modify it once, oembed_result is probably your friend. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)