Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.52

Version Description

  • Added: Images count parameter for load more.
  • Fixed: Pinterest share.
  • Fixed: Depricated function in carousel.
Download this release

Release Info

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

Code changes from version 1.2.51 to 1.2.52

admin/views/BWGViewBWGShortcode.php CHANGED
@@ -310,12 +310,16 @@ class BWGViewBWGShortcode {
310
  <tr id="tr_image_enable_page">
311
  <td class="spider_label"><label>Enable pagination: </label></td>
312
  <td>
313
- <input type="radio" name="image_enable_page" id="image_page_yes" value="1" <?php echo ($option_row->image_enable_page == '1') ? 'checked' : ''; ?> /><label for="image_page_yes">Yes</label>
314
- <input type="radio" name="image_enable_page" id="image_page_no" value="0" <?php echo ($option_row->image_enable_page == '0') ? 'checked' : ''; ?> /><label for="image_page_no">No</label>
315
- <input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($option_row->image_enable_page == '2') ? 'checked' : ''; ?> /><label for="image_page_loadmore">Load More</label>
316
- <input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($option_row->image_enable_page == '3') ? 'checked' : ''; ?> /><label for="image_page_scrol_load">Scroll Load</label>
317
  </td>
318
  </tr>
 
 
 
 
319
  <tr id="tr_thumb_width_height">
320
  <td title="Maximum values for thumbnail dimension." class="spider_label"><label id="thumb_width_height_label" for="thumb_width">Image Thumbnail dimensions: </label></td>
321
  <td>
@@ -411,11 +415,19 @@ class BWGViewBWGShortcode {
411
  <tr id="tr_compuct_album_enable_page">
412
  <td class="spider_label"><label>Enable pagination: </label></td>
413
  <td>
414
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_yes" value="1" <?php echo ($option_row->album_enable_page) ? 'checked' : ''; ?> /><label for="compuct_album_page_yes">Yes</label>
415
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_no" value="0" <?php echo ($option_row->album_enable_page) ? '' : 'checked'; ?> /><label for="compuct_album_page_no">No</label>
416
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> /><label for="compuct_album_page_loadmore">Load More</label>
417
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> /><label for="compuct_album_page_scrol_load">Scroll Load</label>
418
  </td>
 
 
 
 
 
 
 
 
419
  </tr>
420
 
421
  <!--Extended Album view-->
@@ -505,12 +517,20 @@ class BWGViewBWGShortcode {
505
  <tr id="tr_extended_album_enable_page">
506
  <td class="spider_label"><label>Enable pagination: </label></td>
507
  <td>
508
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> /><label for="extended_album_page_yes">Yes</label>
509
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> /><label for="extended_album_page_no">No</label>
510
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> /><label for="extended_album_page_loadmore">Load More</label>
511
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> /><label for="extended_album_page_scrol_load">Scroll Load </label>
512
  </td>
513
  </tr>
 
 
 
 
 
 
 
 
514
 
515
  <!--Image Browser view-->
516
  <tr id="tr_image_browser_width_height">
@@ -555,12 +575,16 @@ class BWGViewBWGShortcode {
555
  <tr id="tr_blog_style_enable_page">
556
  <td class="spider_label"><label>Enable pagination: </label></td>
557
  <td>
558
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($option_row->blog_style_enable_page == '1') ? 'checked' : ''; ?> /><label for="blog_style_page_yes">Yes</label>
559
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($option_row->blog_style_enable_page == '0') ? 'checked' : ''; ?> /><label for="blog_style_page_no">No</label>
560
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_loadmore" value="2" <?php echo ($option_row->blog_style_enable_page == '2') ? 'checked' : ''; ?> /><label for="blog_style_page_loadmore">Load more</label>
561
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($option_row->blog_style_enable_page == '3') ? 'checked' : ''; ?> /><label for="blog_style_page_scrol_load">Scroll Load </label>
562
  </td>
563
  </tr>
 
 
 
 
564
 
565
  <!--Slideshow view-->
566
  <tr id="tr_slideshow_effect">
@@ -1112,6 +1136,7 @@ class BWGViewBWGShortcode {
1112
  }
1113
  jQuery("#image_column_number").val(short_code['image_column_number']);
1114
  jQuery("#images_per_page").val(short_code['images_per_page']);
 
1115
  jQuery("#image_title_" + short_code['image_title']).attr('checked', 'checked');
1116
  if (short_code['image_enable_page'] == 1) {
1117
  jQuery("#image_page_yes").attr('checked', 'checked');
@@ -1268,6 +1293,8 @@ class BWGViewBWGShortcode {
1268
  jQuery("#compuct_album_image_title_" + short_code['compuct_album_image_title']).attr('checked', 'checked');
1269
  jQuery("#compuct_album_image_thumb_width").val(short_code['compuct_album_image_thumb_width']);
1270
  jQuery("#compuct_album_image_thumb_height").val(short_code['compuct_album_image_thumb_height']);
 
 
1271
  if (short_code['compuct_album_enable_page'] == 1) {
1272
  jQuery("#compuct_album_page_yes").attr('checked', 'checked');
1273
  }
@@ -1346,6 +1373,8 @@ class BWGViewBWGShortcode {
1346
  jQuery("#extended_album_image_title_" + short_code['extended_album_image_title']).attr('checked', 'checked');
1347
  jQuery("#extended_album_image_thumb_width").val(short_code['extended_album_image_thumb_width']);
1348
  jQuery("#extended_album_image_thumb_height").val(short_code['extended_album_image_thumb_height']);
 
 
1349
  if (short_code['extended_album_enable_page'] == 1) {
1350
  jQuery("#extended_album_page_yes").attr('checked', 'checked');
1351
  }
@@ -1594,6 +1623,7 @@ class BWGViewBWGShortcode {
1594
  tagtext += ' thumb_width="' + jQuery("#thumb_width").val() + '"';
1595
  tagtext += ' thumb_height="' + jQuery("#thumb_height").val() + '"';
1596
  title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
 
1597
  break;
1598
 
1599
  }
@@ -1656,6 +1686,8 @@ class BWGViewBWGShortcode {
1656
  tagtext += ' compuct_album_image_thumb_width="' + jQuery("#compuct_album_image_thumb_width").val() + '"';
1657
  tagtext += ' compuct_album_image_thumb_height="' + jQuery("#compuct_album_image_thumb_height").val() + '"';
1658
  tagtext += ' compuct_album_enable_page="' + jQuery("input[name=compuct_album_enable_page]:checked").val() + '"';
 
 
1659
  title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
1660
  break;
1661
 
@@ -1682,6 +1714,8 @@ class BWGViewBWGShortcode {
1682
  tagtext += ' extended_album_image_thumb_width="' + jQuery("#extended_album_image_thumb_width").val() + '"';
1683
  tagtext += ' extended_album_image_thumb_height="' + jQuery("#extended_album_image_thumb_height").val() + '"';
1684
  tagtext += ' extended_album_enable_page="' + jQuery("input[name=extended_album_enable_page]:checked").val() + '"';
 
 
1685
  title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
1686
  break;
1687
 
@@ -1757,6 +1791,9 @@ class BWGViewBWGShortcode {
1757
  jQuery("#bwg_shortcode").val('[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']');
1758
  <?php } ?>
1759
  }
 
 
 
1760
  </script>
1761
  </body>
1762
  </html>
310
  <tr id="tr_image_enable_page">
311
  <td class="spider_label"><label>Enable pagination: </label></td>
312
  <td>
313
+ <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_yes" value="1" <?php echo ($option_row->image_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_yes">Yes</label>
314
+ <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_no" value="0" <?php echo ($option_row->image_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_no">No</label>
315
+ <input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($option_row->image_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_loadmore">Load More</label>
316
+ <input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($option_row->image_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_scrol_load">Scroll Load</label>
317
  </td>
318
  </tr>
319
+ <tr id="tr_load_more_image_count">
320
+ <td class="spider_label"><label for="load_more_image_count">Images per load: </label></td>
321
+ <td><input type="text" name="load_more_image_count" id="load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
322
+ </tr>
323
  <tr id="tr_thumb_width_height">
324
  <td title="Maximum values for thumbnail dimension." class="spider_label"><label id="thumb_width_height_label" for="thumb_width">Image Thumbnail dimensions: </label></td>
325
  <td>
415
  <tr id="tr_compuct_album_enable_page">
416
  <td class="spider_label"><label>Enable pagination: </label></td>
417
  <td>
418
+ <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="compuct_album_page_yes">Yes</label>
419
+ <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_no">No</label>
420
+ <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_loadmore">Load More</label>
421
+ <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_scrol_load">Scroll Load</label>
422
  </td>
423
+ </tr>
424
+ <tr id="tr_compuct_albums_per_page_load_more">
425
+ <td title="If you want to display all albums you should leave it blank or insert 0." class="spider_label"><label for="compuct_albums_per_page_load_more">Albums per load: </label></td>
426
+ <td><input type="text" name="compuct_albums_per_page_load_more" id="compuct_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
427
+ </tr>
428
+ <tr id="tr_compuct_album_load_more_image_count">
429
+ <td class="spider_label"><label for="compuct_album_load_more_image_count">Images per load: </label></td>
430
+ <td><input type="text" name="compuct_album_load_more_image_count" id="compuct_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
431
  </tr>
432
 
433
  <!--Extended Album view-->
517
  <tr id="tr_extended_album_enable_page">
518
  <td class="spider_label"><label>Enable pagination: </label></td>
519
  <td>
520
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_yes">Yes</label>
521
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_no">No</label>
522
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_loadmore">Load More</label>
523
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_scrol_load">Scroll Load </label>
524
  </td>
525
  </tr>
526
+ <tr id="tr_extended_albums_per_page_load_more">
527
+ <td title="If you want to display all albums you should leave it blank or insert 0." class="spider_label"><label for="extended_albums_per_page_load_more">Albums per load: </label></td>
528
+ <td><input type="text" name="extended_albums_per_page_load_more" id="extended_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
529
+ </tr>
530
+ <tr id="tr_extended_album_load_more_image_count">
531
+ <td class="spider_label"><label for="extended_album_load_more_image_count">Images per load: </label></td>
532
+ <td><input type="text" name="extended_album_load_more_image_count" id="extended_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
533
+ </tr>
534
 
535
  <!--Image Browser view-->
536
  <tr id="tr_image_browser_width_height">
575
  <tr id="tr_blog_style_enable_page">
576
  <td class="spider_label"><label>Enable pagination: </label></td>
577
  <td>
578
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($option_row->blog_style_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_yes">Yes</label>
579
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($option_row->blog_style_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_no">No</label>
580
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_loadmore" value="2" <?php echo ($option_row->blog_style_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_loadmore">Load more</label>
581
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($option_row->blog_style_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_scrol_load">Scroll Load </label>
582
  </td>
583
  </tr>
584
+ <tr id="tr_blog_style_load_more_image_count">
585
+ <td class="spider_label"><label for="blog_style_load_more_image_count">Images per load: </label></td>
586
+ <td><input type="text" name="blog_style_load_more_image_count" id="blog_style_load_more_image_count" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
587
+ </tr>
588
 
589
  <!--Slideshow view-->
590
  <tr id="tr_slideshow_effect">
1136
  }
1137
  jQuery("#image_column_number").val(short_code['image_column_number']);
1138
  jQuery("#images_per_page").val(short_code['images_per_page']);
1139
+ jQuery("#load_more_image_count").val(short_code['load_more_image_count']);
1140
  jQuery("#image_title_" + short_code['image_title']).attr('checked', 'checked');
1141
  if (short_code['image_enable_page'] == 1) {
1142
  jQuery("#image_page_yes").attr('checked', 'checked');
1293
  jQuery("#compuct_album_image_title_" + short_code['compuct_album_image_title']).attr('checked', 'checked');
1294
  jQuery("#compuct_album_image_thumb_width").val(short_code['compuct_album_image_thumb_width']);
1295
  jQuery("#compuct_album_image_thumb_height").val(short_code['compuct_album_image_thumb_height']);
1296
+ jQuery("#compuct_album_load_more_image_count").val(short_code['compuct_album_load_more_image_count']);
1297
+ jQuery("#compuct_albums_per_page_load_more").val(short_code['compuct_albums_per_page_load_more']);
1298
  if (short_code['compuct_album_enable_page'] == 1) {
1299
  jQuery("#compuct_album_page_yes").attr('checked', 'checked');
1300
  }
1373
  jQuery("#extended_album_image_title_" + short_code['extended_album_image_title']).attr('checked', 'checked');
1374
  jQuery("#extended_album_image_thumb_width").val(short_code['extended_album_image_thumb_width']);
1375
  jQuery("#extended_album_image_thumb_height").val(short_code['extended_album_image_thumb_height']);
1376
+ jQuery("#extended_albums_per_page_load_more").val(short_code['extended_albums_per_page_load_more']);
1377
+ jQuery("#extended_album_load_more_image_count").val(short_code['extended_album_load_more_image_count']);
1378
  if (short_code['extended_album_enable_page'] == 1) {
1379
  jQuery("#extended_album_page_yes").attr('checked', 'checked');
1380
  }
1623
  tagtext += ' thumb_width="' + jQuery("#thumb_width").val() + '"';
1624
  tagtext += ' thumb_height="' + jQuery("#thumb_height").val() + '"';
1625
  title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
1626
+ tagtext += ' load_more_image_count="' + jQuery("#load_more_image_count").val() + '"';
1627
  break;
1628
 
1629
  }
1686
  tagtext += ' compuct_album_image_thumb_width="' + jQuery("#compuct_album_image_thumb_width").val() + '"';
1687
  tagtext += ' compuct_album_image_thumb_height="' + jQuery("#compuct_album_image_thumb_height").val() + '"';
1688
  tagtext += ' compuct_album_enable_page="' + jQuery("input[name=compuct_album_enable_page]:checked").val() + '"';
1689
+ tagtext += ' compuct_album_load_more_image_count="' + jQuery("#compuct_album_load_more_image_count").val() + '"';
1690
+ tagtext += ' compuct_albums_per_page_load_more="' + jQuery("#compuct_albums_per_page_load_more").val() + '"';
1691
  title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
1692
  break;
1693
 
1714
  tagtext += ' extended_album_image_thumb_width="' + jQuery("#extended_album_image_thumb_width").val() + '"';
1715
  tagtext += ' extended_album_image_thumb_height="' + jQuery("#extended_album_image_thumb_height").val() + '"';
1716
  tagtext += ' extended_album_enable_page="' + jQuery("input[name=extended_album_enable_page]:checked").val() + '"';
1717
+ tagtext += ' extended_album_load_more_image_count="' + jQuery("#extended_album_load_more_image_count").val() + '"';
1718
+ tagtext += ' extended_albums_per_page_load_more="' + jQuery("#extended_albums_per_page_load_more").val() + '"';
1719
  title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
1720
  break;
1721
 
1791
  jQuery("#bwg_shortcode").val('[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']');
1792
  <?php } ?>
1793
  }
1794
+ jQuery(document).ready(function () {
1795
+ bwg_loadmore();
1796
+ });
1797
  </script>
1798
  </body>
1799
  </html>
framework/WDWLibrary.php CHANGED
@@ -481,7 +481,8 @@ class WDWLibrary {
481
  }
482
  }
483
 
484
- public static function ajax_html_frontend_page_nav($theme_row, $count_items, $page_number, $form_id, $limit = 20, $current_view, $id, $cur_alb_gal_id = 0, $type = 'album', $enable_seo = false, $pagination = 1) {
 
485
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : $type);
486
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : $cur_alb_gal_id);
487
  if ($count_items) {
@@ -554,7 +555,7 @@ class WDWLibrary {
554
  <?php
555
  }
556
  elseif ($pagination == 2) {
557
- if ($count_items > $limit * $page_number) {
558
  ?>
559
  <div id="bwg_load_<?php echo $current_view; ?>" class="tablenav-pages_<?php echo $current_view; ?>">
560
  <a class="bwg_load_btn_<?php echo $current_view; ?> bwg_load_btn" href="javascript:void(0);"><?php echo __('Load More...', 'bwg'); ?></a>
481
  }
482
  }
483
 
484
+ public static function ajax_html_frontend_page_nav($theme_row, $count_items, $page_number, $form_id, $items_per_page, $current_view, $id, $cur_alb_gal_id = 0, $type = 'album', $enable_seo = false, $pagination = 1) {
485
+ $limit = $page_number > 1 ? $items_per_page['load_more_image_count'] : $items_per_page['images_per_page'];
486
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : $type);
487
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : $cur_alb_gal_id);
488
  if ($count_items) {
555
  <?php
556
  }
557
  elseif ($pagination == 2) {
558
+ if ($count_items > ($limit * ($page_number - 1)) + $items_per_page['images_per_page']) {
559
  ?>
560
  <div id="bwg_load_<?php echo $current_view; ?>" class="tablenav-pages_<?php echo $current_view; ?>">
561
  <a class="bwg_load_btn_<?php echo $current_view; ?> bwg_load_btn" href="javascript:void(0);"><?php echo __('Load More...', 'bwg'); ?></a>
frontend/models/BWGModelAlbum_compact_preview.php CHANGED
@@ -90,7 +90,7 @@ class BWGModelAlbum_compact_preview {
90
  return $row;
91
  }
92
 
93
- public function gallery_page_nav($id, $images_per_page, $bwg) {
94
  global $wpdb;
95
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
96
  if ($bwg_search != '') {
@@ -102,29 +102,23 @@ class BWGModelAlbum_compact_preview {
102
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
103
  $page_nav['total'] = $total;
104
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
105
- $limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
106
  }
107
  else {
108
- $limit = 0;
109
- }
110
- if ($images_per_page) {
111
- $page_nav['limit'] = (int) ($limit / $images_per_page + 1);
112
  }
113
  return $page_nav;
114
  }
115
 
116
- public function album_page_nav($id, $albums_per_page, $bwg) {
117
  global $wpdb;
118
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
119
  $page_nav['total'] = $total;
120
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
121
- $limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $albums_per_page;
122
  }
123
  else {
124
- $limit = 0;
125
- }
126
- if ($albums_per_page) {
127
- $page_nav['limit'] = (int) ($limit / $albums_per_page + 1);
128
  }
129
  return $page_nav;
130
  }
90
  return $row;
91
  }
92
 
93
+ public function gallery_page_nav($id, $bwg) {
94
  global $wpdb;
95
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
96
  if ($bwg_search != '') {
102
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
103
  $page_nav['total'] = $total;
104
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
105
+ $page_nav['limit'] = (int) $_REQUEST['page_number_' . $bwg];
106
  }
107
  else {
108
+ $page_nav['limit'] = 1;
 
 
 
109
  }
110
  return $page_nav;
111
  }
112
 
113
+ public function album_page_nav($id, $bwg) {
114
  global $wpdb;
115
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
116
  $page_nav['total'] = $total;
117
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
118
+ $page_nav['limit'] = (int) $_REQUEST['page_number_' . $bwg];
119
  }
120
  else {
121
+ $page_nav['limit'] = 1;
 
 
 
122
  }
123
  return $page_nav;
124
  }
frontend/models/BWGModelAlbum_extended_preview.php CHANGED
@@ -79,7 +79,7 @@ class BWGModelAlbum_extended_preview {
79
  return $row;
80
  }
81
 
82
- public function gallery_page_nav($id, $images_per_page, $bwg) {
83
  global $wpdb;
84
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
85
  if ($bwg_search != '') {
@@ -91,29 +91,23 @@ class BWGModelAlbum_extended_preview {
91
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
92
  $page_nav['total'] = $total;
93
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
94
- $limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
95
  }
96
  else {
97
- $limit = 0;
98
- }
99
- if ($images_per_page) {
100
- $page_nav['limit'] = (int) ($limit / $images_per_page + 1);
101
  }
102
  return $page_nav;
103
  }
104
 
105
- public function album_page_nav($id, $albums_per_page, $bwg) {
106
  global $wpdb;
107
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
108
  $page_nav['total'] = $total;
109
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
110
- $limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $albums_per_page;
111
  }
112
  else {
113
- $limit = 0;
114
- }
115
- if ($albums_per_page) {
116
- $page_nav['limit'] = (int) ($limit / $albums_per_page + 1);
117
  }
118
  return $page_nav;
119
  }
79
  return $row;
80
  }
81
 
82
+ public function gallery_page_nav($id, $bwg) {
83
  global $wpdb;
84
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
85
  if ($bwg_search != '') {
91
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
92
  $page_nav['total'] = $total;
93
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
94
+ $page_nav['limit'] = (int) $_REQUEST['page_number_' . $bwg];
95
  }
96
  else {
97
+ $page_nav['limit'] = 1;
 
 
 
98
  }
99
  return $page_nav;
100
  }
101
 
102
+ public function album_page_nav($id, $bwg) {
103
  global $wpdb;
104
  $total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
105
  $page_nav['total'] = $total;
106
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
107
+ $page_nav['limit'] = (int) $_REQUEST['page_number_' . $bwg];
108
  }
109
  else {
110
+ $page_nav['limit'] = 1;
 
 
 
111
  }
112
  return $page_nav;
113
  }
frontend/models/BWGModelThumbnails.php CHANGED
@@ -35,7 +35,10 @@ class BWGModelThumbnails {
35
  return $row;
36
  }
37
 
38
- public function get_image_rows_data($id, $images_per_page, $sort_by, $bwg, $type, $sort_direction = ' ASC ') {
 
 
 
39
  global $wpdb;
40
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
41
  if ($type == 'tag') {
@@ -60,14 +63,18 @@ class BWGModelThumbnails {
60
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'RAND()') && ($sort_by != 'filename')) {
61
  $sort_by = '`order`';
62
  }
 
63
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
64
- $limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
 
 
 
65
  }
66
  else {
67
  $limit = 0;
68
  }
69
  if ($images_per_page) {
70
- $limit_str = 'LIMIT ' . $limit . ',' . $images_per_page;
71
  }
72
  else {
73
  $limit_str = '';
@@ -81,7 +88,7 @@ class BWGModelThumbnails {
81
  return $row;
82
  }
83
 
84
- public function page_nav($id, $images_per_page, $bwg, $type) {
85
  global $wpdb;
86
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
87
  if ($type == 'tag') {
@@ -108,12 +115,11 @@ class BWGModelThumbnails {
108
  }
109
  $page_nav['total'] = $total;
110
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
111
- $limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
112
  }
113
  else {
114
- $limit = 0;
115
  }
116
- $page_nav['limit'] = (int) ($limit / $images_per_page + 1);
117
  return $page_nav;
118
  }
119
 
35
  return $row;
36
  }
37
 
38
+ public function get_image_rows_data($params, $bwg, $type, $sort_direction = ' ASC ') {
39
+ $id = $params['gallery_id'];
40
+ $images_per_page = $params['images_per_page'];
41
+ $sort_by = $params['sort_by'];
42
  global $wpdb;
43
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
44
  if ($type == 'tag') {
63
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'RAND()') && ($sort_by != 'filename')) {
64
  $sort_by = '`order`';
65
  }
66
+ $items_in_page = $images_per_page;
67
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
68
+ if ($_REQUEST['page_number_' . $bwg] > 1) {
69
+ $items_in_page = $params['load_more_image_count'];
70
+ }
71
+ $limit = (((int) $_REQUEST['page_number_' . $bwg] - 2) * $items_in_page) + $images_per_page;
72
  }
73
  else {
74
  $limit = 0;
75
  }
76
  if ($images_per_page) {
77
+ $limit_str = 'LIMIT ' . $limit . ',' . $items_in_page;
78
  }
79
  else {
80
  $limit_str = '';
88
  return $row;
89
  }
90
 
91
+ public function page_nav($id, $bwg, $type) {
92
  global $wpdb;
93
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
94
  if ($type == 'tag') {
115
  }
116
  $page_nav['total'] = $total;
117
  if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
118
+ $page_nav['limit'] = (int) $_REQUEST['page_number_' . $bwg];
119
  }
120
  else {
121
+ $page_nav['limit'] = 1;
122
  }
 
123
  return $page_nav;
124
  }
125
 
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -157,6 +157,7 @@ class BWGViewAlbum_compact_preview {
157
  }
158
  if ($type == 'gallery') {
159
  $items_per_page = $params['compuct_album_images_per_page'];
 
160
  $items_col_num = $params['compuct_album_image_column_number'];
161
  if (isset($_POST['sortImagesByValue_' . $bwg])) {
162
  $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
@@ -175,19 +176,20 @@ class BWGViewAlbum_compact_preview {
175
  if (!$image_rows) {
176
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
177
  }
178
- $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
179
  $album_gallery_div_id = 'bwg_album_compact_' . $bwg;
180
  $album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
181
  }
182
  else {
183
  $items_per_page = $params['compuct_albums_per_page'];
 
184
  $items_col_num = $params['compuct_album_column_number'];
185
  $album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, ' ASC ');
186
  if (!$album_galleries_row) {
187
  echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
188
  return;
189
  }
190
- $page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
191
  $album_gallery_div_id = 'bwg_album_compact_' . $bwg;
192
  $album_gallery_div_class = 'bwg_album_thumbnails_' . $bwg;
193
  }
@@ -587,7 +589,7 @@ class BWGViewAlbum_compact_preview {
587
  </div>
588
  <?php
589
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
590
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['compuct_album_enable_page']);
591
  }
592
  if ($bwg_previous_album_id != $params['album_id']) {
593
  ?>
@@ -680,7 +682,6 @@ class BWGViewAlbum_compact_preview {
680
  $thumb_left = 0;
681
  $thumb_top = 0;
682
  }
683
-
684
  if ($type != 'gallery') {
685
  ?>
686
  <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($from !== "widget" ? ($options_row->enable_seo ? "href='" . add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI']) . "'" : "") . " data-alb_gal_id=\"" . $album_galallery_row->alb_gal_id . "\" data-def_type=\"" . $def_type . "\" data-title=\"" . htmlspecialchars(addslashes($title)) . "\"" : "href='" . $permalink . "'") ?>>
@@ -742,7 +743,6 @@ class BWGViewAlbum_compact_preview {
742
  <?php
743
  }
744
  }
745
-
746
  foreach ($image_rows as $image_row) {
747
  $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
748
  $is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
@@ -750,7 +750,7 @@ class BWGViewAlbum_compact_preview {
750
  list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
751
  }
752
  else {
753
- if($image_row->resolution != ''){
754
  $resolution_arr = explode(" ",$image_row->resolution);
755
  $resolution_w = intval($resolution_arr[0]);
756
  $resolution_h = intval($resolution_arr[2]);
@@ -768,8 +768,6 @@ class BWGViewAlbum_compact_preview {
768
  $image_thumb_width = $params['compuct_album_image_thumb_width'];
769
  $image_thumb_height = $params['compuct_album_image_thumb_height'];
770
  }
771
-
772
-
773
  }
774
  $scale = max($params['compuct_album_image_thumb_width'] / $image_thumb_width, $params['compuct_album_image_thumb_height'] / $image_thumb_height);
775
  $image_thumb_width *= $scale;
@@ -834,7 +832,7 @@ class BWGViewAlbum_compact_preview {
834
  </div>
835
  <?php
836
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
837
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['compuct_album_enable_page']);
838
  }
839
  ?>
840
  </div>
157
  }
158
  if ($type == 'gallery') {
159
  $items_per_page = $params['compuct_album_images_per_page'];
160
+ $items_per_page_arr = array('images_per_page' => $params['compuct_album_images_per_page'], 'load_more_image_count' => $params['compuct_album_images_per_page']);
161
  $items_col_num = $params['compuct_album_image_column_number'];
162
  if (isset($_POST['sortImagesByValue_' . $bwg])) {
163
  $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
176
  if (!$image_rows) {
177
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
178
  }
179
+ $page_nav = $this->model->gallery_page_nav($album_gallery_id, $bwg);
180
  $album_gallery_div_id = 'bwg_album_compact_' . $bwg;
181
  $album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
182
  }
183
  else {
184
  $items_per_page = $params['compuct_albums_per_page'];
185
+ $items_per_page_arr = array('images_per_page' => $params['compuct_albums_per_page'], 'load_more_image_count' => $params['compuct_albums_per_page']);
186
  $items_col_num = $params['compuct_album_column_number'];
187
  $album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, ' ASC ');
188
  if (!$album_galleries_row) {
189
  echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
190
  return;
191
  }
192
+ $page_nav = $this->model->album_page_nav($album_gallery_id, $bwg);
193
  $album_gallery_div_id = 'bwg_album_compact_' . $bwg;
194
  $album_gallery_div_class = 'bwg_album_thumbnails_' . $bwg;
195
  }
589
  </div>
590
  <?php
591
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
592
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['compuct_album_enable_page']);
593
  }
594
  if ($bwg_previous_album_id != $params['album_id']) {
595
  ?>
682
  $thumb_left = 0;
683
  $thumb_top = 0;
684
  }
 
685
  if ($type != 'gallery') {
686
  ?>
687
  <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($from !== "widget" ? ($options_row->enable_seo ? "href='" . add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI']) . "'" : "") . " data-alb_gal_id=\"" . $album_galallery_row->alb_gal_id . "\" data-def_type=\"" . $def_type . "\" data-title=\"" . htmlspecialchars(addslashes($title)) . "\"" : "href='" . $permalink . "'") ?>>
743
  <?php
744
  }
745
  }
 
746
  foreach ($image_rows as $image_row) {
747
  $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
748
  $is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
750
  list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
751
  }
752
  else {
753
+ if ($image_row->resolution != '') {
754
  $resolution_arr = explode(" ",$image_row->resolution);
755
  $resolution_w = intval($resolution_arr[0]);
756
  $resolution_h = intval($resolution_arr[2]);
768
  $image_thumb_width = $params['compuct_album_image_thumb_width'];
769
  $image_thumb_height = $params['compuct_album_image_thumb_height'];
770
  }
 
 
771
  }
772
  $scale = max($params['compuct_album_image_thumb_width'] / $image_thumb_width, $params['compuct_album_image_thumb_height'] / $image_thumb_height);
773
  $image_thumb_width *= $scale;
832
  </div>
833
  <?php
834
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
835
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['compuct_album_enable_page']);
836
  }
837
  ?>
838
  </div>
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -102,6 +102,7 @@ class BWGViewAlbum_extended_preview {
102
  }
103
  if ($type == 'gallery') {
104
  $items_per_page = $params['extended_album_images_per_page'];
 
105
  $items_col_num = $params['extended_album_image_column_number'];
106
  if (isset($_POST['sortImagesByValue_' . $bwg])) {
107
  $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
@@ -120,19 +121,20 @@ class BWGViewAlbum_extended_preview {
120
  if (!$image_rows) {
121
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
122
  }
123
- $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
124
  $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
125
  $album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
126
  }
127
  else {
128
  $items_per_page = $params['extended_albums_per_page'];
 
129
  $items_col_num = 1;
130
  $album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, ' asc ');
131
  if (!$album_galleries_row) {
132
  echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
133
  return;
134
  }
135
- $page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
136
  $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
137
  $album_gallery_div_class = 'bwg_album_extended_thumbnails_' . $bwg;
138
  }
@@ -568,7 +570,7 @@ class BWGViewAlbum_extended_preview {
568
  </div>
569
  <?php
570
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
571
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['extended_album_enable_page']);
572
  }
573
  if ($bwg_previous_album_id != $params['album_id']) {
574
  ?>
@@ -723,7 +725,7 @@ class BWGViewAlbum_extended_preview {
723
  <?php
724
  }
725
  }
726
- foreach ($image_rows as $image_row) {
727
  $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
728
  $is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
729
  if (!$is_embed) {
@@ -814,7 +816,7 @@ class BWGViewAlbum_extended_preview {
814
  </div>
815
  <?php
816
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
817
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['extended_album_enable_page']);
818
  }
819
  ?>
820
  </div>
102
  }
103
  if ($type == 'gallery') {
104
  $items_per_page = $params['extended_album_images_per_page'];
105
+ $items_per_page_arr = array('images_per_page' => $params['extended_album_images_per_page'], 'load_more_image_count' => $params['extended_album_images_per_page']);
106
  $items_col_num = $params['extended_album_image_column_number'];
107
  if (isset($_POST['sortImagesByValue_' . $bwg])) {
108
  $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
121
  if (!$image_rows) {
122
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
123
  }
124
+ $page_nav = $this->model->gallery_page_nav($album_gallery_id, $bwg);
125
  $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
126
  $album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
127
  }
128
  else {
129
  $items_per_page = $params['extended_albums_per_page'];
130
+ $items_per_page_arr = array('images_per_page' => $params['extended_albums_per_page'], 'load_more_image_count' => $params['extended_albums_per_page']);
131
  $items_col_num = 1;
132
  $album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, 'order', $bwg, ' asc ');
133
  if (!$album_galleries_row) {
134
  echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
135
  return;
136
  }
137
+ $page_nav = $this->model->album_page_nav($album_gallery_id, $bwg);
138
  $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
139
  $album_gallery_div_class = 'bwg_album_extended_thumbnails_' . $bwg;
140
  }
570
  </div>
571
  <?php
572
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
573
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['extended_album_enable_page']);
574
  }
