function highlight_comment_text() {
if ( (array_key_exists('SyntaxHighlighter', $GLOBALS) ) {
$highlighter = new SyntaxHighlighter();
return $highlighter->parse_shortcodes(get_comment_text() );
} else { return get_comment_text(); }
}
add_filter ('comment_text', 'highlight_comment_text');
The filter checks to see that the global variable $SyntaxHighlighter exists (and that SyntaxHighlighter Evolved is installed) then calls the SyntaxHighlighter::parse_shortcodes() function on your comment text. If SyntaxHighlighter Evolved is not installed, your comments are displayed normally.
In my own (brief) testing, this works well for JavaScript and HTML, but not for PHP snippets.
Edit: echo should be return to keep your comment formatting. Fixed 10/15/09
One Comment
i like your backgorund pic nice theme and good job bro