Photo Gallery by WD – Responsive Photo Gallery - Version 1.3.26

Version Description

  • Fixed: Sanitize folder names in filemanager.
  • Fixed: Random order (pagination and lightbox).
  • Fixed: Album widget sort direction.
  • Fixed: Images ordering bug in lightbox.
  • Fixed: Removed unnecessary spaces from order by.
  • Fixed: Gallery title bug in extended album view.
  • Fixed: Tags cloud widget styles conflict with some themes.
  • Fixed: Open lightbox from tag cloud.
  • Changed: Generate shortcode with ajax.
Download this release

Release Info

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

Code changes from version 1.3.25 to 1.3.26

admin/views/BWGViewBWGShortcode.php CHANGED
@@ -1076,7 +1076,7 @@ class BWGViewBWGShortcode {
1076
  <hr style="float: left; width: 100%;" />
1077
  <span style="float: left; width: 100%;">
1078
  <a id="bwg_pro_version_link" class="wd-btn wd-btn-primary-blue wd-not-image" target="_blank" style="display: table; margin-bottom: 5px;" href="https://web-dorado.com/files/fromPhotoGallery.php"><?php _e("Please see Pro", 'bwg_back'); ?> <span id="bwg_pro_version"><?php _e("Thumbnail", 'bwg_back'); ?></span> <?php _e("View", 'bwg_back'); ?></a>
1079
- <input type="button" class="wd-btn wd-btn-primary-blue wd-not-image" id="insert" name="insert" value="<?php echo __("Generate", 'bwg_back'); ?>" onclick="bwg_insert_shortcode('');" />
1080
  <input type="button" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-import" id="import" name="import" value="<?php echo __("Import", 'bwg_back'); ?>" onclick="bwg_update_shortcode()" />
1081
  <div>
1082
  <input type="text" size="55" id="bwg_shortcode" name="bwg_shortcode" value='<?php echo $tagtext; ?>' onclick="bwg_onKeyDown(event)" />
@@ -1088,6 +1088,10 @@ class BWGViewBWGShortcode {
1088
  </div>
1089
  </span>
1090
  </div>
 
 
 
 
1091
  <?php
1092
  }
1093
  ?>
@@ -1875,13 +1879,13 @@ class BWGViewBWGShortcode {
1875
  short_code = short_code.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function(d, c) {
1876
  return "<img src='<?php echo WD_BWG_URL; ?>/images/icons/bwg_shortcode.png' class='bwg_shortcode mceItem' title='Best_Wordpress_Gallery" + short_id + "' />";
1877
  });
1878
- jQuery("#task").val("save");
1879
- jQuery("#tagtext").val(tagtext);
1880
- jQuery("#currrent_id").val(shortcode_id);
1881
- jQuery("#title").val(title);
1882
- jQuery("#bwg_insert").val((content && !bwg_insert) ? 0 : 1);
1883
- jQuery("#bwg_shortcode_form").submit();
1884
  <?php if (!$from_menu) { ?>
 
 
 
 
 
 
1885
  if (window.tinymce.isIE && content) {
1886
  // IE and Update.
1887
  var all_content = tinyMCE.activeEditor.getContent();
@@ -1893,7 +1897,25 @@ class BWGViewBWGShortcode {
1893
  }
1894
  tinyMCEPopup.editor.execCommand('mceRepaint');
1895
  <?php } else { ?>
1896
- jQuery("#bwg_shortcode").val('[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1897
  <?php } ?>
1898
  }
1899
  jQuery(document).ready(function () {
1076
  <hr style="float: left; width: 100%;" />
1077
  <span style="float: left; width: 100%;">
1078
  <a id="bwg_pro_version_link" class="wd-btn wd-btn-primary-blue wd-not-image" target="_blank" style="display: table; margin-bottom: 5px;" href="https://web-dorado.com/files/fromPhotoGallery.php"><?php _e("Please see Pro", 'bwg_back'); ?> <span id="bwg_pro_version"><?php _e("Thumbnail", 'bwg_back'); ?></span> <?php _e("View", 'bwg_back'); ?></a>
1079
+ <input type="button" class="wd-btn wd-btn-primary-blue wd-not-image" id="insert" name="insert" value="<?php echo __("Generate", 'bwg_back'); ?>" onclick="bwg_insert_shortcode(''); jQuery('#loading_div').show(); jQuery('#opacity_div').show();" />
1080
  <input type="button" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-import" id="import" name="import" value="<?php echo __("Import", 'bwg_back'); ?>" onclick="bwg_update_shortcode()" />
1081
  <div>
1082
  <input type="text" size="55" id="bwg_shortcode" name="bwg_shortcode" value='<?php echo $tagtext; ?>' onclick="bwg_onKeyDown(event)" />
1088
  </div>
1089
  </span>
1090
  </div>
1091
+ <div id="opacity_div" style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 99998; background-color: rgba(0, 0, 0, 0.2); display: none;"></div>
1092
+ <div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
1093
+ <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.gif'; ?>" class="bwg_spider_ajax_loading" style="margin-top: 200px; width:30px;" />
1094
+ </div>
1095
  <?php
1096
  }
1097
  ?>
1879
  short_code = short_code.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function(d, c) {
1880
  return "<img src='<?php echo WD_BWG_URL; ?>/images/icons/bwg_shortcode.png' class='bwg_shortcode mceItem' title='Best_Wordpress_Gallery" + short_id + "' />";
1881
  });
 
 
 
 
 
 
1882
  <?php if (!$from_menu) { ?>
1883
+ jQuery("#task").val("save");
1884
+ jQuery("#tagtext").val(tagtext);
1885
+ jQuery("#currrent_id").val(shortcode_id);
1886
+ jQuery("#title").val(title);
1887
+ jQuery("#bwg_insert").val((content && !bwg_insert) ? 0 : 1);
1888
+ jQuery("#bwg_shortcode_form").submit();
1889
  if (window.tinymce.isIE && content) {
1890
  // IE and Update.
1891
  var all_content = tinyMCE.activeEditor.getContent();
1897
  }
1898
  tinyMCEPopup.editor.execCommand('mceRepaint');
1899
  <?php } else { ?>
1900
+ var post_data = {};
1901
+ var url = jQuery("#bwg_insert_shortcode").attr('action');
1902
+ post_data['bwg_nonce'] = jQuery("#bwg_nonce").val();
1903
+ post_data['task'] = "save";
1904
+ post_data['tagtext'] = tagtext;
1905
+ post_data['currrent_id'] = shortcode_id;
1906
+ post_data['title'] = title;
1907
+ post_data['bwg_insert'] = (content && !bwg_insert) ? 0 : 1;
1908
+ jQuery.post(
1909
+ url,
1910
+ post_data
1911
+ ).success(function (data, textStatus, errorThrown) {
1912
+ jQuery("#bwg_shortcode").val('[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']');
1913
+ var str = "&#60;?php echo photo_gallery(" + shortcode_id + "); ?&#62;";
1914
+ jQuery("#bwg_function").val(str.replace("&#60;", '<').replace("&#62;", '>'));
1915
+ shortcodes[shortcode_id] = tagtext;
1916
+ jQuery('#loading_div').hide();
1917
+ jQuery('#opacity_div').hide();
1918
+ });
1919
  <?php } ?>
1920
  }
1921
  jQuery(document).ready(function () {
filemanager/controller.php CHANGED
@@ -75,7 +75,7 @@ class FilemanagerController {
75
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
76
  $cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
77
 
78
- $new_dir_path = $cur_dir_path . '/' . (isset($_REQUEST['new_dir_name']) ? stripslashes(esc_html($_REQUEST['new_dir_name'])) : '');
79
  $new_dir_path = htmlspecialchars_decode($new_dir_path, ENT_COMPAT | ENT_QUOTES);
80
  $msg = '';
81
  if (file_exists($new_dir_path) == true) {
@@ -111,7 +111,7 @@ class FilemanagerController {
111
  $msg = "File doesn't exist.";
112
  }
113
  elseif (is_dir($file_path) == true) {
114
- if (rename($file_path, $cur_dir_path . '/' . $file_new_name) == false) {
115
  $msg = "Can't rename the file.";
116
  }
117
  }
75
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
76
  $cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
77
 
78
+ $new_dir_path = $cur_dir_path . '/' . (isset($_REQUEST['new_dir_name']) ? stripslashes(esc_html(sanitize_file_name($_REQUEST['new_dir_name']))) : '');
79
  $new_dir_path = htmlspecialchars_decode($new_dir_path, ENT_COMPAT | ENT_QUOTES);
80
  $msg = '';
81
  if (file_exists($new_dir_path) == true) {
111
  $msg = "File doesn't exist.";
112
  }
113
  elseif (is_dir($file_path) == true) {
114
+ if (rename($file_path, $cur_dir_path . '/' . sanitize_file_name($file_new_name)) == false) {
115
  $msg = "Can't rename the file.";
116
  }
117
  }
framework/WDWLibrary.php CHANGED
@@ -714,10 +714,6 @@ class WDWLibrary {
714
  }
715
 
716
  public static function ajax_html_frontend_search_tags($form_id, $current_view, $cur_gal_id, $images_count, $tags_rows) {
717
- global $wd_bwg_inline_stiles;
718
- if ($wd_bwg_inline_stiles) {
719
- wp_enqueue_style('bwg_sumoselect');
720
- }
721
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
722
  $bwg_search_tags = (isset($_POST['bwg_tag_id_' . $cur_gal_id]) && $_POST['bwg_tag_id_' . $cur_gal_id] != '' )? $_POST['bwg_tag_id_' . $cur_gal_id] : array();
723
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
@@ -1034,6 +1030,11 @@ class WDWLibrary {
1034
  $items_in_page = $load_more_image_count;
1035
  }
1036
  $limit = (((int) $_REQUEST['page_number_' . $bwg] - 2) * $items_in_page) + $images_per_page;
 
 
 
 
 
1037
  }
1038
  $limit_str = '';
1039
  if ($images_per_page) {
@@ -1048,7 +1049,7 @@ class WDWLibrary {
1048
  $where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $_REQUEST[$tag_input_name]) . ')," ';
1049
  }
1050
 
1051
- $row = $wpdb->get_results('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str);
1052
  $total = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where);
1053
 
1054
  $page_nav['total'] = $total;
@@ -1073,7 +1074,7 @@ class WDWLibrary {
1073
  return $row;
1074
  }
1075
 
1076
- public static function get_alb_gals_row($id, $albums_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
1077
  global $wpdb;
1078
  $limit = 0;
1079
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
@@ -1086,7 +1087,7 @@ class WDWLibrary {
1086
  if ($sort_by != "RAND()") {
1087
  $sort_by = '`' . $sort_by . '`';
1088
  }
1089
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" ORDER BY ' . $sort_by . $sort_direction . $limit_str, $id));
1090
 
1091
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
1092
  $page_nav['total'] = $total;
714
  }
715
 
716
  public static function ajax_html_frontend_search_tags($form_id, $current_view, $cur_gal_id, $images_count, $tags_rows) {
 
 
 
 
717
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
718
  $bwg_search_tags = (isset($_POST['bwg_tag_id_' . $cur_gal_id]) && $_POST['bwg_tag_id_' . $cur_gal_id] != '' )? $_POST['bwg_tag_id_' . $cur_gal_id] : array();
719
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
1030
  $items_in_page = $load_more_image_count;
1031
  }
1032
  $limit = (((int) $_REQUEST['page_number_' . $bwg] - 2) * $items_in_page) + $images_per_page;
1033
+ $bwg_random_seed = isset($_SESSION['bwg_random_seed_'. $bwg]) ? $_SESSION['bwg_random_seed_'. $bwg] : '';
1034
+ }
1035
+ else {
1036
+ $bwg_random_seed = rand();
1037
+ $_SESSION['bwg_random_seed_'. $bwg] = $bwg_random_seed;
1038
  }
1039
  $limit_str = '';
1040
  if ($images_per_page) {
1049
  $where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $_REQUEST[$tag_input_name]) . ')," ';
1050
  }
1051
 
1052
+ $row = $wpdb->get_results('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . str_replace('RAND()', 'RAND(' . $bwg_random_seed . ')', $sort_by) . ' ' . $sort_direction . ' ' . $limit_str);
1053
  $total = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where);
1054
 
1055
  $page_nav['total'] = $total;
1074
  return $row;
1075
  }
1076
 
1077
+ public static function get_alb_gals_row($id, $albums_per_page, $sort_by, $bwg, $sort_direction = 'ASC') {
1078
  global $wpdb;
1079
  $limit = 0;
1080
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
1087
  if ($sort_by != "RAND()") {
1088
  $sort_by = '`' . $sort_by . '`';
1089
  }
1090
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" ORDER BY ' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str, $id));
1091
 
1092
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
1093
  $page_nav['total'] = $total;
frontend/models/BWGModelGalleryBox.php CHANGED
@@ -11,13 +11,16 @@ class BWGModelGalleryBox {
11
  if ($sort_by == 'size' || $sort_by == 'resolution') {
12
  $sort_by = ' CAST(image.' . $sort_by . ' AS SIGNED) ';
13
  }
 
 
 
14
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
15
  $sort_by = 'image.`order`';
16
  }
17
- if (preg_replace('/\s+/', '', $order_by) != 'asc') {
18
  $order_by = 'desc';
19
  }
20
-
21
  $filter_tags = (isset($_REQUEST['filter_tag_'. $bwg]) && $_REQUEST['filter_tag_'. $bwg]) ? explode(",", $_REQUEST['filter_tag_'. $bwg]) : array();
22
  $filter_search_name = (isset($_REQUEST['filter_search_name_'. $bwg])) ? esc_html($_REQUEST['filter_search_name_'. $bwg]) : '';
23
  $where = '';
@@ -33,33 +36,8 @@ class BWGModelGalleryBox {
33
  $where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $filter_tags) . ')," ';
34
  }
35
 
36
- $row = $wpdb->get_results('SELECT image.*, rates.rate FROM ' . $wpdb->prefix . 'bwg_image as image LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as rates ON image.id=rates.image_id ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . $sort_by . ' ' . $order_by);
37
-
38
- return $row;
39
- }
40
 
41
- public function get_image_rows_data_tag($tag_id, $sort_by, $order_by = 'asc') {
42
- global $wpdb;
43
- if ($sort_by == 'size' || $sort_by == 'resolution') {
44
- $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
45
- }
46
- elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
47
- $sort_by = '`order`';
48
- }
49
- if (preg_replace('/\s+/', '', $order_by) != 'asc') {
50
- $order_by = 'desc';
51
- }
52
- $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']));
53
  return $row;
54
  }
55
-
56
- ////////////////////////////////////////////////////////////////////////////////////////
57
- // Getters & Setters //
58
- ////////////////////////////////////////////////////////////////////////////////////////
59
- ////////////////////////////////////////////////////////////////////////////////////////
60
- // Private Methods //
61
- ////////////////////////////////////////////////////////////////////////////////////////
62
- ////////////////////////////////////////////////////////////////////////////////////////
63
- // Listeners //
64
- ////////////////////////////////////////////////////////////////////////////////////////
65
  }
11
  if ($sort_by == 'size' || $sort_by == 'resolution') {
12
  $sort_by = ' CAST(image.' . $sort_by . ' AS SIGNED) ';
13
  }
14
+ elseif ($sort_by == 'random' || $sort_by == 'RAND()') {
15
+ $sort_by = 'RAND()';
16
+ }
17
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
18
  $sort_by = 'image.`order`';
19
  }