575
  if ($bwg_previous_album_id != $params['album_id']) {
576
  ?>
725
  <?php
726
  }
727
  }
728
+ foreach ($image_rows as $image_row) {
729
  $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
730
  $is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
731
  if (!$is_embed) {
816
  </div>
817
  <?php
818
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
819
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['extended_album_enable_page']);
820
  }
821
  ?>
822
  </div>
frontend/views/BWGViewThumbnails.php CHANGED
@@ -161,13 +161,15 @@ class BWGViewThumbnails {
161
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
162
  return;
163
  }
164
- $image_rows = $this->model->get_image_rows_data($params['gallery_id'], $params['images_per_page'], $params['sort_by'], $bwg, $type, $sort_direction);
 
 
165
  $images_count = count($image_rows);
166
  if (!$image_rows) {
167
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
168
  }
169
  if ($params['image_enable_page'] && $params['images_per_page']) {
170
- $page_nav = $this->model->page_nav($params['gallery_id'], $params['images_per_page'], $bwg, $type);
171
  }
172
  $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
173
  $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
@@ -386,7 +388,7 @@ class BWGViewThumbnails {
386
  </div>
387
  <?php
388
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
389
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo, $params['image_enable_page']);
390
  }
391
  ?>
392
  <div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
@@ -479,7 +481,7 @@ class BWGViewThumbnails {
479
  </div>
480
  <?php
481
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
482
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo, $params['image_enable_page']);
483
  }
