Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.8

Version Description

security issue fixed

Download this release

Release Info

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

Code changes from version 1.2.7 to 1.2.8

frontend/models/BWGModelGalleryBox.php CHANGED
@@ -49,7 +49,10 @@ class BWGModelGalleryBox {
49
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
50
  $sort_by = 't1.`order`';
51
  }
52
- $row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id WHERE t1.published=1 AND t1.gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
 
 
 
53
  return $row;
54
  }
55
 
@@ -61,7 +64,10 @@ class BWGModelGalleryBox {
61
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
62
  $sort_by = '`order`';
63
  }
64
- $row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM (SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by . ') as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id ', $tag_id, $_SERVER['REMOTE_ADDR']));
 
 
 
65
  return $row;
66
  }
67
 
49
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
50
  $sort_by = 't1.`order`';
51
  }
52
+ if ($order_by != 'asc') {
53
+ $order_by = 'desc';
54
+ }
55
+ $row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id WHERE t1.published=1 AND t1.gallery_id="%d" ORDER BY %s %s', $_SERVER['REMOTE_ADDR'], $gallery_id, $sort_by, $order_by));
56
  return $row;
57
  }
58
 
64
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
65
  $sort_by = '`order`';
66
  }
67
+ if ($order_by != 'asc') {
68
+ $order_by = 'desc';
69
+ }
70
+ $row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM (SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY %s %s) as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id ', $tag_id, $sort_by, $order_by, $_SERVER['REMOTE_ADDR']));
71
  return $row;
72
  }
73
 
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -255,6 +255,7 @@ class BWGViewAlbum_compact_preview {
255
  max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
256
  }
257
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> a {
 
258
  cursor: pointer;
259
  text-decoration: none;
260
  }
@@ -313,6 +314,7 @@ class BWGViewAlbum_compact_preview {
313
  max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
314
  }
315
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> a {
 
316
  cursor: pointer;
317
  text-decoration: none;
318
  }
@@ -363,6 +365,7 @@ class BWGViewAlbum_compact_preview {
363
  text-align: <?php echo $theme_row->thumb_align; ?>;
364
  }
365
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> a {
 
366
  cursor: pointer;
367
  text-decoration: none;
368
  }
255
  max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
256
  }
257
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> a {
258
+ border: none;
259
  cursor: pointer;
260
  text-decoration: none;
261
  }
314
  max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
315
  }
316
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> a {
317
+ border: none;
318
  cursor: pointer;
319
  text-decoration: none;
320
  }
365
  text-align: <?php echo $theme_row->thumb_align; ?>;
366
  }
367
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> a {
368
+ border: none;
369
  cursor: pointer;
370
  text-decoration: none;
371
  }
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -159,6 +159,7 @@ class BWGViewAlbum_extended_preview {
159
  max-width: inherit;
160
  }
161
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> a {
 
162
  cursor: pointer;
163
  text-decoration: none;
164
  }
@@ -337,6 +338,7 @@ class BWGViewAlbum_extended_preview {
337
  text-align: <?php echo $theme_row->thumb_align; ?>;
338
  }
339
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> a {
 
340
  cursor: pointer;
341
  text-decoration: none;
342
  }
159
  max-width: inherit;
160
  }
161
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> a {
162
+ border: none;
163
  cursor: pointer;
164
  text-decoration: none;
165
  }
338
  text-align: <?php echo $theme_row->thumb_align; ?>;
339
  }
340
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> a {
341
+ border: none;
342
  cursor: pointer;
343
  text-decoration: none;
344
  }
frontend/views/BWGViewThumbnails.php CHANGED
@@ -205,6 +205,7 @@ class BWGViewThumbnails {
205
  text-align: <?php echo $theme_row->thumb_align; ?>;
206
  }
207
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> a {
 
208
  cursor: pointer;
209
  text-decoration: none;
210
  }
205
  text-align: <?php echo $theme_row->thumb_align; ?>;
206
  }
207
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> a {
208
+ border: none;
209
  cursor: pointer;
210
  text-decoration: none;
211
  }
js/bwg_gallery_box.js CHANGED
@@ -52,11 +52,18 @@ function spider_isunsupporteduseragent() {
52
 
53
  function spider_destroypopup(duration) {
54
  if (document.getElementById("spider_popup_wrap") != null) {
55
- jQuery(".spider_popup_wrap").remove();
56
- jQuery(".spider_popup_loading").css({display: "none"});
57
- jQuery(".spider_popup_overlay").css({display: "none"});
58
- jQuery(document).off("keydown");
59
- jQuery("html").attr("style", "overflow:auto !important");
 
 
 
 
 
 
 
60
  }
61
  isPopUpOpened = false;
62
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
52
 
53
  function spider_destroypopup(duration) {
54
  if (document.getElementById("spider_popup_wrap") != null) {
55
+ if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen)) {
56
+ if (jQuery.fullscreen.isFullScreen()) {
57
+ jQuery.fullscreen.exit();
58
+ }
59
+ }
60
+ setTimeout(function () {
61
+ jQuery(".spider_popup_wrap").remove();
62
+ jQuery(".spider_popup_loading").css({display: "none"});
63
+ jQuery(".spider_popup_overlay").css({display: "none"});
64
+ jQuery(document).off("keydown");
65
+ jQuery("html").attr("style", "overflow:auto !important");
66
+ }, 20);
67
  }
68
  isPopUpOpened = false;
69
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://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.7
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -186,11 +186,13 @@ function bwg_shortcode($params) {
186
  if (isset($params['id'])) {
187
  global $wpdb;
188
  $shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $params['id']));
189
- $shortcode_params = explode('" ', $shortcode);
190
- foreach ($shortcode_params as $shortcode_param) {
191
- $shortcode_param = str_replace('"', '', $shortcode_param);
192
- $shortcode_elem = explode('=', $shortcode_param);
193
- $params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
 
 
194
  }
195
  }
196
  shortcode_atts(array(
@@ -2927,7 +2929,7 @@ function bwg_activate() {
2927
  ));
2928
  }
2929
  $version = get_option("wd_bwg_version");
2930
- $new_version = '1.2.7';
2931
  if ($version && version_compare($version, $new_version, '<')) {
2932
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2933
  bwg_update($version);
@@ -2942,7 +2944,7 @@ register_activation_hook(__FILE__, 'bwg_activate');
2942
 
2943
  function bwg_update_hook() {
2944
  $version = get_option("wd_bwg_version");
2945
- $new_version = '1.2.7';
2946
  if ($version && version_compare($version, $new_version, '<')) {
2947
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2948
  bwg_update($version);
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://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
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
186
  if (isset($params['id'])) {
187
  global $wpdb;
188
  $shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $params['id']));
189
+ if ($shortcode) {
190
+ $shortcode_params = explode('" ', $shortcode);
191
+ foreach ($shortcode_params as $shortcode_param) {
192
+ $shortcode_param = str_replace('"', '', $shortcode_param);
193
+ $shortcode_elem = explode('=', $shortcode_param);
194
+ $params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
195
+ }
196
  }
197
  }
198
  shortcode_atts(array(
2929
  ));
2930
  }
2931
  $version = get_option("wd_bwg_version");
2932
+ $new_version = '1.2.8';
2933
  if ($version && version_compare($version, $new_version, '<')) {
2934
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2935
  bwg_update($version);
2944
 
2945
  function bwg_update_hook() {
2946
  $version = get_option("wd_bwg_version");
2947
+ $new_version = '1.2.8';
2948
  if ($version && version_compare($version, $new_version, '<')) {
2949
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2950
  bwg_update($version);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://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
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
- Stable tag: 1.2.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -161,14 +161,13 @@ Vietnamese (vi)
161
  After downloading the ZIP file,
162
 
163
  1. Log in to the administrator panel.
164
- 1. Go to Plugins Add > New > Upload.
165
- 1. Click `Choose file` (`Browse`) and select the downloaded zip file of the gallery.
166
  *For Mac Users*
167
  *Go to your Downloads folder and locate the folder with the gallery plugin. Right-click on the folder and select Compress. Now you have a newly created .zip file which can be installed as described here.*
168
- 1. Click `Install Now` button.
169
- 1. Click `Activate Plugin` button for activating the gallery plugin.
170
-
171
- If any problem occurs, please contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
172
 
173
  == Screenshots ==
174
  1. Photo Gallery - Popup View
@@ -179,6 +178,8 @@ If any problem occurs, please contact us at [info@web-dorado.com](mailto:info@w
179
  6. Photo Gallery - Edit Watermark
180
 
181
  == Changelog ==
 
 
182
 
183
  = 1.2.7 =
184
  masonry album view type
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
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
+ Stable tag: 1.2.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
161
  After downloading the ZIP file,
162
 
163
  1. Log in to the administrator panel.
164
+ 2. Go to Plugins Add > New > Upload.
165
+ 3. Click `Choose file` (`Browse`) and select the downloaded zip file of the gallery.
166
  *For Mac Users*
167
  *Go to your Downloads folder and locate the folder with the gallery plugin. Right-click on the folder and select Compress. Now you have a newly created .zip file which can be installed as described here.*
168
+ 4. Click `Install Now` button.
169
+ 5. Click `Activate Plugin` button for activating the gallery plugin.
170
+ 6. If the installation does not succeed, please contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
 
171
 
172
  == Screenshots ==
173
  1. Photo Gallery - Popup View
178
  6. Photo Gallery - Edit Watermark
179
 
180
  == Changelog ==
181
+ = 1.2.8 =
182
+ security issue fixed
183
 
184
  = 1.2.7 =
185
  masonry album view type