20
+ if (strtolower($order_by) != 'asc') {
21
  $order_by = 'desc';
22
  }
23
+ $bwg_random_seed = isset($_SESSION['bwg_random_seed_'. $bwg]) ? $_SESSION['bwg_random_seed_'. $bwg] : '';
24
  $filter_tags = (isset($_REQUEST['filter_tag_'. $bwg]) && $_REQUEST['filter_tag_'. $bwg]) ? explode(",", $_REQUEST['filter_tag_'. $bwg]) : array();
25
  $filter_search_name = (isset($_REQUEST['filter_search_name_'. $bwg])) ? esc_html($_REQUEST['filter_search_name_'. $bwg]) : '';
26
  $where = '';
36
  $where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $filter_tags) . ')," ';
37
  }
38
 
39
+ $row = $wpdb->get_results('SELECT image.*, rates.rate FROM ' . $wpdb->prefix . 'bwg_image as image LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as rates ON image.id=rates.image_id ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . str_replace('RAND()', 'RAND(' . $bwg_random_seed . ')', $sort_by) . ' ' . $order_by);
 
 
 
40
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  return $row;
42
  }
 
 
 
 
 
 
 
 
 
 
43
  }
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -166,7 +166,7 @@ class BWGViewAlbum_compact_preview {
166
  $items_per_page_arr = array('images_per_page' => $params['compuct_albums_per_page'], 'load_more_image_count' => $params['compuct_albums_per_page']);
167
  $items_col_num = $params['compuct_album_column_number'];
168
  $sort_by = $from === "widget" && $params['show'] == 'random' ? 'RAND()' : 'order';
169
- $album_galleries_row = WDWLibrary::get_alb_gals_row($album_gallery_id, $items_per_page, $sort_by, $bwg, ' ASC ');
170
  $page_nav = $album_galleries_row['page_nav'];
171
  $album_galleries_row = $album_galleries_row['rows'];
172
  if (!$album_galleries_row) {
@@ -258,6 +258,9 @@ class BWGViewAlbum_compact_preview {
258
  wp_enqueue_style('bwg_mCustomScrollbar');
259
  $google_fonts = WDWLibrary::get_google_fonts();
260
  wp_enqueue_style('bwg_googlefonts');
 
 
 
261
  }
262
  else {
263
  echo '<style>' . $inline_style . '</style>';
166
  $items_per_page_arr = array('images_per_page' => $params['compuct_albums_per_page'], 'load_more_image_count' => $params['compuct_albums_per_page']);
167
  $items_col_num = $params['compuct_album_column_number'];
168
  $sort_by = $from === "widget" && $params['show'] == 'random' ? 'RAND()' : 'order';
169
+ $album_galleries_row = WDWLibrary::get_alb_gals_row($album_gallery_id, $items_per_page, $sort_by, $bwg, $sort_direction);
170
  $page_nav = $album_galleries_row['page_nav'];
171
  $album_galleries_row = $album_galleries_row['rows'];
172
  if (!$album_galleries_row) {
258
  wp_enqueue_style('bwg_mCustomScrollbar');
259
  $google_fonts = WDWLibrary::get_google_fonts();
260
  wp_enqueue_style('bwg_googlefonts');
261
+ if (isset($params['show_tag_box']) && $params['show_tag_box']) {
262
+ wp_enqueue_style('bwg_sumoselect');
263
+ }
264
  }
265
  else {
266
  echo '<style>' . $inline_style . '</style>';
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -110,7 +110,7 @@ class BWGViewAlbum_extended_preview {
110
  $items_per_page = $params['extended_albums_per_page'];
111
  $items_per_page_arr = array('images_per_page' => $params['extended_albums_per_page'], 'load_more_image_count' => $params['extended_albums_per_page']);
112
  $items_col_num = 1;
113
- $album_galleries_row = WDWLibrary::get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, ' ASC ');
114
  $page_nav = $album_galleries_row['page_nav'];
115
  $album_galleries_row = $album_galleries_row['rows'];
116
  if (!$album_galleries_row) {
@@ -201,6 +201,9 @@ class BWGViewAlbum_extended_preview {
201
  wp_enqueue_style('bwg_mCustomScrollbar');
202
  $google_fonts = WDWLibrary::get_google_fonts();
203
  wp_enqueue_style('bwg_googlefonts');
 
 
 
204
  }
205
  else {
206
  echo '<style>' . $inline_style . '</style>';
110
  $items_per_page = $params['extended_albums_per_page'];
111
  $items_per_page_arr = array('images_per_page' => $params['extended_albums_per_page'], 'load_more_image_count' => $params['extended_albums_per_page']);
112
  $items_col_num = 1;
113
+ $album_galleries_row = WDWLibrary::get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, 'ASC');
114
  $page_nav = $album_galleries_row['page_nav'];
115
  $album_galleries_row = $album_galleries_row['rows'];
116
  if (!$album_galleries_row) {
201
  wp_enqueue_style('bwg_mCustomScrollbar');
202
  $google_fonts = WDWLibrary::get_google_fonts();
203
  wp_enqueue_style('bwg_googlefonts');
204
+ if (isset($params['show_tag_box']) && $params['show_tag_box']) {
205
+ wp_enqueue_style('bwg_sumoselect');
206
+ }
207
  }
208
  else {
209
  echo '<style>' . $inline_style . '</style>';
frontend/views/BWGViewThumbnails.php CHANGED
@@ -14,7 +14,7 @@ class BWGViewThumbnails {
14
  $params['popup_autoplay'] = 0;
15
  }
16
  if (!isset($params['order_by'])) {
17
- $params['order_by'] = ' asc ';
18
  }
19
  if (!isset($params['popup_enable_pinterest'])) {
20
  $params['popup_enable_pinterest'] = 0;
@@ -173,6 +173,9 @@ class BWGViewThumbnails {
173
  wp_enqueue_style('bwg_mCustomScrollbar');
174
  $google_fonts = WDWLibrary::get_google_fonts();
175
  wp_enqueue_style('bwg_googlefonts');
 
 
 
176
  }
177
  else {
178
  echo '<style>' . $inline_style . '</style>';
14
  $params['popup_autoplay'] = 0;
15
  }
16
  if (!isset($params['order_by'])) {
17
+ $params['order_by'] = 'asc';
18
  }
19
  if (!isset($params['popup_enable_pinterest'])) {
20
  $params['popup_enable_pinterest'] = 0;
173
  wp_enqueue_style('bwg_mCustomScrollbar');
174
  $google_fonts = WDWLibrary::get_google_fonts();
175
  wp_enqueue_style('bwg_googlefonts');
176
+ if (isset($params['show_tag_box']) && $params['show_tag_box']) {
177
+ wp_enqueue_style('bwg_sumoselect');
178
+ }
179
  }
180
  else {
181
  echo '<style>' . $inline_style . '</style>';
js/bwg_shortcode.js CHANGED
@@ -347,6 +347,7 @@ function bwg_gallery_type(gallery_type) {
347
  jQuery("#tr_slideshow_description_position").css('display', 'none');
348
  jQuery("#tr_enable_slideshow_music").css('display', 'none');
349
  jQuery("#tr_slideshow_music_url").css('display', 'none');
 
350
 
351
  // Popup.
352
  jQuery("#tbody_popup_other").css('display', 'none');
@@ -498,6 +499,7 @@ function bwg_gallery_type(gallery_type) {
498
  jQuery("#tr_show_sort_images").css('display', 'none');
499
  jQuery("#tr_show_tag_box").css('display', 'none');
500
  jQuery("#tr_tag").css('display', '');
 
501
  if (jQuery("input[name=enable_slideshow_filmstrip]:checked").val() == 1) {
502
  bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes');
503
  }
347
  jQuery("#tr_slideshow_description_position").css('display', 'none');
348
  jQuery("#tr_enable_slideshow_music").css('display', 'none');
349
  jQuery("#tr_slideshow_music_url").css('display', 'none');
350
+ jQuery("#tr_slideshow_effect_duration").css('display', 'none');
351
 
352
  // Popup.
353
  jQuery("#tbody_popup_other").css('display', 'none');
499
  jQuery("#tr_show_sort_images").css('display', 'none');
500
  jQuery("#tr_show_tag_box").css('display', 'none');
501
  jQuery("#tr_tag").css('display', '');
502
+ jQuery("#tr_slideshow_effect_duration").css('display', '')
503
  if (jQuery("input[name=enable_slideshow_filmstrip]:checked").val() == 1) {
504
  bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes');
505
  }
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.3.25
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -1938,7 +1938,7 @@ function bwg_activate() {
1938
  ));
1939
  }
1940
  $version = get_option('wd_bwg_version');
1941
- $new_version = '1.3.25';
1942
  if ($version && version_compare($version, $new_version, '<')) {
1943
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1944
  bwg_update($version);
@@ -1990,7 +1990,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
1990
 
1991
  function bwg_update_hook() {
1992
  $version = get_option('wd_bwg_version');
1993
- $new_version = '1.3.25';
1994
  if ($version && version_compare($version, $new_version, '<')) {
1995
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1996
  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.3.26
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
1938
  ));
1939
  }
1940
  $version = get_option('wd_bwg_version');
1941
+ $new_version = '1.3.26';
1942
  if ($version && version_compare($version, $new_version, '<')) {
1943
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1944
  bwg_update($version);
1990
 
1991
  function bwg_update_hook() {
1992
  $version = get_option('wd_bwg_version');
1993
+ $new_version = '1.3.26';
1994
  if ($version && version_compare($version, $new_version, '<')) {
1995
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1996
  bwg_update($version);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: content gallery, gallery, gallery image, image gallery, images gallery, lightbox gallery, media gallery, photo gallery, responsive gallery, thumbnail gallery, wordpress gallery, youtube gallery
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
- Stable tag: 1.3.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -175,6 +175,17 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
 
 
 
 
178
  = 1.3.25 =
179
  * Fixed: Google Fonts.
180
  * Added: Select all button on tags page.
4
  Tags: content gallery, gallery, gallery image, image gallery, images gallery, lightbox gallery, media gallery, photo gallery, responsive gallery, thumbnail gallery, wordpress gallery, youtube gallery
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
+ Stable tag: 1.3.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.3.26 =
179
+ * Fixed: Sanitize folder names in filemanager.
180
+ * Fixed: Random order (pagination and lightbox).
181
+ * Fixed: Album widget sort direction.
182
+ * Fixed: Images ordering bug in lightbox.
183
+ * Fixed: Removed unnecessary spaces from order by.
184
+ * Fixed: Gallery title bug in extended album view.
185
+ * Fixed: Tags cloud widget styles conflict with some themes.
186
+ * Fixed: Open lightbox from tag cloud.
187
+ * Changed: Generate shortcode with ajax.
188
+
189
  = 1.3.25 =
190
  * Fixed: Google Fonts.
191
  * Added: Select all button on tags page.