484
  ?>
485
  </div>
161
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
162
  return;
163
  }
164
+ $params['load_more_image_count'] = (isset($params['load_more_image_count']) && ($params['image_enable_page'] == 2)) ? $params['load_more_image_count'] : $params['images_per_page'];
165
+ $items_per_page = array('images_per_page' => $params['images_per_page'], 'load_more_image_count' => $params['load_more_image_count']);
166
+ $image_rows = $this->model->get_image_rows_data($params, $bwg, $type, $sort_direction);
167
  $images_count = count($image_rows);
168
  if (!$image_rows) {
169
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
170
  }
171
  if ($params['image_enable_page'] && $params['images_per_page']) {
172
+ $page_nav = $this->model->page_nav($params['gallery_id'], $bwg, $type);
173
  }
174
  $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
175
  $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
388
  </div>
389
  <?php
390
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
391
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo, $params['image_enable_page']);
392
  }
393
  ?>
394
  <div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
481
  </div>
482
  <?php
483
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
484
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo, $params['image_enable_page']);
485
  }
486
  ?>
487
  </div>
js/bwg_shortcode.js CHANGED
@@ -14,6 +14,36 @@ function bwg_shortcode_load() {
14
  });
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  function bwg_watermark(watermark_type) {
18
  jQuery("#" + watermark_type).prop('checked', true);
19
  jQuery("#tr_watermark_link").css('display', 'none');
@@ -230,6 +260,7 @@ function bwg_gallery_type(gallery_type) {
230
  jQuery("#tr_image_title_hover").css('display', 'none');
231
  jQuery("#tr_image_enable_page").css('display', 'none');
232
  jQuery("#tr_thumb_width_height").css('display', 'none');
 
233
 
234
  // Thumbnails, Mosaic.
235
  jQuery("#tr_mosaic_hor_ver").css('display', 'none');
@@ -238,7 +269,7 @@ function bwg_gallery_type(gallery_type) {
238
  jQuery("#tr_images_per_page").css('display', 'none');
239
  jQuery("#tr_image_enable_page").css('display', 'none');
240
  jQuery("#tr_thumb_width_height").css('display', 'none');
241
-
242
  // Compact Album.
243
  jQuery("#tr_compuct_album_column_number").css('display', 'none');
244
  jQuery("#tr_compuct_albums_per_page").css('display', 'none');
@@ -255,8 +286,8 @@ function bwg_gallery_type(gallery_type) {
255
  jQuery("#tr_compuct_album_mosaic_hor_ver").css('display', 'none');
256
  jQuery("#tr_compuct_album_resizable_mosaic").css('display', 'none');
257
  jQuery("#tr_compuct_album_mosaic_total_width").css('display', 'none');
258
-
259
-
260
  // Masonry album.
261
  jQuery("#tr_masonry_album_column_number").css('display', 'none');
262
  jQuery("#tr_masonry_albums_per_page").css('display', 'none');
@@ -265,7 +296,8 @@ function bwg_gallery_type(gallery_type) {
265
  jQuery("#tr_masonry_album_images_per_page").css('display', 'none');
266
  jQuery("#tr_masonry_album_image_thumb_width_height").css('display', 'none');
267
  jQuery("#tr_masonry_album_enable_page").css('display', 'none');
268
-
 
269
  // Extended Album.
270
  jQuery("#tr_extended_albums_per_page").css('display', 'none');
271
  jQuery("#tr_extended_album_height").css('display', 'none');
@@ -281,8 +313,8 @@ function bwg_gallery_type(gallery_type) {
281
  jQuery("#tr_extended_album_mosaic_hor_ver").css('display', 'none');
282
  jQuery("#tr_extended_album_resizable_mosaic").css('display', 'none');
283
  jQuery("#tr_extended_album_mosaic_total_width").css('display', 'none');
284
-
285
-
286
  // Image Browser.
287
  jQuery("#tr_image_browser_width_height").css('display', 'none');
288
  jQuery("#tr_image_browser_title_enable").css('display', 'none');
@@ -293,6 +325,7 @@ function bwg_gallery_type(gallery_type) {
293
  jQuery("#tr_blog_style_title_enable").css('display', 'none');
294
  jQuery("#tr_blog_style_images_per_page").css('display', 'none');
295
  jQuery("#tr_blog_style_enable_page").css('display', 'none');
 
296
 
297
  // Slideshow.
298
  jQuery("#tbody_slideshow").css('display', 'none');
@@ -373,6 +406,7 @@ function bwg_gallery_type(gallery_type) {
373
  jQuery("#tr_image_enable_page").css('display', '');
374
  jQuery("#tr_thumb_width_height").css('display', '');
375
  jQuery("#tr_show_sort_images").css('display', '');
 
376
  bwg_show_search_box();
377
  jQuery("#bwg_pro_version").html('Thumbnails');
378
  jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/thumbnails-view-2/");
@@ -403,6 +437,7 @@ function bwg_gallery_type(gallery_type) {
403
  jQuery("#tr_images_per_page").css('display', '');
404
  jQuery("#tr_image_enable_page").css('display', '');
405
  jQuery("#tr_thumb_width_height").css('display', '');
 
406
  bwg_show_search_box();
407
  break;
408
 
@@ -433,6 +468,7 @@ function bwg_gallery_type(gallery_type) {
433
  jQuery("#tr_image_title_hover").css('display', '');
434
  jQuery("#tr_image_enable_page").css('display', '');
435
  jQuery("#tr_thumb_width_height").css('display', '');
 
436
  bwg_show_search_box();
437
  break;
438
 
@@ -517,6 +553,8 @@ function bwg_gallery_type(gallery_type) {
517
  jQuery("#tr_compuct_album_mosaic_hor_ver").css('display', '');
518
  jQuery("#tr_compuct_album_resizable_mosaic").css('display', '');
519
  jQuery("#tr_compuct_album_mosaic_total_width").css('display', '');
 
 
520
  bwg_change_compuct_album_view_type();
521
  bwg_show_search_box();
522
  jQuery("#bwg_pro_version").html('Compact Album');
@@ -543,6 +581,8 @@ function bwg_gallery_type(gallery_type) {
543
  jQuery("#tr_extended_album_mosaic_hor_ver").css('display', '');
544
  jQuery("#tr_extended_album_resizable_mosaic").css('display', '');
545
  jQuery("#tr_extended_album_mosaic_total_width").css('display', '');
 
 
546
  bwg_change_extended_album_view_type();
547
  bwg_show_search_box();
548
  jQuery("#bwg_pro_version").html('Extended Album');
@@ -563,6 +603,8 @@ function bwg_gallery_type(gallery_type) {
563
  jQuery("#tr_masonry_album_image_thumb_width_height").css('display', '');
564
  jQuery("#tr_masonry_album_enable_page").css('display', '');
565
  jQuery("#tr_show_sort_images").css('display', '');
 
 
566
  //bwg_change_masonry_album_view_type();
567
  bwg_show_search_box();
568
  break;
@@ -578,6 +620,7 @@ function bwg_gallery_type(gallery_type) {
578
  jQuery("#tr_blog_style_images_per_page").css('display', '');
579
  jQuery("#tr_blog_style_enable_page").css('display', '');
580
  jQuery("#tr_show_sort_images").css('display', '');
 
581
  bwg_show_search_box();
582
  break;
583
  }
@@ -622,7 +665,7 @@ function bwg_gallery_type(gallery_type) {
622
  }
623
  jQuery("#tr_popup_enable_fullscreen").css('display', '');
624
  jQuery("#tr_popup_enable_info").css('display', '');
625
- jQuery("#tr_popup_info_full_width").css('display', '');
626
  jQuery("#tr_popup_enable_rate").css('display', '');
627
  jQuery("#tr_popup_enable_comment").css('display', '');
628
  jQuery("#tr_popup_enable_facebook").css('display', '');
@@ -634,6 +677,7 @@ function bwg_gallery_type(gallery_type) {
634
  bwg_popup_fullscreen();
635
  bwg_thumb_click_action();
636
  }
 
637
  }
638
 
639
  function bwg_onKeyDown(e) {
14
  });
15
  }
16
 
17
+ function bwg_loadmore() {
18
+ jQuery("#tr_load_more_image_count").hide();
19
+ jQuery("#tr_compuct_albums_per_page_load_more").hide();
20
+ jQuery("#tr_compuct_album_load_more_image_count").hide();
21
+ jQuery("#tr_masonry_albums_per_page_load_more").hide();
22
+ jQuery("#tr_masonry_album_load_more_image_count").hide();
23
+ jQuery("#tr_extended_albums_per_page_load_more").hide();
24
+ jQuery("#tr_extended_album_load_more_image_count").hide();
25
+ jQuery("#tr_blog_style_load_more_image_count").hide();
26
+
27
+ if ((jQuery("#thumbnails").is(':checked') || jQuery("#thumbnails_masonry").is(':checked') || jQuery("#thumbnails_mosaic").is(':checked')) && jQuery("#image_page_loadmore").is(':checked')) {
28
+ jQuery("#tr_load_more_image_count").show();
29
+ }
30
+ /*else if (jQuery("#album_compact_preview").is(':checked') && jQuery("#compuct_album_page_loadmore").is(':checked')) {
31
+ jQuery("#tr_compuct_albums_per_page_load_more").show();
32
+ jQuery("#tr_compuct_album_load_more_image_count").show();
33
+ }
34
+ else if (jQuery("#album_masonry_preview").is(':checked') && jQuery("#masonry_album_page_loadmore").is(':checked')) {
35
+ jQuery("#tr_masonry_albums_per_page_load_more").show();
36
+ jQuery("#tr_masonry_album_load_more_image_count").show();
37
+ }
38
+ else if (jQuery("#album_extended_preview").is(':checked') && jQuery("#extended_album_page_loadmore").is(':checked')) {
39
+ jQuery("#tr_extended_albums_per_page_load_more").show();
40
+ jQuery("#tr_extended_album_load_more_image_count").show();
41
+ }*/
42
+ else if (jQuery("#blog_style").is(':checked') && jQuery("#blog_style_page_loadmore").is(':checked')) {
43
+ jQuery("#tr_blog_style_load_more_image_count").show();
44
+ }
45
+ }
46
+
47
  function bwg_watermark(watermark_type) {
48
  jQuery("#" + watermark_type).prop('checked', true);
49
  jQuery("#tr_watermark_link").css('display', 'none');
260
  jQuery("#tr_image_title_hover").css('display', 'none');
261
  jQuery("#tr_image_enable_page").css('display', 'none');
262
  jQuery("#tr_thumb_width_height").css('display', 'none');
263
+ jQuery("#tr_load_more_image_count").css('display', 'none');
264
 
265
  // Thumbnails, Mosaic.
266
  jQuery("#tr_mosaic_hor_ver").css('display', 'none');
269
  jQuery("#tr_images_per_page").css('display', 'none');
270
  jQuery("#tr_image_enable_page").css('display', 'none');
271
  jQuery("#tr_thumb_width_height").css('display', 'none');
272
+ jQuery("#tr_load_more_image_count").css('display', 'none');
273
  // Compact Album.
274
  jQuery("#tr_compuct_album_column_number").css('display', 'none');
275
  jQuery("#tr_compuct_albums_per_page").css('display', 'none');
286
  jQuery("#tr_compuct_album_mosaic_hor_ver").css('display', 'none');
287
  jQuery("#tr_compuct_album_resizable_mosaic").css('display', 'none');
288
  jQuery("#tr_compuct_album_mosaic_total_width").css('display', 'none');
289
+ jQuery("#tr_compuct_album_load_more_image_count").css('display', 'none');
290
+ jQuery("#tr_compuct_albums_per_page_load_more").css('display', 'none');
291
  // Masonry album.
292
  jQuery("#tr_masonry_album_column_number").css('display', 'none');
293
  jQuery("#tr_masonry_albums_per_page").css('display', 'none');
296
  jQuery("#tr_masonry_album_images_per_page").css('display', 'none');
297
  jQuery("#tr_masonry_album_image_thumb_width_height").css('display', 'none');
298
  jQuery("#tr_masonry_album_enable_page").css('display', 'none');
299
+ jQuery("#tr_masonry_album_load_more_image_count").css('display', 'none');
300
+ jQuery("#tr_masonry_albums_per_page_load_more").css('display', 'none');
301
  // Extended Album.
302
  jQuery("#tr_extended_albums_per_page").css('display', 'none');
303
  jQuery("#tr_extended_album_height").css('display', 'none');
313
  jQuery("#tr_extended_album_mosaic_hor_ver").css('display', 'none');
314
  jQuery("#tr_extended_album_resizable_mosaic").css('display', 'none');
315
  jQuery("#tr_extended_album_mosaic_total_width").css('display', 'none');
316
+ jQuery("#tr_extended_album_load_more_image_count").css('display', 'none');
317
+ jQuery("#tr_extended_albums_per_page_load_more").css('display', 'none');
318
  // Image Browser.
319
  jQuery("#tr_image_browser_width_height").css('display', 'none');
320
  jQuery("#tr_image_browser_title_enable").css('display', 'none');
325
  jQuery("#tr_blog_style_title_enable").css('display', 'none');
326
  jQuery("#tr_blog_style_images_per_page").css('display', 'none');
327
  jQuery("#tr_blog_style_enable_page").css('display', 'none');
328
+ jQuery("#tr_blog_style_load_more_image_count").css('display', 'none');
329
 
330
  // Slideshow.
331
  jQuery("#tbody_slideshow").css('display', 'none');
406
  jQuery("#tr_image_enable_page").css('display', '');
407
  jQuery("#tr_thumb_width_height").css('display', '');
408
  jQuery("#tr_show_sort_images").css('display', '');
409
+ jQuery("#tr_load_more_image_count").css('display', '');
410
  bwg_show_search_box();
411
  jQuery("#bwg_pro_version").html('Thumbnails');
412
  jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/thumbnails-view-2/");
437
  jQuery("#tr_images_per_page").css('display', '');
438
  jQuery("#tr_image_enable_page").css('display', '');
439
  jQuery("#tr_thumb_width_height").css('display', '');
440
+ jQuery("#tr_load_more_image_count").css('display', '');
441
  bwg_show_search_box();
442
  break;
443
 
468
  jQuery("#tr_image_title_hover").css('display', '');
469
  jQuery("#tr_image_enable_page").css('display', '');
470
  jQuery("#tr_thumb_width_height").css('display', '');
471
+ jQuery("#tr_load_more_image_count").css('display', '');
472
  bwg_show_search_box();
473
  break;
474
 
553
  jQuery("#tr_compuct_album_mosaic_hor_ver").css('display', '');
554
  jQuery("#tr_compuct_album_resizable_mosaic").css('display', '');
555
  jQuery("#tr_compuct_album_mosaic_total_width").css('display', '');
556
+ jQuery("#tr_compuct_album_load_more_image_count").css('display', '');
557
+ jQuery("#tr_compuct_albums_per_page_load_more").css('display', '');
558
  bwg_change_compuct_album_view_type();
559
  bwg_show_search_box();
560
  jQuery("#bwg_pro_version").html('Compact Album');
581
  jQuery("#tr_extended_album_mosaic_hor_ver").css('display', '');
582
  jQuery("#tr_extended_album_resizable_mosaic").css('display', '');
583
  jQuery("#tr_extended_album_mosaic_total_width").css('display', '');
584
+ jQuery("#tr_extended_album_load_more_image_count").css('display', '');
585
+ jQuery("#tr_extended_albums_per_page_load_more").css('display', '');
586
  bwg_change_extended_album_view_type();
587
  bwg_show_search_box();
588
  jQuery("#bwg_pro_version").html('Extended Album');
603
  jQuery("#tr_masonry_album_image_thumb_width_height").css('display', '');
604
  jQuery("#tr_masonry_album_enable_page").css('display', '');
605
  jQuery("#tr_show_sort_images").css('display', '');
606
+ jQuery("#tr_masonry_album_load_more_image_count").css('display', '');
607
+ jQuery("#tr_masonry_albums_per_page_load_more").css('display', '');
608
  //bwg_change_masonry_album_view_type();
609
  bwg_show_search_box();
610
  break;
620
  jQuery("#tr_blog_style_images_per_page").css('display', '');
621
  jQuery("#tr_blog_style_enable_page").css('display', '');
622
  jQuery("#tr_show_sort_images").css('display', '');
623
+ jQuery("#tr_blog_style_load_more_image_count").css('display', '');
624
  bwg_show_search_box();
625
  break;
626
  }
665
  }
666
  jQuery("#tr_popup_enable_fullscreen").css('display', '');
667
  jQuery("#tr_popup_enable_info").css('display', '');
668
+ jQuery("#tr_popup_info_full_width").css('display', '');
669
  jQuery("#tr_popup_enable_rate").css('display', '');
670
  jQuery("#tr_popup_enable_comment").css('display', '');
671
  jQuery("#tr_popup_enable_facebook").css('display', '');
677
  bwg_popup_fullscreen();
678
  bwg_thumb_click_action();
679
  }
680
+ bwg_loadmore();
681
  }
682
 
683
  function bwg_onKeyDown(e) {
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.51
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -322,7 +322,8 @@ function bwg_shortcode($params) {
322
  'enable_image_facebook' => 1,
323
  'enable_image_twitter' => 1,
324
  'enable_image_google' => 1,
325
- 'watermark_type' => 'none'
 
326
  ), $params);
327
  break;
328
 
@@ -386,7 +387,9 @@ function bwg_shortcode($params) {
386
  'compuct_album_image_thumb_width' => 120,
387
  'compuct_album_image_thumb_height' => 120,
388
  'compuct_album_enable_page' => 1,
389
- 'watermark_type' => 'none'
 
 
390
  ), $params);
391
  break;
392
 
@@ -409,7 +412,9 @@ function bwg_shortcode($params) {
409
  'extended_album_image_thumb_width' => 120,
410
  'extended_album_image_thumb_height' => 90,
411
  'extended_album_enable_page' => 1,
412
- 'watermark_type' => 'none'
 
 
413
  ), $params);
414
  break;
415
 
@@ -2306,7 +2311,7 @@ function bwg_activate() {
2306
  ));
2307
  }
2308
  $version = get_option("wd_bwg_version");
2309
- $new_version = '1.2.51';
2310
  if ($version && version_compare($version, $new_version, '<')) {
2311
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2312
  bwg_update($version);
@@ -2354,7 +2359,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
2354
 
2355
  function bwg_update_hook() {
2356
  $version = get_option("wd_bwg_version");
2357
- $new_version = '1.2.51';
2358
  if ($version && version_compare($version, $new_version, '<')) {
2359
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2360
  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.52
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
322
  'enable_image_facebook' => 1,
323
  'enable_image_twitter' => 1,
324
  'enable_image_google' => 1,
325
+ 'watermark_type' => 'none',
326
+ 'load_more_image_count' => 15
327
  ), $params);
328
  break;
329
 
387
  'compuct_album_image_thumb_width' => 120,
388
  'compuct_album_image_thumb_height' => 120,
389
  'compuct_album_enable_page' => 1,
390
+ 'watermark_type' => 'none',
391
+ 'compuct_album_load_more_image_count' => 15,
392
+ 'compuct_albums_per_page_load_more' => 15
393
  ), $params);
394
  break;
395
 
412
  'extended_album_image_thumb_width' => 120,
413
  'extended_album_image_thumb_height' => 90,
414
  'extended_album_enable_page' => 1,
415
+ 'watermark_type' => 'none',
416
+ 'extended_album_load_more_image_count' => 15,
417
+ 'extended_albums_per_page_load_more' => 15
418
  ), $params);
