Due to the major breaking changes set to be introduced with the Gutenberg editor in WordPress v5.0, NextGEN Gallery Optimizer has now been discontinued.
Valid license holders for Optimizer Pro will continue to receive support if required, but the product has now been removed from sale, in preparation for the release.
I want to say a big thank you to everyone who's enjoyed using the plugin to optimize their sites over the last six and a half years, and wish you all the best for the future.
Kind regards,
Mark.
There are two uncommon use case limitations that affect Optimizer's ability to detect NextGEN's shortcodes for optimization purposes. These are primarily limitations within the WordPress environment itself, or more specifically, WordPress' "get_shortcode_regex()" and "do_shortcode()" functions.
If you're using the "do_shortcode()" function to insert NextGEN shortcodes directly in your theme or in a text widget, these will not be detected by the "get_shortcode_regex()" function, as they are outside the post/page content.
This is not really an issue however, as we can simply use a different approach...
One possible use case for doing this, is when creating a static, custom homepage that uses a PHP template for content instead of data from the database.
On this page, the developer might want to add a large NextGEN slideshow slider to show off the brand or service, but how do they do this without using do_shortcode()?
It's quite straightforward, really. Simply add a custom WordPress query to pull in the desired content.
In this example, we'll pull in the content of our page titled "Home", which will contain our NextGEN shortcode in its post/page editor screen in the admin (Eg. [slideshow id=x])...
<?php
// Include our 'Home' page's post editor content, which contains our NextGEN shortcode.
$args = array( 'pagename' => 'Home' );
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
the_content();
}
wp_reset_postdata();
}
?>
Similarly, if you're nesting your NextGEN shortcodes inside another plugin's shortcodes (Eg. [showhide][nggallery id=x][/showhide]), these will not be detected by the "get_shortcode_regex()" function either, and are instead processed by the "do_shortcode()" function as above.
Using a whole plugin just to show/hide content (as in the example above) would be best avoided for cleaner solutions anyway, but it's good to be aware of this.