WordPress websites by Bobbing Wide

Shortcodes being expanded in bw_geshi

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


[wp]
[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) {
  $this->_runlevel--;
  $this->activate_all();
  $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.

Workarounds

  • De-activate NextGen

Solutions

  • 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
nextgen-gallery No info available  
oik-css No info available  
Share