Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.68

Version Description

  • Fixed: Random ordering.
  • Changed: Pause embed video on image change.
  • Fixed: Translations bug in javascript.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.2.68
Comparing to
See all releases

Code changes from version 1.2.67 to 1.2.68

admin/views/BWGViewBWGShortcode.php CHANGED
@@ -475,7 +475,7 @@ class BWGViewBWGShortcode {
475
  jQuery('#extended_album_image_thumb_height').hide();
476
  jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
477
  <input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
478
- bwg_change_label('extended_album_image_thumb_dimensions', 'I<?php _e("mage thumbnail height: ", 'bwg_back'); ?>');
479
  jQuery('#extended_album_image_thumb_width').hide();
480
  jQuery('#extended_album_image_thumb_height').show();
481
  jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
@@ -1829,10 +1829,10 @@ class BWGViewBWGShortcode {
1829
  jQuery(document).ready(function () {
1830
  bwg_loadmore();
1831
  });
1832
- var bwg_image_thumb = '<?php _e('Image thumbnail dimensions:', 'bwg_back') ?>';
1833
- var bwg_image_thumb_width = '<?php _e('Image thumbnail width: ', 'bwg_back') ?>';
1834
- var bwg_max_column = '<?php _e('Max. number of image columns:', 'bwg_back') ?>';
1835
- var bwg_image_thumb_height = '<?php _e('Image thumbnail height:', 'bwg_back') ?>';
1836
  </script>
1837
  </body>
1838
  </html>
475
  jQuery('#extended_album_image_thumb_height').hide();
476
  jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
477
  <input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
478
+ bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail height: ", 'bwg_back'); ?>');
479
  jQuery('#extended_album_image_thumb_width').hide();
480
  jQuery('#extended_album_image_thumb_height').show();
481
  jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
1829
  jQuery(document).ready(function () {
1830
  bwg_loadmore();
1831
  });
1832
+ var bwg_image_thumb = '<?php addslashes(__('Image thumbnail dimensions:', 'bwg_back')); ?>';
1833
+ var bwg_image_thumb_width = '<?php addslashes(__('Image thumbnail width: ', 'bwg_back')); ?>';
1834
+ var bwg_max_column = '<?php addslashes(__('Max. number of image columns:', 'bwg_back')); ?>';
1835
+ var bwg_image_thumb_height = '<?php addslashes(__('Image thumbnail height:', 'bwg_back')); ?>';
1836
  </script>
1837
  </body>
1838
  </html>
frontend/models/BWGModelAlbum_compact_preview.php CHANGED
@@ -86,12 +86,18 @@ class BWGModelAlbum_compact_preview {
86
  else {
87
  $where = '';
88
  }
 
 
 
 
 
 
89
  if (isset($_REQUEST['bwg_tag_id_bwg_album_compact_' . $bwg]) && $_REQUEST['bwg_tag_id_bwg_album_compact_' . $bwg]) {
90
  $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN
91
- (SELECT GROUP_CONCAT( tag_id SEPARATOR ",") AS tags, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE gallery_id="' . $id . '" GROUP BY image_id) AS tag ON image.id=tag.image_id WHERE image.published=1 ' . $where . ' AND CONCAT(",", tag.tags, ",") REGEXP ",('.implode("|",$_REQUEST['bwg_tag_id_bwg_album_compact_' . $bwg]).')," AND image.gallery_id="%d" ORDER BY image.' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str,$id));
92
  }
93
  else {
94
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d" ORDER BY `' . $sort_by . '` ' . $sort_direction . $limit_str, $id));
95
  }
96
  return $row;
97
  }
86
  else {
87
  $where = '';
88
  }
89
+ if ($sort_by == 'random') {
90
+ $sort_by = 'RAND()';
91
+ }
92
+ else {
93
+ $sort_by = 'image.`' . $sort_by . '`';
94
+ }
95
  if (isset($_REQUEST['bwg_tag_id_bwg_album_compact_' . $bwg]) && $_REQUEST['bwg_tag_id_bwg_album_compact_' . $bwg]) {
96
  $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN
97
+ (SELECT GROUP_CONCAT( tag_id SEPARATOR ",") AS tags, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE gallery_id="' . $id . '" GROUP BY image_id) AS tag ON image.id=tag.image_id WHERE image.published=1 ' . $where . ' AND CONCAT(",", tag.tags, ",") REGEXP ",('.implode("|",$_REQUEST['bwg_tag_id_bwg_album_compact_' . $bwg]).')," AND image.gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str,$id));
98
  }
99
  else {
100
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $sort_direction . $limit_str, $id));
101
  }
102
  return $row;
103
  }
frontend/models/BWGModelAlbum_extended_preview.php CHANGED
@@ -75,13 +75,18 @@ class BWGModelAlbum_extended_preview {
75
  else {
76
  $limit_str = '';
77
  }
78
-
 
 
 
 
 
79
  if (isset($_REQUEST['bwg_tag_id_bwg_album_extended_' . $bwg]) && $_REQUEST['bwg_tag_id_bwg_album_extended_' . $bwg]) {
80
  $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN
81
  (SELECT GROUP_CONCAT( tag_id SEPARATOR ",") AS tags, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE gallery_id="' . $id . '" GROUP BY image_id) AS tag ON image.id=tag.image_id WHERE image.published=1 ' . $where . ' AND CONCAT(",", tag.tags, ",") REGEXP ",('.implode("|",$_REQUEST['bwg_tag_id_bwg_album_extended_' . $bwg]).')," AND image.gallery_id="%d" ORDER BY image.' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str, $id));
82
  }
83
  else {
84
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d" ORDER BY `' . $sort_by . '` ' . $sort_direction . $limit_str, $id));
85
  }
86
  return $row;
87
  }
