Description
Perform GeSHi – Generic Syntax Highlighter processingIf geshi_highlight() is already available then we don't need to load our version After highlighting convert any remaining '[' to [ to stop plugins such as NextGen from expanding the shortcodes. Note: It shouldn't matter if we do this to CSS
Usage
$string = bw_geshi_it( $content, $language );Parameters
- $content
- ( string ) required – the code to be put through GeSHi highlighting
- $language
- ( string ) optional default: CSS – the language to use.
Returns
string the highlighted codeSource
File name: oik-css/shortcodes/oik-css.phpLines:
1 to 11 of 11
function bw_geshi_it( $content, $language="CSS" ) { if ( $language != "none" ) { $geshid = bw_geshi_highlight( $content, $language, null, true ); } else { $content = esc_html( $content ); $geshid = "<pre>" . $content . "</pre>"; } bw_trace2( $geshid ); $geshid = str_replace( "[", "[", $geshid ); return( $geshid ); }View on GitHub View on Trac
Called by
1 to 4 of 4
- bw_format_content() – Format the content for the chosen language
- bw_format_style() – Format the CSS as part of the content, if required
- Tests_shortcodes_oik_css::test_bw_geshi_it() – Tests bw_geshi_it directly, for CSS Including a [ in the content
- Tests_shortcodes_oik_css::test_bw_geshi_it_leading_space() – Tests a leading space passed to GeSHi
Invoked by
Calls
1 to 2 of 2
