On Mar 23 2010 12:54 PM, Paul Robinson wrote:
Hi guys,
I'm just wondering, is the entry in the codex for get_the_content
still relevant where it tells you to add:
<?php
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
?>
It says it hasn't been added to the core yet. Has it been added and
the codex just hasn't been updated yet?
I don't see that note on the Codex page.
But to answer your question: get_the_content() returns the content
*before* filtering. So, if you are planning to send it out to the
browser at some point, then yes, you probably want to do the steps above.
The template function the_content() does exactly that. It calls
get_the_content(), then apply_filters(), then does the str_replace() to
fix any parsing problems that might happen if you're trying to keep
strict XML parsing.
--
Dougal Campbell <[email protected]>
http://dougal.gunters.org/
http://twitter.com/dougal
http://twitual.com/
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers