Shortcodes being expanded in bw_geshi

This example of bw_geshi contains a shortcode that should not have expanded.

[bw_plug option=active_plugins]

When the NextGen plugin is active, the shortcodes ignored by the bw_geshi shortcode would get expanded by NextGen. This was unwanted behaviour, which has now been fixed with version 0.5 of the oik-css plugin.

Problem report

When nextgen is active and the [bw_geshi] shortcode contains shortcode examples then the shortcode examples get unexpectedly expanded.

Problem analysis

The problem is created by NextGen’s filter function for “the_content”.

function parse_content($content) {
  $content = do_shortcode($content);
  $content = apply_filters('ngg_content', $content);
  return $content;
  • The filter function is added with the highest priority possible (i.e. last).
  • It invokes do_shortcode() directly against the already formatted content.
  • This cause the shortcode’s that bw_geshi left untouched to be expanded.


  • De-activate NextGen


  • Change bw_geshi to convert ‘[‘ to [

A change like this has now been implemented in oik-css v0.5.

See also

Plugin name and description Plugin links Version, total downloads, last update, tested
WordPress Gallery Plugin – NextGEN Gallery
The most popular WordPress gallery plugin and one of the most popular plugins of all…
February 24, 2021
Allows internal CSS styling to be included in the content of the page.
September 4, 2020

Published by Herb

Herb Miller is the web designer, web developer at Rowlands Castle Web Design - a Bobbing Wide company.