NextGEN Gallery – WordPress Gallery Plugin - Version 3.9.1

Version Description

  • 03.29.2020
Download this release

Release Info

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

Code changes from version 3.9.0 to 3.9.1

changelog.txt CHANGED
@@ -1,6 +1,10 @@
1
  NextGEN Gallery
2
  by Imagely
3
 
 
 
 
 
4
  = V3.9.0 - 03.24.2020 =
5
  * Changed: Resource manager disabled by default
6
  * Changed: Remove ngg_load_frontend_logic filter
1
  NextGEN Gallery
2
  by Imagely
3
 
4
+ = V3.9.1 - 03.29.2020 =
5
+ * Fixed: C_Dynamic_Stylesheet_Controller error
6
+ * Fixed: Galleries not displaying
7
+
8
  = V3.9.0 - 03.24.2020 =
9
  * Changed: Resource manager disabled by default
10
  * Changed: Remove ngg_load_frontend_logic filter
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.9.0
8
  * Author: Imagely
9
  * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
10
  * Author URI: https://www.imagely.com
@@ -712,7 +712,7 @@ class C_NextGEN_Bootstrap
712
  define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
713
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
714
  define('NGG_PLUGIN_STARTED_AT', microtime());
715
- define('NGG_PLUGIN_VERSION', '3.9.0');
716
 
