Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.23

Version Description

bug in preload option fixed

Download this release

Release Info

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

Code changes from version 1.2.22 to 1.2.23

framework/WDWLibrary.php CHANGED
@@ -519,19 +519,15 @@ class WDWLibrary {
519
  $next_button = '›';
520
  $last_button = '»';
521
  }
522
- $first_page = "first-page";
523
- $prev_page = "prev-page";
524
- $next_page = "next-page";
525
- $last_page = "last-page";
526
  if ($page_number == 1) {
527
  $first_page = "first-page disabled";
528
  $prev_page = "prev-page disabled";
529
- $next_page = "next-page";
530
- $last_page = "last-page";
531
  }
532
  if ($page_number >= $items_county) {
533
- $first_page = "first-page ";
534
- $prev_page = "prev-page";
535
  $next_page = "next-page disabled";
536
  $last_page = "last-page disabled";
537
  }
519
  $next_button = '›';
520
  $last_button = '»';
521
  }
522
+ $first_page = "first-page-" . $current_view;
523
+ $prev_page = "prev-page-" . $current_view;
524
+ $next_page = "next-page-" . $current_view;
525
+ $last_page = "last-page-" . $current_view;
526
  if ($page_number == 1) {
527
  $first_page = "first-page disabled";
528
  $prev_page = "prev-page disabled";
 
 
529
  }
530
  if ($page_number >= $items_county) {
 
 
531
  $next_page = "next-page disabled";
532
  $last_page = "last-page disabled";
533
  }
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -1489,32 +1489,15 @@ class BWGViewGalleryBox {
1489
  });
1490
  function bwg_preload_images(key) {
1491
  count = <?php echo (int) $option_row->preload_images_count / 2; ?>;
 
 
 
 
1492
  if (count != 0) {
1493
- var img_number = data.length;
1494
- /*check if interval is within image numbers interval*/
1495
- if(key - count >=0 ){
1496
- for (var i = key - count; i < key; i++) {
1497
- var is_embed = data[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1498
- jQuery("<img/>").attr("src", (typeof data[i] != "undefined" && !is_embed) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[i]["image_url"]).text() : "");
1499
- }
1500
- }
1501
- else{
1502
- for (var i = 0; i < key; i++) {
1503
- var is_embed = data[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1504
- jQuery("<img/>").attr("src", (typeof data[i] != "undefined" && !is_embed) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[i]["image_url"]).text() : "");
1505
- }
1506
- }
1507
- if(key + count <=img_number ){
1508
- for (var i = key; i < key + count; i++) {
1509
- var is_embed = data[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1510
- jQuery("<img/>").attr("src", (typeof data[i] != "undefined" && !is_embed) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[i]["image_url"]).text() : "");
1511
- }
1512
- }
1513
- else{
1514
- for (var i = key; i < data.length; i++) {
1515
- var is_embed = data[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1516
- jQuery("<img/>").attr("src", (typeof data[i] != "undefined" && !is_embed) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[i]["image_url"]).text() : "");
1517
- }
1518
  }
1519
  }
1520
  else {
1489
  });
1490
  function bwg_preload_images(key) {
1491
  count = <?php echo (int) $option_row->preload_images_count / 2; ?>;
1492
+ var count_all = data.length;
1493
+ if (count_all < <?php echo $option_row->preload_images_count; ?>) {
1494
+ count = 0;
1495
+ }
1496
  if (count != 0) {
1497
+ for (var i = key - count; i < key + count; i++) {
1498
+ var index = (i + count_all) % count_all;
1499
+ var is_embed = data[index]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1500
+ jQuery("<img/>").attr("src", (typeof data[index] != "undefined" && !is_embed) ? '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[index]["image_url"]).text() : "");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1501
  }
1502
  }
1503
  else {
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.22
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -3139,7 +3139,7 @@ function bwg_activate() {
3139
  ));
3140
  }
3141
  $version = get_option("wd_bwg_version");
3142
- $new_version = '1.2.22';
3143
  if ($version && version_compare($version, $new_version, '<')) {
3144
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3145
  bwg_update($version);
@@ -3157,7 +3157,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
3157
 
3158
  function bwg_update_hook() {
3159
  $version = get_option("wd_bwg_version");
3160
- $new_version = '1.2.22';
3161
  if ($version && version_compare($version, $new_version, '<')) {
3162
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3163
  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.23
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
3139
  ));
3140
  }
3141
  $version = get_option("wd_bwg_version");
3142
+ $new_version = '1.2.23';
3143
  if ($version && version_compare($version, $new_version, '<')) {
3144
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3145
  bwg_update($version);
3157
 
3158
  function bwg_update_hook() {
3159
  $version = get_option("wd_bwg_version");
3160
+ $new_version = '1.2.23';
3161
  if ($version && version_compare($version, $new_version, '<')) {
3162
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3163
  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, 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
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.2.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -205,6 +205,9 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
205
 
206
 
207
  == Changelog ==
 
 
 
208
  = 1.2.21 =
209
  minor bugs fixes
210
 
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
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.2.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
205
 
206
 
207
  == Changelog ==
208
+ = 1.2.23 =
209
+ bug in preload option fixed
210
+
211
  = 1.2.21 =
212
  minor bugs fixes
213