Support » Plugins » Hacks » Modify unfiltered_html to allow more tags

  • Resolved LIB53

    (@lib53)


    Hello, I’ve been googling stuff about unfiltered_html in hopes of finding a guide on allowing more html tags to be permitted for lower roles, however all results simply suggest I allow unfiltered html for lower user roles. I don’t want 100% unfiltered html, I simply want to allow a few more tags to be permitted. How can I modify this filter to allow users to use more html?

    Thanks,
    LIB53

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Take a look at wp-includes/kses.php and the definition of $allowedtags. You could just hack this definition, but to do it correctly, a plugin or theme should declare global $allowedtags and then add additional array elements using the same format as used in kses.php where the element value is an array of allowed attribute keys with empty array values. Example:

    global $allowedtags
    $allowedtags['span'] = array('style'=>array());
    $allowedtags['p'] = array();

Viewing 1 replies (of 1 total)
  • The topic ‘Modify unfiltered_html to allow more tags’ is closed to new replies.