Get first video from the post (both embed and video shortcodes)
You could try mashing all the patterns together in one big regexp or and then doing a simple line by line parse of the content: function theme_oembed_videos() { global $post; if ( $post && $post->post_content ) { global $shortcode_tags; // Make a copy of global shortcode tags – we’ll temporarily overwrite it. $theme_shortcode_tags = $shortcode_tags; … Read more