Hi all,
I saw Donncha's code about allowing some tags by creating a small mu-plugin to override kses.php, but was wondering of the following would be possible, and if so, if anybody would be able to give some pointers:
- override kses.php completely for Admins (so the main blog etc can contain javascript, PHp etc).
and/or
- override kses.php completely for certain themes. This way, I can just reserve some themes for the admin blogs etc.
Thanks in advance for any suggestions, Bike
Was this a silly question, a difficult one or just a plain stupid one?
:)
Are there any kses.php wizards that might be able to shed some light on this?
Thanks much,
Cheers, Bike
My live-in code monkey did me a hack we called "unfiltered html". All I do now is edit a blog to allow it. Manual process, trusted users. Not sure exactly what he did, but yeah, it's totally possible. And I don't think we touched the kses file, not sure.
The main question is of course: does he not mind be called that? Reminds me of the C-monkey joke :)
Anyway, a secondary question: when it is feeding time could you trade a banana on my behalf for some hints on how he hacked this?
Asante sana, Bike
Have I got your email already?
I know you have mine.
I promise not ask support questions. This would be less resource intensive than anarchy media, right? Or, have I misunderstood the recent kses conversations all together?
Yep, the other thread was about video specifically. :D this is just in general.
I use anarchymedia on my sytem too.
Hi Andrea,
No, I don't think so: info at biketravellers (.) com, thanks in advance,
Cheers,
Bike
I'm pretty sure Bike isn't the only one struggling with this problem, so you wouldn't mind sharing the solution?
I made this little plugin to get around of this problem.
<?php
/*
Plugin Name: Disable post formatting for admins
Description: This plugin disables post formatting for admins, so you can use any code you want inside posts.
*/
global $user_ID;
function disable_kses_for_admins() {
remove_filter('content_save_pre', 'wp_filter_post_kses');
}
if ($user_ID && current_user_can('level_10')) {
add_action('init','disable_kses_for_admins');
}
?>
http://wordpress.org/extend/plugins/unfiltered-mu/
I strongly caution people to NOT use this on a LIVE system with open registration. It will leave a wide gaping security hole and should only be used in a trusted secured system.
This plugin (unfiltered-mu) seems to break in 2.6
Parse error: syntax error, unexpected $end in .../eurailstories.com/html/wp-content/plugins/unfiltered-mu.php on line 37
Any ideas?