[wp-hackers] Block auto formatting of post content?

Abel Cheung abelcheung at gmail.com
Wed Aug 20 18:42:18 GMT 2008


On Thu, Aug 21, 2008 at 2:28 AM, Jeremy Clarke
<jer-wphackers at simianuprising.com> wrote:
> Just for the sake of argument, you could also remove ONLY wpautop by
> doing a (off hte top of my head):
>
> remove_filter('the_content', 'wpautop');

IIRC, not just this one. I have had written a plugin that tried to do
some filtering, only to find that "WordPress should correct invalidly
nested XHTML automatically" setting is inteferring with it. In older
wordpress, this setting forcefully turn on wpautop before calling any
plugin, rendering the remove_filter() call completely useless. Don't
even bother to check newer version is doing it anymore.

Abel


>
> That way any other filters on the_content would still run, which is
> pretty important in case you are (or might in the future) run plugins
> that add filters to it. It might also be worth turning the filter back
> on after you remove it in case the_content is used later in the page.
>
> --
> Jeremy Clarke | http://simianuprising.com
> Code and Design | http://globalvoicesonline.org
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Abel Cheung (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1 41EE 4152 E1F1 C671 86FF
--------------------------------------------------------------------
* My blog: http://me.abelcheung.org/
* Opensource Application Knowledge Assoc. - http://oaka.org/


More information about the wp-hackers mailing list