Created
September 16, 2012 05:14
-
-
Save dancameron/3731103 to your computer and use it in GitHub Desktop.
Allow WP_Embed (oEmbed) to filter the_content on non post_content.
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
<?php | |
// WP_Embed::shortcode will not proceed without a postID | |
global $post; | |
$post->ID = PHP_INT_MAX - $data['id']; // Make sure the id is unique so that it can be cached without conflict | |
echo apply_filters('the_content', $data['content'] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment