I installed WP few days ago and i wanted to add PHP highlight function so i started changing a bit of the source code.
function highlight_with_pre ( $text )
return "<pre class="phppre">" . highlight_string( '<?php ' . $text . ' ?>', TRUE ) . "</pre>";
$output = preg_replace("#[PHP](.*?)[/PHP]#ies", "highlight_with_pre('$1')", $output);
in the file functions-formatting.php
the preg_replace was in added on the bottom of the wptexturize function
Now that all works but i get a wrong output and i dont get what is causing it? You can see the output in the link i provided. The highlight function outputs & and stuff like that but WP makes something else of it.
Can you plz tell me whats causing this and how to fix it?
Or maybe tell me where the final output of a post happens? So i can do the preg_replace then