add_action('admin_menu', '')
so here’s the code for applying & removing some filters that I’m using
// disable wptexturize filter
remove_filter('the_content', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
// add conditional wptexturize
add_filter('the_content', 'dis_en_frmt');
add_filter('the_excerpt', 'dis_en_frmt');
// apply filter for syntax hiliting
add_filter('the_content', 'syntax_hilite', 2);
add_filter('the_excerpt', 'syntax_hilite', 2);
Now the problem with the above is that the code is highlighted on the pages where full content is displayed, like main page & post pages, but the Category/Archive/Search pages which use ‘the_excerpt’ don’t have syntax hilighting!! seems that the filter is not being applied. but if I comment the second last line in the above code(commenting out the filter to be applied on ‘the_content’), the code in the excerpt is hilited, meaning that the filter is applied!!
so what can be this problem? I’m testing this on WP1.5.1
can anyone help?
]]>[PHP]$something = "yes";
if($something == "yes") {
echo "yes";
}[/PHP]
$php_str = "<?\n".$php_str."\n?".">";
$php_str = str_replace("$","\$",$php_str);
$php_str = str_replace("\"","\\"",$php_str);
$php_str = str_replace("'","\'",$php_str);
$output_str = "<div style='margin:0px 5% 0px 5%;'>PHP:<hr />";
$output_str .= highlight_string($php_str,true);
$output_str .= "<hr /></div>";