How to filter PHP opener?
How to filter PHP opener?
How to filter PHP opener?
I had a similar issue with WP-Syntax and solved by applying the_content filter in the Shortcode returned values. It would go like: function my_shortcode( $atts, $content ) { $code=”<pre class=”lang:r”>” . $file . ‘</pre>’; return apply_filters ( ‘the_content’, $code ); }
Have you looked to see if the correct style sheet is being loaded to change the highlighting? It appears to be a white background with some font styling for the different language. If you want something more than that, you will need to customize the css for it.
It turns out that this well maintained plugin is a drop in replacement. I installed this and all is well again. It’s called syntax highlighter evolved. https://wordpress.org/plugins/syntaxhighlighter/
I’ve found that you have to wrap code formatting shortcodes in pre tags.
Since you say you are using the ‘enlighter plugin’, the best place to ask that question is in their plugin support area. Provide as much detail as you can about what you are doing, where you are doing, and expected and actual results. If you have figured out your issue, post an answer here and … Read more
This one should work add_filter( ‘the_content’, ‘pre_content_filter’, 0 ); function pre_content_filter( $content ) { return preg_replace_callback( ‘|<pre.*>(.*)</pre|isU’ , ‘convert_pre_entities’, $content ); } function convert_pre_entities( $matches ) { return str_replace( $matches[1], html_entity_decode( $matches[1] ), $matches[0] ); } Let me know
WordPress.com uses Alex Gorbatchev’s SyntaxHighlighter so all you need to do is use the right shortcode ex: [code language=”css”] #button { font-weight: bold; border: 2px solid #fff; } [/code] which gives you something like this: it has more features and you can see a list of supported languages at http://en.support.wordpress.com/code/posting-source-code/
Solved it. A real RTFM moment. The FAQ for CodeColorer makes a note about this (though it’s not mentioned in the main how-to text). Using the escaped = “true” code in the [cc] tag brings back the behaviour I was looking for – now it’s possible to write the <- operator in Visual (and it … Read more