Photo Gallery by WD – Responsive Photo Gallery - Version 1.4.14

Version Description

  • Fixed: Conflict with IE 11 version.
  • Fixed: Lightbox autoplay.
Download this release

Release Info

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

Code changes from version 1.4.13 to 1.4.14

frontend/views/BWGViewGalleryBox.php CHANGED
@@ -2672,7 +2672,7 @@ class BWGViewGalleryBox {
2672
  jQuery(".bwg_play_pause, .bwg_popup_image").on(bwg_click, function () {
2673
  if (jQuery(".bwg_play_pause").length && jQuery(".bwg_play_pause").hasClass("fa-play")) {
2674
  /* PLay.*/
2675
- bwg_play();
2676
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', BWG()->prefix); ?>");
2677
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
2678
  }
@@ -2684,15 +2684,11 @@ class BWGViewGalleryBox {
2684
  }
2685
  });
2686
  /* Open with autoplay.*/
2687
- <?php
2688
- if ($open_with_autoplay) {
2689
- ?>
2690
- bwg_play();
2691
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', BWG()->prefix); ?>");
2692
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
2693
- <?php
2694
- }
2695
- ?>
2696
  /* Open with fullscreen.*/
2697
  <?php
2698
  if ($open_with_fullscreen) {
@@ -2729,8 +2725,8 @@ class BWGViewGalleryBox {
2729
 
2730
  jQuery(window).focus(function() {
2731
  /* event_stack = [];*/
2732
- if (jQuery(".bwg_play_pause").length && !jQuery(".bwg_play_pause").hasClass("fa-play")) {
2733
- bwg_play();
2734
  }
2735
  /*var i = 0;
2736
  jQuery(".bwg_slider").children("span").each(function () {
2672
  jQuery(".bwg_play_pause, .bwg_popup_image").on(bwg_click, function () {
2673
  if (jQuery(".bwg_play_pause").length && jQuery(".bwg_play_pause").hasClass("fa-play")) {
2674
  /* PLay.*/
2675
+ bwg_play( data );
2676
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', BWG()->prefix); ?>");
2677
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
2678
  }
2684
  }
2685
  });
2686
  /* Open with autoplay.*/
2687
+ <?php if ($open_with_autoplay) { ?>
2688
+ bwg_play( data );
 
 
2689
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', BWG()->prefix); ?>");
2690
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
2691
+ <?php } ?>
 
 
2692
  /* Open with fullscreen.*/
2693
  <?php
2694
  if ($open_with_fullscreen) {
2725
 
2726
  jQuery(window).focus(function() {
2727
  /* event_stack = [];*/
2728
+ if (jQuery(".bwg_play_pause").length && !jQuery(".bwg_play_pause").hasClass("fa-play")) {
2729
+ bwg_play( data );
2730
  }
2731
  /*var i = 0;
2732
  jQuery(".bwg_slider").children("span").each(function () {
js/bwg_frontend.js CHANGED
@@ -196,26 +196,26 @@ function ready_slideshow( bwg ) {
196
 
197
  /* Play/pause.*/
198
  jQuery("#bwg_slideshow_play_pause_"+bwg).on(bwg_click, function () {
199
- if (jQuery(".bwg_ctrl_btn_"+bwg).hasClass("fa-play")) {
200
- bwg_play( bwg );
201
- jQuery(".bwg_slideshow_play_pause_"+bwg).attr("title", "Pause");
202
- jQuery(".bwg_slideshow_play_pause_"+bwg).attr("class", "bwg_ctrl_btn_"+bwg+" bwg_slideshow_play_pause_"+bwg+" fa fa-pause");
203
- if (bwg_params[bwg]['enable_slideshow_music']) {
204
- document.getElementById("bwg_audio_"+bwg).play();
205
- }
206
  }
207
- else {
208
- /* Pause.*/
209
- window.clearInterval(bwg_params[bwg]['bwg_playInterval']);
210
- jQuery(".bwg_slideshow_play_pause_"+bwg).attr("title", "Play");
211
- jQuery(".bwg_slideshow_play_pause_"+bwg).attr("class", "bwg_ctrl_btn_"+bwg+" bwg_slideshow_play_pause_"+bwg+" fa fa-play");
212
- if (bwg_params[bwg]['enable_slideshow_music']) {
213
- document.getElementById("bwg_audio_"+bwg).pause();
214
- }
215
  }
 
216
  });
217
  if ( bwg_params[bwg]['enable_slideshow_autoplay'] ) {
218
- bwg_play( bwg );
219
  jQuery(".bwg_slideshow_play_pause_"+bwg).attr("title", "Pause");
220
  jQuery(".bwg_slideshow_play_pause_"+bwg).attr("class", "bwg_ctrl_btn_"+bwg+" bwg_slideshow_play_pause_"+bwg+" fa fa-pause");
221
  if ( bwg_params[bwg]['enable_slideshow_music'] ) {
@@ -811,7 +811,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
811
  if (typeof data[key] != 'undefined') {
812
  if (typeof data[current_key] != 'undefined') {
813
  if (jQuery(".bwg_play_pause").length && !jQuery(".bwg_play_pause").hasClass("fa-play")) {
814
- bwg_play();
815
  }
816
 
817
  if (!from_effect) {
@@ -2038,7 +2038,7 @@ function bwg_change_image_slideshow(current_key, key, data, from_effect, bwg) {
2038
  });
2039
  if (data[key]) {
2040
  if (jQuery('.bwg_ctrl_btn_' + bwg).hasClass('fa-pause')) {
2041
- bwg_play( bwg );
2042
  }
2043
 
2044
  if (!from_effect) {
@@ -2203,10 +2203,10 @@ function bwg_popup_resize_slidshow( bwg ) {
2203
  bwg_resize_instagram_post( bwg );
2204
  /* Set watermark container size. */
2205
  bwg_change_watermark_container( bwg );
2206
- var filmstrip_container_css = (bwg_params[bwg]['filmstrip_direction'] == 'horizontal') ? 'width: ' + bwg_params[bwg]['image_width'] : 'height: ' + bwg_params[bwg]['image_height'];
2207
- var filmstrip_css = (bwg_params[bwg]['filmstrip_direction'] == 'horizontal') ? 'width: ' + (bwg_params[bwg]['image_width'] - 40) : 'height: ' + (bwg_params[bwg]['image_height'] - 40);
2208
- jQuery(".bwg_slideshow_filmstrip_container_" + bwg).css({ filmstrip_container_css });
2209
- jQuery(".bwg_slideshow_filmstrip_"+bwg).css({ filmstrip_css });
2210
  jQuery(".bwg_slideshow_dots_container_"+bwg).css({width: bwg_params[bwg]['image_width'] });
2211
  jQuery("#bwg_slideshow_play_pause-ico_"+bwg).css({fontSize: (bwg_params[bwg]['slideshow_play_pause_btn_size'])});
2212
  jQuery(".bwg_slideshow_watermark_image_"+bwg).css({maxWidth: bwg_params[bwg]['watermark_width'], maxHeight: bwg_params[bwg]['watermark_height']});
@@ -2311,16 +2311,14 @@ function bwg_resize_instagram_post( bwg ) {
2311
  }
2312
  }
2313
 
2314
- function bwg_play( bwg ) {
2315
- var data = ( typeof bwg != 'undefined' ) ? bwg_params[bwg]['data'] : bwg_param['data'];
2316
  if ( typeof bwg != 'undefined' ) {
2317
- window.clearInterval(bwg_params[bwg]['bwg_playInterval']);
2318
- } else {
2319
- window.clearInterval(bwg_param['bwg_playInterval']);
2320
  }
2321
 
2322
  /* Play.*/
2323
  if ( typeof bwg != 'undefined' ) { /* SLIDESHOW */
 
2324
  bwg_params[bwg]['bwg_playInterval'] = setInterval(function () {
2325
  var iterator = 1;
2326
  if (bwg_params[bwg]['enable_slideshow_shuffle']) {
@@ -2329,15 +2327,20 @@ function bwg_play( bwg ) {
2329
  bwg_change_image( parseInt(jQuery("#bwg_current_image_key_"+bwg).val()), (parseInt(jQuery("#bwg_current_image_key_"+bwg).val()) + iterator) % data.length, data, '', bwg )
2330
  }, bwg_params[bwg]['slideshow_interval'] * 1000);
2331
  } else {
2332
- bwg_param['bwg_playInterval'] = setInterval(function () {
2333
- if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
2334
- if (bwg_param['enable_loop'] == 1) {
2335
- /* Wrap around.*/
2336
- bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0, data);
2337
  }
2338
- return;
2339
- }
2340
- bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data)
2341
- }, bwg_param['slideshow_interval'] * 1000);
 
 
 
 
 
 
2342
  }
2343
  }
196
 
197
  /* Play/pause.*/
198
  jQuery("#bwg_slideshow_play_pause_"+bwg).on(bwg_click, function () {
199
+ if (jQuery(".bwg_ctrl_btn_"+bwg).hasClass("fa-play")) {
200
+ bwg_play( bwg_params[bwg]['data'], bwg );
201
+ jQuery(".bwg_slideshow_play_pause_"+bwg).attr("title", "Pause");
202
+ jQuery(".bwg_slideshow_play_pause_"+bwg).attr("class", "bwg_ctrl_btn_"+bwg+" bwg_slideshow_play_pause_"+bwg+" fa fa-pause");
203
+ if ( bwg_params[bwg]['enable_slideshow_music'] == 1 ) {
204
+ document.getElementById("bwg_audio_"+bwg).play();
 
205
  }
206
+ }
207
+ else {
208
+ /* Pause.*/
209
+ window.clearInterval(bwg_params[bwg]['bwg_playInterval']);
210
+ jQuery(".bwg_slideshow_play_pause_"+bwg).attr("title", "Play");
211
+ jQuery(".bwg_slideshow_play_pause_"+bwg).attr("class", "bwg_ctrl_btn_"+bwg+" bwg_slideshow_play_pause_"+bwg+" fa fa-play");
212
+ if (bwg_params[bwg]['enable_slideshow_music'] == 1) {
213
+ document.getElementById("bwg_audio_"+bwg).pause();
214
  }
215
+ }
216
  });
217
  if ( bwg_params[bwg]['enable_slideshow_autoplay'] ) {
218
+ bwg_play( bwg_params[bwg]['data'], bwg );
219
  jQuery(".bwg_slideshow_play_pause_"+bwg).attr("title", "Pause");
220
  jQuery(".bwg_slideshow_play_pause_"+bwg).attr("class", "bwg_ctrl_btn_"+bwg+" bwg_slideshow_play_pause_"+bwg+" fa fa-pause");
221
  if ( bwg_params[bwg]['enable_slideshow_music'] ) {
811
  if (typeof data[key] != 'undefined') {
812
  if (typeof data[current_key] != 'undefined') {
813
  if (jQuery(".bwg_play_pause").length && !jQuery(".bwg_play_pause").hasClass("fa-play")) {
814
+ bwg_play( data );
815
  }
816
 
817
  if (!from_effect) {
2038
  });
2039
  if (data[key]) {
2040
  if (jQuery('.bwg_ctrl_btn_' + bwg).hasClass('fa-pause')) {
2041
+ bwg_play( bwg_params[bwg]['data'], bwg );
2042
  }
2043
 
2044
  if (!from_effect) {
2203
  bwg_resize_instagram_post( bwg );
2204
  /* Set watermark container size. */
2205
  bwg_change_watermark_container( bwg );
2206
+ var filmstrip_container_css = (bwg_params[bwg]['filmstrip_direction'] == 'horizontal') ? '{ "width": ' + bwg_params[bwg]['image_width'] + ' }' : ' { "height:" ' + bwg_params[bwg]['image_height'] + ' }';
2207
+ jQuery(".bwg_slideshow_filmstrip_container_" + bwg).css( JSON.parse(filmstrip_container_css) );
2208
+ var filmstrip_css = (bwg_params[bwg]['filmstrip_direction'] == 'horizontal') ? '{ "width:" ' + (bwg_params[bwg]['image_width'] - 40) + ' }' : '{ "height:" ' + (bwg_params[bwg]['image_height'] - 40) + ' }';
2209
+ jQuery(".bwg_slideshow_filmstrip_"+bwg).css( JSON.parse(filmstrip_css) );
2210
  jQuery(".bwg_slideshow_dots_container_"+bwg).css({width: bwg_params[bwg]['image_width'] });
2211
  jQuery("#bwg_slideshow_play_pause-ico_"+bwg).css({fontSize: (bwg_params[bwg]['slideshow_play_pause_btn_size'])});
2212
  jQuery(".bwg_slideshow_watermark_image_"+bwg).css({maxWidth: bwg_params[bwg]['watermark_width'], maxHeight: bwg_params[bwg]['watermark_height']});
2311
  }
2312
  }
2313
 
2314
+ function bwg_play( data, bwg ) {
 
2315
  if ( typeof bwg != 'undefined' ) {
2316
+ var data = bwg_params[bwg]['data'];
 
 
2317
  }
2318
 
2319
  /* Play.*/
2320
  if ( typeof bwg != 'undefined' ) { /* SLIDESHOW */
2321
+ window.clearInterval(bwg_params[bwg]['bwg_playInterval']);
2322
  bwg_params[bwg]['bwg_playInterval'] = setInterval(function () {
2323
  var iterator = 1;
2324
  if (bwg_params[bwg]['enable_slideshow_shuffle']) {
2327
  bwg_change_image( parseInt(jQuery("#bwg_current_image_key_"+bwg).val()), (parseInt(jQuery("#bwg_current_image_key_"+bwg).val()) + iterator) % data.length, data, '', bwg )
2328
  }, bwg_params[bwg]['slideshow_interval'] * 1000);
2329
  } else {
2330
+ window.clearInterval(bwg_param['bwg_playInterval']);
2331
+ bwg_param['bwg_playInterval'] = setInterval(function () {
2332
+ if ( (jQuery(".bwg_play_pause").length && jQuery(".bwg_play_pause").hasClass("fa-play"))) {
2333
+ return;
 
2334
  }
2335
+
2336
+ if (typeof data != 'undefined' && typeof data[(parseInt(jQuery('#bwg_current_image_key').val()) + 1)] == 'undefined') {
2337
+ if (bwg_param['enable_loop'] == 1) {
2338
+ /* Wrap around.*/
2339
+ bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0, data);
2340
+ }
2341
+ return;
2342
+ }
2343
+ bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data)
2344
+ }, bwg_param['slideshow_interval'] * 1000);
2345
  }
2346
  }
photo-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/
5
  * 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.
6
- * Version: 1.4.13
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/pricing/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -81,8 +81,8 @@ final class BWG {
81
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
82
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
83
  $this->main_file = plugin_basename(__FILE__);
84
- $this->plugin_version = '1.4.13';
85
- $this->db_version = '1.4.13';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/
5
  * 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.
6
+ * Version: 1.4.14
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/pricing/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
81
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
82
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
83
  $this->main_file = plugin_basename(__FILE__);
84
+ $this->plugin_version = '1.4.14';
85
+ $this->db_version = '1.4.14';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,wdsupport,photogallerysupport,10web
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
- Stable tag: 1.4.13
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -279,6 +279,9 @@ Choose whether to display random or the first/last specific number of images.
279
 
280
  == Changelog ==
281
 
 
 
 
282
 
283
  = 1.4.13 =
284
  * Added: Download button functionality related to the filters.
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 1.4.14
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
279
 
280
  == Changelog ==
281
 
282
+ = 1.4.14 =
283
+ * Fixed: Conflict with IE 11 version.
284
+ * Fixed: Lightbox autoplay.
285
 
286
  = 1.4.13 =
287
  * Added: Download button functionality related to the filters.