Skip to content

Instantly share code, notes, and snippets.

@chriscoyier
Created December 4, 2014 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriscoyier/939aa12b3dbe2b8786cc to your computer and use it in GitHub Desktop.
Save chriscoyier/939aa12b3dbe2b8786cc to your computer and use it in GitHub Desktop.
function myprefix_kses_allowed_tags($input){
return array_merge( $input, array(
// paragraphs
'p' => array(
'style' => array()
),
'span' => array(
'style' => array()
),
'div' => array(
'style' => array()
),
// Links
'a' => array(
'href' => array(),
'title' => array(),
'rel' => array()
),
// Quotes
'blockquote' => array(
'cite' => array()
),
// Code
'code' => array(),
'pre' => array(),
// Formatting
'em' => array(),
'strong' => array(),
'del' => array(
'datetime' => true
),
// Lists
'ul' => array(),
'ol' => array(
'start' => true
),
'li' => array(),
// Images
'img' => array(
'src' => true,
'border' => true,
'alt' => true,
'height' => true,
'width' => true,
)
));
}
add_filter('bbp_kses_allowed_tags', 'myprefix_kses_allowed_tags', 999, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment