Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.21

Version Description

minor bugs fixes

Download this release

Release Info

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

Code changes from version 1.2.20 to 1.2.21

Files changed (2) hide show
  1. photo-gallery.php +27 -4
  2. readme.txt +3 -1
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://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.20
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -12,9 +12,32 @@
12
 
13
  define('WD_BWG_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
14
  define('WD_BWG_URL', plugins_url(plugin_basename(dirname(__FILE__))));
15
- define('WD_BWG_FRONT_URL', home_url("wp-content/plugins/" . plugin_basename(dirname(__FILE__))));
16
  define('WD_BWG_PRO', false);
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  global $wpdb;
19
  if ($wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "bwg_option'")) {
20
  $WD_BWG_UPLOAD_DIR = $wpdb->get_var($wpdb->prepare('SELECT images_directory FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1)) . '/photo-gallery';
@@ -3116,7 +3139,7 @@ function bwg_activate() {
3116
  ));
3117
  }
3118
  $version = get_option("wd_bwg_version");
3119
- $new_version = '1.2.20';
3120
  if ($version && version_compare($version, $new_version, '<')) {
3121
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3122
  bwg_update($version);
@@ -3134,7 +3157,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
3134
 
3135
  function bwg_update_hook() {
3136
  $version = get_option("wd_bwg_version");
3137
- $new_version = '1.2.20';
3138
  if ($version && version_compare($version, $new_version, '<')) {
3139
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3140
  bwg_update($version);
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://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.21
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
12
 
13
  define('WD_BWG_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
14
  define('WD_BWG_URL', plugins_url(plugin_basename(dirname(__FILE__))));
 
15
  define('WD_BWG_PRO', false);
16
 
17
+ function bwg_use_home_url() {
18
+ $home_url = str_replace("http://", "", home_url());
19
+ $home_url = str_replace("https://", "", $home_url);
20
+ $pos = strpos($home_url, "/");
21
+ if ($pos) {
22
+ $home_url = substr($home_url, 0, $pos);
23
+ }
24
+
25
+ $site_url = str_replace("http://", "", WD_BWG_URL);
26
+ $site_url = str_replace("https://", "", $site_url);
27
+ $pos = strpos($site_url, "/");
28
+ if ($pos) {
29
+ $site_url = substr($site_url, 0, $pos);
30
+ }
31
+ return $site_url != $home_url;
32
+ }
33
+
34
+ if (bwg_use_home_url()) {
35
+ define('WD_BWG_FRONT_URL', home_url("wp-content/plugins/" . plugin_basename(dirname(__FILE__))));
36
+ }
37
+ else {
38
+ define('WD_BWG_FRONT_URL', WD_BWG_URL);
39
+ }
40
+
41
  global $wpdb;
42
  if ($wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "bwg_option'")) {
43
  $WD_BWG_UPLOAD_DIR = $wpdb->get_var($wpdb->prepare('SELECT images_directory FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1)) . '/photo-gallery';
3139
  ));
3140
  }
3141
  $version = get_option("wd_bwg_version");
3142
+ $new_version = '1.2.21';
3143
  if ($version && version_compare($version, $new_version, '<')) {
3144
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3145
  bwg_update($version);
3157
 
3158
  function bwg_update_hook() {
3159
  $version = get_option("wd_bwg_version");
3160
+ $new_version = '1.2.21';
3161
  if ($version && version_compare($version, $new_version, '<')) {
3162
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3163
  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
5
  Requires at least: 3.4
6
  Tested up to: 4.1
7
- Stable tag: 1.2.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -205,6 +205,8 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
205
 
206
 
207
  == Changelog ==
 
 
208
 
209
  = 1.2.19 =
210
  conflict with some themes fixed
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
5
  Requires at least: 3.4
6
  Tested up to: 4.1
7
+ Stable tag: 1.2.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
205
 
206
 
207
  == Changelog ==
208
+ = 1.2.21 =
209
+ minor bugs fixes
210
 
211
  = 1.2.19 =
212
  conflict with some themes fixed