NextGEN Gallery – WordPress Gallery Plugin - Version 3.26

Version Description

Download this release

Release Info

Developer photocrati
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 3.26
Comparing to
See all releases

Code changes from version 3.24 to 3.26

changelog.txt CHANGED
@@ -1,6 +1,11 @@
1
  NextGEN Gallery
2
  by Imagely
3
 
 
 
 
 
 
4
  = V3.24 - 03.23.2022 =
5
  * Fixed: A possible PHP warning could be generated if the global $post->content is an integer or boolean.
6
  * Fixed: Activating NextGEN for the first time generated a PHP warning when registering default settings.
1
  NextGEN Gallery
2
  by Imagely
3
 
4
+ = V3.26 - 04.27.2022 =
5
+ * Fixed: A change in NextGEN 3.23 broke albums pagination.
6
+ * Fixed: Compatibility with TinyMCE editor used by Advanced Custom Fields.
7
+ * Fixed: Insert Gallery Window popup failed to load when Elementor is active.
8
+
9
  = V3.24 - 03.23.2022 =
10
  * Fixed: A possible PHP warning could be generated if the global $post->content is an integer or boolean.
11
  * Fixed: Activating NextGEN for the first time generated a PHP warning when registering default settings.
nggallery.php CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
4
  /**
5
  * Plugin Name: NextGEN Gallery
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 30 million downloads.
7
- * Version: 3.24
8
  * Author: Imagely
9
  * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
10
  * Author URI: https://www.imagely.com
@@ -683,7 +683,7 @@ class C_NextGEN_Bootstrap
683
  define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
684
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
685
  define('NGG_PLUGIN_STARTED_AT', microtime());
686
- define('NGG_PLUGIN_VERSION', '3.24');
687
 
688
  define(
689
  'NGG_SCRIPT_VERSION',
4
  /**
5
  * Plugin Name: NextGEN Gallery
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 30 million downloads.
7
+ * Version: 3.26
8
  * Author: Imagely
9
  * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
10
  * Author URI: https://www.imagely.com
683
  define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
684
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
685
  define('NGG_PLUGIN_STARTED_AT', microtime());
686
+ define('NGG_PLUGIN_VERSION', '3.26');
687
 
688
  define(
689
  'NGG_SCRIPT_VERSION',
products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php CHANGED
@@ -541,6 +541,10 @@ class Mixin_Attach_To_Post extends Mixin
541
  {
542
  $this->object->enqueue_backend_resources();
543
  $this->object->do_not_cache();
 
 
 
 
544
  // Enqueue resources
545
  return $this->object->render_view('photocrati-attach_to_post#attach_to_post', array('page_title' => $this->object->_get_page_title(), 'tabs' => $this->object->_get_main_tabs(), 'logo' => $this->get_static_url('photocrati-nextgen_admin#imagely_icon.png')), $return);
546
  }
541
  {
542
  $this->object->enqueue_backend_resources();
543
  $this->object->do_not_cache();
544
+ // If Elementor is also active a fatal error is generated due to this method not existing
545
+ if (!function_exists('wp_print_media_templates')) {
546
+ require_once ABSPATH . WPINC . '/media-template.php';
547
+ }
548
  // Enqueue resources
549
  return $this->object->render_view('photocrati-attach_to_post#attach_to_post', array('page_title' => $this->object->_get_page_title(), 'tabs' => $this->object->_get_main_tabs(), 'logo' => $this->get_static_url('photocrati-nextgen_admin#imagely_icon.png')), $return);
550
  }
products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.js CHANGED
@@ -58,13 +58,6 @@
58
  image: plugin_url + "/igw_button.png",
59
  });
60
 
61
- editor.on("SaveContent", function (event) {
62
- if ($("body").hasClass("block-editor-page")) {
63
- handle_shortcode(event, "[ngg_images ");
64
- handle_shortcode(event, "[ngg ");
65
- }
66
- });
67
-
68
  /**
69
  * Listen for click events to our placeholder
70
  */
58
  image: plugin_url + "/igw_button.png",
59
  });
60
 
 
 
 
 
 
 
 
61
  /**
62
  * Listen for click events to our placeholder
63
  */
