How to overwrite youtube embed?

Taking a closer look at the code provided on that site, it appears that the main differences with what it output by default by WordPress is the following: the iframe is wrapped with a div that has a class of embed-container there are CSS styles that are used by that class In WordPress, to wrap … Read more

How to add new embed handler not supported by oembed

Registering a custom embed handler Here’s an example how we can use the wp_embed_register_handler() function in your case: /** * Register an embed handler for myvi videos */ add_action( ‘init’, function() { wp_embed_register_handler( ‘myvi’, ‘#http://www\.myvi\.ru/watch/([a-zA-Z0-9_-]+)$#i’, // <– Adjust this to your needs! ‘myvi_embed_handler’ ); } ); Here we constructed the regular expression in a way … Read more

Show Video in Excerpt

filtering the_excerpt() If you remove_filter( ‘get_the_excerpt’, ‘wp_trim_excerpt’ ) and add your own get_the_excerpt filter you can do this. The default filter (wp_trim_excerpt()) can be found on line 2023 of /wp-includes/formatting.php if you want to just modify that. The extent of what you need to do is just modifying which tags are allowed in strip_tags(). overriding … Read more

Videos via the video shortcode are always 640px wide?

That width is dictated by the $content_width global, defined by the Theme. To change it, you’ll need to hook into after_setup_theme and modify it: function wpse124075_setup_theme() { global $content_width; if ( ! isset( $content_width ) ) { $content_width = 640; // your value here, in pixels } } add_action( ‘after_setup_theme’, ‘wpse124075_setup_theme’ );

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

Managing and Playing Large videos

I just finished a Wordperss site that had a similar need for playing video. I would recommend going the Youtube route. Youtube will handle hosting, file conversions and with iframe embedding you can be sure the most devices possible will see your videos. On the WordPress side of the equation, there are many helpful plugins … Read more

getting video dimensions

php-flvinfo and php-mp4info are php classes for reading flv and mp4 metadata. you could read it on the fly, or it may be possible to hook a save to get this info in the db somewhere.

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