Get rid of boring WPMU’s post html/javascript filtering…
Wednesday, July 18th, 2007Today I spend about 10 minutes to wrote a small javascript code and wish to release it in my blog, then I spend almost 2 hours to find out how to get rid of boring WPMU(Wordpress Multi Users)’s post html tags filtering.
I searched across the Internet, lots of people are asking how, very few information are helpful. The official “how to use Javascript” is actually missleading. It suggest to install “text-control plugin”, turn off rich editor are totally useless in WPMU.
Finally I got a simple solution by hack some code:
edit wp-include/kses.php, found “Post filtering”, and simply comment out a line:
// Post filtering
//add_filter(’content_save_pre’, ‘wp_filter_post_kses’);
UPDATED (Jan 10, 2008)
Joe in his comment point out the better solution, thanks Joe!
At around line 742 of kses.php, do the following commenting out:
function kses_init_filters() {
// Normal filtering.
add_filter(’pre_comment_content’, ‘wp_filter_kses’);
add_filter(’title_save_pre’, ‘wp_filter_kses’);// Post filtering
// add_filter(’content_save_pre’, ‘wp_filter_post_kses’);
// add_filter(’excerpt_save_pre’, ‘wp_filter_post_kses’);
// add_filter(’content_filtered_save_pre’, ‘wp_filter_post_kses’);
}This allows you to only stop filtering of the POST, but the comments still get filtered.
Popularity: 21% [?]
About