I want to be able to allow users to use html in their posts, as a lot of feeds etc are in html.
I came across this after much searching on google
<?php
/*
Plugin Name: HTML Tag Enabler
Plugin URI: http://wordpress.org/#
Description: Enable HTML code writing with [html]...[/html] within the post content
Author: Ashwini Kumar Rath
Version: 1.0
Author URI: http://ashresort.com
*/
function enableHTML($sContent)
{
$sContent = htmlentities($sContent);
$sContent = html_entity_decode($sContent);
$sInputCode = '/\[html\](.+?)\[\/html\]/is';
$sContent = preg_replace_callback($sInputCode,"getOutputCode",$sContent);
return $sContent;
}
function getOutputCode($matches)
{
$sTemp = substr(htmlentities($matches[0]),6);
$aTemp = explode('[/html]',$sTemp);
$sTempFinal = str_replace('\n', '
', $aTemp[0]);
return $sTempFinal;
}
add_filter('the_content', 'enableHTML', 2);
?>
Will it allow users to put html in their post and where do I place it in mu directory, is it a plugin.
has anyone used this .