[wp-hackers] How To Get Completely Processed Body Of Blog Posts?
scribu
scribu at gmail.com
Thu Aug 19 15:19:42 UTC 2010
On Thu, Aug 19, 2010 at 6:12 PM, Raj <list at expost.org> wrote:
> I have a plugin that uses the body of blog posts to deliver e-mails. Often
> times the plugin users would use shortcodes [caption][/caption] etc. I am
> sure there are many plugins which define some shot codes too. How do I get
> the body of a post after all the shortcode replacements and other
> processing
> by other plugins have been performed?
>
global $post;
$post = get_post( 'some id' );
setup_postdata($post);
$processed = apply_filters('the_content', $post->post_content);
wp_reset_postdata();
--
http://scribu.net
More information about the wp-hackers
mailing list