Created
September 3, 2012 21:42
-
-
Save nciske/3613796 to your computer and use it in GitHub Desktop.
WordPress Run oEmbed Shortcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://wordpress.org/support/topic/call-function-called-by-embed-shortcode-direct | |
// Doesn't work: | |
// $post_embed = do_shortcode('[embed]your-video-url[/embed]'); | |
// Does work: | |
global $wp_embed; | |
$post_embed = $wp_embed->run_shortcode('[embed]your-video-url[/embed]'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks. This solution is working on WP 6.0.
Long live the bug!