Version Description
- 11.22.2016 =
- Secured: Ability to customize CSS Styles
- Changed: readme.txt improvements
- Fixed: Compatibility with WordPress 4.7.0
- Fixed: IGW-inserted tagclouds are incorrect
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 2.1.59 |
Comparing to | |
See all releases |
Code changes from version 2.1.57 to 2.1.59
- changelog.txt +6 -0
- nggallery.php +3 -3
- products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php +6 -1
- products/photocrati_nextgen/modules/nextgen_basic_tagcloud/module.nextgen_basic_tagcloud.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_tagcloud/package.module.nextgen_basic_tagcloud.php +23 -5
- products/photocrati_nextgen/modules/nextgen_other_options/package.module.nextgen_other_options.php +5 -0
- products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/admin/manage.php +3 -1
- readme.txt +11 -5
changelog.txt
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= V2.1.57 - 11.14.2016 =
|
5 |
* Changed: Display type icons are now clickable in the Insert Gallery Window
|
6 |
* Changed: Include backup image files when coping/moving a gallery
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V2.1.59 - 11.22.2016 =
|
5 |
+
* Secured: Ability to customize CSS Styles
|
6 |
+
* Changed: readme.txt improvements
|
7 |
+
* Fixed: Compatibility with WordPress 4.7.0
|
8 |
+
* Fixed: IGW-inserted tagclouds are incorrect
|
9 |
+
|
10 |
= V2.1.57 - 11.14.2016 =
|
11 |
* Changed: Display type icons are now clickable in the Insert Gallery Window
|
12 |
* Changed: Include backup image files when coping/moving a gallery
|
nggallery.php
CHANGED
@@ -3,8 +3,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
3 |
|
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
|
7 |
-
* Version: 2.1.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -596,7 +596,7 @@ class C_NextGEN_Bootstrap
|
|
596 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
597 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
598 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
599 |
-
define('NGG_PLUGIN_VERSION', '2.1.
|
600 |
|
601 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
602 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
3 |
|
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 16 million downloads.
|
7 |
+
* Version: 2.1.59
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
596 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
597 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
598 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
599 |
+
define('NGG_PLUGIN_VERSION', '2.1.59');
|
600 |
|
601 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
602 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php
CHANGED
@@ -79,7 +79,7 @@ class A_NextGen_Basic_Gallery_Mapper extends Mixin
|
|
79 |
$this->object->_set_default_value($entity, 'settings', 'thumbnail_width', $settings->thumbwidth);
|
80 |
$this->object->_set_default_value($entity, 'settings', 'thumbnail_height', $settings->thumbheight);
|
81 |
$this->object->_set_default_value($entity, 'settings', 'cycle_interval', $settings->irRotatetime);
|
82 |
-
$this->object->_set_default_value($entity, 'settings', 'cycle_effect', $settings->
|
83 |
$this->object->_set_default_value($entity, 'settings', 'effect_code', $settings->thumbCode);
|
84 |
$this->object->_set_default_value($entity, 'settings', 'show_thumbnail_link', $settings->galShowSlide ? 1 : 0);
|
85 |
$this->object->_set_default_value($entity, 'settings', 'thumbnail_link_text', $settings->galTextGallery);
|
@@ -244,6 +244,11 @@ class A_NextGen_Basic_Slideshow_Controller extends Mixin
|
|
244 |
$gallery_height = $displayed_gallery->display_settings['gallery_height'];
|
245 |
$params['aspect_ratio'] = $gallery_width / $gallery_height;
|
246 |
$params['placeholder'] = $this->object->get_static_url('photocrati-nextgen_basic_gallery#slideshow/placeholder.gif');
|
|
|
|
|
|
|
|
|
|
|
247 |
// Are we to generate a thumbnail link?
|
248 |
if ($displayed_gallery->display_settings['show_thumbnail_link']) {
|
249 |
$params['thumbnail_link'] = $this->object->get_url_for_alternate_display_type($displayed_gallery, NGG_BASIC_THUMBNAILS);
|
79 |
$this->object->_set_default_value($entity, 'settings', 'thumbnail_width', $settings->thumbwidth);
|
80 |
$this->object->_set_default_value($entity, 'settings', 'thumbnail_height', $settings->thumbheight);
|
81 |
$this->object->_set_default_value($entity, 'settings', 'cycle_interval', $settings->irRotatetime);
|
82 |
+
$this->object->_set_default_value($entity, 'settings', 'cycle_effect', $settings->slideFX);
|
83 |
$this->object->_set_default_value($entity, 'settings', 'effect_code', $settings->thumbCode);
|
84 |
$this->object->_set_default_value($entity, 'settings', 'show_thumbnail_link', $settings->galShowSlide ? 1 : 0);
|
85 |
$this->object->_set_default_value($entity, 'settings', 'thumbnail_link_text', $settings->galTextGallery);
|
244 |
$gallery_height = $displayed_gallery->display_settings['gallery_height'];
|
245 |
$params['aspect_ratio'] = $gallery_width / $gallery_height;
|
246 |
$params['placeholder'] = $this->object->get_static_url('photocrati-nextgen_basic_gallery#slideshow/placeholder.gif');
|
247 |
+
// There was a problem with the slideFX/cycle_effect parameter not getting set
|
248 |
+
// correctly in previous versions
|
249 |
+
if (!isset($params['display_settings']['cycle_effect']) or !$params['cycle_effect']) {
|
250 |
+
$params['cycle_effect'] = 'fade';
|
251 |
+
}
|
252 |
// Are we to generate a thumbnail link?
|
253 |
if ($displayed_gallery->display_settings['show_thumbnail_link']) {
|
254 |
$params['thumbnail_link'] = $this->object->get_url_for_alternate_display_type($displayed_gallery, NGG_BASIC_THUMBNAILS);
|
products/photocrati_nextgen/modules/nextgen_basic_tagcloud/module.nextgen_basic_tagcloud.php
CHANGED
@@ -17,7 +17,7 @@ class M_NextGen_Basic_Tagcloud extends C_Base_Module
|
|
17 |
NGG_BASIC_TAGCLOUD,
|
18 |
'NextGen Basic Tagcloud',
|
19 |
'Provides a tagcloud for NextGEN Gallery',
|
20 |
-
'0.
|
21 |
'https://www.imagely.com',
|
22 |
'Photocrati Media',
|
23 |
'https://www.imagely.com'
|
17 |
NGG_BASIC_TAGCLOUD,
|
18 |
'NextGen Basic Tagcloud',
|
19 |
'Provides a tagcloud for NextGEN Gallery',
|
20 |
+
'0.15',
|
21 |
'https://www.imagely.com',
|
22 |
'Photocrati Media',
|
23 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_basic_tagcloud/package.module.nextgen_basic_tagcloud.php
CHANGED
@@ -9,7 +9,11 @@ class A_NextGen_Basic_Tagcloud extends Mixin
|
|
9 |
function validation()
|
10 |
{
|
11 |
if ($this->object->name == NGG_BASIC_TAGCLOUD) {
|
12 |
-
$this->object->validates_presence_of('
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
return $this->call_parent('validation');
|
15 |
}
|
@@ -31,9 +35,14 @@ class A_NextGen_Basic_Tagcloud_Controller extends Mixin
|
|
31 |
$display_settings = $displayed_gallery->display_settings;
|
32 |
$application = C_Router::get_instance()->get_routed_app();
|
33 |
$tag = urldecode($this->param('gallerytag'));
|
|
|
|
|
|
|
|
|
|
|
34 |
// we're looking at a tag, so show images w/that tag as a thumbnail gallery
|
35 |
if (!is_home() && !empty($tag)) {
|
36 |
-
return C_Displayed_Gallery_Renderer::get_instance()->display_images(array('source' => 'tags', 'container_ids' => array(esc_attr($tag)), 'display_type' => $display_settings['
|
37 |
}
|
38 |
$defaults = array('exclude' => '', 'format' => 'list', 'include' => $displayed_gallery->get_term_ids_for_tags(), 'largest' => 22, 'link' => 'view', 'number' => $display_settings['number'], 'order' => 'ASC', 'orderby' => 'name', 'smallest' => 8, 'taxonomy' => 'ngg_tag', 'unit' => 'pt');
|
39 |
$args = wp_parse_args('', $defaults);
|
@@ -95,6 +104,9 @@ class A_NextGen_Basic_Tagcloud_Form extends Mixin_Display_Type_Form
|
|
95 |
{
|
96 |
$types = array();
|
97 |
$skip_types = array(NGG_BASIC_TAGCLOUD, NGG_BASIC_SINGLEPIC, NGG_BASIC_COMPACT_ALBUM, NGG_BASIC_EXTENDED_ALBUM);
|
|
|
|
|
|
|
98 |
$skip_types = apply_filters('ngg_basic_tagcloud_excluded_display_types', $skip_types);
|
99 |
$mapper = C_Display_Type_Mapper::get_instance();
|
100 |
$display_types = $mapper->find_all();
|
@@ -104,7 +116,7 @@ class A_NextGen_Basic_Tagcloud_Form extends Mixin_Display_Type_Form
|
|
104 |
}
|
105 |
$types[$dt->name] = $dt->title;
|
106 |
}
|
107 |
-
return $this->_render_select_field($display_type, '
|
108 |
}
|
109 |
}
|
110 |
/**
|
@@ -119,7 +131,13 @@ class A_NextGen_Basic_TagCloud_Mapper extends Mixin
|
|
119 |
{
|
120 |
$this->call_parent('set_defaults', $entity);
|
121 |
if (isset($entity->name) && $entity->name == NGG_BASIC_TAGCLOUD) {
|
122 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
$this->object->_set_default_value($entity, 'settings', 'number', 45);
|
124 |
$this->object->_set_default_value($entity, 'settings', 'ngg_triggers_display', 'never');
|
125 |
}
|
@@ -207,7 +225,7 @@ class C_Taxonomy_Controller extends C_MVC_Controller
|
|
207 |
$mapper = C_Display_Type_Mapper::get_instance();
|
208 |
// Respect the global display type setting
|
209 |
$display_type = $mapper->find_by_name(NGG_BASIC_TAGCLOUD, TRUE);
|
210 |
-
$display_type = !empty($display_type->settings['
|
211 |
return "[ngg_images source='tags' container_ids='{$tag}' slug='{$tag}' display_type='{$display_type}']";
|
212 |
}
|
213 |
/**
|
9 |
function validation()
|
10 |
{
|
11 |
if ($this->object->name == NGG_BASIC_TAGCLOUD) {
|
12 |
+
$this->object->validates_presence_of('gallery_display_type');
|
13 |
+
}
|
14 |
+
// If we have a "gallery_display_type", we don't need a "display_type" setting
|
15 |
+
if (isset($this->object->settings['display_type']) && isset($this->object->settings['gallery_display_type'])) {
|
16 |
+
unset($this->object->settings['display_type']);
|
17 |
}
|
18 |
return $this->call_parent('validation');
|
19 |
}
|
35 |
$display_settings = $displayed_gallery->display_settings;
|
36 |
$application = C_Router::get_instance()->get_routed_app();
|
37 |
$tag = urldecode($this->param('gallerytag'));
|
38 |
+
// The display setting 'display_type' has been removed to 'gallery_display_type'
|
39 |
+
if (isset($display_settings['display_type'])) {
|
40 |
+
$display_settings['gallery_display_type'] = $display_settings['display_type'];
|
41 |
+
unset($display_settings['display_type']);
|
42 |
+
}
|
43 |
// we're looking at a tag, so show images w/that tag as a thumbnail gallery
|
44 |
if (!is_home() && !empty($tag)) {
|
45 |
+
return C_Displayed_Gallery_Renderer::get_instance()->display_images(array('source' => 'tags', 'container_ids' => array(esc_attr($tag)), 'display_type' => $display_settings['gallery_display_type'], 'original_display_type' => $displayed_gallery->display_type, 'original_settings' => $display_settings));
|
46 |
}
|
47 |
$defaults = array('exclude' => '', 'format' => 'list', 'include' => $displayed_gallery->get_term_ids_for_tags(), 'largest' => 22, 'link' => 'view', 'number' => $display_settings['number'], 'order' => 'ASC', 'orderby' => 'name', 'smallest' => 8, 'taxonomy' => 'ngg_tag', 'unit' => 'pt');
|
48 |
$args = wp_parse_args('', $defaults);
|
104 |
{
|
105 |
$types = array();
|
106 |
$skip_types = array(NGG_BASIC_TAGCLOUD, NGG_BASIC_SINGLEPIC, NGG_BASIC_COMPACT_ALBUM, NGG_BASIC_EXTENDED_ALBUM);
|
107 |
+
if (!isset($display_type->settings['gallery_type'])) {
|
108 |
+
$display_type->settings['gallery_display_type'] = isset($display_type->settings['display_type']) ? $display_type->settings['display_type'] : '';
|
109 |
+
}
|
110 |
$skip_types = apply_filters('ngg_basic_tagcloud_excluded_display_types', $skip_types);
|
111 |
$mapper = C_Display_Type_Mapper::get_instance();
|
112 |
$display_types = $mapper->find_all();
|
116 |
}
|
117 |
$types[$dt->name] = $dt->title;
|
118 |
}
|
119 |
+
return $this->_render_select_field($display_type, 'gallery_display_type', __('Display type', 'nggallery'), $types, $display_type->settings['gallery_display_type'], __('The display type that the tagcloud will point its results to', 'nggallery'));
|
120 |
}
|
121 |
}
|
122 |
/**
|
131 |
{
|
132 |
$this->call_parent('set_defaults', $entity);
|
133 |
if (isset($entity->name) && $entity->name == NGG_BASIC_TAGCLOUD) {
|
134 |
+
if (isset($entity->display_settings) && is_array($entity->display_settings) && isset($entity->display_settings['display_type'])) {
|
135 |
+
if (!isset($entity->display_settings['gallery_display_type'])) {
|
136 |
+
$entity->display_settings['gallery_display_type'] = $entity->display_settings['display_type'];
|
137 |
+
}
|
138 |
+
unset($entity->display_settings['display_type']);
|
139 |
+
}
|
140 |
+
$this->object->_set_default_value($entity, 'settings', 'gallery_display_type', NGG_BASIC_THUMBNAILS);
|
141 |
$this->object->_set_default_value($entity, 'settings', 'number', 45);
|
142 |
$this->object->_set_default_value($entity, 'settings', 'ngg_triggers_display', 'never');
|
143 |
}
|
225 |
$mapper = C_Display_Type_Mapper::get_instance();
|
226 |
// Respect the global display type setting
|
227 |
$display_type = $mapper->find_by_name(NGG_BASIC_TAGCLOUD, TRUE);
|
228 |
+
$display_type = !empty($display_type->settings['gallery_display_type']) ? $display_type->settings['gallery_display_type'] : NGG_BASIC_THUMBNAILS;
|
229 |
return "[ngg_images source='tags' container_ids='{$tag}' slug='{$tag}' display_type='{$display_type}']";
|
230 |
}
|
231 |
/**
|
products/photocrati_nextgen/modules/nextgen_other_options/package.module.nextgen_other_options.php
CHANGED
@@ -482,6 +482,11 @@ class A_Styles_Form extends Mixin
|
|
482 |
{
|
483 |
// Ensure that we have
|
484 |
if ($settings = $this->object->param('style_settings')) {
|
|
|
|
|
|
|
|
|
|
|
485 |
$this->object->get_model()->set($settings)->save();
|
486 |
// Are we to modify the CSS file?
|
487 |
if ($contents = $this->object->param('cssfile_contents')) {
|
482 |
{
|
483 |
// Ensure that we have
|
484 |
if ($settings = $this->object->param('style_settings')) {
|
485 |
+
// TODO: C_Page's add_error() doesn't seem to work here so we should report that we aren't saving
|
486 |
+
// the desired file, but users shouldn't use this to write files that don't end in .css anyway
|
487 |
+
if (strpos($settings['CSSfile'], '.css', -0) == FALSE) {
|
488 |
+
return FALSE;
|
489 |
+
}
|
490 |
$this->object->get_model()->set($settings)->save();
|
491 |
// Are we to modify the CSS file?
|
492 |
if ($contents = $this->object->param('cssfile_contents')) {
|
products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php
CHANGED
@@ -11,7 +11,7 @@ class M_NextGen_Settings extends C_Base_Module
|
|
11 |
'photocrati-nextgen_settings',
|
12 |
'NextGEN Gallery Settings',
|
13 |
'Provides central management for NextGEN Gallery settings',
|
14 |
-
'0.
|
15 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
16 |
'Photocrati Media',
|
17 |
'https://www.imagely.com'
|
11 |
'photocrati-nextgen_settings',
|
12 |
'NextGEN Gallery Settings',
|
13 |
'Provides central management for NextGEN Gallery settings',
|
14 |
+
'0.15',
|
15 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
16 |
'Photocrati Media',
|
17 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/ngglegacy/admin/manage.php
CHANGED
@@ -238,7 +238,9 @@ class nggManageGallery {
|
|
238 |
|
239 |
function render_image_column_6($output='', $picture=array())
|
240 |
{
|
241 |
-
|
|
|
|
|
242 |
if (is_array($tags)) $tags = implode(', ', $tags);
|
243 |
$tags = esc_html($tags);
|
244 |
|
238 |
|
239 |
function render_image_column_6($output='', $picture=array())
|
240 |
{
|
241 |
+
global $wp_version;
|
242 |
+
$fields = version_compare($wp_version, '4.6', '<=') ? 'fields=names' : array('fields' => 'names');
|
243 |
+
$tags = wp_get_object_terms($picture->pid, 'ngg_tag', $fields);
|
244 |
if (is_array($tags)) $tags = implode(', ', $tags);
|
245 |
$tags = esc_html($tags);
|
246 |
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
=== NextGEN Gallery ===
|
2 |
Contributors: photocrati, imagely
|
3 |
-
Tags:
|
4 |
Requires at least: 4.0.0
|
5 |
-
Stable tag: 2.1.
|
6 |
-
Tested up to: 4.
|
7 |
License: GPLv2
|
8 |
|
9 |
-
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over
|
10 |
|
11 |
== Description ==
|
12 |
|
@@ -187,6 +187,12 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= V2.1.57 - 11.14.2016 =
|
191 |
* Changed: Display type icons are now clickable in the Insert Gallery Window
|
192 |
* Changed: Include backup image files when coping/moving a gallery
|
1 |
+
=== NextGEN Gallery - WordPress Gallery Plugin ===
|
2 |
Contributors: photocrati, imagely
|
3 |
+
Tags: gallery, wordpress gallery plugin, nextgen, nextgen gallery, photo gallery, photo album, photos, image gallery, image, images, photography, photographer, watermarking, responsive gallery, slideshow, thumbnail gallery, watermarking, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
+
Stable tag: 2.1.59
|
6 |
+
Tested up to: 4.7.0
|
7 |
License: GPLv2
|
8 |
|
9 |
+
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 16 million downloads.
|
10 |
|
11 |
== Description ==
|
12 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= V2.1.59 - 11.22.2016 =
|
191 |
+
* Secured: Ability to customize CSS Styles
|
192 |
+
* Changed: readme.txt improvements
|
193 |
+
* Fixed: Compatibility with WordPress 4.7.0
|
194 |
+
* Fixed: IGW-inserted tagclouds are incorrect
|
195 |
+
|
196 |
= V2.1.57 - 11.14.2016 =
|
197 |
* Changed: Display type icons are now clickable in the Insert Gallery Window
|
198 |
* Changed: Include backup image files when coping/moving a gallery
|