NextGEN Gallery – WordPress Gallery Plugin - Version 2.0.66.31

Version Description

Download this release

Release Info

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

Code changes from version 2.0.66.29 to 2.0.66.31

changelog.txt CHANGED
@@ -1,6 +1,9 @@
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
 
 
 
4
  = V2.0.66.29 - 09.17.2014 =
5
  * NEW: Added skip_excluding_globally_excluded_images property to displayed gallery objects
6
  * Fixed: SQL generation for random image selection
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
4
+ = V2.0.66.31 - 11.21.2014 =
5
+ * Fixed: Broken shortcodes with WordPress 4.0.1
6
+
7
  = V2.0.66.29 - 09.17.2014 =
8
  * NEW: Added skip_excluding_globally_excluded_images property to displayed gallery objects
9
  * Fixed: SQL generation for random image selection
nggallery.php CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
4
  /**
5
  * Plugin Name: NextGEN Gallery by Photocrati
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 9 million downloads.
7
- * Version: 2.0.66.29
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
@@ -431,7 +431,7 @@ class C_NextGEN_Bootstrap
431
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
432
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
433
  define('NGG_PLUGIN_STARTED_AT', microtime());
434
- define('NGG_PLUGIN_VERSION', '2.0.66.29');
435
 
436
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
437
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
4
  /**
5
  * Plugin Name: NextGEN Gallery by Photocrati
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 9 million downloads.
7
+ * Version: 2.0.66.31
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
431
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
432
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
433
  define('NGG_PLUGIN_STARTED_AT', microtime());
434
+ define('NGG_PLUGIN_VERSION', '2.0.66.31');
435
 
436
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
437
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
non_pope/class.nextgen_shortcode_manager.php CHANGED
@@ -63,25 +63,25 @@ class C_NextGen_Shortcode_Manager
63
  */
64
  function deactivate_all($content)
65
  {
66
- // There is a bug in Wordpress itself: when a hook recurses any hooks meant to execute after it are discarded.
67
- // For example the following code, despite expectations, will NOT display 'bar' as bar() is never executed.
68
- // See https://core.trac.wordpress.org/ticket/17817 for more information.
69
- /* function foo() {
70
- * remove_action('foo', 'foo');
71
- * }
72
- * function bar() {
73
- * echo('bar');
74
- * }
75
- * add_action('foo', 'foo');
76
- * add_action('foo', 'bar');
77
- * do_action('foo');
78
- */
79
- $this->_runlevel += 1;
80
- if ($this->_runlevel > 1 && defined('WP_DEBUG') && WP_DEBUG && !is_admin() && !$this->_has_warned)
81
- {
82
- $this->_has_warned = TRUE;
83
- error_log('Sorry, but recursing filters on "the_content" breaks NextGEN Gallery. Please see https://core.trac.wordpress.org/ticket/17817 and NGG_DISABLE_FILTER_THE_CONTENT');
84
- }
85
 
86
  foreach (array_keys($this->_shortcodes) as $shortcode) {
87
  $this->deactivate($shortcode);
@@ -133,7 +133,7 @@ class C_NextGen_Shortcode_Manager
133
  function activate($shortcode)
134
  {
135
  if (isset($this->_shortcodes[$shortcode])) {
136
- add_shortcode($shortcode, $this->_shortcodes[$shortcode]);
137
  }
138
  }
139
 
@@ -156,4 +156,34 @@ class C_NextGen_Shortcode_Manager
156
  if (isset($this->_shortcodes[$shortcode]))
157
  remove_shortcode($shortcode);
158
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
63
  */
64
  function deactivate_all($content)
65
  {
66
+ // There is a bug in Wordpress itself: when a hook recurses any hooks meant to execute after it are discarded.
67
+ // For example the following code, despite expectations, will NOT display 'bar' as bar() is never executed.
68
+ // See https://core.trac.wordpress.org/ticket/17817 for more information.
69
+ /* function foo() {
70
+ * remove_action('foo', 'foo');
71
+ * }
72
+ * function bar() {
73
+ * echo('bar');
74
+ * }
75
+ * add_action('foo', 'foo');
76
+ * add_action('foo', 'bar');
77
+ * do_action('foo');
78
+ */
79
+ $this->_runlevel += 1;
80
+ if ($this->_runlevel > 1 && defined('WP_DEBUG') && WP_DEBUG && !is_admin() && !$this->_has_warned)
81
+ {
82
+ $this->_has_warned = TRUE;
83
+ error_log('Sorry, but recursing filters on "the_content" breaks NextGEN Gallery. Please see https://core.trac.wordpress.org/ticket/17817 and NGG_DISABLE_FILTER_THE_CONTENT');
84
+ }
85
 
86
  foreach (array_keys($this->_shortcodes) as $shortcode) {
87
  $this->deactivate($shortcode);
133
  function activate($shortcode)
134
  {
135
  if (isset($this->_shortcodes[$shortcode])) {
136
+ add_shortcode($shortcode, array(&$this, "{$shortcode}__callback"));
137
  }
138
  }
139
 
156
  if (isset($this->_shortcodes[$shortcode]))
157
  remove_shortcode($shortcode);
158
  }
159
+
160
+ function __call($method, $params)
161
+ {
162
+ $retval = NULL;
163
+
164
+ if (strpos($method, '__callback') !== FALSE) {
165
+ $parts = explode('__callback', $method);
166
+ $shortcode = $parts[0];
167
+ $inner_content = isset($params[1]) ? $params[1] : '';
168
+ $params = isset($params[0]) ? $params[0] : array();
169
+ $retval = $this->callback_wrapper($shortcode, $params, $inner_content);
170
+ }
171
+
172
+ return $retval;
173
+ }
174
+
175
+ function callback_wrapper($shortcode, $params, $inner_content)
176
+ {
177
+ $retval = '';
178
+
179
+ foreach ($params as $key => &$val) {
180
+ $val = preg_replace("/^(&[^;]+;)?(.*)/", '\2', $val);
181
+ $val = preg_replace("/(&[^;]+;)?$/", '', $val);
182
+ }
183
+
184
+ if (isset($this->_shortcodes[$shortcode]))
185
+ $retval = call_user_func($this->_shortcodes[$shortcode], $params, $inner_content);
186
+
187
+ return $retval;
188
+ }
189
  }
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === NextGEN Gallery ===
2
  Contributors: photocrati
3
- Tags:gallery,image,images,photo,photos,picture,pictures,slideshow,flash,media,thumbnails,photo-albums,nextgen-gallery,nextgen
4
  Requires at least: 3.6.1
5
  Tested up to: 4.0
6
  Stable tag: trunk
@@ -60,7 +60,7 @@ NextGEN has been the dominant WordPress gallery plugin for years. As a result, t
60
  *See <a href="http://www.nextgen-gallery.com/help/" target="_blank">NextGEN Gallery Documentation</a><br>
61
  *Get <a href="http://wordpress.org/tags/nextgen-gallery?forum_id=10" target="_blank">NextGEN Support</a> via the WordPress.org forums<br>
62
  *Get <a href="http://www.nextgen-gallery.com/languages/" target="_blank">Translations</a> for your own language<br>
63
- *See <a href="http://www.photocrati.com/photography-wordpress-themes" target="_blank">WordPress Photography Themes</a> by the same author<br>
64
  *Follow NextGEN Gallery on <a title="Follow NextGEN Gallery on Facebook" href="http://www.facebook.com/NextGENGallery" target="_blank">Facebook</a>, <a title="Follow NextGEN Gallery on Twitter" href="http://twitter.com/NextGENGallery" target="_blank">Twitter</a>, and <a title="Follow NextGEN Gallery on Google +" href="http://plus.google.com/101643895780935290171" target="_blank">Google +</a><br>
65
 
66
 
1
  === NextGEN Gallery ===
2
  Contributors: photocrati
3
+ Tags: nextgen, nextgen gallery, gallery, galleries, image, images, image gallery, photo, photos, photo gallery, picture, pictures, picture gallery, album, albums, photo albums, image album, media, media gallery, thumbnails, thumbnail gallery, thumbnail galleries, slideshow, slideshows, slideshow gallery, slideshow galleries, fancybox, lightbox, responsive, responsive gallery, responsive galleries, wordpress responsive gallery, nextcellent, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins, best gallery plugin, free photo gallery, singlepic, image captions imagebrowser, watermarks, watermarking, photography, photographer
4
  Requires at least: 3.6.1
5
  Tested up to: 4.0
6
  Stable tag: trunk
60
  *See <a href="http://www.nextgen-gallery.com/help/" target="_blank">NextGEN Gallery Documentation</a><br>
61
  *Get <a href="http://wordpress.org/tags/nextgen-gallery?forum_id=10" target="_blank">NextGEN Support</a> via the WordPress.org forums<br>
62
  *Get <a href="http://www.nextgen-gallery.com/languages/" target="_blank">Translations</a> for your own language<br>
63
+ *See <a href="http://www.photocrati.com/wordpress-photography-themes" target="_blank">WordPress Photography Themes</a> by the same author<br>
64
  *Follow NextGEN Gallery on <a title="Follow NextGEN Gallery on Facebook" href="http://www.facebook.com/NextGENGallery" target="_blank">Facebook</a>, <a title="Follow NextGEN Gallery on Twitter" href="http://twitter.com/NextGENGallery" target="_blank">Twitter</a>, and <a title="Follow NextGEN Gallery on Google +" href="http://plus.google.com/101643895780935290171" target="_blank">Google +</a><br>
65
 
66
 
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file
screenshot-8.png DELETED
Binary file
screenshot-9.png DELETED
Binary file