Articles of oembed

Is there a built in function to see if a URLis oEmbed Compatible?

I want to be able to take a url and see if the domain is one of the ones WordPress supports to add embeds via oEmbed. Is there a built in function that does this in WordPress or would I need to create my own? Example: if I have a url from a video site […]

extra text in Vimeo Embedded videos

For a WordPress site I am working on, there is a jquery slider (based on the coda slider) where videos are presented. All of the videos are from Vimeo. If a video is playing and someone slides to the next video, the other video continues to play. I have found some API code from Vimeo […]

Embeding YouTube video via a template function throws iframe cross-domain policy error

I’m using WordPress 3.5 which natively supports embeds into posts and pages from many sites, YouTube included. When I embed a Youtube video directly onto a post or a page (by simply copying and pasting the video url), it works fine and no cross-domain policy errors are thrown in Chrome or Firefox. However, when I […]

Set first oembed in post to a global variable or function

I have a function that gets the first oembed in the post. I got the code from this related post. add_filter(’embed_oembed_html’, ‘my_function’,10,4); function my_function( $cache, $url, $attr, $post_ID ) { global $my_previous_post_id; if ($my_previous_post_id != $post_ID) { // post ID changed, so this is the first oembed for the post // do something with $url […]

Display oEmbed in the_excerpt

I am currently adding add_filter(‘the_excerpt’, array($wp_embed, ‘autoembed’), 9); to my functions.php file to no avail any other suggestions would be great. Also if I add $content-width to functions.php the settings are ignored. I have wp-debug on with no errors/warnings and no errors are being logged.

OEMBED seems to have stopped working

I had upgraded from 3.0 to 3.1 and oembed worked normally. All of a sudden I’ve lost embedding when directly pasting video url into the editor. My embed setting is selected under “media”. Any ideas what could be going on? I’ve changed themes, ultimately to the native 2010 and still no function. I’ve tried turning […]

How to modify the HTML formatting of an oEmbed link?

I am trying to add oEmbed DeviantArt integration to a custom theme. I found that first step is quite easy, I added wp_oembed_add_provider( ‘http://*.deviantart.com/#/d*’, ‘http://backend.deviantart.com/oembed’ ); to theme’s functions.php. Now, I would like to change the default HTML output to add more information, available in DeviantArt JSON response (DeviantART reference), like author_name, author_url, etc. If […]

Use Auto Embed with get_post()

I have PHP script outside the WordPress directory where I’m getting the content of a specific post and now trying to apply the oembed filter on it: include(‘../wp-load.php’); $thePost = get_post(42, ARRAY_A); $theContent = $thePost[‘post_content’]; The post’s content contains text and one or more URLs to YouTube (or similar pages). Obviously WordPress is able to […]

Use oEmbed in List Items

I’m aware that WordPress has oEmbed functionality. But the content to be embedded has to be on it’s own line like so: Lorem Ipsum http://www.youtube.com/link/to/content More Lorem Ipsum Unfortunately, my markup looks like this so oEmbed doesn’t work and I have to use a plugin. <ul> <li>http://www.youtube.com/link/to/content</li> <li>http://www.youtube.com/link/to/content</li> </ul> Is there anyway I can get […]

oEmbed not recognising Vimeo URLs

I am trying to embed a Vimeo video into a post. I am inserting the URL into the page like so. Lorem ipsum dolor sit amet, consectetur adipiscing elit. http//vimeo.com/1234 Lorem ipsum dolor sit amet, consectetur adipiscing elit. It is outputted as the plain text URL. I have tried it with a youtube link and […]