Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.44

Version Description

Fixed: "Open image in original size" and "Download original image" for embed. Fixed: Instagram thumbnail. Fixed: Watermark link.

Download this release

Release Info

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

Code changes from version 1.2.43 to 1.2.44

admin/controllers/BWGControllerGalleries_bwg.php CHANGED
@@ -633,12 +633,12 @@ class BWGControllerGalleries_bwg {
633
  if (strpos($image_id, 'pr_') !== FALSE) {
634
  $save = $wpdb->insert($wpdb->prefix . 'bwg_image', array(
635
  'gallery_id' => $gal_id,
636
- 'slug' => $alt,
637
  'filename' => $filename,
638
  'image_url' => $image_url,
639
  'thumb_url' => $thumb_url,
640
- 'description' => $description,
641
- 'alt' => $alt,
642
  'date' => $date,
643
  'size' => $size,
644
  'filetype' => $filetype,
@@ -684,12 +684,12 @@ class BWGControllerGalleries_bwg {
684
  else {
685
  $save = $wpdb->update($wpdb->prefix . 'bwg_image', array(
686
  'gallery_id' => $gal_id,
687
- 'slug' => $alt,
688
  'filename' => $filename,
689
  'image_url' => $image_url,
690
  'thumb_url' => $thumb_url,
691
- 'description' => $description,
692
- 'alt' => $alt,
693
  'date' => $date,
694
  'size' => $size,
695
  'filetype' => $filetype,
633
  if (strpos($image_id, 'pr_') !== FALSE) {
634
  $save = $wpdb->insert($wpdb->prefix . 'bwg_image', array(
635
  'gallery_id' => $gal_id,
636
+ 'slug' => WDWLibrary::spider_replace4byte($alt),
637
  'filename' => $filename,
638
  'image_url' => $image_url,
639
  'thumb_url' => $thumb_url,
640
+ 'description' => WDWLibrary::spider_replace4byte($description),
641
+ 'alt' => WDWLibrary::spider_replace4byte($alt),
642
  'date' => $date,
643
  'size' => $size,
644
  'filetype' => $filetype,
684
  else {
685
  $save = $wpdb->update($wpdb->prefix . 'bwg_image', array(
686
  'gallery_id' => $gal_id,
687
+ 'slug' => WDWLibrary::spider_replace4byte($alt),
688
  'filename' => $filename,
689
  'image_url' => $image_url,
690
  'thumb_url' => $thumb_url,
691
+ 'description' => WDWLibrary::spider_replace4byte($description),
692
+ 'alt' => WDWLibrary::spider_replace4byte($alt),
693
  'date' => $date,
694
  'size' => $size,
695
  'filetype' => $filetype,
admin/views/BWGViewEditThumb.php CHANGED
@@ -28,7 +28,7 @@ class BWGViewEditThumb {
28
  $image_width = $popup_width - 40;
29
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 50;
30
  $image_height = $popup_height - 40;
31
- $image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : '0');
32
  ?>
33
  <div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
34
  <div id='bwg_container_for_media_1' style="display:table-cell; text-align:center; vertical-align:middle;">
@@ -67,7 +67,7 @@ class BWGViewEditThumb {
67
  $image_width = $popup_width - 40;
68
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 50;
69
  $image_height = $popup_height - 40;
70
- $image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : '0');
71
  ?>
72
  <div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
73
  <div style="display:table-cell; text-align:center; vertical-align:middle;">
@@ -91,7 +91,7 @@ class BWGViewEditThumb {
91
  $image_width = $popup_width - $thumb_width - 70;
92
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 75;
93
  $image_height = $popup_height - 70;
94
- $image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : '0');
95
  $edit_type = (isset($_POST['edit_type']) ? esc_html($_POST['edit_type']) : '');
96
  $x = (isset($_POST['x']) ? (int) $_POST['x'] : 0);
97
  $y = (isset($_POST['y']) ? (int) $_POST['y'] : 0);
@@ -385,7 +385,7 @@ class BWGViewEditThumb {
385
  $image_width = $popup_width - 40;
386
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 55;
387
  $image_height = $popup_height - 70;
388
- $image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : '0');
389
  $edit_type = (isset($_POST['edit_type']) ? esc_html($_POST['edit_type']) : '');
390
  $brightness_val = (isset($_POST['brightness_val']) ? esc_html($_POST['brightness_val']) : 0);
391
  $contrast_val = (isset($_POST['contrast_val']) ? esc_html($_POST['contrast_val']) : 0);
@@ -689,7 +689,7 @@ class BWGViewEditThumb {
689
  }
690
  elseif ($edit_type == 'recover') {
691
  global $wpdb;
692
- $id = ((isset($_POST['image_id'])) ? esc_html(stripslashes($_POST['image_id'])) : 0);
693
  $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
694
  $thumb_width = $options->thumb_width;
695
  $thumb_height = $options->thumb_height;
28
  $image_width = $popup_width - 40;
29
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 50;
30
  $image_height = $popup_height - 40;
31
+ $image_id = (isset($_GET['image_id']) ? (int) esc_html($_GET['image_id']) : '0');
32
  ?>
33
  <div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
34
  <div id='bwg_container_for_media_1' style="display:table-cell; text-align:center; vertical-align:middle;">
67
  $image_width = $popup_width - 40;
68
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 50;
69
  $image_height = $popup_height - 40;
70
+ $image_id = (isset($_GET['image_id']) ? (int) esc_html($_GET['image_id']) : '0');
71
  ?>
72
  <div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
73
  <div style="display:table-cell; text-align:center; vertical-align:middle;">
91
  $image_width = $popup_width - $thumb_width - 70;
92
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 75;
93
  $image_height = $popup_height - 70;
94
+ $image_id = (isset($_GET['image_id']) ? (int) esc_html($_GET['image_id']) : '0');
95
  $edit_type = (isset($_POST['edit_type']) ? esc_html($_POST['edit_type']) : '');
96
  $x = (isset($_POST['x']) ? (int) $_POST['x'] : 0);
97
  $y = (isset($_POST['y']) ? (int) $_POST['y'] : 0);
385
  $image_width = $popup_width - 40;
386
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 55;
387
  $image_height = $popup_height - 70;
388
+ $image_id = (isset($_GET['image_id']) ? (int) esc_html($_GET['image_id']) : '0');
389
  $edit_type = (isset($_POST['edit_type']) ? esc_html($_POST['edit_type']) : '');
390
  $brightness_val = (isset($_POST['brightness_val']) ? esc_html($_POST['brightness_val']) : 0);
391
  $contrast_val = (isset($_POST['contrast_val']) ? esc_html($_POST['contrast_val']) : 0);
689
  }
690
  elseif ($edit_type == 'recover') {
691
  global $wpdb;
692
+ $id = ((isset($_POST['image_id'])) ? (int) esc_html(stripslashes($_POST['image_id'])) : 0);
693
  $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
694
  $thumb_width = $options->thumb_width;
695
  $thumb_height = $options->thumb_height;
admin/views/BWGViewGalleries_bwg.php CHANGED
@@ -895,7 +895,7 @@ class BWGViewGalleries_bwg {
895
  $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
896
  ?>
897
  <a class="thickbox thickbox-preview" title="<?php echo $row_data->alt; ?>" href="<?php echo $query_url; ?>">
898
- <img id="image_thumb_<?php echo $row_data->id; ?>" class="thumb" src="<?php echo (!$is_embed ? site_url() . '/' . $WD_BWG_UPLOAD_DIR : "") . $row_data->thumb_url . '?date=' . date('Y-m-y H:i:s'); ?>">
899
  </a>
900
  </td>
901
  <td class="table_extra_large_col">
895
  $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
896
  ?>
897
  <a class="thickbox thickbox-preview" title="<?php echo $row_data->alt; ?>" href="<?php echo $query_url; ?>">
898
+ <img id="image_thumb_<?php echo $row_data->id; ?>" class="thumb" src="<?php echo (!$is_embed ? site_url() . '/' . $WD_BWG_UPLOAD_DIR : "") . $row_data->thumb_url . ($is_embed ? '' : '?date=' . date('Y-m-y H:i:s')); ?>" />
899
  </a>
900
  </td>
901
  <td class="table_extra_large_col">
framework/WDWLibrary.php CHANGED
@@ -833,6 +833,14 @@ class WDWLibrary {
833
  return $nonce_verified;
834
  }
835
 
 
 
 
 
 
 
 
 
836
  ////////////////////////////////////////////////////////////////////////////////////////
837
  // Private Methods //
838
  ////////////////////////////////////////////////////////////////////////////////////////
833
  return $nonce_verified;
834
  }
835
 
836
+ public static function spider_replace4byte($string) {
837
+ return preg_replace('%(?:
838
+ \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
839
+ | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
840
+ | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
841
+ )%xs', '', $string);
842
+ }
843
+
844
  ////////////////////////////////////////////////////////////////////////////////////////
845
  // Private Methods //
846
  ////////////////////////////////////////////////////////////////////////////////////////
framework/WDWLibraryEmbed.php CHANGED
@@ -153,8 +153,8 @@ class WDWLibraryEmbed {
153
  'filename' => $filename,
154
  'url' => $url,
155
  'reliative_url' => $url,
156
- 'thumb_url' => $result->thumbnail_url,
157
- 'thumb' => $result->thumbnail_url,
158
  'size' => '',
159
  'filetype' => $embed_type,
160
  'date_modified' => date('d F Y, H:i'),
@@ -225,8 +225,8 @@ class WDWLibraryEmbed {
225
  'filename' => $filename,
226
  'url' => $url,
227
  'reliative_url' => $url,
228
- 'thumb_url' => $result->thumbnail_url,
229
- 'thumb' => $result->thumbnail_url,
230
  'size' => '',
231
  'filetype' => $embed_type,
232
  'date_modified' => date('d F Y, H:i'),
@@ -530,6 +530,7 @@ class WDWLibraryEmbed {
530
  echo $html_to_insert;
531
 
532
  }
 
533
  ////////////////////////////////////////////////////////////////////////////////////////
534
  // Private Methods //
535
  ////////////////////////////////////////////////////////////////////////////////////////
153
  'filename' => $filename,
154
  'url' => $url,
155
  'reliative_url' => $url,
156
+ 'thumb_url' => 'https://instagram.com/p/' . $filename . '/media/?size=t',
157
+ 'thumb' => 'https://instagram.com/p/' . $filename . '/media/?size=t',
158
  'size' => '',
159
  'filetype' => $embed_type,
160
  'date_modified' => date('d F Y, H:i'),
225
  'filename' => $filename,
226
  'url' => $url,
227
  'reliative_url' => $url,
228
+ 'thumb_url' => 'https://instagram.com/p/' . $filename . '/media/?size=t',
229
+ 'thumb' => 'https://instagram.com/p/' . $filename . '/media/?size=t',
230
  'size' => '',
231
  'filetype' => $embed_type,
232
  'date_modified' => date('d F Y, H:i'),
530
  echo $html_to_insert;
531
 
532
  }
533
+
534
  ////////////////////////////////////////////////////////////////////////////////////////
535
  // Private Methods //
536
  ////////////////////////////////////////////////////////////////////////////////////////
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -131,14 +131,14 @@ class BWGViewAlbum_compact_preview {
131
  $params['popup_enable_pinterest'] = $options_row->popup_enable_pinterest;
132
  $params['popup_enable_tumblr'] = $options_row->popup_enable_tumblr;
133
  $params['watermark_type'] = $options_row->watermark_type;
134
- $params['watermark_link'] = $options_row->watermark_link;
135
  $params['watermark_opacity'] = $options_row->watermark_opacity;
136
  $params['watermark_position'] = $options_row->watermark_position;
137
  $params['watermark_text'] = $options_row->watermark_text;
138
  $params['watermark_font_size'] = $options_row->watermark_font_size;
139
  $params['watermark_font'] = $options_row->watermark_font;
140
  $params['watermark_color'] = $options_row->watermark_color;
141
- $params['watermark_url'] = $options_row->watermark_url;
142
  $params['watermark_width'] = $options_row->watermark_width;
143
  $params['watermark_height'] = $options_row->watermark_height;
144
  }
@@ -249,7 +249,7 @@ class BWGViewAlbum_compact_preview {
249
  'current_url' => $current_url
250
  );
251
  if ($params['watermark_type'] != 'none') {
252
- $params_array['watermark_link'] = $params['watermark_link'];
253
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
254
  $params_array['watermark_position'] = $params['watermark_position'];
255
  }
@@ -260,7 +260,7 @@ class BWGViewAlbum_compact_preview {
260
  $params_array['watermark_color'] = $params['watermark_color'];
261
  }
262
  elseif ($params['watermark_type'] == 'image') {
263
- $params_array['watermark_url'] = $params['watermark_url'];
264
  $params_array['watermark_width'] = $params['watermark_width'];
265
  $params_array['watermark_height'] = $params['watermark_height'];
266
  }
131
  $params['popup_enable_pinterest'] = $options_row->popup_enable_pinterest;
132
  $params['popup_enable_tumblr'] = $options_row->popup_enable_tumblr;
133
  $params['watermark_type'] = $options_row->watermark_type;
134
+ $params['watermark_link'] = urlencode($options_row->watermark_link);
135
  $params['watermark_opacity'] = $options_row->watermark_opacity;
136
  $params['watermark_position'] = $options_row->watermark_position;
137
  $params['watermark_text'] = $options_row->watermark_text;
138
  $params['watermark_font_size'] = $options_row->watermark_font_size;
139
  $params['watermark_font'] = $options_row->watermark_font;
140
  $params['watermark_color'] = $options_row->watermark_color;
141
+ $params['watermark_url'] = urlencode($options_row->watermark_url);
142
  $params['watermark_width'] = $options_row->watermark_width;
143
  $params['watermark_height'] = $options_row->watermark_height;
144
  }
249
  'current_url' => $current_url
250
  );
251
  if ($params['watermark_type'] != 'none') {
252
+ $params_array['watermark_link'] = urlencode($params['watermark_link']);
253
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
254
  $params_array['watermark_position'] = $params['watermark_position'];
255
  }
260
  $params_array['watermark_color'] = $params['watermark_color'];
261
  }
262
  elseif ($params['watermark_type'] == 'image') {
263
+ $params_array['watermark_url'] = urlencode($params['watermark_url']);
264
  $params_array['watermark_width'] = $params['watermark_width'];
265
  $params_array['watermark_height'] = $params['watermark_height'];
266
  }
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -194,7 +194,7 @@ class BWGViewAlbum_extended_preview {
194
  'current_url' => $current_url
195
  );
196
  if ($params['watermark_type'] != 'none') {
197
- $params_array['watermark_link'] = $params['watermark_link'];
198
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
199
  $params_array['watermark_position'] = $params['watermark_position'];
200
  }
@@ -205,7 +205,7 @@ class BWGViewAlbum_extended_preview {
205
  $params_array['watermark_color'] = $params['watermark_color'];
206
  }
207
  elseif ($params['watermark_type'] == 'image') {
208
- $params_array['watermark_url'] = $params['watermark_url'];
209
  $params_array['watermark_width'] = $params['watermark_width'];
210
  $params_array['watermark_height'] = $params['watermark_height'];
211
  }
194
  'current_url' => $current_url
195
  );
196
  if ($params['watermark_type'] != 'none') {
197
+ $params_array['watermark_link'] = urlencode($params['watermark_link']);
198
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
199
  $params_array['watermark_position'] = $params['watermark_position'];
200
  }
205
  $params_array['watermark_color'] = $params['watermark_color'];
206
  }
207
  elseif ($params['watermark_type'] == 'image') {
208
+ $params_array['watermark_url'] = urlencode($params['watermark_url']);
209
  $params_array['watermark_width'] = $params['watermark_width'];
210
  $params_array['watermark_height'] = $params['watermark_height'];
211
  }
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -161,6 +161,9 @@ class BWGViewGalleryBox {
161
  $rgb_bwg_image_info_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_info_bg_color);
162
  $rgb_bwg_image_hit_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_hit_bg_color);
163
  $rgb_lightbox_ctrl_cont_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_ctrl_cont_bg_color);
 
 
 
164
  ?>
165
  <style>
166
  .spider_popup_wrap * {
@@ -783,6 +786,7 @@ class BWGViewGalleryBox {
783
  $current_image_url = $image_row->image_url;
784
  $current_thumb_url = $image_row->thumb_url;
785
  $current_filetype = $image_row->filetype;
 
786
  $image_id_exist = TRUE;
787
  }
788
  ?>
@@ -839,17 +843,31 @@ class BWGViewGalleryBox {
839
  <?php } if ($popup_enable_info) { ?>
840
  <i title="<?php echo __('Show info', 'bwg'); ?>" class="bwg_ctrl_btn bwg_info fa fa-info"></i>
841
  <?php }
 
842
  if ($option_row->popup_enable_fullsize_image) {
843
  ?>
844
- <a id="bwg_fullsize_image" href="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url; ?>" target="_blank">
845
  <i title="<?php echo __('Open image in original size.', 'bwg'); ?>" class="bwg_ctrl_btn fa fa-external-link"></i>
846
  </a>
847
  <?php
848
  }
849
  if ($option_row->popup_enable_download) {
 
850
  $current_image_arr = explode('/', $current_image_url);
 
 
 
 
 
 
 
 
 
 
 
 
851
  ?>
852
- <a id="bwg_download" href="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url; ?>" target="_blank" download="<?php echo end($current_image_arr); ?>">
853
  <i title="<?php echo __('Download original image', 'bwg'); ?>" class="bwg_ctrl_btn fa fa-download"></i>
854
  </a>
855
  <?php
@@ -1432,8 +1450,23 @@ class BWGViewGalleryBox {
1432
  }
1433
  ?>
1434
  bwg_<?php echo $image_effect; ?>(current_image_class, next_image_class, direction);
1435
- jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1436
- jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1437
  var image_arr = data[key]['image_url'].split("/");
1438
  jQuery("#bwg_download").attr("download", image_arr[image_arr.length - 1]);
1439
  /* Load comments.*/
@@ -2193,9 +2226,8 @@ class BWGViewGalleryBox {
2193
  }
2194
 
2195
  function bwg_resize_instagram_post(){
2196
-
2197
  /*jQuery.fn.exists = function(){return this.length>0;}*/
2198
-
2199
  if (jQuery('.inner_instagram_iframe_bwg_embed_frame').length) {
2200
  var w = jQuery(".bwg_popup_embed").width();
2201
  var h = jQuery(".bwg_popup_embed").height();
161
  $rgb_bwg_image_info_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_info_bg_color);
162
  $rgb_bwg_image_hit_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_hit_bg_color);
163
  $rgb_lightbox_ctrl_cont_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_ctrl_cont_bg_color);
164
+
165
+ $current_filename = '';
166
+
167
  ?>
168
  <style>
169
  .spider_popup_wrap * {
786
  $current_image_url = $image_row->image_url;
787
  $current_thumb_url = $image_row->thumb_url;
788
  $current_filetype = $image_row->filetype;
789
+ $current_filename = $image_row->filename;
790
  $image_id_exist = TRUE;
791
  }
792
  ?>
843
  <?php } if ($popup_enable_info) { ?>
844
  <i title="<?php echo __('Show info', 'bwg'); ?>" class="bwg_ctrl_btn bwg_info fa fa-info"></i>
845
  <?php }
846
+ $is_embed = preg_match('/EMBED/', $current_filetype) == 1 ? TRUE : FALSE;
847
  if ($option_row->popup_enable_fullsize_image) {
848
  ?>
849
+ <a id="bwg_fullsize_image" href="<?php echo !$is_embed ? site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url : $current_image_url; ?>" target="_blank">
850
  <i title="<?php echo __('Open image in original size.', 'bwg'); ?>" class="bwg_ctrl_btn fa fa-external-link"></i>
851
  </a>
852
  <?php
853
  }
854
  if ($option_row->popup_enable_download) {
855
+ $style = 'none';
856
  $current_image_arr = explode('/', $current_image_url);
857
+ if (!$is_embed) {
858
+ $download_href = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url;
859
+ $style = 'inline-block';
860
+ }
861
+ elseif (preg_match('/FLICKR/', $current_filetype) == 1) {
862
+ $download_href = $current_filename;
863
+ $style = 'inline-block';
864
+ }
865
+ elseif (preg_match('/INSTAGRAM/', $current_filetype) == 1) {
866
+ $download_href = substr_replace($current_thumb_url, 'l', -1);
867
+ $style = 'inline-block';
868
+ }
869
  ?>
870
+ <a id="bwg_download" href="<?php echo $download_href; ?>" target="_blank" download="<?php echo end($current_image_arr); ?>" style="display: <?php echo $style; ?>;">
871
  <i title="<?php echo __('Download original image', 'bwg'); ?>" class="bwg_ctrl_btn fa fa-download"></i>
872
  </a>
873
  <?php
1450
  }
1451
  ?>
1452
  bwg_<?php echo $image_effect; ?>(current_image_class, next_image_class, direction);
1453
+ jQuery("#bwg_download").show();
1454
+ if (!is_embed) {
1455
+ jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1456
+ jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1457
+ }
1458
+ else {
1459
+ jQuery("#bwg_fullsize_image").attr("href", data[key]['image_url']);
1460
+ if (data[key]['filetype'].indexOf("FLICKR_") > -1) {
1461
+ jQuery("#bwg_download").attr("href", data[key]['filename']);
1462
+ }
1463
+ else if (data[key]['filetype'].indexOf("INSTAGRAM_") > -1) {
1464
+ jQuery("#bwg_download").attr("href", data[key]['thumb_url'].substring(0, data[key]['thumb_url'].length - 1) + 'l');
1465
+ }
1466
+ else {
1467
+ jQuery("#bwg_download").hide();
1468
+ }
1469
+ }
1470
  var image_arr = data[key]['image_url'].split("/");
1471
  jQuery("#bwg_download").attr("download", image_arr[image_arr.length - 1]);
1472
  /* Load comments.*/
2226
  }
2227
 
2228
  function bwg_resize_instagram_post(){
2229
+ jQuery('.bwg_embed_frame').css({'width':'inherit', 'height':'inherit', 'vertical-align':'middle', 'display':'table-cell'});
2230
  /*jQuery.fn.exists = function(){return this.length>0;}*/
 
2231
  if (jQuery('.inner_instagram_iframe_bwg_embed_frame').length) {
2232
  var w = jQuery(".bwg_popup_embed").width();
2233
  var h = jQuery(".bwg_popup_embed").height();
frontend/views/BWGViewImage_browser.php CHANGED
@@ -138,7 +138,7 @@ class BWGViewImage_browser {
138
  $show_watermark = FALSE;
139
  }
140
  if ($params['watermark_type'] != 'none') {
141
- $params_array['watermark_link'] = $params['watermark_link'];
142
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
143
  $params_array['watermark_position'] =(($params['watermark_position'] != 'undefined') ? $params['watermark_position'] : 'top-center');
144
  $position = explode('-', $params_array['watermark_position']);
@@ -160,7 +160,7 @@ class BWGViewImage_browser {
160
  elseif ($params['watermark_type'] == 'image') {
161
  $show_watermark = TRUE;
162
  $watermark_text_image = FALSE;
163
- $params_array['watermark_url'] = $params['watermark_url'];
164
  $params_array['watermark_width'] = $params['watermark_width'];
165
  $params_array['watermark_height'] = $params['watermark_height'];
166
  $watermark_image_or_text = '<img class="bwg_image_browser_watermark_img_' . $bwg . '" src="' . $params_array['watermark_url'] . '" />';
138
  $show_watermark = FALSE;
139
  }
140
  if ($params['watermark_type'] != 'none') {
141
+ $params_array['watermark_link'] = urlencode($params['watermark_link']);
142
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
143
  $params_array['watermark_position'] =(($params['watermark_position'] != 'undefined') ? $params['watermark_position'] : 'top-center');
144
  $position = explode('-', $params_array['watermark_position']);
160
  elseif ($params['watermark_type'] == 'image') {
161
  $show_watermark = TRUE;
162
  $watermark_text_image = FALSE;
163
+ $params_array['watermark_url'] = urlencode($params['watermark_url']);
164
  $params_array['watermark_width'] = $params['watermark_width'];
165
  $params_array['watermark_height'] = $params['watermark_height'];
166
  $watermark_image_or_text = '<img class="bwg_image_browser_watermark_img_' . $bwg . '" src="' . $params_array['watermark_url'] . '" />';
frontend/views/BWGViewSlideshow.php CHANGED
@@ -114,8 +114,8 @@ class BWGViewSlideshow {
114
  $watermark_color = $options_row->watermark_color;
115
  $watermark_opacity = $options_row->watermark_opacity;
116
  $watermark_position = explode('-', $options_row->watermark_position);
117
- $watermark_link = $options_row->watermark_link;
118
- $watermark_url = $options_row->watermark_url;
119
  $watermark_width = $options_row->watermark_width;
120
  $watermark_height = $options_row->watermark_height;
121
  }
114
  $watermark_color = $options_row->watermark_color;
115
  $watermark_opacity = $options_row->watermark_opacity;
116
  $watermark_position = explode('-', $options_row->watermark_position);
117
+ $watermark_link = urlencode($options_row->watermark_link);
118
+ $watermark_url = urlencode($options_row->watermark_url);
119
  $watermark_width = $options_row->watermark_width;
120
  $watermark_height = $options_row->watermark_height;
121
  }
frontend/views/BWGViewThumbnails.php CHANGED
@@ -120,14 +120,14 @@ class BWGViewThumbnails {
120
  $params['popup_enable_pinterest'] = $options_row->popup_enable_pinterest;
121
  $params['popup_enable_tumblr'] = $options_row->popup_enable_tumblr;
122
  $params['watermark_type'] = $options_row->watermark_type;
123
- $params['watermark_link'] = $options_row->watermark_link;
124
  $params['watermark_opacity'] = $options_row->watermark_opacity;
125
  $params['watermark_position'] = $options_row->watermark_position;
126
  $params['watermark_text'] = $options_row->watermark_text;
127
  $params['watermark_font_size'] = $options_row->watermark_font_size;
128
  $params['watermark_font'] = $options_row->watermark_font;
129
  $params['watermark_color'] = $options_row->watermark_color;
130
- $params['watermark_url'] = $options_row->watermark_url;
131
  $params['watermark_width'] = $options_row->watermark_width;
132
  $params['watermark_height'] = $options_row->watermark_height;
133
  $params['thumb_click_action'] = $options_row->thumb_click_action;
@@ -525,7 +525,7 @@ class BWGViewThumbnails {
525
  'current_url' => urlencode($current_url)
526
  );
527
  if ($params['watermark_type'] != 'none') {
528
- $params_array['watermark_link'] = $params['watermark_link'];
529
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
530
  $params_array['watermark_position'] = $params['watermark_position'];
531
  }
@@ -536,7 +536,7 @@ class BWGViewThumbnails {
536
  $params_array['watermark_color'] = $params['watermark_color'];
537
  }
538
  elseif ($params['watermark_type'] == 'image') {
539
- $params_array['watermark_url'] = $params['watermark_url'];
540
  $params_array['watermark_width'] = $params['watermark_width'];
541
  $params_array['watermark_height'] = $params['watermark_height'];
542
  }
120
  $params['popup_enable_pinterest'] = $options_row->popup_enable_pinterest;
121
  $params['popup_enable_tumblr'] = $options_row->popup_enable_tumblr;
122
  $params['watermark_type'] = $options_row->watermark_type;
123
+ $params['watermark_link'] = urlencode($options_row->watermark_link);
124
  $params['watermark_opacity'] = $options_row->watermark_opacity;
125
  $params['watermark_position'] = $options_row->watermark_position;
126
  $params['watermark_text'] = $options_row->watermark_text;
127
  $params['watermark_font_size'] = $options_row->watermark_font_size;
128
  $params['watermark_font'] = $options_row->watermark_font;
129
  $params['watermark_color'] = $options_row->watermark_color;
130
+ $params['watermark_url'] = urlencode($options_row->watermark_url);
131
  $params['watermark_width'] = $options_row->watermark_width;
132
  $params['watermark_height'] = $options_row->watermark_height;
133
  $params['thumb_click_action'] = $options_row->thumb_click_action;
525
  'current_url' => urlencode($current_url)
526
  );
527
  if ($params['watermark_type'] != 'none') {
528
+ $params_array['watermark_link'] = urlencode($params['watermark_link']);
529
  $params_array['watermark_opacity'] = $params['watermark_opacity'];
530
  $params_array['watermark_position'] = $params['watermark_position'];
531
  }
536
  $params_array['watermark_color'] = $params['watermark_color'];
537
  }
538
  elseif ($params['watermark_type'] == 'image') {
539
+ $params_array['watermark_url'] = urlencode($params['watermark_url']);
540
  $params_array['watermark_width'] = $params['watermark_width'];
541
  $params_array['watermark_height'] = $params['watermark_height'];
542
  }
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.43
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -3346,7 +3346,7 @@ function bwg_activate() {
3346
  ));
3347
  }
3348
  $version = get_option("wd_bwg_version");
3349
- $new_version = '1.2.43';
3350
  if ($version && version_compare($version, $new_version, '<')) {
3351
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3352
  bwg_update($version);
@@ -3364,7 +3364,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
3364
 
3365
  function bwg_update_hook() {
3366
  $version = get_option("wd_bwg_version");
3367
- $new_version = '1.2.43';
3368
  if ($version && version_compare($version, $new_version, '<')) {
3369
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3370
  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.44
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
3346
  ));
3347
  }
3348
  $version = get_option("wd_bwg_version");
3349
+ $new_version = '1.2.44';
3350
  if ($version && version_compare($version, $new_version, '<')) {
3351
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3352
  bwg_update($version);
3364
 
3365
  function bwg_update_hook() {
3366
  $version = get_option("wd_bwg_version");
3367
+ $new_version = '1.2.44';
3368
  if ($version && version_compare($version, $new_version, '<')) {
3369
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3370
  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.43
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -207,6 +207,11 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
207
 
208
  == Changelog ==
209
 
 
 
 
 
 
210
  = 1.2.43 =
211
  New: Tools for editing images
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.44
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.44 =
211
+ Fixed: "Open image in original size" and "Download original image" for embed.
212
+ Fixed: Instagram thumbnail.
213
+ Fixed: Watermark link.
214
+
215
  = 1.2.43 =
216
  New: Tools for editing images
217