products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";!function(t,e){window.id="wordpress-post-page",tinyMCE.addI18n("en.ngg_attach_to_post",{title:"Attach NextGEN Gallery to Post"}),tinymce.create("tinymce.plugins.NextGEN_AttachToPost",{siteurl:t,getInfo:function(){return{longname:"NextGEN Gallery",author:"Imagely",authorurl:"https://www.imagely.com",infourl:"https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/",version:"0.1"}},init:function(t,n){function o(t,n){for(;t.content.indexOf(n)>=0;){for(var o=t.content.indexOf(n),a=o+n.length,r=!1,i=null,c=!1,g=t.content.length;;){var l=t.content[a];if('"'==l||"'"==l&&"="==c)r&&i==l?(r=!1,i=null):(r=!0,i=l);else if("]"==l&&!r)break;if(c=l,a==g)break;a++}var s=t.content.substring(o,++a),d=s.substring(1,s.length-1);d=d.replace("[","&#91;"),d=d.replace("]","&#93;");var h=_.template(e("#ngg-igw-placeholder").html());t.content=t.content.replace(s,h(e.extend(ngg_igw_i18n,{shortcode:d,ref:_.now()})))}}var a=this;t.windowManager.nggOldOpen=t.windowManager.open,t.windowManager.open=function(e,n){var o=t.windowManager.nggOldOpen(e,n);return o.on("close",a.wm_close_event),o},t.addCommand("ngg_attach_to_post",this.render_attach_to_post_interface,{editor:t,plugin:t.plugins.NextGEN_AttachToPost}),t.addButton("NextGEN_AttachToPost",{title:"ngg_attach_to_post.title",cmd:"ngg_attach_to_post",image:n+"/igw_button.png"}),t.on("SaveContent",function(t){e("body").hasClass("block-editor-page")&&(o(t,"[ngg_images "),o(t,"[ngg "))}),t.on("mouseup touchend",function(n){if(tinymce.extend(a,{editor:t,plugin:t.plugins.NextGEN_AttachToPost}),"IMG"===n.target.tagName){if(a.get_class_name(n.target).indexOf("ngg_displayed_gallery")>=0){t.dom.events.cancel(n);var o=n.target.src.match(/\d+$/);o&&(o=o.pop()),a.render_attach_to_post_interface({key:"id",val:o})}}else{var r=e(n.target);if(r.hasClass("nggPlaceholderButton"))if(r.hasClass("nggIgwRemove")){var i=r.parents(".nggPlaceholder"),c=i[0].getAttribute("data-shortcode");t.fire("ngg-removed",{shortcode:c}),i.remove()}else window.igw_shortcode=e(n.target).parents(".nggPlaceholder")[0].getAttribute("data-shortcode"),a.render_attach_to_post_interface({key:"shortcode",val:Base64.encode(window.igw_shortcode),ref:e(n.target).parents(".nggPlaceholder").attr("id")})}}),t.on("BeforeSetContent",function(t){o(t,"[ngg_images "),o(t,"[ngg ")}),t.on("PostProcess",function(t){var n=e("<div/>").append(t.content);n.find(".nggPlaceholder").toArray().forEach(function(t){var n=e(t),o=n.data("shortcode");o="["+_.unescape(o)+"]",n.replaceWith(o)}),t.content=n[0].innerHTML})},get_class_name:function(t){var e=t.getAttribute("class")?t.getAttribute("class"):t.className;return e||""},wm_close_event:function(t){t&&t.target&&t.target._id&&"ngg_attach_to_post_dialog"==t.target._id&&(e("html,body").css("overflow","auto"),tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select("p")[0]),tinyMCE.activeEditor.selection.collapse(0))},render_attach_to_post_interface:function(t){var n=window.igw.url;void 0!==t&&(n+="&"+t.key+"="+encodeURIComponent(t.val),void 0!==t.ref&&(n+="&ref="+encodeURIComponent(t.ref))),n+="&editor="+this.editor.id;for(var o=window;null!=o.parent&&o.parent!=o;)o=o.parent;o=e(o);var a=o.width(),r=o.height(),i=1600,c=1200,g=a-.05*a,l=r-.1*r;g<800&&(g=a-20),l<600&&(l=r-40),i>g&&(i=g),c>l&&(c=l),document.activeElement.blur(),Array.prototype.forEach.call(document.querySelectorAll("input, textarea"),function(t){t.blur()}),this.editor.windowManager.open({url:n,id:"ngg_attach_to_post_dialog",width:i,height:c,title:"NextGEN Gallery - Attach To Post"}),e("html,body").css("overflow","hidden"),e("#ngg_attach_to_post_dialog_ifr").css("overflow-y","auto"),e("#ngg_attach_to_post_dialog_ifr").css("overflow-x","hidden")}}),tinymce.PluginManager.add("NextGEN_AttachToPost",tinymce.plugins.NextGEN_AttachToPost)}(photocrati_ajax.wp_site_url,jQuery);
1
+ "use strict";!function(t,e){window.id="wordpress-post-page",tinyMCE.addI18n("en.ngg_attach_to_post",{title:"Attach NextGEN Gallery to Post"}),tinymce.create("tinymce.plugins.NextGEN_AttachToPost",{siteurl:t,getInfo:function(){return{longname:"NextGEN Gallery",author:"Imagely",authorurl:"https://www.imagely.com",infourl:"https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/",version:"0.1"}},init:function(t,n){function o(t,n){for(;t.content.indexOf(n)>=0;){for(var o=t.content.indexOf(n),a=o+n.length,r=!1,i=null,c=!1,g=t.content.length;;){var l=t.content[a];if('"'==l||"'"==l&&"="==c)r&&i==l?(r=!1,i=null):(r=!0,i=l);else if("]"==l&&!r)break;if(c=l,a==g)break;a++}var s=t.content.substring(o,++a),d=s.substring(1,s.length-1);d=d.replace("[","&#91;"),d=d.replace("]","&#93;");var h=_.template(e("#ngg-igw-placeholder").html());t.content=t.content.replace(s,h(e.extend(ngg_igw_i18n,{shortcode:d,ref:_.now()})))}}var a=this;t.windowManager.nggOldOpen=t.windowManager.open,t.windowManager.open=function(e,n){var o=t.windowManager.nggOldOpen(e,n);return o.on("close",a.wm_close_event),o},t.addCommand("ngg_attach_to_post",this.render_attach_to_post_interface,{editor:t,plugin:t.plugins.NextGEN_AttachToPost}),t.addButton("NextGEN_AttachToPost",{title:"ngg_attach_to_post.title",cmd:"ngg_attach_to_post",image:n+"/igw_button.png"}),t.on("mouseup touchend",function(n){if(tinymce.extend(a,{editor:t,plugin:t.plugins.NextGEN_AttachToPost}),"IMG"===n.target.tagName){if(a.get_class_name(n.target).indexOf("ngg_displayed_gallery")>=0){t.dom.events.cancel(n);var o=n.target.src.match(/\d+$/);o&&(o=o.pop()),a.render_attach_to_post_interface({key:"id",val:o})}}else{var r=e(n.target);if(r.hasClass("nggPlaceholderButton"))if(r.hasClass("nggIgwRemove")){var i=r.parents(".nggPlaceholder"),c=i[0].getAttribute("data-shortcode");t.fire("ngg-removed",{shortcode:c}),i.remove()}else window.igw_shortcode=e(n.target).parents(".nggPlaceholder")[0].getAttribute("data-shortcode"),a.render_attach_to_post_interface({key:"shortcode",val:Base64.encode(window.igw_shortcode),ref:e(n.target).parents(".nggPlaceholder").attr("id")})}}),t.on("BeforeSetContent",function(t){o(t,"[ngg_images "),o(t,"[ngg ")}),t.on("PostProcess",function(t){var n=e("<div/>").append(t.content);n.find(".nggPlaceholder").toArray().forEach(function(t){var n=e(t),o=n.data("shortcode");o="["+_.unescape(o)+"]",n.replaceWith(o)}),t.content=n[0].innerHTML})},get_class_name:function(t){var e=t.getAttribute("class")?t.getAttribute("class"):t.className;return e||""},wm_close_event:function(t){t&&t.target&&t.target._id&&"ngg_attach_to_post_dialog"==t.target._id&&(e("html,body").css("overflow","auto"),tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select("p")[0]),tinyMCE.activeEditor.selection.collapse(0))},render_attach_to_post_interface:function(t){var n=window.igw.url;void 0!==t&&(n+="&"+t.key+"="+encodeURIComponent(t.val),void 0!==t.ref&&(n+="&ref="+encodeURIComponent(t.ref))),n+="&editor="+this.editor.id;for(var o=window;null!=o.parent&&o.parent!=o;)o=o.parent;o=e(o);var a=o.width(),r=o.height(),i=1600,c=1200,g=a-.05*a,l=r-.1*r;g<800&&(g=a-20),l<600&&(l=r-40),i>g&&(i=g),c>l&&(c=l),document.activeElement.blur(),Array.prototype.forEach.call(document.querySelectorAll("input, textarea"),function(t){t.blur()}),this.editor.windowManager.open({url:n,id:"ngg_attach_to_post_dialog",width:i,height:c,title:"NextGEN Gallery - Attach To Post"}),e("html,body").css("overflow","hidden"),e("#ngg_attach_to_post_dialog_ifr").css("overflow-y","auto"),e("#ngg_attach_to_post_dialog_ifr").css("overflow-x","hidden")}}),tinymce.PluginManager.add("NextGEN_AttachToPost",tinymce.plugins.NextGEN_AttachToPost)}(photocrati_ajax.wp_site_url,jQuery);
products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php CHANGED
@@ -125,6 +125,25 @@ class M_Third_Party_Compat extends C_Base_Module
125
  M_WordPress_Routing::$_use_old_slugs = FALSE;
