[wp-hackers] Block auto formatting of post content?
Viper007Bond
viper at viper007bond.com
Thu Aug 21 02:29:49 GMT 2008
Easiest way:
remove_filter( 'the_content', 'wpautop' );
echo apply_filters( 'the_content', $string );
add_filter( 'the_content', 'wpautop' );
On Wed, Aug 20, 2008 at 12:05 PM, Stephen Rider
<wp-hackers at striderweb.com>wrote:
>
> On Aug 20, 2008, at 1:54 PM, Abel Cheung wrote:
>
> Oh sorry, I mean the balanceTags() call, not wpautop(). balanceTags is
>> forcefully called within the_content() for paged content. So to get
>> paged content in vanilla form, there is only one valid solution:
>> $post->post_content. And then reapply all other plugin filter calls.
>> Bah.
>>
>
> Heh. I hit "Send" as Abel's email arrived.
>
> $post->post_content it is, then.
>
> Dang, I was hoping I could keep other plugin filters going -- e.g. for
> quicktags.
>
> Is there a way to take a string and say "Take all the filters assigned to
> the_content() and run it on $string" ? (minus wpautop, 'natch)
>
> I guess look up the list of filters on the_content, then loop through and
> run them all on $string?
>
> Stephen
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
--
Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
More information about the wp-hackers
mailing list