Home » Wordpress

Allow all HTML in wpmu Posts

2 September 2008 1 views No Comment

A simple fix to enable your wpmu to stop stripping html tags has been found! In your wp-includes folder is a file called kses.php. In the default wpmu installation about line 1015 reads the following:

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’);
}

All we have to do hear is comment out all the lines under post filtering of this function.

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 stop filtering the tags in a post, but the tags in a comment are still filtered.

Readlink: http://dev.robertmao.com/2007/07/18/get-rid-of-boring-wpmus-post-htmljavascript-filtering/

———————————

AND THEN! I used this plugin called Wordpress Video Plugin. Details / Download here. Super easy install, super easy to use. If you want a youtube video, in your post you just add the text [youtube VIDEOID]. Works for about 100 or so different video sites. They have an instruction guide that comes with it listing all the sites. Adding additional websites to the code is pretty simple if you know what you’re doing in the code. As of today, I get to disabled this plugin! Good luck!

Check Out These Related Posts!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.