[wp-hackers] Ignore filtered_html

Nicholas Ciske nl at thoughtrefinery.com
Wed Jul 3 15:39:05 UTC 2013

Use a meta box/custom field (i.e. turn off post_content in your CPT) and you can control how it's saved.

As it's a code snippet I imagine a true code editor like code mirror would be preferable over the standard html editor in WP?

If you want to use the content editor, this may be what you're looking for:

Also note that there is a capability called unfiltered_html that has a bearing on whether or not HTML is filtered by default.

Nick Ciske

On Jul 3, 2013, at 9:37 AM, Dobri wrote:

> 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. 
> ~Dobri

More information about the wp-hackers mailing list