Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.33

Version Description

Fixed: Delete/update custom posts on gallery/album edit. Fixed: Image width/height size with open commetns.

Download this release

Release Info

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

Code changes from version 1.2.32 to 1.2.33

admin/controllers/BWGControllerAlbums_bwg.php CHANGED
@@ -165,6 +165,17 @@ class BWGControllerAlbums_bwg {
165
  'preview_image' => $preview_image,
166
  'author' => $author,
167
  'published' => $published), array('id' => $id));
 
 
 
 
 
 
 
 
 
 
 
168
  }
169
  else {
170
  $save = $wpdb->insert($wpdb->prefix . 'bwg_album', array(
@@ -234,6 +245,15 @@ class BWGControllerAlbums_bwg {
234
  else {
235
  $message = 2;
236
  }
 
 
 
 
 
 
 
 
 
237
  $page = WDWLibrary::get('page');
238
  $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
239
  $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
165
  'preview_image' => $preview_image,
166
  'author' => $author,
167
  'published' => $published), array('id' => $id));
168
+
169
+ /* Update data in corresponding posts.*/
170
+ $query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_album'";
171
+ $posts = $wpdb->get_results($query2, OBJECT);
172
+ foreach ($posts as $post) {
173
+ $post_content = $post->post_content;
174
+ if (strpos($post_content, ' type="album" ') && strpos($post_content, ' album_id="' . $id . '" ')) {
175
+ $album_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
176
+ wp_update_post($album_post);
177
+ }
178
+ }
179
  }
180
  else {
181
  $save = $wpdb->insert($wpdb->prefix . 'bwg_album', array(
245
  else {
246
  $message = 2;
247
  }
248
+ /* Delete corresponding posts and their meta.*/
249
+ $query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_album'";
250
+ $posts = $wpdb->get_results($query2, OBJECT);
251
+ foreach ($posts as $post) {
252
+ $post_content = $post->post_content;
253
+ if (strpos($post_content, ' type="album" ') && strpos($post_content, ' album_id="'.$id.'" ')) {
254
+ wp_delete_post($post->ID, TRUE);
255
+ }
256
+ }
257
  $page = WDWLibrary::get('page');
258
  $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
259
  $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
admin/controllers/BWGControllerGalleries_bwg.php CHANGED
@@ -815,6 +815,16 @@ class BWGControllerGalleries_bwg {
815
  'random_preview_image' => $random_preview_image,
816
  'author' => get_current_user_id(),
817
  'published' => $published), array('id' => $id));
 
 
 
 
 
 
 
 
 
 
818
  }
819
  else {
820
  $save = $wpdb->insert($wpdb->prefix . 'bwg_gallery', array(
@@ -885,6 +895,15 @@ class BWGControllerGalleries_bwg {
885
  else {
886
  echo WDWLibrary::message('Error. Please install plugin again.', 'error');
887
  }
 
 
 
 
 
 
 
 
 
888
  $this->display();
889
  }
890
 
815
  'random_preview_image' => $random_preview_image,
816
  'author' => get_current_user_id(),
817
  'published' => $published), array('id' => $id));
818
+ /* Update data in corresponding posts.*/
819
+ $query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_gallery'";
820
+ $posts = $wpdb->get_results($query2, OBJECT);
821
+ foreach ($posts as $post) {
822
+ $post_content = $post->post_content;
823
+ if (strpos($post_content, ' type="gallery" ') && strpos($post_content, ' gallery_id="' . $id . '" ')) {
824
+ $album_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
825
+ wp_update_post($album_post);
826
+ }
827
+ }
828
  }
829
  else {
830
  $save = $wpdb->insert($wpdb->prefix . 'bwg_gallery', array(
895
  else {
896
  echo WDWLibrary::message('Error. Please install plugin again.', 'error');
897
  }
898
+ /* Delete corresponding posts and their meta.*/
899
+ $query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_gallery'";
900
+ $posts = $wpdb->get_results($query2, OBJECT);
901
+ foreach ($posts as $post) {
902
+ $post_content = $post->post_content;
903
+ if (strpos($post_content, ' type="gallery" ') && strpos($post_content, ' gallery_id="'.$id.'" ')) {
904
+ wp_delete_post($post->ID, TRUE);
905
+ }
906
+ }
907
  $this->display();
908
  }
909
 
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -610,8 +610,8 @@ class BWGViewGalleryBox {
610
  display: table-cell;
611
  position: absolute;
612
  vertical-align: middle;
613
- width: inherit;
614
- height: inherit;
615
  }
616
  .bwg_slide_bg {
617
  margin: 0 auto;
610
  display: table-cell;
611
  position: absolute;
612
  vertical-align: middle;
613
+ width: 100%;
614
+ height: 100%;
615
  }
616
  .bwg_slide_bg {
617
  margin: 0 auto;
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.32
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -3158,7 +3158,7 @@ function bwg_activate() {
3158
  ));
3159
  }
3160
  $version = get_option("wd_bwg_version");
3161
- $new_version = '1.2.32';
3162
  if ($version && version_compare($version, $new_version, '<')) {
3163
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3164
  bwg_update($version);
@@ -3176,7 +3176,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
3176
 
3177
  function bwg_update_hook() {
3178
  $version = get_option("wd_bwg_version");
3179
- $new_version = '1.2.32';
3180
  if ($version && version_compare($version, $new_version, '<')) {
3181
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3182
  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.33
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
3158
  ));
3159
  }
3160
  $version = get_option("wd_bwg_version");
3161
+ $new_version = '1.2.33';
3162
  if ($version && version_compare($version, $new_version, '<')) {
3163
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3164
  bwg_update($version);
3176
 
3177
  function bwg_update_hook() {
3178
  $version = get_option("wd_bwg_version");
3179
+ $new_version = '1.2.33';
3180
  if ($version && version_compare($version, $new_version, '<')) {
3181
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3182
  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.2
7
- Stable tag: 1.2.32
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.32 =
211
  New: Loop option for lightbox.
212
  Fixed: Embed media by YouTube short url.
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.33
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.33 =
211
+ Fixed: Delete/update custom posts on gallery/album edit.
212
+ Fixed: Image width/height size with open commetns.
213
+
214
  = 1.2.32 =
215
  New: Loop option for lightbox.
216
  Fixed: Embed media by YouTube short url.