[wp-hackers] Ignore filtered_html

Dobri dyordan1 at ramapo.edu
Wed Jul 3 14:37:40 UTC 2013


Hi,

I'm working on a plugin for WordPress that adds Code Snippets. Brief overview: admin people create/edit the code snippets and then when an editor wants to include them on a page, they use a shortcode. However, I want to make sure that when the code snippet(which is just a post type) is being saved, no html filtering is done. My guess is it will be done with kses_remove_filters(). I'm having trouble hooking to the right place though. So, what would be a good hook to check that WP is currently saving, check it's my custom post type and be early enough to run kses_remove_filters()? Is content_save_pre with priority < 10 a good choice. I do get the content and I guess it's early enough to run kses... but can I check the post_type? Any other ideas? Thanks!

Dobromir Yordanov (Dobri)
Web Developer & WordPress Support Specialist
Ramapo College Web Team
Phone: (201) 684-6657

~Dobri



More information about the wp-hackers mailing list