126
  add_action('template_redirect', array(&$this, 'fix_wpml_canonical_redirect'), 1);
127
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  }
129
 
130
  /**
125
  M_WordPress_Routing::$_use_old_slugs = FALSE;
126
  add_action('template_redirect', array(&$this, 'fix_wpml_canonical_redirect'), 1);
127
  }
128
+
129
+ add_action('the_post', [$this, 'fix_page_parameter']);
130
+ }
131
+
132
+ /**
133
+ * This code was originally added to correct a bug in Pro 1.0.10 and was meant to be temporary. However now the
134
+ * albums pagination relies on this to function correctly, and fixing it properly would require more time than its worth.
135
+ *
136
+ * TODO: Remove this once the router and wordpress_routing modules are removed.
137
+ */
138
+ function fix_page_parameter()
139
+ {
140
+ global $post;
141
+
142
+ if ($post AND is_string($post->content) AND (strpos($post->content, "<!--nextpage-->") === FALSE) AND (strpos($_SERVER['REQUEST_URI'], '/page/') !== FALSE))
143
+ {
144
+ if (preg_match("#/page/(\\d+)#", $_SERVER['REQUEST_URI'], $match))
145
+ $_REQUEST['page'] = $match[1];
146
+ }
147
  }
148
 
149
  /**
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: photocrati, imagely
3
  Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
4
  Requires at least: 5.5.4
5
- Stable tag: 3.24
6
  Tested up to: 5.9
7
  License: GPLv3
8
  Requires PHP: 5.6
@@ -179,6 +179,11 @@ For more information, feel free to visit the official website for the NextGEN Ga
179
 
180
  == Changelog ==
181
 
 
 
 
 
 
182
  = V3.24 - 03.23.2022 =
183
  * Fixed: A possible PHP warning could be generated if the global $post->content is an integer or boolean.
184
  * Fixed: Activating NextGEN for the first time generated a PHP warning when registering default settings.
2
  Contributors: photocrati, imagely
3
  Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
4
  Requires at least: 5.5.4
5
+ Stable tag: 3.26
6
  Tested up to: 5.9
7
  License: GPLv3
8
  Requires PHP: 5.6
179
 
180
  == Changelog ==
181
 
182
+ = V3.25 - 04.27.2022 =
183
+ * Fixed: A change in NextGEN 3.23 broke albums pagination.
184
+ * Fixed: Compatibility with TinyMCE editor used by Advanced Custom Fields.
185
+ * Fixed: Insert Gallery Window popup failed to load when Elementor is active.
186
+
187
  = V3.24 - 03.23.2022 =
188
  * Fixed: A possible PHP warning could be generated if the global $post->content is an integer or boolean.
189
  * Fixed: Activating NextGEN for the first time generated a PHP warning when registering default settings.
vendor/composer/autoload_files.php CHANGED
@@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'a5dbe7df96665c0b6c16ae8d91231502' => $vendorDir . '/imagely/pope-framework/lib/autoload.php',
10
  '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
 
11
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
10
+ 'a5dbe7df96665c0b6c16ae8d91231502' => $vendorDir . '/imagely/pope-framework/lib/autoload.php',
11
  );
vendor/composer/autoload_static.php CHANGED
@@ -7,8 +7,8 @@ namespace Composer\Autoload;
7
  class ComposerStaticInit0deaf5c74c7fce86e30da1f486096a6b
8
  {
9
  public static $files = array (
10
- 'a5dbe7df96665c0b6c16ae8d91231502' => __DIR__ . '/..' . '/imagely/pope-framework/lib/autoload.php',
11
  '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
 
12
  );
13
 
14
  public static $prefixesPsr0 = array (
7
  class ComposerStaticInit0deaf5c74c7fce86e30da1f486096a6b
8
  {
9
  public static $files = array (
 
10
  '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
11
+ 'a5dbe7df96665c0b6c16ae8d91231502' => __DIR__ . '/..' . '/imagely/pope-framework/lib/autoload.php',
12
  );
13
 
14
  public static $prefixesPsr0 = array (