[Plugin: NextGEN Gallery] Shortcode Slideshow conflicts with Jetpack by WordPress.com plugin
-
I found that Jetback is processing shortcode [slideshow] and generate a error in result webpage before NextGen can reach this shortcode. So, we alway receive a blank space!
Because Jetpack is official support by WordPress so I modified NextGen ??
By change shortcode of NextGen, I can fix this error:
Step 1: open file </wp-content/plugins/nextgen-gallery/lib/>shortcodes.php
Step 2: change shortcode name [slideshow] to [ngslideshow]
Line 29: add_shortcode( ‘slideshow’, array(&$this, ‘show_slideshow’ ) );
=> add_shortcode( ‘ngslideshow’, array(&$this, ‘show_slideshow’ ) );Line 100: if ( stristr( $content, ‘[slideshow’ )) {
=> if ( stristr( $content, ‘[ngslideshow’ )) {Line 101: $search = “@(?:<p>)*\s*\[slideshow\s*=\s*(\w+|^\+)(|,(\d+)|,)(|,(\d+))\]\s*(?:</p>)*@i”;
=> $search = “@(?:<p>)*\s*\[ngslideshow\s*=\s*(\w+|^\+)(|,(\d+)|,)(|,(\d+))\]\s*(?:</p>)*@i”;Line 108: $replace = “[slideshow id=\”{$match[1]}\” w=\”{$match[3]}\” h=\”{$match[5]}\”]”;
=> $replace = “[ngslideshow id=\”{$match[1]}\” w=\”{$match[3]}\” h=\”{$match[5]}\”]”;Step 3: in posts, change all shortcodes [slideshow id=x] to [ngslideshow id=x] and it will work like a charm!!!
Sorry for my bad English.
- The topic ‘[Plugin: NextGEN Gallery] Shortcode Slideshow conflicts with Jetpack by WordPress.com plugin’ is closed to new replies.