I am using this plugin: http://www.megatome.com/syntaxhighlighter/
Which appears to work ok, minus a few glitches here and there.
My problem, is that I think WordPress is rewriting <?php
with <!--?php
and other tags, presumably for security.
Is there any way to disable this functionality, so that I can show code in it's full:
Here is some PHP in my text...<?php echo 'Foo'; ?>
rather than having to choose between no <?php
tags and having messed up output.
I ask, because often I write about code that goes in and out of PHP, so having the tags in place is crucial really.
Hope this makes sense, and thank you.
-- on a side note, is there any way to prevent wordpress parsing the following:
<pre class="brush:php;">
return '<img src="' . $my_img . '" />';
</pre>
WordPress will attempt to find an image rather than just output the code, causing all kinds of problems.
Long story short - what's the best way of showing PHP code on a wordpress blog without having to worry about wordpress breaking the output.
thanks.