Tag Info

New answers tagged

1

Personally, I found the oembed_dataparse filter pretty fiddly to use; sometimes it worked, sometimes it didn't; and when used in conjunction with custom TinyMCE instances, it seems as though the added wrapper was hard-baked into the content rather than added via the filter at output. I found the embed_oembed_html filter much more reliable and works every ...


3

Did you know you can just copy paste a youtube URL onto its own line and it transforms into a video player auto-magically via oembed? There's no need for embed codes/shortcodes/plugins Simply create a blank line, and take the address of the youtube video and paste it into the editor: These youtube videos should not play automatically WordPress will pick ...


0

You can try doing this: $string = "Some text before the link http://www.youtube.com/?123 some text after the link"; preg_match_all('@(https?://www\.?youtube.com/.[^\s.,"\']+)@i', $string, $matches); var_dump($matches); In your case would be something similar to this: preg_match_all('@(https?://www\.?youtube.com/.[^\s.,"\']+)@i', $post->post_content, ...



Top 50 recent answers are included