yanknudtskov
4/21/2014 - 6:15 PM

Redefining Allowed HTML Tags From Scratch With CUSTOM_TAGS

Redefining Allowed HTML Tags From Scratch With CUSTOM_TAGS

<?php 
function my_filter( $string ) 
{ 
  global $allowedtags;
  $allowedtags['img'] = array( 'src' => array () );
  return $string;
}

add_filter( 'pre_kses', 'my_filter' );

?>

//Alternate for full control look in /wp-includes/kses.php for default
/*
define( 'CUSTOM_TAGS', true );
$allowedposttags = array();
$allowedtags = array();
$allowedentitynames = array();
*/