419
  break;
420
 
2311
  ));
2312
  }
2313
  $version = get_option("wd_bwg_version");
2314
+ $new_version = '1.2.52';
2315
  if ($version && version_compare($version, $new_version, '<')) {
2316
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2317
  bwg_update($version);
2359
 
2360
  function bwg_update_hook() {
2361
  $version = get_option("wd_bwg_version");
2362
+ $new_version = '1.2.52';
2363
  if ($version && version_compare($version, $new_version, '<')) {
2364
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2365
  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, mosaic
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
- Stable tag: 1.2.51
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -206,11 +206,17 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
206
 
207
 
208
  == Changelog ==
 
 
 
 
 
 
209
  = 1.2.51 =
210
- Changed: Compability with Wordpress 4.3.
211
 
212
  = 1.2.50 =
213
- Fixed: JavaScript conflict with some themes.
214
 
215
  = 1.2.49 =
216
  * Added: Call photo gallery by php function.
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, mosaic
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
+ Stable tag: 1.2.52
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
206
 
207
 
208
  == Changelog ==
209
+
210
+ = 1.2.52 =
211
+ * Added: Images count parameter for load more.
212
+ * Fixed: Pinterest share.
213
+ * Fixed: Depricated function in carousel.
214
+
215
  = 1.2.51 =
216
+ * Changed: Compability with Wordpress 4.3.
217
 
218
  = 1.2.50 =
219
+ * Fixed: JavaScript conflict with some themes.
220
 
221
  = 1.2.49 =
222
  * Added: Call photo gallery by php function.