WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there way to extract embedded video without using a regular expression as seen here?

I was hoping that there would be a way to get them using a WordPress function.

share|improve this question
up vote 0 down vote accepted

It looks like the closest you get is in the WP-Embed class:

autoembed( $content );

It says it extracts urls which are on distinct lines (like you'd put a url in for embedding it), but it then passes it to WP_Embed::shortcode().

Not quite what you want. You could dig into WP_Embed::shortcode() to see if you can figure out how to hack together your own script, but I don't think there's anything ready-made for you :/

share|improve this answer
Sounds good. Thanks! – Greg Wiley Mar 23 '13 at 22:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.