Version Description
- 09.15.2021
- Fixed: NGG 3.16 created a problem with the Manage Gallery page's Edit Thumbnail, Rotate Image, and View Meta popups
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 3.17 |
Comparing to | |
See all releases |
Code changes from version 3.16 to 3.17
changelog.txt
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
4 |
= V3.16 - 09.08.2021
|
5 |
* Fixed: Links on "Extensions" page were incorrect
|
6 |
* Fixed: Incompatibility with WP User Manager caused Manage Gallery bulk actions to be unusable
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V3.17 - 09.15.2021
|
5 |
+
* Fixed: NGG 3.16 created a problem with the Manage Gallery page's Edit Thumbnail, Rotate Image, and View Meta popups
|
6 |
+
|
7 |
= V3.16 - 09.08.2021
|
8 |
* Fixed: Links on "Extensions" page were incorrect
|
9 |
* Fixed: Incompatibility with WP User Manager caused Manage Gallery bulk actions to be unusable
|
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.
|
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.
|
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.17
|
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.17');
|
716 |
|
717 |
define(
|
718 |
'NGG_SCRIPT_VERSION',
|
products/photocrati_nextgen/modules/ngglegacy/admin/admin.php
CHANGED
@@ -225,6 +225,7 @@ class nggAdminPanel{
|
|
225 |
wp_enqueue_script( 'shutter' );
|
226 |
|
227 |
// Thickbox is used to display images being managed
|
|
|
228 |
C_Lightbox_Library_Manager::get_instance()->enqueue('thickbox');
|
229 |
|
230 |
break;
|
225 |
wp_enqueue_script( 'shutter' );
|
226 |
|
227 |
// Thickbox is used to display images being managed
|
228 |
+
wp_dequeue_script('thickbox');
|
229 |
C_Lightbox_Library_Manager::get_instance()->enqueue('thickbox');
|
230 |
|
231 |
break;
|
products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php
CHANGED
@@ -87,240 +87,6 @@ function nggallery_picturelist($controller)
|
|
87 |
|
88 |
?>
|
89 |
|
90 |
-
<script type="text/javascript">
|
91 |
-
(function($) {
|
92 |
-
// $('span.tooltip, label.tooltip').tooltip();
|
93 |
-
|
94 |
-
$('#ngg-manage-images-items-per-page').on('change', function() {
|
95 |
-
window.location.href = setURLParam('items', $(this).val());
|
96 |
-
});
|
97 |
-
|
98 |
-
// load a content via ajax
|
99 |
-
$('a.ngg-dialog').on('click', function() {
|
100 |
-
var dialogs = $('.ngg-overlay-dialog:visible');
|
101 |
-
if (dialogs.length > 0) {
|
102 |
-
return false;
|
103 |
-
}
|
104 |
-
|
105 |
-
if ($("#spinner").length === 0) {
|
106 |
-
$("body").append('<div id="spinner"></div>');
|
107 |
-
}
|
108 |
-
|
109 |
-
var $this = $(this);
|
110 |
-
var results = new RegExp('[\\?&]w=([^&#]*)').exec(this.href);
|
111 |
-
var width = (results) ? results[1] : 800;
|
112 |
-
results = new RegExp('[\\?&]h=([^&#]*)').exec(this.href);
|
113 |
-
var height = (results) ? results[1] : 500;
|
114 |
-
var container = window;
|
115 |
-
|
116 |
-
var screen_width = window.innerWidth - 120;
|
117 |
-
var screen_height = window.innerHeight - 200;
|
118 |
-
width = (width > screen_width) ? screen_width : width;
|
119 |
-
height = (height > screen_height) ? screen_height : height;
|
120 |
-
|
121 |
-
if (window.parent) {
|
122 |
-
container = window.parent;
|
123 |
-
}
|
124 |
-
|
125 |
-
$('#spinner').fadeIn()
|
126 |
-
.position({my: "center", at: "center", of: container });
|
127 |
-
|
128 |
-
// load the remote content
|
129 |
-
var dialog = $('<div class="ngg-overlay-dialog"></div>').appendTo('body');
|
130 |
-
dialog.load(
|
131 |
-
this.href,
|
132 |
-
{},
|
133 |
-
function() {
|
134 |
-
$('#spinner').hide();
|
135 |
-
|
136 |
-
dialog.dialog({
|
137 |
-
title: ($this.attr('title')) ? $this.attr('title') : '',
|
138 |
-
position: { my: "center center-30", at: "center", of: window.parent },
|
139 |
-
width: width,
|
140 |
-
height: height,
|
141 |
-
modal: true,
|
142 |
-
resizable: false,
|
143 |
-
close: function() {
|
144 |
-
dialog.remove();
|
145 |
-
}
|
146 |
-
}).width(width - 30)
|
147 |
-
.height(height - 30);
|
148 |
-
|
149 |
-
$('.ui-dialog-titlebar-close').text('X')
|
150 |
-
}
|
151 |
-
);
|
152 |
-
|
153 |
-
//prevent the browser to follow the link
|
154 |
-
return false;
|
155 |
-
});
|
156 |
-
|
157 |
-
// If too many of these are generated the cookie becomes so large servers will reject HTTP requests
|
158 |
-
// Wait some time for other listeners to catch this event and then purge it from the browser
|
159 |
-
Frame_Event_Publisher.listen_for('attach_to_post:thumbnail_modified', function(data) {
|
160 |
-
setTimeout(function() {
|
161 |
-
Frame_Event_Publisher.delete_cookie("X-Frame-Events_" + data.id);
|
162 |
-
}, 400);
|
163 |
-
});
|
164 |
-
|
165 |
-
window.showDialog = function(windowId, title) {
|
166 |
-
var form = document.getElementById('updategallery');
|
167 |
-
var elementlist = "";
|
168 |
-
|
169 |
-
for (var i = 0, n = form.elements.length; i < n; i++) {
|
170 |
-
if (form.elements[i].type === "checkbox") {
|
171 |
-
if (form.elements[i].name === "doaction[]") {
|
172 |
-
if (form.elements[i].checked === true) {
|
173 |
-
if (elementlist === "") {
|
174 |
-
elementlist = form.elements[i].value;
|
175 |
-
} else {
|
176 |
-
elementlist += "," + form.elements[i].value;
|
177 |
-
}
|
178 |
-
}
|
179 |
-
}
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
$("#" + windowId + "_bulkaction").val($("#bulkaction").val());
|
184 |
-
$("#" + windowId + "_imagelist").val(elementlist);
|
185 |
-
|
186 |
-
// now show the dialog
|
187 |
-
$("#" + windowId).dialog({
|
188 |
-
width: 640,
|
189 |
-
resizable: false,
|
190 |
-
modal: true,
|
191 |
-
title: title,
|
192 |
-
position: {
|
193 |
-
my: 'center',
|
194 |
-
at: 'center',
|
195 |
-
of: window.parent
|
196 |
-
}
|
197 |
-
});
|
198 |
-
|
199 |
-
$("#" + windowId + ' .dialog-cancel').on('click', function() {
|
200 |
-
$("#" + windowId).dialog("close");
|
201 |
-
});
|
202 |
-
}
|
203 |
-
|
204 |
-
window.setURLParam = function(param, paramVal) {
|
205 |
-
var url = window.location.href;
|
206 |
-
var params = "";
|
207 |
-
var tmp = "";
|
208 |
-
var tmpArray = url.split("?");
|
209 |
-
var base = tmpArray[0];
|
210 |
-
var additional = tmpArray[1];
|
211 |
-
|
212 |
-
if (additional) {
|
213 |
-
tmpArray = additional.split("&");
|
214 |
-
for (i = 0; i < tmpArray.length; i++) {
|
215 |
-
if (tmpArray[i].split('=')[0] !== param) {
|
216 |
-
params += tmp + tmpArray[i];
|
217 |
-
tmp = "&";
|
218 |
-
}
|
219 |
-
}
|
220 |
-
}
|
221 |
-
|
222 |
-
return base + "?" + params + tmp + "" + param + "=" + paramVal;
|
223 |
-
}
|
224 |
-
|
225 |
-
window.checkAll = function(form) {
|
226 |
-
for (var i = 0, n = form.elements.length; i < n; i++) {
|
227 |
-
if (form.elements[i].type === "checkbox") {
|
228 |
-
if (form.elements[i].name === "doaction[]") {
|
229 |
-
if (form.elements[i].checked == true) {
|
230 |
-
form.elements[i].checked = false;
|
231 |
-
} else {
|
232 |
-
form.elements[i].checked = true;
|
233 |
-
}
|
234 |
-
}
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
window.getNumChecked = function(form) {
|
240 |
-
var num = 0;
|
241 |
-
for (var i = 0, n = form.elements.length; i < n; i++) {
|
242 |
-
if (form.elements[i].type === "checkbox") {
|
243 |
-
if (form.elements[i].name === "doaction[]") {
|
244 |
-
if (form.elements[i].checked === true) {
|
245 |
-
num++;
|
246 |
-
}
|
247 |
-
}
|
248 |
-
}
|
249 |
-
}
|
250 |
-
return num;
|
251 |
-
}
|
252 |
-
|
253 |
-
// this function check for a the number of selected images, sumbmit false when no one selected
|
254 |
-
window.checkSelected = function() {
|
255 |
-
|
256 |
-
var numchecked = getNumChecked(document.getElementById('updategallery'));
|
257 |
-
|
258 |
-
if (typeof document.activeElement == "undefined" && document.addEventListener) {
|
259 |
-
document.addEventListener("focus", function (e) {
|
260 |
-
document.activeElement = e.target;
|
261 |
-
}, true);
|
262 |
-
}
|
263 |
-
|
264 |
-
if (document.activeElement.name === 'post_paged')
|
265 |
-
return true;
|
266 |
-
|
267 |
-
if (numchecked < 1) {
|
268 |
-
alert('<?php echo esc_js(__('No images selected', 'nggallery')); ?>');
|
269 |
-
return false;
|
270 |
-
}
|
271 |
-
|
272 |
-
var actionId = document.getElementById('bulkaction').value;
|
273 |
-
|
274 |
-
switch (actionId) {
|
275 |
-
case "copy_to":
|
276 |
-
showDialog('selectgallery', '<?php echo esc_js(__('Copy image to...','nggallery')); ?>');
|
277 |
-
return false;
|
278 |
-
break;
|
279 |
-
case "move_to":
|
280 |
-
showDialog('selectgallery', '<?php echo esc_js(__('Move image to...','nggallery')); ?>');
|
281 |
-
return false;
|
282 |
-
break;
|
283 |
-
case "add_tags":
|
284 |
-
showDialog('entertags', '<?php echo esc_js(__('Add new tags','nggallery')); ?>');
|
285 |
-
return false;
|
286 |
-
break;
|
287 |
-
case "delete_tags":
|
288 |
-
showDialog('entertags', '<?php echo esc_js(__('Delete tags','nggallery')); ?>');
|
289 |
-
return false;
|
290 |
-
break;
|
291 |
-
case "overwrite_tags":
|
292 |
-
showDialog('entertags', '<?php echo esc_js(__('Overwrite','nggallery')); ?>');
|
293 |
-
return false;
|
294 |
-
break;
|
295 |
-
case "resize_images":
|
296 |
-
showDialog('resize_images', '<?php echo esc_js(__('Resize images','nggallery')); ?>');
|
297 |
-
return false;
|
298 |
-
break;
|
299 |
-
case "new_thumbnail":
|
300 |
-
showDialog('new_thumbnail', '<?php echo esc_js(__('Create new thumbnails','nggallery')); ?>');
|
301 |
-
return false;
|
302 |
-
break;
|
303 |
-
}
|
304 |
-
|
305 |
-
return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>');
|
306 |
-
}
|
307 |
-
|
308 |
-
if ($(this).data('ready')) {
|
309 |
-
return;
|
310 |
-
}
|
311 |
-
|
312 |
-
// close postboxes that should be closed
|
313 |
-
$('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
314 |
-
|
315 |
-
// Some third party plugins alter when postboxes are enqueued, so give this line a second to wait for it to be available
|
316 |
-
setTimeout(function() {
|
317 |
-
postboxes.add_postbox_toggles('ngg-manage-gallery');
|
318 |
-
}, 1000);
|
319 |
-
|
320 |
-
$(this).data('ready', true);
|
321 |
-
})(jQuery);
|
322 |
-
</script>
|
323 |
-
|
324 |
<?php if ($action_status['message'] != '') { ?>
|
325 |
<div id="message"
|
326 |
class="<?php echo ($action_status['status'] == 'ok' ? 'updated' : $action_status['status']); ?> fade">
|
@@ -754,23 +520,249 @@ function nggallery_picturelist($controller)
|
|
754 |
<!-- /#new_thumbnail -->
|
755 |
|
756 |
<script type="text/javascript">
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
774 |
</script>
|
775 |
<?php
|
776 |
}
|
87 |
|
88 |
?>
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
<?php if ($action_status['message'] != '') { ?>
|
91 |
<div id="message"
|
92 |
class="<?php echo ($action_status['status'] == 'ok' ? 'updated' : $action_status['status']); ?> fade">
|
520 |
<!-- /#new_thumbnail -->
|
521 |
|
522 |
<script type="text/javascript">
|
523 |
+
(function($) {
|
524 |
+
$('#ngg-manage-images-items-per-page').on('change', function() {
|
525 |
+
window.location.href = setURLParam('items', $(this).val());
|
526 |
+
});
|
527 |
+
|
528 |
+
// load a content via ajax
|
529 |
+
$('a.ngg-dialog').on('click', function() {
|
530 |
+
var dialogs = $('.ngg-overlay-dialog:visible');
|
531 |
+
if (dialogs.length > 0) {
|
532 |
+
return false;
|
533 |
+
}
|
534 |
+
|
535 |
+
if ($("#spinner").length === 0) {
|
536 |
+
$("body").append('<div id="spinner"></div>');
|
537 |
+
}
|
538 |
+
|
539 |
+
var $this = $(this);
|
540 |
+
var results = new RegExp('[\\?&]w=([^&#]*)').exec(this.href);
|
541 |
+
var width = (results) ? results[1] : 800;
|
542 |
+
results = new RegExp('[\\?&]h=([^&#]*)').exec(this.href);
|
543 |
+
var height = (results) ? results[1] : 500;
|
544 |
+
var container = window;
|
545 |
+
|
546 |
+
var screen_width = window.innerWidth - 120;
|
547 |
+
var screen_height = window.innerHeight - 200;
|
548 |
+
width = (width > screen_width) ? screen_width : width;
|
549 |
+
height = (height > screen_height) ? screen_height : height;
|
550 |
+
|
551 |
+
if (window.parent) {
|
552 |
+
container = window.parent;
|
553 |
+
}
|
554 |
+
|
555 |
+
$('#spinner').fadeIn()
|
556 |
+
.position({my: "center", at: "center", of: container });
|
557 |
+
|
558 |
+
// load the remote content
|
559 |
+
var dialog = $('<div class="ngg-overlay-dialog"></div>').appendTo('body');
|
560 |
+
dialog.load(
|
561 |
+
this.href,
|
562 |
+
{},
|
563 |
+
function() {
|
564 |
+
$('#spinner').hide();
|
565 |
+
|
566 |
+
dialog.dialog({
|
567 |
+
title: ($this.attr('title')) ? $this.attr('title') : '',
|
568 |
+
position: { my: "center center-30", at: "center", of: window.parent },
|
569 |
+
width: width,
|
570 |
+
height: height,
|
571 |
+
modal: true,
|
572 |
+
resizable: false,
|
573 |
+
close: function() {
|
574 |
+
dialog.remove();
|
575 |
+
}
|
576 |
+
}).width(width - 30)
|
577 |
+
.height(height - 30);
|
578 |
+
|
579 |
+
$('.ui-dialog-titlebar-close').text('X')
|
580 |
+
}
|
581 |
+
);
|
582 |
+
|
583 |
+
//prevent the browser to follow the link
|
584 |
+
return false;
|
585 |
+
});
|
586 |
+
|
587 |
+
// If too many of these are generated the cookie becomes so large servers will reject HTTP requests
|
588 |
+
// Wait some time for other listeners to catch this event and then purge it from the browser
|
589 |
+
Frame_Event_Publisher.listen_for('attach_to_post:thumbnail_modified', function(data) {
|
590 |
+
setTimeout(function() {
|
591 |
+
Frame_Event_Publisher.delete_cookie("X-Frame-Events_" + data.id);
|
592 |
+
}, 400);
|
593 |
+
});
|
594 |
+
|
595 |
+
window.showDialog = function(windowId, title) {
|
596 |
+
var form = document.getElementById('updategallery');
|
597 |
+
var elementlist = "";
|
598 |
+
|
599 |
+
for (var i = 0, n = form.elements.length; i < n; i++) {
|
600 |
+
if (form.elements[i].type === "checkbox") {
|
601 |
+
if (form.elements[i].name === "doaction[]") {
|
602 |
+
if (form.elements[i].checked === true) {
|
603 |
+
if (elementlist === "") {
|
604 |
+
elementlist = form.elements[i].value;
|
605 |
+
} else {
|
606 |
+
elementlist += "," + form.elements[i].value;
|
607 |
+
}
|
608 |
+
}
|
609 |
+
}
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
$("#" + windowId + "_bulkaction").val($("#bulkaction").val());
|
614 |
+
$("#" + windowId + "_imagelist").val(elementlist);
|
615 |
+
|
616 |
+
// now show the dialog
|
617 |
+
$("#" + windowId).dialog({
|
618 |
+
width: 640,
|
619 |
+
resizable: false,
|
620 |
+
modal: true,
|
621 |
+
title: title,
|
622 |
+
position: {
|
623 |
+
my: 'center',
|
624 |
+
at: 'center',
|
625 |
+
of: window.parent
|
626 |
+
}
|
627 |
+
});
|
628 |
+
|
629 |
+
$("#" + windowId + ' .dialog-cancel').on('click', function() {
|
630 |
+
$("#" + windowId).dialog("close");
|
631 |
+
});
|
632 |
+
}
|
633 |
+
|
634 |
+
window.setURLParam = function(param, paramVal) {
|
635 |
+
var url = window.location.href;
|
636 |
+
var params = "";
|
637 |
+
var tmp = "";
|
638 |
+
var tmpArray = url.split("?");
|
639 |
+
var base = tmpArray[0];
|
640 |
+
var additional = tmpArray[1];
|
641 |
+
|
642 |
+
if (additional) {
|
643 |
+
tmpArray = additional.split("&");
|
644 |
+
for (i = 0; i < tmpArray.length; i++) {
|
645 |
+
if (tmpArray[i].split('=')[0] !== param) {
|
646 |
+
params += tmp + tmpArray[i];
|
647 |
+
tmp = "&";
|
648 |
+
}
|
649 |
+
}
|
650 |
+
}
|
651 |
+
|
652 |
+
return base + "?" + params + tmp + "" + param + "=" + paramVal;
|
653 |
+
}
|
654 |
+
|
655 |
+
window.checkAll = function(form) {
|
656 |
+
for (var i = 0, n = form.elements.length; i < n; i++) {
|
657 |
+
if (form.elements[i].type === "checkbox") {
|
658 |
+
if (form.elements[i].name === "doaction[]") {
|
659 |
+
if (form.elements[i].checked == true) {
|
660 |
+
form.elements[i].checked = false;
|
661 |
+
} else {
|
662 |
+
form.elements[i].checked = true;
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
}
|
668 |
+
|
669 |
+
window.getNumChecked = function(form) {
|
670 |
+
var num = 0;
|
671 |
+
for (var i = 0, n = form.elements.length; i < n; i++) {
|
672 |
+
if (form.elements[i].type === "checkbox") {
|
673 |
+
if (form.elements[i].name === "doaction[]") {
|
674 |
+
if (form.elements[i].checked === true) {
|
675 |
+
num++;
|
676 |
+
}
|
677 |
+
}
|
678 |
+
}
|
679 |
+
}
|
680 |
+
return num;
|
681 |
+
}
|
682 |
+
|
683 |
+
// this function check for a the number of selected images, sumbmit false when no one selected
|
684 |
+
window.checkSelected = function() {
|
685 |
+
|
686 |
+
var numchecked = getNumChecked(document.getElementById('updategallery'));
|
687 |
+
|
688 |
+
if (typeof document.activeElement == "undefined" && document.addEventListener) {
|
689 |
+
document.addEventListener("focus", function (e) {
|
690 |
+
document.activeElement = e.target;
|
691 |
+
}, true);
|
692 |
+
}
|
693 |
+
|
694 |
+
if (document.activeElement.name === 'post_paged')
|
695 |
+
return true;
|
696 |
+
|
697 |
+
if (numchecked < 1) {
|
698 |
+
alert('<?php echo esc_js(__('No images selected', 'nggallery')); ?>');
|
699 |
+
return false;
|
700 |
+
}
|
701 |
+
|
702 |
+
var actionId = document.getElementById('bulkaction').value;
|
703 |
+
|
704 |
+
switch (actionId) {
|
705 |
+
case "copy_to":
|
706 |
+
showDialog('selectgallery', '<?php echo esc_js(__('Copy image to...','nggallery')); ?>');
|
707 |
+
return false;
|
708 |
+
break;
|
709 |
+
case "move_to":
|
710 |
+
showDialog('selectgallery', '<?php echo esc_js(__('Move image to...','nggallery')); ?>');
|
711 |
+
return false;
|
712 |
+
break;
|
713 |
+
case "add_tags":
|
714 |
+
showDialog('entertags', '<?php echo esc_js(__('Add new tags','nggallery')); ?>');
|
715 |
+
return false;
|
716 |
+
break;
|
717 |
+
case "delete_tags":
|
718 |
+
showDialog('entertags', '<?php echo esc_js(__('Delete tags','nggallery')); ?>');
|
719 |
+
return false;
|
720 |
+
break;
|
721 |
+
case "overwrite_tags":
|
722 |
+
showDialog('entertags', '<?php echo esc_js(__('Overwrite','nggallery')); ?>');
|
723 |
+
return false;
|
724 |
+
break;
|
725 |
+
case "resize_images":
|
726 |
+
showDialog('resize_images', '<?php echo esc_js(__('Resize images','nggallery')); ?>');
|
727 |
+
return false;
|
728 |
+
break;
|
729 |
+
case "new_thumbnail":
|
730 |
+
showDialog('new_thumbnail', '<?php echo esc_js(__('Create new thumbnails','nggallery')); ?>');
|
731 |
+
return false;
|
732 |
+
break;
|
733 |
+
}
|
734 |
+
|
735 |
+
return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>');
|
736 |
+
}
|
737 |
+
|
738 |
+
if ($(this).data('ready')) {
|
739 |
+
return;
|
740 |
+
}
|
741 |
+
|
742 |
+
// close postboxes that should be closed
|
743 |
+
$('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
744 |
+
|
745 |
+
// Some third party plugins alter when postboxes are enqueued, so give this line a second to wait for it to be available
|
746 |
+
setTimeout(function() {
|
747 |
+
postboxes.add_postbox_toggles('ngg-manage-gallery');
|
748 |
+
}, 1000);
|
749 |
+
|
750 |
+
$(this).data('ready', true);
|
751 |
+
|
752 |
+
columns.init('nggallery-manage-images');
|
753 |
+
|
754 |
+
// Ensure that thumb preview images are always up-to-date
|
755 |
+
$('#ngg-listimages img.thumb').each(function () {
|
756 |
+
var $this = $(this);
|
757 |
+
var src = $this.attr('src');
|
758 |
+
var matchData = src.match(/\?i=(\d+)$/);
|
759 |
+
if (matchData) {
|
760 |
+
var i = parseInt(matchData[1]) + 1;
|
761 |
+
src = src.replace(matchData[0], "?i=" + i.toString());
|
762 |
+
$this.attr('src', src);
|
763 |
+
}
|
764 |
+
})
|
765 |
+
})(jQuery);
|
766 |
</script>
|
767 |
<?php
|
768 |
}
|
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.
|
6 |
Tested up to: 5.8
|
7 |
License: GPLv3
|
8 |
Requires PHP: 5.6
|
@@ -179,6 +179,9 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
182 |
= V3.16 - 09.08.2021
|
183 |
* Fixed: Links on "Extensions" page were incorrect
|
184 |
* Fixed: Incompatibility with WP User Manager caused Manage Gallery bulk actions to be unusable
|
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.17
|
6 |
Tested up to: 5.8
|
7 |
License: GPLv3
|
8 |
Requires PHP: 5.6
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= V3.17 - 09.15.2021
|
183 |
+
* Fixed: NGG 3.16 created a problem with the Manage Gallery page's Edit Thumbnail, Rotate Image, and View Meta popups
|
184 |
+
|
185 |
= V3.16 - 09.08.2021
|
186 |
* Fixed: Links on "Extensions" page were incorrect
|
187 |
* Fixed: Incompatibility with WP User Manager caused Manage Gallery bulk actions to be unusable
|