Version Description
- Changed: Save images ordering in admin.
- Fixed: Warnings in filemanager.
- Fixed: Prevent opening lightbox on swipe.
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.2.40 |
Comparing to | |
See all releases |
Code changes from version 1.2.39 to 1.2.40
- admin/controllers/BWGControllerGalleries_bwg.php +10 -10
- admin/models/BWGModelGalleries_bwg.php +4 -2
- admin/models/BWGModelUninstall_bwg.php +2 -1
- admin/views/BWGViewEditThumb.php +4 -4
- admin/views/BWGViewGalleries_bwg.php +9 -8
- filemanager/UploadHandler.php +4 -4
- frontend/views/BWGViewAlbum_compact_preview.php +2 -2
- frontend/views/BWGViewAlbum_extended_preview.php +2 -2
- frontend/views/BWGViewImage_browser.php +1 -1
- frontend/views/BWGViewThumbnails.php +1 -1
- js/bwg.js +5 -0
- photo-gallery.php +3 -3
- readme.txt +6 -1
admin/controllers/BWGControllerGalleries_bwg.php
CHANGED
@@ -185,7 +185,7 @@ class BWGControllerGalleries_bwg {
|
|
185 |
list($width_orig, $height_orig, $type_orig) = getimagesize($filename);
|
186 |
$percent = $width_orig / $thumb_width;
|
187 |
$thumb_height = $height_orig / $percent;
|
188 |
-
ini_set('memory_limit', '-1');
|
189 |
if ($type_orig == 2) {
|
190 |
$img_r = imagecreatefromjpeg($filename);
|
191 |
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
@@ -220,7 +220,7 @@ class BWGControllerGalleries_bwg {
|
|
220 |
imagedestroy($img_r);
|
221 |
imagedestroy($dst_r);
|
222 |
}
|
223 |
-
ini_restore('memory_limit');
|
224 |
?>
|
225 |
<script language="javascript">
|
226 |
var image_src = window.parent.document.getElementById("image_thumb_<?php echo $id; ?>").src;
|
@@ -363,7 +363,7 @@ class BWGControllerGalleries_bwg {
|
|
363 |
$max_width / $img_width,
|
364 |
$max_height / $img_height
|
365 |
);
|
366 |
-
ini_set('memory_limit', '-1');
|
367 |
if (($scale >= 1) || (($max_width === 0) && ($max_height === 0))) {
|
368 |
// if ($file_path !== $new_file_path) {
|
369 |
// return copy($file_path, $new_file_path);
|
@@ -433,7 +433,7 @@ class BWGControllerGalleries_bwg {
|
|
433 |
// Free up memory (imagedestroy does not delete files):
|
434 |
@imagedestroy($src_img);
|
435 |
@imagedestroy($new_img);
|
436 |
-
ini_restore('memory_limit');
|
437 |
return $success;
|
438 |
}
|
439 |
|
@@ -498,7 +498,7 @@ class BWGControllerGalleries_bwg {
|
|
498 |
$left = ($width - $watermark_sizes['width']) / 2;
|
499 |
break;
|
500 |
}
|
501 |
-
ini_set('memory_limit', '-1');
|
502 |
if ($type == 2) {
|
503 |
$image = imagecreatefromjpeg($original_filename);
|
504 |
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
@@ -525,7 +525,7 @@ class BWGControllerGalleries_bwg {
|
|
525 |
imagedestroy($image);
|
526 |
}
|
527 |
imagedestroy($watermark_image);
|
528 |
-
ini_restore('memory_limit');
|
529 |
}
|
530 |
|
531 |
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
@@ -558,7 +558,7 @@ class BWGControllerGalleries_bwg {
|
|
558 |
$left = ($width - $watermark_width) / 2;
|
559 |
break;
|
560 |
}
|
561 |
-
ini_set('memory_limit', '-1');
|
562 |
if ($type_watermark == 2) {
|
563 |
$watermark_image = imagecreatefromjpeg($watermark_url);
|
564 |
}
|
@@ -607,7 +607,7 @@ class BWGControllerGalleries_bwg {
|
|
607 |
imagedestroy($tempimage);
|
608 |
}
|
609 |
imagedestroy($watermark_image);
|
610 |
-
ini_restore('memory_limit');
|
611 |
}
|
612 |
|
613 |
public function save_image_db() {
|
@@ -1041,7 +1041,7 @@ class BWGControllerGalleries_bwg {
|
|
1041 |
$max_width / $img_width,
|
1042 |
$max_height / $img_height
|
1043 |
);
|
1044 |
-
ini_set('memory_limit', '-1');
|
1045 |
if (!function_exists('imagecreatetruecolor')) {
|
1046 |
error_log('Function not found: imagecreatetruecolor');
|
1047 |
return FALSE;
|
@@ -1090,7 +1090,7 @@ class BWGControllerGalleries_bwg {
|
|
1090 |
// Free up memory (imagedestroy does not delete files):
|
1091 |
@imagedestroy($src_img);
|
1092 |
@imagedestroy($new_img);
|
1093 |
-
ini_restore('memory_limit');
|
1094 |
}
|
1095 |
}
|
1096 |
if ($flag == false) {
|
185 |
list($width_orig, $height_orig, $type_orig) = getimagesize($filename);
|
186 |
$percent = $width_orig / $thumb_width;
|
187 |
$thumb_height = $height_orig / $percent;
|
188 |
+
@ini_set('memory_limit', '-1');
|
189 |
if ($type_orig == 2) {
|
190 |
$img_r = imagecreatefromjpeg($filename);
|
191 |
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
220 |
imagedestroy($img_r);
|
221 |
imagedestroy($dst_r);
|
222 |
}
|
223 |
+
@ini_restore('memory_limit');
|
224 |
?>
|
225 |
<script language="javascript">
|
226 |
var image_src = window.parent.document.getElementById("image_thumb_<?php echo $id; ?>").src;
|
363 |
$max_width / $img_width,
|
364 |
$max_height / $img_height
|
365 |
);
|
366 |
+
@ini_set('memory_limit', '-1');
|
367 |
if (($scale >= 1) || (($max_width === 0) && ($max_height === 0))) {
|
368 |
// if ($file_path !== $new_file_path) {
|
369 |
// return copy($file_path, $new_file_path);
|
433 |
// Free up memory (imagedestroy does not delete files):
|
434 |
@imagedestroy($src_img);
|
435 |
@imagedestroy($new_img);
|
436 |
+
@ini_restore('memory_limit');
|
437 |
return $success;
|
438 |
}
|
439 |
|
498 |
$left = ($width - $watermark_sizes['width']) / 2;
|
499 |
break;
|
500 |
}
|
501 |
+
@ini_set('memory_limit', '-1');
|
502 |
if ($type == 2) {
|
503 |
$image = imagecreatefromjpeg($original_filename);
|
504 |
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
525 |
imagedestroy($image);
|
526 |
}
|
527 |
imagedestroy($watermark_image);
|
528 |
+
@ini_restore('memory_limit');
|
529 |
}
|
530 |
|
531 |
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
558 |
$left = ($width - $watermark_width) / 2;
|
559 |
break;
|
560 |
}
|
561 |
+
@ini_set('memory_limit', '-1');
|
562 |
if ($type_watermark == 2) {
|
563 |
$watermark_image = imagecreatefromjpeg($watermark_url);
|
564 |
}
|
607 |
imagedestroy($tempimage);
|
608 |
}
|
609 |
imagedestroy($watermark_image);
|
610 |
+
@ini_restore('memory_limit');
|
611 |
}
|
612 |
|
613 |
public function save_image_db() {
|
1041 |
$max_width / $img_width,
|
1042 |
$max_height / $img_height
|
1043 |
);
|
1044 |
+
@ini_set('memory_limit', '-1');
|
1045 |
if (!function_exists('imagecreatetruecolor')) {
|
1046 |
error_log('Function not found: imagecreatetruecolor');
|
1047 |
return FALSE;
|
1090 |
// Free up memory (imagedestroy does not delete files):
|
1091 |
@imagedestroy($src_img);
|
1092 |
@imagedestroy($new_img);
|
1093 |
+
@ini_restore('memory_limit');
|
1094 |
}
|
1095 |
}
|
1096 |
if ($flag == false) {
|
admin/models/BWGModelGalleries_bwg.php
CHANGED
@@ -40,8 +40,10 @@ class BWGModelGalleries_bwg {
|
|
40 |
}
|
41 |
$where .= ((isset($_POST['search_value'])) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
42 |
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
43 |
-
$
|
44 |
-
$
|
|
|
|
|
45 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
46 |
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
47 |
}
|
40 |
}
|
41 |
$where .= ((isset($_POST['search_value'])) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
42 |
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
43 |
+
$image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
|
44 |
+
$image_asc_or_desc = ($image_asc_or_desc != 'asc') ? 'desc' : 'asc';
|
45 |
+
$image_order_by = ((isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) != '') ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by']) && esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) != '') ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
|
46 |
+
$image_order_by = ' ORDER BY `' . $image_order_by . '` ' . $image_asc_or_desc;
|
47 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
48 |
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
49 |
}
|
admin/models/BWGModelUninstall_bwg.php
CHANGED
@@ -31,7 +31,8 @@ class BWGModelUninstall_bwg {
|
|
31 |
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_theme");
|
32 |
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_shortcode");
|
33 |
delete_option("wd_bwg_version");
|
34 |
-
|
|
|
35 |
// Delete terms.
|
36 |
$terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
37 |
foreach ($terms as $term) {
|
31 |
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_theme");
|
32 |
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_shortcode");
|
33 |
delete_option("wd_bwg_version");
|
34 |
+
setcookie('bwg_image_asc_or_desc', '');
|
35 |
+
setcookie('bwg_image_order_by', '');
|
36 |
// Delete terms.
|
37 |
$terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
38 |
foreach ($terms as $term) {
|
admin/views/BWGViewEditThumb.php
CHANGED
@@ -112,7 +112,7 @@ class BWGViewEditThumb {
|
|
112 |
$thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
113 |
$form_action = add_query_arg(array('action' => 'editThumb', 'type' => 'crop', 'image_id' => $image_id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
114 |
}
|
115 |
-
ini_set('memory_limit', '-1');
|
116 |
list($width_orig, $height_orig, $type_orig) = getimagesize($filename);
|
117 |
if ($edit_type == 'crop') {
|
118 |
if ($type_orig == 2) {
|
@@ -155,7 +155,7 @@ class BWGViewEditThumb {
|
|
155 |
<?php
|
156 |
}
|
157 |
}
|
158 |
-
ini_restore('memory_limit');
|
159 |
wp_print_scripts('jquery');
|
160 |
wp_print_scripts('jcrop');
|
161 |
wp_print_styles('jcrop');
|
@@ -354,7 +354,7 @@ class BWGViewEditThumb {
|
|
354 |
$thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
355 |
$form_action = add_query_arg(array('action' => 'editThumb', 'type' => 'rotate', 'image_id' => $image_id, 'width' => '650', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
356 |
}
|
357 |
-
ini_set('memory_limit', '-1');
|
358 |
list($width_rotate, $height_rotate, $type_rotate) = getimagesize($filename);
|
359 |
if ($edit_type == '270' || $edit_type == '90') {
|
360 |
if ($type_rotate == 2) {
|
@@ -511,7 +511,7 @@ class BWGViewEditThumb {
|
|
511 |
<?php
|
512 |
}
|
513 |
}
|
514 |
-
ini_restore('memory_limit');
|
515 |
?>
|
516 |
<style>
|
517 |
.spider_rotate {
|
112 |
$thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
113 |
$form_action = add_query_arg(array('action' => 'editThumb', 'type' => 'crop', 'image_id' => $image_id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
114 |
}
|
115 |
+
@ini_set('memory_limit', '-1');
|
116 |
list($width_orig, $height_orig, $type_orig) = getimagesize($filename);
|
117 |
if ($edit_type == 'crop') {
|
118 |
if ($type_orig == 2) {
|
155 |
<?php
|
156 |
}
|
157 |
}
|
158 |
+
@ini_restore('memory_limit');
|
159 |
wp_print_scripts('jquery');
|
160 |
wp_print_scripts('jcrop');
|
161 |
wp_print_styles('jcrop');
|
354 |
$thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
355 |
$form_action = add_query_arg(array('action' => 'editThumb', 'type' => 'rotate', 'image_id' => $image_id, 'width' => '650', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
356 |
}
|
357 |
+
@ini_set('memory_limit', '-1');
|
358 |
list($width_rotate, $height_rotate, $type_rotate) = getimagesize($filename);
|
359 |
if ($edit_type == '270' || $edit_type == '90') {
|
360 |
if ($type_rotate == 2) {
|
511 |
<?php
|
512 |
}
|
513 |
}
|
514 |
+
@ini_restore('memory_limit');
|
515 |
?>
|
516 |
<style>
|
517 |
.spider_rotate {
|
admin/views/BWGViewGalleries_bwg.php
CHANGED
@@ -687,9 +687,9 @@ class BWGViewGalleries_bwg {
|
|
687 |
$page_nav = $this->model->image_page_nav($id);
|
688 |
$option_row = $this->model->get_option_row_data();
|
689 |
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
690 |
-
$
|
691 |
-
$image_order_by = (isset($_POST['image_order_by']) ? esc_html(stripslashes($_POST['image_order_by'])) : 'order');
|
692 |
-
$order_class = 'manage-column column-title sorted ' . $
|
693 |
$page_number = (isset($_POST['page_number']) ? esc_html(stripslashes($_POST['page_number'])) : 1);
|
694 |
$ids_string = '';
|
695 |
$per_page = $this->model->per_page();
|
@@ -833,7 +833,7 @@ class BWGViewGalleries_bwg {
|
|
833 |
<th class="table_extra_large_col <?php if ($image_order_by == 'filename') {echo $order_class;} ?>">
|
834 |
<a onclick="spider_set_input_value('task', '');
|
835 |
spider_set_input_value('image_order_by', 'filename');
|
836 |
-
spider_set_input_value('
|
837 |
spider_ajax_save('galleries_form');">
|
838 |
<span>Filename</span><span class="sorting-indicator"></span>
|
839 |
</a>
|
@@ -841,7 +841,7 @@ class BWGViewGalleries_bwg {
|
|
841 |
<th class="table_extra_large_col <?php if ($image_order_by == 'alt') {echo $order_class;} ?>">
|
842 |
<a onclick="spider_set_input_value('task', '');
|
843 |
spider_set_input_value('image_order_by', 'alt');
|
844 |
-
spider_set_input_value('
|
845 |
spider_ajax_save('galleries_form');">
|
846 |
<span>Alt/Title<?php if ($option_row->thumb_click_action != 'open_lightbox') { ?><br />Redirect URL<?php } ?></span><span class="sorting-indicator"></span>
|
847 |
</a>
|
@@ -849,7 +849,7 @@ class BWGViewGalleries_bwg {
|
|
849 |
<th class="table_extra_large_col <?php if ($image_order_by == 'description') {echo $order_class;} ?>">
|
850 |
<a onclick="spider_set_input_value('task', '');
|
851 |
spider_set_input_value('image_order_by', 'description');
|
852 |
-
spider_set_input_value('
|
853 |
spider_ajax_save('galleries_form');">
|
854 |
<span>Description</span><span class="sorting-indicator"></span>
|
855 |
</a>
|
@@ -858,7 +858,7 @@ class BWGViewGalleries_bwg {
|
|
858 |
<th id="th_order" class="table_medium_col <?php if ($image_order_by == 'order') {echo $order_class;} ?>">
|
859 |
<a onclick="spider_set_input_value('task', '');
|
860 |
spider_set_input_value('image_order_by', 'order');
|
861 |
-
spider_set_input_value('
|
862 |
spider_ajax_save('galleries_form');">
|
863 |
<span>Order</span><span class="sorting-indicator"></span>
|
864 |
</a>
|
@@ -866,7 +866,7 @@ class BWGViewGalleries_bwg {
|
|
866 |
<th class="table_big_col <?php if ($image_order_by == 'published') {echo $order_class;} ?>">
|
867 |
<a onclick="spider_set_input_value('task', '');
|
868 |
spider_set_input_value('image_order_by', 'published');
|
869 |
-
spider_set_input_value('
|
870 |
spider_ajax_save('galleries_form');">
|
871 |
<span>Published</span><span class="sorting-indicator"></span>
|
872 |
</a>
|
@@ -986,6 +986,7 @@ class BWGViewGalleries_bwg {
|
|
986 |
?>
|
987 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
988 |
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
|
|
989 |
<input id="image_order_by" name="image_order_by" type="hidden" value="<?php echo $image_order_by; ?>" />
|
990 |
<input id="ajax_task" name="ajax_task" type="hidden" value="" />
|
991 |
<input id="image_current_id" name="image_current_id" type="hidden" value="" />
|
687 |
$page_nav = $this->model->image_page_nav($id);
|
688 |
$option_row = $this->model->get_option_row_data();
|
689 |
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
690 |
+
$image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
|
691 |
+
$image_order_by = ((isset($_POST['image_order_by'])) ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by'])) ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
|
692 |
+
$order_class = 'manage-column column-title sorted ' . $image_asc_or_desc;
|
693 |
$page_number = (isset($_POST['page_number']) ? esc_html(stripslashes($_POST['page_number'])) : 1);
|
694 |
$ids_string = '';
|
695 |
$per_page = $this->model->per_page();
|
833 |
<th class="table_extra_large_col <?php if ($image_order_by == 'filename') {echo $order_class;} ?>">
|
834 |
<a onclick="spider_set_input_value('task', '');
|
835 |
spider_set_input_value('image_order_by', 'filename');
|
836 |
+
spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'filename' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
|
837 |
spider_ajax_save('galleries_form');">
|
838 |
<span>Filename</span><span class="sorting-indicator"></span>
|
839 |
</a>
|
841 |
<th class="table_extra_large_col <?php if ($image_order_by == 'alt') {echo $order_class;} ?>">
|
842 |
<a onclick="spider_set_input_value('task', '');
|
843 |
spider_set_input_value('image_order_by', 'alt');
|
844 |
+
spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'alt' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
|
845 |
spider_ajax_save('galleries_form');">
|
846 |
<span>Alt/Title<?php if ($option_row->thumb_click_action != 'open_lightbox') { ?><br />Redirect URL<?php } ?></span><span class="sorting-indicator"></span>
|
847 |
</a>
|
849 |
<th class="table_extra_large_col <?php if ($image_order_by == 'description') {echo $order_class;} ?>">
|
850 |
<a onclick="spider_set_input_value('task', '');
|
851 |
spider_set_input_value('image_order_by', 'description');
|
852 |
+
spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'description' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
|
853 |
spider_ajax_save('galleries_form');">
|
854 |
<span>Description</span><span class="sorting-indicator"></span>
|
855 |
</a>
|
858 |
<th id="th_order" class="table_medium_col <?php if ($image_order_by == 'order') {echo $order_class;} ?>">
|
859 |
<a onclick="spider_set_input_value('task', '');
|
860 |
spider_set_input_value('image_order_by', 'order');
|
861 |
+
spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'order' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
|
862 |
spider_ajax_save('galleries_form');">
|
863 |
<span>Order</span><span class="sorting-indicator"></span>
|
864 |
</a>
|
866 |
<th class="table_big_col <?php if ($image_order_by == 'published') {echo $order_class;} ?>">
|
867 |
<a onclick="spider_set_input_value('task', '');
|
868 |
spider_set_input_value('image_order_by', 'published');
|
869 |
+
spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'published' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
|
870 |
spider_ajax_save('galleries_form');">
|
871 |
<span>Published</span><span class="sorting-indicator"></span>
|
872 |
</a>
|
986 |
?>
|
987 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
988 |
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
989 |
+
<input id="image_asc_or_desc" name="image_asc_or_desc" type="hidden" value="asc" />
|
990 |
<input id="image_order_by" name="image_order_by" type="hidden" value="<?php echo $image_order_by; ?>" />
|
991 |
<input id="ajax_task" name="ajax_task" type="hidden" value="" />
|
992 |
<input id="image_current_id" name="image_current_id" type="hidden" value="" />
|
filemanager/UploadHandler.php
CHANGED
@@ -318,7 +318,7 @@ class UploadHandler {
|
|
318 |
$max_width / $img_width,
|
319 |
$max_height / $img_height
|
320 |
);
|
321 |
-
ini_set('memory_limit', '-1');
|
322 |
if (($scale >= 1) || (($max_width == NULL) && ($max_height == NULL))) {
|
323 |
if ($file_path !== $new_file_path) {
|
324 |
return copy($file_path, $new_file_path);
|
@@ -388,7 +388,7 @@ class UploadHandler {
|
|
388 |
// Free up memory (imagedestroy does not delete files):
|
389 |
@imagedestroy($src_img);
|
390 |
@imagedestroy($new_img);
|
391 |
-
ini_restore('memory_limit');
|
392 |
return $success;
|
393 |
}
|
394 |
|
@@ -544,7 +544,7 @@ class UploadHandler {
|
|
544 |
if (!in_array($orientation, array(3, 6, 8))) {
|
545 |
return false;
|
546 |
}
|
547 |
-
ini_set('memory_limit', '-1');
|
548 |
$image = @imagecreatefromjpeg($file_path);
|
549 |
switch ($orientation) {
|
550 |
case 3:
|
@@ -562,7 +562,7 @@ class UploadHandler {
|
|
562 |
$success = imagejpeg($image, $file_path);
|
563 |
// Free up memory (imagedestroy does not delete files):
|
564 |
@imagedestroy($image);
|
565 |
-
ini_restore('memory_limit');
|
566 |
return $success;
|
567 |
}
|
568 |
|
318 |
$max_width / $img_width,
|
319 |
$max_height / $img_height
|
320 |
);
|
321 |
+
@ini_set('memory_limit', '-1');
|
322 |
if (($scale >= 1) || (($max_width == NULL) && ($max_height == NULL))) {
|
323 |
if ($file_path !== $new_file_path) {
|
324 |
return copy($file_path, $new_file_path);
|
388 |
// Free up memory (imagedestroy does not delete files):
|
389 |
@imagedestroy($src_img);
|
390 |
@imagedestroy($new_img);
|
391 |
+
@ini_restore('memory_limit');
|
392 |
return $success;
|
393 |
}
|
394 |
|
544 |
if (!in_array($orientation, array(3, 6, 8))) {
|
545 |
return false;
|
546 |
}
|
547 |
+
@ini_set('memory_limit', '-1');
|
548 |
$image = @imagecreatefromjpeg($file_path);
|
549 |
switch ($orientation) {
|
550 |
case 3:
|
562 |
$success = imagejpeg($image, $file_path);
|
563 |
// Free up memory (imagedestroy does not delete files):
|
564 |
@imagedestroy($image);
|
565 |
+
@ini_restore('memory_limit');
|
566 |
return $success;
|
567 |
}
|
568 |
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -849,7 +849,7 @@ class BWGViewAlbum_compact_preview {
|
|
849 |
}
|
850 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
851 |
var bwg_touch_flag = false;
|
852 |
-
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("
|
853 |
if (!bwg_touch_flag) {
|
854 |
bwg_touch_flag = true;
|
855 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
@@ -858,7 +858,7 @@ class BWGViewAlbum_compact_preview {
|
|
858 |
}
|
859 |
});
|
860 |
<?php if ($from !== "widget") { ?>
|
861 |
-
jQuery(".bwg_album_<?php echo $bwg; ?>").on("
|
862 |
if (!bwg_touch_flag) {
|
863 |
bwg_touch_flag = true;
|
864 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
849 |
}
|
850 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
851 |
var bwg_touch_flag = false;
|
852 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
853 |
if (!bwg_touch_flag) {
|
854 |
bwg_touch_flag = true;
|
855 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
858 |
}
|
859 |
});
|
860 |
<?php if ($from !== "widget") { ?>
|
861 |
+
jQuery(".bwg_album_<?php echo $bwg; ?>").on("click", function () {
|
862 |
if (!bwg_touch_flag) {
|
863 |
bwg_touch_flag = true;
|
864 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -829,7 +829,7 @@ class BWGViewAlbum_extended_preview {
|
|
829 |
}
|
830 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
831 |
var bwg_touch_flag = false;
|
832 |
-
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("
|
833 |
if (!bwg_touch_flag) {
|
834 |
bwg_touch_flag = true;
|
835 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
@@ -837,7 +837,7 @@ class BWGViewAlbum_extended_preview {
|
|
837 |
return false;
|
838 |
}
|
839 |
});
|
840 |
-
jQuery(".bwg_album_<?php echo $bwg; ?>").on("
|
841 |
if (!bwg_touch_flag) {
|
842 |
bwg_touch_flag = true;
|
843 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
829 |
}
|
830 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
831 |
var bwg_touch_flag = false;
|
832 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
833 |
if (!bwg_touch_flag) {
|
834 |
bwg_touch_flag = true;
|
835 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
837 |
return false;
|
838 |
}
|
839 |
});
|
840 |
+
jQuery(".bwg_album_<?php echo $bwg; ?>").on("click", function () {
|
841 |
if (!bwg_touch_flag) {
|
842 |
bwg_touch_flag = true;
|
843 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -635,7 +635,7 @@ class BWGViewImage_browser {
|
|
635 |
}
|
636 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
637 |
var bwg_touch_flag = false;
|
638 |
-
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("
|
639 |
if (!bwg_touch_flag) {
|
640 |
bwg_touch_flag = true;
|
641 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
635 |
}
|
636 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
637 |
var bwg_touch_flag = false;
|
638 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
639 |
if (!bwg_touch_flag) {
|
640 |
bwg_touch_flag = true;
|
641 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -546,7 +546,7 @@ class BWGViewThumbnails {
|
|
546 |
}
|
547 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
548 |
var bwg_touch_flag = false;
|
549 |
-
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("
|
550 |
if (!bwg_touch_flag) {
|
551 |
bwg_touch_flag = true;
|
552 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
546 |
}
|
547 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
548 |
var bwg_touch_flag = false;
|
549 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
550 |
if (!bwg_touch_flag) {
|
551 |
bwg_touch_flag = true;
|
552 |
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
js/bwg.js
CHANGED
@@ -91,6 +91,10 @@ function spider_ajax_save(form_id, tr_group) {
|
|
91 |
var ids_string = jQuery("#ids_string").val();
|
92 |
var image_order_by = jQuery("#image_order_by").val();
|
93 |
var asc_or_desc = jQuery("#asc_or_desc").val();
|
|
|
|
|
|
|
|
|
94 |
|
95 |
var image_current_id = jQuery("#image_current_id").val();
|
96 |
ids_array = ids_string.split(",");
|
@@ -115,6 +119,7 @@ function spider_ajax_save(form_id, tr_group) {
|
|
115 |
post_data["page_number"] = page_number;
|
116 |
post_data["image_order_by"] = image_order_by;
|
117 |
post_data["asc_or_desc"] = asc_or_desc;
|
|
|
118 |
post_data["ids_string"] = ids_string;
|
119 |
post_data["task"] = "ajax_search";
|
120 |
post_data["ajax_task"] = ajax_task;
|
91 |
var ids_string = jQuery("#ids_string").val();
|
92 |
var image_order_by = jQuery("#image_order_by").val();
|
93 |
var asc_or_desc = jQuery("#asc_or_desc").val();
|
94 |
+
var image_asc_or_desc = jQuery("#image_asc_or_desc").val();
|
95 |
+
// Set cookie for image ordering in admin.
|
96 |
+
document.cookie = 'bwg_image_asc_or_desc=' + image_asc_or_desc;
|
97 |
+
document.cookie = 'bwg_image_order_by=' + image_order_by;
|
98 |
|
99 |
var image_current_id = jQuery("#image_current_id").val();
|
100 |
ids_array = ids_string.split(",");
|
119 |
post_data["page_number"] = page_number;
|
120 |
post_data["image_order_by"] = image_order_by;
|
121 |
post_data["asc_or_desc"] = asc_or_desc;
|
122 |
+
post_data["image_asc_or_desc"] = image_asc_or_desc;
|
123 |
post_data["ids_string"] = ids_string;
|
124 |
post_data["task"] = "ajax_search";
|
125 |
post_data["ajax_task"] = ajax_task;
|
photo-gallery.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
-
* Version: 1.2.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -3346,7 +3346,7 @@ function bwg_activate() {
|
|
3346 |
));
|
3347 |
}
|
3348 |
$version = get_option("wd_bwg_version");
|
3349 |
-
$new_version = '1.2.
|
3350 |
if ($version && version_compare($version, $new_version, '<')) {
|
3351 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3352 |
bwg_update($version);
|
@@ -3364,7 +3364,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
|
|
3364 |
|
3365 |
function bwg_update_hook() {
|
3366 |
$version = get_option("wd_bwg_version");
|
3367 |
-
$new_version = '1.2.
|
3368 |
if ($version && version_compare($version, $new_version, '<')) {
|
3369 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3370 |
bwg_update($version);
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
+
* Version: 1.2.40
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
3346 |
));
|
3347 |
}
|
3348 |
$version = get_option("wd_bwg_version");
|
3349 |
+
$new_version = '1.2.40';
|
3350 |
if ($version && version_compare($version, $new_version, '<')) {
|
3351 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3352 |
bwg_update($version);
|
3364 |
|
3365 |
function bwg_update_hook() {
|
3366 |
$version = get_option("wd_bwg_version");
|
3367 |
+
$new_version = '1.2.40';
|
3368 |
if ($version && version_compare($version, $new_version, '<')) {
|
3369 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3370 |
bwg_update($version);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
|
4 |
Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos, instagram, mosaic
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -207,6 +207,11 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
|
|
207 |
|
208 |
== Changelog ==
|
209 |
|
|
|
|
|
|
|
|
|
|
|
210 |
= 1.2.39 =
|
211 |
* New: Search by name in file manager.
|
212 |
|
4 |
Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos, instagram, mosaic
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.2.40
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
207 |
|
208 |
== Changelog ==
|
209 |
|
210 |
+
= 1.2.40 =
|
211 |
+
* Changed: Save images ordering in admin.
|
212 |
+
* Fixed: Warnings in filemanager.
|
213 |
+
* Fixed: Prevent opening lightbox on swipe.
|
214 |
+
|
215 |
= 1.2.39 =
|
216 |
* New: Search by name in file manager.
|
217 |
|