717
  define(
718
  '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.9.1
8
  * Author: Imagely
9
  * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
10
  * Author URI: https://www.imagely.com
712
  define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
713
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
714
  define('NGG_PLUGIN_STARTED_AT', microtime());
715
+ define('NGG_PLUGIN_VERSION', '3.9.1');
716
 
717
  define(
718
  'NGG_SCRIPT_VERSION',
non_pope/class.photocrati_resource_manager.php CHANGED
@@ -34,7 +34,7 @@ class C_Photocrati_Resource_Manager
34
  */
35
  function print_marker()
36
  {
37
- if ($this->is_disabled())
38
  return;
39
 
40
  // is_feed() is important to not break Wordpress feeds and the WooCommerce api
@@ -50,17 +50,13 @@ class C_Photocrati_Resource_Manager
50
  $this->valid_request = $this->is_valid_request();
51
  }
52
 
53
- public function is_disabled()
 
 
 
 
 
54
  {
55
- // This is admittedly an ugly hack, but much easier than reworking the entire nextgen_admin modules
56
- if (!empty($_GET['page']) && $_GET['page'] === 'ngg_addgallery' && isset($_GET['attach_to_post']))
57
- return FALSE;
58
-
59
- // Provide users a method of forcing this on should it be necessary
60
- if (defined('NGG_ENABLE_RESOURCE_MANAGER') && NGG_ENABLE_RESOURCE_MANAGER)
61
- return FALSE;
62
-
63
- // Pro, Plus, and Starter versions below these were not ready to function without the resource manager
64
  if (defined('NGG_PRO_PLUGIN_VERSION') && version_compare(NGG_PRO_PLUGIN_VERSION, '3.3', '<'))
65
  return FALSE;
66
  if (defined('NGG_STARTER_PLUGIN_VERSION') && version_compare(NGG_STARTER_PLUGIN_VERSION, '1.1', '<'))
@@ -71,6 +67,22 @@ class C_Photocrati_Resource_Manager
71
  return TRUE;
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  function is_valid_request()
75
  {
76
  $retval = TRUE;
@@ -108,7 +120,7 @@ class C_Photocrati_Resource_Manager
108
  */
109
  function start_buffer()
110
  {
111
- if ($this->is_disabled())
112
  return;
113
 
114
  if (apply_filters('run_ngg_resource_manager', $this->valid_request))
34
  */
35
  function print_marker()
36
  {
37
+ if (self::is_disabled())
38
  return;
39
 
40
  // is_feed() is important to not break Wordpress feeds and the WooCommerce api
50
  $this->valid_request = $this->is_valid_request();
51
  }
52
 
53
+ /**
54
+ * Pro, Plus, and Starter versions below these were not ready to function without the resource manager
55
+ *
56
+ * @return bool
57
+ */
58
+ public static function addons_version_check()
59
  {
 
 
 
 
 
 
 
 
 
60
  if (defined('NGG_PRO_PLUGIN_VERSION') && version_compare(NGG_PRO_PLUGIN_VERSION, '3.3', '<'))
61
  return FALSE;
62
  if (defined('NGG_STARTER_PLUGIN_VERSION') && version_compare(NGG_STARTER_PLUGIN_VERSION, '1.1', '<'))
67
  return TRUE;
68
  }
69
 
70
+ /**
71
+ * @return bool
72
+ */
73
+ public static function is_disabled()
74
+ {
75
+ // This is admittedly an ugly hack, but much easier than reworking the entire nextgen_admin modules
76
+ if (!empty($_GET['page']) && $_GET['page'] === 'ngg_addgallery' && isset($_GET['attach_to_post']))
77
+ return FALSE;
78
+
79
+ // Provide users a method of forcing this on should it be necessary
80
+ if (defined('NGG_ENABLE_RESOURCE_MANAGER') && NGG_ENABLE_RESOURCE_MANAGER)
81
+ return FALSE;
82
+
83
+ return self::addons_version_check();
84
+ }
85
+
86
  function is_valid_request()
87
  {
88
  $retval = TRUE;
120
  */
121
  function start_buffer()
122
  {
123
+ if (self::is_disabled())
124
  return;
125
 
126
  if (apply_filters('run_ngg_resource_manager', $this->valid_request))
products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php CHANGED
@@ -107,7 +107,7 @@ class M_Gallery_Display extends C_Base_Module
107
  the_post();
108
 
109
  if ((defined('NGG_SKIP_LOAD_SCRIPTS') && NGG_SKIP_LOAD_SCRIPTS) || $this->is_rest_request() || empty($post->post_content))
110
- return;
111
 
112
  preg_match_all('/' . get_shortcode_regex() . '/', $post->post_content, $matches, PREG_SET_ORDER);
113
 
@@ -134,6 +134,11 @@ class M_Gallery_Display extends C_Base_Module
134
 
135
  $displayed_gallery = $renderer->params_to_displayed_gallery($params);
136
 
 
 
 
 
 
137
  $controller = C_Display_Type_Controller::get_instance($displayed_gallery->display_type);
138
 
139
  if (!$displayed_gallery || empty($params))
107
  the_post();
108
 
109
  if ((defined('NGG_SKIP_LOAD_SCRIPTS') && NGG_SKIP_LOAD_SCRIPTS) || $this->is_rest_request() || empty($post->post_content))
110
+ continue;
111
 
112
  preg_match_all('/' . get_shortcode_regex() . '/', $post->post_content, $matches, PREG_SET_ORDER);
113
 
134
 
135
  $displayed_gallery = $renderer->params_to_displayed_gallery($params);
136
 
137
+ if (did_action('wp_enqueue_scripts') == 1
138
+ && !C_Photocrati_Resource_Manager::addons_version_check()
139
+ && in_array($displayed_gallery->display_type, ['photocrati-nextgen_pro_horizontal_filmstrip', 'photocrati-nextgen_pro_slideshow']))
140
+ continue;
141
+
142
  $controller = C_Display_Type_Controller::get_instance($displayed_gallery->display_type);
143
 
144
  if (!$displayed_gallery || empty($params))
products/photocrati_nextgen/product.photocrati_nextgen.php CHANGED
@@ -37,7 +37,7 @@ class P_Photocrati_NextGen extends C_Base_Product
37
  'photocrati-nextgen_pagination' => 'always',
38
 
39
  // Front-end only
40
- 'photocrati-dynamic_stylesheet' => 'frontend',
41
 
42
  // Backend-only
43
  'photocrati-nextgen_pro_upgrade' => 'backend',
37
  'photocrati-nextgen_pagination' => 'always',
38
 
39
  // Front-end only
40
+ 'photocrati-dynamic_stylesheet' => 'always',
41
 
42
  // Backend-only
43
  'photocrati-nextgen_pro_upgrade' => 'backend',
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.0
5
- Stable tag: 3.9.0
6
  Tested up to: 5.7.0
7
  License: GPLv3
8
  Requires PHP: 5.6
@@ -179,6 +179,10 @@ For more information, feel free to visit the official website for the NextGEN Ga
179
 
180
  == Changelog ==
181
 
 
 
 
 
182
  = V3.9.0 - 03.24.2020 =
183
  * Changed: Resource manager disabled by default
184
  * Changed: Remove ngg_load_frontend_logic filter
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.0
5
+ Stable tag: 3.9.1
6
  Tested up to: 5.7.0
7
  License: GPLv3
8
  Requires PHP: 5.6
179
 
180
  == Changelog ==
181
 
182
+ = V3.9.1 - 03.29.2020 =
183
+ * Fixed: C_Dynamic_Stylesheet_Controller error
184
+ * Fixed: Galleries not displaying
185
+
186
  = V3.9.0 - 03.24.2020 =
187
  * Changed: Resource manager disabled by default
188
  * Changed: Remove ngg_load_frontend_logic filter