Version Description
New: Load more button instead of pagination (optional). Fixed: Minor bug on gallery save on php5.3.
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.2.31 |
Comparing to | |
See all releases |
Code changes from version 1.2.30 to 1.2.31
- admin/controllers/BWGControllerGalleries_bwg.php +1 -0
- admin/views/BWGViewBWGShortcode.php +21 -9
- framework/WDWLibrary.php +82 -57
- frontend/views/BWGViewAlbum_compact_preview.php +5 -2
- frontend/views/BWGViewAlbum_extended_preview.php +5 -2
- frontend/views/BWGViewThumbnails.php +5 -2
- js/bwg_frontend.js +27 -7
- photo-gallery.php +3 -3
- readme.txt +5 -1
admin/controllers/BWGControllerGalleries_bwg.php
CHANGED
@@ -777,6 +777,7 @@ class BWGControllerGalleries_bwg {
|
|
777 |
|
778 |
public function save_db() {
|
779 |
global $wpdb;
|
|
|
780 |
$id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
781 |
$name = ((isset($_POST['name']) && esc_html(stripslashes($_POST['name'])) != '') ? esc_html(stripslashes($_POST['name'])) : 'Gallery');
|
782 |
$name = $this->bwg_get_unique_name($name, $id);
|
777 |
|
778 |
public function save_db() {
|
779 |
global $wpdb;
|
780 |
+
global $WD_BWG_UPLOAD_DIR;
|
781 |
$id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
782 |
$name = ((isset($_POST['name']) && esc_html(stripslashes($_POST['name'])) != '') ? esc_html(stripslashes($_POST['name'])) : 'Gallery');
|
783 |
$name = $this->bwg_get_unique_name($name, $id);
|
admin/views/BWGViewBWGShortcode.php
CHANGED
@@ -305,8 +305,9 @@ class BWGViewBWGShortcode {
|
|
305 |
<tr id="tr_image_enable_page">
|
306 |
<td class="spider_label"><label>Enable pagination: </label></td>
|
307 |
<td>
|
308 |
-
<input type="radio" name="image_enable_page" id="image_page_yes" value="1" <?php echo ($option_row->image_enable_page) ? 'checked' : ''; ?> /><label for="image_page_yes">Yes</label>
|
309 |
-
<input type="radio" name="image_enable_page" id="image_page_no" value="0" <?php echo ($option_row->image_enable_page) ? '' : '
|
|
|
310 |
</td>
|
311 |
</tr>
|
312 |
<tr id="tr_thumb_width_height">
|
@@ -496,8 +497,9 @@ class BWGViewBWGShortcode {
|
|
496 |
<tr id="tr_extended_album_enable_page">
|
497 |
<td class="spider_label"><label>Enable pagination: </label></td>
|
498 |
<td>
|
499 |
-
<input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($option_row->album_enable_page) ? 'checked' : ''; ?> /><label for="extended_album_page_yes">Yes</label>
|
500 |
-
<input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($option_row->album_enable_page) ? '' : '
|
|
|
501 |
</td>
|
502 |
</tr>
|
503 |
|
@@ -544,8 +546,9 @@ class BWGViewBWGShortcode {
|
|
544 |
<tr id="tr_blog_style_enable_page">
|
545 |
<td class="spider_label"><label>Enable pagination: </label></td>
|
546 |
<td>
|
547 |
-
<input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($option_row->blog_style_enable_page) ? 'checked' : ''; ?> /><label for="blog_style_page_yes">Yes</label>
|
548 |
-
<input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($option_row->blog_style_enable_page) ? '' : '
|
|
|
549 |
</td>
|
550 |
</tr>
|
551 |
|
@@ -1094,9 +1097,12 @@ class BWGViewBWGShortcode {
|
|
1094 |
if (short_code['image_enable_page'] == 1) {
|
1095 |
jQuery("#image_page_yes").attr('checked', 'checked');
|
1096 |
}
|
1097 |
-
else {
|
1098 |
jQuery("#image_page_no").attr('checked', 'checked');
|
1099 |
}
|
|
|
|
|
|
|
1100 |
jQuery("#thumb_width").val(short_code['thumb_width']);
|
1101 |
jQuery("#thumb_height").val(short_code['thumb_height']);
|
1102 |
break;
|
@@ -1243,9 +1249,12 @@ class BWGViewBWGShortcode {
|
|
1243 |
if (short_code['compuct_album_enable_page'] == 1) {
|
1244 |
jQuery("#compuct_album_page_yes").attr('checked', 'checked');
|
1245 |
}
|
1246 |
-
else {
|
1247 |
jQuery("#compuct_album_page_no").attr('checked', 'checked');
|
1248 |
}
|
|
|
|
|
|
|
1249 |
if (short_code['compuct_album_view_type'] == 'thumbnail') {
|
1250 |
jQuery("#compuct_album_view_type_1").attr('checked', 'checked');
|
1251 |
}
|
@@ -1315,9 +1324,12 @@ class BWGViewBWGShortcode {
|
|
1315 |
if (short_code['extended_album_enable_page'] == 1) {
|
1316 |
jQuery("#extended_album_page_yes").attr('checked', 'checked');
|
1317 |
}
|
1318 |
-
else {
|
1319 |
jQuery("#extended_album_page_no").attr('checked', 'checked');
|
1320 |
}
|
|
|
|
|
|
|
1321 |
if (short_code['extended_album_view_type'] == 'thumbnail') {
|
1322 |
jQuery("#extended_album_view_type_1").attr('checked', 'checked');
|
1323 |
}
|
305 |
<tr id="tr_image_enable_page">
|
306 |
<td class="spider_label"><label>Enable pagination: </label></td>
|
307 |
<td>
|
308 |
+
<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>
|
309 |
+
<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>
|
310 |
+
<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>
|
311 |
</td>
|
312 |
</tr>
|
313 |
<tr id="tr_thumb_width_height">
|
497 |
<tr id="tr_extended_album_enable_page">
|
498 |
<td class="spider_label"><label>Enable pagination: </label></td>
|
499 |
<td>
|
500 |
+
<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>
|
501 |
+
<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>
|
502 |
+
<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>
|
503 |
</td>
|
504 |
</tr>
|
505 |
|
546 |
<tr id="tr_blog_style_enable_page">
|
547 |
<td class="spider_label"><label>Enable pagination: </label></td>
|
548 |
<td>
|
549 |
+
<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>
|
550 |
+
<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>
|
551 |
+
<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>
|
552 |
</td>
|
553 |
</tr>
|
554 |
|
1097 |
if (short_code['image_enable_page'] == 1) {
|
1098 |
jQuery("#image_page_yes").attr('checked', 'checked');
|
1099 |
}
|
1100 |
+
else if (short_code['image_enable_page'] == 0) {
|
1101 |
jQuery("#image_page_no").attr('checked', 'checked');
|
1102 |
}
|
1103 |
+
else {
|
1104 |
+
jQuery("#image_page_loadmore").attr('checked', 'checked');
|
1105 |
+
}
|
1106 |
jQuery("#thumb_width").val(short_code['thumb_width']);
|
1107 |
jQuery("#thumb_height").val(short_code['thumb_height']);
|
1108 |
break;
|
1249 |
if (short_code['compuct_album_enable_page'] == 1) {
|
1250 |
jQuery("#compuct_album_page_yes").attr('checked', 'checked');
|
1251 |
}
|
1252 |
+
else if (short_code['compuct_album_enable_page'] == 0) {
|
1253 |
jQuery("#compuct_album_page_no").attr('checked', 'checked');
|
1254 |
}
|
1255 |
+
else {
|
1256 |
+
jQuery("#compuct_album_page_loadmore").attr('checked', 'checked');
|
1257 |
+
}
|
1258 |
if (short_code['compuct_album_view_type'] == 'thumbnail') {
|
1259 |
jQuery("#compuct_album_view_type_1").attr('checked', 'checked');
|
1260 |
}
|
1324 |
if (short_code['extended_album_enable_page'] == 1) {
|
1325 |
jQuery("#extended_album_page_yes").attr('checked', 'checked');
|
1326 |
}
|
1327 |
+
else if (short_code['extended_album_enable_page'] == 0) {
|
1328 |
jQuery("#extended_album_page_no").attr('checked', 'checked');
|
1329 |
}
|
1330 |
+
else {
|
1331 |
+
jQuery("#extended_album_page_loadmore").attr('checked', 'checked');
|
1332 |
+
}
|
1333 |
if (short_code['extended_album_view_type'] == 'thumbnail') {
|
1334 |
jQuery("#extended_album_view_type_1").attr('checked', 'checked');
|
1335 |
}
|
framework/WDWLibrary.php
CHANGED
@@ -481,7 +481,7 @@ 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) {
|
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) {
|
@@ -498,7 +498,15 @@ class WDWLibrary {
|
|
498 |
if ($page_number > $items_county) {
|
499 |
return;
|
500 |
}
|
|
|
|
|
|
|
|
|
501 |
?>
|
|
|
|
|
|
|
|
|
502 |
<div class="tablenav-pages_<?php echo $current_view; ?>">
|
503 |
<?php
|
504 |
if ($theme_row->page_nav_number) {
|
@@ -519,10 +527,6 @@ class WDWLibrary {
|
|
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";
|
@@ -543,62 +547,83 @@ class WDWLibrary {
|
|
543 |
<a class="<?php echo $next_page ?>" title="<?php echo __('Go to the next page', 'bwg'); ?>" <?php echo $page_number + 1 <= $items_county && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number + 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $next_button; ?></a>
|
544 |
<a class="<?php echo $last_page ?>" title="<?php echo __('Go to the last page', 'bwg'); ?>"><?php echo $last_button; ?></a>
|
545 |
</span>
|
546 |
-
<script type="text/javascript">
|
547 |
-
function spider_page_<?php echo $current_view; ?>(cur, x, y) {
|
548 |
-
if (jQuery(cur).hasClass('disabled')) {
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
var items_county_<?php echo $current_view; ?> = <?php echo $items_county; ?>;
|
552 |
-
switch (y) {
|
553 |
-
case 1:
|
554 |
-
if (x >= items_county_<?php echo $current_view; ?>) {
|
555 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
556 |
-
}
|
557 |
-
else {
|
558 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = x + 1;
|
559 |
-
}
|
560 |
-
break;
|
561 |
-
case 2:
|
562 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
563 |
-
break;
|
564 |
-
case -1:
|
565 |
-
if (x == 1) {
|
566 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
567 |
-
}
|
568 |
-
else {
|
569 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = x - 1;
|
570 |
-
}
|
571 |
-
break;
|
572 |
-
case -2:
|
573 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
574 |
-
break;
|
575 |
-
default:
|
576 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
577 |
-
}
|
578 |
-
spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0);
|
579 |
-
}
|
580 |
-
jQuery(document).ready(function() {
|
581 |
-
jQuery('.<?php echo $first_page; ?>').on('click', function() {
|
582 |
-
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2);
|
583 |
-
});
|
584 |
-
jQuery('.<?php echo $prev_page; ?>').on('click', function() {
|
585 |
-
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1);
|
586 |
-
return false;
|
587 |
-
});
|
588 |
-
jQuery('.<?php echo $next_page; ?>').on('click', function() {
|
589 |
-
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1);
|
590 |
-
return false;
|
591 |
-
});
|
592 |
-
jQuery('.<?php echo $last_page; ?>').on('click', function() {
|
593 |
-
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2);
|
594 |
-
});
|
595 |
-
});
|
596 |
-
</script>
|
597 |
<?php
|
598 |
}
|
599 |
?>
|
600 |
-
<input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo ((isset($_POST['page_number_' . $current_view])) ? (int) $_POST['page_number_' . $current_view] : 1); ?>" />
|
601 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
<?php
|
603 |
}
|
604 |
|
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) {
|
498 |
if ($page_number > $items_county) {
|
499 |
return;
|
500 |
}
|
501 |
+
$first_page = "first-page-" . $current_view;
|
502 |
+
$prev_page = "prev-page-" . $current_view;
|
503 |
+
$next_page = "next-page-" . $current_view;
|
504 |
+
$last_page = "last-page-" . $current_view;
|
505 |
?>
|
506 |
+
<span class="bwg_nav_cont_<?php echo $current_view; ?>">
|
507 |
+
<?php
|
508 |
+
if ($pagination == 1) {
|
509 |
+
?>
|
510 |
<div class="tablenav-pages_<?php echo $current_view; ?>">
|
511 |
<?php
|
512 |
if ($theme_row->page_nav_number) {
|
527 |
$next_button = '›';
|
528 |
$last_button = '»';
|
529 |
}
|
|
|
|
|
|
|
|
|
530 |
if ($page_number == 1) {
|
531 |
$first_page = "first-page disabled";
|
532 |
$prev_page = "prev-page disabled";
|
547 |
<a class="<?php echo $next_page ?>" title="<?php echo __('Go to the next page', 'bwg'); ?>" <?php echo $page_number + 1 <= $items_county && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number + 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $next_button; ?></a>
|
548 |
<a class="<?php echo $last_page ?>" title="<?php echo __('Go to the last page', 'bwg'); ?>"><?php echo $last_button; ?></a>
|
549 |
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
<?php
|
551 |
}
|
552 |
?>
|
|
|
553 |
</div>
|
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>
|
561 |
+
<input type="hidden" id="bwg_load_more_<?php echo $current_view; ?>" name="bwg_load_more_<?php echo $current_view; ?>" value="on" />
|
562 |
+
</div>
|
563 |
+
<?php
|
564 |
+
}
|
565 |
+
}
|
566 |
+
?>
|
567 |
+
<input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo ((isset($_POST['page_number_' . $current_view])) ? (int) $_POST['page_number_' . $current_view] : 1); ?>" />
|
568 |
+
<script type="text/javascript">
|
569 |
+
function spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
|
570 |
+
if (typeof load_more == "undefined") {
|
571 |
+
var load_more = false;
|
572 |
+
}
|
573 |
+
if (jQuery(cur).hasClass('disabled')) {
|
574 |
+
return false;
|
575 |
+
}
|
576 |
+
var items_county_<?php echo $current_view; ?> = <?php echo $items_county; ?>;
|
577 |
+
switch (y) {
|
578 |
+
case 1:
|
579 |
+
if (x >= items_county_<?php echo $current_view; ?>) {
|
580 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
581 |
+
}
|
582 |
+
else {
|
583 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = x + 1;
|
584 |
+
}
|
585 |
+
break;
|
586 |
+
case 2:
|
587 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
588 |
+
break;
|
589 |
+
case -1:
|
590 |
+
if (x == 1) {
|
591 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
592 |
+
}
|
593 |
+
else {
|
594 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = x - 1;
|
595 |
+
}
|
596 |
+
break;
|
597 |
+
case -2:
|
598 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
599 |
+
break;
|
600 |
+
default:
|
601 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
602 |
+
}
|
603 |
+
spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0, '', '', load_more);
|
604 |
+
}
|
605 |
+
jQuery(document).ready(function() {
|
606 |
+
jQuery('.<?php echo $first_page; ?>').on('click', function() {
|
607 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2);
|
608 |
+
});
|
609 |
+
jQuery('.<?php echo $prev_page; ?>').on('click', function() {
|
610 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1);
|
611 |
+
return false;
|
612 |
+
});
|
613 |
+
jQuery('.<?php echo $next_page; ?>').on('click', function() {
|
614 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1);
|
615 |
+
return false;
|
616 |
+
});
|
617 |
+
jQuery('.<?php echo $last_page; ?>').on('click', function() {
|
618 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2);
|
619 |
+
});
|
620 |
+
jQuery('.bwg_load_btn_<?php echo $current_view; ?>').on('click', function() {
|
621 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1, true);
|
622 |
+
return false;
|
623 |
+
});
|
624 |
+
});
|
625 |
+
</script>
|
626 |
+
</span>
|
627 |
<?php
|
628 |
}
|
629 |
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -82,6 +82,9 @@ class BWGViewAlbum_compact_preview {
|
|
82 |
if (!isset($params['show_sort_images'])) {
|
83 |
$params['show_sort_images'] = 0;
|
84 |
}
|
|
|
|
|
|
|
85 |
$options_row = $this->model->get_options_row_data();
|
86 |
if (!isset($params['show_album_name'])) {
|
87 |
$params['show_album_name'] = $options_row->show_album_name;
|
@@ -584,7 +587,7 @@ class BWGViewAlbum_compact_preview {
|
|
584 |
</div>
|
585 |
<?php
|
586 |
if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
587 |
-
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);
|
588 |
}
|
589 |
if ($bwg_previous_album_id) {
|
590 |
?>
|
@@ -831,7 +834,7 @@ class BWGViewAlbum_compact_preview {
|
|
831 |
</div>
|
832 |
<?php
|
833 |
if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
834 |
-
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);
|
835 |
}
|
836 |
?>
|
837 |
</div>
|
82 |
if (!isset($params['show_sort_images'])) {
|
83 |
$params['show_sort_images'] = 0;
|
84 |
}
|
85 |
+
if (!isset($params['compuct_album_enable_page'])) {
|
86 |
+
$params['compuct_album_enable_page'] = 1;
|
87 |
+
}
|
88 |
$options_row = $this->model->get_options_row_data();
|
89 |
if (!isset($params['show_album_name'])) {
|
90 |
$params['show_album_name'] = $options_row->show_album_name;
|
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) {
|
593 |
?>
|
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>
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -84,6 +84,9 @@ class BWGViewAlbum_extended_preview {
|
|
84 |
if (!isset($params['show_sort_images'])) {
|
85 |
$params['show_sort_images'] = 0;
|
86 |
}
|
|
|
|
|
|
|
87 |
$sort_direction = ' ' . $params['order_by'] . ' ';
|
88 |
$theme_row = $this->model->get_theme_row_data($params['theme_id']);
|
89 |
if (!$theme_row) {
|
@@ -559,7 +562,7 @@ class BWGViewAlbum_extended_preview {
|
|
559 |
</div>
|
560 |
<?php
|
561 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
562 |
-
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);
|
563 |
}
|
564 |
if ($bwg_previous_album_id) {
|
565 |
?>
|
@@ -805,7 +808,7 @@ class BWGViewAlbum_extended_preview {
|
|
805 |
</div>
|
806 |
<?php
|
807 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
808 |
-
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);
|
809 |
}
|
810 |
?>
|
811 |
</div>
|
84 |
if (!isset($params['show_sort_images'])) {
|
85 |
$params['show_sort_images'] = 0;
|
86 |
}
|
87 |
+
if (!isset($params['extended_album_enable_page'])) {
|
88 |
+
$params['extended_album_enable_page'] = 1;
|
89 |
+
}
|
90 |
$sort_direction = ' ' . $params['order_by'] . ' ';
|
91 |
$theme_row = $this->model->get_theme_row_data($params['theme_id']);
|
92 |
if (!$theme_row) {
|
562 |
</div>
|
563 |
<?php
|
564 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
565 |
+
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']);
|
566 |
}
|
567 |
if ($bwg_previous_album_id) {
|
568 |
?>
|
808 |
</div>
|
809 |
<?php
|
810 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
811 |
+
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']);
|
812 |
}
|
813 |
?>
|
814 |
</div>
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -76,6 +76,9 @@ class BWGViewThumbnails {
|
|
76 |
if (!isset($params['show_sort_images'])) {
|
77 |
$params['show_sort_images'] = 0;
|
78 |
}
|
|
|
|
|
|
|
79 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
80 |
$sort_direction = ' ' . $params['order_by'] . ' ';
|
81 |
$options_row = $this->model->get_options_row_data();
|
@@ -383,7 +386,7 @@ class BWGViewThumbnails {
|
|
383 |
</div>
|
384 |
<?php
|
385 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
|
386 |
-
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);
|
387 |
}
|
388 |
?>
|
389 |
<div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
|
@@ -476,7 +479,7 @@ class BWGViewThumbnails {
|
|
476 |
</div>
|
477 |
<?php
|
478 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
|
479 |
-
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);
|
480 |
}
|
481 |
?>
|
482 |
</div>
|
76 |
if (!isset($params['show_sort_images'])) {
|
77 |
$params['show_sort_images'] = 0;
|
78 |
}
|
79 |
+
if (!isset($params['image_enable_page'])) {
|
80 |
+
$params['image_enable_page'] = 1;
|
81 |
+
}
|
82 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
83 |
$sort_direction = ' ' . $params['order_by'] . ' ';
|
84 |
$options_row = $this->model->get_options_row_data();
|
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 |
</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>
|
js/bwg_frontend.js
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
-
function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, type, srch_btn, title, sortByParam) {
|
|
|
|
|
|
|
2 |
var page_number = jQuery("#page_number_" + current_view).val();
|
|
|
3 |
var bwg_previous_album_ids = jQuery('#bwg_previous_album_id_' + current_view).val();
|
4 |
var bwg_previous_album_page_numbers = jQuery('#bwg_previous_album_page_number_' + current_view).val();
|
5 |
var post_data = {};
|
@@ -21,13 +25,14 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
21 |
if (srch_btn) { // Start search.
|
22 |
page_number = 1;
|
23 |
}
|
24 |
-
if (typeof title == "undefined") {
|
25 |
var title = "";
|
26 |
}
|
27 |
-
if (typeof sortByParam == "undefined") {
|
28 |
var sortByParam = jQuery(".bwg_order_" + current_view).val();
|
29 |
}
|
30 |
post_data["page_number_" + current_view] = page_number;
|
|
|
31 |
post_data["album_gallery_id_" + current_view] = album_gallery_id;
|
32 |
post_data["bwg_previous_album_id_" + current_view] = jQuery('#bwg_previous_album_id_' + current_view).val();
|
33 |
post_data["bwg_previous_album_page_number_" + current_view] = jQuery('#bwg_previous_album_page_number_' + current_view).val();
|
@@ -43,8 +48,16 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
43 |
window.location,
|
44 |
post_data,
|
45 |
function (data) {
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
// There are no images.
|
49 |
if (jQuery("#bwg_search_input_" + current_view).length > 0 && album_gallery_id == 0) { // Search box exists and not album view.
|
50 |
var bwg_images_count = jQuery('#bwg_images_count_' + current_view).val();
|
@@ -57,10 +70,17 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
57 |
}
|
58 |
).success(function(jqXHR, textStatus, errorThrown) {
|
59 |
jQuery("#ajax_loading_" + current_view).css('display', 'none');
|
60 |
-
|
61 |
-
|
|
|
62 |
/* For all*/
|
63 |
window["bwg_document_ready_" + current_view]();
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/* For masonry view.*/
|
65 |
/*
|
66 |
var cccount_masonry = 0;
|
1 |
+
function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, type, srch_btn, title, sortByParam, load_more) {
|
2 |
+
if (typeof load_more == "undefined") {
|
3 |
+
var load_more = false;
|
4 |
+
}
|
5 |
var page_number = jQuery("#page_number_" + current_view).val();
|
6 |
+
var bwg_load_more = jQuery("#bwg_load_more_" + current_view).val();
|
7 |
var bwg_previous_album_ids = jQuery('#bwg_previous_album_id_' + current_view).val();
|
8 |
var bwg_previous_album_page_numbers = jQuery('#bwg_previous_album_page_number_' + current_view).val();
|
9 |
var post_data = {};
|
25 |
if (srch_btn) { // Start search.
|
26 |
page_number = 1;
|
27 |
}
|
28 |
+
if (typeof title == "undefined" || title == '') {
|
29 |
var title = "";
|
30 |
}
|
31 |
+
if (typeof sortByParam == "undefined" || sortByParam == '') {
|
32 |
var sortByParam = jQuery(".bwg_order_" + current_view).val();
|
33 |
}
|
34 |
post_data["page_number_" + current_view] = page_number;
|
35 |
+
post_data["bwg_load_more_" + current_view] = bwg_load_more;
|
36 |
post_data["album_gallery_id_" + current_view] = album_gallery_id;
|
37 |
post_data["bwg_previous_album_id_" + current_view] = jQuery('#bwg_previous_album_id_' + current_view).val();
|
38 |
post_data["bwg_previous_album_page_number_" + current_view] = jQuery('#bwg_previous_album_page_number_' + current_view).val();
|
48 |
window.location,
|
49 |
post_data,
|
50 |
function (data) {
|
51 |
+
if (load_more) {
|
52 |
+
var strr = jQuery(data).find('#' + id).html();
|
53 |
+
jQuery('#' + id).append(strr);
|
54 |
+
var str = jQuery(data).find('.bwg_nav_cont_'+ current_view).html();
|
55 |
+
jQuery('.bwg_nav_cont_'+ current_view).html(str);
|
56 |
+
}
|
57 |
+
else {
|
58 |
+
var str = jQuery(data).find('#' + form_id).html();
|
59 |
+
jQuery('#' + form_id).html(str);
|
60 |
+
}
|
61 |
// There are no images.
|
62 |
if (jQuery("#bwg_search_input_" + current_view).length > 0 && album_gallery_id == 0) { // Search box exists and not album view.
|
63 |
var bwg_images_count = jQuery('#bwg_images_count_' + current_view).val();
|
70 |
}
|
71 |
).success(function(jqXHR, textStatus, errorThrown) {
|
72 |
jQuery("#ajax_loading_" + current_view).css('display', 'none');
|
73 |
+
if (jQuery(".pagination-links_" + current_view).length) {
|
74 |
+
jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
|
75 |
+
}
|
76 |
/* For all*/
|
77 |
window["bwg_document_ready_" + current_view]();
|
78 |
+
if (id == "bwg_masonry_thumbnails_" + current_view || id == "bwg_album_masonry_" + current_view) {
|
79 |
+
window["bwg_masonry_" + current_view]();
|
80 |
+
}
|
81 |
+
if (id == "bwg_mosaic_thumbnails_" + current_view) {
|
82 |
+
window["bwg_mosaic_" + current_view]("load");
|
83 |
+
}
|
84 |
/* For masonry view.*/
|
85 |
/*
|
86 |
var cccount_masonry = 0;
|
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.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -3155,7 +3155,7 @@ function bwg_activate() {
|
|
3155 |
));
|
3156 |
}
|
3157 |
$version = get_option("wd_bwg_version");
|
3158 |
-
$new_version = '1.2.
|
3159 |
if ($version && version_compare($version, $new_version, '<')) {
|
3160 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3161 |
bwg_update($version);
|
@@ -3173,7 +3173,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
|
|
3173 |
|
3174 |
function bwg_update_hook() {
|
3175 |
$version = get_option("wd_bwg_version");
|
3176 |
-
$new_version = '1.2.
|
3177 |
if ($version && version_compare($version, $new_version, '<')) {
|
3178 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3179 |
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.31
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
3155 |
));
|
3156 |
}
|
3157 |
$version = get_option("wd_bwg_version");
|
3158 |
+
$new_version = '1.2.31';
|
3159 |
if ($version && version_compare($version, $new_version, '<')) {
|
3160 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3161 |
bwg_update($version);
|
3173 |
|
3174 |
function bwg_update_hook() {
|
3175 |
$version = get_option("wd_bwg_version");
|
3176 |
+
$new_version = '1.2.31';
|
3177 |
if ($version && version_compare($version, $new_version, '<')) {
|
3178 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3179 |
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, instagram, mosaic
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -207,6 +207,10 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
|
|
207 |
|
208 |
== Changelog ==
|
209 |
|
|
|
|
|
|
|
|
|
210 |
= 1.2.30 =
|
211 |
Change links
|
212 |
|
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.2
|
7 |
+
Stable tag: 1.2.31
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
207 |
|
208 |
== Changelog ==
|
209 |
|
210 |
+
= 1.2.31 =
|
211 |
+
New: Load more button instead of pagination (optional).
|
212 |
+
Fixed: Minor bug on gallery save on php5.3.
|
213 |
+
|
214 |
= 1.2.30 =
|
215 |
Change links
|
216 |
|