A little tweak on Code Filter by Owen Winkler
->
I don’t want to change the CSS for CODE tag, so I add a little style property to that code in the cf_callback function & have a smaller font:
function cf_callback($stuff)
{
//return "
<pre>[[code{$stuff[1]}]]".htmlspecialchars(clean_pre($stuff[2]), ENT_NOQUOTES)."[[/code]]</pre>
";
$pre_style="display: block;font-family: monospace;font-size: 9px;white-space: pre;unicode-bidi: embed;page-break-inside: avoid;pitch: medium; pitch-range: 0; stress: 0; richness: 80;";
return "
<pre>[[code{$stuff[1]} style='$pre_style']]".htmlspecialchars(clean_pre($stuff[2]), ENT_NOQUOTES)."[[/code]]</pre>
";
}
Notes:
Change the “[[” and “]]” to “<" and ">” accordingly. That portion makes the cf_callback trigger the pattern and mess this post:)
Code Filter plugin can be downloaded here:


