Photo Gallery by WD – Responsive Photo Gallery - Version 1.3.27

Version Description

  • Changed: Removed bwg_option table.
  • Fixed: Masonry galleries bug in masonry album.
Download this release

Release Info

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

Code changes from version 1.3.26 to 1.3.27

admin/controllers/BWGControllerGalleries_bwg.php CHANGED
@@ -154,18 +154,18 @@ class BWGControllerGalleries_bwg {
154
  public function recover() {
155
  global $wpdb;
156
  $id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
157
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
158
- $thumb_width = $options->upload_thumb_width;
159
- $thumb_height = $options->upload_thumb_height;
160
  $this->recover_image($id, $thumb_width, $thumb_height);
161
  }
162
 
163
  public function image_recover_all() {
164
  global $wpdb;
165
  $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
166
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
167
- $thumb_width = $options->upload_thumb_width;
168
- $thumb_height = $options->upload_thumb_height;
169
  $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
170
  foreach ($image_ids_col as $image_id) {
171
  if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
@@ -312,22 +312,22 @@ class BWGControllerGalleries_bwg {
312
  public function image_set_watermark() {
313
  global $wpdb;
314
  global $WD_BWG_UPLOAD_DIR;
315
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
316
  $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
317
  $images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
318
- switch ($options->built_in_watermark_type) {
319
  case 'text':
320
  foreach ($images as $image) {
321
  if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
322
- $this->set_text_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, html_entity_decode($options->built_in_watermark_text), $options->built_in_watermark_font, $options->built_in_watermark_font_size, '#' . $options->built_in_watermark_color, $options->built_in_watermark_opacity, $options->built_in_watermark_position);
323
  }
324
  }
325
  break;
326
  case 'image':
327
- $watermark_path = str_replace(site_url() . '/', ABSPATH, $options->built_in_watermark_url);
328
  foreach ($images as $image) {
329
  if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
330
- $this->set_image_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $watermark_path, $options->built_in_watermark_size, $options->built_in_watermark_size, $options->built_in_watermark_position);
331
  }
332
  }
333
  break;
@@ -1033,7 +1033,7 @@ class BWGControllerGalleries_bwg {
1033
  $flag = FALSE;
1034
  $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
1035
  $img_ids = $wpdb->get_results($wpdb->prepare('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
1036
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option');
1037
  foreach ($img_ids as $img_id) {
1038
  if (isset($_POST['check_' . $img_id->id]) || isset($_POST['check_all_items'])) {
1039
  $flag = TRUE;
@@ -1043,8 +1043,8 @@ class BWGControllerGalleries_bwg {
1043
  if (!$img_width || !$img_height) {
1044
  continue;
1045
  }
1046
- $max_width = $options->upload_thumb_width;
1047
- $max_height = $options->upload_thumb_height;
1048
  $scale = min(
1049
  $max_width / $img_width,
1050
  $max_height / $img_height
@@ -1063,7 +1063,7 @@ class BWGControllerGalleries_bwg {
1063
  case 2:
1064
  $src_img = @imagecreatefromjpeg($file_path);
1065
  $write_image = 'imagejpeg';
1066
- $image_quality = isset($options->jpeg_quality) ? $options->jpeg_quality : 75;
1067
  break;
1068
  case 1:
1069
  @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
@@ -1077,7 +1077,7 @@ class BWGControllerGalleries_bwg {
1077
  @imagesavealpha($new_img, true);
1078
  $src_img = @imagecreatefrompng($file_path);
1079
  $write_image = 'imagepng';
1080
- $image_quality = isset($options->png_quality) ? $options->png_quality : 9;
1081
  break;
1082
  default:
1083
  $src_img = null;
154
  public function recover() {
155
  global $wpdb;
156
  $id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
157
+ global $wd_bwg_options;
158
+ $thumb_width = $wd_bwg_options->upload_thumb_width;
159
+ $thumb_height = $wd_bwg_options->upload_thumb_height;
160
  $this->recover_image($id, $thumb_width, $thumb_height);
161
  }
162
 
163
  public function image_recover_all() {
164
  global $wpdb;
165
  $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
166
+ global $wd_bwg_options;
167
+ $thumb_width = $wd_bwg_options->upload_thumb_width;
168
+ $thumb_height = $wd_bwg_options->upload_thumb_height;
169
  $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
170
  foreach ($image_ids_col as $image_id) {
171
  if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
312
  public function image_set_watermark() {
313
  global $wpdb;
314
  global $WD_BWG_UPLOAD_DIR;
315
+ global $wd_bwg_options;
316
  $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
317
  $images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
318
+ switch ($wd_bwg_options->built_in_watermark_type) {
319
  case 'text':
320
  foreach ($images as $image) {
321
  if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
322
+ $this->set_text_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, html_entity_decode($wd_bwg_options->built_in_watermark_text), $wd_bwg_options->built_in_watermark_font, $wd_bwg_options->built_in_watermark_font_size, '#' . $wd_bwg_options->built_in_watermark_color, $wd_bwg_options->built_in_watermark_opacity, $wd_bwg_options->built_in_watermark_position);
323
  }
324
  }
325
  break;
326
  case 'image':
327
+ $watermark_path = str_replace(site_url() . '/', ABSPATH, $wd_bwg_options->built_in_watermark_url);
328
  foreach ($images as $image) {
329
  if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
330
+ $this->set_image_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $watermark_path, $wd_bwg_options->built_in_watermark_size, $wd_bwg_options->built_in_watermark_size, $wd_bwg_options->built_in_watermark_position);
331
  }
332
  }
333
  break;
1033
  $flag = FALSE;
1034
  $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
1035
  $img_ids = $wpdb->get_results($wpdb->prepare('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
1036
+ global $wd_bwg_options;
1037
  foreach ($img_ids as $img_id) {
1038
  if (isset($_POST['check_' . $img_id->id]) || isset($_POST['check_all_items'])) {
1039
  $flag = TRUE;
1043
  if (!$img_width || !$img_height) {
1044
  continue;
1045
  }
1046
+ $max_width = $wd_bwg_options->upload_thumb_width;
1047
+ $max_height = $wd_bwg_options->upload_thumb_height;
1048
  $scale = min(
1049
  $max_width / $img_width,
1050
  $max_height / $img_height
1063
  case 2:
1064
  $src_img = @imagecreatefromjpeg($file_path);
1065
  $write_image = 'imagejpeg';
1066
+ $image_quality = isset($wd_bwg_options->jpeg_quality) ? $wd_bwg_options->jpeg_quality : 75;
1067
  break;
1068
  case 1:
1069
  @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
1077
  @imagesavealpha($new_img, true);
1078
  $src_img = @imagecreatefrompng($file_path);
1079
  $write_image = 'imagepng';
1080
+ $image_quality = isset($wd_bwg_options->png_quality) ? $wd_bwg_options->png_quality : 9;
1081
  break;
1082
  default:
1083
  $src_img = null;
admin/controllers/BWGControllerOptions_bwg.php CHANGED
@@ -1,26 +1,9 @@
1
  <?php
2
 
3
  class BWGControllerOptions_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
23
- $id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
24
 
25
  if($task != ''){
26
  if(!WDWLibrary::verify_nonce('options_bwg')){
@@ -29,7 +12,7 @@ class BWGControllerOptions_bwg {
29
  }
30
 
31
  if (method_exists($this, $task)) {
32
- $this->$task($id);
33
  }
34
  else {
35
  $this->display();
@@ -61,24 +44,28 @@ class BWGControllerOptions_bwg {
61
  }
62
 
63
  public function save_db() {
64
- global $wpdb;
65
- $id = 1;
66
  if (isset($_POST['old_images_directory'])) {
67
- $old_images_directory = esc_html(stripslashes($_POST['old_images_directory']));
68
  }
69
  if (isset($_POST['images_directory'])) {
70
- $images_directory = esc_html(stripslashes($_POST['images_directory']));
71
- if (!is_dir(ABSPATH . $images_directory)) {
72
- echo WDWLibrary::message('Uploads directory doesn\'t exist. Old value is restored.', 'wd_error');
73
- if ($old_images_directory) {
74
- $images_directory = $old_images_directory;
 
 
 
 
 
75
  }
76
  else {
77
  $upload_dir = wp_upload_dir();
78
  if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
79
  mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
80
  }
81
- $images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
82
  }
83
  }
84
  }
@@ -87,307 +74,32 @@ class BWGControllerOptions_bwg {
87
  if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
88
  mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
89
  }
90
- $images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
91
  }
92
- $resize_image = (isset($_POST['resize_image']) ? esc_html(stripslashes($_POST['resize_image'])) : 1);
93
-
94
- $masonry = (isset($_POST['masonry']) ? esc_html(stripslashes($_POST['masonry'])) : 'vertical');
95
- $mosaic = (isset($_POST['mosaic']) ? esc_html(stripslashes($_POST['mosaic'])) : 'vertical');
96
- $resizable_mosaic = (isset($_POST['resizable_mosaic']) ? esc_html(stripslashes($_POST['resizable_mosaic'])) : 0);
97
- $mosaic_total_width = (isset($_POST['mosaic_total_width']) ? esc_html(stripslashes($_POST['mosaic_total_width'])) : 100);
98
 
99
- $image_column_number = (isset($_POST['image_column_number']) ? esc_html(stripslashes($_POST['image_column_number'])) : 5);
100
- $images_per_page = (isset($_POST['images_per_page']) ? esc_html(stripslashes($_POST['images_per_page'])) : 30);
101
- $thumb_width = (isset($_POST['thumb_width']) ? esc_html(stripslashes($_POST['thumb_width'])) : 120);
102
- $thumb_height = (isset($_POST['thumb_height']) ? esc_html(stripslashes($_POST['thumb_height'])) : 90);
103
- $upload_thumb_width = (isset($_POST['upload_thumb_width']) ? esc_html(stripslashes($_POST['upload_thumb_width'])) : 300);
104
- $upload_thumb_height = (isset($_POST['upload_thumb_height']) ? esc_html(stripslashes($_POST['upload_thumb_height'])) : 300);
105
- $upload_img_width = (isset($_POST['upload_img_width']) ? esc_html(stripslashes($_POST['upload_img_width'])) : 1200);
106
- $upload_img_height = (isset($_POST['upload_img_height']) ? esc_html(stripslashes($_POST['upload_img_height'])) : 1200);
107
- $image_enable_page = (isset($_POST['image_enable_page']) ? esc_html(stripslashes($_POST['image_enable_page'])) : 1);
108
- $image_title_show_hover = (isset($_POST['image_title_show_hover']) ? esc_html(stripslashes($_POST['image_title_show_hover'])) : 'none');
109
- $album_column_number = (isset($_POST['album_column_number']) ? esc_html(stripslashes($_POST['album_column_number'])) : 5);
110
- $albums_per_page = (isset($_POST['albums_per_page']) ? esc_html(stripslashes($_POST['albums_per_page'])) : 30);
111
- $album_title_show_hover = (isset($_POST['album_title_show_hover']) ? esc_html(stripslashes($_POST['album_title_show_hover'])) : 'hover');
112
- $album_thumb_width = (isset($_POST['album_thumb_width']) ? esc_html(stripslashes($_POST['album_thumb_width'])) : 120);
113
- $album_thumb_height = (isset($_POST['album_thumb_height']) ? esc_html(stripslashes($_POST['album_thumb_height'])) : 90);
114
- $album_enable_page = (isset($_POST['album_enable_page']) ? esc_html(stripslashes($_POST['album_enable_page'])) : 1);
115
- $extended_album_height = (isset($_POST['extended_album_height']) ? esc_html(stripslashes($_POST['extended_album_height'])) : 150);
116
- $extended_album_description_enable = (isset($_POST['extended_album_description_enable']) ? esc_html(stripslashes($_POST['extended_album_description_enable'])) : 1);
117
- $image_browser_width = (isset($_POST['image_browser_width']) ? esc_html(stripslashes($_POST['image_browser_width'])) : 800);
118
- $image_browser_title_enable = (isset($_POST['image_browser_title_enable']) ? esc_html(stripslashes($_POST['image_browser_title_enable'])) : 1);
119
- $image_browser_description_enable = (isset($_POST['image_browser_description_enable']) ? esc_html(stripslashes($_POST['image_browser_description_enable'])) : 1);
120
- $blog_style_width = (isset($_POST['blog_style_width']) ? esc_html(stripslashes($_POST['blog_style_width'])) : 800);
121
- $blog_style_title_enable = (isset($_POST['blog_style_title_enable']) ? esc_html(stripslashes($_POST['blog_style_title_enable'])) : 1);
122
- $blog_style_images_per_page = (isset($_POST['blog_style_images_per_page']) ? esc_html(stripslashes($_POST['blog_style_images_per_page'])) : 5);
123
- $blog_style_enable_page = (isset($_POST['blog_style_enable_page']) ? esc_html(stripslashes($_POST['blog_style_enable_page'])) : 1);
124
- $slideshow_type = (isset($_POST['slideshow_type']) ? esc_html(stripslashes($_POST['slideshow_type'])) : 'fade');
125
- $slideshow_interval = (isset($_POST['slideshow_interval']) ? esc_html(stripslashes($_POST['slideshow_interval'])) : 5);
126
- $slideshow_width = (isset($_POST['slideshow_width']) ? esc_html(stripslashes($_POST['slideshow_width'])) : 800);
127
- $slideshow_height = (isset($_POST['slideshow_height']) ? esc_html(stripslashes($_POST['slideshow_height'])) : 600);
128
- $slideshow_enable_autoplay = (isset($_POST['slideshow_enable_autoplay']) ? esc_html(stripslashes($_POST['slideshow_enable_autoplay'])) : 1);
129
- $slideshow_enable_shuffle = (isset($_POST['slideshow_enable_shuffle']) ? esc_html(stripslashes($_POST['slideshow_enable_shuffle'])) : 1);
130
- $slideshow_enable_ctrl = (isset($_POST['slideshow_enable_ctrl']) ? esc_html(stripslashes($_POST['slideshow_enable_ctrl'])) : 1);
131
- $slideshow_enable_filmstrip = (isset($_POST['slideshow_enable_filmstrip']) ? esc_html(stripslashes($_POST['slideshow_enable_filmstrip'])) : 1);
132
- $slideshow_filmstrip_height = (isset($_POST['slideshow_filmstrip_height']) ? esc_html(stripslashes($_POST['slideshow_filmstrip_height'])) : 70);
133
- $slideshow_enable_title = (isset($_POST['slideshow_enable_title']) ? esc_html(stripslashes($_POST['slideshow_enable_title'])) : 0);
134
- $slideshow_title_position = (isset($_POST['slideshow_title_position']) ? esc_html(stripslashes($_POST['slideshow_title_position'])) : 'top-right');
135
- $slideshow_title_full_width = (isset($_POST['slideshow_title_full_width']) ? esc_html(stripslashes($_POST['slideshow_title_full_width'])) : 0);
136
- $slideshow_enable_description = (isset($_POST['slideshow_enable_description']) ? esc_html(stripslashes($_POST['slideshow_enable_description'])) : 1);
137
- $slideshow_description_position = (isset($_POST['slideshow_description_position']) ? esc_html(stripslashes($_POST['slideshow_description_position'])) : 'bottom-right');
138
- $slideshow_enable_music = (isset($_POST['slideshow_enable_music']) ? esc_html(stripslashes($_POST['slideshow_enable_music'])) : 0);
139
- $slideshow_audio_url = (isset($_POST['slideshow_audio_url']) ? esc_html(stripslashes($_POST['slideshow_audio_url'])) : '');
140
- $popup_width = (isset($_POST['popup_width']) ? esc_html(stripslashes($_POST['popup_width'])) : 800);
141
- $popup_height = (isset($_POST['popup_height']) ? esc_html(stripslashes($_POST['popup_height'])) : 600);
142
- $popup_type = (isset($_POST['popup_type']) ? esc_html(stripslashes($_POST['popup_type'])) : 'fade');
143
- $popup_interval = (isset($_POST['popup_interval']) ? esc_html(stripslashes($_POST['popup_interval'])) : 5);
144
- $popup_enable_filmstrip = (isset($_POST['popup_enable_filmstrip']) ? esc_html(stripslashes($_POST['popup_enable_filmstrip'])) : 1);
145
- $popup_filmstrip_height = (isset($_POST['popup_filmstrip_height']) ? esc_html(stripslashes($_POST['popup_filmstrip_height'])) : 50);
146
- $popup_enable_ctrl_btn = (isset($_POST['popup_enable_ctrl_btn']) ? esc_html(stripslashes($_POST['popup_enable_ctrl_btn'])) : 1);
147
- $popup_enable_fullscreen = (isset($_POST['popup_enable_fullscreen']) ? esc_html(stripslashes($_POST['popup_enable_fullscreen'])) : 1);
148
- $popup_enable_comment = (isset($_POST['popup_enable_comment']) ? esc_html(stripslashes($_POST['popup_enable_comment'])) : 1);
149
- $popup_enable_email = (isset($_POST['popup_enable_email']) ? esc_html(stripslashes($_POST['popup_enable_email'])) : 0);
150
- $popup_enable_captcha = (isset($_POST['popup_enable_captcha']) ? esc_html(stripslashes($_POST['popup_enable_captcha'])) : 0);
151
- $popup_enable_download = (isset($_POST['popup_enable_download']) ? esc_html(stripslashes($_POST['popup_enable_download'])) : 0);
152
- $popup_enable_fullsize_image = (isset($_POST['popup_enable_fullsize_image']) ? esc_html(stripslashes($_POST['popup_enable_fullsize_image'])) : 0);
153
- $popup_enable_facebook = (isset($_POST['popup_enable_facebook']) ? esc_html(stripslashes($_POST['popup_enable_facebook'])) : 1);
154
- $popup_enable_twitter = (isset($_POST['popup_enable_twitter']) ? esc_html(stripslashes($_POST['popup_enable_twitter'])) : 1);
155
- $popup_enable_google = (isset($_POST['popup_enable_google']) ? esc_html(stripslashes($_POST['popup_enable_google'])) : 1);
156
- $popup_enable_pinterest = (isset($_POST['popup_enable_pinterest']) ? esc_html(stripslashes($_POST['popup_enable_pinterest'])) : 0);
157
- $popup_enable_tumblr = (isset($_POST['popup_enable_tumblr']) ? esc_html(stripslashes($_POST['popup_enable_tumblr'])) : 0);
158
- $watermark_type = (isset($_POST['watermark_type']) ? esc_html(stripslashes($_POST['watermark_type'])) : 'none');
159
- $watermark_position = (isset($_POST['watermark_position']) ? esc_html(stripslashes($_POST['watermark_position'])) : 'bottom-right');
160
- $watermark_width = (isset($_POST['watermark_width']) ? esc_html(stripslashes($_POST['watermark_width'])) : 600);
161
- $watermark_height = (isset($_POST['watermark_height']) ? esc_html(stripslashes($_POST['watermark_height'])) : 600);
162
- $watermark_url = (isset($_POST['watermark_url']) ? esc_html(stripslashes($_POST['watermark_url'])) : WD_BWG_URL . '/images/watermark.png');
163
- $watermark_text = (isset($_POST['watermark_text']) ? esc_html(stripslashes($_POST['watermark_text'])) : 'web-dorado.com');
164
- $watermark_link = (isset($_POST['watermark_link']) ? esc_html(stripslashes($_POST['watermark_link'])) : 'http://www.web-dorado.com');
165
- $watermark_opacity = (isset($_POST['watermark_opacity']) ? esc_html(stripslashes($_POST['watermark_opacity'])) : 30);
166
- $watermark_font_size = (isset($_POST['watermark_font_size']) ? esc_html(stripslashes($_POST['watermark_font_size'])) : 20);
167
- $watermark_font = (isset($_POST['watermark_font']) ? esc_html(stripslashes($_POST['watermark_font'])) : '');
168
- $watermark_color = (isset($_POST['watermark_color']) ? esc_html(stripslashes($_POST['watermark_color'])) : '');
169
- $built_in_watermark_type = (isset($_POST['built_in_watermark_type']) ? esc_html(stripslashes($_POST['built_in_watermark_type'])) : 'none');
170
- $built_in_watermark_position = (isset($_POST['built_in_watermark_position']) ? esc_html(stripslashes($_POST['built_in_watermark_position'])) : 'middle-center');
171
- $built_in_watermark_size = (isset($_POST['built_in_watermark_size']) ? esc_html(stripslashes($_POST['built_in_watermark_size'])) : 15);
172
- $built_in_watermark_url = (isset($_POST['built_in_watermark_url']) ? esc_html(stripslashes($_POST['built_in_watermark_url'])) : WD_BWG_URL . '/images/watermark.png');
173
- $built_in_watermark_text = (isset($_POST['built_in_watermark_text']) ? esc_html(stripslashes($_POST['built_in_watermark_text'])) : 'web-dorado.com');
174
- $built_in_watermark_opacity = (isset($_POST['built_in_watermark_opacity']) ? esc_html(stripslashes($_POST['built_in_watermark_opacity'])) : 30);
175
- $built_in_watermark_font_size = (isset($_POST['built_in_watermark_font_size']) ? esc_html(stripslashes($_POST['built_in_watermark_font_size'])) : 20);
176
- $built_in_watermark_font = (isset($_POST['built_in_watermark_font']) ? esc_html(stripslashes($_POST['built_in_watermark_font'])) : '');
177
- $built_in_watermark_color = (isset($_POST['built_in_watermark_color']) ? esc_html(stripslashes($_POST['built_in_watermark_color'])) : '');
178
- $gallery_role = (isset($_POST['gallery_role']) ? esc_html(stripslashes($_POST['gallery_role'])) : 0);
179
- $image_right_click = (isset($_POST['image_right_click']) ? esc_html(stripslashes($_POST['image_right_click'])) : 0);
180
- $popup_fullscreen = (isset($_POST['popup_fullscreen']) ? esc_html(stripslashes($_POST['popup_fullscreen'])) : 0);
181
- $album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
182
- $image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
183
- $popup_autoplay = (isset($_POST['popup_autoplay']) ? esc_html(stripslashes($_POST['popup_autoplay'])) : 0);
184
- $album_view_type = (isset($_POST['album_view_type']) ? esc_html(stripslashes($_POST['album_view_type'])) : 'thumbnail');
185
- $show_search_box = (isset($_POST['show_search_box']) ? esc_html(stripslashes($_POST['show_search_box'])) : 0);
186
- $search_box_width = (isset($_POST['search_box_width']) ? esc_html(stripslashes($_POST['search_box_width'])) : 180);
187
- $preload_images = (isset($_POST['preload_images']) ? esc_html(stripslashes($_POST['preload_images'])) : 1);
188
- $preload_images_count = (isset($_POST['preload_images_count']) ? esc_html(stripslashes($_POST['preload_images_count'])) : 10);
189
- $popup_enable_info = (isset($_POST['popup_enable_info']) ? esc_html(stripslashes($_POST['popup_enable_info'])) : 1);
190
- $popup_info_always_show = (isset($_POST['popup_info_always_show']) ? esc_html(stripslashes($_POST['popup_info_always_show'])) : 0);
191
- $popup_enable_rate = (isset($_POST['popup_enable_rate']) ? esc_html(stripslashes($_POST['popup_enable_rate'])) : 0);
192
- $thumb_click_action = (isset($_POST['thumb_click_action']) ? esc_html(stripslashes($_POST['thumb_click_action'])) : 'open_lightbox');
193
- $thumb_link_target = (isset($_POST['thumb_link_target']) ? esc_html(stripslashes($_POST['thumb_link_target'])) : 1);
194
- $comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
195
- $popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
196
- $enable_ML_import = (isset($_POST['enable_ML_import']) ? esc_html(stripslashes($_POST['enable_ML_import'])) : 0);
197
- $autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : 30);
198
- /*minimum autoupdate interval is 1 min*/
199
- $autoupdate_interval = ($autoupdate_interval >= 1 ? $autoupdate_interval : 1 );
200
- $instagram_access_token = (isset($_POST['instagram_access_token']) ? esc_html(stripslashes($_POST['instagram_access_token'])) : '');
201
- $showthumbs_name = (isset($_POST['thumb_name']) ? esc_html(stripslashes($_POST['thumb_name'])) : 1);
202
- $show_album_name = (isset($_POST['show_album_name_enable']) ? esc_html(stripslashes($_POST['show_album_name_enable'])) : 1);
203
- $show_image_counts = (isset($_POST['show_image_counts']) ? esc_html(stripslashes($_POST['show_image_counts'])) : 0);
204
- $play_icon = (isset($_POST['play_icon']) ? esc_html(stripslashes($_POST['play_icon'])) : 1);
205
- $show_masonry_thumb_description = (isset($_POST['show_masonry_thumb_description']) ? esc_html(stripslashes($_POST['show_masonry_thumb_description'])) : 0);
206
- $popup_info_full_width = (isset($_POST['popup_info_full_width']) ? esc_html(stripslashes($_POST['popup_info_full_width'])) : 0);
207
- $show_sort_images = (isset($_POST['show_sort_images']) ? esc_html(stripslashes($_POST['show_sort_images'])) : 0);
208
- $enable_seo = (isset($_POST['enable_seo']) ? esc_html(stripslashes($_POST['enable_seo'])) : 1);
209
- $autohide_lightbox_navigation = (isset($_POST['autohide_lightbox_navigation']) ? esc_html(stripslashes($_POST['autohide_lightbox_navigation'])) : 1);
210
- $autohide_slideshow_navigation = (isset($_POST['autohide_slideshow_navigation']) ? esc_html(stripslashes($_POST['autohide_slideshow_navigation'])) : 1);
211
- $read_metadata = (isset($_POST['read_metadata']) ? esc_html(stripslashes($_POST['read_metadata'])) : 0);
212
- $enable_loop = (isset($_POST['enable_loop']) ? esc_html(stripslashes($_POST['enable_loop'])) : 1);
213
- $enable_addthis = (isset($_POST['enable_addthis']) ? esc_html(stripslashes($_POST['enable_addthis'])) : 0);
214
- $addthis_profile_id = (isset($_POST['addthis_profile_id']) ? esc_html(stripslashes($_POST['addthis_profile_id'])) : '');
215
-
216
- $carousel_interval = (isset($_POST['carousel_interval']) ? esc_html(stripslashes($_POST['carousel_interval'])) : 5);
217
- $carousel_width = (isset($_POST['carousel_width']) ? esc_html(stripslashes($_POST['carousel_width'])) : 300);
218
- $carousel_height = (isset($_POST['carousel_height']) ? esc_html(stripslashes($_POST['carousel_height'])) : 300);
219
- $carousel_image_par = (isset($_POST['carousel_image_par']) ? esc_html(stripslashes($_POST['carousel_image_par'])) : 0.75);
220
- $carousel_image_column_number = (isset($_POST['carousel_image_column_number']) ? esc_html(stripslashes($_POST['carousel_image_column_number'])) : 5);
221
- $carousel_enable_title = (isset($_POST['carousel_enable_title']) ? esc_html(stripslashes($_POST['carousel_enable_title'])) : 0);
222
- $carousel_enable_autoplay = (isset($_POST['carousel_enable_autoplay']) ? esc_html(stripslashes($_POST['carousel_enable_autoplay'])) : 0);
223
- $carousel_r_width = (isset($_POST['carousel_r_width']) ? esc_html(stripslashes($_POST['carousel_r_width'])) : 800);
224
- $carousel_fit_containerWidth = (isset($_POST['carousel_fit_containerWidth']) ? esc_html(stripslashes($_POST['carousel_fit_containerWidth'])) : 1);
225
- $carousel_prev_next_butt = (isset($_POST['carousel_prev_next_butt']) ? esc_html(stripslashes($_POST['carousel_prev_next_butt'])) : 1);
226
- $carousel_play_pause_butt = (isset($_POST['carousel_play_pause_butt']) ? esc_html(stripslashes($_POST['carousel_play_pause_butt'])) : 1);
227
- $bwg_permissions = (isset($_POST['permissions']) ? esc_html(stripslashes($_POST['permissions'])) : 'manage_options');
228
- $facebook_app_id = (isset($_POST['facebook_app_id']) ? esc_html(stripslashes($_POST['facebook_app_id'])) : '');
229
- $facebook_app_secret = (isset($_POST['facebook_app_secret']) ? esc_html(stripslashes($_POST['facebook_app_secret'])) : '');
230
- $show_tag_box = (isset($_POST['show_tag_box']) ? esc_html(stripslashes($_POST['show_tag_box'])) : 0);
231
- $show_hide_custom_post = (isset($_POST['show_hide_custom_post']) ? esc_html(stripslashes($_POST['show_hide_custom_post'])) : 0);
232
- $show_hide_post_meta = (isset($_POST['show_hide_post_meta']) ? esc_html(stripslashes($_POST['show_hide_post_meta'])) : 0);
233
- $use_inline_stiles_and_scripts = (isset($_POST['use_inline_stiles_and_scripts']) ? esc_html(stripslashes($_POST['use_inline_stiles_and_scripts'])) : 0);
234
- $placeholder = (isset($_POST['placeholder']) ? esc_html(stripslashes($_POST['placeholder'])) : '');
235
- $slideshow_effect_duration = (isset($_POST['slideshow_effect_duration']) ? esc_html(stripslashes($_POST['slideshow_effect_duration'])) : 1);
236
- $popup_effect_duration = (isset($_POST['popup_effect_duration']) ? (int) (stripslashes($_POST['popup_effect_duration'])) : 1);
237
 
238
- $save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
239
- 'images_directory' => $images_directory,
240
- 'masonry' => $masonry,
241
- 'mosaic' => $mosaic,
242
- 'resizable_mosaic' => $resizable_mosaic,
243
- 'mosaic_total_width'=> $mosaic_total_width,
244
- 'image_column_number' => $image_column_number,
245
- 'images_per_page' => $images_per_page,
246
- 'thumb_width' => $thumb_width,
247
- 'thumb_height' => $thumb_height,
248
- 'upload_thumb_width' => $upload_thumb_width,
249
- 'upload_thumb_height' => $upload_thumb_height,
250
- 'upload_img_width' => $upload_img_width,
251
- 'upload_img_height' => $upload_img_height,
252
- 'image_enable_page' => $image_enable_page,
253
- 'image_title_show_hover' => $image_title_show_hover,
254
- 'album_column_number' => $album_column_number,
255
- 'albums_per_page' => $albums_per_page,
256
- 'album_title_show_hover' => $album_title_show_hover,
257
- 'album_thumb_width' => $album_thumb_width,
258
- 'album_thumb_height' => $album_thumb_height,
259
- 'album_enable_page' => $album_enable_page,
260
- 'extended_album_height' => $extended_album_height,
261
- 'extended_album_description_enable' => $extended_album_description_enable,
262
- 'image_browser_width' => $image_browser_width,
263
- 'image_browser_title_enable' => $image_browser_title_enable,
264
- 'image_browser_description_enable' => $image_browser_description_enable,
265
- 'blog_style_width' => $blog_style_width,
266
- 'blog_style_title_enable' => $blog_style_title_enable,
267
- 'blog_style_images_per_page' => $blog_style_images_per_page,
268
- 'blog_style_enable_page' => $blog_style_enable_page,
269
- 'slideshow_type' => $slideshow_type,
270
- 'slideshow_interval' => $slideshow_interval,
271
- 'slideshow_width' => $slideshow_width,
272
- 'slideshow_height' => $slideshow_height,
273
- 'slideshow_enable_autoplay' => $slideshow_enable_autoplay,
274
- 'slideshow_enable_shuffle' => $slideshow_enable_shuffle,
275
- 'slideshow_enable_ctrl' => $slideshow_enable_ctrl,
276
- 'slideshow_enable_filmstrip' => $slideshow_enable_filmstrip,
277
- 'slideshow_filmstrip_height' => $slideshow_filmstrip_height,
278
- 'slideshow_enable_title' => $slideshow_enable_title,
279
- 'slideshow_title_position' => $slideshow_title_position,
280
- 'slideshow_title_full_width' => $slideshow_title_full_width,
281
- 'slideshow_enable_description' => $slideshow_enable_description,
282
- 'slideshow_description_position' => $slideshow_description_position,
283
- 'slideshow_enable_music' => $slideshow_enable_music,
284
- 'slideshow_audio_url' => $slideshow_audio_url,
285
- 'popup_width' => $popup_width,
286
- 'popup_height' => $popup_height,
287
- 'popup_type' => $popup_type,
288
- 'popup_interval' => $popup_interval,
289
- 'popup_enable_filmstrip' => $popup_enable_filmstrip,
290
- 'popup_filmstrip_height' => $popup_filmstrip_height,
291
- 'popup_enable_ctrl_btn' => $popup_enable_ctrl_btn,
292
- 'popup_enable_fullscreen' => $popup_enable_fullscreen,
293
- 'popup_enable_comment' => $popup_enable_comment,
294
- 'popup_enable_email' => $popup_enable_email,
295
- 'popup_enable_captcha' => $popup_enable_captcha,
296
- 'popup_enable_download' => $popup_enable_download,
297
- 'popup_enable_fullsize_image' => $popup_enable_fullsize_image,
298
- 'popup_enable_facebook' => $popup_enable_facebook,
299
- 'popup_enable_twitter' => $popup_enable_twitter,
300
- 'popup_enable_google' => $popup_enable_google,
301
- 'popup_enable_pinterest' => $popup_enable_pinterest,
302
- 'popup_enable_tumblr' => $popup_enable_tumblr,
303
- 'watermark_type' => $watermark_type,
304
- 'watermark_position' => $watermark_position,
305
- 'watermark_width' => $watermark_width,
306
- 'watermark_height' => $watermark_height,
307
- 'watermark_url' => $watermark_url,
308
- 'watermark_text' => $watermark_text,
309
- 'watermark_link' => $watermark_link,
310
- 'watermark_font_size' => $watermark_font_size,
311
- 'watermark_font' => $watermark_font,
312
- 'watermark_color' => $watermark_color,
313
- 'watermark_opacity' => $watermark_opacity,
314
- 'built_in_watermark_type' => $built_in_watermark_type,
315
- 'built_in_watermark_position' => $built_in_watermark_position,
316
- 'built_in_watermark_size' => $built_in_watermark_size,
317
- 'built_in_watermark_url' => $built_in_watermark_url,
318
- 'built_in_watermark_text' => $built_in_watermark_text,
319
- 'built_in_watermark_font_size' => $built_in_watermark_font_size,
320
- 'built_in_watermark_font' => $built_in_watermark_font,
321
- 'built_in_watermark_color' => $built_in_watermark_color,
322
- 'built_in_watermark_opacity' => $built_in_watermark_opacity,
323
- 'gallery_role' => $gallery_role,
324
- 'image_right_click' => $image_right_click,
325
- 'popup_fullscreen' => $popup_fullscreen,
326
- 'album_role' => $album_role,
327
- 'image_role' => $image_role,
328
- 'popup_autoplay' => $popup_autoplay,
329
- 'album_view_type' => $album_view_type,
330
- 'show_search_box' => $show_search_box,
331
- 'search_box_width' => $search_box_width,
332
- 'preload_images' => $preload_images,
333
- 'preload_images_count' => $preload_images_count,
334
- 'popup_enable_info' => $popup_enable_info,
335
- 'popup_info_always_show' => $popup_info_always_show,
336
- 'popup_enable_rate' => $popup_enable_rate,
337
- 'thumb_click_action' => $thumb_click_action,
338
- 'thumb_link_target' => $thumb_link_target,
339
- 'comment_moderation' => $comment_moderation,
340
- 'popup_hit_counter' => $popup_hit_counter,
341
- 'enable_ML_import' => $enable_ML_import,
342
- 'autoupdate_interval' => $autoupdate_interval,
343
- 'instagram_access_token' => $instagram_access_token,
344
- 'showthumbs_name' => $showthumbs_name,
345
- 'show_album_name' => $show_album_name,
346
- 'show_image_counts' => $show_image_counts,
347
- 'play_icon' => $play_icon,
348
- 'show_masonry_thumb_description' => $show_masonry_thumb_description,
349
- 'popup_info_full_width' => $popup_info_full_width,
350
- 'show_sort_images' => $show_sort_images,
351
- 'enable_seo' => $enable_seo,
352
- 'autohide_lightbox_navigation' => $autohide_lightbox_navigation,
353
- 'autohide_slideshow_navigation' => $autohide_slideshow_navigation,
354
- 'read_metadata' => $read_metadata,
355
- 'enable_loop' => $enable_loop,
356
- 'enable_addthis' => $enable_addthis,
357
- 'addthis_profile_id' => $addthis_profile_id,
358
 
359
- 'carousel_interval' => $carousel_interval,
360
- 'carousel_width' => $carousel_width,
361
- 'carousel_height' => $carousel_height,
362
- 'carousel_image_column_number' => $carousel_image_column_number,
363
- 'carousel_image_par' => $carousel_image_par,
364
- 'carousel_enable_title' => $carousel_enable_title,
365
- 'carousel_enable_autoplay' => $carousel_enable_autoplay,
366
- 'carousel_r_width' => $carousel_r_width,
367
- 'carousel_fit_containerWidth' => $carousel_fit_containerWidth,
368
- 'carousel_prev_next_butt' => $carousel_prev_next_butt,
369
- 'carousel_play_pause_butt' => $carousel_play_pause_butt,
370
- 'permissions' => $bwg_permissions,
371
- 'facebook_app_id' => $facebook_app_id,
372
- 'facebook_app_secret' => $facebook_app_secret,
373
- 'show_tag_box' => $show_tag_box,
374
- 'show_hide_custom_post' => $show_hide_custom_post,
375
- 'show_hide_post_meta' => $show_hide_post_meta,
376
- 'use_inline_stiles_and_scripts' => $use_inline_stiles_and_scripts,
377
- 'placeholder' => $placeholder,
378
- 'slideshow_effect_duration' => $slideshow_effect_duration,
379
- 'popup_effect_duration' => $popup_effect_duration,
380
- ), array('id' => 1));
381
  if (isset($_POST['watermark']) && $_POST['watermark'] == "image_set_watermark") {
382
  $this->image_set_watermark();
383
  }
384
 
385
- if ($save !== FALSE) {
386
- if ($old_images_directory && $old_images_directory != $images_directory) {
387
- rename(ABSPATH . $old_images_directory . '/photo-gallery', ABSPATH . $images_directory . '/photo-gallery');
388
  }
389
- if (!is_dir(ABSPATH . $images_directory . '/photo-gallery')) {
390
- mkdir(ABSPATH . $images_directory . '/photo-gallery', 0777);
391
  }
392
  if (isset($_POST['recreate']) && $_POST['recreate'] == "resize_image_thumb") {
393
  $this->resize_image_thumb();
@@ -397,9 +109,6 @@ class BWGControllerOptions_bwg {
397
  echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'wd_updated');
398
  }
399
  }
400
- else {
401
- echo WDWLibrary::message('Error. Please install plugin again.', 'wd_error');
402
- }
403
  }
404
 
405
  function bwg_hex2rgb($hex) {
@@ -433,18 +142,18 @@ class BWGControllerOptions_bwg {
433
  public function image_set_watermark() {
434
  global $wpdb;
435
  global $WD_BWG_UPLOAD_DIR;
436
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
437
  $images = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'bwg_image');
438
- switch ($options->built_in_watermark_type) {
439
  case 'text':
440
  foreach ($images as $image) {
441
- $this->set_text_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $options->built_in_watermark_text, $options->built_in_watermark_font, $options->built_in_watermark_font_size, '#' . $options->built_in_watermark_color, $options->built_in_watermark_opacity, $options->built_in_watermark_position);
442
  }
443
  break;
444
  case 'image':
445
- $watermark_path = str_replace(site_url() . '/', ABSPATH, $options->built_in_watermark_url);
446
  foreach ($images as $image) {
447
- $this->set_image_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $watermark_path, $options->built_in_watermark_size, $options->built_in_watermark_size, $options->built_in_watermark_position);
448
  }
449
  break;
450
  }
@@ -602,9 +311,9 @@ class BWGControllerOptions_bwg {
602
 
603
  public function image_recover_all() {
604
  global $wpdb;
605
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
606
- $thumb_width = $options->upload_thumb_width;
607
- $thumb_height = $options->upload_thumb_height;
608
  $image_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_image');
609
  foreach ($image_ids_col as $image_id) {
610
  $this->recover_image($image_id, $thumb_width, $thumb_height);
@@ -666,8 +375,8 @@ class BWGControllerOptions_bwg {
666
  public function resize_image_thumb() {
667
  global $WD_BWG_UPLOAD_DIR;
668
  global $wpdb;
 
669
  $img_ids = $wpdb->get_results('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image');
670
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option');
671
  foreach ($img_ids as $img_id) {
672
  $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
673
  $new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
@@ -675,8 +384,8 @@ class BWGControllerOptions_bwg {
675
  if (!$img_width || !$img_height) {
676
  continue;
677
  }
678
- $max_width = $options->upload_thumb_width;
679
- $max_height = $options->upload_thumb_height;
680
  $scale = min(
681
  $max_width / $img_width,
682
  $max_height / $img_height
@@ -695,7 +404,7 @@ class BWGControllerOptions_bwg {
695
  case 2:
696
  $src_img = @imagecreatefromjpeg($file_path);
697
  $write_image = 'imagejpeg';
698
- $image_quality = isset($options->jpeg_quality) ? $options->jpeg_quality : 75;
699
  break;
700
  case 1:
701
  @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
@@ -709,7 +418,7 @@ class BWGControllerOptions_bwg {
709
  @imagesavealpha($new_img, true);
710
  $src_img = @imagecreatefrompng($file_path);
711
  $write_image = 'imagepng';
712
- $image_quality = isset($options->png_quality) ? $options->png_quality : 9;
713
  break;
714
  default:
715
  $src_img = null;
@@ -734,13 +443,4 @@ class BWGControllerOptions_bwg {
734
  }
735
  }
736
 
737
- ////////////////////////////////////////////////////////////////////////////////////////
738
- // Getters & Setters //
739
- ////////////////////////////////////////////////////////////////////////////////////////
740
- ////////////////////////////////////////////////////////////////////////////////////////
741
- // Private Methods //
742
- ////////////////////////////////////////////////////////////////////////////////////////
743
- ////////////////////////////////////////////////////////////////////////////////////////
744
- // Listeners //
745
- ////////////////////////////////////////////////////////////////////////////////////////
746
  }
1
  <?php
2
 
3
  class BWGControllerOptions_bwg {
4
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  public function execute() {
6
  $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
 
7
 
8
  if($task != ''){
9
  if(!WDWLibrary::verify_nonce('options_bwg')){
12
  }
13
 
14
  if (method_exists($this, $task)) {
15
+ $this->$task();
16
  }
17
  else {
18
  $this->display();
44
  }
45
 
46
  public function save_db() {
47
+ $row = new WD_BWG_Options();
 
48
  if (isset($_POST['old_images_directory'])) {
49
+ $row->old_images_directory = esc_html(stripslashes($_POST['old_images_directory']));
50
  }
51
  if (isset($_POST['images_directory'])) {
52
+ $row->images_directory = esc_html(stripslashes($_POST['images_directory']));
53
+ if (!is_dir(ABSPATH . $row->images_directory) || (is_dir(ABSPATH . $row->images_directory . '/photo-gallery') && $row->old_images_directory && $row->old_images_directory != $row->images_directory)) {
54
+ if (!is_dir(ABSPATH . $row->images_directory)) {
55
+ echo WDWLibrary::message('Uploads directory doesn\'t exist. Old value is restored.', 'wd_error');
56
+ }
57
+ else {
58
+ echo WDWLibrary::message('Warning: "photo-gallery" folder already exists in uploads directory. Old value is restored.', 'wd_error');
59
+ }
60
+ if ($row->old_images_directory) {
61
+ $row->images_directory = $row->old_images_directory;
62
  }
63
  else {
64
  $upload_dir = wp_upload_dir();
65
  if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
66
  mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
67
  }
68
+ $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
69
  }
70
  }
71
  }
74
  if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
75
  mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
76
  }
77
+ $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
78
  }
 
 
 
 
 
 
79
 
80
+ foreach ($row as $name => $value) {
81
+ if ($name == 'autoupdate_interval') {
82
+ $autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : null);
83
+ /*minimum autoupdate interval is 1 min*/
84
+ $autoupdate_interval = isset($autoupdate_interval) && $autoupdate_interval >= 1 ? $autoupdate_interval : 1;
85
+ }
86
+ else if ($name != 'images_directory' && isset($_POST[$name])) {
87
+ $row->$name = esc_html(stripslashes($_POST[$name]));
88
+ }
89
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
+ $save = update_option('wd_bwg_options', json_encode($row), 'no');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  if (isset($_POST['watermark']) && $_POST['watermark'] == "image_set_watermark") {
94
  $this->image_set_watermark();
95
  }
96
 
97
+ if ($save) {
98
+ if ($row->old_images_directory && $row->old_images_directory != $row->images_directory) {
99
+ rename(ABSPATH . $row->old_images_directory . '/photo-gallery', ABSPATH . $row->images_directory . '/photo-gallery');
100
  }
101
+ if (!is_dir(ABSPATH . $row->images_directory . '/photo-gallery')) {
102
+ mkdir(ABSPATH . $row->images_directory . '/photo-gallery', 0777);
103
  }
104
  if (isset($_POST['recreate']) && $_POST['recreate'] == "resize_image_thumb") {
105
  $this->resize_image_thumb();
109
  echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'wd_updated');
110
  }
111
  }
 
 
 
112
  }
113
 
114
  function bwg_hex2rgb($hex) {
142
  public function image_set_watermark() {
143
  global $wpdb;
144
  global $WD_BWG_UPLOAD_DIR;
145
+ global $wd_bwg_options;
146
  $images = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'bwg_image');
147
+ switch ($wd_bwg_options->built_in_watermark_type) {
148
  case 'text':
149
  foreach ($images as $image) {
150
+ $this->set_text_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $wd_bwg_options->built_in_watermark_text, $wd_bwg_options->built_in_watermark_font, $wd_bwg_options->built_in_watermark_font_size, '#' . $wd_bwg_options->built_in_watermark_color, $wd_bwg_options->built_in_watermark_opacity, $wd_bwg_options->built_in_watermark_position);
151
  }
152
  break;
153
  case 'image':
154
+ $watermark_path = str_replace(site_url() . '/', ABSPATH, $wd_bwg_options->built_in_watermark_url);
155
  foreach ($images as $image) {
156
+ $this->set_image_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $watermark_path, $wd_bwg_options->built_in_watermark_size, $wd_bwg_options->built_in_watermark_size, $wd_bwg_options->built_in_watermark_position);
157
  }
158
  break;
159
  }
311
 
312
  public function image_recover_all() {
313
  global $wpdb;
314
+ global $wd_bwg_options;
315
+ $thumb_width = $wd_bwg_options->upload_thumb_width;
316
+ $thumb_height = $wd_bwg_options->upload_thumb_height;
317
  $image_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_image');
318
  foreach ($image_ids_col as $image_id) {
319
  $this->recover_image($image_id, $thumb_width, $thumb_height);
375
  public function resize_image_thumb() {
376
  global $WD_BWG_UPLOAD_DIR;
377
  global $wpdb;
378
+ global $wd_bwg_options;
379
  $img_ids = $wpdb->get_results('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image');
 
380
  foreach ($img_ids as $img_id) {
381
  $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
382
  $new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
384
  if (!$img_width || !$img_height) {
385
  continue;
386
  }
387
+ $max_width = $wd_bwg_options->upload_thumb_width;
388
+ $max_height = $wd_bwg_options->upload_thumb_height;
389
  $scale = min(
390
  $max_width / $img_width,
391
  $max_height / $img_height
404
  case 2:
405
  $src_img = @imagecreatefromjpeg($file_path);
406
  $write_image = 'imagejpeg';
407
+ $image_quality = isset($wd_bwg_options->jpeg_quality) ? $wd_bwg_options->jpeg_quality : 75;
408
  break;
409
  case 1:
410
  @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
418
  @imagesavealpha($new_img, true);
419
  $src_img = @imagecreatefrompng($file_path);
420
  $write_image = 'imagepng';
421
+ $image_quality = isset($wd_bwg_options->png_quality) ? $wd_bwg_options->png_quality : 9;
422
  break;
423
  default:
424
  $src_img = null;
443
  }
444
  }
445
 
 
 
 
 
 
 
 
 
 
446
  }
admin/models/BWGModelAlbums_bwg.php CHANGED
@@ -30,7 +30,8 @@ class BWGModelAlbums_bwg {
30
  ////////////////////////////////////////////////////////////////////////////////////////
31
  public function get_rows_data() {
32
  global $wpdb;
33
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
 
34
  $where = " WHERE author=" . get_current_user_id();
35
  }
36
  else {
@@ -54,8 +55,9 @@ class BWGModelAlbums_bwg {
54
 
55
  public function get_row_data($id) {
56
  global $wpdb;
 
57
  if ($id != 0) {
58
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
59
  $where = " WHERE author=" . get_current_user_id();
60
  }
61
  else {
@@ -79,7 +81,8 @@ class BWGModelAlbums_bwg {
79
 
80
  public function get_albums_galleries_rows_data($album_id) {
81
  global $wpdb;
82
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
 
83
  $where = " AND author=" . get_current_user_id();
84
  }
85
  else {
30
  ////////////////////////////////////////////////////////////////////////////////////////
31
  public function get_rows_data() {
32
  global $wpdb;
33
+ global $wd_bwg_options;
34
+ if (!current_user_can('manage_options') && $wd_bwg_options->album_role) {
35
  $where = " WHERE author=" . get_current_user_id();
36
  }
37
  else {
55
 
56
  public function get_row_data($id) {
57
  global $wpdb;
58
+ global $wd_bwg_options;
59
  if ($id != 0) {
60
+ if (!current_user_can('manage_options') && $wd_bwg_options->album_role) {
61
  $where = " WHERE author=" . get_current_user_id();
62
  }
63
  else {
81
 
82
  public function get_albums_galleries_rows_data($album_id) {
83
  global $wpdb;
84
+ global $wd_bwg_options;
85
+ if (!current_user_can('manage_options') && $wd_bwg_options->album_role) {
86
  $where = " AND author=" . get_current_user_id();
87
  }
88
  else {
admin/models/BWGModelEditThumb.php CHANGED
@@ -24,12 +24,6 @@ class BWGModelEditThumb {
24
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
25
  return $row;
26
  }
27
-
28
- public function get_option_data() {
29
- global $wpdb;
30
- $row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
31
- return $row;
32
- }
33
  ////////////////////////////////////////////////////////////////////////////////////////
34
  // Getters & Setters //
35
  ////////////////////////////////////////////////////////////////////////////////////////
24
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
25
  return $row;
26
  }
 
 
 
 
 
 
27
  ////////////////////////////////////////////////////////////////////////////////////////
28
  // Getters & Setters //
29
  ////////////////////////////////////////////////////////////////////////////////////////
admin/models/BWGModelGalleries_bwg.php CHANGED
@@ -32,7 +32,8 @@ class BWGModelGalleries_bwg {
32
 
33
  public function get_image_rows_data($gallery_id) {
34
  global $wpdb;
35
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
 
36
  $where = " WHERE author=" . get_current_user_id();
37
  }
38
  else {
@@ -64,7 +65,8 @@ class BWGModelGalleries_bwg {
64
 
65
  public function get_rows_data() {
66
  global $wpdb;
67
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
 
68
  $where = " WHERE author=" . get_current_user_id();
69
  }
70
  else {
@@ -88,8 +90,9 @@ class BWGModelGalleries_bwg {
88
 
89
  public function get_row_data($id) {
90
  global $wpdb;
 
91
  if ($id != 0) {
92
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
93
  $where = " WHERE author=" . get_current_user_id();
94
  }
95
  else {
@@ -118,7 +121,8 @@ class BWGModelGalleries_bwg {
118
 
119
  public function page_nav() {
120
  global $wpdb;
121
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
 
122
  $where = " WHERE author=" . get_current_user_id();
123
  }
124
  else {
@@ -140,7 +144,8 @@ class BWGModelGalleries_bwg {
140
 
141
  public function image_page_nav($gallery_id) {
142
  global $wpdb;
143
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
 
144
  $where = " AND author=" . get_current_user_id();
145
  }
146
  else {
@@ -162,7 +167,8 @@ class BWGModelGalleries_bwg {
162
 
163
  public function get_images_count($gallery_id) {
164
  global $wpdb;
165
- if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
 
166
  $where = " WHERE author=" . get_current_user_id();
167
  }
168
  else {
32
 
33
  public function get_image_rows_data($gallery_id) {
34
  global $wpdb;
35
+ global $wd_bwg_options;
36
+ if (!current_user_can('manage_options') && $wd_bwg_options->image_role) {
37
  $where = " WHERE author=" . get_current_user_id();
38
  }
39
  else {
65
 
66
  public function get_rows_data() {
67
  global $wpdb;
68
+ global $wd_bwg_options;
69
+ if (!current_user_can('manage_options') && $wd_bwg_options->gallery_role) {
70
  $where = " WHERE author=" . get_current_user_id();
71
  }
72
  else {
90
 
91
  public function get_row_data($id) {
92
  global $wpdb;
93
+ global $wd_bwg_options;
94
  if ($id != 0) {
95
+ if (!current_user_can('manage_options') && $wd_bwg_options->gallery_role) {
96
  $where = " WHERE author=" . get_current_user_id();
97
  }
98
  else {
121
 
122
  public function page_nav() {
123
  global $wpdb;
124
+ global $wd_bwg_options;
125
+ if (!current_user_can('manage_options') && $wd_bwg_options->gallery_role) {
126
  $where = " WHERE author=" . get_current_user_id();
127
  }
128
  else {
144
 
145
  public function image_page_nav($gallery_id) {
146
  global $wpdb;
147
+ global $wd_bwg_options;
148
+ if (!current_user_can('manage_options') && $wd_bwg_options->image_role) {
149
  $where = " AND author=" . get_current_user_id();
150
  }
151
  else {
167
 
168
  public function get_images_count($gallery_id) {
169
  global $wpdb;
170
+ global $wd_bwg_options;
171
+ if (!current_user_can('manage_options') && $wd_bwg_options->image_role) {
172
  $where = " WHERE author=" . get_current_user_id();
173
  }
174
  else {
admin/models/BWGModelOptions_bwg.php CHANGED
@@ -1,197 +1,4 @@
1
  <?php
2
 
3
  class BWGModelOptions_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_row_data($reset) {
23
- global $wpdb;
24
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
25
- if (!is_null($row)) {
26
- $row->old_images_directory = $row->images_directory;
27
- if ($reset) {
28
- $upload_dir = wp_upload_dir();
29
- if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
30
- mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
31
- }
32
- $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
33
- $row->masonry = 'vertical';
34
- $row->mosaic = 'vertical';
35
- $row->resizable_mosaic = 0;
36
- $row->mosaic_total_width = 100;
37
- $row->image_column_number = 5;
38
- $row->images_per_page = 30;
39
- $row->thumb_width = 180;
40
- $row->thumb_height = 90;
41
- $row->upload_thumb_width = 300;
42
- $row->upload_thumb_height = 300;
43
- $row->upload_img_width = 1200;
44
- $row->upload_img_height = 1200;
45
- $row->image_enable_page = 1;
46
- $row->image_title_show_hover = 'none';
47
-
48
- $row->album_column_number = 5;
49
- $row->albums_per_page = 30;
50
- $row->album_title_show_hover = 'hover';
51
- $row->album_thumb_width = 120;
52
- $row->album_thumb_height = 90;
53
- $row->album_enable_page = 1;
54
- $row->extended_album_height = 150;
55
- $row->extended_album_description_enable = 1;
56
-
57
- $row->image_browser_width = 800;
58
- $row->image_browser_title_enable = 1;
59
- $row->image_browser_description_enable = 1;
60
-
61
- $row->blog_style_width = 800;
62
- $row->blog_style_title_enable = 1;
63
- $row->blog_style_images_per_page = 5;
64
- $row->blog_style_enable_page = 1;
65
-
66
- $row->slideshow_type = 'fade';
67
- $row->slideshow_interval = 5;
68
- $row->slideshow_width = 800;
69
- $row->slideshow_height = 500;
70
- $row->slideshow_enable_autoplay = 0;
71
- $row->slideshow_enable_shuffle = 0;
72
- $row->slideshow_enable_ctrl = 1;
73
- $row->slideshow_enable_filmstrip = 1;
74
- $row->slideshow_filmstrip_height = 90;
75
- $row->slideshow_enable_title = 0;
76
- $row->slideshow_title_position = 'top-right';
77
- $row->slideshow_title_full_width = 0;
78
- $row->slideshow_enable_description = 0;
79
- $row->slideshow_description_position = 'bottom-right';
80
- $row->slideshow_enable_music = 0;
81
- $row->slideshow_audio_url = '';
82
- $row->slideshow_effect_duration = 1;
83
-
84
- $row->popup_width = 800;
85
- $row->popup_height = 500;
86
- $row->popup_type = 'fade';
87
- $row->popup_interval = 5;
88
- $row->popup_enable_filmstrip = 1;
89
- $row->popup_filmstrip_height = 70;
90
- $row->popup_enable_ctrl_btn = 1;
91
- $row->popup_enable_fullscreen = 1;
92
- $row->popup_enable_comment = 1;
93
- $row->popup_enable_email = 0;
94
- $row->popup_enable_captcha = 0;
95
- $row->popup_enable_download = 0;
96
- $row->popup_enable_fullsize_image = 0;
97
- $row->popup_enable_facebook = 1;
98
- $row->popup_enable_twitter = 1;
99
- $row->popup_enable_google = 1;
100
- $row->popup_enable_pinterest = 0;
101
- $row->popup_enable_tumblr = 0;
102
- $row->popup_effect_duration = 1;
103
-
104
- $row->watermark_type = 'none';
105
- $row->watermark_position = 'bottom-left';
106
- $row->watermark_width = 90;
107
- $row->watermark_height = 90;
108
- $row->watermark_url = WD_BWG_URL . '/images/watermark.png';
109
- $row->watermark_text = 'web-dorado.com';
110
- $row->watermark_link = 'https://web-dorado.com';
111
- $row->watermark_font_size = 20;
112
- $row->watermark_font = 'segoe ui';
113
- $row->watermark_color = 'FFFFFF';
114
- $row->watermark_opacity = 30;
115
-
116
- $row->built_in_watermark_type = 'none';
117
- $row->built_in_watermark_position = 'middle-center';
118
- $row->built_in_watermark_size = 15;
119
- $row->built_in_watermark_url = WD_BWG_URL . '/images/watermark.png';
120
- $row->built_in_watermark_text = 'web-dorado.com';
121
- $row->built_in_watermark_font_size = 20;
122
- $row->built_in_watermark_font = 'arial';
123
- $row->built_in_watermark_color = 'FFFFFF';
124
- $row->built_in_watermark_opacity = 30;
125
-
126
- $row->image_right_click = 0;
127
- $row->popup_fullscreen = 0;
128
- $row->gallery_role = 0;
129
- $row->album_role = 0;
130
- $row->image_role = 0;
131
- $row->popup_autoplay = 0;
132
- $row->album_view_type = 'thumbnail';
133
- $row->show_search_box = 0;
134
- $row->search_box_width = 180;
135
- $row->preload_images = 1;
136
- $row->preload_images_count = 10;
137
- $row->popup_enable_info = 1;
138
- $row->popup_info_always_show = 0;
139
- $row->popup_enable_rate = 0;
140
- $row->thumb_click_action = 'open_lightbox';
141
- $row->thumb_link_target = 1;
142
- $row->comment_moderation = 0;
143
- $row->popup_hit_counter = 0;
144
- $row->enable_ML_import = 0;
145
- $row->autoupdate_interval = 30;
146
- $row->instagram_client_id = '';
147
- $row->showthumbs_name = 0;
148
- $row->show_album_name = 0;
149
- $row->show_image_counts = 0;
150
- $row->play_icon = 1;
151
- $row->show_masonry_thumb_description = 0;
152
- $row->popup_info_full_width = 0;
153
- $row->show_sort_images = 0;
154
- $row->enable_seo = 1;
155
- $row->autohide_lightbox_navigation = 1;
156
- $row->autohide_slideshow_navigation = 1;
157
- $row->read_metadata = 0;
158
- $row->enable_loop = 1;
159
- $row->enable_addthis = 0;
160
- $row->addthis_profile_id = '';
161
-
162
- $row->carousel_interval = 5;
163
- $row->carousel_width = 300;
164
- $row->carousel_height = 300;
165
- $row->carousel_image_column_number = 5;
166
- $row->carousel_image_par = 0.75;
167
- $row->carousel_enable_autoplay = 0;
168
- $row->carousel_enable_title = 0;
169
- $row->carousel_r_width = 800;
170
- $row->carousel_fit_containerWidth = 1;
171
- $row->carousel_prev_next_butt = 1;
172
- $row->carousel_play_pause_butt = 1;
173
- $row->permissions = 'manage_options';
174
- $row->facebook_app_id = '';
175
- $row->facebook_app_secret = '';
176
- $row->show_tag_box = 0;
177
- $row->show_hide_custom_post = 0;
178
- $row->show_hide_post_meta = 0;
179
- $row->use_inline_stiles_and_scripts = 0;
180
- $row->placeholder = '';
181
- }
182
- return $row;
183
- }
184
- else {
185
- return 0;
186
- }
187
- }
188
- ////////////////////////////////////////////////////////////////////////////////////////
189
- // Getters & Setters //
190
- ////////////////////////////////////////////////////////////////////////////////////////
191
- ////////////////////////////////////////////////////////////////////////////////////////
192
- // Private Methods //
193
- ////////////////////////////////////////////////////////////////////////////////////////
194
- ////////////////////////////////////////////////////////////////////////////////////////
195
- // Listeners //
196
- ////////////////////////////////////////////////////////////////////////////////////////
197
  }
1
  <?php
2
 
3
  class BWGModelOptions_bwg {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
admin/views/BWGViewBWGShortcode.php CHANGED
@@ -25,7 +25,7 @@ class BWGViewBWGShortcode {
25
  public function display() {
26
  $gallery_rows = $this->model->get_gallery_rows_data();
27
  $album_rows = $this->model->get_album_rows_data();
28
- $option_row = WDWLibrary::get_options_row_data();
29
  $theme_rows = $this->model->get_theme_rows_data();
30
  $from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
31
  $shortcodes = $this->model->get_shortcode_data();
@@ -181,7 +181,7 @@ class BWGViewBWGShortcode {
181
  <td class="spider_label"><label for="gallery"><?php _e("Gallery:", 'bwg_back'); ?> </label></td>
182
  <td>
183
  <select name="gallery" class="select_icon" id="gallery" style="width:150px;">
184
- <option value="0" selected="selected"><?php _e("Select Gallery", 'bwg_back'); ?></option>
185
  <?php
186
  foreach ($gallery_rows as $gallery_row) {
187
  ?>
@@ -226,7 +226,7 @@ class BWGViewBWGShortcode {
226
  <td class="spider_label"><label for="gallery"><?php echo __('Tag:', 'bwg_back'); ?> </label></td>
227
  <td>
228
  <select name="tag" id="tag" class="select_icon" style="width:150px;">
229
- <option value="0" selected="selected"><?php echo __('Select Tag', 'bwg_back'); ?></option>
230
  <?php
231
  foreach ($tag_rows as $tag_row) {
232
  ?>
@@ -247,26 +247,26 @@ class BWGViewBWGShortcode {
247
  <tr id="tr_show_search_box">
248
  <td class="spider_label"><label><?php _e("Show search box:", 'bwg_back'); ?> </label></td>
249
  <td>
250
- <input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($option_row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_1"><?php _e("Yes", 'bwg_back'); ?></label>
251
- <input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$option_row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
252
  </td>
253
  </tr>
254
  <tr id="tr_search_box_width">
255
  <td class="spider_label"><label for="search_box_width"><?php _e("Search box width:", 'bwg_back'); ?> </label></td>
256
- <td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $option_row->search_box_width; ?>" class="spider_int_input" /> px</td>
257
  </tr>
258
  <tr id="tr_show_tag_box">
259
  <td class="spider_label"><label><?php _e("Show tag box:", 'bwg_back'); ?> </label></td>
260
  <td>
261
- <input type="radio" name="show_tag_box" id="show_tag_box_1" value="1" <?php if ($option_row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_1"><?php _e('Yes', 'bwg_back'); ?></label>
262
- <input type="radio" name="show_tag_box" id="show_tag_box_0" value="0" <?php if (!$option_row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
263
  </td>
264
  </tr>
265
  <tr id="tr_show_sort_images">
266
  <td class="spider_label"><label><?php _e("Show 'Order by' dropdown list:", 'bwg_back'); ?> </label></td>
267
  <td>
268
- <input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
269
- <input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0"><?php _e('No', 'bwg_back'); ?>;</label>
270
  </td>
271
  </tr>
272
  <!--Thumbnails, Masonry viewies-->
@@ -277,12 +277,12 @@ class BWGViewBWGShortcode {
277
  bwg_change_label('thumb_width_height_label', 'Image thumbnail width: ');
278
  jQuery('#thumb_width').show();
279
  jQuery('#thumb_height').hide();
280
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->masonry == 'vertical') ? 'checked' : ''; ?> /><label for="masonry_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
281
  <input type="radio" name="masonry_hor_ver" id="masonry_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns: ", 'bwg_back'); ?>');
282
  bwg_change_label('thumb_width_height_label', 'Image Thumbnail Height: ');
283
  jQuery('#thumb_width').hide();
284
  jQuery('#thumb_height').show();
285
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->masonry == 'horizontal') ? 'checked' : ''; ?> /><label for="masonry_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
286
  </td>
287
  </tr>
288
  <!--Thumbnails, Mosaic viewies-->
@@ -293,12 +293,12 @@ class BWGViewBWGShortcode {
293
  bwg_change_label('thumb_width_height_label', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
294
  jQuery('#thumb_width').show();
295
  jQuery('#thumb_height').hide();
296
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
297
  <input type="radio" name="mosaic_hor_ver" id="mosaic_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
298
  bwg_change_label('thumb_width_height_label', '<?php _e("Image Thumbnail Height:", 'bwg_back'); ?> ');
299
  jQuery('#thumb_width').hide();
300
  jQuery('#thumb_height').show();
301
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
302
 
303
 
304
  </td>
@@ -306,83 +306,83 @@ class BWGViewBWGShortcode {
306
  <tr id="tr_resizable_mosaic">
307
  <td title="<?php _e('Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.', 'bwg_back'); ?>" class="spider_label"><label for="resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
308
  <td>
309
- <input type="radio" name="resizable_mosaic" id="resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
310
- <input type="radio" name="resizable_mosaic" id="resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
311
  <br />
312
  </td>
313
  </tr>
314
  <tr id="tr_mosaic_total_width">
315
  <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
316
- <td><input type="text" name="mosaic_total_width" id="mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> %</td>
317
  </tr>
318
  <!--Thumbnails, Masonry and Mosaic viewies-->
319
  <tr id="tr_image_column_number">
320
  <td class="spider_label"><label id="image_column_number_label" for="image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
321
- <td><input type="text" name="image_column_number" id="image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
322
  </tr>
323
  <tr id="tr_images_per_page">
324
  <td title="<?php _e('If you want to display all images you should leave it blank or insert 0.', 'bwg_back'); ?>" class="spider_label"><label for="images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
325
- <td><input type="text" name="images_per_page" id="images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
326
  </tr>
327
  <tr id="tr_image_title_hover">
328
  <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
329
  <td>
330
- <input type="radio" name="image_title" id="image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
331
- <input type="radio" name="image_title" id="image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
332
- <input type="radio" name="image_title" id="image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
333
  </td>
334
  </tr>
335
  <tr id="tr_image_enable_page">
336
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
337
  <td>
338
- <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_yes" value="1" <?php echo ($option_row->image_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
339
- <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_no" value="0" <?php echo ($option_row->image_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_no"><?php _e('No', 'bwg_back'); ?></label>
340
- <input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($option_row->image_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
341
- <input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($option_row->image_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
342
  </td>
343
  </tr>
344
  <tr id="tr_load_more_image_count">
345
  <td class="spider_label"><label for="load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
346
- <td><input type="text" name="load_more_image_count" id="load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
347
  </tr>
348
  <tr id="tr_thumb_width_height">
349
  <td title="<?php _e('Maximum values for thumbnail dimension.', 'bwg_back'); ?>" class="spider_label"><label id="thumb_width_height_label" for="thumb_width"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
350
  <td>
351
- <input type="text" name="thumb_width" id="thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="thumb_width_height_separator"> x </span>
352
- <input type="text" name="thumb_height" id="thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
353
  </td>
354
  </tr>
355
 
356
  <!--Compact Album view-->
357
  <tr id="tr_compuct_album_column_number">
358
  <td class="spider_label"><label for="compuct_album_column_number"><?php _e("Max. number of album columns:", 'bwg_back'); ?> </label></td>
359
- <td><input type="text" name="compuct_album_column_number" id="compuct_album_column_number" value="<?php echo $option_row->album_column_number; ?>" class="spider_int_input" /></td>
360
  </tr>
361
  <tr id="tr_compuct_albums_per_page">
362
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
363
- <td><input type="text" name="compuct_albums_per_page" id="compuct_albums_per_page" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
364
  </tr>
365
  <tr id="tr_compuct_album_title_hover">
366
  <td class="spider_label"><label><?php _e("Album title:", 'bwg_back'); ?> </label></td>
367
  <td>
368
- <input type="radio" name="compuct_album_title" id="compuct_album_title_hover" value="hover" <?php echo ($option_row->album_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
369
- <input type="radio" name="compuct_album_title" id="compuct_album_title_show" value="show" <?php echo ($option_row->album_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
370
- <input type="radio" name="compuct_album_title" id="compuct_album_title_none" value="none" <?php echo ($option_row->album_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
371
  </td>
372
  </tr>
373
  <tr id="tr_compuct_album_thumb_width_height">
374
  <td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_thumb_width"><?php _e("Album Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
375
  <td>
376
- <input type="text" name="compuct_album_thumb_width" id="compuct_album_thumb_width" value="<?php echo $option_row->album_thumb_width; ?>" class="spider_int_input" /> x
377
- <input type="text" name="compuct_album_thumb_height" id="compuct_album_thumb_height" value="<?php echo $option_row->album_thumb_height; ?>" class="spider_int_input" /> px
378
  </td>
379
  </tr>
380
  <tr id="tr_compuct_album_view_type">
381
  <td title="<?php _e('The gallery images view type in the album.<br /><br />This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
382
  <td>
383
- <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_1" value="thumbnail" <?php if ($option_row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
384
- <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_0" value="masonry" <?php if ($option_row->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
385
- <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_2" value="mosaic" <?php if ($option_row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
386
  </td>
387
  </tr>
388
  <tr id="tr_compuct_album_mosaic_hor_ver">
@@ -392,12 +392,12 @@ class BWGViewBWGShortcode {
392
  bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail width:", 'bwg_back'); ?> ');
393
  jQuery('#compuct_album_image_thumb_width').show();
394
  jQuery('#compuct_album_image_thumb_height').hide();
395
- jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
396
  <input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
397
  bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail height:", 'bwg_back'); ?> ');
398
  jQuery('#compuct_album_image_thumb_width').hide();
399
  jQuery('#compuct_album_image_thumb_height').show();
400
- jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
401
 
402
 
403
  </td>
@@ -405,85 +405,85 @@ class BWGViewBWGShortcode {
405
  <tr id="tr_compuct_album_resizable_mosaic">
406
  <td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="compuct_album_resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
407
  <td>
408
- <input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
409
- <input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
410
  <br />
411
  </td>
412
  </tr>
413
  <tr id="tr_compuct_album_mosaic_total_width">
414
  <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
415
- <td><input type="text" name="compuct_album_mosaic_total_width" id="compuct_album_mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
416
  </tr>
417
  <tr id="tr_compuct_album_image_column_number">
418
  <td class="spider_label"><label for="compuct_album_image_column_number"><?php _e("Max. number of image columns: ", 'bwg_back'); ?></label></td>
419
- <td><input type="text" name="compuct_album_image_column_number" id="compuct_album_image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
420
  </tr>
421
  <tr id="tr_compuct_album_images_per_page">
422
  <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
423
- <td><input type="text" name="compuct_album_images_per_page" id="compuct_album_images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
424
  </tr>
425
  <tr id="tr_compuct_album_image_title">
426
  <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
427
  <td>
428
- <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
429
- <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
430
- <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
431
  </td>
432
  </tr>
433
  <tr id="tr_compuct_album_image_thumb_width_height">
434
  <td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_image_thumb_width" id="compuct_album_image_thumb_dimensions"><?php _e("Image thumbnail dimensions: ", 'bwg_back'); ?></label></td>
435
  <td>
436
- <input type="text" name="compuct_album_image_thumb_width" id="compuct_album_image_thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="compuct_album_image_thumb_dimensions_x" > x </span>
437
- <input type="text" name="compuct_album_image_thumb_height" id="compuct_album_image_thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
438
  </td>
439
  </tr>
440
  <tr id="tr_compuct_album_enable_page">
441
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
442
  <td>
443
- <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="compuct_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
444
- <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
445
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
446
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
447
  </td>
448
  </tr>
449
  <tr id="tr_compuct_albums_per_page_load_more">
450
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
451
- <td><input type="text" name="compuct_albums_per_page_load_more" id="compuct_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
452
  </tr>
453
  <tr id="tr_compuct_album_load_more_image_count">
454
  <td class="spider_label"><label for="compuct_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
455
- <td><input type="text" name="compuct_album_load_more_image_count" id="compuct_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
456
  </tr>
457
 
458
  <!--Extended Album view-->
459
  <tr id="tr_extended_albums_per_page">
460
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
461
- <td><input type="text" name="extended_albums_per_page" id="extended_albums_per_page" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
462
  </tr>
463
  <tr id="tr_extended_album_height">
464
  <td class="spider_label"><label for="extended_album_height"><?php _e("Album row height:", 'bwg_back'); ?> </label></td>
465
- <td><input type="text" name="extended_album_height" id="extended_album_height" value="<?php echo $option_row->extended_album_height; ?>" class="spider_int_input" /> px</td>
466
  </tr>
467
  <tr id="tr_extended_album_description_enable">
468
  <td title="<?php _e("If you disable description only the title of the album will be displayed.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable album description:", 'bwg_back'); ?> </label></td>
469
  <td>
470
- <input type="radio" name="extended_album_description_enable" id="extended_album_description_yes" value="1" <?php echo ($option_row->extended_album_description_enable) ? 'checked' : ''; ?> /><label for="extended_album_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
471
- <input type="radio" name="extended_album_description_enable" id="extended_album_description_no" value="0" <?php echo ($option_row->extended_album_description_enable) ? '' : 'checked'; ?> /><label for="extended_album_description_no"><?php _e('No', 'bwg_back'); ?></label>
472
  </td>
473
  </tr>
474
  <tr id="tr_extended_album_thumb_width_height">
475
  <td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_thumb_width"><?php _e("Album thumbnail dimensions:", 'bwg_back'); ?> </label></td>
476
  <td>
477
- <input type="text" name="extended_album_thumb_width" id="extended_album_thumb_width" value="<?php echo $option_row->album_thumb_width; ?>" class="spider_int_input" /> x
478
- <input type="text" name="extended_album_thumb_height" id="extended_album_thumb_height" value="<?php echo $option_row->album_thumb_height; ?>" class="spider_int_input" /> px
479
  </td>
480
  </tr>
481
  <tr id="tr_extended_album_view_type">
482
  <td title="<?php _e("The gallery images view type in the album.", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
483
  <td>
484
- <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_1" value="thumbnail" <?php if ($option_row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
485
- <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_0" value="masonry" <?php if ($option_row->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
486
- <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_2" value="mosaic" <?php if ($option_row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
487
  </td>
488
  </tr>
489
  <tr id="tr_extended_album_mosaic_hor_ver">
@@ -493,12 +493,12 @@ class BWGViewBWGShortcode {
493
  bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
494
  jQuery('#extended_album_image_thumb_width').show();
495
  jQuery('#extended_album_image_thumb_height').hide();
496
- jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
497
  <input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
498
  bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail height: ", 'bwg_back'); ?>');
499
  jQuery('#extended_album_image_thumb_width').hide();
500
  jQuery('#extended_album_image_thumb_height').show();
501
- jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
502
 
503
 
504
  </td>
@@ -506,76 +506,76 @@ class BWGViewBWGShortcode {
506
  <tr id="tr_extended_album_resizable_mosaic">
507
  <td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="extended_album_resizable_mosaic"><?php _e("Resizable mosaic:", 'bwg_back'); ?> </label></td>
508
  <td>
509
- <input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
510
- <input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
511
  <br />
512
  </td>
513
  </tr>
514
 
515
  <tr id="tr_extended_album_mosaic_total_width">
516
  <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
517
- <td><input type="text" name="extended_album_mosaic_total_width" id="extended_album_mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
518
  </tr>
519
  <tr id="tr_extended_album_image_column_number">
520
  <td class="spider_label"><label for="extended_album_image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
521
- <td><input type="text" name="extended_album_image_column_number" id="extended_album_image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
522
  </tr>
523
  <tr id="tr_extended_album_images_per_page">
524
  <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
525
- <td><input type="text" name="extended_album_images_per_page" id="extended_album_images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
526
  </tr>
527
  <tr id="tr_extended_album_image_title">
528
  <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
529
  <td>
530
- <input type="radio" name="extended_album_image_title" id="extended_album_image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="extended_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
531
- <input type="radio" name="extended_album_image_title" id="extended_album_image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="extended_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
532
- <input type="radio" name="extended_album_image_title" id="extended_album_image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="extended_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
533
  </td>
534
  </tr>
535
  <tr id="tr_extended_album_image_thumb_width_height">
536
  <td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_image_thumb_width" id="extended_album_image_thumb_dimensions"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
537
  <td>
538
- <input type="text" name="extended_album_image_thumb_width" id="extended_album_image_thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="extended_album_image_thumb_dimensions_x" > x </span>
539
- <input type="text" name="extended_album_image_thumb_height" id="extended_album_image_thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
540
  </td>
541
  </tr>
542
  <tr id="tr_extended_album_enable_page">
543
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
544
  <td>
545
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
546
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
547
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
548
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
549
  </td>
550
  </tr>
551
  <tr id="tr_extended_albums_per_page_load_more">
552
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
553
- <td><input type="text" name="extended_albums_per_page_load_more" id="extended_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
554
  </tr>
555
  <tr id="tr_extended_album_load_more_image_count">
556
  <td class="spider_label"><label for="extended_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
557
- <td><input type="text" name="extended_album_load_more_image_count" id="extended_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
558
  </tr>
559
 
560
  <!--Image Browser view-->
561
  <tr id="tr_image_browser_width_height">
562
  <td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="image_browser_width"><?php _e("Image width: ", 'bwg_back'); ?></label></td>
563
  <td>
564
- <input type="text" name="image_browser_width" id="image_browser_width" value="<?php echo $option_row->image_browser_width; ?>" class="spider_int_input" /> px
565
  </td>
566
  </tr>
567
  <tr id="tr_image_browser_title_enable">
568
  <td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
569
  <td>
570
- <input type="radio" name="image_browser_title_enable" id="image_browser_title_yes" value="1" <?php echo ($option_row->image_browser_title_enable) ? 'checked' : ''; ?> /><label for="image_browser_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
571
- <input type="radio" name="image_browser_title_enable" id="image_browser_title_no" value="0" <?php echo ($option_row->image_browser_title_enable) ? '' : 'checked'; ?> /><label for="image_browser_title_no"><?php _e('No', 'bwg_back'); ?></label>
572
  </td>
573
  </tr>
574
  <tr id="tr_image_browser_description_enable">
575
  <td class="spider_label"><label><?php _e("Enable image description:", 'bwg_back'); ?> </label></td>
576
  <td>
577
- <input type="radio" name="image_browser_description_enable" id="image_browser_description_yes" value="1" <?php echo ($option_row->image_browser_description_enable) ? 'checked' : ''; ?> /><label for="image_browser_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
578
- <input type="radio" name="image_browser_description_enable" id="image_browser_description_no" value="0" <?php echo ($option_row->image_browser_description_enable) ? '' : 'checked'; ?> /><label for="image_browser_description_no"><?php _e('No', 'bwg_back'); ?></label>
579
  </td>
580
  </tr>
581
 
@@ -583,32 +583,32 @@ class BWGViewBWGShortcode {
583
  <tr id="tr_blog_style_width_height">
584
  <td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_width"><?php _e("Image width:", 'bwg_back'); ?> </label></td>
585
  <td>
586
- <input type="text" name="blog_style_width" id="blog_style_width" value="<?php echo $option_row->blog_style_width; ?>" class="spider_int_input" /> px
587
  </td>
588
  </tr>
589
  <tr id="tr_blog_style_title_enable">
590
  <td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
591
  <td>
592
- <input type="radio" name="blog_style_title_enable" id="blog_style_title_yes" value="1" <?php echo ($option_row->blog_style_title_enable) ? 'checked' : ''; ?> /><label for="blog_style_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
593
- <input type="radio" name="blog_style_title_enable" id="blog_style_title_no" value="0" <?php echo ($option_row->blog_style_title_enable) ? '' : 'checked'; ?> /><label for="blog_style_title_no"><?php _e('No', 'bwg_back'); ?></label>
594
  </td>
595
  </tr>
596
  <tr id="tr_blog_style_images_per_page">
597
  <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
598
- <td><input type="text" name="blog_style_images_per_page" id="blog_style_images_per_page" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
599
  </tr>
600
  <tr id="tr_blog_style_enable_page">
601
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
602
  <td>
603
- <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' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
604
- <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' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_no"><?php _e('No', 'bwg_back'); ?></label>
605
- <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' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_loadmore">Load more</label>
606
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($option_row->blog_style_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
607
  </td>
608
  </tr>
609
  <tr id="tr_blog_style_load_more_image_count">
610
  <td class="spider_label"><label for="blog_style_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
611
- <td><input type="text" name="blog_style_load_more_image_count" id="blog_style_load_more_image_count" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
612
  </tr>
613
 
614
  <!--Slideshow view-->
@@ -619,7 +619,7 @@ class BWGViewBWGShortcode {
619
  <?php
620
  foreach ($effects as $key => $effect) {
621
  ?>
622
- <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="' . __("This effect is disabled in free version.","bwg_back") . '"' : ''; ?> <?php echo ($option_row->slideshow_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
623
  <?php
624
  }
625
  ?>
@@ -628,50 +628,50 @@ class BWGViewBWGShortcode {
628
  </tr>
629
  <tr id="tr_slideshow_effect_duration">
630
  <td title="<?php echo __("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label></td>
631
- <td><input type="text" name="slideshow_effect_duration" id="slideshow_effect_duration" value="<?php echo $option_row->slideshow_effect_duration; ?>" class="spider_int_input" /> sec.</td>
632
  </tr>
633
  <tr id="tr_slideshow_interval">
634
  <td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
635
- <td><input type="text" name="slideshow_interval" id="slideshow_interval" value="<?php echo $option_row->slideshow_interval; ?>" class="spider_int_input" /> sec.</td>
636
  </tr>
637
  <tr id="tr_slideshow_width_height">
638
  <td title="<?php _e("Maximum values for slideshow width and height.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_width"><?php _e("Slideshow dimensions:", 'bwg_back'); ?> </label></td>
639
  <td>
640
- <input type="text" name="slideshow_width" id="slideshow_width" value="<?php echo $option_row->slideshow_width; ?>" class="spider_int_input" /> x
641
- <input type="text" name="slideshow_height" id="slideshow_height" value="<?php echo $option_row->slideshow_height; ?>" class="spider_int_input" /> px
642
  </td>
643
  </tr>
644
  <tr id="tr_enable_slideshow_autoplay">
645
  <td class="spider_label"><label><?php _e("Enable Autoplay:", 'bwg_back'); ?> </label></td>
646
  <td>
647
- <input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_yes" value="1" <?php echo ($option_row->slideshow_enable_autoplay) ? 'checked' : ''; ?> /><label for="slideshow_autoplay_yes"><?php _e('Yes', 'bwg_back'); ?></label>
648
- <input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_no" value="0" <?php echo ($option_row->slideshow_enable_autoplay) ? '' : 'checked'; ?> /><label for="slideshow_autoplay_no"><?php _e('No', 'bwg_back'); ?></label>
649
  </td>
650
  </tr>
651
  <tr id="tr_enable_slideshow_shuffle">
652
  <td class="spider_label"><label><?php _e("Enable Shuffle:", 'bwg_back'); ?> </label></td>
653
  <td>
654
- <input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_yes" value="1" <?php echo ($option_row->slideshow_enable_shuffle) ? 'checked' : ''; ?> /><label for="slideshow_shuffle_yes"><?php _e('Yes', 'bwg_back'); ?></label>
655
- <input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_no" value="0" <?php echo ($option_row->slideshow_enable_shuffle) ? '' : 'checked'; ?> /><label for="slideshow_shuffle_no"><?php _e('No', 'bwg_back'); ?></label>
656
  </td>
657
  </tr>
658
  <tr id="tr_enable_slideshow_ctrl">
659
  <td class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
660
  <td>
661
- <input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_yes" value="1" <?php echo ($option_row->slideshow_enable_ctrl) ? 'checked' : ''; ?> /><label for="slideshow_ctrl_yes"><?php _e('Yes', 'bwg_back'); ?></label>
662
- <input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_no" value="0" <?php echo ($option_row->slideshow_enable_ctrl) ? '' : 'checked'; ?> /><label for="slideshow_ctrl_no"><?php _e('No', 'bwg_back'); ?></label>
663
  </td>
664
  </tr>
665
  <tr id="tr_enable_slideshow_filmstrip">
666
  <td title="<?php _e("Enable slideshow filmstrip view", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable slideshow filmstrip:", 'bwg_back'); ?> </label></td>
667
  <td>
668
- <input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes')" <?php echo ($option_row->slideshow_enable_filmstrip) ? 'checked' : ''; ?> /><label for="slideshow_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
669
- <input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_no')" <?php echo ($option_row->slideshow_enable_filmstrip) ? '' : 'checked'; ?> /><label for="slideshow_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
670
  </td>
671
  </tr>
672
  <tr id="tr_slideshow_filmstrip_height">
673
  <td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
674
- <td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $option_row->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
675
  </tr>
676
  </tbody>
677
  </table>
@@ -683,8 +683,8 @@ class BWGViewBWGShortcode {
683
  <tr id="tr_slideshow_enable_title">
684
  <td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
685
  <td>
686
- <input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($option_row->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
687
- <input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($option_row->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no"><?php _e('No', 'bwg_back'); ?></label>
688
  </td>
689
  </tr>
690
  <tr id="tr_slideshow_title_position">
@@ -693,19 +693,19 @@ class BWGViewBWGShortcode {
693
  <table class="bws_position_table">
694
  <tbody>
695
  <tr>
696
- <td><input type="radio" value="top-left" id="slideshow_title_top-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-left') ? 'checked' : ''; ?>></td>
697
- <td><input type="radio" value="top-center" id="slideshow_title_top-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-center') ? 'checked' : ''; ?>></td>
698
- <td><input type="radio" value="top-right" id="slideshow_title_top-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-right') ? 'checked' : ''; ?>></td>
699
  </tr>
700
  <tr>
701
- <td><input type="radio" value="middle-left" id="slideshow_title_middle-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-left') ? 'checked' : ''; ?>></td>
702
- <td><input type="radio" value="middle-center" id="slideshow_title_middle-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-center') ? 'checked' : ''; ?>></td>
703
- <td><input type="radio" value="middle-right" id="slideshow_title_middle-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-right') ? 'checked' : ''; ?>></td>
704
  </tr>
705
  <tr>
706
- <td><input type="radio" value="bottom-left" id="slideshow_title_bottom-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-left') ? 'checked' : ''; ?>></td>
707
- <td><input type="radio" value="bottom-center" id="slideshow_title_bottom-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-center') ? 'checked' : ''; ?>></td>
708
- <td><input type="radio" value="bottom-right" id="slideshow_title_bottom-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-right') ? 'checked' : ''; ?>></td>
709
  </tr>
710
  </tbody>
711
  </table>
@@ -716,15 +716,15 @@ class BWGViewBWGShortcode {
716
  <label><?php _e("Full width title:", 'bwg_back'); ?></label>
717
  </td>
718
  <td>
719
- <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_1" value="1" <?php if ($option_row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
720
- <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_0" value="0" <?php if (!$option_row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
721
  </td>
722
  </tr>
723
  <tr id="tr_slideshow_enable_description">
724
  <td class="spider_label"><label><?php _e("Enable Image Description:", 'bwg_back'); ?> </label></td>
725
  <td>
726
- <input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($option_row->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes')" /><label for="slideshow_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
727
- <input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($option_row->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no"><?php _e('No', 'bwg_back'); ?></label>
728
  </td>
729
  </tr>
730
  <tr id="tr_slideshow_description_position">
@@ -733,19 +733,19 @@ class BWGViewBWGShortcode {
733
  <table class="bws_position_table">
734
  <tbody>
735
  <tr>
736
- <td><input type="radio" value="top-left" id="slideshow_description_top-left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-left') ? 'checked' : ''; ?>></td>
737
- <td><input type="radio" value="top-center" id="slideshow_description_top-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-center') ? 'checked' : ''; ?>></td>
738
- <td><input type="radio" value="top-right" id="slideshow_description_top-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-right') ? 'checked' : ''; ?>></td>
739
  </tr>
740
  <tr>
741
- <td><input type="radio" value="middle-left" id="slideshow_description_middle-left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-left') ? 'checked' : ''; ?>></td>
742
- <td><input type="radio" value="middle-center" id="slideshow_description_middle-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-center') ? 'checked' : ''; ?>></td>
743
- <td><input type="radio" value="middle-right" id="slideshow_description_middle-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-right') ? 'checked' : ''; ?>></td>
744
  </tr>
745
  <tr>
746
- <td><input type="radio" value="bottom-left" id="slideshow_description_bottm-Left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-left') ? 'checked' : ''; ?>></td>
747
- <td><input type="radio" value="bottom-center" id="slideshow_description_bottom-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-center') ? 'checked' : ''; ?>></td>
748
- <td><input type="radio" value="bottom-right" id="slideshow_description_bottm-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-right') ? 'checked' : ''; ?>></td>
749
  </tr>
750
  </tbody>
751
  </table>
@@ -754,8 +754,8 @@ class BWGViewBWGShortcode {
754
  <tr id="tr_enable_slideshow_music">
755
  <td class="spider_label"><label><?php _e("Enable Slideshow Music:", 'bwg_back'); ?> </label></td>
756
  <td>
757
- <input type="radio" name="enable_slideshow_music" id="slideshow_music_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes')" <?php echo ($option_row->slideshow_enable_music) ? 'checked' : ''; ?> /><label for="slideshow_music_yes"><?php _e('Yes', 'bwg_back'); ?></label>
758
- <input type="radio" name="enable_slideshow_music" id="slideshow_music_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_music_url', 'slideshow_music_no')" <?php echo ($option_row->slideshow_enable_music) ? '' : 'checked'; ?> /><label for="slideshow_music_no"><?php _e('No', 'bwg_back'); ?></label>
759
  </td>
760
  </tr>
761
  <tr id="tr_slideshow_music_url">
@@ -763,7 +763,7 @@ class BWGViewBWGShortcode {
763
  <label for="slideshow_music_url"><?php _e("Music url:", 'bwg_back'); ?> </label>
764
  </td>
765
  <td>
766
- <input type="text" id="slideshow_music_url" name="slideshow_music_url" value="<?php echo $option_row->slideshow_audio_url; ?>" style="display:inline-block;" />
767
  </td>
768
  </tr>
769
  </tbody>
@@ -773,16 +773,16 @@ class BWGViewBWGShortcode {
773
  <tr id="tr_thumb_click_action">
774
  <td class="spider_label"><label><?php _e("Thumb click action:", 'bwg_back'); ?> </label></td>
775
  <td>
776
- <input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($option_row->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
777
- <input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($option_row->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
778
- <input type="radio" name="thumb_click_action" id="thumb_click_action_3" value="do_nothing" <?php if ($option_row->thumb_click_action == 'do_nothing') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_3"><?php _e("Do Nothing", 'bwg_back'); ?></label>
779
  </td>
780
  </tr>
781
  <tr id="tr_thumb_link_target">
782
  <td title="<?php _e("Open new window when redirecting.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Open in new window:", 'bwg_back'); ?> </label></td>
783
  <td>
784
- <input type="radio" name="thumb_link_target" id="thumb_link_target_yes" value="1" <?php if ($option_row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_yes"><?php _e('Yes', 'bwg_back'); ?></label>
785
- <input type="radio" name="thumb_link_target" id="thumb_link_target_no" value="0" <?php if (!$option_row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_no"><?php _e('No', 'bwg_back'); ?></label>
786
  </td>
787
  </tr>
788
  </tbody>
@@ -792,15 +792,15 @@ class BWGViewBWGShortcode {
792
  <label><?php _e("Full width lightbox:", 'bwg_back'); ?></label>
793
  </td>
794
  <td>
795
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1"><?php _e('Yes', 'bwg_back'); ?></label>
796
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0"><?php _e('No', 'bwg_back'); ?></label>
797
  </td>
798
  </tr>
799
  <tr id="tr_popup_width_height">
800
  <td title="<?php _e("Maximum values for lightbox width and height.", 'bwg_back'); ?>" class="spider_label"><label for="popup_width"><?php _e("Lightbox dimensions:", 'bwg_back'); ?> </label></td>
801
  <td>
802
- <input type="text" name="popup_width" id="popup_width" value="<?php echo $option_row->popup_width; ?>" class="spider_int_input" /> x
803
- <input type="text" name="popup_height" id="popup_height" value="<?php echo $option_row->popup_height; ?>" class="spider_int_input" /> px
804
  </td>
805
  </tr>
806
  <tr id="tr_popup_effect">
@@ -810,7 +810,7 @@ class BWGViewBWGShortcode {
810
  <?php
811
  foreach ($effects as $key => $effect) {
812
  ?>
813
- <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="This effect is disabled in free version."' : ''; ?> <?php echo ($option_row->popup_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
814
  <?php
815
  }
816
  ?>
@@ -819,44 +819,44 @@ class BWGViewBWGShortcode {
819
  </tr>
820
  <tr id="tr_popup_effect_duration">
821
  <td title="<?php echo __("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label></td>
822
- <td><input type="text" name="popup_effect_duration" id="popup_effect_duration" value="<?php echo $option_row->popup_effect_duration; ?>" class="spider_int_input" /> sec.</td>
823
  </tr>
824
  <tr id="tr_popup_autoplay">
825
  <td class="spider_label">
826
  <label><?php _e("Lightbox autoplay:", 'bwg_back'); ?> </label>
827
  </td>
828
  <td>
829
- <input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($option_row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1"><?php _e('Yes', 'bwg_back'); ?></label>
830
- <input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$option_row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0"><?php _e('No', 'bwg_back'); ?></label>
831
  </td>
832
  </tr>
833
  <tr id="tr_popup_interval">
834
  <td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
835
- <td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $option_row->popup_interval; ?>" class="spider_int_input" /> sec.</td>
836
  </tr>
837
  <tr id="tr_popup_enable_filmstrip">
838
  <td title="<?php _e("Enable filmstrip view for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable filmstrip in lightbox:", 'bwg_back'); ?> </label></td>
839
  <td>
840
- <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes')" <?php echo ($option_row->popup_enable_filmstrip) ? 'checked' : ''; ?> /><label for="popup_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
841
- <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_popup_filmstrip_height', 'popup_filmstrip_no')" <?php echo ($option_row->popup_enable_filmstrip) ? '' : 'checked'; ?> /><label for="popup_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
842
  </td>
843
  </tr>
844
  <tr id="tr_popup_filmstrip_height">
845
  <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="popup_filmstrip_height"><?php _e("Filmstrip size:", 'bwg_back'); ?> </label></td>
846
- <td class="spider_free_version_label"><input disabled="disabled" type="text" name="popup_filmstrip_height" id="popup_filmstrip_height" value="<?php echo $option_row->popup_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
847
  </tr>
848
  <tr id="tr_popup_hit_counter">
849
  <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Display hit counter:", 'bwg_back'); ?> </label></td>
850
  <td>
851
- <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_yes" value="1" <?php echo ($option_row->popup_hit_counter) ? 'checked' : ''; ?> /><label for="popup_hit_counter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
852
- <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_no" value="0" <?php echo ($option_row->popup_hit_counter) ? '' : 'checked'; ?> /><label for="popup_hit_counter_no"><?php _e('No', 'bwg_back'); ?></label>
853
  </td>
854
  </tr>
855
  <tr id="tr_popup_enable_ctrl_btn">
856
  <td title="<?php _e("Enable control buttons in lightbox", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
857
  <td>
858
- <input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_yes" value="1" onClick="bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');" <?php echo ($option_row->popup_enable_ctrl_btn) ? 'checked' : ''; ?> /><label for="popup_ctrl_btn_yes"><?php _e('Yes', 'bwg_back'); ?></label>
859
- <input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_no" value="0" onClick="bwg_enable_disable('none', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_no');" <?php echo ($option_row->popup_enable_ctrl_btn) ? '' : 'checked'; ?> /><label for="popup_ctrl_btn_no"><?php _e('No', 'bwg_back'); ?></label>
860
  </td>
861
  </tr>
862
  </tbody>
@@ -864,78 +864,78 @@ class BWGViewBWGShortcode {
864
  <tr id="tr_popup_enable_fullscreen">
865
  <td title="<?php _e("Enable fullscreen view for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable fullscreen:", 'bwg_back'); ?> </label></td>
866
  <td>
867
- <input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_yes" value="1" <?php echo ($option_row->popup_enable_fullscreen) ? 'checked' : ''; ?> /><label for="popup_fullscreen_yes"><?php _e('Yes', 'bwg_back'); ?></label>
868
- <input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_no" value="0" <?php echo ($option_row->popup_enable_fullscreen) ? '' : 'checked'; ?> /><label for="popup_fullscreen_no"><?php _e('No', 'bwg_back'); ?></label>
869
  </td>
870
  </tr>
871
  <tr id="tr_popup_enable_info">
872
  <td title="<?php _e("Enable title, description for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable info:", 'bwg_back'); ?> </label></td>
873
  <td>
874
- <input type="radio" name="popup_enable_info" id="popup_info_yes" value="1" <?php echo ($option_row->popup_enable_info) ? 'checked="checked"' : ''; ?> /><label for="popup_info_yes"><?php _e('Yes', 'bwg_back'); ?></label>
875
- <input type="radio" name="popup_enable_info" id="popup_info_no" value="0" <?php echo ($option_row->popup_enable_info) ? '' : 'checked="checked"'; ?> /><label for="popup_info_no"><?php _e('No', 'bwg_back'); ?></label>
876
  </td>
877
  </tr>
878
  <tr id="tr_popup_info_always_show">
879
  <td class="spider_label"><label><?php _e("Display info by default:", 'bwg_back'); ?> </label></td>
880
  <td>
881
- <input type="radio" name="popup_info_always_show" id="popup_info_always_show_yes" value="1" <?php echo ($option_row->popup_info_always_show) ? 'checked="checked"' : ''; ?> /><label for="popup_info_always_show_yes"><?php _e('Yes', 'bwg_back'); ?></label>
882
- <input type="radio" name="popup_info_always_show" id="popup_info_always_show_no" value="0" <?php echo ($option_row->popup_info_always_show) ? '' : 'checked="checked"'; ?> /><label for="popup_info_always_show_no"><?php _e('No', 'bwg_back'); ?></label>
883
  </td>
884
  </tr>
885
  <tr id="tr_popup_info_full_width">
886
  <td title="<?php _e("Display image information based on the lightbox dimensions.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Full width info:", 'bwg_back'); ?></label></td>
887
  <td>
888
- <input type="radio" name="popup_info_full_width" id="popup_info_full_width_1" value="1" <?php if ($option_row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
889
- <input type="radio" name="popup_info_full_width" id="popup_info_full_width_0" value="0" <?php if (!$option_row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
890
  </td>
891
  </tr>
892
  <tr id="tr_popup_enable_rate">
893
  <td title="<?php _e("Enable rating for images", 'bwg_back'); ?><br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label><?php _e("Enable rating:", 'bwg_back'); ?> </label></td>
894
  <td>
895
- <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_yes" value="1" <?php echo ($option_row->popup_enable_rate) ? 'checked="checked"' : ''; ?> /><label for="popup_rate_yes"><?php _e('Yes', 'bwg_back'); ?></label>
896
- <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_no" value="0" <?php echo ($option_row->popup_enable_rate) ? '' : 'checked="checked"'; ?> /><label for="popup_rate_no"><?php _e('No', 'bwg_back'); ?></label>
897
  </td>
898
  </tr>
899
  <tr id="tr_popup_enable_comment">
900
  <td title="<?php _e("Enable comments for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable comments:", 'bwg_back'); ?> </label></td>
901
  <td>
902
- <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_yes" value="1" <?php echo ($option_row->popup_enable_comment) ? 'checked' : ''; ?> /><label for="popup_comment_yes"><?php _e('Yes', 'bwg_back'); ?></label>
903
- <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_no" value="0" <?php echo ($option_row->popup_enable_comment) ? '' : 'checked'; ?> /><label for="popup_comment_no"><?php _e('No', 'bwg_back'); ?></label>
904
  </td>
905
  </tr>
906
  <tr id="tr_popup_enable_facebook">
907
  <td title="<?php _e("Enable Facebook share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Facebook button:", 'bwg_back'); ?> </label></td>
908
  <td>
909
- <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_yes" value="1" <?php echo ($option_row->popup_enable_facebook) ? 'checked' : ''; ?> /><label for="popup_facebook_yes"><?php _e('Yes', 'bwg_back'); ?></label>
910
- <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_no" value="0" <?php echo ($option_row->popup_enable_facebook) ? '' : 'checked'; ?> /><label for="popup_facebook_no"><?php _e('No', 'bwg_back'); ?></label>
911
  </td>
912
  </tr>
913
  <tr id="tr_popup_enable_twitter">
914
  <td title="<?php _e("Enable Twitter share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Twitter button:", 'bwg_back'); ?> </label></td>
915
  <td>
916
- <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_yes" value="1" <?php echo ($option_row->popup_enable_twitter) ? 'checked' : ''; ?> /><label for="popup_twitter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
917
- <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_no" value="0" <?php echo ($option_row->popup_enable_twitter) ? '' : 'checked'; ?> /><label for="popup_twitter_no"><?php _e('No', 'bwg_back'); ?></label>
918
  </td>
919
  </tr>
920
  <tr id="tr_popup_enable_google">
921
  <td title="<?php _e("Enable Google+ share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Google+ button:", 'bwg_back'); ?> </label></td>
922
  <td>
923
- <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_yes" value="1" <?php echo ($option_row->popup_enable_google) ? 'checked' : ''; ?> /><label for="popup_google_yes"><?php _e('Yes', 'bwg_back'); ?></label>
924
- <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_no" value="0" <?php echo ($option_row->popup_enable_google) ? '' : 'checked'; ?> /><label for="popup_google_no"><?php _e('No', 'bwg_back'); ?></label>
925
  </td>
926
  </tr>
927
  <tr id="tr_popup_enable_pinterest">
928
  <td title="<?php _e("Enable Pinterest share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Pinterest button:", 'bwg_back'); ?> </label></td>
929
  <td>
930
- <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_yes" value="1" <?php echo ($option_row->popup_enable_pinterest) ? 'checked' : ''; ?> /><label for="popup_pinterest_yes"><?php _e('Yes', 'bwg_back'); ?></label>
931
- <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_no" value="0" <?php echo ($option_row->popup_enable_pinterest) ? '' : 'checked'; ?> /><label for="popup_pinterest_no"><?php _e('No', 'bwg_back'); ?></label>
932
  </td>
933
  </tr>
934
  <tr id="tr_popup_enable_tumblr">
935
  <td title="<?php _e("Enable Tumblr share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Tumblr button:", 'bwg_back'); ?> </label></td>
936
  <td>
937
- <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_yes" value="1" <?php echo ($option_row->popup_enable_tumblr) ? 'checked' : ''; ?> /><label for="popup_tumblr_yes"><?php _e('Yes', 'bwg_back'); ?></label>
938
- <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_no" value="0" <?php echo ($option_row->popup_enable_tumblr) ? '' : 'checked'; ?> /><label for="popup_tumblr_no"><?php _e('No', 'bwg_back'); ?></label>
939
  </td>
940
  </tr>
941
  </tbody>
@@ -947,9 +947,9 @@ class BWGViewBWGShortcode {
947
  <tr id="tr_watermark_type">
948
  <td class="spider_label"><label><?php _e("Advertisement Type:", 'bwg_back'); ?> </label></td>
949
  <td>
950
- <input type="radio" name="watermark_type" id="watermark_type_none" value="none" onClick="bwg_watermark('watermark_type_none')" <?php echo ($option_row->watermark_type == 'none') ? 'checked' : ''; ?> /><label for="watermark_type_none"><?php _e("None", 'bwg_back'); ?></label>
951
- <input type="radio" name="watermark_type" id="watermark_type_text" value="text" onClick="bwg_watermark('watermark_type_text')" <?php echo ($option_row->watermark_type == 'text') ? 'checked' : ''; ?> /><label for="watermark_type_text"><?php _e("Text", 'bwg_back'); ?></label>
952
- <input type="radio" name="watermark_type" id="watermark_type_image" value="image" onClick="bwg_watermark('watermark_type_image')" <?php echo ($option_row->watermark_type == 'image') ? 'checked' : ''; ?> /><label for="watermark_type_image"><?php _e("Image", 'bwg_back'); ?></label>
953
  </td>
954
  </tr>
955
  <tr id="tr_watermark_link">
@@ -957,7 +957,7 @@ class BWGViewBWGShortcode {
957
  <label for="watermark_link"><?php _e("Advertisement link:", 'bwg_back'); ?> </label>
958
  </td>
959
  <td>
960
- <input type="text" id="watermark_link" name="watermark_link" value="<?php echo $option_row->watermark_link; ?>" style="display:inline-block;" />
961
  </td>
962
  </tr>
963
  <tr id="tr_watermark_url">
@@ -965,26 +965,26 @@ class BWGViewBWGShortcode {
965
  <label for="watermark_url"><?php _e("Advertisement url:", 'bwg_back'); ?> </label>
966
  </td>
967
  <td>
968
- <input type="text" id="watermark_url" name="watermark_url" value="<?php echo $option_row->watermark_url; ?>" style="display:inline-block;" />
969
  </td>
970
  </tr>
971
  <tr id="tr_watermark_width_height">
972
  <td title="<?php _e("Maximum values for watermark image width and height.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_width"><?php _e("Advertisement dimensions:", 'bwg_back'); ?> </label></td>
973
  <td>
974
- <input type="text" name="watermark_width" id="watermark_width" value="<?php echo $option_row->watermark_width; ?>" class="spider_int_input" /> x
975
- <input type="text" name="watermark_height" id="watermark_height" value="<?php echo $option_row->watermark_height; ?>" class="spider_int_input" /> px
976
  </td>
977
  </tr>
978
  <tr id="tr_watermark_text">
979
  <td class="spider_label"><label for="watermark_text"><?php _e("Advertisement text:", 'bwg_back'); ?> </label></td>
980
  <td>
981
- <input type="text" name="watermark_text" id="watermark_text" value="<?php echo $option_row->watermark_text; ?>" />
982
  </td>
983
  </tr>
984
  <tr id="tr_watermark_font_size">
985
  <td class="spider_label"><label for="watermark_font_size"><?php _e("Advertisement font size:", 'bwg_back'); ?> </label></td>
986
  <td>
987
- <input type="text" name="watermark_font_size" id="watermark_font_size" value="<?php echo $option_row->watermark_font_size; ?>" class="spider_int_input" /> px
988
  </td>
989
  </tr>
990
  <tr id="tr_watermark_font">
@@ -993,11 +993,11 @@ class BWGViewBWGShortcode {
993
  <select name="watermark_font" class="select_icon" id="watermark_font" style="width:150px;">
994
  <?php
995
  $google_fonts = WDWLibrary::get_google_fonts();
996
- $is_google_fonts = (in_array($option_row->watermark_font, $google_fonts)) ? true : false;
997
  $watermark_font_families = $is_google_fonts ? $google_fonts : $watermark_fonts;
998
  foreach ($watermark_font_families as $key => $watermark_font) {
999
  ?>
1000
- <option value="<?php echo $watermark_font; ?>" <?php echo ($option_row->watermark_font == $watermark_font) ? 'selected="selected"' : ''; ?>><?php echo $watermark_font; ?></option>
1001
  <?php
1002
  }
1003
  ?>
@@ -1011,13 +1011,13 @@ class BWGViewBWGShortcode {
1011
  <tr id="tr_watermark_color">
1012
  <td class="spider_label"><label for="watermark_color"><?php _e("Advertisement color:", 'bwg_back'); ?> </label></td>
1013
  <td>
1014
- <input type="text" name="watermark_color" id="watermark_color" value="<?php echo $option_row->watermark_color; ?>" class="color" />
1015
  </td>
1016
  </tr>
1017
  <tr id="tr_watermark_opacity">
1018
  <td title="<?php _e("Value must be between 0 to 100.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_opacity"><?php _e("Advertisement opacity:", 'bwg_back'); ?> </label></td>
1019
  <td>
1020
- <input type="text" name="watermark_opacity" id="watermark_opacity" value="<?php echo $option_row->watermark_opacity; ?>" class="spider_int_input" /> %
1021
  </td>
1022
  </tr>
1023
  <tr id="tr_watermark_position">
@@ -1026,19 +1026,19 @@ class BWGViewBWGShortcode {
1026
  <table class="bws_position_table">
1027
  <tbody>
1028
  <tr>
1029
- <td><input type="radio" value="top-left" id="watermark_top-left" name="watermark_position" <?php echo ($option_row->watermark_position == 'top-left') ? 'checked' : ''; ?>></td>
1030
- <td><input type="radio" value="top-center" id="watermark_top-center" name="watermark_position" <?php echo ($option_row->watermark_position == 'top-center') ? 'checked' : ''; ?>></td>
1031
- <td><input type="radio" value="top-right" id="watermark_top-right" name="watermark_position" <?php echo ($option_row->watermark_position == 'top-right') ? 'checked' : ''; ?>></td>
1032
  </tr>
1033
  <tr>
1034
- <td><input type="radio" value="middle-left" id="watermark_middle-left" name="watermark_position" <?php echo ($option_row->watermark_position == 'middle-left') ? 'checked' : ''; ?>></td>
1035
- <td><input type="radio" value="middle-center" id="watermark_middle-center" name="watermark_position" <?php echo ($option_row->watermark_position == 'middle-center') ? 'checked' : ''; ?>></td>
1036
- <td><input type="radio" value="middle-right" id="watermark_middle-right" name="watermark_position" <?php echo ($option_row->watermark_position == 'middle-right') ? 'checked' : ''; ?>></td>
1037
  </tr>
1038
  <tr>
1039
- <td><input type="radio" value="bottom-left" id="watermark_bottom-left" name="watermark_position" <?php echo ($option_row->watermark_position == 'bottom-left') ? 'checked' : ''; ?>></td>
1040
- <td><input type="radio" value="bottom-center" id="watermark_bottom-center" name="watermark_position" <?php echo ($option_row->watermark_position == 'bottom-center') ? 'checked' : ''; ?>></td>
1041
- <td><input type="radio" value="bottom-right" id="watermark_bottom-right" name="watermark_position" <?php echo ($option_row->watermark_position == 'bottom-right') ? 'checked' : ''; ?>></td>
1042
  </tr>
1043
  </tbody>
1044
  </table>
25
  public function display() {
26
  $gallery_rows = $this->model->get_gallery_rows_data();
27
  $album_rows = $this->model->get_album_rows_data();
28
+ global $wd_bwg_options;
29
  $theme_rows = $this->model->get_theme_rows_data();
30
  $from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
31
  $shortcodes = $this->model->get_shortcode_data();
181
  <td class="spider_label"><label for="gallery"><?php _e("Gallery:", 'bwg_back'); ?> </label></td>
182
  <td>
183
  <select name="gallery" class="select_icon" id="gallery" style="width:150px;">
184
+ <option value="0" selected="selected"><?php _e("All Galleries", 'bwg_back'); ?></option>
185
  <?php
186
  foreach ($gallery_rows as $gallery_row) {
187
  ?>
226
  <td class="spider_label"><label for="gallery"><?php echo __('Tag:', 'bwg_back'); ?> </label></td>
227
  <td>
228
  <select name="tag" id="tag" class="select_icon" style="width:150px;">
229
+ <option value="0" selected="selected"><?php echo __('All Tags', 'bwg_back'); ?></option>
230
  <?php
231
  foreach ($tag_rows as $tag_row) {
232
  ?>
247
  <tr id="tr_show_search_box">
248
  <td class="spider_label"><label><?php _e("Show search box:", 'bwg_back'); ?> </label></td>
249
  <td>
250
+ <input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($wd_bwg_options->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_1"><?php _e("Yes", 'bwg_back'); ?></label>
251
+ <input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$wd_bwg_options->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
252
  </td>
253
  </tr>
254
  <tr id="tr_search_box_width">
255
  <td class="spider_label"><label for="search_box_width"><?php _e("Search box width:", 'bwg_back'); ?> </label></td>
256
+ <td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $wd_bwg_options->search_box_width; ?>" class="spider_int_input" /> px</td>
257
  </tr>
258
  <tr id="tr_show_tag_box">
259
  <td class="spider_label"><label><?php _e("Show tag box:", 'bwg_back'); ?> </label></td>
260
  <td>
261
+ <input type="radio" name="show_tag_box" id="show_tag_box_1" value="1" <?php if ($wd_bwg_options->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_1"><?php _e('Yes', 'bwg_back'); ?></label>
262
+ <input type="radio" name="show_tag_box" id="show_tag_box_0" value="0" <?php if (!$wd_bwg_options->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
263
  </td>
264
  </tr>
265
  <tr id="tr_show_sort_images">
266
  <td class="spider_label"><label><?php _e("Show 'Order by' dropdown list:", 'bwg_back'); ?> </label></td>
267
  <td>
268
+ <input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($wd_bwg_options->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
269
+ <input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$wd_bwg_options->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0"><?php _e('No', 'bwg_back'); ?>;</label>
270
  </td>
271
  </tr>
272
  <!--Thumbnails, Masonry viewies-->
277
  bwg_change_label('thumb_width_height_label', 'Image thumbnail width: ');
278
  jQuery('#thumb_width').show();
279
  jQuery('#thumb_height').hide();
280
+ jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->masonry == 'vertical') ? 'checked' : ''; ?> /><label for="masonry_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
281
  <input type="radio" name="masonry_hor_ver" id="masonry_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns: ", 'bwg_back'); ?>');
282
  bwg_change_label('thumb_width_height_label', 'Image Thumbnail Height: ');
283
  jQuery('#thumb_width').hide();
284
  jQuery('#thumb_height').show();
285
+ jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->masonry == 'horizontal') ? 'checked' : ''; ?> /><label for="masonry_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
286
  </td>
287
  </tr>
288
  <!--Thumbnails, Mosaic viewies-->
293
  bwg_change_label('thumb_width_height_label', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
294
  jQuery('#thumb_width').show();
295
  jQuery('#thumb_height').hide();
296
+ jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
297
  <input type="radio" name="mosaic_hor_ver" id="mosaic_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
298
  bwg_change_label('thumb_width_height_label', '<?php _e("Image Thumbnail Height:", 'bwg_back'); ?> ');
299
  jQuery('#thumb_width').hide();
300
  jQuery('#thumb_height').show();
301
+ jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
302
 
303
 
304
  </td>
306
  <tr id="tr_resizable_mosaic">
307
  <td title="<?php _e('Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.', 'bwg_back'); ?>" class="spider_label"><label for="resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
308
  <td>
309
+ <input type="radio" name="resizable_mosaic" id="resizable_mosaic_1" value="1" <?php echo ($wd_bwg_options->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
310
+ <input type="radio" name="resizable_mosaic" id="resizable_mosaic_0" value="0" <?php echo ($wd_bwg_options->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
311
  <br />
312
  </td>
313
  </tr>
314
  <tr id="tr_mosaic_total_width">
315
  <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
316
+ <td><input type="text" name="mosaic_total_width" id="mosaic_total_width" value="<?php echo $wd_bwg_options->mosaic_total_width; ?>" class="spider_int_input" /> %</td>
317
  </tr>
318
  <!--Thumbnails, Masonry and Mosaic viewies-->
319
  <tr id="tr_image_column_number">
320
  <td class="spider_label"><label id="image_column_number_label" for="image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
321
+ <td><input type="text" name="image_column_number" id="image_column_number" value="<?php echo $wd_bwg_options->image_column_number; ?>" class="spider_int_input" /></td>
322
  </tr>
323
  <tr id="tr_images_per_page">
324
  <td title="<?php _e('If you want to display all images you should leave it blank or insert 0.', 'bwg_back'); ?>" class="spider_label"><label for="images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
325
+ <td><input type="text" name="images_per_page" id="images_per_page" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
326
  </tr>
327
  <tr id="tr_image_title_hover">
328
  <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
329
  <td>
330
+ <input type="radio" name="image_title" id="image_title_hover" value="hover" <?php echo ($wd_bwg_options->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
331
+ <input type="radio" name="image_title" id="image_title_show" value="show" <?php echo ($wd_bwg_options->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
332
+ <input type="radio" name="image_title" id="image_title_none" value="none" <?php echo ($wd_bwg_options->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
333
  </td>
334
  </tr>
335
  <tr id="tr_image_enable_page">
336
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
337
  <td>
338
+ <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_yes" value="1" <?php echo ($wd_bwg_options->image_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
339
+ <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_no" value="0" <?php echo ($wd_bwg_options->image_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_no"><?php _e('No', 'bwg_back'); ?></label>
340
+ <input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($wd_bwg_options->image_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
341
+ <input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($wd_bwg_options->image_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
342
  </td>
343
  </tr>
344
  <tr id="tr_load_more_image_count">
345
  <td class="spider_label"><label for="load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
346
+ <td><input type="text" name="load_more_image_count" id="load_more_image_count" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
347
  </tr>
348
  <tr id="tr_thumb_width_height">
349
  <td title="<?php _e('Maximum values for thumbnail dimension.', 'bwg_back'); ?>" class="spider_label"><label id="thumb_width_height_label" for="thumb_width"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
350
  <td>
351
+ <input type="text" name="thumb_width" id="thumb_width" value="<?php echo $wd_bwg_options->thumb_width; ?>" class="spider_int_input" /><span id="thumb_width_height_separator"> x </span>
352
+ <input type="text" name="thumb_height" id="thumb_height" value="<?php echo $wd_bwg_options->thumb_height; ?>" class="spider_int_input" /> px
353
  </td>
354
  </tr>
355
 
356
  <!--Compact Album view-->
357
  <tr id="tr_compuct_album_column_number">
358
  <td class="spider_label"><label for="compuct_album_column_number"><?php _e("Max. number of album columns:", 'bwg_back'); ?> </label></td>
359
+ <td><input type="text" name="compuct_album_column_number" id="compuct_album_column_number" value="<?php echo $wd_bwg_options->album_column_number; ?>" class="spider_int_input" /></td>
360
  </tr>
361
  <tr id="tr_compuct_albums_per_page">
362
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
363
+ <td><input type="text" name="compuct_albums_per_page" id="compuct_albums_per_page" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
364
  </tr>
365
  <tr id="tr_compuct_album_title_hover">
366
  <td class="spider_label"><label><?php _e("Album title:", 'bwg_back'); ?> </label></td>
367
  <td>
368
+ <input type="radio" name="compuct_album_title" id="compuct_album_title_hover" value="hover" <?php echo ($wd_bwg_options->album_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
369
+ <input type="radio" name="compuct_album_title" id="compuct_album_title_show" value="show" <?php echo ($wd_bwg_options->album_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
370
+ <input type="radio" name="compuct_album_title" id="compuct_album_title_none" value="none" <?php echo ($wd_bwg_options->album_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
371
  </td>
372
  </tr>
373
  <tr id="tr_compuct_album_thumb_width_height">
374
  <td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_thumb_width"><?php _e("Album Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
375
  <td>
376
+ <input type="text" name="compuct_album_thumb_width" id="compuct_album_thumb_width" value="<?php echo $wd_bwg_options->album_thumb_width; ?>" class="spider_int_input" /> x
377
+ <input type="text" name="compuct_album_thumb_height" id="compuct_album_thumb_height" value="<?php echo $wd_bwg_options->album_thumb_height; ?>" class="spider_int_input" /> px
378
  </td>
379
  </tr>
380
  <tr id="tr_compuct_album_view_type">
381
  <td title="<?php _e('The gallery images view type in the album.<br /><br />This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
382
  <td>
383
+ <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_1" value="thumbnail" <?php if ($wd_bwg_options->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
384
+ <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_0" value="masonry" <?php if ($wd_bwg_options->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
385
+ <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_2" value="mosaic" <?php if ($wd_bwg_options->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
386
  </td>
387
  </tr>
388
  <tr id="tr_compuct_album_mosaic_hor_ver">
392
  bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail width:", 'bwg_back'); ?> ');
393
  jQuery('#compuct_album_image_thumb_width').show();
394
  jQuery('#compuct_album_image_thumb_height').hide();
395
+ jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
396
  <input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
397
  bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail height:", 'bwg_back'); ?> ');
398
  jQuery('#compuct_album_image_thumb_width').hide();
399
  jQuery('#compuct_album_image_thumb_height').show();
400
+ jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
401
 
402
 
403
  </td>
405
  <tr id="tr_compuct_album_resizable_mosaic">
406
  <td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="compuct_album_resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
407
  <td>
408
+ <input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_1" value="1" <?php echo ($wd_bwg_options->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
409
+ <input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_0" value="0" <?php echo ($wd_bwg_options->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
410
  <br />
411
  </td>
412
  </tr>
413
  <tr id="tr_compuct_album_mosaic_total_width">
414
  <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
415
+ <td><input type="text" name="compuct_album_mosaic_total_width" id="compuct_album_mosaic_total_width" value="<?php echo $wd_bwg_options->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
416
  </tr>
417
  <tr id="tr_compuct_album_image_column_number">
418
  <td class="spider_label"><label for="compuct_album_image_column_number"><?php _e("Max. number of image columns: ", 'bwg_back'); ?></label></td>
419
+ <td><input type="text" name="compuct_album_image_column_number" id="compuct_album_image_column_number" value="<?php echo $wd_bwg_options->image_column_number; ?>" class="spider_int_input" /></td>
420
  </tr>
421
  <tr id="tr_compuct_album_images_per_page">
422
  <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
423
+ <td><input type="text" name="compuct_album_images_per_page" id="compuct_album_images_per_page" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
424
  </tr>
425
  <tr id="tr_compuct_album_image_title">
426
  <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
427
  <td>
428
+ <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_hover" value="hover" <?php echo ($wd_bwg_options->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
429
+ <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_show" value="show" <?php echo ($wd_bwg_options->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
430
+ <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_none" value="none" <?php echo ($wd_bwg_options->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
431
  </td>
432
  </tr>
433
  <tr id="tr_compuct_album_image_thumb_width_height">
434
  <td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_image_thumb_width" id="compuct_album_image_thumb_dimensions"><?php _e("Image thumbnail dimensions: ", 'bwg_back'); ?></label></td>
435
  <td>
436
+ <input type="text" name="compuct_album_image_thumb_width" id="compuct_album_image_thumb_width" value="<?php echo $wd_bwg_options->thumb_width; ?>" class="spider_int_input" /><span id="compuct_album_image_thumb_dimensions_x" > x </span>
437
+ <input type="text" name="compuct_album_image_thumb_height" id="compuct_album_image_thumb_height" value="<?php echo $wd_bwg_options->thumb_height; ?>" class="spider_int_input" /> px
438
  </td>
439
  </tr>
440
  <tr id="tr_compuct_album_enable_page">
441
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
442
  <td>
443
+ <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_yes" value="1" <?php echo ($wd_bwg_options->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="compuct_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
444
+ <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_no" value="0" <?php echo ($wd_bwg_options->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
445
+ <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($wd_bwg_options->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
446
+ <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($wd_bwg_options->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
447
  </td>
448
  </tr>
449
  <tr id="tr_compuct_albums_per_page_load_more">
450
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
451
+ <td><input type="text" name="compuct_albums_per_page_load_more" id="compuct_albums_per_page_load_more" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
452
  </tr>
453
  <tr id="tr_compuct_album_load_more_image_count">
454
  <td class="spider_label"><label for="compuct_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
455
+ <td><input type="text" name="compuct_album_load_more_image_count" id="compuct_album_load_more_image_count" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
456
  </tr>
457
 
458
  <!--Extended Album view-->
459
  <tr id="tr_extended_albums_per_page">
460
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
461
+ <td><input type="text" name="extended_albums_per_page" id="extended_albums_per_page" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
462
  </tr>
463
  <tr id="tr_extended_album_height">
464
  <td class="spider_label"><label for="extended_album_height"><?php _e("Album row height:", 'bwg_back'); ?> </label></td>
465
+ <td><input type="text" name="extended_album_height" id="extended_album_height" value="<?php echo $wd_bwg_options->extended_album_height; ?>" class="spider_int_input" /> px</td>
466
  </tr>
467
  <tr id="tr_extended_album_description_enable">
468
  <td title="<?php _e("If you disable description only the title of the album will be displayed.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable album description:", 'bwg_back'); ?> </label></td>
469
  <td>
470
+ <input type="radio" name="extended_album_description_enable" id="extended_album_description_yes" value="1" <?php echo ($wd_bwg_options->extended_album_description_enable) ? 'checked' : ''; ?> /><label for="extended_album_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
471
+ <input type="radio" name="extended_album_description_enable" id="extended_album_description_no" value="0" <?php echo ($wd_bwg_options->extended_album_description_enable) ? '' : 'checked'; ?> /><label for="extended_album_description_no"><?php _e('No', 'bwg_back'); ?></label>
472
  </td>
473
  </tr>
474
  <tr id="tr_extended_album_thumb_width_height">
475
  <td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_thumb_width"><?php _e("Album thumbnail dimensions:", 'bwg_back'); ?> </label></td>
476
  <td>
477
+ <input type="text" name="extended_album_thumb_width" id="extended_album_thumb_width" value="<?php echo $wd_bwg_options->album_thumb_width; ?>" class="spider_int_input" /> x
478
+ <input type="text" name="extended_album_thumb_height" id="extended_album_thumb_height" value="<?php echo $wd_bwg_options->album_thumb_height; ?>" class="spider_int_input" /> px
479
  </td>
480
  </tr>
481
  <tr id="tr_extended_album_view_type">
482
  <td title="<?php _e("The gallery images view type in the album.", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
483
  <td>
484
+ <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_1" value="thumbnail" <?php if ($wd_bwg_options->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
485
+ <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_0" value="masonry" <?php if ($wd_bwg_options->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
486
+ <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_2" value="mosaic" <?php if ($wd_bwg_options->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
487
  </td>
488
  </tr>
489
  <tr id="tr_extended_album_mosaic_hor_ver">
493
  bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
494
  jQuery('#extended_album_image_thumb_width').show();
495
  jQuery('#extended_album_image_thumb_height').hide();
496
+ jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
497
  <input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
498
  bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail height: ", 'bwg_back'); ?>');
499
  jQuery('#extended_album_image_thumb_width').hide();
500
  jQuery('#extended_album_image_thumb_height').show();
501
+ jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
502
 
503
 
504
  </td>
506
  <tr id="tr_extended_album_resizable_mosaic">
507
  <td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="extended_album_resizable_mosaic"><?php _e("Resizable mosaic:", 'bwg_back'); ?> </label></td>
508
  <td>
509
+ <input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_1" value="1" <?php echo ($wd_bwg_options->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
510
+ <input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_0" value="0" <?php echo ($wd_bwg_options->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
511
  <br />
512
  </td>
513
  </tr>
514
 
515
  <tr id="tr_extended_album_mosaic_total_width">
516
  <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
517
+ <td><input type="text" name="extended_album_mosaic_total_width" id="extended_album_mosaic_total_width" value="<?php echo $wd_bwg_options->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
518
  </tr>
519
  <tr id="tr_extended_album_image_column_number">
520
  <td class="spider_label"><label for="extended_album_image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
521
+ <td><input type="text" name="extended_album_image_column_number" id="extended_album_image_column_number" value="<?php echo $wd_bwg_options->image_column_number; ?>" class="spider_int_input" /></td>
522
  </tr>
523
  <tr id="tr_extended_album_images_per_page">
524
  <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
525
+ <td><input type="text" name="extended_album_images_per_page" id="extended_album_images_per_page" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
526
  </tr>
527
  <tr id="tr_extended_album_image_title">
528
  <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
529
  <td>
530
+ <input type="radio" name="extended_album_image_title" id="extended_album_image_title_hover" value="hover" <?php echo ($wd_bwg_options->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="extended_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
531
+ <input type="radio" name="extended_album_image_title" id="extended_album_image_title_show" value="show" <?php echo ($wd_bwg_options->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="extended_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
532
+ <input type="radio" name="extended_album_image_title" id="extended_album_image_title_none" value="none" <?php echo ($wd_bwg_options->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="extended_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
533
  </td>
534
  </tr>
535
  <tr id="tr_extended_album_image_thumb_width_height">
536
  <td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_image_thumb_width" id="extended_album_image_thumb_dimensions"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
537
  <td>
538
+ <input type="text" name="extended_album_image_thumb_width" id="extended_album_image_thumb_width" value="<?php echo $wd_bwg_options->thumb_width; ?>" class="spider_int_input" /><span id="extended_album_image_thumb_dimensions_x" > x </span>
539
+ <input type="text" name="extended_album_image_thumb_height" id="extended_album_image_thumb_height" value="<?php echo $wd_bwg_options->thumb_height; ?>" class="spider_int_input" /> px
540
  </td>
541
  </tr>
542
  <tr id="tr_extended_album_enable_page">
543
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
544
  <td>
545
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($wd_bwg_options->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
546
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($wd_bwg_options->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
547
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($wd_bwg_options->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
548
+ <input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($wd_bwg_options->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
549
  </td>
550
  </tr>
551
  <tr id="tr_extended_albums_per_page_load_more">
552
  <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
553
+ <td><input type="text" name="extended_albums_per_page_load_more" id="extended_albums_per_page_load_more" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
554
  </tr>
555
  <tr id="tr_extended_album_load_more_image_count">
556
  <td class="spider_label"><label for="extended_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
557
+ <td><input type="text" name="extended_album_load_more_image_count" id="extended_album_load_more_image_count" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
558
  </tr>
559
 
560
  <!--Image Browser view-->
561
  <tr id="tr_image_browser_width_height">
562
  <td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="image_browser_width"><?php _e("Image width: ", 'bwg_back'); ?></label></td>
563
  <td>
564
+ <input type="text" name="image_browser_width" id="image_browser_width" value="<?php echo $wd_bwg_options->image_browser_width; ?>" class="spider_int_input" /> px
565
  </td>
566
  </tr>
567
  <tr id="tr_image_browser_title_enable">
568
  <td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
569
  <td>
570
+ <input type="radio" name="image_browser_title_enable" id="image_browser_title_yes" value="1" <?php echo ($wd_bwg_options->image_browser_title_enable) ? 'checked' : ''; ?> /><label for="image_browser_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
571
+ <input type="radio" name="image_browser_title_enable" id="image_browser_title_no" value="0" <?php echo ($wd_bwg_options->image_browser_title_enable) ? '' : 'checked'; ?> /><label for="image_browser_title_no"><?php _e('No', 'bwg_back'); ?></label>
572
  </td>
573
  </tr>
574
  <tr id="tr_image_browser_description_enable">
575
  <td class="spider_label"><label><?php _e("Enable image description:", 'bwg_back'); ?> </label></td>
576
  <td>
577
+ <input type="radio" name="image_browser_description_enable" id="image_browser_description_yes" value="1" <?php echo ($wd_bwg_options->image_browser_description_enable) ? 'checked' : ''; ?> /><label for="image_browser_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
578
+ <input type="radio" name="image_browser_description_enable" id="image_browser_description_no" value="0" <?php echo ($wd_bwg_options->image_browser_description_enable) ? '' : 'checked'; ?> /><label for="image_browser_description_no"><?php _e('No', 'bwg_back'); ?></label>
579
  </td>
580
  </tr>
581
 
583
  <tr id="tr_blog_style_width_height">
584
  <td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_width"><?php _e("Image width:", 'bwg_back'); ?> </label></td>
585
  <td>
586
+ <input type="text" name="blog_style_width" id="blog_style_width" value="<?php echo $wd_bwg_options->blog_style_width; ?>" class="spider_int_input" /> px
587
  </td>
588
  </tr>
589
  <tr id="tr_blog_style_title_enable">
590
  <td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
591
  <td>
592
+ <input type="radio" name="blog_style_title_enable" id="blog_style_title_yes" value="1" <?php echo ($wd_bwg_options->blog_style_title_enable) ? 'checked' : ''; ?> /><label for="blog_style_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
593
+ <input type="radio" name="blog_style_title_enable" id="blog_style_title_no" value="0" <?php echo ($wd_bwg_options->blog_style_title_enable) ? '' : 'checked'; ?> /><label for="blog_style_title_no"><?php _e('No', 'bwg_back'); ?></label>
594
  </td>
595
  </tr>
596
  <tr id="tr_blog_style_images_per_page">
597
  <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
598
+ <td><input type="text" name="blog_style_images_per_page" id="blog_style_images_per_page" value="<?php echo $wd_bwg_options->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
599
  </tr>
600
  <tr id="tr_blog_style_enable_page">
601
  <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
602
  <td>
603
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($wd_bwg_options->blog_style_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
604
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($wd_bwg_options->blog_style_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_no"><?php _e('No', 'bwg_back'); ?></label>
605
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_loadmore" value="2" <?php echo ($wd_bwg_options->blog_style_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_loadmore">Load more</label>
606
+ <input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($wd_bwg_options->blog_style_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
607
  </td>
608
  </tr>
609
  <tr id="tr_blog_style_load_more_image_count">
610
  <td class="spider_label"><label for="blog_style_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
611
+ <td><input type="text" name="blog_style_load_more_image_count" id="blog_style_load_more_image_count" value="<?php echo $wd_bwg_options->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
612
  </tr>
613
 
614
  <!--Slideshow view-->
619
  <?php
620
  foreach ($effects as $key => $effect) {
621
  ?>
622
+ <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="' . __("This effect is disabled in free version.","bwg_back") . '"' : ''; ?> <?php echo ($wd_bwg_options->slideshow_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
623
  <?php
624
  }
625
  ?>
628
  </tr>
629
  <tr id="tr_slideshow_effect_duration">
630
  <td title="<?php echo __("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label></td>
631
+ <td><input type="text" name="slideshow_effect_duration" id="slideshow_effect_duration" value="<?php echo $wd_bwg_options->slideshow_effect_duration; ?>" class="spider_int_input" /> sec.</td>
632
  </tr>
633
  <tr id="tr_slideshow_interval">
634
  <td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
635
+ <td><input type="text" name="slideshow_interval" id="slideshow_interval" value="<?php echo $wd_bwg_options->slideshow_interval; ?>" class="spider_int_input" /> sec.</td>
636
  </tr>
637
  <tr id="tr_slideshow_width_height">
638
  <td title="<?php _e("Maximum values for slideshow width and height.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_width"><?php _e("Slideshow dimensions:", 'bwg_back'); ?> </label></td>
639
  <td>
640
+ <input type="text" name="slideshow_width" id="slideshow_width" value="<?php echo $wd_bwg_options->slideshow_width; ?>" class="spider_int_input" /> x
641
+ <input type="text" name="slideshow_height" id="slideshow_height" value="<?php echo $wd_bwg_options->slideshow_height; ?>" class="spider_int_input" /> px
642
  </td>
643
  </tr>
644
  <tr id="tr_enable_slideshow_autoplay">
645
  <td class="spider_label"><label><?php _e("Enable Autoplay:", 'bwg_back'); ?> </label></td>
646
  <td>
647
+ <input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_autoplay) ? 'checked' : ''; ?> /><label for="slideshow_autoplay_yes"><?php _e('Yes', 'bwg_back'); ?></label>
648
+ <input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_autoplay) ? '' : 'checked'; ?> /><label for="slideshow_autoplay_no"><?php _e('No', 'bwg_back'); ?></label>
649
  </td>
650
  </tr>
651
  <tr id="tr_enable_slideshow_shuffle">
652
  <td class="spider_label"><label><?php _e("Enable Shuffle:", 'bwg_back'); ?> </label></td>
653
  <td>
654
+ <input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_shuffle) ? 'checked' : ''; ?> /><label for="slideshow_shuffle_yes"><?php _e('Yes', 'bwg_back'); ?></label>
655
+ <input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_shuffle) ? '' : 'checked'; ?> /><label for="slideshow_shuffle_no"><?php _e('No', 'bwg_back'); ?></label>
656
  </td>
657
  </tr>
658
  <tr id="tr_enable_slideshow_ctrl">
659
  <td class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
660
  <td>
661
+ <input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_ctrl) ? 'checked' : ''; ?> /><label for="slideshow_ctrl_yes"><?php _e('Yes', 'bwg_back'); ?></label>
662
+ <input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_ctrl) ? '' : 'checked'; ?> /><label for="slideshow_ctrl_no"><?php _e('No', 'bwg_back'); ?></label>
663
  </td>
664
  </tr>
665
  <tr id="tr_enable_slideshow_filmstrip">
666
  <td title="<?php _e("Enable slideshow filmstrip view", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable slideshow filmstrip:", 'bwg_back'); ?> </label></td>
667
  <td>
668
+ <input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes')" <?php echo ($wd_bwg_options->slideshow_enable_filmstrip) ? 'checked' : ''; ?> /><label for="slideshow_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
669
+ <input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_no')" <?php echo ($wd_bwg_options->slideshow_enable_filmstrip) ? '' : 'checked'; ?> /><label for="slideshow_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
670
  </td>
671
  </tr>
672
  <tr id="tr_slideshow_filmstrip_height">
673
  <td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
674
+ <td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $wd_bwg_options->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
675
  </tr>
676
  </tbody>
677
  </table>
683
  <tr id="tr_slideshow_enable_title">
684
  <td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
685
  <td>
686
+ <input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
687
+ <input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no"><?php _e('No', 'bwg_back'); ?></label>
688
  </td>
689
  </tr>
690
  <tr id="tr_slideshow_title_position">
693
  <table class="bws_position_table">
694
  <tbody>
695
  <tr>
696
+ <td><input type="radio" value="top-left" id="slideshow_title_top-left" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'top-left') ? 'checked' : ''; ?>></td>
697
+ <td><input type="radio" value="top-center" id="slideshow_title_top-center" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'top-center') ? 'checked' : ''; ?>></td>
698
+ <td><input type="radio" value="top-right" id="slideshow_title_top-right" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'top-right') ? 'checked' : ''; ?>></td>
699
  </tr>
700
  <tr>
701
+ <td><input type="radio" value="middle-left" id="slideshow_title_middle-left" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'middle-left') ? 'checked' : ''; ?>></td>
702
+ <td><input type="radio" value="middle-center" id="slideshow_title_middle-center" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'middle-center') ? 'checked' : ''; ?>></td>
703
+ <td><input type="radio" value="middle-right" id="slideshow_title_middle-right" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'middle-right') ? 'checked' : ''; ?>></td>
704
  </tr>
705
  <tr>
706
+ <td><input type="radio" value="bottom-left" id="slideshow_title_bottom-left" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'bottom-left') ? 'checked' : ''; ?>></td>
707
+ <td><input type="radio" value="bottom-center" id="slideshow_title_bottom-center" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'bottom-center') ? 'checked' : ''; ?>></td>
708
+ <td><input type="radio" value="bottom-right" id="slideshow_title_bottom-right" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'bottom-right') ? 'checked' : ''; ?>></td>
709
  </tr>
710
  </tbody>
711
  </table>
716
  <label><?php _e("Full width title:", 'bwg_back'); ?></label>
717
  </td>
718
  <td>
719
+ <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_1" value="1" <?php if ($wd_bwg_options->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
720
+ <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_0" value="0" <?php if (!$wd_bwg_options->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
721
  </td>
722
  </tr>
723
  <tr id="tr_slideshow_enable_description">
724
  <td class="spider_label"><label><?php _e("Enable Image Description:", 'bwg_back'); ?> </label></td>
725
  <td>
726
+ <input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes')" /><label for="slideshow_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
727
+ <input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no"><?php _e('No', 'bwg_back'); ?></label>
728
  </td>
729
  </tr>
730
  <tr id="tr_slideshow_description_position">
733
  <table class="bws_position_table">
734
  <tbody>
735
  <tr>
736
+ <td><input type="radio" value="top-left" id="slideshow_description_top-left" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'top-left') ? 'checked' : ''; ?>></td>
737
+ <td><input type="radio" value="top-center" id="slideshow_description_top-center" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'top-center') ? 'checked' : ''; ?>></td>
738
+ <td><input type="radio" value="top-right" id="slideshow_description_top-right" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'top-right') ? 'checked' : ''; ?>></td>
739
  </tr>
740
  <tr>
741
+ <td><input type="radio" value="middle-left" id="slideshow_description_middle-left" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'middle-left') ? 'checked' : ''; ?>></td>
742
+ <td><input type="radio" value="middle-center" id="slideshow_description_middle-center" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'middle-center') ? 'checked' : ''; ?>></td>
743
+ <td><input type="radio" value="middle-right" id="slideshow_description_middle-right" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'middle-right') ? 'checked' : ''; ?>></td>
744
  </tr>
745
  <tr>
746
+ <td><input type="radio" value="bottom-left" id="slideshow_description_bottm-Left" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'bottom-left') ? 'checked' : ''; ?>></td>
747
+ <td><input type="radio" value="bottom-center" id="slideshow_description_bottom-center" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'bottom-center') ? 'checked' : ''; ?>></td>
748
+ <td><input type="radio" value="bottom-right" id="slideshow_description_bottm-right" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'bottom-right') ? 'checked' : ''; ?>></td>
749
  </tr>
750
  </tbody>
751
  </table>
754
  <tr id="tr_enable_slideshow_music">
755
  <td class="spider_label"><label><?php _e("Enable Slideshow Music:", 'bwg_back'); ?> </label></td>
756
  <td>
757
+ <input type="radio" name="enable_slideshow_music" id="slideshow_music_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes')" <?php echo ($wd_bwg_options->slideshow_enable_music) ? 'checked' : ''; ?> /><label for="slideshow_music_yes"><?php _e('Yes', 'bwg_back'); ?></label>
758
+ <input type="radio" name="enable_slideshow_music" id="slideshow_music_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_music_url', 'slideshow_music_no')" <?php echo ($wd_bwg_options->slideshow_enable_music) ? '' : 'checked'; ?> /><label for="slideshow_music_no"><?php _e('No', 'bwg_back'); ?></label>
759
  </td>
760
  </tr>
761
  <tr id="tr_slideshow_music_url">
763
  <label for="slideshow_music_url"><?php _e("Music url:", 'bwg_back'); ?> </label>
764
  </td>
765
  <td>
766
+ <input type="text" id="slideshow_music_url" name="slideshow_music_url" value="<?php echo $wd_bwg_options->slideshow_audio_url; ?>" style="display:inline-block;" />
767
  </td>
768
  </tr>
769
  </tbody>
773
  <tr id="tr_thumb_click_action">
774
  <td class="spider_label"><label><?php _e("Thumb click action:", 'bwg_back'); ?> </label></td>
775
  <td>
776
+ <input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($wd_bwg_options->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
777
+ <input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($wd_bwg_options->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
778
+ <input type="radio" name="thumb_click_action" id="thumb_click_action_3" value="do_nothing" <?php if ($wd_bwg_options->thumb_click_action == 'do_nothing') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_3"><?php _e("Do Nothing", 'bwg_back'); ?></label>
779
  </td>
780
  </tr>
781
  <tr id="tr_thumb_link_target">
782
  <td title="<?php _e("Open new window when redirecting.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Open in new window:", 'bwg_back'); ?> </label></td>
783
  <td>
784
+ <input type="radio" name="thumb_link_target" id="thumb_link_target_yes" value="1" <?php if ($wd_bwg_options->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_yes"><?php _e('Yes', 'bwg_back'); ?></label>
785
+ <input type="radio" name="thumb_link_target" id="thumb_link_target_no" value="0" <?php if (!$wd_bwg_options->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_no"><?php _e('No', 'bwg_back'); ?></label>
786
  </td>
787
  </tr>
788
  </tbody>
792
  <label><?php _e("Full width lightbox:", 'bwg_back'); ?></label>
793
  </td>
794
  <td>
795
+ <input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($wd_bwg_options->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1"><?php _e('Yes', 'bwg_back'); ?></label>
796
+ <input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$wd_bwg_options->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0"><?php _e('No', 'bwg_back'); ?></label>
797
  </td>
798
  </tr>
799
  <tr id="tr_popup_width_height">
800
  <td title="<?php _e("Maximum values for lightbox width and height.", 'bwg_back'); ?>" class="spider_label"><label for="popup_width"><?php _e("Lightbox dimensions:", 'bwg_back'); ?> </label></td>
801
  <td>
802
+ <input type="text" name="popup_width" id="popup_width" value="<?php echo $wd_bwg_options->popup_width; ?>" class="spider_int_input" /> x
803
+ <input type="text" name="popup_height" id="popup_height" value="<?php echo $wd_bwg_options->popup_height; ?>" class="spider_int_input" /> px
804
  </td>
805
  </tr>
806
  <tr id="tr_popup_effect">
810
  <?php
811
  foreach ($effects as $key => $effect) {
812
  ?>
813
+ <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="This effect is disabled in free version."' : ''; ?> <?php echo ($wd_bwg_options->popup_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
814
  <?php
815
  }
816
  ?>
819
  </tr>
820
  <tr id="tr_popup_effect_duration">
821
  <td title="<?php echo __("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label></td>
822
+ <td><input type="text" name="popup_effect_duration" id="popup_effect_duration" value="<?php echo $wd_bwg_options->popup_effect_duration; ?>" class="spider_int_input" /> sec.</td>
823
  </tr>
824
  <tr id="tr_popup_autoplay">
825
  <td class="spider_label">
826
  <label><?php _e("Lightbox autoplay:", 'bwg_back'); ?> </label>
827
  </td>
828
  <td>
829
+ <input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($wd_bwg_options->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1"><?php _e('Yes', 'bwg_back'); ?></label>
830
+ <input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$wd_bwg_options->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0"><?php _e('No', 'bwg_back'); ?></label>
831
  </td>
832
  </tr>
833
  <tr id="tr_popup_interval">
834
  <td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
835
+ <td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $wd_bwg_options->popup_interval; ?>" class="spider_int_input" /> sec.</td>
836
  </tr>
837
  <tr id="tr_popup_enable_filmstrip">
838
  <td title="<?php _e("Enable filmstrip view for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable filmstrip in lightbox:", 'bwg_back'); ?> </label></td>
839
  <td>
840
+ <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes')" <?php echo ($wd_bwg_options->popup_enable_filmstrip) ? 'checked' : ''; ?> /><label for="popup_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
841
+ <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_popup_filmstrip_height', 'popup_filmstrip_no')" <?php echo ($wd_bwg_options->popup_enable_filmstrip) ? '' : 'checked'; ?> /><label for="popup_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
842
  </td>
843
  </tr>
844
  <tr id="tr_popup_filmstrip_height">
845
  <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="popup_filmstrip_height"><?php _e("Filmstrip size:", 'bwg_back'); ?> </label></td>
846
+ <td class="spider_free_version_label"><input disabled="disabled" type="text" name="popup_filmstrip_height" id="popup_filmstrip_height" value="<?php echo $wd_bwg_options->popup_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
847
  </tr>
848
  <tr id="tr_popup_hit_counter">
849
  <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Display hit counter:", 'bwg_back'); ?> </label></td>
850
  <td>
851
+ <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_yes" value="1" <?php echo ($wd_bwg_options->popup_hit_counter) ? 'checked' : ''; ?> /><label for="popup_hit_counter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
852
+ <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_no" value="0" <?php echo ($wd_bwg_options->popup_hit_counter) ? '' : 'checked'; ?> /><label for="popup_hit_counter_no"><?php _e('No', 'bwg_back'); ?></label>
853
  </td>
854
  </tr>
855
  <tr id="tr_popup_enable_ctrl_btn">
856
  <td title="<?php _e("Enable control buttons in lightbox", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
857
  <td>
858
+ <input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_yes" value="1" onClick="bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');" <?php echo ($wd_bwg_options->popup_enable_ctrl_btn) ? 'checked' : ''; ?> /><label for="popup_ctrl_btn_yes"><?php _e('Yes', 'bwg_back'); ?></label>
859
+ <input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_no" value="0" onClick="bwg_enable_disable('none', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_no');" <?php echo ($wd_bwg_options->popup_enable_ctrl_btn) ? '' : 'checked'; ?> /><label for="popup_ctrl_btn_no"><?php _e('No', 'bwg_back'); ?></label>
860
  </td>
861
  </tr>
862
  </tbody>
864
  <tr id="tr_popup_enable_fullscreen">
865
  <td title="<?php _e("Enable fullscreen view for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable fullscreen:", 'bwg_back'); ?> </label></td>
866
  <td>
867
+ <input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_fullscreen) ? 'checked' : ''; ?> /><label for="popup_fullscreen_yes"><?php _e('Yes', 'bwg_back'); ?></label>
868
+ <input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_no" value="0" <?php echo ($wd_bwg_options->popup_enable_fullscreen) ? '' : 'checked'; ?> /><label for="popup_fullscreen_no"><?php _e('No', 'bwg_back'); ?></label>
869
  </td>
870
  </tr>
871
  <tr id="tr_popup_enable_info">
872
  <td title="<?php _e("Enable title, description for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable info:", 'bwg_back'); ?> </label></td>
873
  <td>
874
+ <input type="radio" name="popup_enable_info" id="popup_info_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_info) ? 'checked="checked"' : ''; ?> /><label for="popup_info_yes"><?php _e('Yes', 'bwg_back'); ?></label>
875
+ <input type="radio" name="popup_enable_info" id="popup_info_no" value="0" <?php echo ($wd_bwg_options->popup_enable_info) ? '' : 'checked="checked"'; ?> /><label for="popup_info_no"><?php _e('No', 'bwg_back'); ?></label>
876
  </td>
877
  </tr>
878
  <tr id="tr_popup_info_always_show">
879
  <td class="spider_label"><label><?php _e("Display info by default:", 'bwg_back'); ?> </label></td>
880
  <td>
881
+ <input type="radio" name="popup_info_always_show" id="popup_info_always_show_yes" value="1" <?php echo ($wd_bwg_options->popup_info_always_show) ? 'checked="checked"' : ''; ?> /><label for="popup_info_always_show_yes"><?php _e('Yes', 'bwg_back'); ?></label>
882
+ <input type="radio" name="popup_info_always_show" id="popup_info_always_show_no" value="0" <?php echo ($wd_bwg_options->popup_info_always_show) ? '' : 'checked="checked"'; ?> /><label for="popup_info_always_show_no"><?php _e('No', 'bwg_back'); ?></label>
883
  </td>
884
  </tr>
885
  <tr id="tr_popup_info_full_width">
886
  <td title="<?php _e("Display image information based on the lightbox dimensions.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Full width info:", 'bwg_back'); ?></label></td>
887
  <td>
888
+ <input type="radio" name="popup_info_full_width" id="popup_info_full_width_1" value="1" <?php if ($wd_bwg_options->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
889
+ <input type="radio" name="popup_info_full_width" id="popup_info_full_width_0" value="0" <?php if (!$wd_bwg_options->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
890
  </td>
891
  </tr>
892
  <tr id="tr_popup_enable_rate">
893
  <td title="<?php _e("Enable rating for images", 'bwg_back'); ?><br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label><?php _e("Enable rating:", 'bwg_back'); ?> </label></td>
894
  <td>
895
+ <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_rate) ? 'checked="checked"' : ''; ?> /><label for="popup_rate_yes"><?php _e('Yes', 'bwg_back'); ?></label>
896
+ <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_no" value="0" <?php echo ($wd_bwg_options->popup_enable_rate) ? '' : 'checked="checked"'; ?> /><label for="popup_rate_no"><?php _e('No', 'bwg_back'); ?></label>
897
  </td>
898
  </tr>
899
  <tr id="tr_popup_enable_comment">
900
  <td title="<?php _e("Enable comments for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable comments:", 'bwg_back'); ?> </label></td>
901
  <td>
902
+ <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_comment) ? 'checked' : ''; ?> /><label for="popup_comment_yes"><?php _e('Yes', 'bwg_back'); ?></label>
903
+ <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_no" value="0" <?php echo ($wd_bwg_options->popup_enable_comment) ? '' : 'checked'; ?> /><label for="popup_comment_no"><?php _e('No', 'bwg_back'); ?></label>
904
  </td>
905
  </tr>
906
  <tr id="tr_popup_enable_facebook">
907
  <td title="<?php _e("Enable Facebook share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Facebook button:", 'bwg_back'); ?> </label></td>
908
  <td>
909
+ <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_facebook) ? 'checked' : ''; ?> /><label for="popup_facebook_yes"><?php _e('Yes', 'bwg_back'); ?></label>
910
+ <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_no" value="0" <?php echo ($wd_bwg_options->popup_enable_facebook) ? '' : 'checked'; ?> /><label for="popup_facebook_no"><?php _e('No', 'bwg_back'); ?></label>
911
  </td>
912
  </tr>
913
  <tr id="tr_popup_enable_twitter">
914
  <td title="<?php _e("Enable Twitter share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Twitter button:", 'bwg_back'); ?> </label></td>
915
  <td>
916
+ <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_twitter) ? 'checked' : ''; ?> /><label for="popup_twitter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
917
+ <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_no" value="0" <?php echo ($wd_bwg_options->popup_enable_twitter) ? '' : 'checked'; ?> /><label for="popup_twitter_no"><?php _e('No', 'bwg_back'); ?></label>
918
  </td>
919
  </tr>
920
  <tr id="tr_popup_enable_google">
921
  <td title="<?php _e("Enable Google+ share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Google+ button:", 'bwg_back'); ?> </label></td>
922
  <td>
923
+ <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_google) ? 'checked' : ''; ?> /><label for="popup_google_yes"><?php _e('Yes', 'bwg_back'); ?></label>
924
+ <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_no" value="0" <?php echo ($wd_bwg_options->popup_enable_google) ? '' : 'checked'; ?> /><label for="popup_google_no"><?php _e('No', 'bwg_back'); ?></label>
925
  </td>
926
  </tr>
927
  <tr id="tr_popup_enable_pinterest">
928
  <td title="<?php _e("Enable Pinterest share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Pinterest button:", 'bwg_back'); ?> </label></td>
929
  <td>
930
+ <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_pinterest) ? 'checked' : ''; ?> /><label for="popup_pinterest_yes"><?php _e('Yes', 'bwg_back'); ?></label>
931
+ <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_no" value="0" <?php echo ($wd_bwg_options->popup_enable_pinterest) ? '' : 'checked'; ?> /><label for="popup_pinterest_no"><?php _e('No', 'bwg_back'); ?></label>
932
  </td>
933
  </tr>
934
  <tr id="tr_popup_enable_tumblr">
935
  <td title="<?php _e("Enable Tumblr share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Tumblr button:", 'bwg_back'); ?> </label></td>
936
  <td>
937
+ <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_tumblr) ? 'checked' : ''; ?> /><label for="popup_tumblr_yes"><?php _e('Yes', 'bwg_back'); ?></label>
938
+ <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_no" value="0" <?php echo ($wd_bwg_options->popup_enable_tumblr) ? '' : 'checked'; ?> /><label for="popup_tumblr_no"><?php _e('No', 'bwg_back'); ?></label>
939
  </td>
940
  </tr>
941
  </tbody>
947
  <tr id="tr_watermark_type">
948
  <td class="spider_label"><label><?php _e("Advertisement Type:", 'bwg_back'); ?> </label></td>
949
  <td>
950
+ <input type="radio" name="watermark_type" id="watermark_type_none" value="none" onClick="bwg_watermark('watermark_type_none')" <?php echo ($wd_bwg_options->watermark_type == 'none') ? 'checked' : ''; ?> /><label for="watermark_type_none"><?php _e("None", 'bwg_back'); ?></label>
951
+ <input type="radio" name="watermark_type" id="watermark_type_text" value="text" onClick="bwg_watermark('watermark_type_text')" <?php echo ($wd_bwg_options->watermark_type == 'text') ? 'checked' : ''; ?> /><label for="watermark_type_text"><?php _e("Text", 'bwg_back'); ?></label>
952
+ <input type="radio" name="watermark_type" id="watermark_type_image" value="image" onClick="bwg_watermark('watermark_type_image')" <?php echo ($wd_bwg_options->watermark_type == 'image') ? 'checked' : ''; ?> /><label for="watermark_type_image"><?php _e("Image", 'bwg_back'); ?></label>
953
  </td>
954
  </tr>
955
  <tr id="tr_watermark_link">
957
  <label for="watermark_link"><?php _e("Advertisement link:", 'bwg_back'); ?> </label>
958
  </td>
959
  <td>
960
+ <input type="text" id="watermark_link" name="watermark_link" value="<?php echo $wd_bwg_options->watermark_link; ?>" style="display:inline-block;" />
961
  </td>
962
  </tr>
963
  <tr id="tr_watermark_url">
965
  <label for="watermark_url"><?php _e("Advertisement url:", 'bwg_back'); ?> </label>
966
  </td>
967
  <td>
968
+ <input type="text" id="watermark_url" name="watermark_url" value="<?php echo $wd_bwg_options->watermark_url; ?>" style="display:inline-block;" />
969
  </td>
970
  </tr>
971
  <tr id="tr_watermark_width_height">
972
  <td title="<?php _e("Maximum values for watermark image width and height.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_width"><?php _e("Advertisement dimensions:", 'bwg_back'); ?> </label></td>
973
  <td>
974
+ <input type="text" name="watermark_width" id="watermark_width" value="<?php echo $wd_bwg_options->watermark_width; ?>" class="spider_int_input" /> x
975
+ <input type="text" name="watermark_height" id="watermark_height" value="<?php echo $wd_bwg_options->watermark_height; ?>" class="spider_int_input" /> px
976
  </td>
977
  </tr>
978
  <tr id="tr_watermark_text">
979
  <td class="spider_label"><label for="watermark_text"><?php _e("Advertisement text:", 'bwg_back'); ?> </label></td>
980
  <td>
981
+ <input type="text" name="watermark_text" id="watermark_text" value="<?php echo $wd_bwg_options->watermark_text; ?>" />
982
  </td>
983
  </tr>
984
  <tr id="tr_watermark_font_size">
985
  <td class="spider_label"><label for="watermark_font_size"><?php _e("Advertisement font size:", 'bwg_back'); ?> </label></td>
986
  <td>
987
+ <input type="text" name="watermark_font_size" id="watermark_font_size" value="<?php echo $wd_bwg_options->watermark_font_size; ?>" class="spider_int_input" /> px
988
  </td>
989
  </tr>
990
  <tr id="tr_watermark_font">
993
  <select name="watermark_font" class="select_icon" id="watermark_font" style="width:150px;">
994
  <?php
995
  $google_fonts = WDWLibrary::get_google_fonts();
996
+ $is_google_fonts = (in_array($wd_bwg_options->watermark_font, $google_fonts)) ? true : false;
997
  $watermark_font_families = $is_google_fonts ? $google_fonts : $watermark_fonts;
998
  foreach ($watermark_font_families as $key => $watermark_font) {
999
  ?>
1000
+ <option value="<?php echo $watermark_font; ?>" <?php echo ($wd_bwg_options->watermark_font == $watermark_font) ? 'selected="selected"' : ''; ?>><?php echo $watermark_font; ?></option>
1001
  <?php
1002
  }
1003
  ?>
1011
  <tr id="tr_watermark_color">
1012
  <td class="spider_label"><label for="watermark_color"><?php _e("Advertisement color:", 'bwg_back'); ?> </label></td>
1013
  <td>
1014
+ <input type="text" name="watermark_color" id="watermark_color" value="<?php echo $wd_bwg_options->watermark_color; ?>" class="color" />
1015
  </td>
1016
  </tr>
1017
  <tr id="tr_watermark_opacity">
1018
  <td title="<?php _e("Value must be between 0 to 100.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_opacity"><?php _e("Advertisement opacity:", 'bwg_back'); ?> </label></td>
1019
  <td>
1020
+ <input type="text" name="watermark_opacity" id="watermark_opacity" value="<?php echo $wd_bwg_options->watermark_opacity; ?>" class="spider_int_input" /> %
1021
  </td>
1022
  </tr>
1023
  <tr id="tr_watermark_position">
1026
  <table class="bws_position_table">
1027
  <tbody>
1028
  <tr>
1029
+ <td><input type="radio" value="top-left" id="watermark_top-left" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'top-left') ? 'checked' : ''; ?>></td>
1030
+ <td><input type="radio" value="top-center" id="watermark_top-center" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'top-center') ? 'checked' : ''; ?>></td>
1031
+ <td><input type="radio" value="top-right" id="watermark_top-right" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'top-right') ? 'checked' : ''; ?>></td>
1032
  </tr>
1033
  <tr>
1034
+ <td><input type="radio" value="middle-left" id="watermark_middle-left" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'middle-left') ? 'checked' : ''; ?>></td>
1035
+ <td><input type="radio" value="middle-center" id="watermark_middle-center" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'middle-center') ? 'checked' : ''; ?>></td>
1036
+ <td><input type="radio" value="middle-right" id="watermark_middle-right" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'middle-right') ? 'checked' : ''; ?>></td>
1037
  </tr>
1038
  <tr>
1039
+ <td><input type="radio" value="bottom-left" id="watermark_bottom-left" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'bottom-left') ? 'checked' : ''; ?>></td>
1040
+ <td><input type="radio" value="bottom-center" id="watermark_bottom-center" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'bottom-center') ? 'checked' : ''; ?>></td>
1041
+ <td><input type="radio" value="bottom-right" id="watermark_bottom-right" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'bottom-right') ? 'checked' : ''; ?>></td>
1042
  </tr>
1043
  </tbody>
1044
  </table>
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
-
32
  $instagram_post_width = ((int) (isset($_GET['instagram_post_width']) ? esc_html($_GET['instagram_post_width']) : $image_width));
33
  $instagram_post_height = ((int) (isset($_GET['instagram_post_height']) ? esc_html($_GET['instagram_post_height']) : $image_height));
34
 
@@ -99,9 +99,9 @@ class BWGViewEditThumb {
99
 
100
  public function crop() {
101
  global $WD_BWG_UPLOAD_DIR;
102
- $options = $this->model->get_option_data();
103
- $thumb_width = $options->upload_thumb_width;
104
- $thumb_height = $options->upload_thumb_height;
105
  $popup_width = ((int) (isset($_GET['width']) ? esc_html($_GET['width']) : '800')) - 50;
106
  $image_width = $popup_width - $thumb_width - 70;
107
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 75;
@@ -279,7 +279,7 @@ class BWGViewEditThumb {
279
  spider_crop_fix("", "");
280
  }
281
  else {
282
- spider_crop_fix("<?php echo $options->upload_thumb_width; ?>", "<?php echo $options->upload_thumb_height; ?>");
283
  }
284
  jQuery('#crop_button').show();
285
  jQuery('#thumb_message').hide();
@@ -294,7 +294,7 @@ class BWGViewEditThumb {
294
  window.parent.document.getElementById("image_thumb_<?php echo $image_id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
295
  // jQuery('#image_view').Jcrop();
296
  jQuery(window).load(function() {
297
- spider_crop_fix("<?php echo $options->upload_thumb_width; ?>", "<?php echo $options->upload_thumb_height; ?>");
298
  });
299
  function spider_crop_fix(wi, he) {
300
  var ratio = parseInt('<?php echo $width_orig; ?>') / jQuery('#image_view').width();
@@ -335,8 +335,8 @@ class BWGViewEditThumb {
335
  function spider_update_thumb(c) {
336
  jQuery('#crop_button').hide();
337
  jQuery('#croped_message').show();
338
- var thumb_width = parseInt('<?php echo $options->upload_thumb_width; ?>');
339
- var thumb_height = parseInt('<?php echo $options->upload_thumb_height; ?>');
340
  jQuery('#thumb_image_preview').css("margin-left", -c.x * (thumb_width / c.w) + "px");
341
  jQuery('#thumb_image_preview').css("margin-top", -c.y * (thumb_height / c.h) + "px");
342
  jQuery('#thumb_image_preview').css("width", ((thumb_width / c.w) * jQuery('#image_view').width()) + "px");
@@ -712,9 +712,9 @@ class BWGViewEditThumb {
712
  elseif ($edit_type == 'recover') {
713
  global $wpdb;
714
  $id = ((isset($_POST['image_id'])) ? (int) esc_html(stripslashes($_POST['image_id'])) : 0);
715
- $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
716
- $thumb_width = $options->thumb_width;
717
- $thumb_height = $options->thumb_height;
718
  $this->recover_image($id, $thumb_width, $thumb_height);
719
  }
720
  @ini_restore('memory_limit');
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
+
32
  $instagram_post_width = ((int) (isset($_GET['instagram_post_width']) ? esc_html($_GET['instagram_post_width']) : $image_width));
33
  $instagram_post_height = ((int) (isset($_GET['instagram_post_height']) ? esc_html($_GET['instagram_post_height']) : $image_height));
34
 
99
 
100
  public function crop() {
101
  global $WD_BWG_UPLOAD_DIR;
102
+ global $wd_bwg_options;
103
+ $thumb_width = $wd_bwg_options->upload_thumb_width;
104
+ $thumb_height = $wd_bwg_options->upload_thumb_height;
105
  $popup_width = ((int) (isset($_GET['width']) ? esc_html($_GET['width']) : '800')) - 50;
106
  $image_width = $popup_width - $thumb_width - 70;
107
  $popup_height = ((int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500')) - 75;
279
  spider_crop_fix("", "");
280
  }
281
  else {
282
+ spider_crop_fix("<?php echo $wd_bwg_options->upload_thumb_width; ?>", "<?php echo $wd_bwg_options->upload_thumb_height; ?>");
283
  }
284
  jQuery('#crop_button').show();
285
  jQuery('#thumb_message').hide();
294
  window.parent.document.getElementById("image_thumb_<?php echo $image_id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
295
  // jQuery('#image_view').Jcrop();
296
  jQuery(window).load(function() {
297
+ spider_crop_fix("<?php echo $wd_bwg_options->upload_thumb_width; ?>", "<?php echo $wd_bwg_options->upload_thumb_height; ?>");
298
  });
299
  function spider_crop_fix(wi, he) {
300
  var ratio = parseInt('<?php echo $width_orig; ?>') / jQuery('#image_view').width();
335
  function spider_update_thumb(c) {
336
  jQuery('#crop_button').hide();
337
  jQuery('#croped_message').show();
338
+ var thumb_width = parseInt('<?php echo $wd_bwg_options->upload_thumb_width; ?>');
339
+ var thumb_height = parseInt('<?php echo $wd_bwg_options->upload_thumb_height; ?>');
340
  jQuery('#thumb_image_preview').css("margin-left", -c.x * (thumb_width / c.w) + "px");
341
  jQuery('#thumb_image_preview').css("margin-top", -c.y * (thumb_height / c.h) + "px");
342
  jQuery('#thumb_image_preview').css("width", ((thumb_width / c.w) * jQuery('#image_view').width()) + "px");
712
  elseif ($edit_type == 'recover') {
713
  global $wpdb;
714
  $id = ((isset($_POST['image_id'])) ? (int) esc_html(stripslashes($_POST['image_id'])) : 0);
715
+ global $wd_bwg_options;
716
+ $thumb_width = $wd_bwg_options->thumb_width;
717
+ $thumb_height = $wd_bwg_options->thumb_height;
718
  $this->recover_image($id, $thumb_width, $thumb_height);
719
  }
720
  @ini_restore('memory_limit');
admin/views/BWGViewGalleries_bwg.php CHANGED
@@ -217,8 +217,8 @@ class BWGViewGalleries_bwg {
217
 
218
  public function edit($id) {
219
  global $WD_BWG_UPLOAD_DIR;
 
220
  $row = $this->model->get_row_data($id);
221
- $option_row = WDWLibrary::get_options_row_data();
222
  $page_title = (($id != 0) ? __('Edit gallery','bwg_back') . $row->name : __('Create new gallery','bwg_back'));
223
  $per_page = $this->model->per_page();
224
  $images_count = $this->model->get_images_count($id);
@@ -441,7 +441,7 @@ class BWGViewGalleries_bwg {
441
  }
442
  td_alt.appendChild(input_alt);
443
 
444
- <?php if ($option_row->thumb_click_action != 'open_lightbox') { ?>
445
  //Redirect url
446
  input_alt = document.createElement('input');
447
  input_alt.setAttribute('id', "redirect_url_" + bwg_j);
@@ -462,7 +462,7 @@ class BWGViewGalleries_bwg {
462
  if (is_embed && !is_direct_url) {
463
  textarea_desc.innerHTML = files[i]['description'];
464
  }
465
- else if (<?php echo $option_row->read_metadata; ?>) {
466
  textarea_desc.innerHTML = files[i]['credit'] ? 'Author: ' + files[i]['credit'] + '\n' : '';
467
  textarea_desc.innerHTML += ((files[i]['aperture'] != 0 && files[i]['aperture'] != '') ? 'Aperture: ' + files[i]['aperture'] + '\n' : '');
468
  textarea_desc.innerHTML += ((files[i]['camera'] != 0 && files[i]['camera'] != '') ? 'Camera: ' + files[i]['camera'] + '\n' : '');
@@ -689,9 +689,9 @@ class BWGViewGalleries_bwg {
689
 
690
  public function image_display($id) {
691
  global $WD_BWG_UPLOAD_DIR;
 
692
  $rows_data = $this->model->get_image_rows_data($id);
693
  $page_nav = $this->model->image_page_nav($id);
694
- $option_row = WDWLibrary::get_options_row_data();
695
  $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
696
  $image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
697
  $image_order_by = ((isset($_POST['image_order_by'])) ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by'])) ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
@@ -825,7 +825,7 @@ class BWGViewGalleries_bwg {
825
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" type="button" onclick="if (window.parent.bwg_add_title_desc()) {jQuery('.opacity_image_desc').hide();} return false;" value="<?php echo __('Update', 'bwg_back'); ?>" />
826
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="button" onclick="jQuery('.opacity_image_desc').hide(); return false;" value="<?php echo __('Cancel', 'bwg_back'); ?>" />
827
  </div>
828
- <?php if ($option_row->thumb_click_action != 'open_lightbox') { ?>
829
  <div>
830
  <span class="bwg_popup_label">
831
  <?php _e('Redirect URL: ', 'bwg_back'); ?>
@@ -870,7 +870,7 @@ class BWGViewGalleries_bwg {
870
  spider_set_input_value('image_order_by', 'alt');
871
  spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'alt' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
872
  spider_ajax_save('galleries_form');">
873
- <span><?php _e('Alt/Title', 'bwg_back'); ?><?php if ($option_row->thumb_click_action != 'open_lightbox') { ?><br /><?php echo __('Redirect', 'bwg_back'); ?> URL<?php } ?></span><span class="sorting-indicator"></span>
874
  </a>
875
  </th>
876
  <th class="sortable table_extra_large_col <?php if ($image_order_by == 'description') {echo $order_class;} ?>">
@@ -979,7 +979,7 @@ class BWGViewGalleries_bwg {
979
  </td>
980
  <td class="table_extra_large_col">
981
  <textarea rows="2" id="image_alt_text_<?php echo $row_data->id; ?>" name="image_alt_text_<?php echo $row_data->id; ?>" style="resize:vertical;"><?php echo $row_data->alt; ?></textarea>
982
- <?php if ($option_row->thumb_click_action != 'open_lightbox') { ?>
983
  <input size="24" type="text" id="redirect_url_<?php echo $row_data->id; ?>" name="redirect_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->redirect_url; ?>" />
984
  <?php } ?>
985
  </td>
217
 
218
  public function edit($id) {
219
  global $WD_BWG_UPLOAD_DIR;
220
+ global $wd_bwg_options;
221
  $row = $this->model->get_row_data($id);
 
222
  $page_title = (($id != 0) ? __('Edit gallery','bwg_back') . $row->name : __('Create new gallery','bwg_back'));
223
  $per_page = $this->model->per_page();
224
  $images_count = $this->model->get_images_count($id);
441
  }
442
  td_alt.appendChild(input_alt);
443
 
444
+ <?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?>
445
  //Redirect url
446
  input_alt = document.createElement('input');
447
  input_alt.setAttribute('id', "redirect_url_" + bwg_j);
462
  if (is_embed && !is_direct_url) {
463
  textarea_desc.innerHTML = files[i]['description'];
464
  }
465
+ else if (<?php echo $wd_bwg_options->read_metadata; ?>) {
466
  textarea_desc.innerHTML = files[i]['credit'] ? 'Author: ' + files[i]['credit'] + '\n' : '';
467
  textarea_desc.innerHTML += ((files[i]['aperture'] != 0 && files[i]['aperture'] != '') ? 'Aperture: ' + files[i]['aperture'] + '\n' : '');
468
  textarea_desc.innerHTML += ((files[i]['camera'] != 0 && files[i]['camera'] != '') ? 'Camera: ' + files[i]['camera'] + '\n' : '');
689
 
690
  public function image_display($id) {
691
  global $WD_BWG_UPLOAD_DIR;
692
+ global $wd_bwg_options;
693
  $rows_data = $this->model->get_image_rows_data($id);
694
  $page_nav = $this->model->image_page_nav($id);
 
695
  $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
696
  $image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
697
  $image_order_by = ((isset($_POST['image_order_by'])) ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by'])) ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
825
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" type="button" onclick="if (window.parent.bwg_add_title_desc()) {jQuery('.opacity_image_desc').hide();} return false;" value="<?php echo __('Update', 'bwg_back'); ?>" />
826
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="button" onclick="jQuery('.opacity_image_desc').hide(); return false;" value="<?php echo __('Cancel', 'bwg_back'); ?>" />
827
  </div>
828
+ <?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?>
829
  <div>
830
  <span class="bwg_popup_label">
831
  <?php _e('Redirect URL: ', 'bwg_back'); ?>
870
  spider_set_input_value('image_order_by', 'alt');
871
  spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'alt' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
872
  spider_ajax_save('galleries_form');">
873
+ <span><?php _e('Alt/Title', 'bwg_back'); ?><?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?><br /><?php echo __('Redirect', 'bwg_back'); ?> URL<?php } ?></span><span class="sorting-indicator"></span>
874
  </a>
875
  </th>
876
  <th class="sortable table_extra_large_col <?php if ($image_order_by == 'description') {echo $order_class;} ?>">
979
  </td>
980
  <td class="table_extra_large_col">
981
  <textarea rows="2" id="image_alt_text_<?php echo $row_data->id; ?>" name="image_alt_text_<?php echo $row_data->id; ?>" style="resize:vertical;"><?php echo $row_data->alt; ?></textarea>
982
+ <?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?>
983
  <input size="24" type="text" id="redirect_url_<?php echo $row_data->id; ?>" name="redirect_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->redirect_url; ?>" />
984
  <?php } ?>
985
  </td>
admin/views/BWGViewOptions_bwg.php CHANGED
@@ -1,27 +1,13 @@
1
  <?php
2
 
3
  class BWGViewOptions_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
 
 
15
 
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
  public function __construct($model) {
20
  $this->model = $model;
21
  }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display($reset = FALSE) {
26
  if (isset($_GET['bwg_start_tour']) && $_GET['bwg_start_tour'] == '1') {
27
  update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
@@ -52,7 +38,7 @@ class BWGViewOptions_bwg {
52
  }
53
  </script>
54
  <?php
55
- $row = $this->model->get_row_data($reset);
56
  if (!$row) {
57
  echo WDWLibrary::message_id(2);
58
  return;
@@ -1425,8 +1411,8 @@ class BWGViewOptions_bwg {
1425
  <tr id="tr_thumb_show_name">
1426
  <td class="spider_label_options"><label><?php _e("Show gallery name:", 'bwg_back'); ?> </label></td>
1427
  <td>
1428
- <input type="radio" name="thumb_name" id="thumb_name_yes" value="1" <?php if ($row->showthumbs_name) echo 'checked="checked"'; ?> /><label for="thumb_name_yes"><?php _e("Yes", 'bwg_back'); ?></label>
1429
- <input type="radio" name="thumb_name" id="thumb_name_no" value="0" <?php if (!$row->showthumbs_name) echo 'checked="checked"'; ?> /><label for="thumb_name_no"><?php _e("No", 'bwg_back'); ?></label>
1430
  <div class="spider_description"></div>
1431
  </td>
1432
  </tr>
@@ -1578,8 +1564,8 @@ class BWGViewOptions_bwg {
1578
  <label><?php _e('Show album/gallery name:', 'bwg_back'); ?></label>
1579
  </td>
1580
  <td>
1581
- <input type="radio" name="show_album_name_enable" id="show_album_name_enable_1" value="1" <?php if ($row->show_album_name) echo 'checked="checked"'; ?> /><label for="show_album_name_enable_1"><?php _e('Yes', 'bwg_back'); ?></label>
1582
- <input type="radio" name="show_album_name_enable" id="show_album_name_enable_0" value="0" <?php if (!$row->show_album_name) echo 'checked="checked"'; ?> /><label for="show_album_name_enable_0"><?php _e('No', 'bwg_back'); ?></label>
1583
  <div class="spider_description"></div>
1584
  </td>
1585
  </tr>
@@ -1784,7 +1770,6 @@ class BWGViewOptions_bwg {
1784
  </div>
1785
  <input id="task" name="task" type="hidden" value="" />
1786
  <input id="recreate" name="recreate" type="hidden" value="" />
1787
- <input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
1788
  <input id="watermark" name="watermark" type="hidden" value="" />
1789
  <script>
1790
  // "state" global get var is for checking redirect from facebook.
1
  <?php
2
 
3
  class BWGViewOptions_bwg {
 
 
 
 
 
 
 
 
 
 
4
 
5
+ private $model;
6
 
 
 
 
7
  public function __construct($model) {
8
  $this->model = $model;
9
  }
10
+
 
 
11
  public function display($reset = FALSE) {
12
  if (isset($_GET['bwg_start_tour']) && $_GET['bwg_start_tour'] == '1') {
13
  update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
38
  }
39
  </script>
40
  <?php
41
+ $row = new WD_BWG_Options($reset);
42
  if (!$row) {
43
  echo WDWLibrary::message_id(2);
44
  return;
1411
  <tr id="tr_thumb_show_name">
1412
  <td class="spider_label_options"><label><?php _e("Show gallery name:", 'bwg_back'); ?> </label></td>
1413
  <td>
1414
+ <input type="radio" name="showthumbs_name" id="thumb_name_yes" value="1" <?php if ($row->showthumbs_name) echo 'checked="checked"'; ?> /><label for="thumb_name_yes"><?php _e("Yes", 'bwg_back'); ?></label>
1415
+ <input type="radio" name="showthumbs_name" id="thumb_name_no" value="0" <?php if (!$row->showthumbs_name) echo 'checked="checked"'; ?> /><label for="thumb_name_no"><?php _e("No", 'bwg_back'); ?></label>
1416
  <div class="spider_description"></div>
1417
  </td>
1418
  </tr>
1564
  <label><?php _e('Show album/gallery name:', 'bwg_back'); ?></label>
1565
  </td>
1566
  <td>
1567
+ <input type="radio" name="show_album_name" id="show_album_name_enable_1" value="1" <?php if ($row->show_album_name) echo 'checked="checked"'; ?> /><label for="show_album_name_enable_1"><?php _e('Yes', 'bwg_back'); ?></label>
1568
+ <input type="radio" name="show_album_name" id="show_album_name_enable_0" value="0" <?php if (!$row->show_album_name) echo 'checked="checked"'; ?> /><label for="show_album_name_enable_0"><?php _e('No', 'bwg_back'); ?></label>
1569
  <div class="spider_description"></div>
1570
  </td>
1571
  </tr>
1770
  </div>
1771
  <input id="task" name="task" type="hidden" value="" />
1772
  <input id="recreate" name="recreate" type="hidden" value="" />
 
1773
  <input id="watermark" name="watermark" type="hidden" value="" />
1774
  <script>
1775
  // "state" global get var is for checking redirect from facebook.
admin/views/BWGViewWidgetSlideshow.php CHANGED
@@ -44,7 +44,7 @@ class BWGViewWidgetSlideshow {
44
  echo $before_title . $title . $after_title;
45
  }
46
  // Widget output.
47
- require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
48
  $controller_class = 'BWGControllerSlideshow';
49
  $controller = new $controller_class();
50
  global $bwg;
@@ -101,15 +101,15 @@ class BWGViewWidgetSlideshow {
101
  $instance = wp_parse_args((array) $instance, $defaults);
102
  $gallery_rows = $this->model->get_gallery_rows_data();
103
  $theme_rows = $this->model->get_theme_rows_data();
104
- $options_row = WDWLibrary::get_options_row_data();
105
  ?>
106
  <p>
107
- <label for="<?php echo $id_title; ?>"><?php _e("Title:", 'bwg_back'); ?></label>
108
  <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
109
  </p>
110
  <p>
111
  <select name="<?php echo $name_gallery_id; ?>" id="<?php echo $id_gallery_id; ?>" class="widefat">
112
- <option value="0"><?php _e("Select Gallery", 'bwg_back'); ?></option>
113
  <?php
114
  foreach ($gallery_rows as $gallery_row) {
115
  ?>
@@ -120,16 +120,16 @@ class BWGViewWidgetSlideshow {
120
  </select>
121
  </p>
122
  <p>
123
- <label for="<?php echo $id_width; ?>"><?php _e("Dimensions:", 'bwg_back'); ?></label>
124
  <input class="widefat" style="width:25%;" id="<?php echo $id_width; ?>" name="<?php echo $name_width; ?>" type="text" value="<?php echo $instance['width']; ?>"/> x
125
  <input class="widefat" style="width:25%;" id="<?php echo $id_height; ?>" name="<?php echo $name_height; ?>" type="text" value="<?php echo $instance['height']; ?>"/> px
126
  </p>
127
- <p title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" <?php echo ($options_row->slideshow_enable_filmstrip ? 'style="color: #7F7F7F;"' : 'style="display: none;"'); ?>>
128
  <label><?php _e("Filmstrip height:", 'bwg_back'); ?></label>
129
  <input disabled="disabled" class="widefat" style="width: 25%; color: #7F7F7F;" type="text" value="40" /> px
130
  </p>
131
  <p>
132
- <label for="<?php echo $id_effect; ?>"><?php _e("Slideshow effect:", 'bwg_back'); ?></label>
133
  <select name="<?php echo $name_effect; ?>" id="<?php echo $id_effect; ?>" class="widefat">
134
  <?php
135
  foreach ($slideshow_effects as $key => $slideshow_effect) {
@@ -141,13 +141,13 @@ class BWGViewWidgetSlideshow {
141
  </select>
142
  </p>
143
  <p>
144
- <label for="<?php echo $id_interval; ?>"><?php _e("Time interval:", 'bwg_back'); ?></label>
145
  <input class="widefat" style="width:25%;" id="<?php echo $id_interval; ?>" name="<?php echo $name_interval; ?>" type="text" value="<?php echo $instance['interval']; ?>" /> sec.
146
  </p>
147
  <p>
148
- <label><?php _e("Enable shuffle:", 'bwg_back'); ?></label>
149
- <input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_1"; ?>" value="1" <?php if ($instance['shuffle']) echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "1");' /><label for="<?php echo $id_shuffle . "_1"; ?>"><?php _e("Yes", 'bwg_back'); ?></label>
150
- <input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_0"; ?>" value="0" <?php if (!$instance['shuffle']) echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "0");' /><label for="<?php echo $id_shuffle . "_0"; ?>"><?php _e("No", 'bwg_back'); ?></label>
151
  <input type="hidden" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle; ?>" value="<?php echo $instance['shuffle']; ?>" class="bwg_hidden" />
152
  </p>
153
  <p>
44
  echo $before_title . $title . $after_title;
45
  }
46
  // Widget output.
47
+ require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
48
  $controller_class = 'BWGControllerSlideshow';
49
  $controller = new $controller_class();
50
  global $bwg;
101
  $instance = wp_parse_args((array) $instance, $defaults);
102
  $gallery_rows = $this->model->get_gallery_rows_data();
103
  $theme_rows = $this->model->get_theme_rows_data();
104
+ global $wd_bwg_options;
105
  ?>
106
  <p>
107
+ <label for="<?php echo $id_title; ?>"><?php echo __('Title:', 'bwg_back'); ?></label>
108
  <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
109
  </p>
110
  <p>
111
  <select name="<?php echo $name_gallery_id; ?>" id="<?php echo $id_gallery_id; ?>" class="widefat">
112
+ <option value="0"><?php echo __('Select Gallery', 'bwg_back'); ?></option>
113
  <?php
114
  foreach ($gallery_rows as $gallery_row) {
115
  ?>
120
  </select>
121
  </p>
122
  <p>
123
+ <label for="<?php echo $id_width; ?>"><?php echo __('Dimensions:', 'bwg_back'); ?></label>
124
  <input class="widefat" style="width:25%;" id="<?php echo $id_width; ?>" name="<?php echo $name_width; ?>" type="text" value="<?php echo $instance['width']; ?>"/> x
125
  <input class="widefat" style="width:25%;" id="<?php echo $id_height; ?>" name="<?php echo $name_height; ?>" type="text" value="<?php echo $instance['height']; ?>"/> px
126
  </p>
127
+ <p title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" <?php echo ($wd_bwg_options->slideshow_enable_filmstrip ? 'style="color: #7F7F7F;"' : 'style="display: none;"'); ?>>
128
  <label><?php _e("Filmstrip height:", 'bwg_back'); ?></label>
129
  <input disabled="disabled" class="widefat" style="width: 25%; color: #7F7F7F;" type="text" value="40" /> px
130
  </p>
131
  <p>
132
+ <label for="<?php echo $id_effect; ?>"><?php echo __('Slideshow effect:', 'bwg_back'); ?></label>
133
  <select name="<?php echo $name_effect; ?>" id="<?php echo $id_effect; ?>" class="widefat">
134
  <?php
135
  foreach ($slideshow_effects as $key => $slideshow_effect) {
141
  </select>
142
  </p>
143
  <p>
144
+ <label for="<?php echo $id_interval; ?>"><?php echo __('Time interval:', 'bwg_back'); ?></label>
145
  <input class="widefat" style="width:25%;" id="<?php echo $id_interval; ?>" name="<?php echo $name_interval; ?>" type="text" value="<?php echo $instance['interval']; ?>" /> sec.
146
  </p>
147
  <p>
148
+ <label><?php echo __('Enable shuffle:', 'bwg_back'); ?></label>
149
+ <input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_1"; ?>" value="1" <?php if ($instance['shuffle']) echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "1");' /><label for="<?php echo $id_shuffle . "_1"; ?>"><?php echo __('Yes', 'bwg_back'); ?></label>
150
+ <input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_0"; ?>" value="0" <?php if (!$instance['shuffle']) echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "0");' /><label for="<?php echo $id_shuffle . "_0"; ?>"><?php echo __('No', 'bwg_back'); ?></label>
151
  <input type="hidden" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle; ?>" value="<?php echo $instance['shuffle']; ?>" class="bwg_hidden" />
152
  </p>
153
  <p>
filemanager/controller.php CHANGED
@@ -25,24 +25,17 @@ class FilemanagerController {
25
 
26
  public function __construct() {
27
  $upload_dir = wp_upload_dir();
28
- $bwg_options = $this->get_options_data();
29
- $this->uploads_dir = (($bwg_options->images_directory . '/photo-gallery') ? ABSPATH . $bwg_options->images_directory . '/photo-gallery' : WD_BWG_DIR . '/filemanager/uploads');
30
  if (file_exists($this->uploads_dir) == FALSE) {
31
  mkdir($this->uploads_dir);
32
  }
33
- $this->uploads_url = (($bwg_options->images_directory . '/photo-gallery') ? site_url() . '/' . $bwg_options->images_directory . '/photo-gallery' : WD_BWG_URL . '/filemanager/uploads');
34
  }
35
 
36
  ////////////////////////////////////////////////////////////////////////////////////////
37
  // Public Methods //
38
  ////////////////////////////////////////////////////////////////////////////////////////
39
-
40
- public function get_options_data() {
41
- global $wpdb;
42
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
43
- return $row;
44
- }
45
-
46
  public function execute() {
47
  $task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
48
  if (method_exists($this, $task)) {
25
 
26
  public function __construct() {
27
  $upload_dir = wp_upload_dir();
28
+ global $wd_bwg_options;
29
+ $this->uploads_dir = (($wd_bwg_options->images_directory . '/photo-gallery') ? ABSPATH . $wd_bwg_options->images_directory . '/photo-gallery' : WD_BWG_DIR . '/filemanager/uploads');
30
  if (file_exists($this->uploads_dir) == FALSE) {
31
  mkdir($this->uploads_dir);
32
  }
33
+ $this->uploads_url = (($wd_bwg_options->images_directory . '/photo-gallery') ? site_url() . '/' . $wd_bwg_options->images_directory . '/photo-gallery' : WD_BWG_URL . '/filemanager/uploads');
34
  }
35
 
36
  ////////////////////////////////////////////////////////////////////////////////////////
37
  // Public Methods //
38
  ////////////////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
39
  public function execute() {
40
  $task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
41
  if (method_exists($this, $task)) {
filemanager/model.php CHANGED
@@ -31,6 +31,7 @@ class FilemanagerModel {
31
  // Public Methods //
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
  public function get_file_manager_data() {
 
34
  $session_data = array();
35
  $session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
36
  $session_data['sort_order'] = $this->get_from_session('sort_order', 'desc');
@@ -45,7 +46,7 @@ class FilemanagerModel {
45
  $data['path_components'] = $this->get_path_components();
46
  $data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
47
  $data['files'] = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
48
- $data['media_library_files'] = ($this->controller->get_options_data()->enable_ML_import ? $this->get_media_library_files($session_data['sort_by'], $session_data['sort_order']) : array());
49
  $data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
50
  $data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
51
 
31
  // Public Methods //
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
  public function get_file_manager_data() {
34
+ global $wd_bwg_options;
35
  $session_data = array();
36
  $session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
37
  $session_data['sort_order'] = $this->get_from_session('sort_order', 'desc');
46
  $data['path_components'] = $this->get_path_components();
47
  $data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
48
  $data['files'] = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
49
+ $data['media_library_files'] = ($wd_bwg_options->enable_ML_import ? $this->get_media_library_files($session_data['sort_by'], $session_data['sort_order']) : array());
50
  $data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
51
  $data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
52
 
filemanager/view.php CHANGED
@@ -40,9 +40,8 @@ class FilemanagerView {
40
  <?php
41
  $_GET['filemanager_msg'] = '';
42
  }
43
- $bwg_options = $this->controller->get_options_data();
44
  $file_manager_data = $this->model->get_file_manager_data();
45
-
46
  $items_view = $file_manager_data['session_data']['items_view'];
47
  $sort_by = $file_manager_data['session_data']['sort_by'];
48
  $sort_order = $file_manager_data['session_data']['sort_order'];
@@ -124,7 +123,7 @@ class FilemanagerView {
124
  <span class="ctrl_bar_btn">
125
  <a id="upload_images" class="ctrl_bar_btn wd-btn wd-btn-primary wd-btn-icon wd-btn-uplaod" onclick="onBtnShowUploaderClick(event, this);"><?php echo __('Upload files', 'bwg_back'); ?></a>
126
  </span>
127
- <?php if ($bwg_options->enable_ML_import) { ?>
128
  <span class="ctrl_bar_divider"></span>
129
  <span class="ctrl_bar_btn">
130
  <a class="ctrl_bar_btn wd-btn wd-btn-primary wd-btn-icon btn_import_files" onclick="onBtnShowImportClick(event, this);"><?php echo __('Media library', 'bwg_back'); ?></a>
@@ -280,16 +279,16 @@ class FilemanagerView {
280
  <div class="ctrls_bar ctrls_bar_header">
281
  <div class="ctrls_left upload_thumb">
282
  <?php echo __("Thumbnail Maximum Dimensions:", 'bwg_back'); ?>
283
- <input type="text" class="upload_thumb_dim" name="importer_thumb_width" id="importer_thumb_width" value="<?php echo $bwg_options->upload_thumb_width; ?>" /> x
284
- <input type="text" class="upload_thumb_dim" name="importer_thumb_height" id="importer_thumb_height" value="<?php echo $bwg_options->upload_thumb_height; ?>" /> px
285
  </div>
286
  <div class="ctrls_right">
287
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo __('Back', 'bwg_back'); ?>"></a>
288
  </div>
289
  <div class="ctrls_right_img upload_thumb">
290
  <?php echo __("Image Maximum Dimensions:", 'bwg_back'); ?>
291
- <input type="text" class="upload_thumb_dim" name="importer_img_width" id="importer_img_width" value="<?php echo $bwg_options->upload_img_width; ?>" /> x
292
- <input type="text" class="upload_thumb_dim" name="importer_img_height" id="importer_img_height" value="<?php echo $bwg_options->upload_img_height; ?>" /> px
293
  </div>
294
  </div>
295
  <div id="importer_body_wrapper">
@@ -363,16 +362,16 @@ class FilemanagerView {
363
  <div class="ctrls_bar ctrls_bar_header">
364
  <div class="ctrls_left upload_thumb">
365
  <?php echo __("Thumbnail Maximum Dimensions:", 'bwg_back'); ?>
366
- <input type="text" class="upload_thumb_dim" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo $bwg_options->upload_thumb_width; ?>" /> x
367
- <input type="text" class="upload_thumb_dim" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo $bwg_options->upload_thumb_height; ?>" /> px
368
  </div>
369
  <div class="ctrls_right">
370
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo __('Back', 'bwg_back'); ?>"></a>
371
  </div>
372
  <div class="ctrls_right_img upload_thumb">
373
  <?php echo __("Image Maximum Dimensions:", 'bwg_back'); ?>
374
- <input type="text" class="upload_thumb_dim" name="upload_img_width" id="upload_img_width" value="<?php echo $bwg_options->upload_img_width; ?>" /> x
375
- <input type="text" class="upload_thumb_dim" name="upload_img_height" id="upload_img_height" value="<?php echo $bwg_options->upload_img_height; ?>" /> px
376
  </div>
377
  </div>
378
  <label for="jQueryUploader">
40
  <?php
41
  $_GET['filemanager_msg'] = '';
42
  }
43
+ global $wd_bwg_options;
44
  $file_manager_data = $this->model->get_file_manager_data();
 
45
  $items_view = $file_manager_data['session_data']['items_view'];
46
  $sort_by = $file_manager_data['session_data']['sort_by'];
47
  $sort_order = $file_manager_data['session_data']['sort_order'];
123
  <span class="ctrl_bar_btn">
124
  <a id="upload_images" class="ctrl_bar_btn wd-btn wd-btn-primary wd-btn-icon wd-btn-uplaod" onclick="onBtnShowUploaderClick(event, this);"><?php echo __('Upload files', 'bwg_back'); ?></a>
125
  </span>
126
+ <?php if ($wd_bwg_options->enable_ML_import) { ?>
127
  <span class="ctrl_bar_divider"></span>
128
  <span class="ctrl_bar_btn">
129
  <a class="ctrl_bar_btn wd-btn wd-btn-primary wd-btn-icon btn_import_files" onclick="onBtnShowImportClick(event, this);"><?php echo __('Media library', 'bwg_back'); ?></a>
279
  <div class="ctrls_bar ctrls_bar_header">
280
  <div class="ctrls_left upload_thumb">
281
  <?php echo __("Thumbnail Maximum Dimensions:", 'bwg_back'); ?>
282
+ <input type="text" class="upload_thumb_dim" name="importer_thumb_width" id="importer_thumb_width" value="<?php echo $wd_bwg_options->upload_thumb_width; ?>" /> x
283
+ <input type="text" class="upload_thumb_dim" name="importer_thumb_height" id="importer_thumb_height" value="<?php echo $wd_bwg_options->upload_thumb_height; ?>" /> px
284
  </div>
285
  <div class="ctrls_right">
286
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo __('Back', 'bwg_back'); ?>"></a>
287
  </div>
288
  <div class="ctrls_right_img upload_thumb">
289
  <?php echo __("Image Maximum Dimensions:", 'bwg_back'); ?>
290
+ <input type="text" class="upload_thumb_dim" name="importer_img_width" id="importer_img_width" value="<?php echo $wd_bwg_options->upload_img_width; ?>" /> x
291
+ <input type="text" class="upload_thumb_dim" name="importer_img_height" id="importer_img_height" value="<?php echo $wd_bwg_options->upload_img_height; ?>" /> px
292
  </div>
293
  </div>
294
  <div id="importer_body_wrapper">
362
  <div class="ctrls_bar ctrls_bar_header">
363
  <div class="ctrls_left upload_thumb">
364
  <?php echo __("Thumbnail Maximum Dimensions:", 'bwg_back'); ?>
365
+ <input type="text" class="upload_thumb_dim" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo $wd_bwg_options->upload_thumb_width; ?>" /> x
366
+ <input type="text" class="upload_thumb_dim" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo $wd_bwg_options->upload_thumb_height; ?>" /> px
367
  </div>
368
  <div class="ctrls_right">
369
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo __('Back', 'bwg_back'); ?>"></a>
370
  </div>
371
  <div class="ctrls_right_img upload_thumb">
372
  <?php echo __("Image Maximum Dimensions:", 'bwg_back'); ?>
373
+ <input type="text" class="upload_thumb_dim" name="upload_img_width" id="upload_img_width" value="<?php echo $wd_bwg_options->upload_img_width; ?>" /> x
374
+ <input type="text" class="upload_thumb_dim" name="upload_img_height" id="upload_img_height" value="<?php echo $wd_bwg_options->upload_img_height; ?>" /> px
375
  </div>
376
  </div>
377
  <label for="jQueryUploader">
framework/BWGOptions.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class WD_BWG_Options {
3
+
4
+ public $images_directory = '';
5
+
6
+ public $masonry = 'vertical';
7
+ public $mosaic = 'vertical';
8
+ public $resizable_mosaic = 0;
9
+ public $mosaic_total_width = 100;
10
+ public $image_column_number = 5;
11
+ public $images_per_page = 30;
12
+ public $thumb_width = 180;
13
+ public $thumb_height = 90;
14
+ public $upload_thumb_width = 300;
15
+ public $upload_thumb_height = 300;
16
+ public $image_enable_page = 1;
17
+ public $image_title_show_hover = 'none';
18
+ public $ecommerce_icon_show_hover = 'none';
19
+
20
+ public $album_column_number = 5;
21
+ public $albums_per_page = 30;
22
+ public $album_title_show_hover = 'hover';
23
+ public $album_thumb_width = 120;
24
+ public $album_thumb_height = 90;
25
+ public $album_enable_page = 1;
26
+ public $extended_album_height = 150;
27
+ public $extended_album_description_enable = 1;
28
+
29
+ public $image_browser_width = 800;
30
+ public $image_browser_title_enable = 1;
31
+ public $image_browser_description_enable = 1;
32
+
33
+ public $blog_style_width = 800;
34
+ public $blog_style_title_enable = 1;
35
+ public $blog_style_images_per_page = 5;
36
+ public $blog_style_enable_page = 1;
37
+
38
+ public $slideshow_type = 'fade';
39
+ public $slideshow_interval = 5;
40
+ public $slideshow_width = 800;
41
+ public $slideshow_height = 500;
42
+ public $slideshow_enable_autoplay = 0;
43
+ public $slideshow_enable_shuffle = 0;
44
+ public $slideshow_enable_ctrl = 1;
45
+ public $slideshow_enable_filmstrip = 1;
46
+ public $slideshow_filmstrip_height = 90;
47
+ public $slideshow_enable_title = 0;
48
+ public $slideshow_title_position = 'top-right';
49
+ public $slideshow_enable_description = 0;
50
+ public $slideshow_description_position = 'bottom-right';
51
+ public $slideshow_enable_music = 0;
52
+ public $slideshow_audio_url = '';
53
+ public $slideshow_effect_duration = 1;
54
+
55
+ public $popup_width = 800;
56
+ public $popup_height = 500;
57
+ public $popup_type = 'fade';
58
+ public $popup_interval = 5;
59
+ public $popup_enable_filmstrip = 1;
60
+ public $popup_filmstrip_height = 70;
61
+ public $popup_enable_ctrl_btn = 1;
62
+ public $popup_enable_fullscreen = 1;
63
+ public $popup_enable_comment = 1;
64
+ public $popup_enable_email = 0;
65
+ public $popup_enable_captcha = 0;
66
+ public $popup_enable_download = 0;
67
+ public $popup_enable_fullsize_image = 0;
68
+ public $popup_enable_facebook = 1;
69
+ public $popup_enable_twitter = 1;
70
+ public $popup_enable_google = 1;
71
+ public $popup_enable_ecommerce = 1;
72
+ public $popup_effect_duration = 1;
73
+
74
+ public $watermark_type = 'none';
75
+ public $watermark_position = 'bottom-left';
76
+ public $watermark_width = 90;
77
+ public $watermark_height = 90;
78
+ public $watermark_url = '';
79
+ public $watermark_text = 'web-dorado.com';
80
+ public $watermark_link = 'https://web-dorado.com';
81
+ public $watermark_font_size = 20;
82
+ public $watermark_font = 'segoe ui';
83
+ public $watermark_color = 'FFFFFF';
84
+ public $watermark_opacity = 30;
85
+
86
+ public $built_in_watermark_type = 'none';
87
+ public $built_in_watermark_position = 'middle-center';
88
+ public $built_in_watermark_size = 15;
89
+ public $built_in_watermark_url = '';
90
+ public $built_in_watermark_text = 'web-dorado.com';
91
+ public $built_in_watermark_font_size = 20;
92
+ public $built_in_watermark_font = 'arial';
93
+ public $built_in_watermark_color = 'FFFFFF';
94
+ public $built_in_watermark_opacity = 30;
95
+
96
+ public $image_right_click = 0;
97
+ public $popup_fullscreen = 0;
98
+ public $gallery_role = 0;
99
+ public $album_role = 0;
100
+ public $image_role = 0;
101
+ public $popup_autoplay = 0;
102
+ public $album_view_type = 'thumbnail';
103
+ public $popup_enable_pinterest = 0;
104
+ public $popup_enable_tumblr = 0;
105
+ public $show_search_box = 0;
106
+ public $search_box_width = 180;
107
+ public $preload_images = 0;
108
+ public $preload_images_count = 10;
109
+ public $popup_enable_info = 1;
110
+ public $popup_enable_rate = 0;
111
+ public $thumb_click_action = 'open_lightbox';
112
+ public $thumb_link_target = 1;
113
+ public $comment_moderation = 0;
114
+ public $popup_info_always_show = 0;
115
+ public $popup_hit_counter = 0;
116
+ public $enable_ML_import = 0;
117
+ public $showthumbs_name = 0;
118
+ public $show_album_name = 0;
119
+ public $show_image_counts = 0;
120
+ public $upload_img_width = 1200;
121
+ public $upload_img_height = 1200;
122
+ public $play_icon = 1;
123
+ public $show_masonry_thumb_description = 0;
124
+ public $slideshow_title_full_width = 0;
125
+ public $popup_info_full_width = 0;
126
+ public $show_sort_images = 0;
127
+ public $autoupdate_interval = 30;
128
+ public $instagram_access_token = '';
129
+ public $description_tb = 0;
130
+ public $enable_seo = 1;
131
+ public $autohide_lightbox_navigation = 1;
132
+ public $autohide_slideshow_navigation = 1;
133
+ public $read_metadata = 1;
134
+ public $enable_loop = 1;
135
+ public $enable_addthis = 0;
136
+ public $addthis_profile_id = '';
137
+ public $carousel_interval = 5;
138
+ public $carousel_width = 300;
139
+ public $carousel_height = 300;
140
+ public $carousel_image_column_number = 5;
141
+ public $carousel_image_par = '0.75';
142
+ public $carousel_enable_title = 0;
143
+ public $carousel_enable_autoplay = 0;
144
+ public $carousel_r_width = 800;
145
+ public $carousel_fit_containerWidth = 1;
146
+ public $carousel_prev_next_butt = 1;
147
+ public $carousel_play_pause_butt = 1;
148
+ public $permissions = 'manage_options';
149
+ public $facebook_app_id = '';
150
+ public $facebook_app_secret = '';
151
+ public $show_tag_box = 0;
152
+ public $show_hide_custom_post = 0;
153
+ public $show_hide_post_meta = 0;
154
+ public $use_inline_stiles_and_scripts = 0;
155
+ public $placeholder = '';
156
+
157
+ public function __construct($reset = false) {
158
+ $wd_bwg_options = get_option('wd_bwg_options');
159
+ $old_images_directory = '';
160
+ if ($wd_bwg_options) {
161
+ $wd_bwg_options = json_decode($wd_bwg_options);
162
+ $old_images_directory = $wd_bwg_options->images_directory;
163
+ if (!$reset) {
164
+ if (isset($wd_bwg_options)) {
165
+ foreach ($wd_bwg_options as $name => $value) {
166
+ $this->$name = $value;
167
+ }
168
+ }
169
+ }
170
+ }
171
+ if (!$this->images_directory) {
172
+ $upload_dir = wp_upload_dir();
173
+ if (!isset($this->old_images_directory) && !is_dir($upload_dir['basedir'] . '/photo-gallery') && !$reset) {
174
+ mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
175
+ }
176
+ $this->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
177
+ }
178
+ $this->old_images_directory = $old_images_directory;
179
+ if (!$this->watermark_url) {
180
+ $watermark_url = WD_BWG_URL . '/images/watermark.png';
181
+ }
182
+ if (!$this->built_in_watermark_url) {
183
+ $built_in_watermark_url = WD_BWG_URL . '/images/watermark.png';
184
+ }
185
+ if ($this->permissions != 'moderate_comments' && $this->permissions != 'publish_posts' && $this->permissions != 'edit_posts') {
186
+ $this->permissions = 'manage_options';
187
+ }
188
+ }
189
+ }
framework/WDWLibrary.php CHANGED
@@ -1,28 +1,7 @@
1
  <?php
2
 
3
  class WDWLibrary {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
-
19
 
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- // Public Methods //
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- // Getters & Setters //
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
  public static function get($key, $default_value = '') {
27
  if (isset($_GET[$key])) {
28
  $value = $_GET[$key];
@@ -674,9 +653,9 @@ class WDWLibrary {
674
  width: <?php echo $search_box_width; ?>px;
675
  }
676
  <?php
677
- global $wd_bwg_inline_stiles;
678
  $inline_style = ob_get_clean();
679
- if ($wd_bwg_inline_stiles) {
680
  wp_add_inline_style('bwg_frontend', $inline_style);
681
  }
682
  else {
@@ -761,8 +740,8 @@ class WDWLibrary {
761
  }
762
  <?php
763
  $inline_style = ob_get_clean();
764
- global $wd_bwg_inline_stiles;
765
- if ($wd_bwg_inline_stiles) {
766
  wp_add_inline_style('bwg_frontend', $inline_style);
767
  }
768
  else {
@@ -871,7 +850,7 @@ class WDWLibrary {
871
 
872
  public static function get_used_google_fonts($theme = null, $shortcode = null) {
873
  global $wpdb;
874
- $options_google_font = $wpdb->get_row('SELECT watermark_font FROM ' . $wpdb->prefix . 'bwg_option');
875
  $google_array = array();
876
  $google_fonts = self::get_google_fonts();
877
  if (null === $theme) {
@@ -911,8 +890,8 @@ class WDWLibrary {
911
  }
912
  }
913
  }
914
- if (true == in_array($options_google_font->watermark_font, $google_fonts)) {
915
- $google_array[$options_google_font->watermark_font] = $options_google_font->watermark_font;
916
  }
917
  return $google_array;
918
  }
@@ -949,12 +928,6 @@ class WDWLibrary {
949
  return $row;
950
  }
951
 
952
- public static function get_options_row_data() {
953
- global $wpdb;
954
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
955
- return $row;
956
- }
957
-
958
  public static function get_tags_rows_data($gallery_id) {
959
  global $wpdb;
960
  $row = $wpdb->get_results('Select t1.* FROM ' . $wpdb->prefix . 'terms AS t1 LEFT JOIN ' . $wpdb->prefix . 'term_taxonomy AS t2 ON t1.term_id = t2.term_id' . ($gallery_id ? ' LEFT JOIN (SELECT DISTINCT tag_id , gallery_id FROM ' . $wpdb->prefix . 'bwg_image_tag) AS t3 ON t1.term_id=t3.tag_id' : '') . ' WHERE taxonomy="bwg_tag"' . ($gallery_id ? ' AND t3.gallery_id="' . $gallery_id . '"' : ''));
@@ -964,20 +937,20 @@ class WDWLibrary {
964
  public static function bwg_create_post($title, $slug, $type, $id) {
965
  $post_type = 'bwg_' . $type['type'];
966
  $bwg_post_id = get_page_by_title($title, OBJECT, $post_type);
967
- $options_row = self::get_options_row_data();
968
  $theme_row = self::get_theme_row_data(0);
969
  switch ($type['mode']) {
970
  case 'compact':
971
- $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="album_compact_preview" theme_id="' . $theme_row->id . '" album_id="' . $id . '" sort_by="order" order_by="asc" compuct_album_column_number="' . $options_row->album_column_number . '" compuct_albums_per_page="' . $options_row->albums_per_page . '" compuct_album_title="' . $options_row->album_title_show_hover . '" compuct_album_view_type="' . $options_row->album_view_type . '" compuct_album_thumb_width="' . $options_row->album_thumb_width . '" compuct_album_thumb_height="' . $options_row->album_thumb_height . '" compuct_album_image_column_number="' . $options_row->image_column_number . '" compuct_album_images_per_page="' . $options_row->images_per_page . '" compuct_album_image_title="' . $options_row->image_title_show_hover . '" compuct_album_image_thumb_width="' . $options_row->thumb_width . '" compuct_album_image_thumb_height="' . $options_row->thumb_height . '" compuct_album_enable_page="' . $options_row->album_enable_page . '" popup_fullscreen="' . $options_row->popup_fullscreen . '" popup_autoplay="' . $options_row->popup_autoplay . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" popup_enable_pinterest="' . $options_row->popup_enable_pinterest . '" popup_enable_tumblr="' . $options_row->popup_enable_tumblr . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '" show_search_box="' . $options_row->show_search_box . '" search_box_width="' . $options_row->search_box_width . '" popup_enable_info="' . $options_row->popup_enable_info . '" popup_info_always_show="' . $options_row->popup_info_always_show . '" popup_enable_rate="' . $options_row->popup_enable_rate . '" popup_hit_counter="' . $options_row->popup_hit_counter . '"]';
972
  break;
973
  case 'masonry':
974
- $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="album_masonry_preview" theme_id="' . $theme_row->id . '" album_id="' . $id . '" sort_by="order" order_by="asc" masonry_album_column_number="' . $options_row->album_column_number . '" masonry_albums_per_page="' . $options_row->albums_per_page . '" masonry_album_title="' . $options_row->album_title_show_hover . '" masonry_album_thumb_width="' . $options_row->album_thumb_width . '" masonry_album_thumb_height="' . $options_row->album_thumb_height . '" masonry_album_image_column_number="' . $options_row->image_column_number . '" masonry_album_images_per_page="' . $options_row->images_per_page . '" masonry_album_image_title="' . $options_row->image_title_show_hover . '" masonry_album_image_thumb_width="' . $options_row->thumb_width . '" masonry_album_image_thumb_height="' . $options_row->thumb_height . '" masonry_album_enable_page="' . $options_row->album_enable_page . '" popup_fullscreen="' . $options_row->popup_fullscreen . '" popup_autoplay="' . $options_row->popup_autoplay . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" popup_enable_pinterest="' . $options_row->popup_enable_pinterest . '" popup_enable_tumblr="' . $options_row->popup_enable_tumblr . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '" show_search_box="' . $options_row->show_search_box . '" search_box_width="' . $options_row->search_box_width . '" popup_enable_info="' . $options_row->popup_enable_info . '" popup_info_always_show="' . $options_row->popup_info_always_show . '" popup_enable_rate="' . $options_row->popup_enable_rate . '" popup_hit_counter="' . $options_row->popup_hit_counter . '"]';
975
  break;
976
  case 'tag':
977
- $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="thumbnails" theme_id="' . $theme_row->id . '" gallery_id="" tag="' . $id . '" sort_by="date" order_by="asc" image_column_number="' . $options_row->image_column_number . '" images_per_page="' . $options_row->images_per_page . '" image_title="' . $options_row->image_title_show_hover . '" image_enable_page="' . $options_row->image_enable_page . '" thumb_width="' . $options_row->thumb_width . '" thumb_height="' . $options_row->thumb_height . '" popup_fullscreen="' . $options_row->popup_fullscreen . '" popup_autoplay="' . $options_row->popup_autoplay . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" popup_enable_pinterest="' . $options_row->popup_enable_pinterest . '" popup_enable_tumblr="' . $options_row->popup_enable_tumblr . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '" show_search_box="' . $options_row->show_search_box . '" search_box_width="' . $options_row->search_box_width . '" popup_enable_info="' . $options_row->popup_enable_info . '" popup_info_always_show="' . $options_row->popup_info_always_show . '" popup_enable_rate="' . $options_row->popup_enable_rate . '" popup_hit_counter="' . $options_row->popup_hit_counter . '" thumb_click_action="' . $options_row->thumb_click_action . '" thumb_link_target="' . $options_row->thumb_link_target . '"]';
978
  break;
979
  default:
980
- $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="thumbnails" theme_id="' . $theme_row->id . '" gallery_id="' . $id . '" sort_by="date" order_by="asc" image_column_number="' . $options_row->image_column_number . '" images_per_page="' . $options_row->images_per_page . '" image_title="' . $options_row->image_title_show_hover . '" image_enable_page="' . $options_row->image_enable_page . '" thumb_width="' . $options_row->thumb_width . '" thumb_height="' . $options_row->thumb_height . '" popup_fullscreen="' . $options_row->popup_fullscreen . '" popup_autoplay="' . $options_row->popup_autoplay . '" popup_width="' . $options_row->popup_width . '" popup_height="' . $options_row->popup_height . '" popup_effect="' . $options_row->popup_type . '" popup_interval="' . $options_row->popup_interval . '" popup_enable_filmstrip="' . $options_row->popup_enable_filmstrip . '" popup_filmstrip_height="' . $options_row->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $options_row->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $options_row->popup_enable_fullscreen . '" popup_enable_comment="' . $options_row->popup_enable_comment . '" popup_enable_facebook="' . $options_row->popup_enable_facebook . '" popup_enable_twitter="' . $options_row->popup_enable_twitter . '" popup_enable_google="' . $options_row->popup_enable_google . '" popup_enable_pinterest="' . $options_row->popup_enable_pinterest . '" popup_enable_tumblr="' . $options_row->popup_enable_tumblr . '" watermark_type="' . $options_row->watermark_type . '" watermark_link="' . $options_row->watermark_link . '" watermark_text="' . $options_row->watermark_text . '" watermark_font_size="' . $options_row->watermark_font_size . '" watermark_font="' . $options_row->watermark_font . '" watermark_color="' . $options_row->watermark_color . '" watermark_opacity="' . $options_row->watermark_opacity . '" watermark_position="' . $options_row->watermark_position . '" watermark_url="' . $options_row->watermark_url . '" watermark_width="' . $options_row->watermark_width . '" watermark_height="' . $options_row->watermark_height . '" show_search_box="' . $options_row->show_search_box . '" search_box_width="' . $options_row->search_box_width . '" popup_enable_info="' . $options_row->popup_enable_info . '" popup_info_always_show="' . $options_row->popup_info_always_show . '" popup_enable_rate="' . $options_row->popup_enable_rate . '" popup_hit_counter="' . $options_row->popup_hit_counter . '" thumb_click_action="' . $options_row->thumb_click_action . '" thumb_link_target="' . $options_row->thumb_link_target . '"]';
981
  break;
982
  }
983
  if (!$bwg_post_id) {
@@ -1098,10 +1071,4 @@ class WDWLibrary {
1098
 
1099
  return array('rows' => $row, 'page_nav' => $page_nav);
1100
  }
1101
- ////////////////////////////////////////////////////////////////////////////////////////
1102
- // Private Methods //
1103
- ////////////////////////////////////////////////////////////////////////////////////////
1104
- ////////////////////////////////////////////////////////////////////////////////////////
1105
- // Listeners //
1106
- ////////////////////////////////////////////////////////////////////////////////////////
1107
  }
1
  <?php
2
 
3
  class WDWLibrary {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
 
 
 
 
 
 
5
  public static function get($key, $default_value = '') {
6
  if (isset($_GET[$key])) {
7
  $value = $_GET[$key];
653
  width: <?php echo $search_box_width; ?>px;
654
  }
655
  <?php
656
+ global $wd_bwg_options;
657
  $inline_style = ob_get_clean();
658
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
659
  wp_add_inline_style('bwg_frontend', $inline_style);
660
  }
661
  else {
740
  }
741
  <?php
742
  $inline_style = ob_get_clean();
743
+ global $wd_bwg_options;
744
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
745
  wp_add_inline_style('bwg_frontend', $inline_style);
746
  }
747
  else {
850
 
851
  public static function get_used_google_fonts($theme = null, $shortcode = null) {
852
  global $wpdb;
853
+ global $wd_bwg_options;
854
  $google_array = array();
855
  $google_fonts = self::get_google_fonts();
856
  if (null === $theme) {
890
  }
891
  }
892
  }
893
+ if (true == in_array($wd_bwg_options->watermark_font, $google_fonts)) {
894
+ $google_array[$wd_bwg_options->watermark_font] = $wd_bwg_options->watermark_font;
895
  }
896
  return $google_array;
897
  }
928
  return $row;
929
  }
930
 
 
 
 
 
 
 
931
  public static function get_tags_rows_data($gallery_id) {
932
  global $wpdb;
933
  $row = $wpdb->get_results('Select t1.* FROM ' . $wpdb->prefix . 'terms AS t1 LEFT JOIN ' . $wpdb->prefix . 'term_taxonomy AS t2 ON t1.term_id = t2.term_id' . ($gallery_id ? ' LEFT JOIN (SELECT DISTINCT tag_id , gallery_id FROM ' . $wpdb->prefix . 'bwg_image_tag) AS t3 ON t1.term_id=t3.tag_id' : '') . ' WHERE taxonomy="bwg_tag"' . ($gallery_id ? ' AND t3.gallery_id="' . $gallery_id . '"' : ''));
937
  public static function bwg_create_post($title, $slug, $type, $id) {
938
  $post_type = 'bwg_' . $type['type'];
939
  $bwg_post_id = get_page_by_title($title, OBJECT, $post_type);
940
+ global $wd_bwg_options;
941
  $theme_row = self::get_theme_row_data(0);
942
  switch ($type['mode']) {
943
  case 'compact':
944
+ $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="album_compact_preview" theme_id="' . $theme_row->id . '" album_id="' . $id . '" sort_by="order" order_by="asc" compuct_album_column_number="' . $wd_bwg_options->album_column_number . '" compuct_albums_per_page="' . $wd_bwg_options->albums_per_page . '" compuct_album_title="' . $wd_bwg_options->album_title_show_hover . '" compuct_album_view_type="' . $wd_bwg_options->album_view_type . '" compuct_album_thumb_width="' . $wd_bwg_options->album_thumb_width . '" compuct_album_thumb_height="' . $wd_bwg_options->album_thumb_height . '" compuct_album_image_column_number="' . $wd_bwg_options->image_column_number . '" compuct_album_images_per_page="' . $wd_bwg_options->images_per_page . '" compuct_album_image_title="' . $wd_bwg_options->image_title_show_hover . '" compuct_album_image_thumb_width="' . $wd_bwg_options->thumb_width . '" compuct_album_image_thumb_height="' . $wd_bwg_options->thumb_height . '" compuct_album_enable_page="' . $wd_bwg_options->album_enable_page . '" popup_fullscreen="' . $wd_bwg_options->popup_fullscreen . '" popup_autoplay="' . $wd_bwg_options->popup_autoplay . '" popup_width="' . $wd_bwg_options->popup_width . '" popup_height="' . $wd_bwg_options->popup_height . '" popup_effect="' . $wd_bwg_options->popup_type . '" popup_interval="' . $wd_bwg_options->popup_interval . '" popup_enable_filmstrip="' . $wd_bwg_options->popup_enable_filmstrip . '" popup_filmstrip_height="' . $wd_bwg_options->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $wd_bwg_options->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $wd_bwg_options->popup_enable_fullscreen . '" popup_enable_comment="' . $wd_bwg_options->popup_enable_comment . '" popup_enable_facebook="' . $wd_bwg_options->popup_enable_facebook . '" popup_enable_twitter="' . $wd_bwg_options->popup_enable_twitter . '" popup_enable_google="' . $wd_bwg_options->popup_enable_google . '" popup_enable_pinterest="' . $wd_bwg_options->popup_enable_pinterest . '" popup_enable_tumblr="' . $wd_bwg_options->popup_enable_tumblr . '" watermark_type="' . $wd_bwg_options->watermark_type . '" watermark_link="' . $wd_bwg_options->watermark_link . '" watermark_text="' . $wd_bwg_options->watermark_text . '" watermark_font_size="' . $wd_bwg_options->watermark_font_size . '" watermark_font="' . $wd_bwg_options->watermark_font . '" watermark_color="' . $wd_bwg_options->watermark_color . '" watermark_opacity="' . $wd_bwg_options->watermark_opacity . '" watermark_position="' . $wd_bwg_options->watermark_position . '" watermark_url="' . $wd_bwg_options->watermark_url . '" watermark_width="' . $wd_bwg_options->watermark_width . '" watermark_height="' . $wd_bwg_options->watermark_height . '" show_search_box="' . $wd_bwg_options->show_search_box . '" search_box_width="' . $wd_bwg_options->search_box_width . '" popup_enable_info="' . $wd_bwg_options->popup_enable_info . '" popup_info_always_show="' . $wd_bwg_options->popup_info_always_show . '" popup_enable_rate="' . $wd_bwg_options->popup_enable_rate . '" popup_hit_counter="' . $wd_bwg_options->popup_hit_counter . '"]';
945
  break;
946
  case 'masonry':
947
+ $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="album_masonry_preview" theme_id="' . $theme_row->id . '" album_id="' . $id . '" sort_by="order" order_by="asc" masonry_album_column_number="' . $wd_bwg_options->album_column_number . '" masonry_albums_per_page="' . $wd_bwg_options->albums_per_page . '" masonry_album_title="' . $wd_bwg_options->album_title_show_hover . '" masonry_album_thumb_width="' . $wd_bwg_options->album_thumb_width . '" masonry_album_thumb_height="' . $wd_bwg_options->album_thumb_height . '" masonry_album_image_column_number="' . $wd_bwg_options->image_column_number . '" masonry_album_images_per_page="' . $wd_bwg_options->images_per_page . '" masonry_album_image_title="' . $wd_bwg_options->image_title_show_hover . '" masonry_album_image_thumb_width="' . $wd_bwg_options->thumb_width . '" masonry_album_image_thumb_height="' . $wd_bwg_options->thumb_height . '" masonry_album_enable_page="' . $wd_bwg_options->album_enable_page . '" popup_fullscreen="' . $wd_bwg_options->popup_fullscreen . '" popup_autoplay="' . $wd_bwg_options->popup_autoplay . '" popup_width="' . $wd_bwg_options->popup_width . '" popup_height="' . $wd_bwg_options->popup_height . '" popup_effect="' . $wd_bwg_options->popup_type . '" popup_interval="' . $wd_bwg_options->popup_interval . '" popup_enable_filmstrip="' . $wd_bwg_options->popup_enable_filmstrip . '" popup_filmstrip_height="' . $wd_bwg_options->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $wd_bwg_options->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $wd_bwg_options->popup_enable_fullscreen . '" popup_enable_comment="' . $wd_bwg_options->popup_enable_comment . '" popup_enable_facebook="' . $wd_bwg_options->popup_enable_facebook . '" popup_enable_twitter="' . $wd_bwg_options->popup_enable_twitter . '" popup_enable_google="' . $wd_bwg_options->popup_enable_google . '" popup_enable_pinterest="' . $wd_bwg_options->popup_enable_pinterest . '" popup_enable_tumblr="' . $wd_bwg_options->popup_enable_tumblr . '" watermark_type="' . $wd_bwg_options->watermark_type . '" watermark_link="' . $wd_bwg_options->watermark_link . '" watermark_text="' . $wd_bwg_options->watermark_text . '" watermark_font_size="' . $wd_bwg_options->watermark_font_size . '" watermark_font="' . $wd_bwg_options->watermark_font . '" watermark_color="' . $wd_bwg_options->watermark_color . '" watermark_opacity="' . $wd_bwg_options->watermark_opacity . '" watermark_position="' . $wd_bwg_options->watermark_position . '" watermark_url="' . $wd_bwg_options->watermark_url . '" watermark_width="' . $wd_bwg_options->watermark_width . '" watermark_height="' . $wd_bwg_options->watermark_height . '" show_search_box="' . $wd_bwg_options->show_search_box . '" search_box_width="' . $wd_bwg_options->search_box_width . '" popup_enable_info="' . $wd_bwg_options->popup_enable_info . '" popup_info_always_show="' . $wd_bwg_options->popup_info_always_show . '" popup_enable_rate="' . $wd_bwg_options->popup_enable_rate . '" popup_hit_counter="' . $wd_bwg_options->popup_hit_counter . '"]';
948
  break;
949
  case 'tag':
950
+ $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="thumbnails" theme_id="' . $theme_row->id . '" gallery_id="" tag="' . $id . '" sort_by="date" order_by="asc" image_column_number="' . $wd_bwg_options->image_column_number . '" images_per_page="' . $wd_bwg_options->images_per_page . '" image_title="' . $wd_bwg_options->image_title_show_hover . '" image_enable_page="' . $wd_bwg_options->image_enable_page . '" thumb_width="' . $wd_bwg_options->thumb_width . '" thumb_height="' . $wd_bwg_options->thumb_height . '" popup_fullscreen="' . $wd_bwg_options->popup_fullscreen . '" popup_autoplay="' . $wd_bwg_options->popup_autoplay . '" popup_width="' . $wd_bwg_options->popup_width . '" popup_height="' . $wd_bwg_options->popup_height . '" popup_effect="' . $wd_bwg_options->popup_type . '" popup_interval="' . $wd_bwg_options->popup_interval . '" popup_enable_filmstrip="' . $wd_bwg_options->popup_enable_filmstrip . '" popup_filmstrip_height="' . $wd_bwg_options->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $wd_bwg_options->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $wd_bwg_options->popup_enable_fullscreen . '" popup_enable_comment="' . $wd_bwg_options->popup_enable_comment . '" popup_enable_facebook="' . $wd_bwg_options->popup_enable_facebook . '" popup_enable_twitter="' . $wd_bwg_options->popup_enable_twitter . '" popup_enable_google="' . $wd_bwg_options->popup_enable_google . '" popup_enable_pinterest="' . $wd_bwg_options->popup_enable_pinterest . '" popup_enable_tumblr="' . $wd_bwg_options->popup_enable_tumblr . '" watermark_type="' . $wd_bwg_options->watermark_type . '" watermark_link="' . $wd_bwg_options->watermark_link . '" watermark_text="' . $wd_bwg_options->watermark_text . '" watermark_font_size="' . $wd_bwg_options->watermark_font_size . '" watermark_font="' . $wd_bwg_options->watermark_font . '" watermark_color="' . $wd_bwg_options->watermark_color . '" watermark_opacity="' . $wd_bwg_options->watermark_opacity . '" watermark_position="' . $wd_bwg_options->watermark_position . '" watermark_url="' . $wd_bwg_options->watermark_url . '" watermark_width="' . $wd_bwg_options->watermark_width . '" watermark_height="' . $wd_bwg_options->watermark_height . '" show_search_box="' . $wd_bwg_options->show_search_box . '" search_box_width="' . $wd_bwg_options->search_box_width . '" popup_enable_info="' . $wd_bwg_options->popup_enable_info . '" popup_info_always_show="' . $wd_bwg_options->popup_info_always_show . '" popup_enable_rate="' . $wd_bwg_options->popup_enable_rate . '" popup_hit_counter="' . $wd_bwg_options->popup_hit_counter . '" thumb_click_action="' . $wd_bwg_options->thumb_click_action . '" thumb_link_target="' . $wd_bwg_options->thumb_link_target . '"]';
951
  break;
952
  default:
953
+ $shortecode_string = '[Best_Wordpress_Gallery type="' . $type['type'] . '" gallery_type="thumbnails" theme_id="' . $theme_row->id . '" gallery_id="' . $id . '" sort_by="date" order_by="asc" image_column_number="' . $wd_bwg_options->image_column_number . '" images_per_page="' . $wd_bwg_options->images_per_page . '" image_title="' . $wd_bwg_options->image_title_show_hover . '" image_enable_page="' . $wd_bwg_options->image_enable_page . '" thumb_width="' . $wd_bwg_options->thumb_width . '" thumb_height="' . $wd_bwg_options->thumb_height . '" popup_fullscreen="' . $wd_bwg_options->popup_fullscreen . '" popup_autoplay="' . $wd_bwg_options->popup_autoplay . '" popup_width="' . $wd_bwg_options->popup_width . '" popup_height="' . $wd_bwg_options->popup_height . '" popup_effect="' . $wd_bwg_options->popup_type . '" popup_interval="' . $wd_bwg_options->popup_interval . '" popup_enable_filmstrip="' . $wd_bwg_options->popup_enable_filmstrip . '" popup_filmstrip_height="' . $wd_bwg_options->popup_filmstrip_height . '" popup_enable_ctrl_btn="' . $wd_bwg_options->popup_enable_ctrl_btn . '" popup_enable_fullscreen="' . $wd_bwg_options->popup_enable_fullscreen . '" popup_enable_comment="' . $wd_bwg_options->popup_enable_comment . '" popup_enable_facebook="' . $wd_bwg_options->popup_enable_facebook . '" popup_enable_twitter="' . $wd_bwg_options->popup_enable_twitter . '" popup_enable_google="' . $wd_bwg_options->popup_enable_google . '" popup_enable_pinterest="' . $wd_bwg_options->popup_enable_pinterest . '" popup_enable_tumblr="' . $wd_bwg_options->popup_enable_tumblr . '" watermark_type="' . $wd_bwg_options->watermark_type . '" watermark_link="' . $wd_bwg_options->watermark_link . '" watermark_text="' . $wd_bwg_options->watermark_text . '" watermark_font_size="' . $wd_bwg_options->watermark_font_size . '" watermark_font="' . $wd_bwg_options->watermark_font . '" watermark_color="' . $wd_bwg_options->watermark_color . '" watermark_opacity="' . $wd_bwg_options->watermark_opacity . '" watermark_position="' . $wd_bwg_options->watermark_position . '" watermark_url="' . $wd_bwg_options->watermark_url . '" watermark_width="' . $wd_bwg_options->watermark_width . '" watermark_height="' . $wd_bwg_options->watermark_height . '" show_search_box="' . $wd_bwg_options->show_search_box . '" search_box_width="' . $wd_bwg_options->search_box_width . '" popup_enable_info="' . $wd_bwg_options->popup_enable_info . '" popup_info_always_show="' . $wd_bwg_options->popup_info_always_show . '" popup_enable_rate="' . $wd_bwg_options->popup_enable_rate . '" popup_hit_counter="' . $wd_bwg_options->popup_hit_counter . '" thumb_click_action="' . $wd_bwg_options->thumb_click_action . '" thumb_link_target="' . $wd_bwg_options->thumb_link_target . '"]';
954
  break;
955
  }
956
  if (!$bwg_post_id) {
1071
 
1072
  return array('rows' => $row, 'page_nav' => $page_nav);
1073
  }
 
 
 
 
 
 
1074
  }
frontend/controllers/BWGControllerGalleryBox.php CHANGED
@@ -41,15 +41,15 @@ class BWGControllerGalleryBox {
41
  public function save() {
42
  require_once WD_BWG_DIR . "/frontend/models/BWGModelGalleryBox.php";
43
  $model = new BWGModelGalleryBox();
44
- $option_row = WDWLibrary::get_options_row_data();
45
- if ($option_row->popup_enable_email) {
46
  // Email validation.
47
  $email = (isset($_POST['bwg_email']) ? is_email(stripslashes($_POST['bwg_email'])) : FALSE);
48
  }
49
  else {
50
  $email = TRUE;
51
  }
52
- if ($option_row->popup_enable_captcha) {
53
  $bwg_captcha_input = (isset($_POST['bwg_captcha_input']) ? esc_html(stripslashes($_POST['bwg_captcha_input'])) : '');
54
  @session_start();
55
  $bwg_captcha_code = (isset($_SESSION['bwg_captcha_code']) ? esc_html(stripslashes($_SESSION['bwg_captcha_code'])) : '');
@@ -70,7 +70,7 @@ class BWGControllerGalleryBox {
70
  $name = (isset($_POST['bwg_name']) ? esc_html(stripslashes($_POST['bwg_name'])) : '');
71
  $bwg_comment = (isset($_POST['bwg_comment']) ? esc_html(stripslashes($_POST['bwg_comment'])) : '');
72
  $bwg_email = (isset($_POST['bwg_email']) ? esc_html(stripslashes($_POST['bwg_email'])) : '');
73
- $published = (current_user_can('manage_options') || !$option_row->comment_moderation) ? 1 : 0;
74
  $save = $wpdb->insert($wpdb->prefix . 'bwg_image_comment', array(
75
  'image_id' => $image_id,
76
  'name' => $name,
41
  public function save() {
42
  require_once WD_BWG_DIR . "/frontend/models/BWGModelGalleryBox.php";
43
  $model = new BWGModelGalleryBox();
44
+ global $wd_bwg_options;
45
+ if ($wd_bwg_options->popup_enable_email) {
46
  // Email validation.
47
  $email = (isset($_POST['bwg_email']) ? is_email(stripslashes($_POST['bwg_email'])) : FALSE);
48
  }
49
  else {
50
  $email = TRUE;
51
  }
52
+ if ($wd_bwg_options->popup_enable_captcha) {
53
  $bwg_captcha_input = (isset($_POST['bwg_captcha_input']) ? esc_html(stripslashes($_POST['bwg_captcha_input'])) : '');
54
  @session_start();
55
  $bwg_captcha_code = (isset($_SESSION['bwg_captcha_code']) ? esc_html(stripslashes($_SESSION['bwg_captcha_code'])) : '');
70
  $name = (isset($_POST['bwg_name']) ? esc_html(stripslashes($_POST['bwg_name'])) : '');
71
  $bwg_comment = (isset($_POST['bwg_comment']) ? esc_html(stripslashes($_POST['bwg_comment'])) : '');
72
  $bwg_email = (isset($_POST['bwg_email']) ? esc_html(stripslashes($_POST['bwg_email'])) : '');
73
+ $published = (current_user_can('manage_options') || !$wd_bwg_options->comment_moderation) ? 1 : 0;
74
  $save = $wpdb->insert($wpdb->prefix . 'bwg_image_comment', array(
75
  'image_id' => $image_id,
76
  'name' => $name,
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -64,17 +64,17 @@ class BWGViewAlbum_compact_preview {
64
  if (!isset($params['show_tag_box'])) {
65
  $params['show_tag_box'] = 0;
66
  }
67
- $options_row = WDWLibrary::get_options_row_data();
68
- $placeholder = isset($options_row->placeholder) ? $options_row->placeholder : '';
69
  if (!isset($params['show_album_name'])) {
70
- $params['show_album_name'] = $options_row->show_album_name;
71
  }
72
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
73
  $type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
74
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
75
  $sort_direction = $params['order_by'];
76
 
77
- $play_icon = $options_row->play_icon;
78
  if ($from === "widget") {
79
  $params['album_id'] = $params['id'];
80
  $params['sort_by'] = $params['show'] == 'random' ? 'RAND()' : 'order';
@@ -82,46 +82,46 @@ class BWGViewAlbum_compact_preview {
82
  $sort_direction = 'DESC';
83
  }
84
  $params['compuct_albums_per_page'] = $params['count'];
85
- $params['compuct_album_column_number'] = $options_row->album_column_number;
86
- $params['compuct_album_image_column_number'] = $options_row->image_column_number;
87
  $params['compuct_album_thumb_width'] = $params['width'];
88
  $params['compuct_album_thumb_height'] = $params['height'];
89
  $params['compuct_album_image_thumb_width'] = $params['width'];
90
  $params['compuct_album_image_thumb_height'] = $params['height'];
91
- $params['compuct_album_title'] = $options_row->album_title_show_hover;
92
  $params['compuct_album_enable_page'] = 0;
93
- $params['compuct_album_image_title'] = $options_row->image_title_show_hover;
94
- $params['popup_width'] = $options_row->popup_width;
95
- $params['popup_height'] = $options_row->popup_height;
96
- $params['popup_effect'] = $options_row->popup_type;
97
- $params['popup_enable_filmstrip'] = $options_row->popup_enable_filmstrip;
98
- $params['popup_filmstrip_height'] = $options_row->popup_filmstrip_height;
99
- $params['popup_enable_ctrl_btn'] = $options_row->popup_enable_ctrl_btn;
100
- $params['popup_enable_fullscreen'] = $options_row->popup_enable_fullscreen;
101
- $params['popup_enable_info'] = $options_row->popup_enable_info;
102
- $params['popup_info_always_show'] = $options_row->popup_info_always_show;
103
- $params['popup_info_full_width'] = $options_row->popup_info_full_width;
104
- $params['popup_hit_counter'] = $options_row->popup_hit_counter;
105
- $params['popup_enable_rate'] = $options_row->popup_enable_rate;
106
- $params['popup_interval'] = $options_row->popup_interval;
107
- $params['popup_enable_comment'] = $options_row->popup_enable_comment;
108
- $params['popup_enable_facebook'] = $options_row->popup_enable_facebook;
109
- $params['popup_enable_twitter'] = $options_row->popup_enable_twitter;
110
- $params['popup_enable_google'] = $options_row->popup_enable_google;
111
- $params['popup_enable_pinterest'] = $options_row->popup_enable_pinterest;
112
- $params['popup_enable_tumblr'] = $options_row->popup_enable_tumblr;
113
- $params['watermark_type'] = $options_row->watermark_type;
114
- $params['watermark_link'] = urlencode($options_row->watermark_link);
115
- $params['watermark_opacity'] = $options_row->watermark_opacity;
116
- $params['watermark_position'] = $options_row->watermark_position;
117
- $params['watermark_text'] = $options_row->watermark_text;
118
- $params['watermark_font_size'] = $options_row->watermark_font_size;
119
- $params['watermark_font'] = $options_row->watermark_font;
120
- $params['watermark_color'] = $options_row->watermark_color;
121
- $params['watermark_url'] = urlencode($options_row->watermark_url);
122
- $params['watermark_width'] = $options_row->watermark_width;
123
- $params['watermark_height'] = $options_row->watermark_height;
124
- $params['popup_effect_duration'] = isset($options_row->popup_effect_duration) ? $options_row->popup_effect_duration : 1;
125
  }
126
 
127
  $theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
@@ -247,11 +247,10 @@ class BWGViewAlbum_compact_preview {
247
  }
248
  $params_array_hash = $params_array;
249
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
250
- $image_right_click = $options_row->image_right_click;
251
 
252
  $inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_gallery_div_class, $items_col_num, $album_view_type);
253
- global $wd_bwg_inline_stiles;
254
- if ($wd_bwg_inline_stiles) {
255
  wp_enqueue_style('bwg_frontend');
256
  wp_add_inline_style('bwg_frontend', $inline_style);
257
  wp_enqueue_style('bwg_font-awesome');
@@ -291,14 +290,14 @@ class BWGViewAlbum_compact_preview {
291
  </div>
292
  <?php
293
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
294
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['compuct_album_enable_page']);
295
  }
296
  if ($bwg_previous_album_id != $params['album_id']) {
297
  ?>
298
  <a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back', '', 'album')"><?php echo __('Back', 'bwg'); ?></a>
299
  <?php
300
  }
301
- if ($options_row->show_album_name) {
302
  if ($type == 'gallery') {
303
  ?>
304
  <div class="bwg_back_<?php echo $bwg; ?>" ><?php echo isset($_POST['title_' . $bwg]) ? esc_html($_POST['title_' . $bwg]) : ''; ?></div>
@@ -386,7 +385,7 @@ class BWGViewAlbum_compact_preview {
386
  }
387
  if ($type != 'gallery') {
388
  ?>
389
- <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($from !== "widget" ? ($options_row->enable_seo ? "href='" . esc_url(add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI'])) . "'" : "") . " data-alb_gal_id=\"" . $album_galallery_row->alb_gal_id . "\" data-def_type=\"" . $def_type . "\" data-title=\"" . htmlspecialchars(addslashes($title)) . "\"" : "href='" . $permalink . "'") ?>>
390
  <span class="bwg_album_thumb_<?php echo $bwg; ?>">
391
  <?php
392
  if ($params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
@@ -486,7 +485,7 @@ class BWGViewAlbum_compact_preview {
486
  $thumb_top = ($params['compuct_album_image_thumb_height'] - $image_thumb_height) / 2;
487
  ?>
488
 
489
- <a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($options_row->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-gallery-id="' . $album_gallery_id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
490
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
491
  <?php
492
  if ($params['compuct_album_image_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
@@ -542,7 +541,7 @@ class BWGViewAlbum_compact_preview {
542
  </div>
543
  <?php
544
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
545
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['compuct_album_enable_page']);
546
  }
547
  ?>
548
  </div>
64
  if (!isset($params['show_tag_box'])) {
65
  $params['show_tag_box'] = 0;
66
  }
67
+ global $wd_bwg_options;
68
+ $placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
69
  if (!isset($params['show_album_name'])) {
70
+ $params['show_album_name'] = $wd_bwg_options->show_album_name;
71
  }
72
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
73
  $type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
74
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
75
  $sort_direction = $params['order_by'];
76
 
77
+ $play_icon = $wd_bwg_options->play_icon;
78
  if ($from === "widget") {
79
  $params['album_id'] = $params['id'];
80
  $params['sort_by'] = $params['show'] == 'random' ? 'RAND()' : 'order';
82
  $sort_direction = 'DESC';
83
  }
84
  $params['compuct_albums_per_page'] = $params['count'];
85
+ $params['compuct_album_column_number'] = $wd_bwg_options->album_column_number;
86
+ $params['compuct_album_image_column_number'] = $wd_bwg_options->image_column_number;
87
  $params['compuct_album_thumb_width'] = $params['width'];
88
  $params['compuct_album_thumb_height'] = $params['height'];
89
  $params['compuct_album_image_thumb_width'] = $params['width'];
90
  $params['compuct_album_image_thumb_height'] = $params['height'];
91
+ $params['compuct_album_title'] = $wd_bwg_options->album_title_show_hover;
92
  $params['compuct_album_enable_page'] = 0;
93
+ $params['compuct_album_image_title'] = $wd_bwg_options->image_title_show_hover;
94
+ $params['popup_width'] = $wd_bwg_options->popup_width;
95
+ $params['popup_height'] = $wd_bwg_options->popup_height;
96
+ $params['popup_effect'] = $wd_bwg_options->popup_type;
97
+ $params['popup_enable_filmstrip'] = $wd_bwg_options->popup_enable_filmstrip;
98
+ $params['popup_filmstrip_height'] = $wd_bwg_options->popup_filmstrip_height;
99
+ $params['popup_enable_ctrl_btn'] = $wd_bwg_options->popup_enable_ctrl_btn;
100
+ $params['popup_enable_fullscreen'] = $wd_bwg_options->popup_enable_fullscreen;
101
+ $params['popup_enable_info'] = $wd_bwg_options->popup_enable_info;
102
+ $params['popup_info_always_show'] = $wd_bwg_options->popup_info_always_show;
103
+ $params['popup_info_full_width'] = $wd_bwg_options->popup_info_full_width;
104
+ $params['popup_hit_counter'] = $wd_bwg_options->popup_hit_counter;
105
+ $params['popup_enable_rate'] = $wd_bwg_options->popup_enable_rate;
106
+ $params['popup_interval'] = $wd_bwg_options->popup_interval;
107
+ $params['popup_enable_comment'] = $wd_bwg_options->popup_enable_comment;
108
+ $params['popup_enable_facebook'] = $wd_bwg_options->popup_enable_facebook;
109
+ $params['popup_enable_twitter'] = $wd_bwg_options->popup_enable_twitter;
110
+ $params['popup_enable_google'] = $wd_bwg_options->popup_enable_google;
111
+ $params['popup_enable_pinterest'] = $wd_bwg_options->popup_enable_pinterest;
112
+ $params['popup_enable_tumblr'] = $wd_bwg_options->popup_enable_tumblr;
113
+ $params['watermark_type'] = $wd_bwg_options->watermark_type;
114
+ $params['watermark_link'] = urlencode($wd_bwg_options->watermark_link);
115
+ $params['watermark_opacity'] = $wd_bwg_options->watermark_opacity;
116
+ $params['watermark_position'] = $wd_bwg_options->watermark_position;
117
+ $params['watermark_text'] = $wd_bwg_options->watermark_text;
118
+ $params['watermark_font_size'] = $wd_bwg_options->watermark_font_size;
119
+ $params['watermark_font'] = $wd_bwg_options->watermark_font;
120
+ $params['watermark_color'] = $wd_bwg_options->watermark_color;
121
+ $params['watermark_url'] = urlencode($wd_bwg_options->watermark_url);
122
+ $params['watermark_width'] = $wd_bwg_options->watermark_width;
123
+ $params['watermark_height'] = $wd_bwg_options->watermark_height;
124
+ $params['popup_effect_duration'] = isset($wd_bwg_options->popup_effect_duration) ? $wd_bwg_options->popup_effect_duration : 1;
125
  }
126
 
127
  $theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
247
  }
248
  $params_array_hash = $params_array;
249
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
250
+ $image_right_click = $wd_bwg_options->image_right_click;
251
 
252
  $inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_gallery_div_class, $items_col_num, $album_view_type);
253
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
 
254
  wp_enqueue_style('bwg_frontend');
255
  wp_add_inline_style('bwg_frontend', $inline_style);
256
  wp_enqueue_style('bwg_font-awesome');
290
  </div>
291
  <?php
292
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
293
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $wd_bwg_options->enable_seo, $params['compuct_album_enable_page']);
294
  }
295
  if ($bwg_previous_album_id != $params['album_id']) {
296
  ?>
297
  <a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back', '', 'album')"><?php echo __('Back', 'bwg'); ?></a>
298
  <?php
299
  }
300
+ if ($wd_bwg_options->show_album_name) {
301
  if ($type == 'gallery') {
302
  ?>
303
  <div class="bwg_back_<?php echo $bwg; ?>" ><?php echo isset($_POST['title_' . $bwg]) ? esc_html($_POST['title_' . $bwg]) : ''; ?></div>
385
  }
386
  if ($type != 'gallery') {
387
  ?>
388
+ <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($from !== "widget" ? ($wd_bwg_options->enable_seo ? "href='" . esc_url(add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI'])) . "'" : "") . " data-alb_gal_id=\"" . $album_galallery_row->alb_gal_id . "\" data-def_type=\"" . $def_type . "\" data-title=\"" . htmlspecialchars(addslashes($title)) . "\"" : "href='" . $permalink . "'") ?>>
389
  <span class="bwg_album_thumb_<?php echo $bwg; ?>">
390
  <?php
391
  if ($params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
485
  $thumb_top = ($params['compuct_album_image_thumb_height'] - $image_thumb_height) / 2;
486
  ?>
487
 
488
+ <a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($wd_bwg_options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-gallery-id="' . $album_gallery_id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
489
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
490
  <?php
491
  if ($params['compuct_album_image_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
541
  </div>
542
  <?php
543
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
544
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $wd_bwg_options->enable_seo, $params['compuct_album_enable_page']);
545
  }
546
  ?>
547
  </div>
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -3,9 +3,9 @@ class BWGViewAlbum_extended_preview {
3
  public function display($params, $from_shortcode = 0, $bwg = 0) {
4
  global $WD_BWG_UPLOAD_DIR;
5
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
6
- $options_row = WDWLibrary::get_options_row_data();
7
- $placeholder = isset($options_row->placeholder) ? $options_row->placeholder : '';
8
- $play_icon = $options_row->play_icon;
9
 
10
  if (!isset($params['extended_album_image_title'])) {
11
  $params['extended_album_image_title'] = 'none';
@@ -190,11 +190,10 @@ class BWGViewAlbum_extended_preview {
190
  $params_array['watermark_height'] = $params['watermark_height'];
191
  }
192
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
193
- $image_right_click = $options_row->image_right_click;
194
 
195
  $inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_view_type);
196
- global $wd_bwg_inline_stiles;
197
- if ($wd_bwg_inline_stiles) {
198
  wp_enqueue_style('bwg_frontend');
199
  wp_add_inline_style('bwg_frontend', $inline_style);
200
  wp_enqueue_style('bwg_font-awesome');
@@ -234,13 +233,30 @@ class BWGViewAlbum_extended_preview {
234
  </div>
235
  <?php
236
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
237
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['extended_album_enable_page']);
238
  }
239
  if ($bwg_previous_album_id != $params['album_id']) {
240
  ?>
241
  <a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back', '', 'album')"><?php echo __('Back', 'bwg'); ?></a>
242
  <?php
243
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  ?>
245
  <div id="<?php echo $album_gallery_div_id; ?>" class="<?php echo $album_gallery_div_class; ?>">
246
  <input type="hidden" id="bwg_previous_album_id_<?php echo $bwg; ?>" name="bwg_previous_album_id_<?php echo $bwg; ?>" value="<?php echo $bwg_previous_album_id; ?>" />
@@ -317,7 +333,7 @@ class BWGViewAlbum_extended_preview {
317
  ?>
318
  <div class="bwg_album_extended_div_<?php echo $bwg; ?>">
319
  <div class="bwg_album_extended_thumb_div_<?php echo $bwg; ?>">
320
- <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($options_row->enable_seo ? 'href="' . esc_url(add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI'])) . '"' : ''); ?> style="font-size: 0;" data-alb_gal_id="<?php echo $album_galallery_row->alb_gal_id; ?>" data-def_type="<?php echo $def_type; ?>" data-title="<?php htmlspecialchars(addslashes($title)); ?>">
321
  <span class="bwg_album_thumb_<?php echo $bwg; ?>" style="height:inherit;">
322
  <span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
323
  <span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
@@ -331,7 +347,7 @@ class BWGViewAlbum_extended_preview {
331
  <?php
332
  if ($title) {
333
  ?>
334
- <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($options_row->enable_seo ? 'href="' . esc_url(add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI'])) . '"' : ''); ?> style="font-size: 0;" data-alb_gal_id="<?php echo $album_galallery_row->alb_gal_id; ?>" data-def_type="<?php echo $def_type; ?>" data-title="<?php htmlspecialchars(addslashes($title)); ?>">
335
  <span class="bwg_title_spun_<?php echo $bwg; ?>"><?php echo $title; ?></span>
336
  </a>
337
  <?php
@@ -372,23 +388,6 @@ class BWGViewAlbum_extended_preview {
372
  }
373
  }
374
  elseif ($type == 'gallery') {
375
- if ($options_row->show_album_name) {
376
- ?>
377
- <div class="bwg_back_<?php echo $bwg; ?>" ><?php echo isset($_POST['title_' . $bwg]) ? esc_html($_POST['title_' . $bwg]) : ''; ?></div>
378
- <?php
379
- }
380
- if (!$page_nav['total']) {
381
- if ($bwg_search != '') {
382
- ?>
383
- <span class="bwg_back_<?php echo $bwg; ?>"><?php echo __('There are no images matching your search.', 'bwg'); ?></span>
384
- <?php
385
- }
386
- else {
387
- ?>
388
- <span class="bwg_back_<?php echo $bwg; ?>"><?php echo __('Gallery is empty.', 'bwg'); ?></span>
389
- <?php
390
- }
391
- }
392
  foreach ($image_rows as $image_row) {
393
  $is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? true : false;
394
  $is_embed_video = preg_match('/VIDEO/', $image_row->filetype) == 1 ? true : false;
@@ -429,7 +428,7 @@ class BWGViewAlbum_extended_preview {
429
  $thumb_left = ($params['extended_album_image_thumb_width'] - $image_thumb_width) / 2;
430
  $thumb_top = ($params['extended_album_image_thumb_height'] - $image_thumb_height) / 2;
431
  ?>
432
- <a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($options_row->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-gallery-id="' . $album_gallery_id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
433
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
434
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
435
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
@@ -488,7 +487,7 @@ class BWGViewAlbum_extended_preview {
488
  </div>
489
  <?php
490
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
491
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo, $params['extended_album_enable_page']);
492
  }
493
  ?>
494
  </div>
3
  public function display($params, $from_shortcode = 0, $bwg = 0) {
4
  global $WD_BWG_UPLOAD_DIR;
5
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
6
+ global $wd_bwg_options;
7
+ $placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
8
+ $play_icon = $wd_bwg_options->play_icon;
9
 
10
  if (!isset($params['extended_album_image_title'])) {
11
  $params['extended_album_image_title'] = 'none';
190
  $params_array['watermark_height'] = $params['watermark_height'];
191
  }
192
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
193
+ $image_right_click = $wd_bwg_options->image_right_click;
194
 
195
  $inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_view_type);
196
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
 
197
  wp_enqueue_style('bwg_frontend');
198
  wp_add_inline_style('bwg_frontend', $inline_style);
199
  wp_enqueue_style('bwg_font-awesome');
233
  </div>
234
  <?php
235
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
236
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $wd_bwg_options->enable_seo, $params['extended_album_enable_page']);
237
  }
238
  if ($bwg_previous_album_id != $params['album_id']) {
239
  ?>
240
  <a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back', '', 'album')"><?php echo __('Back', 'bwg'); ?></a>
241
  <?php
242
  }
243
+ if ($wd_bwg_options->show_album_name) {
244
+ ?>
245
+ <div class="bwg_back_<?php echo $bwg; ?>" ><?php echo isset($_POST['title_' . $bwg]) ? esc_html($_POST['title_' . $bwg]) : ''; ?></div>
246
+ <?php
247
+ }
248
+ if (!$page_nav['total']) {
249
+ if ($bwg_search != '') {
250
+ ?>
251
+ <span class="bwg_back_<?php echo $bwg; ?>"><?php echo __('There are no images matching your search.', 'bwg'); ?></span>
252
+ <?php
253
+ }
254
+ else {
255
+ ?>
256
+ <span class="bwg_back_<?php echo $bwg; ?>"><?php echo __('Gallery is empty.', 'bwg'); ?></span>
257
+ <?php
258
+ }
259
+ }
260
  ?>
261
  <div id="<?php echo $album_gallery_div_id; ?>" class="<?php echo $album_gallery_div_class; ?>">
262
  <input type="hidden" id="bwg_previous_album_id_<?php echo $bwg; ?>" name="bwg_previous_album_id_<?php echo $bwg; ?>" value="<?php echo $bwg_previous_album_id; ?>" />
333
  ?>
334
  <div class="bwg_album_extended_div_<?php echo $bwg; ?>">
335
  <div class="bwg_album_extended_thumb_div_<?php echo $bwg; ?>">
336
+ <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($wd_bwg_options->enable_seo ? 'href="' . esc_url(add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI'])) . '"' : ''); ?> style="font-size: 0;" data-alb_gal_id="<?php echo $album_galallery_row->alb_gal_id; ?>" data-def_type="<?php echo $def_type; ?>" data-title="<?php echo htmlspecialchars(addslashes($title)); ?>">
337
  <span class="bwg_album_thumb_<?php echo $bwg; ?>" style="height:inherit;">
338
  <span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
339
  <span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
347
  <?php
348
  if ($title) {
349
  ?>
350
+ <a class="bwg_album_<?php echo $bwg; ?>" <?php echo ($wd_bwg_options->enable_seo ? 'href="' . esc_url(add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI'])) . '"' : ''); ?> style="font-size: 0;" data-alb_gal_id="<?php echo $album_galallery_row->alb_gal_id; ?>" data-def_type="<?php echo $def_type; ?>" data-title="<?php echo htmlspecialchars(addslashes($title)); ?>">
351
  <span class="bwg_title_spun_<?php echo $bwg; ?>"><?php echo $title; ?></span>
352
  </a>
353
  <?php
388
  }
389
  }
390
  elseif ($type == 'gallery') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  foreach ($image_rows as $image_row) {
392
  $is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? true : false;
393
  $is_embed_video = preg_match('/VIDEO/', $image_row->filetype) == 1 ? true : false;
428
  $thumb_left = ($params['extended_album_image_thumb_width'] - $image_thumb_width) / 2;
429
  $thumb_top = ($params['extended_album_image_thumb_height'] - $image_thumb_height) / 2;
430
  ?>
431
+ <a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($wd_bwg_options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-gallery-id="' . $album_gallery_id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
432
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
433
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
434
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
487
  </div>
488
  <?php
489
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
490
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page_arr, $bwg, $album_gallery_div_id, $params['album_id'], $type, $wd_bwg_options->enable_seo, $params['extended_album_enable_page']);
491
  }
492
  ?>
493
  </div>
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -67,8 +67,8 @@ class BWGViewGalleryBox {
67
  $watermark_height = (isset($_GET['watermark_height']) ? esc_html($_GET['watermark_height']) : 90);
68
 
69
  $theme_row = WDWLibrary::get_theme_row_data($theme_id);
70
- $option_row = WDWLibrary::get_options_row_data();
71
- $image_right_click = $option_row->image_right_click;
72
  $image_filmstrip_height = 0;
73
  $image_filmstrip_width = 0;
74
 
@@ -246,7 +246,7 @@ class BWGViewGalleryBox {
246
  filter: Alpha(opacity=<?php echo $theme_row->lightbox_rl_btn_transparent; ?>);
247
  }
248
  <?php
249
- if($option_row->autohide_lightbox_navigation){?>
250
  #spider_popup_left-ico{
251
  left: -9999px;
252
  }
@@ -768,7 +768,7 @@ class BWGViewGalleryBox {
768
  <div class="bwg_btn_container">
769
  <div class="bwg_ctrl_btn_container">
770
  <?php
771
- if ($option_row->show_image_counts) {
772
  ?>
773
  <span class="bwg_image_count_container bwg_ctrl_btn">
774
  <span class="bwg_image_count"><?php echo $current_image_key + 1; ?></span> /
@@ -790,14 +790,14 @@ class BWGViewGalleryBox {
790
  <i title="<?php echo __('Show info', 'bwg'); ?>" class="bwg_ctrl_btn bwg_info fa fa-info"></i>
791
  <?php }
792
  $is_embed = preg_match('/EMBED/', $current_filetype) == 1 ? TRUE : FALSE;
793
- if ($option_row->popup_enable_fullsize_image) {
794
  ?>
795
  <a id="bwg_fullsize_image" href="<?php echo !$is_embed ? site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url : $current_image_url; ?>" target="_blank">
796
  <i title="<?php echo __('Open image in original size.', 'bwg'); ?>" class="bwg_ctrl_btn fa fa-external-link"></i>
797
  </a>
798
  <?php
799
  }
800
- if ($option_row->popup_enable_download) {
801
  $style = 'none';
802
  $current_image_arr = explode('/', $current_image_url);
803
  if (!$is_embed) {
@@ -933,8 +933,8 @@ class BWGViewGalleryBox {
933
  </div>
934
  </div>
935
  </div>
936
- <a id="spider_popup_left" <?php echo ($option_row->enable_loop == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
937
- <a id="spider_popup_right" <?php echo ($option_row->enable_loop == 0 && $current_key == count($image_rows) - 1) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_right-ico"><span><i class="bwg_next_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-right"></i></span></span></a>
938
  </div>
939
  </div>
940
  <a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;" ontouchend="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
@@ -1316,7 +1316,7 @@ class BWGViewGalleryBox {
1316
  jQuery("#spider_popup_left").show();
1317
  jQuery("#spider_popup_right").show();
1318
  jQuery(".bwg_image_info").hide();
1319
- if (<?php echo $option_row->enable_loop; ?> == 0) {
1320
  if (key == (parseInt(data.length) - 1)) {
1321
  jQuery("#spider_popup_right").hide();
1322
  }
@@ -1415,7 +1415,7 @@ class BWGViewGalleryBox {
1415
 
1416
  function bwg_afterload() {
1417
  <?php
1418
- if ($option_row->preload_images) {
1419
  echo 'bwg_preload_images(key);';
1420
  }
1421
  ?>
@@ -1503,9 +1503,9 @@ class BWGViewGalleryBox {
1503
  }
1504
  });
1505
  function bwg_preload_images(key) {
1506
- count = <?php echo (int) $option_row->preload_images_count / 2; ?>;
1507
  var count_all = data.length;
1508
- if (count_all < <?php echo $option_row->preload_images_count; ?>) {
1509
  count = 0;
1510
  }
1511
  if (count != 0) {
@@ -2190,7 +2190,7 @@ class BWGViewGalleryBox {
2190
  }
2191
  ?>
2192
  <?php
2193
- if ($option_row->preload_images) {
2194
  echo "bwg_preload_images(parseInt(jQuery('#bwg_current_image_key').val()));";
2195
  }
2196
  ?>
@@ -2265,7 +2265,7 @@ class BWGViewGalleryBox {
2265
  window.clearInterval(bwg_playInterval);
2266
  bwg_playInterval = setInterval(function () {
2267
  if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
2268
- if (<?php echo $option_row->enable_loop; ?> == 1) {
2269
  /* Wrap around.*/
2270
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0, data);
2271
  }
67
  $watermark_height = (isset($_GET['watermark_height']) ? esc_html($_GET['watermark_height']) : 90);
68
 
69
  $theme_row = WDWLibrary::get_theme_row_data($theme_id);
70
+ global $wd_bwg_options;
71
+ $image_right_click = $wd_bwg_options->image_right_click;
72
  $image_filmstrip_height = 0;
73
  $image_filmstrip_width = 0;
74
 
246
  filter: Alpha(opacity=<?php echo $theme_row->lightbox_rl_btn_transparent; ?>);
247
  }
248
  <?php
249
+ if($wd_bwg_options->autohide_lightbox_navigation){?>
250
  #spider_popup_left-ico{
251
  left: -9999px;
252
  }
768
  <div class="bwg_btn_container">
769
  <div class="bwg_ctrl_btn_container">
770
  <?php
771
+ if ($wd_bwg_options->show_image_counts) {
772
  ?>
773
  <span class="bwg_image_count_container bwg_ctrl_btn">
774
  <span class="bwg_image_count"><?php echo $current_image_key + 1; ?></span> /
790
  <i title="<?php echo __('Show info', 'bwg'); ?>" class="bwg_ctrl_btn bwg_info fa fa-info"></i>
791
  <?php }
792
  $is_embed = preg_match('/EMBED/', $current_filetype) == 1 ? TRUE : FALSE;
793
+ if ($wd_bwg_options->popup_enable_fullsize_image) {
794
  ?>
795
  <a id="bwg_fullsize_image" href="<?php echo !$is_embed ? site_url() . '/' . $WD_BWG_UPLOAD_DIR . $current_image_url : $current_image_url; ?>" target="_blank">
796
  <i title="<?php echo __('Open image in original size.', 'bwg'); ?>" class="bwg_ctrl_btn fa fa-external-link"></i>
797
  </a>
798
  <?php
799
  }
800
+ if ($wd_bwg_options->popup_enable_download) {
801
  $style = 'none';
802
  $current_image_arr = explode('/', $current_image_url);
803
  if (!$is_embed) {
933
  </div>
934
  </div>
935
  </div>
936
+ <a id="spider_popup_left" <?php echo ($wd_bwg_options->enable_loop == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
937
+ <a id="spider_popup_right" <?php echo ($wd_bwg_options->enable_loop == 0 && $current_key == count($image_rows) - 1) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_right-ico"><span><i class="bwg_next_btn fa <?php echo $theme_row->lightbox_rl_btn_style; ?>-right"></i></span></span></a>
938
  </div>
939
  </div>
940
  <a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;" ontouchend="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
1316
  jQuery("#spider_popup_left").show();
1317
  jQuery("#spider_popup_right").show();
1318
  jQuery(".bwg_image_info").hide();
1319
+ if (<?php echo $wd_bwg_options->enable_loop; ?> == 0) {
1320
  if (key == (parseInt(data.length) - 1)) {
1321
  jQuery("#spider_popup_right").hide();
1322
  }
1415
 
1416
  function bwg_afterload() {
1417
  <?php
1418
+ if ($wd_bwg_options->preload_images) {
1419
  echo 'bwg_preload_images(key);';
1420
  }
1421
  ?>
1503
  }
1504
  });
1505
  function bwg_preload_images(key) {
1506
+ count = <?php echo (int) $wd_bwg_options->preload_images_count / 2; ?>;
1507
  var count_all = data.length;
1508
+ if (count_all < <?php echo $wd_bwg_options->preload_images_count; ?>) {
1509
  count = 0;
1510
  }
1511
  if (count != 0) {
2190
  }
2191
  ?>
2192
  <?php
2193
+ if ($wd_bwg_options->preload_images) {
2194
  echo "bwg_preload_images(parseInt(jQuery('#bwg_current_image_key').val()));";
2195
  }
2196
  ?>
2265
  window.clearInterval(bwg_playInterval);
2266
  bwg_playInterval = setInterval(function () {
2267
  if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
2268
+ if (<?php echo $wd_bwg_options->enable_loop; ?> == 1) {
2269
  /* Wrap around.*/
2270
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0, data);
2271
  }
frontend/views/BWGViewImage_browser.php CHANGED
@@ -70,9 +70,9 @@ class BWGViewImage_browser {
70
  }
71
  $image_title = $params['image_browser_title_enable'];
72
  $enable_image_description = $params['image_browser_description_enable'];
73
- $option_row = WDWLibrary::get_options_row_data();
74
- $placeholder = isset($option_row->placeholder) ? $option_row->placeholder : '';
75
- $image_right_click = $option_row->image_right_click;
76
  if (!isset($params['popup_fullscreen'])) {
77
  $params['popup_fullscreen'] = 0;
78
  }
@@ -158,8 +158,7 @@ class BWGViewImage_browser {
158
  $image_browser_image_title_align = (isset($theme_row->image_browser_image_title_align)) ? $theme_row->image_browser_image_title_align : 'top';
159
 
160
  $inline_style = $this->inline_styles($bwg, $theme_row, $params, $params_array, $text_align, $vertical_align);
161
- global $wd_bwg_inline_stiles;
162
- if ($wd_bwg_inline_stiles) {
163
  wp_enqueue_style('bwg_frontend');
164
  wp_add_inline_style('bwg_frontend', $inline_style);
165
  wp_enqueue_style('bwg_font-awesome');
@@ -191,7 +190,7 @@ class BWGViewImage_browser {
191
  <div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
192
  <?php
193
  if ( $theme_row->page_nav_position == 'top') {
194
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
195
  }
196
  foreach ($image_rows as $image_row) {
197
  $params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
@@ -328,7 +327,7 @@ class BWGViewImage_browser {
328
  <?php
329
  }
330
  if ( $theme_row->page_nav_position == 'bottom') {
331
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
332
  }
333
  ?>
334
  </div>
70
  }
71
  $image_title = $params['image_browser_title_enable'];
72
  $enable_image_description = $params['image_browser_description_enable'];
73
+ global $wd_bwg_options;
74
+ $placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
75
+ $image_right_click = $wd_bwg_options->image_right_click;
76
  if (!isset($params['popup_fullscreen'])) {
77
  $params['popup_fullscreen'] = 0;
78
  }
158
  $image_browser_image_title_align = (isset($theme_row->image_browser_image_title_align)) ? $theme_row->image_browser_image_title_align : 'top';
159
 
160
  $inline_style = $this->inline_styles($bwg, $theme_row, $params, $params_array, $text_align, $vertical_align);
161
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
 
162
  wp_enqueue_style('bwg_frontend');
163
  wp_add_inline_style('bwg_frontend', $inline_style);
164
  wp_enqueue_style('bwg_font-awesome');
190
  <div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
191
  <?php
192
  if ( $theme_row->page_nav_position == 'top') {
193
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $wd_bwg_options->enable_seo);
194
  }
195
  foreach ($image_rows as $image_row) {
196
  $params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
327
  <?php
328
  }
329
  if ( $theme_row->page_nav_position == 'bottom') {
330
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $wd_bwg_options->enable_seo);
331
  }
332
  ?>
333
  </div>
frontend/views/BWGViewSlideshow.php CHANGED
@@ -6,7 +6,7 @@ class BWGViewSlideshow {
6
 
7
  global $WD_BWG_UPLOAD_DIR;
8
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
9
- $options_row = WDWLibrary::get_options_row_data();
10
  if (!isset($params['order_by'])) {
11
  $order_by = 'asc';
12
  }
@@ -19,7 +19,7 @@ class BWGViewSlideshow {
19
  if (!isset($params['tag'])) {
20
  $params['tag'] = 0;
21
  }
22
- $image_right_click = $options_row->image_right_click;
23
  if (!$from) {
24
  $theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
25
  $theme_row = WDWLibrary::get_theme_row_data($theme_id);
@@ -71,36 +71,36 @@ class BWGViewSlideshow {
71
  $gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
72
  $sort_by = 'order';
73
  $slideshow_effect = (isset($params['effect']) ? esc_html($params['effect']) : 'fade');
74
- $enable_slideshow_autoplay = (isset($params['enable_autoplay']) ? esc_html($params['enable_autoplay']) : $options_row->slideshow_enable_autoplay);
75
  $enable_slideshow_shuffle = (isset($params['shuffle']) ? esc_html($params['shuffle']) : 0);
76
- $enable_slideshow_ctrl = (isset($params['enable_ctrl_btn']) ? esc_html($params['enable_ctrl_btn']) : $options_row->slideshow_enable_ctrl);
77
  $enable_slideshow_filmstrip = FALSE;
78
  $slideshow_filmstrip_height = 0;
79
  $slideshow_filmstrip_width = 0;
80
 
81
- $enable_image_title = $options_row->slideshow_enable_title;
82
- $slideshow_title_position = explode('-', $options_row->slideshow_title_position);
83
- $enable_image_description = $options_row->slideshow_enable_description;
84
- $slideshow_description_position = explode('-', $options_row->slideshow_description_position);
85
- $enable_slideshow_music = $options_row->slideshow_enable_music;
86
- $slideshow_music_url = $options_row->slideshow_audio_url;
87
- $slideshow_effect_duration = isset($options_row->slideshow_effect_duration) ? $options_row->slideshow_effect_duration : 1;
88
 
89
  $image_width = (isset($params['width']) ? esc_html($params['width']) : '800');
90
  $image_height = (isset($params['height']) ? esc_html($params['height']) : '600');
91
  $slideshow_interval = (isset($params['interval']) ? esc_html($params['interval']) : 5);
92
-
93
- $watermark_type = $options_row->watermark_type;
94
- $watermark_text = $options_row->watermark_text;
95
- $watermark_font_size = $options_row->watermark_font_size;
96
- $watermark_font = $options_row->watermark_font;
97
- $watermark_color = $options_row->watermark_color;
98
- $watermark_opacity = $options_row->watermark_opacity;
99
- $watermark_position = explode('-', $options_row->watermark_position);
100
- $watermark_link = urlencode($options_row->watermark_link);
101
- $watermark_url = urlencode($options_row->watermark_url);
102
- $watermark_width = $options_row->watermark_width;
103
- $watermark_height = $options_row->watermark_height;
104
  }
105
  $gallery_row = WDWLibrary::get_gallery_row_data($gallery_id);
106
  if (!$gallery_row && $params["tag"] == 0) {
@@ -137,9 +137,8 @@ class BWGViewSlideshow {
137
  $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
138
  }
139
  $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
140
- $inline_style = $this->inline_styles($bwg, $theme_row, $params, $image_width, $image_height, $slideshow_filmstrip_height, $options_row, $filmstrip_thumb_margin_hor, $slideshow_filmstrip_width, $image_rows, $watermark_position, $slideshow_title_position, $slideshow_description_position, $watermark_height, $watermark_width, $watermark_opacity, $watermark_font_size, $watermark_font, $watermark_color, $enable_slideshow_filmstrip);
141
- global $wd_bwg_inline_stiles;
142
- if ($wd_bwg_inline_stiles) {
143
  wp_enqueue_style('bwg_frontend');
144
  wp_add_inline_style('bwg_frontend', $inline_style);
145
  wp_enqueue_style('bwg_font-awesome');
@@ -220,19 +219,19 @@ class BWGViewSlideshow {
220
  <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
221
  <?php
222
  if (!$is_embed) {
223
- if ($options_row->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
224
  ?>
225
- <a href="<?php echo $image_row->redirect_url; ?>" target="<?php echo $options_row->thumb_link_target ? '_blank' : '';?>">
226
- <?php
227
  }
228
- ?>
229
  <img id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>"/>
230
- <?php
231
- if ($options_row->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
232
- ?>
233
  </a>
234
  <?php
235
- }
236
  }
237
  else{ /*$is_embed*/?>
238
  <span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
@@ -279,16 +278,16 @@ class BWGViewSlideshow {
279
  <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
280
  <?php
281
  if (!$is_embed) {
282
- if ($options_row->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
283
  ?>
284
- <a href='<?php echo $image_row->redirect_url; ?>' target="<?php echo $options_row->thumb_link_target ? '_blank' : '';?>">
285
- <?php
286
- }
287
- ?>
288
- <img class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>"/>
289
  <?php
290
- if ($options_row->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
291
  ?>
 
 
 
 
292
  </a>
293
  <?php
294
  }
@@ -1108,7 +1107,7 @@ class BWGViewSlideshow {
1108
  }
1109
  }
1110
 
1111
- private function inline_styles($bwg, $theme_row, $params, $image_width, $image_height, $slideshow_filmstrip_height, $options_row, $filmstrip_thumb_margin_hor, $slideshow_filmstrip_width, $image_rows, $watermark_position, $slideshow_title_position, $slideshow_description_position, $watermark_height, $watermark_width, $watermark_opacity, $watermark_font_size, $watermark_font, $watermark_color, $enable_slideshow_filmstrip) {
1112
  ob_start();
1113
  ?>
1114
  #bwg_container1_<?php echo $bwg; ?> {
@@ -1265,7 +1264,7 @@ class BWGViewSlideshow {
1265
  cursor: pointer;
1266
  }
1267
  <?php
1268
- if($options_row->autohide_slideshow_navigation){?>
1269
  #spider_slideshow_left-ico_<?php echo $bwg; ?>{
1270
  left: -9999px;
1271
  }
6
 
7
  global $WD_BWG_UPLOAD_DIR;
8
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
9
+ global $wd_bwg_options;
10
  if (!isset($params['order_by'])) {
11
  $order_by = 'asc';
12
  }
19
  if (!isset($params['tag'])) {
20
  $params['tag'] = 0;
21
  }
22
+ $image_right_click = $wd_bwg_options->image_right_click;
23
  if (!$from) {
24
  $theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
25
  $theme_row = WDWLibrary::get_theme_row_data($theme_id);
71
  $gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
72
  $sort_by = 'order';
73
  $slideshow_effect = (isset($params['effect']) ? esc_html($params['effect']) : 'fade');
74
+ $enable_slideshow_autoplay = (isset($params['enable_autoplay']) ? esc_html($params['enable_autoplay']) : $wd_bwg_options->slideshow_enable_autoplay);
75
  $enable_slideshow_shuffle = (isset($params['shuffle']) ? esc_html($params['shuffle']) : 0);
76
+ $enable_slideshow_ctrl = (isset($params['enable_ctrl_btn']) ? esc_html($params['enable_ctrl_btn']) : $wd_bwg_options->slideshow_enable_ctrl);
77
  $enable_slideshow_filmstrip = FALSE;
78
  $slideshow_filmstrip_height = 0;
79
  $slideshow_filmstrip_width = 0;
80
 
81
+ $enable_image_title = $wd_bwg_options->slideshow_enable_title;
82
+ $slideshow_title_position = explode('-', $wd_bwg_options->slideshow_title_position);
83
+ $enable_image_description = $wd_bwg_options->slideshow_enable_description;
84
+ $slideshow_description_position = explode('-', $wd_bwg_options->slideshow_description_position);
85
+ $enable_slideshow_music = $wd_bwg_options->slideshow_enable_music;
86
+ $slideshow_music_url = $wd_bwg_options->slideshow_audio_url;
87
+ $slideshow_effect_duration = isset($wd_bwg_options->slideshow_effect_duration) ? $wd_bwg_options->slideshow_effect_duration : 1;
88
 
89
  $image_width = (isset($params['width']) ? esc_html($params['width']) : '800');
90
  $image_height = (isset($params['height']) ? esc_html($params['height']) : '600');
91
  $slideshow_interval = (isset($params['interval']) ? esc_html($params['interval']) : 5);
92
+
93
+ $watermark_type = $wd_bwg_options->watermark_type;
94
+ $watermark_text = $wd_bwg_options->watermark_text;
95
+ $watermark_font_size = $wd_bwg_options->watermark_font_size;
96
+ $watermark_font = $wd_bwg_options->watermark_font;
97
+ $watermark_color = $wd_bwg_options->watermark_color;
98
+ $watermark_opacity = $wd_bwg_options->watermark_opacity;
99
+ $watermark_position = explode('-', $wd_bwg_options->watermark_position);
100
+ $watermark_link = urlencode($wd_bwg_options->watermark_link);
101
+ $watermark_url = urlencode($wd_bwg_options->watermark_url);
102
+ $watermark_width = $wd_bwg_options->watermark_width;
103
+ $watermark_height = $wd_bwg_options->watermark_height;
104
  }
105
  $gallery_row = WDWLibrary::get_gallery_row_data($gallery_id);
106
  if (!$gallery_row && $params["tag"] == 0) {
137
  $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
138
  }
139
  $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
140
+ $inline_style = $this->inline_styles($bwg, $theme_row, $params, $image_width, $image_height, $slideshow_filmstrip_height, $wd_bwg_options, $filmstrip_thumb_margin_hor, $slideshow_filmstrip_width, $image_rows, $watermark_position, $slideshow_title_position, $slideshow_description_position, $watermark_height, $watermark_width, $watermark_opacity, $watermark_font_size, $watermark_font, $watermark_color, $enable_slideshow_filmstrip);
141
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
 
142
  wp_enqueue_style('bwg_frontend');
143
  wp_add_inline_style('bwg_frontend', $inline_style);
144
  wp_enqueue_style('bwg_font-awesome');
219
  <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
220
  <?php
221
  if (!$is_embed) {
222
+ if ($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
223
  ?>
224
+ <a href='<?php echo $image_row->redirect_url; ?>' target="<?php echo $wd_bwg_options->thumb_link_target ? '_blank' : '';?>">
225
+ <?php
226
  }
227
+ ?>
228
  <img id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>"/>
229
+ <?php
230
+ if ($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
231
+ ?>
232
  </a>
233
  <?php
234
+ }
235
  }
236
  else{ /*$is_embed*/?>
237
  <span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
278
  <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
279
  <?php
280
  if (!$is_embed) {
281
+ if ($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
282
  ?>
283
+ <a href='<?php echo $image_row->redirect_url; ?>' target="<?php echo $wd_bwg_options->thumb_link_target ? '_blank' : '';?>">
 
 
 
 
284
  <?php
285
+ }
286
  ?>
287
+ <img class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>"/>
288
+ <?php
289
+ if($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url){
290
+ ?>
291
  </a>
292
  <?php
293
  }
1107
  }
1108
  }
1109
 
1110
+ private function inline_styles($bwg, $theme_row, $params, $image_width, $image_height, $slideshow_filmstrip_height, $wd_bwg_options, $filmstrip_thumb_margin_hor, $slideshow_filmstrip_width, $image_rows, $watermark_position, $slideshow_title_position, $slideshow_description_position, $watermark_height, $watermark_width, $watermark_opacity, $watermark_font_size, $watermark_font, $watermark_color, $enable_slideshow_filmstrip) {
1111
  ob_start();
1112
  ?>
1113
  #bwg_container1_<?php echo $bwg; ?> {
1264
  cursor: pointer;
1265
  }
1266
  <?php
1267
+ if($wd_bwg_options->autohide_slideshow_navigation){?>
1268
  #spider_slideshow_left-ico_<?php echo $bwg; ?>{
1269
  left: -9999px;
1270
  }
frontend/views/BWGViewThumbnails.php CHANGED
@@ -63,9 +63,9 @@ class BWGViewThumbnails {
63
  }
64
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
65
  $sort_direction = $params['order_by'];
66
- $options_row = WDWLibrary::get_options_row_data();
67
- $placeholder = isset($options_row->placeholder) ? $options_row->placeholder : '';
68
- $play_icon = $options_row->play_icon;
69
  if ($from) {
70
  $params['gallery_id'] = $params['id'];
71
  $params['images_per_page'] = $params['count'];
@@ -77,45 +77,45 @@ class BWGViewThumbnails {
77
  $sort_direction = 'ASC';
78
  }
79
  $params['image_enable_page'] = 0;
80
- $params['image_title'] = $options_row->image_title_show_hover;
81
  $params['thumb_height'] = $params['height'];
82
  $params['thumb_width'] = $params['width'];
83
  $params['image_column_number'] = $params['count'];
84
- $params['popup_fullscreen'] = $options_row->popup_fullscreen;
85
- $params['popup_autoplay'] = $options_row->popup_autoplay;
86
- $params['popup_width'] = $options_row->popup_width;
87
- $params['popup_height'] = $options_row->popup_height;
88
- $params['popup_effect'] = $options_row->popup_type;
89
- $params['popup_enable_filmstrip'] = $options_row->popup_enable_filmstrip;
90
- $params['popup_filmstrip_height'] = $options_row->popup_filmstrip_height;
91
- $params['popup_enable_ctrl_btn'] = $options_row->popup_enable_ctrl_btn;
92
- $params['popup_enable_fullscreen'] = $options_row->popup_enable_fullscreen;
93
- $params['popup_enable_info'] = $options_row->popup_enable_info;
94
- $params['popup_info_always_show'] = $options_row->popup_info_always_show;
95
- $params['popup_info_full_width'] = $options_row->popup_info_full_width;
96
- $params['popup_hit_counter'] = $options_row->popup_hit_counter;
97
- $params['popup_enable_rate'] = $options_row->popup_enable_rate;
98
- $params['popup_interval'] = $options_row->popup_interval;
99
- $params['popup_enable_comment'] = $options_row->popup_enable_comment;
100
- $params['popup_enable_facebook'] = $options_row->popup_enable_facebook;
101
- $params['popup_enable_twitter'] = $options_row->popup_enable_twitter;
102
- $params['popup_enable_google'] = $options_row->popup_enable_google;
103
- $params['popup_enable_pinterest'] = $options_row->popup_enable_pinterest;
104
- $params['popup_enable_tumblr'] = $options_row->popup_enable_tumblr;
105
- $params['watermark_type'] = $options_row->watermark_type;
106
- $params['watermark_link'] = urlencode($options_row->watermark_link);
107
- $params['watermark_opacity'] = $options_row->watermark_opacity;
108
- $params['watermark_position'] = $options_row->watermark_position;
109
- $params['watermark_text'] = $options_row->watermark_text;
110
- $params['watermark_font_size'] = $options_row->watermark_font_size;
111
- $params['watermark_font'] = $options_row->watermark_font;
112
- $params['watermark_color'] = $options_row->watermark_color;
113
- $params['watermark_url'] = urlencode($options_row->watermark_url);
114
- $params['watermark_width'] = $options_row->watermark_width;
115
- $params['watermark_height'] = $options_row->watermark_height;
116
- $params['thumb_click_action'] = $options_row->thumb_click_action;
117
- $params['thumb_link_target'] = $options_row->thumb_link_target;
118
- $params['popup_effect_duration'] = isset($options_row->popup_effect_duration) ? $options_row->popup_effect_duration : 1;
119
  }
120
  if (isset($_POST['sortImagesByValue_' . $bwg])) {
121
  $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
@@ -140,6 +140,7 @@ class BWGViewThumbnails {
140
  else {
141
  $type = "";
142
  }
 
143
  $gallery_row = WDWLibrary::get_gallery_row_data($params['gallery_id']);
144
  if (!$gallery_row && ($type == '') && $params["tag"] == 0) {
145
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error');
@@ -162,11 +163,10 @@ class BWGViewThumbnails {
162
  }
163
  }
164
  $tags_rows = WDWLibrary::get_tags_rows_data($params['gallery_id']);
165
- $image_right_click = $options_row->image_right_click;
166
 
167
  $inline_style = $this->inline_styles($bwg, $theme_row, $params);
168
- global $wd_bwg_inline_stiles;
169
- if ($wd_bwg_inline_stiles) {
170
  wp_enqueue_style('bwg_frontend');
171
  wp_add_inline_style('bwg_frontend', $inline_style);
172
  wp_enqueue_style('bwg_font-awesome');
@@ -192,10 +192,10 @@ class BWGViewThumbnails {
192
  WDWLibrary::ajax_html_frontend_sort_box('gal_front_form_' . $bwg, $bwg, 'bwg_standart_thumbnails_' . $bwg, $params['sort_by'], $params['search_box_width']);
193
  }
194
  if (isset($params['show_tag_box']) && $params['show_tag_box']) {
195
- WDWLibrary::ajax_html_frontend_search_tags('gal_front_form_' . $bwg, $bwg, 'bwg_standart_thumbnails_' . $bwg, $images_count,$tags_rows);
196
  }
197
  ?>
198
- <div class="bwg_back_<?php echo $bwg; ?>"><?php echo $options_row->showthumbs_name ? $gallery_row->name : ''; ?></div>
199
  <div style="background-color:rgba(0, 0, 0, 0); text-align: <?php echo $theme_row->thumb_align; ?>; width:100%; position: relative;">
200
  <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;width: 100%; z-index: 115; text-align: center; height: 100%; vertical-align: middle; display:none;">
201
  <div style="display: table; vertical-align: middle; width: 100%; height: 100%; background-color: #FFFFFF; opacity: 0.7; filter: Alpha(opacity=70);">
@@ -207,15 +207,15 @@ class BWGViewThumbnails {
207
  </div>
208
  <?php
209
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
210
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo, $params['image_enable_page']);
211
  }
212
  ?>
213
  <div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
214
  <?php
215
  foreach ($image_rows as $image_row) {
216
- $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
217
- $is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
218
- $is_embed_instagram = preg_match('/EMBED_OEMBED_INSTAGRAM/',$image_row->filetype)==1 ? true : false;
219
  if (!$is_embed) {
220
  list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
221
  }
@@ -253,7 +253,7 @@ class BWGViewThumbnails {
253
  $thumb_left = ($params['thumb_width'] - $image_thumb_width) / 2;
254
  $thumb_top = ($params['thumb_height'] - $image_thumb_height) / 2;
255
  ?>
256
- <a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($options_row->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
257
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
258
  <?php
259
  if ($params['image_title'] == 'show' and $theme_row->thumb_title_pos == 'top') {
@@ -308,7 +308,7 @@ class BWGViewThumbnails {
308
  </div>
309
  <?php
310
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
311
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo, $params['image_enable_page']);
312
  }
313
  ?>
314
  </div>
@@ -556,7 +556,7 @@ class BWGViewThumbnails {
556
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
557
  cursor: pointer;
558
  font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
559
- font-family: <?php echo str_replace('+', ' ', $theme_row->page_nav_font_style); ?>;
560
  font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
561
  color: #<?php echo $theme_row->page_nav_font_color; ?>;
562
  text-decoration: none;
@@ -577,7 +577,7 @@ class BWGViewThumbnails {
577
  color: #<?php echo $theme_row->album_compact_back_font_color; ?> !important;
578
  cursor: pointer;
579
  display: block;
580
- font-family: <?php echo str_replace('+', ' ', $theme_row->album_compact_back_font_style); ?>;
581
  font-size: <?php echo $theme_row->album_compact_back_font_size; ?>px;
582
  font-weight: <?php echo $theme_row->album_compact_back_font_weight; ?>;
583
  text-decoration: none;
63
  }
64
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
65
  $sort_direction = $params['order_by'];
66
+ global $wd_bwg_options;
67
+ $placeholder = isset($wd_bwg_options->placeholder) ? $wd_bwg_options->placeholder : '';
68
+ $play_icon = $wd_bwg_options->play_icon;
69
  if ($from) {
70
  $params['gallery_id'] = $params['id'];
71
  $params['images_per_page'] = $params['count'];
77
  $sort_direction = 'ASC';
78
  }
79
  $params['image_enable_page'] = 0;
80
+ $params['image_title'] = $wd_bwg_options->image_title_show_hover;
81
  $params['thumb_height'] = $params['height'];
82
  $params['thumb_width'] = $params['width'];
83
  $params['image_column_number'] = $params['count'];
84
+ $params['popup_fullscreen'] = $wd_bwg_options->popup_fullscreen;
85
+ $params['popup_autoplay'] = $wd_bwg_options->popup_autoplay;
86
+ $params['popup_width'] = $wd_bwg_options->popup_width;
87
+ $params['popup_height'] = $wd_bwg_options->popup_height;
88
+ $params['popup_effect'] = $wd_bwg_options->popup_type;
89
+ $params['popup_enable_filmstrip'] = $wd_bwg_options->popup_enable_filmstrip;
90
+ $params['popup_filmstrip_height'] = $wd_bwg_options->popup_filmstrip_height;
91
+ $params['popup_enable_ctrl_btn'] = $wd_bwg_options->popup_enable_ctrl_btn;
92
+ $params['popup_enable_fullscreen'] = $wd_bwg_options->popup_enable_fullscreen;
93
+ $params['popup_enable_info'] = $wd_bwg_options->popup_enable_info;
94
+ $params['popup_info_always_show'] = $wd_bwg_options->popup_info_always_show;
95
+ $params['popup_info_full_width'] = $wd_bwg_options->popup_info_full_width;
96
+ $params['popup_hit_counter'] = $wd_bwg_options->popup_hit_counter;
97
+ $params['popup_enable_rate'] = $wd_bwg_options->popup_enable_rate;
98
+ $params['popup_interval'] = $wd_bwg_options->popup_interval;
99
+ $params['popup_enable_comment'] = $wd_bwg_options->popup_enable_comment;
100
+ $params['popup_enable_facebook'] = $wd_bwg_options->popup_enable_facebook;
101
+ $params['popup_enable_twitter'] = $wd_bwg_options->popup_enable_twitter;
102
+ $params['popup_enable_google'] = $wd_bwg_options->popup_enable_google;
103
+ $params['popup_enable_pinterest'] = $wd_bwg_options->popup_enable_pinterest;
104
+ $params['popup_enable_tumblr'] = $wd_bwg_options->popup_enable_tumblr;
105
+ $params['watermark_type'] = $wd_bwg_options->watermark_type;
106
+ $params['watermark_link'] = urlencode($wd_bwg_options->watermark_link);
107
+ $params['watermark_opacity'] = $wd_bwg_options->watermark_opacity;
108
+ $params['watermark_position'] = $wd_bwg_options->watermark_position;
109
+ $params['watermark_text'] = $wd_bwg_options->watermark_text;
110
+ $params['watermark_font_size'] = $wd_bwg_options->watermark_font_size;
111
+ $params['watermark_font'] = $wd_bwg_options->watermark_font;
112
+ $params['watermark_color'] = $wd_bwg_options->watermark_color;
113
+ $params['watermark_url'] = urlencode($wd_bwg_options->watermark_url);
114
+ $params['watermark_width'] = $wd_bwg_options->watermark_width;
115
+ $params['watermark_height'] = $wd_bwg_options->watermark_height;
116
+ $params['thumb_click_action'] = $wd_bwg_options->thumb_click_action;
117
+ $params['thumb_link_target'] = $wd_bwg_options->thumb_link_target;
118
+ $params['popup_effect_duration'] = isset($wd_bwg_options->popup_effect_duration) ? $wd_bwg_options->popup_effect_duration : 1;
119
  }
120
  if (isset($_POST['sortImagesByValue_' . $bwg])) {
121
  $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
140
  else {
141
  $type = "";
142
  }
143
+
144
  $gallery_row = WDWLibrary::get_gallery_row_data($params['gallery_id']);
145
  if (!$gallery_row && ($type == '') && $params["tag"] == 0) {
146
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error');
163
  }
164
  }
165
  $tags_rows = WDWLibrary::get_tags_rows_data($params['gallery_id']);
166
+ $image_right_click = $wd_bwg_options->image_right_click;
167
 
168
  $inline_style = $this->inline_styles($bwg, $theme_row, $params);
169
+ if ($wd_bwg_options->use_inline_stiles_and_scripts) {
 
170
  wp_enqueue_style('bwg_frontend');
171
  wp_add_inline_style('bwg_frontend', $inline_style);
172
  wp_enqueue_style('bwg_font-awesome');
192
  WDWLibrary::ajax_html_frontend_sort_box('gal_front_form_' . $bwg, $bwg, 'bwg_standart_thumbnails_' . $bwg, $params['sort_by'], $params['search_box_width']);
193
  }
194
  if (isset($params['show_tag_box']) && $params['show_tag_box']) {
195
+ WDWLibrary::ajax_html_frontend_search_tags('gal_front_form_' . $bwg, $bwg, 'bwg_standart_thumbnails_' . $bwg, $images_count, $tags_rows);
196
  }
197
  ?>
198
+ <div class="bwg_back_<?php echo $bwg; ?>"><?php echo $wd_bwg_options->showthumbs_name ? $gallery_row->name : ''; ?></div>
199
  <div style="background-color:rgba(0, 0, 0, 0); text-align: <?php echo $theme_row->thumb_align; ?>; width:100%; position: relative;">
200
  <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;width: 100%; z-index: 115; text-align: center; height: 100%; vertical-align: middle; display:none;">
201
  <div style="display: table; vertical-align: middle; width: 100%; height: 100%; background-color: #FFFFFF; opacity: 0.7; filter: Alpha(opacity=70);">
207
  </div>
208
  <?php
209
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
210
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $wd_bwg_options->enable_seo, $params['image_enable_page']);
211
  }
212
  ?>
213
  <div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
214
  <?php
215
  foreach ($image_rows as $image_row) {
216
+ $is_embed = preg_match('/EMBED/',$image_row->filetype) == 1 ? true :false;
217
+ $is_embed_video = preg_match('/VIDEO/',$image_row->filetype) == 1 ? true :false;
218
+ $is_embed_instagram = preg_match('/EMBED_OEMBED_INSTAGRAM/',$image_row->filetype) == 1 ? true : false;
219
  if (!$is_embed) {
220
  list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
221
  }
253
  $thumb_left = ($params['thumb_width'] - $image_thumb_width) / 2;
254
  $thumb_top = ($params['thumb_height'] - $image_thumb_height) / 2;
255
  ?>
256
+ <a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($wd_bwg_options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
257
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
258
  <?php
259
  if ($params['image_title'] == 'show' and $theme_row->thumb_title_pos == 'top') {
308
  </div>
309
  <?php
310
  if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
311
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $wd_bwg_options->enable_seo, $params['image_enable_page']);
312
  }
313
  ?>
314
  </div>
556
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
557
  cursor: pointer;
558
  font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
559
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
560
  font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
561
  color: #<?php echo $theme_row->page_nav_font_color; ?>;
562
  text-decoration: none;
577
  color: #<?php echo $theme_row->album_compact_back_font_color; ?> !important;
578
  cursor: pointer;
579
  display: block;
580
+ font-family: <?php echo $theme_row->album_compact_back_font_style; ?>;
581
  font-size: <?php echo $theme_row->album_compact_back_font_size; ?>px;
582
  font-weight: <?php echo $theme_row->album_compact_back_font_weight; ?>;
583
  text-decoration: none;
js/bwg_frontend.js CHANGED
@@ -1,6 +1,6 @@
1
  function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, type, srch_btn, title, sortByParam, load_more) {
2
- var masonry_already_loaded = jQuery(".bwg_masonry_thumb_spun_" + current_view + " img").length;
3
- var mosaic_already_loaded = jQuery(".bwg_mosaic_thumb_spun_" + current_view + " img").length;
4
  if (typeof load_more == "undefined") {
5
  var load_more = false;
6
  }
@@ -51,6 +51,8 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
51
  window.location,
52
  post_data,
53
  function (data) {
 
 
54
  if (load_more) {
55
  var strr = jQuery(data).find('#' + id).html();
56
  jQuery('#' + id).append(strr);
@@ -93,11 +95,11 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
93
  window["bwg_document_ready_" + current_view]();
94
  /* For masonry view.*/
95
  if (id == "bwg_masonry_thumbnails_" + current_view || id == "bwg_album_masonry_" + current_view) {
96
- window["bwg_masonry_ajax_"+ current_view](masonry_already_loaded);
97
  }
98
  /* For mosaic view.*/
99
  if (id == "bwg_mosaic_thumbnails_" + current_view) {
100
- window["bwg_mosaic_ajax_" + current_view](mosaic_already_loaded);
101
  }
102
  /* For Blog style view.*/
103
  jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_16x9_" + current_view).each(function (e) {
1
  function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, type, srch_btn, title, sortByParam, load_more) {
2
+ var masonry_loaded = 0;
3
+ var mosaic_loaded = 0;
4
  if (typeof load_more == "undefined") {
5
  var load_more = false;
6
  }
51
  window.location,
52
  post_data,
53
  function (data) {
54
+ masonry_loaded = jQuery(data).find('#' + form_id).find(".bwg_masonry_thumb_spun_" + current_view + " img").length;
55
+ mosaic_loaded = jQuery(data).find('#' + form_id).find(".bwg_mosaic_thumb_spun_" + current_view + " img").length;
56
  if (load_more) {
57
  var strr = jQuery(data).find('#' + id).html();
58
  jQuery('#' + id).append(strr);
95
  window["bwg_document_ready_" + current_view]();
96
  /* For masonry view.*/
97
  if (id == "bwg_masonry_thumbnails_" + current_view || id == "bwg_album_masonry_" + current_view) {
98
+ window["bwg_masonry_ajax_"+ current_view](masonry_loaded);
99
  }
100
  /* For mosaic view.*/
101
  if (id == "bwg_mosaic_thumbnails_" + current_view) {
102
+ window["bwg_mosaic_ajax_" + current_view](mosaic_loaded);
103
  }
104
  /* For Blog style view.*/
105
  jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_16x9_" + current_view).each(function (e) {
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.3.26
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -40,17 +40,10 @@ else {
40
  define('WD_BWG_FRONT_URL', WD_BWG_URL);
41
  }
42
 
43
- global $wpdb;
44
- if ($wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "bwg_option'")) {
45
- $bwg_options_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
46
- $WD_BWG_UPLOAD_DIR = $bwg_options_row->images_directory . '/photo-gallery';
47
- $wd_bwg_inline_stiles = isset($bwg_options_row->use_inline_stiles_and_scripts) ? $bwg_options_row->use_inline_stiles_and_scripts : 0;
48
- }
49
- else {
50
- $upload_dir = wp_upload_dir();
51
- $WD_BWG_UPLOAD_DIR = str_replace(ABSPATH, '', $upload_dir['basedir']) . '/photo-gallery';
52
- $wd_bwg_inline_stiles = 0;
53
- }
54
 
55
  // Plugin menu.
56
  function bwg_options_panel() {
@@ -662,164 +655,6 @@ function bwg_activate() {
662
  PRIMARY KEY (`id`)
663
  ) DEFAULT CHARSET=utf8;";
664
  $wpdb->query($bwg_image_tag);
665
- $bwg_option = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_option` (
666
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
667
- `images_directory` mediumtext NOT NULL,
668
-
669
- `masonry` varchar(255) NOT NULL,
670
-
671
- `mosaic` varchar(255) NOT NULL,
672
- `resizable_mosaic` tinyint(1) NOT NULL,
673
- `mosaic_total_width` int(4) NOT NULL,
674
- `image_column_number` int(4) NOT NULL,
675
- `images_per_page` int(4) NOT NULL,
676
- `thumb_width` int(4) NOT NULL,
677
- `thumb_height` int(4) NOT NULL,
678
- `upload_thumb_width` int(4) NOT NULL,
679
- `upload_thumb_height` int(4) NOT NULL,
680
- `image_enable_page` tinyint(1) NOT NULL,
681
- `image_title_show_hover` varchar(20) NOT NULL,
682
- `ecommerce_icon_show_hover` varchar(20) NOT NULL,
683
-
684
- `album_column_number` int(4) NOT NULL,
685
- `albums_per_page` int(4) NOT NULL,
686
- `album_title_show_hover` varchar(8) NOT NULL,
687
- `album_thumb_width` int(4) NOT NULL,
688
- `album_thumb_height` int(4) NOT NULL,
689
- `album_enable_page` tinyint(1) NOT NULL,
690
- `extended_album_height` int(4) NOT NULL,
691
- `extended_album_description_enable` tinyint(1) NOT NULL,
692
-
693
- `image_browser_width` int(4) NOT NULL,
694
- `image_browser_title_enable` tinyint(1) NOT NULL,
695
- `image_browser_description_enable` tinyint(1) NOT NULL,
696
-
697
- `blog_style_width` int(4) NOT NULL,
698
- `blog_style_title_enable` tinyint(1) NOT NULL,
699
- `blog_style_images_per_page` int(4) NOT NULL,
700
- `blog_style_enable_page` tinyint(1) NOT NULL,
701
-
702
- `slideshow_type` varchar(16) NOT NULL,
703
- `slideshow_interval` int(4) NOT NULL,
704
- `slideshow_width` int(4) NOT NULL,
705
- `slideshow_height` int(4) NOT NULL,
706
- `slideshow_enable_autoplay` tinyint(1) NOT NULL,
707
- `slideshow_enable_shuffle` tinyint(1) NOT NULL,
708
- `slideshow_enable_ctrl` tinyint(1) NOT NULL,
709
- `slideshow_enable_filmstrip` tinyint(1) NOT NULL,
710
- `slideshow_filmstrip_height` int(4) NOT NULL,
711
- `slideshow_enable_title` tinyint(1) NOT NULL,
712
- `slideshow_title_position` varchar(16) NOT NULL,
713
- `slideshow_enable_description` tinyint(1) NOT NULL,
714
- `slideshow_description_position` varchar(16) NOT NULL,
715
- `slideshow_enable_music` tinyint(1) NOT NULL,
716
- `slideshow_audio_url` varchar(255) NOT NULL,
717
- `slideshow_effect_duration` int(4) NOT NULL,
718
-
719
- `popup_width` int(4) NOT NULL,
720
- `popup_height` int(4) NOT NULL,
721
- `popup_type` varchar(16) NOT NULL,
722
- `popup_interval` int(4) NOT NULL,
723
- `popup_enable_filmstrip` tinyint(1) NOT NULL,
724
- `popup_filmstrip_height` int(4) NOT NULL,
725
- `popup_enable_ctrl_btn` tinyint(1) NOT NULL,
726
- `popup_enable_fullscreen` tinyint(1) NOT NULL,
727
- `popup_enable_info` tinyint(1) NOT NULL,
728
- `popup_info_always_show` tinyint(1) NOT NULL,
729
- `popup_enable_rate` tinyint(1) NOT NULL,
730
- `popup_enable_comment` tinyint(1) NOT NULL,
731
- `popup_enable_email` tinyint(1) NOT NULL,
732
- `popup_enable_captcha` tinyint(1) NOT NULL,
733
- `popup_enable_download` tinyint(1) NOT NULL,
734
- `popup_enable_fullsize_image` tinyint(1) NOT NULL,
735
- `popup_enable_facebook` tinyint(1) NOT NULL,
736
- `popup_enable_twitter` tinyint(1) NOT NULL,
737
- `popup_enable_google` tinyint(1) NOT NULL,
738
- `popup_enable_ecommerce` tinyint(1) NOT NULL,
739
- `popup_effect_duration` int(4) NOT NULL,
740
-
741
- `watermark_type` varchar(8) NOT NULL,
742
- `watermark_position` varchar(16) NOT NULL,
743
- `watermark_width` int(4) NOT NULL,
744
- `watermark_height` int(4) NOT NULL,
745
- `watermark_url` mediumtext NOT NULL,
746
- `watermark_text` mediumtext NOT NULL,
747
- `watermark_link` mediumtext NOT NULL,
748
- `watermark_font_size` int(4) NOT NULL,
749
- `watermark_font` varchar(16) NOT NULL,
750
- `watermark_color` varchar(8) NOT NULL,
751
- `watermark_opacity` int(4) NOT NULL,
752
-
753
- `built_in_watermark_type` varchar(16) NOT NULL,
754
- `built_in_watermark_position` varchar(16) NOT NULL,
755
- `built_in_watermark_size` int(4) NOT NULL,
756
- `built_in_watermark_url` mediumtext NOT NULL,
757
- `built_in_watermark_text` mediumtext NOT NULL,
758
- `built_in_watermark_font_size` int(4) NOT NULL,
759
- `built_in_watermark_font` varchar(16) NOT NULL,
760
- `built_in_watermark_color` varchar(8) NOT NULL,
761
- `built_in_watermark_opacity` int(4) NOT NULL,
762
-
763
- `image_right_click` tinyint(1) NOT NULL,
764
- `popup_fullscreen` tinyint(1) NOT NULL,
765
- `gallery_role` tinyint(1) NOT NULL,
766
- `album_role` tinyint(1) NOT NULL,
767
- `image_role` tinyint(1) NOT NULL,
768
- `popup_autoplay` tinyint(1) NOT NULL,
769
- `album_view_type` varchar(16) NOT NULL,
770
- `popup_enable_pinterest` tinyint(1) NOT NULL,
771
- `popup_enable_tumblr` tinyint(1) NOT NULL,
772
- `show_search_box` tinyint(1) NOT NULL,
773
- `search_box_width` int(4) NOT NULL,
774
- `preload_images` tinyint(1) NOT NULL,
775
- `preload_images_count` int(4) NOT NULL,
776
- `thumb_click_action` varchar(16) NOT NULL,
777
- `thumb_link_target` tinyint(1) NOT NULL,
778
- `comment_moderation` tinyint(1) NOT NULL,
779
- `popup_hit_counter` tinyint(1) NOT NULL,
780
- `enable_ML_import` tinyint(1) NOT NULL,
781
- `showthumbs_name` tinyint(1) NOT NULL,
782
- `show_album_name` tinyint(1) NOT NULL,
783
- `show_image_counts` tinyint(1) NOT NULL,
784
- `upload_img_width` int(4) NOT NULL,
785
- `upload_img_height` int(4) NOT NULL,
786
- `play_icon` tinyint(1) NOT NULL,
787
- `show_masonry_thumb_description` tinyint(1) NOT NULL,
788
- `slideshow_title_full_width` tinyint(1) NOT NULL,
789
- `popup_info_full_width` tinyint(1) NOT NULL,
790
- `show_sort_images` tinyint(1) NOT NULL,
791
- `autoupdate_interval` int(4) NOT NULL,
792
- `instagram_access_token` varchar(128) NOT NULL,
793
- `description_tb` tinyint(1) NOT NULL,
794
- `enable_seo` tinyint(1) NOT NULL,
795
- `autohide_lightbox_navigation` tinyint(1) NOT NULL,
796
- `autohide_slideshow_navigation` tinyint(1) NOT NULL,
797
- `read_metadata` tinyint(1) NOT NULL,
798
- `enable_loop` tinyint(1) NOT NULL,
799
- `enable_addthis` tinyint(1) NOT NULL,
800
- `addthis_profile_id` varchar(66) NOT NULL,
801
- `carousel_interval` int(4) NOT NULL,
802
- `carousel_width` int(4) NOT NULL,
803
- `carousel_height` int(4) NOT NULL,
804
- `carousel_image_column_number` int(4) NOT NULL,
805
- `carousel_image_par` varchar(32) NOT NULL,
806
- `carousel_enable_title` tinyint(1) NOT NULL,
807
- `carousel_enable_autoplay` tinyint(1) NOT NULL,
808
- `carousel_r_width` int(4) NOT NULL,
809
- `carousel_fit_containerWidth` tinyint(1) NOT NULL,
810
- `carousel_prev_next_butt` tinyint(1) NOT NULL,
811
- `carousel_play_pause_butt` tinyint(1) NOT NULL,
812
- `permissions` varchar(20) NOT NULL,
813
- `facebook_app_id` varchar(64) NOT NULL,
814
- `facebook_app_secret` varchar(64) NOT NULL,
815
- `show_tag_box` tinyint(1) NOT NULL,
816
- `show_hide_custom_post` tinyint(1) NOT NULL,
817
- `show_hide_post_meta` tinyint(1) NOT NULL,
818
- `use_inline_stiles_and_scripts` tinyint(1) NOT NULL,
819
- `placeholder` varchar(32) NOT NULL,
820
- PRIMARY KEY (`id`)
821
- ) DEFAULT CHARSET=utf8;";
822
- $wpdb->query($bwg_option);
823
  $bwg_theme = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_theme` (
824
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
825
  `name` varchar(255) NOT NULL,
@@ -851,170 +686,6 @@ function bwg_activate() {
851
  ) DEFAULT CHARSET=utf8;";
852
  $wpdb->query($bwg_image_rate);
853
 
854
- $upload_dir = wp_upload_dir();
855
- if (!is_dir($upload_dir['basedir'] . '/' . plugin_basename(dirname(__FILE__)))) {
856
- mkdir($upload_dir['basedir'] . '/' . plugin_basename(dirname(__FILE__)), 0777);
857
- }
858
- $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_option');
859
- if (!$exists_default) {
860
- $save = $wpdb->insert($wpdb->prefix . 'bwg_option', array(
861
- 'id' => 1,
862
- 'images_directory' => str_replace(ABSPATH, '', $upload_dir['basedir']),
863
-
864
- 'masonry' => 'vertical',
865
- 'mosaic' => 'vertical',
866
- 'resizable_mosaic' => 0,
867
- 'mosaic_total_width'=> 100,
868
- 'image_column_number' => 5,
869
- 'images_per_page' => 30,
870
- 'thumb_width' => 180,
871
- 'thumb_height' => 90,
872
- 'upload_thumb_width' => 300,
873
- 'upload_thumb_height' => 300,
874
- 'image_enable_page' => 1,
875
- 'image_title_show_hover' => 'none',
876
-
877
- 'album_column_number' => 5,
878
- 'albums_per_page' => 30,
879
- 'album_title_show_hover' => 'hover',
880
- 'album_thumb_width' => 120,
881
- 'album_thumb_height' => 90,
882
- 'album_enable_page' => 1,
883
- 'extended_album_height' => 150,
884
- 'extended_album_description_enable' => 1,
885
-
886
- 'image_browser_width' => 800,
887
- 'image_browser_title_enable' => 1,
888
- 'image_browser_description_enable' => 1,
889
-
890
- 'blog_style_width' => 800,
891
- 'blog_style_title_enable' => 1,
892
- 'blog_style_images_per_page' => 5,
893
- 'blog_style_enable_page' => 1,
894
-
895
- 'slideshow_type' => 'fade',
896
- 'slideshow_interval' => 5,
897
- 'slideshow_width' => 800,
898
- 'slideshow_height' => 500,
899
- 'slideshow_enable_autoplay' => 0,
900
- 'slideshow_enable_shuffle' => 0,
901
- 'slideshow_enable_ctrl' => 1,
902
- 'slideshow_enable_filmstrip' => 1,
903
- 'slideshow_filmstrip_height' => 90,
904
- 'slideshow_enable_title' => 0,
905
- 'slideshow_title_position' => 'top-right',
906
- 'slideshow_enable_description' => 0,
907
- 'slideshow_description_position' => 'bottom-right',
908
- 'slideshow_enable_music' => 0,
909
- 'slideshow_audio_url' => '',
910
- 'slideshow_effect_duration' => 1,
911
-
912
- 'popup_width' => 800,
913
- 'popup_height' => 500,
914
- 'popup_type' => 'fade',
915
- 'popup_interval' => 5,
916
- 'popup_enable_filmstrip' => 1,
917
- 'popup_filmstrip_height' => 70,
918
- 'popup_enable_ctrl_btn' => 1,
919
- 'popup_enable_fullscreen' => 1,
920
- 'popup_enable_comment' => 1,
921
- 'popup_enable_email' => 0,
922
- 'popup_enable_captcha' => 0,
923
- 'popup_enable_download' => 0,
924
- 'popup_enable_fullsize_image' => 0,
925
- 'popup_enable_facebook' => 1,
926
- 'popup_enable_twitter' => 1,
927
- 'popup_enable_google' => 1,
928
- 'popup_effect_duration' => 1,
929
-
930
- 'watermark_type' => 'none',
931
- 'watermark_position' => 'bottom-left',
932
- 'watermark_width' => 90,
933
- 'watermark_height' => 90,
934
- 'watermark_url' => WD_BWG_URL . '/images/watermark.png',
935
- 'watermark_text' => 'web-dorado.com',
936
- 'watermark_link' => 'https://web-dorado.com',
937
- 'watermark_font_size' => 20,
938
- 'watermark_font' => 'segoe ui',
939
- 'watermark_color' => 'FFFFFF',
940
- 'watermark_opacity' => 30,
941
-
942
- 'built_in_watermark_type' => 'none',
943
- 'built_in_watermark_position' => 'middle-center',
944
- 'built_in_watermark_size' => 15,
945
- 'built_in_watermark_url' => WD_BWG_URL . '/images/watermark.png',
946
- 'built_in_watermark_text' => 'web-dorado.com',
947
- 'built_in_watermark_font_size' => 20,
948
- 'built_in_watermark_font' => 'arial',
949
- 'built_in_watermark_color' => 'FFFFFF',
950
- 'built_in_watermark_opacity' => 30,
951
-
952
- 'image_right_click' => 0,
953
- 'popup_fullscreen' => 0,
954
- 'gallery_role' => 0,
955
- 'album_role' => 0,
956
- 'image_role' => 0,
957
- 'popup_autoplay' => 0,
958
- 'album_view_type' => 'thumbnail',
959
- 'popup_enable_pinterest' => 0,
960
- 'popup_enable_tumblr' => 0,
961
- 'show_search_box' => 0,
962
- 'search_box_width' => 180,
963
- 'preload_images' => 0,
964
- 'preload_images_count' => 10,
965
- 'popup_enable_info' => 1,
966
- 'popup_enable_rate' => 0,
967
- 'thumb_click_action' => 'open_lightbox',
968
- 'thumb_link_target' => 1,
969
- 'comment_moderation' => 0,
970
- 'popup_info_always_show' => 0,
971
- 'popup_hit_counter' => 0,
972
- 'enable_ML_import' => 0,
973
- 'showthumbs_name'=> 0,
974
- 'show_album_name'=> 0,
975
- 'show_image_counts'=> 0,
976
- 'upload_img_width' => 1200,
977
- 'upload_img_height' => 1200,
978
- 'play_icon'=> 1,
979
- 'show_masonry_thumb_description' => 0,
980
- 'slideshow_title_full_width' => 0,
981
- 'popup_info_full_width' => 0,
982
- 'show_sort_images' => 0,
983
- 'autoupdate_interval' => 30,
984
- 'instagram_access_token' => '',
985
- 'description_tb' => 0,
986
- 'enable_seo' => 1,
987
- 'autohide_lightbox_navigation' => 1,
988
- 'autohide_slideshow_navigation' => 1,
989
- 'read_metadata' => 1,
990
- 'enable_loop'=> 1,
991
- 'enable_addthis'=> 0,
992
- 'addthis_profile_id'=> '',
993
- 'carousel_interval' => 5,
994
- 'carousel_width' => 300,
995
- 'carousel_height' => 300,
996
- 'carousel_image_column_number' => 5,
997
- 'carousel_image_par' => '0.75',
998
- 'carousel_enable_title' => 0,
999
- 'carousel_enable_autoplay' => 0,
1000
- 'carousel_r_width' => 800,
1001
- 'carousel_fit_containerWidth' => 1,
1002
- 'carousel_prev_next_butt' => 1,
1003
- 'carousel_play_pause_butt' => 1,
1004
- 'permissions' => 'manage_options',
1005
- 'facebook_app_id' => '',
1006
- 'facebook_app_secret' => '',
1007
- 'show_tag_box' => 0,
1008
- 'show_hide_custom_post' => 0,
1009
- 'show_hide_post_meta' => 0,
1010
- 'use_inline_stiles_and_scripts' => 0,
1011
- 'placeholder' => '',
1012
- 'ecommerce_icon_show_hover' => '',
1013
- 'popup_enable_ecommerce' => 0,
1014
- 'slideshow_effect_duration' => 1,
1015
- 'popup_effect_duration' => 1,
1016
- ));
1017
- }
1018
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
1019
  $theme1 = array(
1020
  'thumb_margin' => 4,
@@ -1938,7 +1609,7 @@ function bwg_activate() {
1938
  ));
1939
  }
1940
  $version = get_option('wd_bwg_version');
1941
- $new_version = '1.3.26';
1942
  if ($version && version_compare($version, $new_version, '<')) {
1943
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1944
  bwg_update($version);
@@ -1990,7 +1661,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
1990
 
1991
  function bwg_update_hook() {
1992
  $version = get_option('wd_bwg_version');
1993
- $new_version = '1.3.26';
1994
  if ($version && version_compare($version, $new_version, '<')) {
1995
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1996
  bwg_update($version);
@@ -2023,6 +1694,7 @@ function bwg_styles() {
2023
  wp_enqueue_style('bwg_tables', WD_BWG_URL . '/css/bwg_tables.css', array(), wd_bwg_version());
2024
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
2025
  $google_fonts = WDWLibrary::get_google_fonts();
 
2026
  for ($i = 0; $i < count($google_fonts); $i = $i + 120) {
2027
  $fonts = array_slice($google_fonts, $i, 120);
2028
  $query = implode("|", str_replace(' ', '+', $fonts));
@@ -2208,8 +1880,8 @@ function bwg_options_scripts() {
2208
  'watermark_set' => __('Watermarks Succesfully Set.', 'bwg_back'),
2209
  'reset' => __('Items Succesfully Reset.', 'bwg_back'),
2210
  ));
2211
- require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
2212
- wp_localize_script('bwg_admin', 'bwg_objectGGF', WDWLibrary::get_google_fonts());
2213
  }
2214
 
2215
  function bwg_front_end_scripts() {
@@ -2247,8 +1919,8 @@ function bwg_front_end_scripts() {
2247
  wp_register_style('bwg_googlefonts', $url, null, null);
2248
  }
2249
 
2250
- global $wd_bwg_inline_stiles;
2251
- if (!$wd_bwg_inline_stiles) {
2252
  wp_enqueue_style('bwg_frontend');
2253
  wp_enqueue_style('bwg_font-awesome');
2254
  wp_enqueue_style('bwg_mCustomScrollbar');
@@ -2267,15 +1939,18 @@ add_action('init', 'bwg_language_load');
2267
 
2268
  function bwg_create_post_type() {
2269
  global $wpdb;
2270
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
2271
-
2272
- if ($row->show_hide_post_meta == 1) {
 
 
 
2273
  $show_hide_post_meta = array('editor', 'comments', 'thumbnail', 'title');
2274
  }
2275
  else {
2276
  $show_hide_post_meta = array('editor', 'thumbnail', 'title');
2277
  }
2278
- if ($row->show_hide_custom_post == 0) {
2279
  $show_hide_custom_post = false;
2280
  }
2281
  else {
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.3.27
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
40
  define('WD_BWG_FRONT_URL', WD_BWG_URL);
41
  }
42
 
43
+ require_once(WD_BWG_DIR . '/framework/BWGOptions.php');
44
+ $wd_bwg_options = new WD_BWG_Options();
45
+
46
+ $WD_BWG_UPLOAD_DIR = $wd_bwg_options->images_directory . '/photo-gallery';
 
 
 
 
 
 
 
47
 
48
  // Plugin menu.
49
  function bwg_options_panel() {
655
  PRIMARY KEY (`id`)
656
  ) DEFAULT CHARSET=utf8;";
657
  $wpdb->query($bwg_image_tag);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  $bwg_theme = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_theme` (
659
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
660
  `name` varchar(255) NOT NULL,
686
  ) DEFAULT CHARSET=utf8;";
687
  $wpdb->query($bwg_image_rate);
688
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
689
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
690
  $theme1 = array(
691
  'thumb_margin' => 4,
1609
  ));
1610
  }
1611
  $version = get_option('wd_bwg_version');
1612
+ $new_version = '1.3.27';
1613
  if ($version && version_compare($version, $new_version, '<')) {
1614
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1615
  bwg_update($version);
1661
 
1662
  function bwg_update_hook() {
1663
  $version = get_option('wd_bwg_version');
1664
+ $new_version = '1.3.27';
1665
  if ($version && version_compare($version, $new_version, '<')) {
1666
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1667
  bwg_update($version);
1694
  wp_enqueue_style('bwg_tables', WD_BWG_URL . '/css/bwg_tables.css', array(), wd_bwg_version());
1695
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
1696
  $google_fonts = WDWLibrary::get_google_fonts();
1697
+
1698
  for ($i = 0; $i < count($google_fonts); $i = $i + 120) {
1699
  $fonts = array_slice($google_fonts, $i, 120);
1700
  $query = implode("|", str_replace(' ', '+', $fonts));
1880
  'watermark_set' => __('Watermarks Succesfully Set.', 'bwg_back'),
1881
  'reset' => __('Items Succesfully Reset.', 'bwg_back'),
1882
  ));
1883
+ require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
1884
+ wp_localize_script('bwg_admin', 'bwg_objectGGF', WDWLibrary::get_google_fonts());
1885
  }
1886
 
1887
  function bwg_front_end_scripts() {
1919
  wp_register_style('bwg_googlefonts', $url, null, null);
1920
  }
1921
 
1922
+ global $wd_bwg_options;
1923
+ if (!$wd_bwg_options->use_inline_stiles_and_scripts) {
1924
  wp_enqueue_style('bwg_frontend');
1925
  wp_enqueue_style('bwg_font-awesome');
1926
  wp_enqueue_style('bwg_mCustomScrollbar');
1939
 
1940
  function bwg_create_post_type() {
1941
  global $wpdb;
1942
+ global $wd_bwg_options;
1943
+ if (!isset($wd_bwg_options)) {
1944
+ $wd_bwg_options = new WD_BWG_Options();
1945
+ }
1946
+
1947
+ if ($wd_bwg_options->show_hide_post_meta == 1) {
1948
  $show_hide_post_meta = array('editor', 'comments', 'thumbnail', 'title');
1949
  }
1950
  else {
1951
  $show_hide_post_meta = array('editor', 'thumbnail', 'title');
1952
  }
1953
+ if ($wd_bwg_options->show_hide_custom_post == 0) {
1954
  $show_hide_custom_post = false;
1955
  }
1956
  else {
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Gallery ===
2
- Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: content gallery, gallery, gallery image, image gallery, images gallery, lightbox gallery, media gallery, photo gallery, responsive gallery, thumbnail gallery, wordpress gallery, youtube gallery
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
- Stable tag: 1.3.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -175,6 +175,10 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
175
 
176
  == Changelog ==
177
 
 
 
 
 
178
  = 1.3.26 =
179
  * Fixed: Sanitize folder names in filemanager.
180
  * Fixed: Random order (pagination and lightbox).
1
  === Gallery ===
2
+ Contributors: webdorado,wdsupport
3
  Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: content gallery, gallery, gallery image, image gallery, images gallery, lightbox gallery, media gallery, photo gallery, responsive gallery, thumbnail gallery, wordpress gallery, youtube gallery
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
+ Stable tag: 1.3.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.3.27 =
179
+ * Changed: Removed bwg_option table.
180
+ * Fixed: Masonry galleries bug in masonry album.
181
+
182
  = 1.3.26 =
183
  * Fixed: Sanitize folder names in filemanager.
184
  * Fixed: Random order (pagination and lightbox).
update/bwg_update.php CHANGED
@@ -317,7 +317,7 @@ function bwg_update($version) {
317
  if (version_compare($version, '1.2.61') == -1) {
318
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `show_tag_box` tinyint(1) NOT NULL DEFAULT 0");
319
  }
320
- if (version_compare($version, '1.2.64') == -1) {
321
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `show_hide_custom_post` tinyint(1) NOT NULL DEFAULT 0");
322
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `show_hide_post_meta` tinyint(1) NOT NULL DEFAULT 0");
323
  }
@@ -372,6 +372,10 @@ function bwg_update($version) {
372
  if (version_compare($version, '1.3.23') == -1) {
373
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `use_inline_stiles_and_scripts` tinyint(1) NOT NULL DEFAULT 0");
374
  }
 
 
 
 
375
  return;
376
  }
377
  ?>
317
  if (version_compare($version, '1.2.61') == -1) {
318
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `show_tag_box` tinyint(1) NOT NULL DEFAULT 0");
319
  }
320
+ if (version_compare($version, '1.2.64') == -1) {
321
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `show_hide_custom_post` tinyint(1) NOT NULL DEFAULT 0");
322
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `show_hide_post_meta` tinyint(1) NOT NULL DEFAULT 0");
323
  }
372
  if (version_compare($version, '1.3.23') == -1) {
373
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `use_inline_stiles_and_scripts` tinyint(1) NOT NULL DEFAULT 0");
374
  }
375
+ if (version_compare($version, '1.3.27') == -1) {
376
+ $bwg_options_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
377
+ add_option('wd_bwg_options', json_encode($bwg_options_row), '', 'no');
378
+ }
379
  return;
380
  }
381
  ?>