75
  else {
76
  $limit_str = '';
77
  }
78
+ if ($sort_by == 'random') {
79
+ $sort_by = 'RAND()';
80
+ }
81
+ else {
82
+ $sort_by = '`' . $sort_by . '`';
83
+ }
84
  if (isset($_REQUEST['bwg_tag_id_bwg_album_extended_' . $bwg]) && $_REQUEST['bwg_tag_id_bwg_album_extended_' . $bwg]) {
85
  $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN
86
  (SELECT GROUP_CONCAT( tag_id SEPARATOR ",") AS tags, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE gallery_id="' . $id . '" GROUP BY image_id) AS tag ON image.id=tag.image_id WHERE image.published=1 ' . $where . ' AND CONCAT(",", tag.tags, ",") REGEXP ",('.implode("|",$_REQUEST['bwg_tag_id_bwg_album_extended_' . $bwg]).')," AND image.gallery_id="%d" ORDER BY image.' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str, $id));
87
  }
88
  else {
89
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $sort_direction . $limit_str, $id));
90
  }
91
  return $row;
92
  }
frontend/models/BWGModelImage_browser.php CHANGED
@@ -42,6 +42,9 @@ class BWGModelImage_browser {
42
  if ($sort_by == 'size' || $sort_by == 'resolution') {
43
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
44
  }
 
 
 
45
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
46
  $sort_by = '`order`';
47
  }
42
  if ($sort_by == 'size' || $sort_by == 'resolution') {
43
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
44
  }
45
+ elseif ($sort_by == 'random') {
46
+ $sort_by = 'RAND()';
47
+ }
48
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
49
  $sort_by = '`order`';
50
  }
frontend/models/BWGModelSlideshow.php CHANGED
@@ -40,6 +40,9 @@ class BWGModelSlideshow {
40
  if ($sort_by == 'size' || $sort_by == 'resolution') {
41
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
42
  }
 
 
 
43
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
44
  $sort_by = '`order`';
45
  }
40
  if ($sort_by == 'size' || $sort_by == 'resolution') {
41
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
42
  }
43
+ elseif ($sort_by == 'random') {
44
+ $sort_by = 'RAND()';
45
+ }
46
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
47
  $sort_by = '`order`';
48
  }
frontend/models/BWGModelThumbnails.php CHANGED
@@ -60,6 +60,9 @@ class BWGModelThumbnails {
60
  if ($sort_by == 'size' || $sort_by == 'resolution') {
61
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
62
  }
 
 
 
63
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'RAND()') && ($sort_by != 'filename')) {
64
  $sort_by = '`order`';
65
  }
60
  if ($sort_by == 'size' || $sort_by == 'resolution') {
61
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
62
  }
63
+ elseif ($sort_by == 'random') {
64
+ $sort_by = 'RAND()';
65
+ }
66
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'RAND()') && ($sort_by != 'filename')) {
67
  $sort_by = '`order`';
68
  }
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.67
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -2339,7 +2339,7 @@ function bwg_activate() {
2339
  ));
2340
  }
2341
  $version = get_option("wd_bwg_version");
2342
- $new_version = '1.2.67';
2343
  if ($version && version_compare($version, $new_version, '<')) {
2344
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2345
  bwg_update($version);
@@ -2387,7 +2387,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
2387
 
2388
  function bwg_update_hook() {
2389
  $version = get_option("wd_bwg_version");
2390
- $new_version = '1.2.67';
2391
  if ($version && version_compare($version, $new_version, '<')) {
2392
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2393
  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.68
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
2339
  ));
2340
  }
2341
  $version = get_option("wd_bwg_version");
2342
+ $new_version = '1.2.68';
2343
  if ($version && version_compare($version, $new_version, '<')) {
2344
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2345
  bwg_update($version);
2387
 
2388
  function bwg_update_hook() {
2389
  $version = get_option("wd_bwg_version");
2390
+ $new_version = '1.2.68';
2391
  if ($version && version_compare($version, $new_version, '<')) {
2392
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2393
  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, facebook, mosaic, facebook integration, instagram feed, Flickr, Dailymotion
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
- Stable tag: 1.2.67
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -215,6 +215,11 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
215
 
216
  == Changelog ==
217
 
 
 
 
 
 
218
  = 1.2.67 =
219
  * Added: Backend translation.
220
  * Fixed: Pagination on tags page.
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, facebook, mosaic, facebook integration, instagram feed, Flickr, Dailymotion
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
+ Stable tag: 1.2.68
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
215
 
216
  == Changelog ==
217
 
218
+ = 1.2.68 =
219
+ * Fixed: Random ordering.
220
+ * Changed: Pause embed video on image change.
221
+ * Fixed: Translations bug in javascript.
222
+
223
  = 1.2.67 =
224
  * Added: Backend translation.
225
  * Fixed: Pagination on tags page.