Didn't want to reinvent the wheel if someone else has done it already, but has anyone written a MU plugin that puts ids and class tags back into allowed tags and willing to share? Thanks!
Didn't want to reinvent the wheel if someone else has done it already, but has anyone written a MU plugin that puts ids and class tags back into allowed tags and willing to share? Thanks!
Why not just revert kses back to the version before that was taken out, then add that to your list of files to not overwrite?
The code didn't change, in terms of operation, just the array of allowed tags/options.
I tried that, but it gave me errors. I tried using 1.2.5 Kses. I had made note of it not to replace, but then forgot to not replace it :(.
You'd need a version from 1.2.1, or somewhere around in there.
Should be fine working with 1.2.5.
Donncha,
I read that from searching, but I'm having one of those days (possible weeks) where something that is easy to understand seems to be getting the better of me :/
I assume I copy:
function addabitofclass( $tags ) {
global $allowedposttags;
foreach( $allowedposttags as $tag => $attr ) {
$attr[ 'class' ] = array();
$attr[ 'id' ] = array();
$allowedposttags[ $tag ] = $attr;
}
return $allowedposttags;
}
add_filter( 'edit_allowedposttags', 'addabitofclass' );
wrap it with <?php and ?>
in a blank text file and save it as kses.php into mu-plugins right?