Version Description
- Fixed: Delete all custom posts on uninstall.
- Fixed: Filter by name in lightbox.
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.2.85 |
Comparing to | |
See all releases |
Code changes from version 1.2.84 to 1.2.85
- admin/models/BWGModelUninstall_bwg.php +4 -4
- frontend/models/BWGModelGalleryBox.php +9 -3
- frontend/views/BWGViewAlbum_compact_preview.php +2 -1
- frontend/views/BWGViewAlbum_extended_preview.php +2 -1
- frontend/views/BWGViewImage_browser.php +2 -1
- frontend/views/BWGViewThumbnails.php +2 -1
- photo-gallery.php +3 -3
- readme.txt +5 -1
admin/models/BWGModelUninstall_bwg.php
CHANGED
@@ -43,22 +43,22 @@ class BWGModelUninstall_bwg {
|
|
43 |
wp_delete_term($term->term_id, 'bwg_tag');
|
44 |
}
|
45 |
// Delete custom pages for galleries.
|
46 |
-
$posts = get_posts(array('post_type' => 'bwg_gallery'));
|
47 |
foreach ($posts as $post) {
|
48 |
wp_delete_post($post->ID, TRUE);
|
49 |
}
|
50 |
// Delete custom pages for albums.
|
51 |
-
$posts = get_posts(array('post_type' => 'bwg_album'));
|
52 |
foreach ($posts as $post) {
|
53 |
wp_delete_post($post->ID, TRUE);
|
54 |
}
|
55 |
// Delete custom pages for tags.
|
56 |
-
$posts = get_posts(array('post_type' => 'bwg_tag'));
|
57 |
foreach ($posts as $post) {
|
58 |
wp_delete_post($post->ID, TRUE);
|
59 |
}
|
60 |
// Delete custom pages for share.
|
61 |
-
$posts = get_posts(array('post_type' => 'bwg_share'));
|
62 |
foreach ($posts as $post) {
|
63 |
wp_delete_post($post->ID, TRUE);
|
64 |
}
|
43 |
wp_delete_term($term->term_id, 'bwg_tag');
|
44 |
}
|
45 |
// Delete custom pages for galleries.
|
46 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_gallery'));
|
47 |
foreach ($posts as $post) {
|
48 |
wp_delete_post($post->ID, TRUE);
|
49 |
}
|
50 |
// Delete custom pages for albums.
|
51 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_album'));
|
52 |
foreach ($posts as $post) {
|
53 |
wp_delete_post($post->ID, TRUE);
|
54 |
}
|
55 |
// Delete custom pages for tags.
|
56 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_tag'));
|
57 |
foreach ($posts as $post) {
|
58 |
wp_delete_post($post->ID, TRUE);
|
59 |
}
|
60 |
// Delete custom pages for share.
|
61 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_share'));
|
62 |
foreach ($posts as $post) {
|
63 |
wp_delete_post($post->ID, TRUE);
|
64 |
}
|
frontend/models/BWGModelGalleryBox.php
CHANGED
@@ -57,12 +57,18 @@ class BWGModelGalleryBox {
|
|
57 |
}
|
58 |
|
59 |
$filter_tags = (isset($_REQUEST['filter_tag_'. $bwg]) && $_REQUEST['filter_tag_'. $bwg] ) ? explode(",",$_REQUEST['filter_tag_'. $bwg]) : array();
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
if ($filter_tags) {
|
62 |
-
$row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id INNER JOIN (SELECT GROUP_CONCAT( tag_id SEPARATOR ",") AS tags, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE gallery_id="' . $gallery_id . '" GROUP BY image_id) AS tag ON t1.id=tag.image_id WHERE t1.published=1 AND CONCAT(",", tag.tags, ",") REGEXP ",('.implode("|",$filter_tags).')," AND t1.gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
|
63 |
}
|
64 |
else {
|
65 |
-
$row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id WHERE t1.published=1 AND t1.gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
|
66 |
}
|
67 |
return $row;
|
68 |
}
|
57 |
}
|
58 |
|
59 |
$filter_tags = (isset($_REQUEST['filter_tag_'. $bwg]) && $_REQUEST['filter_tag_'. $bwg] ) ? explode(",",$_REQUEST['filter_tag_'. $bwg]) : array();
|
60 |
+
$filter_search_name = (isset($_REQUEST['filter_search_name_'. $bwg])) ? esc_html($_REQUEST['filter_search_name_'. $bwg]) : '';
|
61 |
+
if ($filter_search_name != '') {
|
62 |
+
$where = ' AND t1.alt LIKE "%%' . $filter_search_name . '%%"';
|
63 |
+
}
|
64 |
+
else {
|
65 |
+
$where = '';
|
66 |
+
}
|
67 |
if ($filter_tags) {
|
68 |
+
$row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id INNER JOIN (SELECT GROUP_CONCAT( tag_id SEPARATOR ",") AS tags, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE gallery_id="' . $gallery_id . '" GROUP BY image_id) AS tag ON t1.id=tag.image_id WHERE t1.published=1 AND CONCAT(",", tag.tags, ",") REGEXP ",('.implode("|",$filter_tags).')," AND t1.gallery_id="%d"' . $where . ' ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
|
69 |
}
|
70 |
else {
|
71 |
+
$row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id WHERE t1.published=1 AND t1.gallery_id="%d"' . $where . ' ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
|
72 |
}
|
73 |
return $row;
|
74 |
}
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -851,7 +851,8 @@ class BWGViewAlbum_compact_preview {
|
|
851 |
<script>
|
852 |
function bwg_gallery_box_<?php echo $bwg; ?>(gallery_id, image_id) {
|
853 |
var filterTags = jQuery("#bwg_tags_id_bwg_album_compact_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_album_compact_<?php echo $bwg; ?>" ).val() : 0;
|
854 |
-
|
|
|
855 |
}
|
856 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
857 |
var bwg_touch_flag = false;
|
851 |
<script>
|
852 |
function bwg_gallery_box_<?php echo $bwg; ?>(gallery_id, image_id) {
|
853 |
var filterTags = jQuery("#bwg_tags_id_bwg_album_compact_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_album_compact_<?php echo $bwg; ?>" ).val() : 0;
|
854 |
+
var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
|
855 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&gallery_id=' + gallery_id + '&image_id=' + image_id + "&filter_tag_<?php echo $bwg; ?>=" + filterTags + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
|
856 |
}
|
857 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
858 |
var bwg_touch_flag = false;
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -835,7 +835,8 @@ class BWGViewAlbum_extended_preview {
|
|
835 |
<script>
|
836 |
function bwg_gallery_box_<?php echo $bwg; ?>(gallery_id, image_id) {
|
837 |
var filterTags = jQuery("#bwg_tags_id_bwg_album_extended_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_album_extended_<?php echo $bwg; ?>" ).val() : 0;
|
838 |
-
|
|
|
839 |
}
|
840 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
841 |
var bwg_touch_flag = false;
|
835 |
<script>
|
836 |
function bwg_gallery_box_<?php echo $bwg; ?>(gallery_id, image_id) {
|
837 |
var filterTags = jQuery("#bwg_tags_id_bwg_album_extended_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_album_extended_<?php echo $bwg; ?>" ).val() : 0;
|
838 |
+
var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
|
839 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&gallery_id=' + gallery_id + '&image_id=' + image_id + "&filter_tag_<?php echo $bwg; ?>=" + filterTags + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
|
840 |
}
|
841 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
842 |
var bwg_touch_flag = false;
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -605,7 +605,8 @@ class BWGViewImage_browser {
|
|
605 |
bwg_image_browser_<?php echo $bwg; ?>();
|
606 |
});
|
607 |
function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
|
608 |
-
|
|
|
609 |
}
|
610 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
611 |
var bwg_touch_flag = false;
|
605 |
bwg_image_browser_<?php echo $bwg; ?>();
|
606 |
});
|
607 |
function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
|
608 |
+
var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
|
609 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&image_id=' + image_id + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
|
610 |
}
|
611 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
612 |
var bwg_touch_flag = false;
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -552,7 +552,8 @@ class BWGViewThumbnails {
|
|
552 |
?>
|
553 |
function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
|
554 |
var filterTags = jQuery("#bwg_tags_id_bwg_standart_thumbnails_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_standart_thumbnails_<?php echo $bwg; ?>" ).val() : 0;
|
555 |
-
|
|
|
556 |
}
|
557 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
558 |
var bwg_touch_flag = false;
|
552 |
?>
|
553 |
function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
|
554 |
var filterTags = jQuery("#bwg_tags_id_bwg_standart_thumbnails_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_standart_thumbnails_<?php echo $bwg; ?>" ).val() : 0;
|
555 |
+
var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
|
556 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&image_id=' + image_id + "&filter_tag_<?php echo $bwg; ?>=" + filterTags + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
|
557 |
}
|
558 |
function bwg_document_ready_<?php echo $bwg; ?>() {
|
559 |
var bwg_touch_flag = false;
|
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
|
@@ -1902,7 +1902,7 @@ function bwg_activate() {
|
|
1902 |
));
|
1903 |
}
|
1904 |
$version = get_option("wd_bwg_version");
|
1905 |
-
$new_version = '1.2.
|
1906 |
if ($version && version_compare($version, $new_version, '<')) {
|
1907 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1908 |
bwg_update($version);
|
@@ -1950,7 +1950,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
|
|
1950 |
|
1951 |
function bwg_update_hook() {
|
1952 |
$version = get_option("wd_bwg_version");
|
1953 |
-
$new_version = '1.2.
|
1954 |
if ($version && version_compare($version, $new_version, '<')) {
|
1955 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1956 |
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.85
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
1902 |
));
|
1903 |
}
|
1904 |
$version = get_option("wd_bwg_version");
|
1905 |
+
$new_version = '1.2.85';
|
1906 |
if ($version && version_compare($version, $new_version, '<')) {
|
1907 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1908 |
bwg_update($version);
|
1950 |
|
1951 |
function bwg_update_hook() {
|
1952 |
$version = get_option("wd_bwg_version");
|
1953 |
+
$new_version = '1.2.85';
|
1954 |
if ($version && version_compare($version, $new_version, '<')) {
|
1955 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1956 |
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, facebook, mosaic, facebook integration, instagram feed, Flickr, Dailymotion, widget, youtube gallery
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -215,6 +215,10 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
|
|
215 |
|
216 |
== Changelog ==
|
217 |
|
|
|
|
|
|
|
|
|
218 |
= 1.2.84 =
|
219 |
* Added: Placeholder for search by name (optional).
|
220 |
* Fixed: Styles conflct with Twenty Sixteen theme.
|
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, facebook, mosaic, facebook integration, instagram feed, Flickr, Dailymotion, widget, youtube gallery
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 1.2.85
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
215 |
|
216 |
== Changelog ==
|
217 |
|
218 |
+
= 1.2.85 =
|
219 |
+
* Fixed: Delete all custom posts on uninstall.
|
220 |
+
* Fixed: Filter by name in lightbox.
|
221 |
+
|
222 |
= 1.2.84 =
|
223 |
* Added: Placeholder for search by name (optional).
|
224 |
* Fixed: Styles conflct with Twenty Sixteen theme.
|