[wp-trac] [WordPress Trac] #17993: the_content vs get_the_content
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 5 14:00:01 UTC 2011
#17993: the_content vs get_the_content
-----------------------------+-----------------------------
Reporter: merlinox | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.2
Severity: normal | Keywords:
-----------------------------+-----------------------------
Wordpress lacks of a main function: obtain full formatted "content"
without echo! Maybe good to add a param to the_content() like echo(bool)?
I wrote it:
{{{
function the_content_noecho($more_link_text = null, $stripteaser = 0) {
$content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
return $content;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17993>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list