WordPress.org

Forums

How do I edit what HTML is allowed in comments? (6 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    I want the img tag to be allowed in comments. How would I do that?

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Check the file wp-includes/kses.php then clear your cache before checking.

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    I added this line:
    'img' => array(),
    I now get an image placeholder, but the image itself isn't loading

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    I figured it out, I needed the line:
    'img' => array(
    'src' => array(),
    'alt' => array()),

  5. RazorSA
    Member
    Posted 9 years ago #

    I followed your advise and added:
    'img' => array(
    'src' => array(),
    'alt' => array()),

    It works 100%... Thanks.

  6. Sproke
    Member
    Posted 9 years ago #

    Just to make it a bit easier for people who don't really know what they're doing (like me till I figured it out) this is the code that I have used:

    $allowedtags = array ('a' => array ('href' => array (), 'title' => array ()), 'img' => array( 'src' => array(), 'alt' => array()), 'abbr' => array ('title' => array ()), 'acronym' => array ('title' => array ()), 'b' => array (), 'blockquote' => array ('cite' => array ()),

    Hope this helps

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.