Photo Gallery by WD – Responsive Photo Gallery - Version 1.1.12

Version Description

Download this release

Release Info

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

Code changes from version 1.1.11 to 1.1.12

Files changed (50) hide show
  1. admin/controllers/BWGControllerAlbums_bwg.php +43 -33
  2. admin/controllers/BWGControllerGalleries_bwg.php +10 -2
  3. admin/controllers/BWGControllerOptions_bwg.php +5 -1
  4. admin/controllers/BWGControllerTags_bwg.php +29 -20
  5. admin/controllers/BWGControllerThemes_bwg.php +491 -475
  6. admin/controllers/BWGControllerWidgetTags.php +2 -1
  7. admin/models/BWGModelOptions_bwg.php +2 -0
  8. admin/models/BWGModelThemes_bwg.php +4 -2
  9. admin/views/BWGViewAddAlbumsGalleries.php +1 -1
  10. admin/views/BWGViewAddTags.php +1 -1
  11. admin/views/BWGViewAlbums_bwg.php +4 -6
  12. admin/views/BWGViewBWGShortcode.php +98 -26
  13. admin/views/BWGViewEditThumb.php +23 -3
  14. admin/views/BWGViewFeatured_plugins_bwg.php +25 -1
  15. admin/views/BWGViewGalleries_bwg.php +67 -45
  16. admin/views/BWGViewLicensing_bwg.php +2 -3
  17. admin/views/BWGViewOptions_bwg.php +26 -7
  18. admin/views/BWGViewTags_bwg.php +2 -3
  19. admin/views/BWGViewThemes_bwg.php +23 -7
  20. admin/views/BWGViewWidget.php +28 -26
  21. admin/views/BWGViewWidgetSlideshow.php +20 -21
  22. admin/views/BWGViewWidgetTags.php +38 -24
  23. css/bwg_featured_plugins.css +12 -11
  24. css/bwg_frontend.css +2 -2
  25. css/bwg_shortcode.css +6 -1
  26. css/bwg_tables.css +42 -0
  27. css/font-awesome-4.0.1/font-awesome.css +6 -5
  28. css/images/twitter-widget.jpg +0 -0
  29. filemanager/UploadHandler.php +51 -1
  30. filemanager/view.php +2 -3
  31. framework/WDWLibrary.php +114 -1
  32. frontend/models/BWGModelGalleryBox.php +2 -2
  33. frontend/models/BWGModelImage_browser.php +2 -2
  34. frontend/models/BWGModelSlideshow.php +2 -2
  35. frontend/models/BWGModelThumbnails.php +1 -1
  36. frontend/models/BWGModelWidget.php +1 -1
  37. frontend/views/BWGViewAlbum_compact_preview.php +42 -11
  38. frontend/views/BWGViewAlbum_extended_preview.php +20 -11
  39. frontend/views/BWGViewGalleryBox.php +206 -76
  40. frontend/views/BWGViewImage_browser.php +31 -9
  41. frontend/views/BWGViewSlideshow.php +111 -33
  42. frontend/views/BWGViewThumbnails.php +34 -4
  43. images/header.png +0 -0
  44. images/logo.png +0 -0
  45. js/bwg.js +129 -3
  46. js/bwg_frontend.js +2 -2
  47. js/bwg_shortcode.js +42 -0
  48. photo-gallery.php +119 -97
  49. readme.txt +2 -1
  50. update/bwg_update.php +11 -0
admin/controllers/BWGControllerAlbums_bwg.php CHANGED
@@ -19,8 +19,10 @@ class BWGControllerAlbums_bwg {
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
  if (method_exists($this, $task)) {
25
  $this->$task($id);
26
  }
@@ -53,22 +55,23 @@ class BWGControllerAlbums_bwg {
53
 
54
  require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
55
  $view = new BWGViewAlbums_bwg($model);
56
- $id = ((isset($_POST['current_id']) && esc_html(stripslashes($_POST['current_id'])) != '') ? esc_html(stripslashes($_POST['current_id'])) : 0);
57
  $view->edit($id);
58
  }
59
 
60
  public function save() {
61
- $this->save_db();
62
- $this->display();
 
63
  }
64
 
65
  public function apply() {
66
- $this->save_db();
67
  global $wpdb;
68
- if (!isset($_POST['current_id']) || esc_html(stripslashes($_POST['current_id'])) == '' || esc_html(stripslashes($_POST['current_id'])) == 0) {
69
- $_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
70
- }
71
- $this->edit();
72
  }
73
 
74
  // Return random image from gallery or album for album preview.
@@ -131,7 +134,7 @@ class BWGControllerAlbums_bwg {
131
 
132
  public function save_db() {
133
  global $wpdb;
134
- $id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
135
  $name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
136
  $name = $this->bwg_get_unique_name($name, $id);
137
  $slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
@@ -177,10 +180,10 @@ class BWGControllerAlbums_bwg {
177
  $random_preview_image = (($preview_image == '') ? $this->get_image_for_album($id) : '');
178
  $wpdb->update($wpdb->prefix . 'bwg_album', array('random_preview_image' => $random_preview_image), array('id' => $id));
179
  if ($save !== FALSE) {
180
- echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
181
  }
182
  else {
183
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
184
  }
185
  }
186
 
@@ -213,12 +216,13 @@ class BWGControllerAlbums_bwg {
213
  $query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $id, $id);
214
  if ($wpdb->query($query)) {
215
  $wpdb->query($query_gal);
216
- echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
217
  }
218
  else {
219
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
220
  }
221
- $this->display();
 
222
  }
223
 
224
  public function delete_all() {
@@ -235,24 +239,26 @@ class BWGControllerAlbums_bwg {
235
  }
236
  }
237
  if ($flag) {
238
- echo WDWLibrary::message('Items Succesfully Deleted.', 'updated');
239
  }
240
  else {
241
- echo WDWLibrary::message('You must select at least one item.', 'error');
242
  }
243
- $this->display();
 
244
  }
245
 
246
  public function publish($id) {
247
  global $wpdb;
248
  $save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $id));
249
  if ($save !== FALSE) {
250
- echo WDWLibrary::message('Item Succesfully Published.', 'updated');
251
  }
252
  else {
253
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
254
  }
255
- $this->display();
 
256
  }
257
 
258
  public function publish_all() {
@@ -272,24 +278,26 @@ class BWGControllerAlbums_bwg {
272
  }
273
  }
274
  if ($flag) {
275
- echo WDWLibrary::message('Items Succesfully Published.', 'updated');
276
  }
277
  else {
278
- echo WDWLibrary::message('You must select at least one item.', 'error');
279
  }
280
- $this->display();
 
281
  }
282
 
283
  public function unpublish($id) {
284
  global $wpdb;
285
  $save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $id));
286
  if ($save !== FALSE) {
287
- echo WDWLibrary::message('Item Succesfully Unpublished.', 'updated');
288
  }
289
  else {
290
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
291
  }
292
- $this->display();
 
293
  }
294
 
295
  public function unpublish_all() {
@@ -309,12 +317,13 @@ class BWGControllerAlbums_bwg {
309
  }
310
  }
311
  if ($flag) {
312
- echo WDWLibrary::message('Items Succesfully Unpublished.', 'updated');
313
  }
314
  else {
315
- echo WDWLibrary::message('You must select at least one item.', 'error');
316
  }
317
- $this->display();
 
318
  }
319
 
320
  public function save_order($flag = TRUE) {
@@ -336,10 +345,11 @@ class BWGControllerAlbums_bwg {
336
  $i++;
337
  }
338
  if ($flag) {
339
- echo WDWLibrary::message('Ordering Succesfully Saved.', 'updated');
340
  }
341
  }
342
- $this->display();
 
343
  }
344
  ////////////////////////////////////////////////////////////////////////////////////////
345
  // Getters & Setters //
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
+ $task = WDWLibrary::get('task');
23
+ $id = WDWLibrary::get('current_id', 0);
24
+ $message = WDWLibrary::get('message');
25
+ echo WDWLibrary::message_id($message);
26
  if (method_exists($this, $task)) {
27
  $this->$task($id);
28
  }
55
 
56
  require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
57
  $view = new BWGViewAlbums_bwg($model);
58
+ $id = WDWLibrary::get('current_id', 0);
59
  $view->edit($id);
60
  }
61
 
62
  public function save() {
63
+ $message = $this->save_db();
64
+ $page = WDWLibrary::get('page');
65
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
66
  }
67
 
68
  public function apply() {
69
+ $message = $this->save_db();
70
  global $wpdb;
71
+ $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
72
+ $current_id = WDWLibrary::get('current_id', $id);
73
+ $page = WDWLibrary::get('page');
74
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
75
  }
76
 
77
  // Return random image from gallery or album for album preview.
134
 
135
  public function save_db() {
136
  global $wpdb;
137
+ $id = (int) WDWLibrary::get('current_id', 0);
138
  $name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
139
  $name = $this->bwg_get_unique_name($name, $id);
140
  $slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
180
  $random_preview_image = (($preview_image == '') ? $this->get_image_for_album($id) : '');
181
  $wpdb->update($wpdb->prefix . 'bwg_album', array('random_preview_image' => $random_preview_image), array('id' => $id));
182
  if ($save !== FALSE) {
183
+ return 1;
184
  }
185
  else {
186
+ return 2;
187
  }
188
  }
189
 
216
  $query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $id, $id);
217
  if ($wpdb->query($query)) {
218
  $wpdb->query($query_gal);
219
+ $message = 3;
220
  }
221
  else {
222
+ $message = 2;
223
  }
224
+ $page = WDWLibrary::get('page');
225
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
226
  }
227
 
228
  public function delete_all() {
239
  }
240
  }
241
  if ($flag) {
242
+ $message = 5;
243
  }
244
  else {
245
+ $message = 2;
246
  }
247
+ $page = WDWLibrary::get('page');
248
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
249
  }
250
 
251
  public function publish($id) {
252
  global $wpdb;
253
  $save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $id));
254
  if ($save !== FALSE) {
255
+ $message = 9;
256
  }
257
  else {
258
+ $message = 2;
259
  }
260
+ $page = WDWLibrary::get('page');
261
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
262
  }
263
 
264
  public function publish_all() {
278
  }
279
  }
280
  if ($flag) {
281
+ $message = 10;
282
  }
283
  else {
284
+ $message = 6;
285
  }
286
+ $page = WDWLibrary::get('page');
287
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
288
  }
289
 
290
  public function unpublish($id) {
291
  global $wpdb;
292
  $save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $id));
293
  if ($save !== FALSE) {
294
+ $message = 11;
295
  }
296
  else {
297
+ $message = 2;
298
  }
299
+ $page = WDWLibrary::get('page');
300
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
301
  }
302
 
303
  public function unpublish_all() {
317
  }
318
  }
319
  if ($flag) {
320
+ $message = 12;
321
  }
322
  else {
323
+ $message = 6;
324
  }
325
+ $page = WDWLibrary::get('page');
326
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
327
  }
328
 
329
  public function save_order($flag = TRUE) {
345
  $i++;
346
  }
347
  if ($flag) {
348
+ $message = 13;
349
  }
350
  }
351
+ $page = WDWLibrary::get('page');
352
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
353
  }
354
  ////////////////////////////////////////////////////////////////////////////////////////
355
  // Getters & Setters //
admin/controllers/BWGControllerGalleries_bwg.php CHANGED
@@ -623,11 +623,19 @@ class BWGControllerGalleries_bwg {
623
  if ($id != 0) {
624
  $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
625
  if ($random_preview_image == '' || !file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $random_preview_image)) {
626
- $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
627
  }
628
  }
629
  else {
630
- $random_preview_image = (isset($_POST['thumb_url_pr_0']) ? esc_html(stripslashes($_POST['thumb_url_pr_0'])) : '');
 
 
 
 
 
 
 
 
631
  }
632
  }
633
  $published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
623
  if ($id != 0) {
624
  $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
625
  if ($random_preview_image == '' || !file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $random_preview_image)) {
626
+ $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' AND STRCMP(filetype,'YOUTUBE') AND STRCMP(filetype,'VIMEO') ORDER BY `order`", $id));
627
  }
628
  }
629
  else {
630
+ $i = 0;
631
+ $random_preview_image = '';
632
+ while (isset($_POST['thumb_url_pr_' . $i]) && isset($_POST["input_filetype_pr_" . $i])) {
633
+ if ($_POST["input_filetype_pr_" . $i] != "YOUTUBE" && $_POST["input_filetype_pr_" . $i] != "VIMEO") {
634
+ $random_preview_image = esc_html(stripslashes($_POST['thumb_url_pr_' . $i]));
635
+ break;
636
+ }
637
+ $i++;
638
+ }
639
  }
640
  }
641
  $published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
admin/controllers/BWGControllerOptions_bwg.php CHANGED
@@ -163,6 +163,8 @@ class BWGControllerOptions_bwg {
163
  $popup_fullscreen = (isset($_POST['popup_fullscreen']) ? esc_html(stripslashes($_POST['popup_fullscreen'])) : 0);
164
  $album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
165
  $image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
 
 
166
 
167
  $save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
168
  'images_directory' => $images_directory,
@@ -245,7 +247,9 @@ class BWGControllerOptions_bwg {
245
  'image_right_click' => $image_right_click,
246
  'popup_fullscreen' => $popup_fullscreen,
247
  'album_role' => $album_role,
248
- 'image_role' => $image_role
 
 
249
  ), array('id' => 1));
250
 
251
  if ($save !== FALSE) {
163
  $popup_fullscreen = (isset($_POST['popup_fullscreen']) ? esc_html(stripslashes($_POST['popup_fullscreen'])) : 0);
164
  $album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
165
  $image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
166
+ $popup_autoplay = (isset($_POST['popup_autoplay']) ? esc_html(stripslashes($_POST['popup_autoplay'])) : 0);
167
+ $album_view_type = (isset($_POST['album_view_type']) ? esc_html(stripslashes($_POST['album_view_type'])) : 'thumbnail');
168
 
169
  $save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
170
  'images_directory' => $images_directory,
247
  'image_right_click' => $image_right_click,
248
  'popup_fullscreen' => $popup_fullscreen,
249
  'album_role' => $album_role,
250
+ 'image_role' => $image_role,
251
+ 'popup_autoplay' => $popup_autoplay,
252
+ 'album_view_type' => $album_view_type,
253
  ), array('id' => 1));
254
 
255
  if ($save !== FALSE) {
admin/controllers/BWGControllerTags_bwg.php CHANGED
@@ -19,8 +19,10 @@ class BWGControllerTags_bwg {
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
  if (method_exists($this, $task)) {
25
  $this->$task($id);
26
  }
@@ -39,8 +41,9 @@ class BWGControllerTags_bwg {
39
  }
40
 
41
  public function save() {
42
- $this->save_tag();
43
- $this->display();
 
44
  }
45
 
46
  public function bwg_get_unique_slug($slug, $id) {
@@ -98,14 +101,14 @@ class BWGControllerTags_bwg {
98
  )
99
  );
100
  if (isset($save->errors)) {
101
- echo WDWLibrary::message('A term with the name provided already exists.', 'error');
102
  }
103
  else {
104
- echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
105
  }
106
  }
107
  else {
108
- echo WDWLibrary::message('Name field is required.', 'error');
109
  }
110
  }
111
 
@@ -152,10 +155,10 @@ class BWGControllerTags_bwg {
152
  )
153
  );
154
  if (isset($save->errors)) {
155
- echo WDWLibrary::message('A term with the name provided already exists.', 'error');
156
  }
157
  else {
158
- echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
159
  }
160
  }
161
  foreach ($rows as $row) {
@@ -170,7 +173,7 @@ class BWGControllerTags_bwg {
170
  'slug' => $slug
171
  ));
172
  if (isset($save->errors)) {
173
- echo WDWLibrary::message('The slug must be unique.', 'error');
174
  }
175
  else {
176
  $flag = TRUE;
@@ -178,23 +181,28 @@ class BWGControllerTags_bwg {
178
  }
179
  }
180
  if ($flag) {
181
- echo WDWLibrary::message('Item(s) Succesfully Saved.', 'updated');
182
  }
183
- $this->display();
 
 
 
 
184
  }
185
 
186
  public function delete($id) {
187
  global $wpdb;
188
  wp_delete_term($id, 'bwg_tag');
189
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id);
190
- $flag = $wpdb->query($query);
191
  if ($flag !== FALSE) {
192
- echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
193
  }
194
  else {
195
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
196
  }
197
- $this->display();
 
198
  }
199
 
200
  public function delete_all() {
@@ -209,14 +217,15 @@ class BWGControllerTags_bwg {
209
  }
210
  }
211
  if ($flag) {
212
- echo WDWLibrary::message('Items Succesfully Deleted.', 'updated');
213
  }
214
  else {
215
- echo WDWLibrary::message('You must select at least one item.', 'error');
216
  }
217
- $this->display();
 
218
  }
219
-
220
  ////////////////////////////////////////////////////////////////////////////////////////
221
  // Getters & Setters //
222
  ////////////////////////////////////////////////////////////////////////////////////////
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
+ $task = WDWLibrary::get('task');
23
+ $id = WDWLibrary::get('current_id', 0);
24
+ $message = WDWLibrary::get('message');
25
+ echo WDWLibrary::message_id($message);
26
  if (method_exists($this, $task)) {
27
  $this->$task($id);
28
  }
41
  }
42
 
43
  public function save() {
44
+ $message = $this->save_tag();
45
+ $page = WDWLibrary::get('page');
46
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
47
  }
48
 
49
  public function bwg_get_unique_slug($slug, $id) {
101
  )
102
  );
103
  if (isset($save->errors)) {
104
+ return 14;
105
  }
106
  else {
107
+ return 1;
108
  }
109
  }
110
  else {
111
+ return 15;
112
  }
113
  }
114
 
155
  )
156
  );
157
  if (isset($save->errors)) {
158
+ $message = 15;
159
  }
160
  else {
161
+ $message = 1;
162
  }
163
  }
164
  foreach ($rows as $row) {
173
  'slug' => $slug
174
  ));
175
  if (isset($save->errors)) {
176
+ $message = 16;
177
  }
178
  else {
179
  $flag = TRUE;
181
  }
182
  }
183
  if ($flag) {
184
+ $message = 1;
185
  }
186
+ else {
187
+ $message = '';
188
+ }
189
+ $page = WDWLibrary::get('page');
190
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
191
  }
192
 
193
  public function delete($id) {
194
  global $wpdb;
195
  wp_delete_term($id, 'bwg_tag');
196
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id);
197
+ $flag = $wpdb->query($query);
198
  if ($flag !== FALSE) {
199
+ $message = 3;
200
  }
201
  else {
202
+ $message = 2;
203
  }
204
+ $page = WDWLibrary::get('page');
205
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
206
  }
207
 
208
  public function delete_all() {
217
  }
218
  }
219
  if ($flag) {
220
+ $message = 5;
221
  }
222
  else {
223
+ $message = 6;
224
  }
225
+ $page = WDWLibrary::get('page');
226
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
227
  }
228
+
229
  ////////////////////////////////////////////////////////////////////////////////////////
230
  // Getters & Setters //
231
  ////////////////////////////////////////////////////////////////////////////////////////
admin/controllers/BWGControllerThemes_bwg.php CHANGED
@@ -19,8 +19,10 @@ class BWGControllerThemes_bwg {
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
- $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
- $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
 
 
24
  if (method_exists($this, $task)) {
25
  $this->$task($id);
26
  }
@@ -53,7 +55,7 @@ class BWGControllerThemes_bwg {
53
 
54
  require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
55
  $view = new BWGViewThemes_bwg($model);
56
- $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
57
  $view->edit($id, false);
58
  }
59
 
@@ -63,28 +65,30 @@ class BWGControllerThemes_bwg {
63
 
64
  require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
65
  $view = new BWGViewThemes_bwg($model);
66
- $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
67
  echo WDWLibrary::message('Changes must be saved.', 'error');
68
  $view->edit($id, TRUE);
69
  }
70
 
71
  public function save() {
72
- $this->save_db();
73
- $this->display();
 
74
  }
75
 
76
  public function apply() {
77
- $this->save_db();
78
  global $wpdb;
79
- if (!isset($_POST['current_id']) || (esc_html($_POST['current_id']) == 0) || (esc_html($_POST['current_id']) == '')) {
80
- $_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_theme');
81
- }
82
- $this->edit();
 
83
  }
84
 
85
  public function save_db() {
86
  global $wpdb;
87
- $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
88
  $name = (isset($_POST['name']) ? esc_html(stripslashes( $_POST['name'])) : 'exaple');
89
  $thumb_margin = (isset($_POST['thumb_margin']) ? esc_html(stripslashes( $_POST['thumb_margin'])) : '');
90
  $thumb_padding = (isset($_POST['thumb_padding']) ? esc_html(stripslashes( $_POST['thumb_padding'])) : '');
@@ -103,6 +107,7 @@ class BWGControllerThemes_bwg {
103
  $thumb_transition = (isset($_POST['thumb_transition']) ? (int) esc_html(stripslashes( $_POST['thumb_transition'])) : 0);
104
  $thumb_title_margin = (isset($_POST['thumb_title_margin']) ? esc_html(stripslashes( $_POST['thumb_title_margin'])) : '');
105
  $thumb_title_font_style = (isset($_POST['thumb_title_font_style']) ? esc_html(stripslashes( $_POST['thumb_title_font_style'])) : 'inherit');
 
106
  $thumb_title_font_color = (isset($_POST['thumb_title_font_color']) ? esc_html(stripslashes( $_POST['thumb_title_font_color'])) : 'CCCCCC');
107
  $thumb_title_shadow = (isset($_POST['thumb_title_shadow']) ? esc_html(stripslashes( $_POST['thumb_title_shadow'])) : '');
108
  $thumb_title_font_size = (isset($_POST['thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['thumb_title_font_size'])) : 12);
@@ -261,6 +266,7 @@ class BWGControllerThemes_bwg {
261
 
262
  $album_compact_title_margin = (isset($_POST['album_compact_title_margin']) ? esc_html(stripslashes( $_POST['album_compact_title_margin'])) : '');
263
  $album_compact_title_font_style = (isset($_POST['album_compact_title_font_style']) ? esc_html(stripslashes( $_POST['album_compact_title_font_style'])) : 'inherit');
 
264
  $album_compact_title_font_color = (isset($_POST['album_compact_title_font_color']) ? esc_html(stripslashes( $_POST['album_compact_title_font_color'])) : 'CCCCCC');
265
  $album_compact_title_shadow = (isset($_POST['album_compact_title_shadow']) ? esc_html(stripslashes( $_POST['album_compact_title_shadow'])) : '');
266
  $album_compact_title_font_size = (isset($_POST['album_compact_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_title_font_size'])) : 12);
@@ -421,304 +427,306 @@ class BWGControllerThemes_bwg {
421
  'thumb_bg_color' => $thumb_bg_color,
422
  'thumbs_bg_color' => $thumbs_bg_color,
423
  'thumb_bg_transparent' => $thumb_bg_transparent,
424
- 'thumb_box_shadow' => $thumb_box_shadow,
425
- 'thumb_transparent' => $thumb_transparent,
426
- 'thumb_align' => $thumb_align,
427
- 'thumb_hover_effect' => $thumb_hover_effect,
428
- 'thumb_hover_effect_value' => $thumb_hover_effect_value,
429
  'thumb_transition' => $thumb_transition,
430
  'thumb_title_margin' => $thumb_title_margin,
431
  'thumb_title_font_style' => $thumb_title_font_style,
 
432
  'thumb_title_font_color' => $thumb_title_font_color,
433
  'thumb_title_shadow' => $thumb_title_shadow,
434
  'thumb_title_font_size' => $thumb_title_font_size,
435
  'thumb_title_font_weight' => $thumb_title_font_weight,
436
 
437
- 'page_nav_position' => $page_nav_position,
438
- 'page_nav_align' => $page_nav_align,
439
- 'page_nav_number' => $page_nav_number,
440
- 'page_nav_font_size' => $page_nav_font_size,
441
- 'page_nav_font_style' => $page_nav_font_style,
442
- 'page_nav_font_color' => $page_nav_font_color,
443
- 'page_nav_font_weight' => $page_nav_font_weight,
444
  'page_nav_border_width' => $page_nav_border_width,
445
- 'page_nav_border_style'=> $page_nav_border_style,
446
- 'page_nav_border_color' => $page_nav_border_color,
447
  'page_nav_border_radius' => $page_nav_border_radius,
448
  'page_nav_margin' => $page_nav_margin,
449
  'page_nav_padding' => $page_nav_padding,
450
- 'page_nav_button_bg_color' => $page_nav_button_bg_color,
451
- 'page_nav_button_bg_transparent' => $page_nav_button_bg_transparent,
452
- 'page_nav_box_shadow' => $page_nav_box_shadow,
453
  'page_nav_button_transition' => $page_nav_button_transition,
454
- 'page_nav_button_text' => $page_nav_button_text,
455
- 'lightbox_ctrl_btn_pos' => $lightbox_ctrl_btn_pos,
456
- 'lightbox_ctrl_btn_align' => $lightbox_ctrl_btn_align,
457
- 'lightbox_ctrl_btn_height' => $lightbox_ctrl_btn_height,
458
- 'lightbox_ctrl_btn_margin_top' => $lightbox_ctrl_btn_margin_top,
459
- 'lightbox_ctrl_btn_margin_left' => $lightbox_ctrl_btn_margin_left,
460
- 'lightbox_ctrl_btn_transparent' => $lightbox_ctrl_btn_transparent,
461
- 'lightbox_ctrl_btn_color' => $lightbox_ctrl_btn_color,
462
- 'lightbox_toggle_btn_height' => $lightbox_toggle_btn_height,
463
- 'lightbox_toggle_btn_width' => $lightbox_toggle_btn_width,
464
- 'lightbox_ctrl_cont_bg_color' => $lightbox_ctrl_cont_bg_color,
465
- 'lightbox_ctrl_cont_border_radius' => $lightbox_ctrl_cont_border_radius,
466
- 'lightbox_ctrl_cont_transparent' => $lightbox_ctrl_cont_transparent,
467
- 'lightbox_close_btn_bg_color' => $lightbox_close_btn_bg_color,
468
- 'lightbox_close_btn_border_radius' => $lightbox_close_btn_border_radius,
469
- 'lightbox_close_btn_border_width' => $lightbox_close_btn_border_width,
470
- 'lightbox_close_btn_border_style' => $lightbox_close_btn_border_style,
471
- 'lightbox_close_btn_border_color' => $lightbox_close_btn_border_color,
472
- 'lightbox_close_btn_box_shadow' => $lightbox_close_btn_box_shadow,
473
- 'lightbox_close_btn_color' => $lightbox_close_btn_color,
474
- 'lightbox_close_btn_size' => $lightbox_close_btn_size,
475
- 'lightbox_close_btn_width' => $lightbox_close_btn_width,
476
- 'lightbox_close_btn_height' => $lightbox_close_btn_height,
477
- 'lightbox_close_btn_top' => $lightbox_close_btn_top,
478
- 'lightbox_close_btn_right' => $lightbox_close_btn_right,
479
- 'lightbox_close_btn_full_color' => $lightbox_close_btn_full_color,
480
- 'lightbox_close_btn_transparent' => $lightbox_close_btn_transparent,
481
  'lightbox_rl_btn_bg_color' => $lightbox_rl_btn_bg_color,
482
  'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
483
- 'lightbox_rl_btn_border_radius' => $lightbox_rl_btn_border_radius,
484
- 'lightbox_rl_btn_border_width' => $lightbox_rl_btn_border_width,
485
- 'lightbox_rl_btn_border_style' => $lightbox_rl_btn_border_style,
486
- 'lightbox_rl_btn_border_color' => $lightbox_rl_btn_border_color,
487
- 'lightbox_rl_btn_box_shadow' => $lightbox_rl_btn_box_shadow,
488
- 'lightbox_rl_btn_color' => $lightbox_rl_btn_color,
489
- 'lightbox_rl_btn_height' => $lightbox_rl_btn_height,
490
- 'lightbox_rl_btn_width' => $lightbox_rl_btn_width,
491
- 'lightbox_rl_btn_size' => $lightbox_rl_btn_size,
492
- 'lightbox_close_rl_btn_hover_color' => $lightbox_close_rl_btn_hover_color,
493
- 'lightbox_comment_pos' => $lightbox_comment_pos,
494
- 'lightbox_comment_width' => $lightbox_comment_width,
495
- 'lightbox_comment_bg_color' => $lightbox_comment_bg_color,
496
- 'lightbox_comment_font_color' => $lightbox_comment_font_color,
497
- 'lightbox_comment_font_style' => $lightbox_comment_font_style,
498
- 'lightbox_comment_font_size' => $lightbox_comment_font_size,
499
- 'lightbox_comment_button_bg_color' => $lightbox_comment_button_bg_color,
500
- 'lightbox_comment_button_border_color' => $lightbox_comment_button_border_color,
501
- 'lightbox_comment_button_border_width' => $lightbox_comment_button_border_width,
502
- 'lightbox_comment_button_border_style' => $lightbox_comment_button_border_style,
503
- 'lightbox_comment_button_border_radius' => $lightbox_comment_button_border_radius,
504
- 'lightbox_comment_button_padding' => $lightbox_comment_button_padding,
505
  'lightbox_comment_input_bg_color' => $lightbox_comment_input_bg_color,
506
- 'lightbox_comment_input_border_color' => $lightbox_comment_input_border_color,
507
- 'lightbox_comment_input_border_width' => $lightbox_comment_input_border_width,
508
- 'lightbox_comment_input_border_style' => $lightbox_comment_input_border_style,
509
- 'lightbox_comment_input_border_radius' => $lightbox_comment_input_border_radius,
510
- 'lightbox_comment_input_padding' => $lightbox_comment_input_padding,
511
- 'lightbox_comment_separator_width' => $lightbox_comment_separator_width,
512
- 'lightbox_comment_separator_style' => $lightbox_comment_separator_style,
513
- 'lightbox_comment_separator_color' => $lightbox_comment_separator_color,
514
- 'lightbox_comment_author_font_size' => $lightbox_comment_author_font_size,
515
- 'lightbox_comment_date_font_size' => $lightbox_comment_date_font_size,
516
- 'lightbox_comment_body_font_size' => $lightbox_comment_body_font_size,
517
- 'lightbox_comment_share_button_color' => $lightbox_comment_share_button_color,
518
- 'lightbox_filmstrip_rl_bg_color' => $lightbox_filmstrip_rl_bg_color,
519
- 'lightbox_filmstrip_rl_btn_size' => $lightbox_filmstrip_rl_btn_size,
520
- 'lightbox_filmstrip_rl_btn_color' => $lightbox_filmstrip_rl_btn_color,
521
- 'lightbox_filmstrip_thumb_margin' => $lightbox_filmstrip_thumb_margin,
522
- 'lightbox_filmstrip_thumb_border_width' => $lightbox_filmstrip_thumb_border_width,
523
- 'lightbox_filmstrip_thumb_border_style' => $lightbox_filmstrip_thumb_border_style,
524
- 'lightbox_filmstrip_thumb_border_color' => $lightbox_filmstrip_thumb_border_color,
525
- 'lightbox_filmstrip_thumb_border_radius' => $lightbox_filmstrip_thumb_border_radius,
526
- 'lightbox_filmstrip_thumb_deactive_transparent' => $lightbox_filmstrip_thumb_deactive_transparent,
527
- 'lightbox_filmstrip_pos' => $lightbox_filmstrip_pos,
528
- 'lightbox_filmstrip_thumb_active_border_width' => $lightbox_filmstrip_thumb_active_border_width,
529
  'lightbox_filmstrip_thumb_active_border_color' => $lightbox_filmstrip_thumb_active_border_color,
530
  'lightbox_overlay_bg_transparent' => $lightbox_overlay_bg_transparent,
531
  'lightbox_bg_color' => $lightbox_bg_color,
532
- 'lightbox_overlay_bg_color' => $lightbox_overlay_bg_color,
533
- 'lightbox_rl_btn_style' => $lightbox_rl_btn_style,
534
 
535
- 'blog_style_margin' => $blog_style_margin,
536
- 'blog_style_padding' => $blog_style_padding,
537
- 'blog_style_border_radius' => $blog_style_border_radius,
538
- 'blog_style_border_width' => $blog_style_border_width,
539
- 'blog_style_border_style' => $blog_style_border_style,
540
- 'blog_style_border_color' => $blog_style_border_color,
541
  'blog_style_bg_color' => $blog_style_bg_color,
542
  'blog_style_transparent' => $blog_style_transparent,
543
  'blog_style_box_shadow' => $blog_style_box_shadow,
544
  'blog_style_align' => $blog_style_align,
545
- 'blog_style_share_buttons_margin' => $blog_style_share_buttons_margin,
546
- 'blog_style_share_buttons_border_radius' => $blog_style_share_buttons_border_radius,
547
- 'blog_style_share_buttons_border_width' => $blog_style_share_buttons_border_width,
548
- 'blog_style_share_buttons_border_style' => $blog_style_share_buttons_border_style,
549
- 'blog_style_share_buttons_border_color' => $blog_style_share_buttons_border_color,
550
- 'blog_style_share_buttons_bg_color' => $blog_style_share_buttons_bg_color,
551
- 'blog_style_share_buttons_align' => $blog_style_share_buttons_align,
552
- 'blog_style_img_font_size' => $blog_style_img_font_size,
553
- 'blog_style_img_font_family' => $blog_style_img_font_family,
554
  'blog_style_img_font_color' => $blog_style_img_font_color,
555
  'blog_style_share_buttons_font_size' => $blog_style_share_buttons_font_size,
556
  'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
557
  'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
558
 
559
- 'image_browser_margin' => $image_browser_margin ,
560
- 'image_browser_padding' => $image_browser_padding ,
561
- 'image_browser_border_radius'=> $image_browser_border_radius ,
562
- 'image_browser_border_width' => $image_browser_border_width ,
563
- 'image_browser_border_style' => $image_browser_border_style ,
564
- 'image_browser_border_color' => $image_browser_border_color ,
565
- 'image_browser_bg_color' => $image_browser_bg_color ,
566
- 'image_browser_box_shadow' => $image_browser_box_shadow ,
567
- 'image_browser_transparent' => $image_browser_transparent ,
568
- 'image_browser_align' => $image_browser_align ,
569
- 'image_browser_image_description_margin' => $image_browser_image_description_margin ,
570
- 'image_browser_image_description_padding' => $image_browser_image_description_padding ,
571
- 'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius ,
572
- 'image_browser_image_description_border_width' => $image_browser_image_description_border_width ,
573
- 'image_browser_image_description_border_style' => $image_browser_image_description_border_style ,
574
- 'image_browser_image_description_border_color' => $image_browser_image_description_border_color ,
575
- 'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color ,
576
- 'image_browser_image_description_align' => $image_browser_image_description_align ,
577
- 'image_browser_img_font_size' => $image_browser_img_font_size ,
578
- 'image_browser_img_font_family' => $image_browser_img_font_family ,
579
- 'image_browser_img_font_color' => $image_browser_img_font_color ,
580
- 'image_browser_full_padding' => $image_browser_full_padding ,
581
- 'image_browser_full_border_radius' => $image_browser_full_border_radius ,
582
- 'image_browser_full_border_width' => $image_browser_full_border_width ,
583
- 'image_browser_full_border_style' => $image_browser_full_border_style ,
584
- 'image_browser_full_border_color' => $image_browser_full_border_color ,
585
- 'image_browser_full_bg_color' => $image_browser_full_bg_color ,
586
- 'image_browser_full_transparent' => $image_browser_full_transparent ,
587
 
588
- 'album_compact_title_margin' => $album_compact_title_margin ,
589
- 'album_compact_thumb_margin' => $album_compact_thumb_margin ,
590
- 'album_compact_back_padding' => $album_compact_back_padding ,
591
- 'album_compact_thumb_padding' => $album_compact_thumb_padding ,
592
- 'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius ,
593
- 'album_compact_thumb_border_width' => $album_compact_thumb_border_width ,
594
- 'album_compact_title_font_style' => $album_compact_title_font_style ,
595
- 'album_compact_back_font_color' => $album_compact_back_font_color ,
596
- 'album_compact_title_font_color' => $album_compact_title_font_color ,
597
- 'album_compact_title_shadow' => $album_compact_title_shadow ,
598
- 'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent ,
599
- 'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow ,
600
- 'album_compact_thumb_transition' => $album_compact_thumb_transition ,
601
- 'album_compact_thumb_border_style' => $album_compact_thumb_border_style ,
602
- 'album_compact_thumb_border_color' => $album_compact_thumb_border_color ,
603
- 'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color ,
604
- 'album_compact_back_font_weight' => $album_compact_back_font_weight ,
605
- 'album_compact_back_font_size' => $album_compact_back_font_size ,
606
- 'album_compact_back_font_style' => $album_compact_back_font_style ,
607
- 'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color ,
608
- 'album_compact_title_font_size' => $album_compact_title_font_size ,
609
- 'album_compact_title_font_weight' => $album_compact_title_font_weight ,
610
- 'album_compact_thumb_align' => $album_compact_thumb_align ,
611
- 'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect ,
612
- 'album_compact_thumb_transparent' => $album_compact_thumb_transparent ,
613
- 'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value ,
614
- 'album_extended_thumb_margin' => $album_extended_thumb_margin ,
615
- 'album_extended_thumb_padding' => $album_extended_thumb_padding ,
616
- 'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius ,
617
- 'album_extended_thumb_border_width' => $album_extended_thumb_border_width ,
618
- 'album_extended_thumb_border_style' => $album_extended_thumb_border_style ,
619
- 'album_extended_thumb_border_color' => $album_extended_thumb_border_color ,
620
- 'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color ,
621
- 'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color ,
622
- 'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent ,
623
- 'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow ,
624
- 'album_extended_thumb_transparent' => $album_extended_thumb_transparent ,
625
- 'album_extended_thumb_align' => $album_extended_thumb_align ,
626
- 'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect ,
627
- 'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value ,
628
- 'album_extended_thumb_transition' => $album_extended_thumb_transition ,
629
- 'album_extended_back_font_color' => $album_extended_back_font_color ,
630
- 'album_extended_back_font_style' => $album_extended_back_font_style ,
631
- 'album_extended_back_font_size' => $album_extended_back_font_size ,
632
- 'album_extended_back_font_weight' => $album_extended_back_font_weight ,
633
- 'album_extended_back_padding' => $album_extended_back_padding ,
634
- 'album_extended_div_bg_color' => $album_extended_div_bg_color ,
635
- 'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent ,
636
- 'album_extended_div_border_radius' => $album_extended_div_border_radius ,
637
- 'album_extended_div_margin' => $album_extended_div_margin ,
638
- 'album_extended_div_padding' => $album_extended_div_padding ,
639
- 'album_extended_div_separator_width' => $album_extended_div_separator_width ,
640
- 'album_extended_div_separator_style' => $album_extended_div_separator_style ,
641
- 'album_extended_div_separator_color' => $album_extended_div_separator_color ,
642
- 'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color ,
643
- 'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius ,
644
- 'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width ,
645
- 'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style ,
646
- 'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color ,
647
- 'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding ,
648
- 'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color ,
649
- 'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius ,
650
- 'album_extended_text_div_border_width' => $album_extended_text_div_border_width ,
651
- 'album_extended_text_div_border_style' => $album_extended_text_div_border_style ,
652
- 'album_extended_text_div_border_color' => $album_extended_text_div_border_color ,
653
- 'album_extended_text_div_padding' => $album_extended_text_div_padding ,
654
- 'album_extended_title_span_border_width' => $album_extended_title_span_border_width ,
655
- 'album_extended_title_span_border_style' => $album_extended_title_span_border_style ,
656
- 'album_extended_title_span_border_color' => $album_extended_title_span_border_color ,
657
- 'album_extended_title_font_color' => $album_extended_title_font_color ,
658
- 'album_extended_title_font_style' => $album_extended_title_font_style ,
659
- 'album_extended_title_font_size' => $album_extended_title_font_size ,
660
- 'album_extended_title_font_weight' => $album_extended_title_font_weight ,
661
- 'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom ,
662
- 'album_extended_title_padding' => $album_extended_title_padding ,
663
- 'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width ,
664
- 'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style ,
665
- 'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color ,
666
- 'album_extended_desc_font_color' => $album_extended_desc_font_color ,
667
- 'album_extended_desc_font_style' => $album_extended_desc_font_style ,
668
- 'album_extended_desc_font_size' => $album_extended_desc_font_size ,
669
- 'album_extended_desc_font_weight' => $album_extended_desc_font_weight ,
670
- 'album_extended_desc_padding' => $album_extended_desc_padding ,
671
- 'album_extended_desc_more_color' => $album_extended_desc_more_color ,
672
- 'album_extended_desc_more_size' => $album_extended_desc_more_size ,
 
673
 
674
- 'slideshow_cont_bg_color' => $slideshow_cont_bg_color ,
675
- 'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent ,
676
- 'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color ,
677
- 'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius ,
678
- 'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width ,
679
- 'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style ,
680
- 'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color ,
681
- 'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow ,
682
- 'slideshow_rl_btn_color' => $slideshow_rl_btn_color ,
683
- 'slideshow_rl_btn_height' => $slideshow_rl_btn_height ,
684
- 'slideshow_rl_btn_size' => $slideshow_rl_btn_size ,
685
- 'slideshow_rl_btn_width' => $slideshow_rl_btn_width ,
686
- 'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color ,
687
- 'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos ,
688
- 'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width ,
689
- 'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style ,
690
- 'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color ,
691
- 'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius ,
692
- 'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin ,
693
- 'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width ,
694
- 'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color ,
695
- 'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent ,
696
- 'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color ,
697
- 'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color ,
698
- 'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size ,
699
- 'slideshow_title_font_size' => $slideshow_title_font_size ,
700
- 'slideshow_title_font' => $slideshow_title_font ,
701
- 'slideshow_title_color' => $slideshow_title_color ,
702
- 'slideshow_title_opacity' => $slideshow_title_opacity ,
703
- 'slideshow_title_border_radius' => $slideshow_title_border_radius ,
704
- 'slideshow_title_background_color' => $slideshow_title_background_color ,
705
- 'slideshow_title_padding' => $slideshow_title_padding ,
706
- 'slideshow_description_font_size' => $slideshow_description_font_size ,
707
- 'slideshow_description_font' => $slideshow_description_font ,
708
- 'slideshow_description_color' => $slideshow_description_color ,
709
- 'slideshow_description_opacity' => $slideshow_description_opacity ,
710
- 'slideshow_description_border_radius' => $slideshow_description_border_radius ,
711
- 'slideshow_description_background_color' => $slideshow_description_background_color ,
712
- 'slideshow_description_padding' => $slideshow_description_padding ,
713
- 'slideshow_dots_width' => $slideshow_dots_width ,
714
- 'slideshow_dots_height' => $slideshow_dots_height ,
715
- 'slideshow_dots_border_radius' => $slideshow_dots_border_radius ,
716
- 'slideshow_dots_background_color' => $slideshow_dots_background_color ,
717
- 'slideshow_dots_margin' => $slideshow_dots_margin ,
718
- 'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color ,
719
- 'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width ,
720
- 'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color ,
721
- 'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size ,
722
  'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
723
 
724
  'masonry_thumb_padding' => $masonry_thumb_padding,
@@ -739,24 +747,25 @@ class BWGControllerThemes_bwg {
739
  }
740
  else {
741
  $save = $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
742
- 'name' => $name,
743
- 'thumb_margin' => $thumb_margin,
744
- 'thumb_padding' => $thumb_padding,
745
- 'thumb_border_radius' => $thumb_border_radius,
746
- 'thumb_border_width' => $thumb_border_width,
747
- 'thumb_border_style' => $thumb_border_style,
748
- 'thumb_border_color' => $thumb_border_color,
749
- 'thumb_bg_color' => $thumb_bg_color,
750
- 'thumbs_bg_color' => $thumbs_bg_color,
751
- 'thumb_bg_transparent' => $thumb_bg_transparent,
752
- 'thumb_box_shadow' => $thumb_box_shadow,
753
- 'thumb_transparent' => $thumb_transparent,
754
- 'thumb_align' => $thumb_align,
755
- 'thumb_hover_effect' => $thumb_hover_effect,
756
- 'thumb_hover_effect_value' => $thumb_hover_effect_value,
757
  'thumb_transition' => $thumb_transition,
758
  'thumb_title_margin' => $thumb_title_margin,
759
  'thumb_title_font_style' => $thumb_title_font_style,
 
760
  'thumb_title_font_color' => $thumb_title_font_color,
761
  'thumb_title_shadow' => $thumb_title_shadow,
762
  'thumb_title_font_size' => $thumb_title_font_size,
@@ -882,169 +891,170 @@ class BWGControllerThemes_bwg {
882
  'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
883
  'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
884
 
885
- 'image_browser_margin' => $image_browser_margin ,
886
- 'image_browser_padding' => $image_browser_padding ,
887
- 'image_browser_border_radius'=> $image_browser_border_radius ,
888
- 'image_browser_border_width' => $image_browser_border_width ,
889
- 'image_browser_border_style' => $image_browser_border_style ,
890
- 'image_browser_border_color' => $image_browser_border_color ,
891
- 'image_browser_bg_color' => $image_browser_bg_color ,
892
- 'image_browser_box_shadow' => $image_browser_box_shadow ,
893
- 'image_browser_transparent' => $image_browser_transparent ,
894
- 'image_browser_align' => $image_browser_align ,
895
- 'image_browser_image_description_margin' => $image_browser_image_description_margin ,
896
- 'image_browser_image_description_padding' => $image_browser_image_description_padding ,
897
- 'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius ,
898
- 'image_browser_image_description_border_width' => $image_browser_image_description_border_width ,
899
- 'image_browser_image_description_border_style' => $image_browser_image_description_border_style ,
900
- 'image_browser_image_description_border_color' => $image_browser_image_description_border_color ,
901
- 'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color ,
902
- 'image_browser_image_description_align' => $image_browser_image_description_align ,
903
- 'image_browser_img_font_size' => $image_browser_img_font_size ,
904
- 'image_browser_img_font_family' => $image_browser_img_font_family ,
905
- 'image_browser_img_font_color' => $image_browser_img_font_color ,
906
- 'image_browser_full_padding' => $image_browser_full_padding ,
907
- 'image_browser_full_border_radius' => $image_browser_full_border_radius ,
908
- 'image_browser_full_border_width' => $image_browser_full_border_width ,
909
- 'image_browser_full_border_style' => $image_browser_full_border_style ,
910
- 'image_browser_full_border_color' => $image_browser_full_border_color ,
911
- 'image_browser_full_bg_color' => $image_browser_full_bg_color ,
912
- 'image_browser_full_transparent' => $image_browser_full_transparent ,
913
 
914
- 'album_compact_title_margin' => $album_compact_title_margin ,
915
- 'album_compact_thumb_margin' => $album_compact_thumb_margin ,
916
- 'album_compact_back_padding' => $album_compact_back_padding ,
917
- 'album_compact_thumb_padding' => $album_compact_thumb_padding ,
918
- 'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius ,
919
- 'album_compact_thumb_border_width' => $album_compact_thumb_border_width ,
920
- 'album_compact_title_font_style' => $album_compact_title_font_style ,
921
- 'album_compact_back_font_color' => $album_compact_back_font_color ,
922
- 'album_compact_title_font_color' => $album_compact_title_font_color ,
923
- 'album_compact_title_shadow' => $album_compact_title_shadow ,
924
- 'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent ,
925
- 'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow ,
926
- 'album_compact_thumb_transition' => $album_compact_thumb_transition ,
927
- 'album_compact_thumb_border_style' => $album_compact_thumb_border_style ,
928
- 'album_compact_thumb_border_color' => $album_compact_thumb_border_color ,
929
- 'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color ,
930
- 'album_compact_back_font_weight' => $album_compact_back_font_weight ,
931
- 'album_compact_back_font_size' => $album_compact_back_font_size ,
932
- 'album_compact_back_font_style' => $album_compact_back_font_style ,
933
- 'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color ,
934
- 'album_compact_title_font_size' => $album_compact_title_font_size ,
935
- 'album_compact_title_font_weight' => $album_compact_title_font_weight ,
936
- 'album_compact_thumb_align' => $album_compact_thumb_align ,
937
- 'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect ,
938
- 'album_compact_thumb_transparent' => $album_compact_thumb_transparent ,
939
- 'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value ,
940
- 'album_extended_thumb_margin' => $album_extended_thumb_margin ,
941
- 'album_extended_thumb_padding' => $album_extended_thumb_padding ,
942
- 'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius ,
943
- 'album_extended_thumb_border_width' => $album_extended_thumb_border_width ,
944
- 'album_extended_thumb_border_style' => $album_extended_thumb_border_style ,
945
- 'album_extended_thumb_border_color' => $album_extended_thumb_border_color ,
946
- 'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color ,
947
- 'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color ,
948
- 'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent ,
949
- 'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow ,
950
- 'album_extended_thumb_transparent' => $album_extended_thumb_transparent ,
951
- 'album_extended_thumb_align' => $album_extended_thumb_align ,
952
- 'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect ,
953
- 'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value ,
954
- 'album_extended_thumb_transition' => $album_extended_thumb_transition ,
955
- 'album_extended_back_font_color' => $album_extended_back_font_color ,
956
- 'album_extended_back_font_style' => $album_extended_back_font_style ,
957
- 'album_extended_back_font_size' => $album_extended_back_font_size ,
958
- 'album_extended_back_font_weight' => $album_extended_back_font_weight ,
959
- 'album_extended_back_padding' => $album_extended_back_padding ,
960
- 'album_extended_div_bg_color' => $album_extended_div_bg_color ,
961
- 'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent ,
962
- 'album_extended_div_border_radius' => $album_extended_div_border_radius ,
963
- 'album_extended_div_margin' => $album_extended_div_margin ,
964
- 'album_extended_div_padding' => $album_extended_div_padding ,
965
- 'album_extended_div_separator_width' => $album_extended_div_separator_width ,
966
- 'album_extended_div_separator_style' => $album_extended_div_separator_style ,
967
- 'album_extended_div_separator_color' => $album_extended_div_separator_color ,
968
- 'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color ,
969
- 'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius ,
970
- 'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width ,
971
- 'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style ,
972
- 'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color ,
973
- 'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding ,
974
- 'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color ,
975
- 'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius ,
976
- 'album_extended_text_div_border_width' => $album_extended_text_div_border_width ,
977
- 'album_extended_text_div_border_style' => $album_extended_text_div_border_style ,
978
- 'album_extended_text_div_border_color' => $album_extended_text_div_border_color ,
979
- 'album_extended_text_div_padding' => $album_extended_text_div_padding ,
980
- 'album_extended_title_span_border_width' => $album_extended_title_span_border_width ,
981
- 'album_extended_title_span_border_style' => $album_extended_title_span_border_style ,
982
- 'album_extended_title_span_border_color' => $album_extended_title_span_border_color ,
983
- 'album_extended_title_font_color' => $album_extended_title_font_color ,
984
- 'album_extended_title_font_style' => $album_extended_title_font_style ,
985
- 'album_extended_title_font_size' => $album_extended_title_font_size ,
986
- 'album_extended_title_font_weight' => $album_extended_title_font_weight ,
987
- 'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom ,
988
- 'album_extended_title_padding' => $album_extended_title_padding ,
989
- 'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width ,
990
- 'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style ,
991
- 'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color ,
992
- 'album_extended_desc_font_color' => $album_extended_desc_font_color ,
993
- 'album_extended_desc_font_style' => $album_extended_desc_font_style ,
994
- 'album_extended_desc_font_size' => $album_extended_desc_font_size ,
995
- 'album_extended_desc_font_weight' => $album_extended_desc_font_weight ,
996
- 'album_extended_desc_padding' => $album_extended_desc_padding ,
997
- 'album_extended_desc_more_color' => $album_extended_desc_more_color ,
998
- 'album_extended_desc_more_size' => $album_extended_desc_more_size ,
 
999
 
1000
- 'slideshow_cont_bg_color' => $slideshow_cont_bg_color ,
1001
- 'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent ,
1002
- 'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color ,
1003
- 'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius ,
1004
- 'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width ,
1005
- 'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style ,
1006
- 'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color ,
1007
- 'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow ,
1008
- 'slideshow_rl_btn_color' => $slideshow_rl_btn_color ,
1009
- 'slideshow_rl_btn_height' => $slideshow_rl_btn_height ,
1010
- 'slideshow_rl_btn_size' => $slideshow_rl_btn_size ,
1011
- 'slideshow_rl_btn_width' => $slideshow_rl_btn_width ,
1012
- 'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color ,
1013
- 'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos ,
1014
- 'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width ,
1015
- 'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style ,
1016
- 'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color ,
1017
- 'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius ,
1018
- 'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin ,
1019
- 'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width ,
1020
- 'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color ,
1021
- 'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent ,
1022
- 'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color ,
1023
- 'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color ,
1024
- 'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size ,
1025
- 'slideshow_title_font_size' => $slideshow_title_font_size ,
1026
- 'slideshow_title_font' => $slideshow_title_font ,
1027
- 'slideshow_title_color' => $slideshow_title_color ,
1028
- 'slideshow_title_opacity' => $slideshow_title_opacity ,
1029
- 'slideshow_title_border_radius' => $slideshow_title_border_radius ,
1030
- 'slideshow_title_background_color' => $slideshow_title_background_color ,
1031
- 'slideshow_title_padding' => $slideshow_title_padding ,
1032
- 'slideshow_description_font_size' => $slideshow_description_font_size ,
1033
- 'slideshow_description_font' => $slideshow_description_font ,
1034
- 'slideshow_description_color' => $slideshow_description_color ,
1035
- 'slideshow_description_opacity' => $slideshow_description_opacity ,
1036
- 'slideshow_description_border_radius' => $slideshow_description_border_radius ,
1037
- 'slideshow_description_background_color' => $slideshow_description_background_color ,
1038
- 'slideshow_description_padding' => $slideshow_description_padding ,
1039
- 'slideshow_dots_width' => $slideshow_dots_width ,
1040
- 'slideshow_dots_height' => $slideshow_dots_height ,
1041
- 'slideshow_dots_border_radius' => $slideshow_dots_border_radius ,
1042
- 'slideshow_dots_background_color' => $slideshow_dots_background_color ,
1043
- 'slideshow_dots_margin' => $slideshow_dots_margin ,
1044
- 'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color ,
1045
- 'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width ,
1046
- 'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color ,
1047
- 'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size ,
1048
  'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
1049
 
1050
  'masonry_thumb_padding' => $masonry_thumb_padding,
@@ -1079,12 +1089,13 @@ class BWGControllerThemes_bwg {
1079
  '%s',
1080
  '%s',
1081
  '%d',
1082
- '%s',
1083
- '%s',
1084
- '%s',
1085
- '%s',
1086
- '%d',
1087
- '%s',
 
1088
 
1089
  '%s',
1090
  '%s',
@@ -1097,7 +1108,7 @@ class BWGControllerThemes_bwg {
1097
  '%s',
1098
  '%s',
1099
  '%s',
1100
- '%s',
1101
  '%s',
1102
  '%s',
1103
  '%d',
@@ -1125,7 +1136,7 @@ class BWGControllerThemes_bwg {
1125
  '%s',
1126
  '%d',
1127
  '%d',
1128
- '%d',
1129
  '%s',
1130
  '%s',
1131
  '%s',
@@ -1259,13 +1270,14 @@ class BWGControllerThemes_bwg {
1259
  '%d',
1260
  '%s',
1261
  '%s',
 
1262
  '%d',
1263
  '%s',
1264
  '%s',
1265
  '%s',
1266
  '%d',
1267
  '%s',
1268
-
1269
  '%d',
1270
  '%d',
1271
  '%s',
@@ -1394,10 +1406,10 @@ class BWGControllerThemes_bwg {
1394
  ));
1395
  }
1396
  if ($save !== FALSE) {
1397
- echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
1398
  }
1399
  else {
1400
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
1401
  }
1402
  }
1403
 
@@ -1411,12 +1423,14 @@ class BWGControllerThemes_bwg {
1411
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id);
1412
  if ($wpdb->query($query)) {
1413
  echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
 
1414
  }
1415
  else {
1416
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
1417
  }
1418
  }
1419
- $this->display();
 
1420
  }
1421
 
1422
  public function delete_all() {
@@ -1428,7 +1442,7 @@ class BWGControllerThemes_bwg {
1428
  if (isset($_POST['check_' . $tag_id])) {
1429
  $isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $tag_id);
1430
  if ($isDefault) {
1431
- echo WDWLibrary::message("You can't delete default theme", 'error');
1432
  }
1433
  else {
1434
  $flag = TRUE;
@@ -1438,12 +1452,13 @@ class BWGControllerThemes_bwg {
1438
  }
1439
  }
1440
  if ($flag) {
1441
- echo WDWLibrary::message('Items Succesfully Deleted.', 'updated');
1442
  }
1443
  else {
1444
- echo WDWLibrary::message('You must select at least one item.', 'error');
1445
  }
1446
- $this->display();
 
1447
  }
1448
 
1449
  public function setdefault($id) {
@@ -1451,12 +1466,13 @@ class BWGControllerThemes_bwg {
1451
  $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 0), array('default_theme' => 1));
1452
  $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 1), array('id' => $id));
1453
  if ($save !== FALSE) {
1454
- echo WDWLibrary::message('Item Succesfully Set As Default.', 'updated');
1455
  }
1456
  else {
1457
- echo WDWLibrary::message('Error. Please install plugin again.', 'error');
1458
  }
1459
- $this->display();
 
1460
  }
1461
 
1462
  ////////////////////////////////////////////////////////////////////////////////////////
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
+ $task = WDWLibrary::get('task');
23
+ $id = WDWLibrary::get('current_id', 0);
24
+ $message = WDWLibrary::get('message');
25
+ echo WDWLibrary::message_id($message);
26
  if (method_exists($this, $task)) {
27
  $this->$task($id);
28
  }
55
 
56
  require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
57
  $view = new BWGViewThemes_bwg($model);
58
+ $id = WDWLibrary::get('current_id', 0);
59
  $view->edit($id, false);
60
  }
61
 
65
 
66
  require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
67
  $view = new BWGViewThemes_bwg($model);
68
+ $id = WDWLibrary::get('current_id', 0);
69
  echo WDWLibrary::message('Changes must be saved.', 'error');
70
  $view->edit($id, TRUE);
71
  }
72
 
73
  public function save() {
74
+ $message = $this->save_db();
75
+ $page = WDWLibrary::get('page');
76
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
77
  }
78
 
79
  public function apply() {
80
+ $message = $this->save_db();
81
  global $wpdb;
82
+ $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_theme');
83
+ $current_id = WDWLibrary::get('current_id', $id);
84
+ $page = WDWLibrary::get('page');
85
+ $current_type = WDWLibrary::get('current_type', 'Thumbnail');
86
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message, 'current_type' => $current_type), admin_url('admin.php')));
87
  }
88
 
89
  public function save_db() {
90
  global $wpdb;
91
+ $id = (int) WDWLibrary::get('current_id', 0);
92
  $name = (isset($_POST['name']) ? esc_html(stripslashes( $_POST['name'])) : 'exaple');
93
  $thumb_margin = (isset($_POST['thumb_margin']) ? esc_html(stripslashes( $_POST['thumb_margin'])) : '');
94
  $thumb_padding = (isset($_POST['thumb_padding']) ? esc_html(stripslashes( $_POST['thumb_padding'])) : '');
107
  $thumb_transition = (isset($_POST['thumb_transition']) ? (int) esc_html(stripslashes( $_POST['thumb_transition'])) : 0);
108
  $thumb_title_margin = (isset($_POST['thumb_title_margin']) ? esc_html(stripslashes( $_POST['thumb_title_margin'])) : '');
109
  $thumb_title_font_style = (isset($_POST['thumb_title_font_style']) ? esc_html(stripslashes( $_POST['thumb_title_font_style'])) : 'inherit');
110
+ $thumb_title_pos = (isset($_POST['thumb_title_pos']) ? esc_html(stripslashes( $_POST['thumb_title_pos'])) :'bottom');
111
  $thumb_title_font_color = (isset($_POST['thumb_title_font_color']) ? esc_html(stripslashes( $_POST['thumb_title_font_color'])) : 'CCCCCC');
112
  $thumb_title_shadow = (isset($_POST['thumb_title_shadow']) ? esc_html(stripslashes( $_POST['thumb_title_shadow'])) : '');
113
  $thumb_title_font_size = (isset($_POST['thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['thumb_title_font_size'])) : 12);
266
 
267
  $album_compact_title_margin = (isset($_POST['album_compact_title_margin']) ? esc_html(stripslashes( $_POST['album_compact_title_margin'])) : '');
268
  $album_compact_title_font_style = (isset($_POST['album_compact_title_font_style']) ? esc_html(stripslashes( $_POST['album_compact_title_font_style'])) : 'inherit');
269
+ $album_compact_thumb_title_pos = (isset($_POST['album_compact_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_compact_thumb_title_pos'])) :'bottom');
270
  $album_compact_title_font_color = (isset($_POST['album_compact_title_font_color']) ? esc_html(stripslashes( $_POST['album_compact_title_font_color'])) : 'CCCCCC');
271
  $album_compact_title_shadow = (isset($_POST['album_compact_title_shadow']) ? esc_html(stripslashes( $_POST['album_compact_title_shadow'])) : '');
272
  $album_compact_title_font_size = (isset($_POST['album_compact_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_title_font_size'])) : 12);
427
  'thumb_bg_color' => $thumb_bg_color,
428
  'thumbs_bg_color' => $thumbs_bg_color,
429
  'thumb_bg_transparent' => $thumb_bg_transparent,
430
+ 'thumb_box_shadow' => $thumb_box_shadow,
431
+ 'thumb_transparent' => $thumb_transparent,
432
+ 'thumb_align' => $thumb_align,
433
+ 'thumb_hover_effect' => $thumb_hover_effect,
434
+ 'thumb_hover_effect_value' => $thumb_hover_effect_value,
435
  'thumb_transition' => $thumb_transition,
436
  'thumb_title_margin' => $thumb_title_margin,
437
  'thumb_title_font_style' => $thumb_title_font_style,
438
+ 'thumb_title_pos' => $thumb_title_pos,
439
  'thumb_title_font_color' => $thumb_title_font_color,
440
  'thumb_title_shadow' => $thumb_title_shadow,
441
  'thumb_title_font_size' => $thumb_title_font_size,
442
  'thumb_title_font_weight' => $thumb_title_font_weight,
443
 
444
+ 'page_nav_position' => $page_nav_position,
445
+ 'page_nav_align' => $page_nav_align,
446
+ 'page_nav_number' => $page_nav_number,
447
+ 'page_nav_font_size' => $page_nav_font_size,
448
+ 'page_nav_font_style' => $page_nav_font_style,
449
+ 'page_nav_font_color' => $page_nav_font_color,
450
+ 'page_nav_font_weight' => $page_nav_font_weight,
451
  'page_nav_border_width' => $page_nav_border_width,
452
+ 'page_nav_border_style'=> $page_nav_border_style,
453
+ 'page_nav_border_color' => $page_nav_border_color,
454
  'page_nav_border_radius' => $page_nav_border_radius,
455
  'page_nav_margin' => $page_nav_margin,
456
  'page_nav_padding' => $page_nav_padding,
457
+ 'page_nav_button_bg_color' => $page_nav_button_bg_color,
458
+ 'page_nav_button_bg_transparent' => $page_nav_button_bg_transparent,
459
+ 'page_nav_box_shadow' => $page_nav_box_shadow,
460
  'page_nav_button_transition' => $page_nav_button_transition,
461
+ 'page_nav_button_text' => $page_nav_button_text,
462
+ 'lightbox_ctrl_btn_pos' => $lightbox_ctrl_btn_pos,
463
+ 'lightbox_ctrl_btn_align' => $lightbox_ctrl_btn_align,
464
+ 'lightbox_ctrl_btn_height' => $lightbox_ctrl_btn_height,
465
+ 'lightbox_ctrl_btn_margin_top' => $lightbox_ctrl_btn_margin_top,
466
+ 'lightbox_ctrl_btn_margin_left' => $lightbox_ctrl_btn_margin_left,
467
+ 'lightbox_ctrl_btn_transparent' => $lightbox_ctrl_btn_transparent,
468
+ 'lightbox_ctrl_btn_color' => $lightbox_ctrl_btn_color,
469
+ 'lightbox_toggle_btn_height' => $lightbox_toggle_btn_height,
470
+ 'lightbox_toggle_btn_width' => $lightbox_toggle_btn_width,
471
+ 'lightbox_ctrl_cont_bg_color' => $lightbox_ctrl_cont_bg_color,
472
+ 'lightbox_ctrl_cont_border_radius' => $lightbox_ctrl_cont_border_radius,
473
+ 'lightbox_ctrl_cont_transparent' => $lightbox_ctrl_cont_transparent,
474
+ 'lightbox_close_btn_bg_color' => $lightbox_close_btn_bg_color,
475
+ 'lightbox_close_btn_border_radius' => $lightbox_close_btn_border_radius,
476
+ 'lightbox_close_btn_border_width' => $lightbox_close_btn_border_width,
477
+ 'lightbox_close_btn_border_style' => $lightbox_close_btn_border_style,
478
+ 'lightbox_close_btn_border_color' => $lightbox_close_btn_border_color,
479
+ 'lightbox_close_btn_box_shadow' => $lightbox_close_btn_box_shadow,
480
+ 'lightbox_close_btn_color' => $lightbox_close_btn_color,
481
+ 'lightbox_close_btn_size' => $lightbox_close_btn_size,
482
+ 'lightbox_close_btn_width' => $lightbox_close_btn_width,
483
+ 'lightbox_close_btn_height' => $lightbox_close_btn_height,
484
+ 'lightbox_close_btn_top' => $lightbox_close_btn_top,
485
+ 'lightbox_close_btn_right' => $lightbox_close_btn_right,
486
+ 'lightbox_close_btn_full_color' => $lightbox_close_btn_full_color,
487
+ 'lightbox_close_btn_transparent' => $lightbox_close_btn_transparent,
488
  'lightbox_rl_btn_bg_color' => $lightbox_rl_btn_bg_color,
489
  'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
490
+ 'lightbox_rl_btn_border_radius' => $lightbox_rl_btn_border_radius,
491
+ 'lightbox_rl_btn_border_width' => $lightbox_rl_btn_border_width,
492
+ 'lightbox_rl_btn_border_style' => $lightbox_rl_btn_border_style,
493
+ 'lightbox_rl_btn_border_color' => $lightbox_rl_btn_border_color,
494
+ 'lightbox_rl_btn_box_shadow' => $lightbox_rl_btn_box_shadow,
495
+ 'lightbox_rl_btn_color' => $lightbox_rl_btn_color,
496
+ 'lightbox_rl_btn_height' => $lightbox_rl_btn_height,
497
+ 'lightbox_rl_btn_width' => $lightbox_rl_btn_width,
498
+ 'lightbox_rl_btn_size' => $lightbox_rl_btn_size,
499
+ 'lightbox_close_rl_btn_hover_color' => $lightbox_close_rl_btn_hover_color,
500
+ 'lightbox_comment_pos' => $lightbox_comment_pos,
501
+ 'lightbox_comment_width' => $lightbox_comment_width,
502
+ 'lightbox_comment_bg_color' => $lightbox_comment_bg_color,
503
+ 'lightbox_comment_font_color' => $lightbox_comment_font_color,
504
+ 'lightbox_comment_font_style' => $lightbox_comment_font_style,
505
+ 'lightbox_comment_font_size' => $lightbox_comment_font_size,
506
+ 'lightbox_comment_button_bg_color' => $lightbox_comment_button_bg_color,
507
+ 'lightbox_comment_button_border_color' => $lightbox_comment_button_border_color,
508
+ 'lightbox_comment_button_border_width' => $lightbox_comment_button_border_width,
509
+ 'lightbox_comment_button_border_style' => $lightbox_comment_button_border_style,
510
+ 'lightbox_comment_button_border_radius' => $lightbox_comment_button_border_radius,
511
+ 'lightbox_comment_button_padding' => $lightbox_comment_button_padding,
512
  'lightbox_comment_input_bg_color' => $lightbox_comment_input_bg_color,
513
+ 'lightbox_comment_input_border_color' => $lightbox_comment_input_border_color,
514
+ 'lightbox_comment_input_border_width' => $lightbox_comment_input_border_width,
515
+ 'lightbox_comment_input_border_style' => $lightbox_comment_input_border_style,
516
+ 'lightbox_comment_input_border_radius' => $lightbox_comment_input_border_radius,
517
+ 'lightbox_comment_input_padding' => $lightbox_comment_input_padding,
518
+ 'lightbox_comment_separator_width' => $lightbox_comment_separator_width,
519
+ 'lightbox_comment_separator_style' => $lightbox_comment_separator_style,
520
+ 'lightbox_comment_separator_color' => $lightbox_comment_separator_color,
521
+ 'lightbox_comment_author_font_size' => $lightbox_comment_author_font_size,
522
+ 'lightbox_comment_date_font_size' => $lightbox_comment_date_font_size,
523
+ 'lightbox_comment_body_font_size' => $lightbox_comment_body_font_size,
524
+ 'lightbox_comment_share_button_color' => $lightbox_comment_share_button_color,
525
+ 'lightbox_filmstrip_rl_bg_color' => $lightbox_filmstrip_rl_bg_color,
526
+ 'lightbox_filmstrip_rl_btn_size' => $lightbox_filmstrip_rl_btn_size,
527
+ 'lightbox_filmstrip_rl_btn_color' => $lightbox_filmstrip_rl_btn_color,
528
+ 'lightbox_filmstrip_thumb_margin' => $lightbox_filmstrip_thumb_margin,
529
+ 'lightbox_filmstrip_thumb_border_width' => $lightbox_filmstrip_thumb_border_width,
530
+ 'lightbox_filmstrip_thumb_border_style' => $lightbox_filmstrip_thumb_border_style,
531
+ 'lightbox_filmstrip_thumb_border_color' => $lightbox_filmstrip_thumb_border_color,
532
+ 'lightbox_filmstrip_thumb_border_radius' => $lightbox_filmstrip_thumb_border_radius,
533
+ 'lightbox_filmstrip_thumb_deactive_transparent' => $lightbox_filmstrip_thumb_deactive_transparent,
534
+ 'lightbox_filmstrip_pos' => $lightbox_filmstrip_pos,
535
+ 'lightbox_filmstrip_thumb_active_border_width' => $lightbox_filmstrip_thumb_active_border_width,
536
  'lightbox_filmstrip_thumb_active_border_color' => $lightbox_filmstrip_thumb_active_border_color,
537
  'lightbox_overlay_bg_transparent' => $lightbox_overlay_bg_transparent,
538
  'lightbox_bg_color' => $lightbox_bg_color,
539
+ 'lightbox_overlay_bg_color' => $lightbox_overlay_bg_color,
540
+ 'lightbox_rl_btn_style' => $lightbox_rl_btn_style,
541
 
542
+ 'blog_style_margin' => $blog_style_margin,
543
+ 'blog_style_padding' => $blog_style_padding,
544
+ 'blog_style_border_radius' => $blog_style_border_radius,
545
+ 'blog_style_border_width' => $blog_style_border_width,
546
+ 'blog_style_border_style' => $blog_style_border_style,
547
+ 'blog_style_border_color' => $blog_style_border_color,
548
  'blog_style_bg_color' => $blog_style_bg_color,
549
  'blog_style_transparent' => $blog_style_transparent,
550
  'blog_style_box_shadow' => $blog_style_box_shadow,
551
  'blog_style_align' => $blog_style_align,
552
+ 'blog_style_share_buttons_margin' => $blog_style_share_buttons_margin,
553
+ 'blog_style_share_buttons_border_radius' => $blog_style_share_buttons_border_radius,
554
+ 'blog_style_share_buttons_border_width' => $blog_style_share_buttons_border_width,
555
+ 'blog_style_share_buttons_border_style' => $blog_style_share_buttons_border_style,
556
+ 'blog_style_share_buttons_border_color' => $blog_style_share_buttons_border_color,
557
+ 'blog_style_share_buttons_bg_color' => $blog_style_share_buttons_bg_color,
558
+ 'blog_style_share_buttons_align' => $blog_style_share_buttons_align,
559
+ 'blog_style_img_font_size' => $blog_style_img_font_size,
560
+ 'blog_style_img_font_family' => $blog_style_img_font_family,
561
  'blog_style_img_font_color' => $blog_style_img_font_color,
562
  'blog_style_share_buttons_font_size' => $blog_style_share_buttons_font_size,
563
  'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
564
  'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
565
 
566
+ 'image_browser_margin' => $image_browser_margin,
567
+ 'image_browser_padding' => $image_browser_padding,
568
+ 'image_browser_border_radius'=> $image_browser_border_radius,
569
+ 'image_browser_border_width' => $image_browser_border_width,
570
+ 'image_browser_border_style' => $image_browser_border_style,
571
+ 'image_browser_border_color' => $image_browser_border_color,
572
+ 'image_browser_bg_color' => $image_browser_bg_color,
573
+ 'image_browser_box_shadow' => $image_browser_box_shadow,
574
+ 'image_browser_transparent' => $image_browser_transparent,
575
+ 'image_browser_align' => $image_browser_align,
576
+ 'image_browser_image_description_margin' => $image_browser_image_description_margin,
577
+ 'image_browser_image_description_padding' => $image_browser_image_description_padding,
578
+ 'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius,
579
+ 'image_browser_image_description_border_width' => $image_browser_image_description_border_width,
580
+ 'image_browser_image_description_border_style' => $image_browser_image_description_border_style,
581
+ 'image_browser_image_description_border_color' => $image_browser_image_description_border_color,
582
+ 'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color,
583
+ 'image_browser_image_description_align' => $image_browser_image_description_align,
584
+ 'image_browser_img_font_size' => $image_browser_img_font_size,
585
+ 'image_browser_img_font_family' => $image_browser_img_font_family,
586
+ 'image_browser_img_font_color' => $image_browser_img_font_color,
587
+ 'image_browser_full_padding' => $image_browser_full_padding,
588
+ 'image_browser_full_border_radius' => $image_browser_full_border_radius,
589
+ 'image_browser_full_border_width' => $image_browser_full_border_width,
590
+ 'image_browser_full_border_style' => $image_browser_full_border_style,
591
+ 'image_browser_full_border_color' => $image_browser_full_border_color,
592
+ 'image_browser_full_bg_color' => $image_browser_full_bg_color,
593
+ 'image_browser_full_transparent' => $image_browser_full_transparent,
594
 
595
+ 'album_compact_title_margin' => $album_compact_title_margin,
596
+ 'album_compact_thumb_margin' => $album_compact_thumb_margin,
597
+ 'album_compact_back_padding' => $album_compact_back_padding,
598
+ 'album_compact_thumb_padding' => $album_compact_thumb_padding,
599
+ 'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius,
600
+ 'album_compact_thumb_border_width' => $album_compact_thumb_border_width,
601
+ 'album_compact_title_font_style' => $album_compact_title_font_style,
602
+ 'album_compact_back_font_color' => $album_compact_back_font_color,
603
+ 'album_compact_title_font_color' => $album_compact_title_font_color,
604
+ 'album_compact_title_shadow' => $album_compact_title_shadow,
605
+ 'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent,
606
+ 'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow,
607
+ 'album_compact_thumb_transition' => $album_compact_thumb_transition,
608
+ 'album_compact_thumb_border_style' => $album_compact_thumb_border_style,
609
+ 'album_compact_thumb_border_color' => $album_compact_thumb_border_color,
610
+ 'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color,
611
+ 'album_compact_back_font_weight' => $album_compact_back_font_weight,
612
+ 'album_compact_back_font_size' => $album_compact_back_font_size,
613
+ 'album_compact_back_font_style' => $album_compact_back_font_style,
614
+ 'album_compact_thumb_title_pos' => $album_compact_thumb_title_pos,
615
+ 'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color,
616
+ 'album_compact_title_font_size' => $album_compact_title_font_size,
617
+ 'album_compact_title_font_weight' => $album_compact_title_font_weight,
618
+ 'album_compact_thumb_align' => $album_compact_thumb_align,
619
+ 'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect,
620
+ 'album_compact_thumb_transparent' => $album_compact_thumb_transparent,
621
+ 'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value,
622
+ 'album_extended_thumb_margin' => $album_extended_thumb_margin,
623
+ 'album_extended_thumb_padding' => $album_extended_thumb_padding,
624
+ 'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius,
625
+ 'album_extended_thumb_border_width' => $album_extended_thumb_border_width,
626
+ 'album_extended_thumb_border_style' => $album_extended_thumb_border_style,
627
+ 'album_extended_thumb_border_color' => $album_extended_thumb_border_color,
628
+ 'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color,
629
+ 'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color,
630
+ 'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent,
631
+ 'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow,
632
+ 'album_extended_thumb_transparent' => $album_extended_thumb_transparent,
633
+ 'album_extended_thumb_align' => $album_extended_thumb_align,
634
+ 'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect,
635
+ 'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value,
636
+ 'album_extended_thumb_transition' => $album_extended_thumb_transition,
637
+ 'album_extended_back_font_color' => $album_extended_back_font_color,
638
+ 'album_extended_back_font_style' => $album_extended_back_font_style,
639
+ 'album_extended_back_font_size' => $album_extended_back_font_size,
640
+ 'album_extended_back_font_weight' => $album_extended_back_font_weight,
641
+ 'album_extended_back_padding' => $album_extended_back_padding,
642
+ 'album_extended_div_bg_color' => $album_extended_div_bg_color,
643
+ 'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent,
644
+ 'album_extended_div_border_radius' => $album_extended_div_border_radius,
645
+ 'album_extended_div_margin' => $album_extended_div_margin,
646
+ 'album_extended_div_padding' => $album_extended_div_padding,
647
+ 'album_extended_div_separator_width' => $album_extended_div_separator_width,
648
+ 'album_extended_div_separator_style' => $album_extended_div_separator_style,
649
+ 'album_extended_div_separator_color' => $album_extended_div_separator_color,
650
+ 'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color,
651
+ 'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius,
652
+ 'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width,
653
+ 'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style,
654
+ 'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color,
655
+ 'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding,
656
+ 'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color,
657
+ 'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius,
658
+ 'album_extended_text_div_border_width' => $album_extended_text_div_border_width,
659
+ 'album_extended_text_div_border_style' => $album_extended_text_div_border_style,
660
+ 'album_extended_text_div_border_color' => $album_extended_text_div_border_color,
661
+ 'album_extended_text_div_padding' => $album_extended_text_div_padding,
662
+ 'album_extended_title_span_border_width' => $album_extended_title_span_border_width,
663
+ 'album_extended_title_span_border_style' => $album_extended_title_span_border_style,
664
+ 'album_extended_title_span_border_color' => $album_extended_title_span_border_color,
665
+ 'album_extended_title_font_color' => $album_extended_title_font_color,
666
+ 'album_extended_title_font_style' => $album_extended_title_font_style,
667
+ 'album_extended_title_font_size' => $album_extended_title_font_size,
668
+ 'album_extended_title_font_weight' => $album_extended_title_font_weight,
669
+ 'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom,
670
+ 'album_extended_title_padding' => $album_extended_title_padding,
671
+ 'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width,
672
+ 'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style,
673
+ 'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color,
674
+ 'album_extended_desc_font_color' => $album_extended_desc_font_color,
675
+ 'album_extended_desc_font_style' => $album_extended_desc_font_style,
676
+ 'album_extended_desc_font_size' => $album_extended_desc_font_size,
677
+ 'album_extended_desc_font_weight' => $album_extended_desc_font_weight,
678
+ 'album_extended_desc_padding' => $album_extended_desc_padding,
679
+ 'album_extended_desc_more_color' => $album_extended_desc_more_color,
680
+ 'album_extended_desc_more_size' => $album_extended_desc_more_size,
681
 
682
+ 'slideshow_cont_bg_color' => $slideshow_cont_bg_color,
683
+ 'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent,
684
+ 'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color,
685
+ 'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius,
686
+ 'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width,
687
+ 'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style,
688
+ 'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color,
689
+ 'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow,
690
+ 'slideshow_rl_btn_color' => $slideshow_rl_btn_color,
691
+ 'slideshow_rl_btn_height' => $slideshow_rl_btn_height,
692
+ 'slideshow_rl_btn_size' => $slideshow_rl_btn_size,
693
+ 'slideshow_rl_btn_width' => $slideshow_rl_btn_width,
694
+ 'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color,
695
+ 'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos,
696
+ 'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width,
697
+ 'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style,
698
+ 'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color,
699
+ 'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius,
700
+ 'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin,
701
+ 'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width,
702
+ 'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color,
703
+ 'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent,
704
+ 'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color,
705
+ 'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color,
706
+ 'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size,
707
+ 'slideshow_title_font_size' => $slideshow_title_font_size,
708
+ 'slideshow_title_font' => $slideshow_title_font,
709
+ 'slideshow_title_color' => $slideshow_title_color,
710
+ 'slideshow_title_opacity' => $slideshow_title_opacity,
711
+ 'slideshow_title_border_radius' => $slideshow_title_border_radius,
712
+ 'slideshow_title_background_color' => $slideshow_title_background_color,
713
+ 'slideshow_title_padding' => $slideshow_title_padding,
714
+ 'slideshow_description_font_size' => $slideshow_description_font_size,
715
+ 'slideshow_description_font' => $slideshow_description_font,
716
+ 'slideshow_description_color' => $slideshow_description_color,
717
+ 'slideshow_description_opacity' => $slideshow_description_opacity,
718
+ 'slideshow_description_border_radius' => $slideshow_description_border_radius,
719
+ 'slideshow_description_background_color' => $slideshow_description_background_color,
720
+ 'slideshow_description_padding' => $slideshow_description_padding,
721
+ 'slideshow_dots_width' => $slideshow_dots_width,
722
+ 'slideshow_dots_height' => $slideshow_dots_height,
723
+ 'slideshow_dots_border_radius' => $slideshow_dots_border_radius,
724
+ 'slideshow_dots_background_color' => $slideshow_dots_background_color,
725
+ 'slideshow_dots_margin' => $slideshow_dots_margin,
726
+ 'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color,
727
+ 'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width,
728
+ 'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color,
729
+ 'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size,
730
  'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
731
 
732
  'masonry_thumb_padding' => $masonry_thumb_padding,
747
  }
748
  else {
749
  $save = $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
750
+ 'name' => $name,
751
+ 'thumb_margin' => $thumb_margin,
752
+ 'thumb_padding' => $thumb_padding,
753
+ 'thumb_border_radius' => $thumb_border_radius,
754
+ 'thumb_border_width' => $thumb_border_width,
755
+ 'thumb_border_style' => $thumb_border_style,
756
+ 'thumb_border_color' => $thumb_border_color,
757
+ 'thumb_bg_color' => $thumb_bg_color,
758
+ 'thumbs_bg_color' => $thumbs_bg_color,
759
+ 'thumb_bg_transparent' => $thumb_bg_transparent,
760
+ 'thumb_box_shadow' => $thumb_box_shadow,
761
+ 'thumb_transparent' => $thumb_transparent,
762
+ 'thumb_align' => $thumb_align,
763
+ 'thumb_hover_effect' => $thumb_hover_effect,
764
+ 'thumb_hover_effect_value' => $thumb_hover_effect_value,
765
  'thumb_transition' => $thumb_transition,
766
  'thumb_title_margin' => $thumb_title_margin,
767
  'thumb_title_font_style' => $thumb_title_font_style,
768
+ 'thumb_title_pos' => $thumb_title_pos,
769
  'thumb_title_font_color' => $thumb_title_font_color,
770
  'thumb_title_shadow' => $thumb_title_shadow,
771
  'thumb_title_font_size' => $thumb_title_font_size,
891
  'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
892
  'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
893
 
894
+ 'image_browser_margin' => $image_browser_margin,
895
+ 'image_browser_padding' => $image_browser_padding,
896
+ 'image_browser_border_radius'=> $image_browser_border_radius,
897
+ 'image_browser_border_width' => $image_browser_border_width,
898
+ 'image_browser_border_style' => $image_browser_border_style,
899
+ 'image_browser_border_color' => $image_browser_border_color,
900
+ 'image_browser_bg_color' => $image_browser_bg_color,
901
+ 'image_browser_box_shadow' => $image_browser_box_shadow,
902
+ 'image_browser_transparent' => $image_browser_transparent,
903
+ 'image_browser_align' => $image_browser_align,
904
+ 'image_browser_image_description_margin' => $image_browser_image_description_margin,
905
+ 'image_browser_image_description_padding' => $image_browser_image_description_padding,
906
+ 'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius,
907
+ 'image_browser_image_description_border_width' => $image_browser_image_description_border_width,
908
+ 'image_browser_image_description_border_style' => $image_browser_image_description_border_style,
909
+ 'image_browser_image_description_border_color' => $image_browser_image_description_border_color,
910
+ 'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color,
911
+ 'image_browser_image_description_align' => $image_browser_image_description_align,
912
+ 'image_browser_img_font_size' => $image_browser_img_font_size,
913
+ 'image_browser_img_font_family' => $image_browser_img_font_family,
914
+ 'image_browser_img_font_color' => $image_browser_img_font_color,
915
+ 'image_browser_full_padding' => $image_browser_full_padding,
916
+ 'image_browser_full_border_radius' => $image_browser_full_border_radius,
917
+ 'image_browser_full_border_width' => $image_browser_full_border_width,
918
+ 'image_browser_full_border_style' => $image_browser_full_border_style,
919
+ 'image_browser_full_border_color' => $image_browser_full_border_color,
920
+ 'image_browser_full_bg_color' => $image_browser_full_bg_color,
921
+ 'image_browser_full_transparent' => $image_browser_full_transparent,
922
 
923
+ 'album_compact_title_margin' => $album_compact_title_margin,
924
+ 'album_compact_thumb_margin' => $album_compact_thumb_margin,
925
+ 'album_compact_back_padding' => $album_compact_back_padding,
926
+ 'album_compact_thumb_padding' => $album_compact_thumb_padding,
927
+ 'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius,
928
+ 'album_compact_thumb_border_width' => $album_compact_thumb_border_width,
929
+ 'album_compact_title_font_style' => $album_compact_title_font_style,
930
+ 'album_compact_back_font_color' => $album_compact_back_font_color,
931
+ 'album_compact_title_font_color' => $album_compact_title_font_color,
932
+ 'album_compact_title_shadow' => $album_compact_title_shadow,
933
+ 'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent,
934
+ 'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow,
935
+ 'album_compact_thumb_transition' => $album_compact_thumb_transition,
936
+ 'album_compact_thumb_border_style' => $album_compact_thumb_border_style,
937
+ 'album_compact_thumb_border_color' => $album_compact_thumb_border_color,
938
+ 'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color,
939
+ 'album_compact_back_font_weight' => $album_compact_back_font_weight,
940
+ 'album_compact_back_font_size' => $album_compact_back_font_size,
941
+ 'album_compact_back_font_style' => $album_compact_back_font_style,
942
+ 'album_compact_thumb_title_pos' => $album_compact_thumb_title_pos,
943
+ 'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color,
944
+ 'album_compact_title_font_size' => $album_compact_title_font_size,
945
+ 'album_compact_title_font_weight' => $album_compact_title_font_weight,
946
+ 'album_compact_thumb_align' => $album_compact_thumb_align,
947
+ 'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect,
948
+ 'album_compact_thumb_transparent' => $album_compact_thumb_transparent,
949
+ 'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value,
950
+ 'album_extended_thumb_margin' => $album_extended_thumb_margin,
951
+ 'album_extended_thumb_padding' => $album_extended_thumb_padding,
952
+ 'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius,
953
+ 'album_extended_thumb_border_width' => $album_extended_thumb_border_width,
954
+ 'album_extended_thumb_border_style' => $album_extended_thumb_border_style,
955
+ 'album_extended_thumb_border_color' => $album_extended_thumb_border_color,
956
+ 'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color,
957
+ 'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color,
958
+ 'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent,
959
+ 'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow,
960
+ 'album_extended_thumb_transparent' => $album_extended_thumb_transparent,
961
+ 'album_extended_thumb_align' => $album_extended_thumb_align,
962
+ 'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect,
963
+ 'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value,
964
+ 'album_extended_thumb_transition' => $album_extended_thumb_transition,
965
+ 'album_extended_back_font_color' => $album_extended_back_font_color,
966
+ 'album_extended_back_font_style' => $album_extended_back_font_style,
967
+ 'album_extended_back_font_size' => $album_extended_back_font_size,
968
+ 'album_extended_back_font_weight' => $album_extended_back_font_weight,
969
+ 'album_extended_back_padding' => $album_extended_back_padding,
970
+ 'album_extended_div_bg_color' => $album_extended_div_bg_color,
971
+ 'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent,
972
+ 'album_extended_div_border_radius' => $album_extended_div_border_radius,
973
+ 'album_extended_div_margin' => $album_extended_div_margin,
974
+ 'album_extended_div_padding' => $album_extended_div_padding,
975
+ 'album_extended_div_separator_width' => $album_extended_div_separator_width,
976
+ 'album_extended_div_separator_style' => $album_extended_div_separator_style,
977
+ 'album_extended_div_separator_color' => $album_extended_div_separator_color,
978
+ 'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color,
979
+ 'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius,
980
+ 'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width,
981
+ 'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style,
982
+ 'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color,
983
+ 'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding,
984
+ 'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color,
985
+ 'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius,
986
+ 'album_extended_text_div_border_width' => $album_extended_text_div_border_width,
987
+ 'album_extended_text_div_border_style' => $album_extended_text_div_border_style,
988
+ 'album_extended_text_div_border_color' => $album_extended_text_div_border_color,
989
+ 'album_extended_text_div_padding' => $album_extended_text_div_padding,
990
+ 'album_extended_title_span_border_width' => $album_extended_title_span_border_width,
991
+ 'album_extended_title_span_border_style' => $album_extended_title_span_border_style,
992
+ 'album_extended_title_span_border_color' => $album_extended_title_span_border_color,
993
+ 'album_extended_title_font_color' => $album_extended_title_font_color,
994
+ 'album_extended_title_font_style' => $album_extended_title_font_style,
995
+ 'album_extended_title_font_size' => $album_extended_title_font_size,
996
+ 'album_extended_title_font_weight' => $album_extended_title_font_weight,
997
+ 'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom,
998
+ 'album_extended_title_padding' => $album_extended_title_padding,
999
+ 'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width,
1000
+ 'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style,
1001
+ 'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color,
1002
+ 'album_extended_desc_font_color' => $album_extended_desc_font_color,
1003
+ 'album_extended_desc_font_style' => $album_extended_desc_font_style,
1004
+ 'album_extended_desc_font_size' => $album_extended_desc_font_size,
1005
+ 'album_extended_desc_font_weight' => $album_extended_desc_font_weight,
1006
+ 'album_extended_desc_padding' => $album_extended_desc_padding,
1007
+ 'album_extended_desc_more_color' => $album_extended_desc_more_color,
1008
+ 'album_extended_desc_more_size' => $album_extended_desc_more_size,
1009
 
1010
+ 'slideshow_cont_bg_color' => $slideshow_cont_bg_color,
1011
+ 'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent,
1012
+ 'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color,
1013
+ 'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius,
1014
+ 'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width,
1015
+ 'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style,
1016
+ 'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color,
1017
+ 'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow,
1018
+ 'slideshow_rl_btn_color' => $slideshow_rl_btn_color,
1019
+ 'slideshow_rl_btn_height' => $slideshow_rl_btn_height,
1020
+ 'slideshow_rl_btn_size' => $slideshow_rl_btn_size,
1021
+ 'slideshow_rl_btn_width' => $slideshow_rl_btn_width,
1022
+ 'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color,
1023
+ 'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos,
1024
+ 'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width,
1025
+ 'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style,
1026
+ 'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color,
1027
+ 'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius,
1028
+ 'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin,
1029
+ 'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width,
1030
+ 'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color,
1031
+ 'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent,
1032
+ 'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color,
1033
+ 'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color,
1034
+ 'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size,
1035
+ 'slideshow_title_font_size' => $slideshow_title_font_size,
1036
+ 'slideshow_title_font' => $slideshow_title_font,
1037
+ 'slideshow_title_color' => $slideshow_title_color,
1038
+ 'slideshow_title_opacity' => $slideshow_title_opacity,
1039
+ 'slideshow_title_border_radius' => $slideshow_title_border_radius,
1040
+ 'slideshow_title_background_color' => $slideshow_title_background_color,
1041
+ 'slideshow_title_padding' => $slideshow_title_padding,
1042
+ 'slideshow_description_font_size' => $slideshow_description_font_size,
1043
+ 'slideshow_description_font' => $slideshow_description_font,
1044
+ 'slideshow_description_color' => $slideshow_description_color,
1045
+ 'slideshow_description_opacity' => $slideshow_description_opacity,
1046
+ 'slideshow_description_border_radius' => $slideshow_description_border_radius,
1047
+ 'slideshow_description_background_color' => $slideshow_description_background_color,
1048
+ 'slideshow_description_padding' => $slideshow_description_padding,
1049
+ 'slideshow_dots_width' => $slideshow_dots_width,
1050
+ 'slideshow_dots_height' => $slideshow_dots_height,
1051
+ 'slideshow_dots_border_radius' => $slideshow_dots_border_radius,
1052
+ 'slideshow_dots_background_color' => $slideshow_dots_background_color,
1053
+ 'slideshow_dots_margin' => $slideshow_dots_margin,
1054
+ 'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color,
1055
+ 'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width,
1056
+ 'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color,
1057
+ 'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size,
1058
  'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
1059
 
1060
  'masonry_thumb_padding' => $masonry_thumb_padding,
1089
  '%s',
1090
  '%s',
1091
  '%d',
1092
+ '%s',
1093
+ '%s',
1094
+ '%s',
1095
+ '%s',
1096
+ '%s',
1097
+ '%d',
1098
+ '%s',
1099
 
1100
  '%s',
1101
  '%s',
1108
  '%s',
1109
  '%s',
1110
  '%s',
1111
+ '%s',
1112
  '%s',
1113
  '%s',
1114
  '%d',
1136
  '%s',
1137
  '%d',
1138
  '%d',
1139
+ '%d',
1140
  '%s',
1141
  '%s',
1142
  '%s',
1270
  '%d',
1271
  '%s',
1272
  '%s',
1273
+ '%s',
1274
  '%d',
1275
  '%s',
1276
  '%s',
1277
  '%s',
1278
  '%d',
1279
  '%s',
1280
+
1281
  '%d',
1282
  '%d',
1283
  '%s',
1406
  ));
1407
  }
1408
  if ($save !== FALSE) {
1409
+ return 1;
1410
  }
1411
  else {
1412
+ return 2;
1413
  }
1414
  }
1415
 
1423
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id);
1424
  if ($wpdb->query($query)) {
1425
  echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
1426
+ $message = 3;
1427
  }
1428
  else {
1429
+ $message = 2;
1430
  }
1431
  }
1432
+ $page = WDWLibrary::get('page');
1433
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1434
  }
1435
 
1436
  public function delete_all() {
1442
  if (isset($_POST['check_' . $tag_id])) {
1443
  $isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $tag_id);
1444
  if ($isDefault) {
1445
+ $message = 4;
1446
  }
1447
  else {
1448
  $flag = TRUE;
1452
  }
1453
  }
1454
  if ($flag) {
1455
+ $message = 5;
1456
  }
1457
  else {
1458
+ $message = 6;
1459
  }
1460
+ $page = WDWLibrary::get('page');
1461
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1462
  }
1463
 
1464
  public function setdefault($id) {
1466
  $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 0), array('default_theme' => 1));
1467
  $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 1), array('id' => $id));
1468
  if ($save !== FALSE) {
1469
+ $message = 7;
1470
  }
1471
  else {
1472
+ $message = 2;
1473
  }
1474
+ $page = WDWLibrary::get('page');
1475
+ wp_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1476
  }
1477
 
1478
  ////////////////////////////////////////////////////////////////////////////////////////
admin/controllers/BWGControllerWidgetTags.php CHANGED
@@ -39,7 +39,7 @@ class BWGControllerWidgetTags extends WP_Widget {
39
  }
40
 
41
  public function form( $instance ) {
42
- $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show_name'), parent::get_field_name('show_name'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('background_transparent'), parent::get_field_name('background_transparent'), parent::get_field_id('background_color'), parent::get_field_name('background_color'), parent::get_field_id('text_color'), parent::get_field_name('text_color'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
43
  }
44
 
45
  // Update Settings.
@@ -47,6 +47,7 @@ class BWGControllerWidgetTags extends WP_Widget {
47
  $instance['title'] = strip_tags($new_instance['title']);
48
  $instance['type'] = $new_instance['type'];
49
  $instance['show_name'] = $new_instance['show_name'];
 
50
  $instance['count'] = $new_instance['count'];
51
  $instance['width'] = $new_instance['width'];
52
  $instance['height'] = $new_instance['height'];
39
  }
40
 
41
  public function form( $instance ) {
42
+ $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show_name'), parent::get_field_name('show_name'), parent::get_field_id('open_option'), parent::get_field_name('open_option'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('background_transparent'), parent::get_field_name('background_transparent'), parent::get_field_id('background_color'), parent::get_field_name('background_color'), parent::get_field_id('text_color'), parent::get_field_name('text_color'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
43
  }
44
 
45
  // Update Settings.
47
  $instance['title'] = strip_tags($new_instance['title']);
48
  $instance['type'] = $new_instance['type'];
49
  $instance['show_name'] = $new_instance['show_name'];
50
+ $instance['open_option'] = $new_instance['open_option'];
51
  $instance['count'] = $new_instance['count'];
52
  $instance['width'] = $new_instance['width'];
53
  $instance['height'] = $new_instance['height'];
admin/models/BWGModelOptions_bwg.php CHANGED
@@ -117,6 +117,8 @@ class BWGModelOptions_bwg {
117
  $row->gallery_role = 0;
118
  $row->album_role = 0;
119
  $row->image_role = 0;
 
 
120
  }
121
  return $row;
122
  }
117
  $row->gallery_role = 0;
118
  $row->album_role = 0;
119
  $row->image_role = 0;
120
+ $row->popup_autoplay = 0;
121
+ $row->album_view_type = 'thumbnail';
122
  }
123
  return $row;
124
  }
admin/models/BWGModelThemes_bwg.php CHANGED
@@ -65,6 +65,7 @@ class BWGModelThemes_bwg {
65
  $row->thumb_transition = 1;
66
  $row->thumb_title_font_color = 'CCCCCC';
67
  $row->thumb_title_font_style = 'segoe ui';
 
68
  $row->thumb_title_font_size = 16;
69
  $row->thumb_title_font_weight = 'bold';
70
  $row->thumb_title_margin = '2px';
@@ -72,7 +73,7 @@ class BWGModelThemes_bwg {
72
 
73
  $row->page_nav_position = 'bottom';
74
  $row->page_nav_align = 'center';
75
- $row->page_nav_number = 1;
76
  $row->page_nav_font_size = 12;
77
  $row->page_nav_font_style = 'segoe ui';
78
  $row->page_nav_font_color = '666666';
@@ -175,7 +176,8 @@ class BWGModelThemes_bwg {
175
  $row->album_compact_back_font_weight = 'bold';
176
  $row->album_compact_back_padding = '0';
177
  $row->album_compact_title_font_color = 'CCCCCC';
178
- $row->album_compact_title_font_style = 'segoe ui';
 
179
  $row->album_compact_title_font_size = 16;
180
  $row->album_compact_title_font_weight = 'bold';
181
  $row->album_compact_title_margin = '2px';
65
  $row->thumb_transition = 1;
66
  $row->thumb_title_font_color = 'CCCCCC';
67
  $row->thumb_title_font_style = 'segoe ui';
68
+ $row->thumb_title_pos = 'bottom';
69
  $row->thumb_title_font_size = 16;
70
  $row->thumb_title_font_weight = 'bold';
71
  $row->thumb_title_margin = '2px';
73
 
74
  $row->page_nav_position = 'bottom';
75
  $row->page_nav_align = 'center';
76
+ $row->page_nav_number = 0;
77
  $row->page_nav_font_size = 12;
78
  $row->page_nav_font_style = 'segoe ui';
79
  $row->page_nav_font_color = '666666';
176
  $row->album_compact_back_font_weight = 'bold';
177
  $row->album_compact_back_padding = '0';
178
  $row->album_compact_title_font_color = 'CCCCCC';
179
+ $row->album_compact_title_font_style = 'segoe ui';
180
+ $row->album_compact_thumb_title_pos = 'bottom';
181
  $row->album_compact_title_font_size = 16;
182
  $row->album_compact_title_font_weight = 'bold';
183
  $row->album_compact_title_margin = '2px';
admin/views/BWGViewAddAlbumsGalleries.php CHANGED
@@ -30,11 +30,11 @@ class BWGViewAddAlbumsGalleries {
30
  $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
31
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
 
33
  ?>
34
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
35
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
36
  <link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css'; ?>" id="spider_audio_player_tables-css" rel="stylesheet">
37
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/jquery.js"></script>
38
  <script src="<?php echo WD_BWG_URL . '/js/bwg.js'; ?>" type="text/javascript"></script>
39
  <form class="wrap wp-core-ui" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
40
  <h2 style="width:200px;float:left">Albums/Galleries</h2>
30
  $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
31
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
+ wp_print_scripts('jquery');
34
  ?>
35
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
36
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
37
  <link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css'; ?>" id="spider_audio_player_tables-css" rel="stylesheet">
 
38
  <script src="<?php echo WD_BWG_URL . '/js/bwg.js'; ?>" type="text/javascript"></script>
39
  <form class="wrap wp-core-ui" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
40
  <h2 style="width:200px;float:left">Albums/Galleries</h2>
admin/views/BWGViewAddTags.php CHANGED
@@ -30,11 +30,11 @@ class BWGViewAddTags {
30
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
31
  $image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : '0');
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
 
33
  ?>
34
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,wp-admin,dashicons,buttons,wp-auth-check" rel="stylesheet">
35
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
36
  <link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css'; ?>" id="bwg_tables-css" rel="stylesheet">
37
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/jquery.js"></script>
38
  <script src="<?php echo WD_BWG_URL . '/js/bwg.js'; ?>" type="text/javascript"></script>
39
  <form class="wrap wp-core-ui" id="tags_form" method="post" action="<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
40
  <h2 style="width:200px; float:left;">Tags</h2>
30
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
31
  $image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : '0');
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
+ wp_print_scripts('jquery');
34
  ?>
35
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,wp-admin,dashicons,buttons,wp-auth-check" rel="stylesheet">
36
  <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
37
  <link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css'; ?>" id="bwg_tables-css" rel="stylesheet">
 
38
  <script src="<?php echo WD_BWG_URL . '/js/bwg.js'; ?>" type="text/javascript"></script>
39
  <form class="wrap wp-core-ui" id="tags_form" method="post" action="<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
40
  <h2 style="width:200px; float:left;">Tags</h2>
admin/views/BWGViewAlbums_bwg.php CHANGED
@@ -39,9 +39,8 @@ class BWGViewAlbums_bwg {
39
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-4.html">Read More in User Manual</a>
40
  </div>
41
  <div style="float: right; text-align: right;">
42
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
43
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
44
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
45
  </a>
46
  </div>
47
  </div>
@@ -195,9 +194,8 @@ class BWGViewAlbums_bwg {
195
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-4.html">Read More in User Manual</a>
196
  </div>
197
  <div style="float: right; text-align: right;">
198
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
199
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
200
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
201
  </a>
202
  </div>
203
  </div>
39
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-4.html">Read More in User Manual</a>
40
  </div>
41
  <div style="float: right; text-align: right;">
42
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
43
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
44
  </a>
45
  </div>
46
  </div>
194
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-4.html">Read More in User Manual</a>
195
  </div>
196
  <div style="float: right; text-align: right;">
197
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
198
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
199
  </a>
200
  </div>
201
  </div>
admin/views/BWGViewBWGShortcode.php CHANGED
@@ -64,20 +64,20 @@ class BWGViewBWGShortcode {
64
  <head>
65
  <title>Photo Gallery</title>
66
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
67
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
68
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
69
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
70
- <?php
 
 
 
 
 
71
  }
72
  ?>
73
  <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/bwg_shortcode.css?ver='; ?><?php echo get_option("wd_bwg_version"); ?>">
74
  <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
75
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/jquery.js"></script>
76
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/ui/jquery.ui.core.min.js"></script>
77
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/ui/jquery.ui.widget.min.js"></script>
78
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/ui/jquery.ui.position.min.js"></script>
79
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js"></script>
80
-
81
  <script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_shortcode.js?ver='; ?><?php echo get_option("wd_bwg_version"); ?>"></script>
82
  <script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/jscolor/jscolor.js'; ?>"></script>
83
  <?php
@@ -198,6 +198,13 @@ class BWGViewBWGShortcode {
198
  </select>
199
  </td>
200
  </tr>
 
 
 
 
 
 
 
201
 
202
  <!--Thumbnails, Masonry viewies-->
203
  <tr id="tr_masonry_hor_ver">
@@ -263,6 +270,13 @@ class BWGViewBWGShortcode {
263
  <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">Don't show</label>
264
  </td>
265
  </tr>
 
 
 
 
 
 
 
266
  <tr id="tr_compuct_album_thumb_width_height">
267
  <td title="Maximum values for album thumb width and height." class="spider_label"><label for="compuct_album_thumb_width">Album Thumbnail dimensions: </label></td>
268
  <td>
@@ -287,9 +301,9 @@ class BWGViewBWGShortcode {
287
  </td>
288
  </tr>
289
  <tr id="tr_compuct_album_image_thumb_width_height">
290
- <td title="Maximum values for thumb width and height." class="spider_label"><label for="compuct_album_image_thumb_width">Image thumbnail dimensions: </label></td>
291
  <td>
292
- <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" /> x
293
  <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
294
  </td>
295
  </tr>
@@ -317,6 +331,13 @@ class BWGViewBWGShortcode {
317
  <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">No</label>
318
  </td>
319
  </tr>
 
 
 
 
 
 
 
320
  <tr id="tr_extended_album_thumb_width_height">
321
  <td title="Maximum values for album thumb width and height." class="spider_label"><label for="extended_album_thumb_width">Album thumbnail dimensions: </label></td>
322
  <td>
@@ -341,9 +362,9 @@ class BWGViewBWGShortcode {
341
  </td>
342
  </tr>
343
  <tr id="tr_extended_album_image_thumb_width_height">
344
- <td title="Maximum values for thumb width and height." class="spider_label"><label for="extended_album_image_thumb_width">Image Thumbnail dimensions: </label></td>
345
  <td>
346
- <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" /> x
347
  <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
348
  </td>
349
  </tr>
@@ -451,7 +472,7 @@ class BWGViewBWGShortcode {
451
  </td>
452
  </tr>
453
  <tr id="tr_enable_slideshow_filmstrip">
454
- <td title="Enable slideshow filmstrip view" class="spider_label spider_free_version_label"><label>Enable slideshow filmstrip: </label></td>
455
  <td>
456
  <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">Yes</label>
457
  <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">No</label>
@@ -579,6 +600,15 @@ class BWGViewBWGShortcode {
579
  </select>
580
  </td>
581
  </tr>
 
 
 
 
 
 
 
 
 
582
  <tr id="tr_popup_interval">
583
  <td title="Interval between two images." class="spider_label"><label for="popup_interval">Time interval: </label></td>
584
  <td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $option_row->popup_interval; ?>" class="spider_int_input" /> sec.</td>
@@ -772,7 +802,6 @@ class BWGViewBWGShortcode {
772
  ?>
773
  <script>
774
  window.onload = bwg_shortcode_load;
775
- window.onload = bwg_popup_fullscreen;
776
  </script>
777
  <script type="text/javascript">
778
  bwg_update_shortcode();
@@ -799,6 +828,12 @@ class BWGViewBWGShortcode {
799
  case 'thumbnails': {
800
  jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
801
  jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
 
 
 
 
 
 
802
  jQuery("#image_column_number").val(short_code['image_column_number']);
803
  jQuery("#images_per_page").val(short_code['images_per_page']);
804
  jQuery("#image_title_" + short_code['image_title']).attr('checked', 'checked');
@@ -816,6 +851,12 @@ class BWGViewBWGShortcode {
816
  case 'slideshow': {
817
  jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
818
  jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
 
 
 
 
 
 
819
  jQuery("select[id=slideshow_effect] option[value='" + short_code['slideshow_effect'] + "']").attr('selected', 'selected');
820
  jQuery("#slideshow_interval").val(short_code['slideshow_interval']);
821
  jQuery("#slideshow_width").val(short_code['slideshow_width']);
@@ -876,6 +917,12 @@ class BWGViewBWGShortcode {
876
  case 'image_browser': {
877
  jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
878
  jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
 
 
 
 
 
 
879
  jQuery("#image_browser_width").val(short_code['image_browser_width']);
880
  if (short_code['image_browser_title_enable'] == 1) {
881
  jQuery("#image_browser_title_yes").attr('checked', 'checked');
@@ -911,6 +958,12 @@ class BWGViewBWGShortcode {
911
  else {
912
  jQuery("#compuct_album_page_no").attr('checked', 'checked');
913
  }
 
 
 
 
 
 
914
  break;
915
 
916
  }
@@ -938,6 +991,12 @@ class BWGViewBWGShortcode {
938
  else {
939
  jQuery("#extended_album_page_no").attr('checked', 'checked');
940
  }
 
 
 
 
 
 
941
  break;
942
 
943
  }
@@ -948,14 +1007,20 @@ class BWGViewBWGShortcode {
948
  jQuery("#popup_height").val(short_code['popup_height']);
949
  jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
950
  jQuery("#popup_interval").val(short_code['popup_interval']);
951
- if (short_code['popup_fullscreen'] == 1) {
952
- jQuery("#popup_fullscreen_1").attr('checked', 'checked');
953
- jQuery("#tr_popup_width_height").css('display', 'none');
954
- }
955
- else {
956
- jQuery("#popup_fullscreen_0").attr('checked', 'checked');
957
- jQuery("#tr_popup_width_height").css('display', '');
958
- }
 
 
 
 
 
 
959
  if (short_code['popup_enable_filmstrip'] == 1) {
960
  jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
961
  jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
@@ -1026,7 +1091,6 @@ class BWGViewBWGShortcode {
1026
  }
1027
  else {
1028
  jQuery("#watermark_type_none").attr('checked', 'checked');
1029
-
1030
  }
1031
  bwg_watermark('watermark_type_' + short_code['watermark_type']);
1032
  bwg_gallery_type(short_code['gallery_type']);
@@ -1068,6 +1132,7 @@ class BWGViewBWGShortcode {
1068
  case 'thumbnails': {
1069
  tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1070
  tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
 
1071
  tagtext += ' image_column_number="' + jQuery("#image_column_number").val() + '"';
1072
  tagtext += ' images_per_page="' + jQuery("#images_per_page").val() + '"';
1073
  tagtext += ' image_title="' + jQuery("input[name=image_title]:checked").val() + '"';
@@ -1080,6 +1145,7 @@ class BWGViewBWGShortcode {
1080
  case 'slideshow': {
1081
  tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1082
  tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
 
1083
  tagtext += ' slideshow_effect="' + jQuery("#slideshow_effect").val() + '"';
1084
  tagtext += ' slideshow_interval="' + jQuery("#slideshow_interval").val() + '"';
1085
  tagtext += ' slideshow_width="' + jQuery("#slideshow_width").val() + '"';
@@ -1101,6 +1167,7 @@ class BWGViewBWGShortcode {
1101
  case 'image_browser': {
1102
  tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1103
  tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
 
1104
  tagtext += ' image_browser_width="' + jQuery("#image_browser_width").val() + '"';
1105
  tagtext += ' image_browser_title_enable="' + jQuery("input[name=image_browser_title_enable]:checked").val() + '"';
1106
  tagtext += ' image_browser_description_enable="' + jQuery("input[name=image_browser_description_enable]:checked").val() + '"';
@@ -1110,9 +1177,11 @@ class BWGViewBWGShortcode {
1110
  case 'album_compact_preview': {
1111
  tagtext += ' album_id="' + jQuery("#album").val() + '"';
1112
  tagtext += ' sort_by="order"';
 
1113
  tagtext += ' compuct_album_column_number="' + jQuery("#compuct_album_column_number").val() + '"';
1114
  tagtext += ' compuct_albums_per_page="' + jQuery("#compuct_albums_per_page").val() + '"';
1115
  tagtext += ' compuct_album_title="' + jQuery("input[name=compuct_album_title]:checked").val() + '"';
 
1116
  tagtext += ' compuct_album_thumb_width="' + jQuery("#compuct_album_thumb_width").val() + '"';
1117
  tagtext += ' compuct_album_thumb_height="' + jQuery("#compuct_album_thumb_height").val() + '"';
1118
  tagtext += ' compuct_album_image_column_number="' + jQuery("#compuct_album_image_column_number").val() + '"';
@@ -1127,9 +1196,11 @@ class BWGViewBWGShortcode {
1127
  case 'album_extended_preview': {
1128
  tagtext += ' album_id="' + jQuery("#album").val() + '"';
1129
  tagtext += ' sort_by="order"';
 
1130
  tagtext += ' extended_albums_per_page="' + jQuery("#extended_albums_per_page").val() + '"';
1131
  tagtext += ' extended_album_height="' + jQuery("#extended_album_height").val() + '"';
1132
  tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
 
1133
  tagtext += ' extended_album_thumb_width="' + jQuery("#extended_album_thumb_width").val() + '"';
1134
  tagtext += ' extended_album_thumb_height="' + jQuery("#extended_album_thumb_height").val() + '"';
1135
  tagtext += ' extended_album_image_column_number="' + jQuery("#extended_album_image_column_number").val() + '"';
@@ -1144,7 +1215,8 @@ class BWGViewBWGShortcode {
1144
  }
1145
  // Lightbox paramteres.
1146
  if (gallery_type != 'slideshow') {
1147
- tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
 
1148
  tagtext += ' popup_width="' + jQuery("#popup_width").val() + '"';
1149
  tagtext += ' popup_height="' + jQuery("#popup_height").val() + '"';
1150
  tagtext += ' popup_effect="' + jQuery("#popup_effect").val() + '"';
64
  <head>
65
  <title>Photo Gallery</title>
66
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
67
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
68
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
69
+ <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
70
+ <?php
71
+ wp_print_scripts('jquery');
72
+ wp_print_scripts('jquery-ui-core');
73
+ wp_print_scripts('jquery-ui-widget');
74
+ wp_print_scripts('jquery-ui-position');
75
+ wp_print_scripts('jquery-ui-tooltip');
76
  }
77
  ?>
78
  <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/bwg_shortcode.css?ver='; ?><?php echo get_option("wd_bwg_version"); ?>">
79
  <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
80
+
 
 
 
 
 
81
  <script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_shortcode.js?ver='; ?><?php echo get_option("wd_bwg_version"); ?>"></script>
82
  <script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/jscolor/jscolor.js'; ?>"></script>
83
  <?php
198
  </select>
199
  </td>
200
  </tr>
201
+ <tr id="tr_order_by">
202
+ <td class="spider_label"><label>Order: </label></td>
203
+ <td>
204
+ <input type="radio" name="order_by" id="order_by_1" value="asc" checked="checked" /><label for="order_by_1">Ascending</label>
205
+ <input type="radio" name="order_by" id="order_by_0" value="desc" /><label for="order_by_0">Descending</label>
206
+ </td>
207
+ </tr>
208
 
209
  <!--Thumbnails, Masonry viewies-->
210
  <tr id="tr_masonry_hor_ver">
270
  <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">Don't show</label>
271
  </td>
272
  </tr>
273
+ <tr id="tr_compuct_album_view_type">
274
+ <td title="The gallery images view type in the album.<br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label>Album view type: </label></td>
275
+ <td>
276
+ <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">Thumbnail</label>
277
+ <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">Masonry</label>
278
+ </td>
279
+ </tr>
280
  <tr id="tr_compuct_album_thumb_width_height">
281
  <td title="Maximum values for album thumb width and height." class="spider_label"><label for="compuct_album_thumb_width">Album Thumbnail dimensions: </label></td>
282
  <td>
301
  </td>
302
  </tr>
303
  <tr id="tr_compuct_album_image_thumb_width_height">
304
+ <td title="Maximum values for thumb width and height." class="spider_label"><label for="compuct_album_image_thumb_width" id="compuct_album_image_thumb_dimensions">Image thumbnail dimensions: </label></td>
305
  <td>
306
+ <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>
307
  <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
308
  </td>
309
  </tr>
331
  <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">No</label>
332
  </td>
333
  </tr>
334
+ <tr id="tr_extended_album_view_type">
335
+ <td title="The gallery images view type in the album.<br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label>Album view type: </label></td>
336
+ <td>
337
+ <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">Thumbnail</label>
338
+ <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">Masonry</label>
339
+ </td>
340
+ </tr>
341
  <tr id="tr_extended_album_thumb_width_height">
342
  <td title="Maximum values for album thumb width and height." class="spider_label"><label for="extended_album_thumb_width">Album thumbnail dimensions: </label></td>
343
  <td>
362
  </td>
363
  </tr>
364
  <tr id="tr_extended_album_image_thumb_width_height">
365
+ <td title="Maximum values for thumb width and height." class="spider_label"><label for="extended_album_image_thumb_width" id="extended_album_image_thumb_dimensions">Image Thumbnail dimensions: </label></td>
366
  <td>
367
+ <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>
368
  <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
369
  </td>
370
  </tr>
472
  </td>
473
  </tr>
474
  <tr id="tr_enable_slideshow_filmstrip">
475
+ <td title="Enable slideshow filmstrip view<br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label>Enable slideshow filmstrip: </label></td>
476
  <td>
477
  <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">Yes</label>
478
  <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">No</label>
600
  </select>
601
  </td>
602
  </tr>
603
+ <tr id="tr_popup_autoplay">
604
+ <td class="spider_label">
605
+ <label>Lightbox autoplay: </label>
606
+ </td>
607
+ <td>
608
+ <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">Yes</label>
609
+ <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">No</label>
610
+ </td>
611
+ </tr>
612
  <tr id="tr_popup_interval">
613
  <td title="Interval between two images." class="spider_label"><label for="popup_interval">Time interval: </label></td>
614
  <td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $option_row->popup_interval; ?>" class="spider_int_input" /> sec.</td>
802
  ?>
803
  <script>
804
  window.onload = bwg_shortcode_load;
 
805
  </script>
806
  <script type="text/javascript">
807
  bwg_update_shortcode();
828
  case 'thumbnails': {
829
  jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
830
  jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
831
+ if (short_code['order_by'] == 'asc') {
832
+ jQuery("#order_by_1").attr('checked', 'checked');
833
+ }
834
+ else {
835
+ jQuery("#order_by_0").attr('checked', 'checked');
836
+ }
837
  jQuery("#image_column_number").val(short_code['image_column_number']);
838
  jQuery("#images_per_page").val(short_code['images_per_page']);
839
  jQuery("#image_title_" + short_code['image_title']).attr('checked', 'checked');
851
  case 'slideshow': {
852
  jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
853
  jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
854
+ if (short_code['order_by'] == 'asc') {
855
+ jQuery("#order_by_1").attr('checked', 'checked');
856
+ }
857
+ else {
858
+ jQuery("#order_by_0").attr('checked', 'checked');
859
+ }
860
  jQuery("select[id=slideshow_effect] option[value='" + short_code['slideshow_effect'] + "']").attr('selected', 'selected');
861
  jQuery("#slideshow_interval").val(short_code['slideshow_interval']);
862
  jQuery("#slideshow_width").val(short_code['slideshow_width']);
917
  case 'image_browser': {
918
  jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
919
  jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
920
+ if (short_code['order_by'] == 'asc') {
921
+ jQuery("#order_by_1").attr('checked', 'checked');
922
+ }
923
+ else {
924
+ jQuery("#order_by_0").attr('checked', 'checked');
925
+ }
926
  jQuery("#image_browser_width").val(short_code['image_browser_width']);
927
  if (short_code['image_browser_title_enable'] == 1) {
928
  jQuery("#image_browser_title_yes").attr('checked', 'checked');
958
  else {
959
  jQuery("#compuct_album_page_no").attr('checked', 'checked');
960
  }
961
+ if (short_code['compuct_album_view_type'] == 'thumbnail') {
962
+ jQuery("#compuct_album_view_type_1").attr('checked', 'checked');
963
+ }
964
+ else {
965
+ jQuery("#compuct_album_view_type_2").attr('checked', 'checked');
966
+ }
967
  break;
968
 
969
  }
991
  else {
992
  jQuery("#extended_album_page_no").attr('checked', 'checked');
993
  }
994
+ if (short_code['extended_album_view_type'] == 'thumbnail') {
995
+ jQuery("#extended_album_view_type_1").attr('checked', 'checked');
996
+ }
997
+ else {
998
+ jQuery("#extended_album_view_type_0").attr('checked', 'checked');
999
+ }
1000
  break;
1001
 
1002
  }
1007
  jQuery("#popup_height").val(short_code['popup_height']);
1008
  jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
1009
  jQuery("#popup_interval").val(short_code['popup_interval']);
1010
+ if (short_code['popup_fullscreen'] == 1) {
1011
+ jQuery("#popup_fullscreen_1").attr('checked', 'checked');
1012
+ jQuery("#tr_popup_width_height").css('display', 'none');
1013
+ }
1014
+ else {
1015
+ jQuery("#popup_fullscreen_0").attr('checked', 'checked');
1016
+ jQuery("#tr_popup_width_height").css('display', '');
1017
+ }
1018
+ if (short_code['popup_autoplay'] == 1) {
1019
+ jQuery("#popup_autoplay_1").attr('checked', 'checked');
1020
+ }
1021
+ else {
1022
+ jQuery("#popup_autoplay_0").attr('checked', 'checked');
1023
+ }
1024
  if (short_code['popup_enable_filmstrip'] == 1) {
1025
  jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
1026
  jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
1091
  }
1092
  else {
1093
  jQuery("#watermark_type_none").attr('checked', 'checked');
 
1094
  }
1095
  bwg_watermark('watermark_type_' + short_code['watermark_type']);
1096
  bwg_gallery_type(short_code['gallery_type']);
1132
  case 'thumbnails': {
1133
  tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1134
  tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1135
+ tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1136
  tagtext += ' image_column_number="' + jQuery("#image_column_number").val() + '"';
1137
  tagtext += ' images_per_page="' + jQuery("#images_per_page").val() + '"';
1138
  tagtext += ' image_title="' + jQuery("input[name=image_title]:checked").val() + '"';
1145
  case 'slideshow': {
1146
  tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1147
  tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1148
+ tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1149
  tagtext += ' slideshow_effect="' + jQuery("#slideshow_effect").val() + '"';
1150
  tagtext += ' slideshow_interval="' + jQuery("#slideshow_interval").val() + '"';
1151
  tagtext += ' slideshow_width="' + jQuery("#slideshow_width").val() + '"';
1167
  case 'image_browser': {
1168
  tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1169
  tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1170
+ tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1171
  tagtext += ' image_browser_width="' + jQuery("#image_browser_width").val() + '"';
1172
  tagtext += ' image_browser_title_enable="' + jQuery("input[name=image_browser_title_enable]:checked").val() + '"';
1173
  tagtext += ' image_browser_description_enable="' + jQuery("input[name=image_browser_description_enable]:checked").val() + '"';
1177
  case 'album_compact_preview': {
1178
  tagtext += ' album_id="' + jQuery("#album").val() + '"';
1179
  tagtext += ' sort_by="order"';
1180
+ tagtext += ' order_by="asc"';
1181
  tagtext += ' compuct_album_column_number="' + jQuery("#compuct_album_column_number").val() + '"';
1182
  tagtext += ' compuct_albums_per_page="' + jQuery("#compuct_albums_per_page").val() + '"';
1183
  tagtext += ' compuct_album_title="' + jQuery("input[name=compuct_album_title]:checked").val() + '"';
1184
+ tagtext += ' compuct_album_view_type="' + jQuery("input[name=compuct_album_view_type]:checked").val() + '"';
1185
  tagtext += ' compuct_album_thumb_width="' + jQuery("#compuct_album_thumb_width").val() + '"';
1186
  tagtext += ' compuct_album_thumb_height="' + jQuery("#compuct_album_thumb_height").val() + '"';
1187
  tagtext += ' compuct_album_image_column_number="' + jQuery("#compuct_album_image_column_number").val() + '"';
1196
  case 'album_extended_preview': {
1197
  tagtext += ' album_id="' + jQuery("#album").val() + '"';
1198
  tagtext += ' sort_by="order"';
1199
+ tagtext += ' order_by="asc"';
1200
  tagtext += ' extended_albums_per_page="' + jQuery("#extended_albums_per_page").val() + '"';
1201
  tagtext += ' extended_album_height="' + jQuery("#extended_album_height").val() + '"';
1202
  tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
1203
+ tagtext += ' extended_album_view_type="' + jQuery("input[name=extended_album_view_type]:checked").val() + '"';
1204
  tagtext += ' extended_album_thumb_width="' + jQuery("#extended_album_thumb_width").val() + '"';
1205
  tagtext += ' extended_album_thumb_height="' + jQuery("#extended_album_thumb_height").val() + '"';
1206
  tagtext += ' extended_album_image_column_number="' + jQuery("#extended_album_image_column_number").val() + '"';
1215
  }
1216
  // Lightbox paramteres.
1217
  if (gallery_type != 'slideshow') {
1218
+ tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
1219
+ tagtext += ' popup_autoplay="' + jQuery("input[name=popup_autoplay]:checked").val() + '"';
1220
  tagtext += ' popup_width="' + jQuery("#popup_width").val() + '"';
1221
  tagtext += ' popup_height="' + jQuery("#popup_height").val() + '"';
1222
  tagtext += ' popup_effect="' + jQuery("#popup_effect").val() + '"';
admin/views/BWGViewEditThumb.php CHANGED
@@ -33,11 +33,31 @@ class BWGViewEditThumb {
33
  <div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
34
  <div style="display:table-cell; text-align:center; vertical-align:middle;">
35
  <img id="image_display" src="" style="max-width:<?php echo $image_width; ?>px; max-height:<?php echo $image_height; ?>px;"/>
 
 
36
  </div>
37
  </div>
38
  <script>
39
- var image_url = "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + window.parent.document.getElementById("image_url_<?php echo $image_id; ?>").value;
40
- window.document.getElementById("image_display").src = image_url + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  </script>
42
  <?php
43
  die();
@@ -138,8 +158,8 @@ class BWGViewEditThumb {
138
  }
139
  }
140
  ini_restore('memory_limit');
 
141
  ?>
142
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/jquery.js"></script>
143
  <script src="<?php echo WD_BWG_URL . '/js/Jcrop-1902/js/jquery.Jcrop.min.js'; ?>" type="text/javascript"></script>
144
  <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/js/Jcrop-1902/css/jquery.Jcrop.css'; ?>" type="text/css" />
145
  <style>
33
  <div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
34
  <div style="display:table-cell; text-align:center; vertical-align:middle;">
35
  <img id="image_display" src="" style="max-width:<?php echo $image_width; ?>px; max-height:<?php echo $image_height; ?>px;"/>
36
+ <iframe id="youtube_display" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" src="" frameborder="0" allowfullscreen></iframe>
37
+ <iframe id="vimeo_display" src="" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
38
  </div>
39
  </div>
40
  <script>
41
+ var file_type = window.parent.document.getElementById("input_filetype_<?php echo $image_id; ?>").value;
42
+ is_video = (file_type == 'YOUTUBE' || file_type == 'VIMEO');
43
+ if (!is_video) {
44
+ var image_url = "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + window.parent.document.getElementById("image_url_<?php echo $image_id; ?>").value;
45
+ window.document.getElementById("youtube_display").setAttribute('style', 'display: none;');
46
+ window.document.getElementById("vimeo_display").setAttribute('style', 'display: none;');
47
+ window.document.getElementById("image_display").src = image_url + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
48
+ }
49
+ else {
50
+ var video_id = window.parent.document.getElementById("input_filename_<?php echo $image_id; ?>").value;
51
+ window.document.getElementById("image_display").setAttribute('style', 'display: none;');
52
+ if (file_type == 'YOUTUBE') {
53
+ window.document.getElementById("vimeo_display").setAttribute('style', 'display: none;');
54
+ window.document.getElementById("youtube_display").src = "//www.youtube.com/embed/" + video_id;
55
+ }
56
+ else if (file_type == 'VIMEO') {
57
+ window.document.getElementById("youtube_display").setAttribute('style', 'display: none;');
58
+ window.document.getElementById("vimeo_display").src = "//player.vimeo.com/video/" + video_id;
59
+ }
60
+ }
61
  </script>
62
  <?php
63
  die();
158
  }
159
  }
160
  ini_restore('memory_limit');
161
+ wp_print_scripts('jquery');
162
  ?>
 
163
  <script src="<?php echo WD_BWG_URL . '/js/Jcrop-1902/js/jquery.Jcrop.min.js'; ?>" type="text/javascript"></script>
164
  <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/js/Jcrop-1902/css/jquery.Jcrop.css'; ?>" type="text/css" />
165
  <style>
admin/views/BWGViewFeatured_plugins_bwg.php CHANGED
@@ -45,6 +45,18 @@ class BWGViewFeatured_plugins_bwg {
45
  <a target="_blank" href="http://web-dorado.com/products/wordpress-form.html" class="download">Download</a>
46
  </div>
47
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
48
  <li class="spider-calendar">
49
  <div class="product">
50
  <div class="title">
@@ -105,7 +117,19 @@ class BWGViewFeatured_plugins_bwg {
105
  <a target="_blank" href="http://web-dorado.com/products/wordpress-facebook.html" class="download">Download</a>
106
  </div>
107
  </li>
108
- <li class="faq">
 
 
 
 
 
 
 
 
 
 
 
 
109
  <div class="product">
110
  <div class="title">
111
  <strong class="heading">Spider FAQ</strong>
45
  <a target="_blank" href="http://web-dorado.com/products/wordpress-form.html" class="download">Download</a>
46
  </div>
47
  </li>
48
+ <li class="contact-maker">
49
+ <div class="product">
50
+ <div class="title">
51
+ <strong class="heading">Contact Form Maker</strong>
52
+ <p>WordPress contact form builder plugin</p>
53
+ </div>
54
+ </div>
55
+ <div class="description">
56
+ <p>WordPress Contact Form Maker is an advanced and easy-to-use tool for creating forms.</p>
57
+ <a target="_blank" href="http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html" class="download">Download</a>
58
+ </div>
59
+ </li>
60
  <li class="spider-calendar">
61
  <div class="product">
62
  <div class="title">
117
  <a target="_blank" href="http://web-dorado.com/products/wordpress-facebook.html" class="download">Download</a>
118
  </div>
119
  </li>
120
+ <li class="twitter-widget">
121
+ <div class="product">
122
+ <div class="title">
123
+ <strong class="heading">Widget Twitter</strong>
124
+ <p>WordPress Widget Twitter plugin</p>
125
+ </div>
126
+ </div>
127
+ <div class="description">
128
+ <p>The Widget Twitter plugin lets you to fully integrate your WordPress site with your Twitter account.</p>
129
+ <a target="_blank" href="http://web-dorado.com/products/wordpress-twitter-integration-plugin.html" class="download">Download</a>
130
+ </div>
131
+ </li>
132
+ <li class="faq">
133
  <div class="product">
134
  <div class="title">
135
  <strong class="heading">Spider FAQ</strong>
admin/views/BWGViewGalleries_bwg.php CHANGED
@@ -39,9 +39,8 @@ class BWGViewGalleries_bwg {
39
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-2.html">Read More in User Manual</a>
40
  </div>
41
  <div style="float: right; text-align: right;">
42
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
43
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
44
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
45
  </a>
46
  </div>
47
  </div>
@@ -207,9 +206,8 @@ class BWGViewGalleries_bwg {
207
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-2.html">Read More in User Manual</a>
208
  </div>
209
  <div style="float: right; text-align: right;">
210
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
211
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
212
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
213
  </a>
214
  </div>
215
  </div>
@@ -233,6 +231,7 @@ class BWGViewGalleries_bwg {
233
  function bwg_add_image(files) {
234
  var tbody = document.getElementById('tbody_arr');
235
  for (var i in files) {
 
236
  var tr = document.createElement('tr');
237
  tr.setAttribute('id', "tr_" + bwg_j);
238
  if (tbody.firstChild) {
@@ -309,43 +308,45 @@ class BWGViewGalleries_bwg {
309
  td_filename.appendChild(div_fileresolution);
310
  var div_filesize = document.createElement('div');
311
  div_filesize.setAttribute('class', "fileDescription");
312
- div_filesize.setAttribute('title', "Image size");
313
  div_filesize.setAttribute('id', "filesize" + bwg_j);
314
  div_filesize.innerHTML = files[i]['size'];
315
  td_filename.appendChild(div_filesize);
316
  var div_filetype = document.createElement('div');
317
  div_filetype.setAttribute('class', "fileDescription");
318
- div_filetype.setAttribute('title', "Image type");
319
  div_filetype.setAttribute('id', "filetype" + bwg_j);
320
  div_filetype.innerHTML = files[i]['filetype'];
321
  td_filename.appendChild(div_filetype);
322
- var div_edit = document.createElement('div');
323
- td_filename.appendChild(div_edit);
324
- var span_edit_crop = document.createElement('span');
325
- span_edit_crop.setAttribute('class', "edit_thumb");
326
- div_edit.appendChild(span_edit_crop);
327
- var a_crop = document.createElement('a');
328
- a_crop.setAttribute('class', "thickbox thickbox-preview");
329
- a_crop.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'crop');");
330
- a_crop.innerHTML = "Crop";
331
- span_edit_crop.appendChild(a_crop);
332
- div_edit.innerHTML += " | ";
333
- var span_edit_rotate = document.createElement('span');
334
- span_edit_rotate.setAttribute('class', "edit_thumb");
335
- div_edit.appendChild(span_edit_rotate);
336
- var a_rotate = document.createElement('a');
337
- a_rotate.setAttribute('class', "thickbox thickbox-preview");
338
- a_rotate.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'rotate');");
339
- a_rotate.innerHTML = "Rotate";
340
- span_edit_rotate.appendChild(a_rotate);
341
- div_edit.innerHTML += " | "
342
- var span_edit_recover = document.createElement('span');
343
- span_edit_recover.setAttribute('class', "edit_thumb");
344
- div_edit.appendChild(span_edit_recover);
345
- var a_recover = document.createElement('a');
346
- a_recover.setAttribute('onclick', 'if (confirm("Do you want to reset the image?")) { spider_set_input_value("ajax_task", "recover"); spider_set_input_value("image_current_id", "' + bwg_j + '"); spider_ajax_save("galleries_form");} return false;');
347
- a_recover.innerHTML = "Reset";
348
- span_edit_recover.appendChild(a_recover);
 
 
349
  var input_image_url = document.createElement('input');
350
  input_image_url.setAttribute('id', "image_url_" + bwg_j);
351
  input_image_url.setAttribute('name', "image_url_" + bwg_j);
@@ -397,7 +398,12 @@ class BWGViewGalleries_bwg {
397
  input_alt.setAttribute('name', "image_alt_text_" + bwg_j);
398
  input_alt.setAttribute('type', "text");
399
  input_alt.setAttribute('size', "24");
400
- input_alt.setAttribute('value', files[i]['filename']);
 
 
 
 
 
401
  td_alt.appendChild(input_alt);
402
  // Description TD.
403
  var td_desc = document.createElement('td');
@@ -409,6 +415,9 @@ class BWGViewGalleries_bwg {
409
  textarea_desc.setAttribute('rows', "2");
410
  textarea_desc.setAttribute('cols', "20");
411
  textarea_desc.setAttribute('style', "resize:vertical;");
 
 
 
412
  td_desc.appendChild(textarea_desc);
413
  // Tag TD.
414
  var td_tag = document.createElement('td');
@@ -583,10 +592,13 @@ class BWGViewGalleries_bwg {
583
  $ids_string = '';
584
  ?>
585
  <div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table should be saved.</p></strong></div>
586
- <a style="margin: 5px 0;" href="<?php echo add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
587
- Add Images
588
- </a>
589
- <div class="buttons_div">
 
 
 
590
  <span class="button-secondary non_selectable" onclick="spider_check_all_items()">
591
  <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
592
  <span style="vertical-align: middle;">Select All</span>
@@ -612,6 +624,13 @@ class BWGViewGalleries_bwg {
612
  return false;
613
  }" value="Delete" />
614
  </div>
 
 
 
 
 
 
 
615
  <div class="tablenav top">
616
  <?php
617
  WDWLibrary::ajax_search('Filename', $search_value, 'galleries_form');
@@ -673,6 +692,7 @@ class BWGViewGalleries_bwg {
673
  $i = ($page_number - 1) * 20;
674
  if ($rows_data) {
675
  foreach ($rows_data as $row_data) {
 
676
  $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
677
  $rows_tag_data = $this->model->get_tag_rows_data($row_data->id);
678
  $published_image = (($row_data->published) ? 'publish' : 'unpublish');
@@ -683,18 +703,19 @@ class BWGViewGalleries_bwg {
683
  <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
684
  <td class="table_small_col"><?php echo ++$i; ?></td>
685
  <td class="table_extra_large_col">
686
- <a class="thickbox thickbox-preview" title="<?php echo $row_data->filename; ?>" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display'/*thumb_display*/, 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>">
687
- <img id="image_thumb_<?php echo $row_data->id; ?>" class="thumb" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row_data->thumb_url . '?date=' . date('Y-m-y H:i:s'); ?>">
688
  </a>
689
  </td>
690
  <td class="table_extra_large_col">
691
  <div class="filename" id="filename_<?php echo $row_data->id; ?>">
692
- <strong><a title="<?php echo $row_data->filename; ?>" class="spider_word_wrap thickbox thickbox-preview" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display', 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>"><?php echo $row_data->filename; ?></a></strong>
693
  </div>
694
  <div class="fileDescription" title="Date modified" id="date_modified_<?php echo $row_data->id; ?>"><?php echo date("d F Y, H:i", strtotime($row_data->date)); ?></div>
695
  <div class="fileDescription" title="Image Resolution" id="fileresolution_<?php echo $row_data->id; ?>"><?php echo $row_data->resolution; ?></div>
696
- <div class="fileDescription" title="Image size" id="filesize_<?php echo $row_data->id; ?>"><?php echo $row_data->size; ?></div>
697
- <div class="fileDescription" title="Image type" id="filetype_<?php echo $row_data->id; ?>"><?php echo $row_data->filetype; ?></div>
 
698
  <div>
699
  <span class="edit_thumb"><a class="thickbox thickbox-preview" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'crop', 'image_id' => $row_data->id, 'TB_iframe' => '1', 'width' => '800', 'height' => '500'), admin_url('admin-ajax.php')); ?>">Crop</a></span> |
700
  <span class="edit_thumb"><a class="thickbox thickbox-preview" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'rotate', 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>">Rotate</a></span> |
@@ -705,6 +726,7 @@ class BWGViewGalleries_bwg {
705
  }
706
  return false;">Reset</a></span>
707
  </div>
 
708
  <input type="hidden" id="image_url_<?php echo $row_data->id; ?>" name="image_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->image_url; ?>" />
709
  <input type="hidden" id="thumb_url_<?php echo $row_data->id; ?>" name="thumb_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->thumb_url; ?>" />
710
  <input type="hidden" id="input_filename_<?php echo $row_data->id; ?>" name="input_filename_<?php echo $row_data->id; ?>" value="<?php echo $row_data->filename; ?>" />
39
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-2.html">Read More in User Manual</a>
40
  </div>
41
  <div style="float: right; text-align: right;">
42
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
43
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
44
  </a>
45
  </div>
46
  </div>
206
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-2.html">Read More in User Manual</a>
207
  </div>
208
  <div style="float: right; text-align: right;">
209
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
210
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
211
  </a>
212
  </div>
213
  </div>
231
  function bwg_add_image(files) {
232
  var tbody = document.getElementById('tbody_arr');
233
  for (var i in files) {
234
+ var is_video = files[i]['filetype'] == 'YOUTUBE' || files[i]['filetype'] == 'VIMEO';
235
  var tr = document.createElement('tr');
236
  tr.setAttribute('id', "tr_" + bwg_j);
237
  if (tbody.firstChild) {
308
  td_filename.appendChild(div_fileresolution);
309
  var div_filesize = document.createElement('div');
310
  div_filesize.setAttribute('class', "fileDescription");
311
+ div_filesize.setAttribute('title', (!is_video) ? "Image size" : "Duration");
312
  div_filesize.setAttribute('id', "filesize" + bwg_j);
313
  div_filesize.innerHTML = files[i]['size'];
314
  td_filename.appendChild(div_filesize);
315
  var div_filetype = document.createElement('div');
316
  div_filetype.setAttribute('class', "fileDescription");
317
+ div_filetype.setAttribute('title', "Type");
318
  div_filetype.setAttribute('id', "filetype" + bwg_j);
319
  div_filetype.innerHTML = files[i]['filetype'];
320
  td_filename.appendChild(div_filetype);
321
+ if (!is_video) {
322
+ var div_edit = document.createElement('div');
323
+ td_filename.appendChild(div_edit);
324
+ var span_edit_crop = document.createElement('span');
325
+ span_edit_crop.setAttribute('class', "edit_thumb");
326
+ div_edit.appendChild(span_edit_crop);
327
+ var a_crop = document.createElement('a');
328
+ a_crop.setAttribute('class', "thickbox thickbox-preview");
329
+ a_crop.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'crop');");
330
+ a_crop.innerHTML = "Crop";
331
+ span_edit_crop.appendChild(a_crop);
332
+ div_edit.innerHTML += " | ";
333
+ var span_edit_rotate = document.createElement('span');
334
+ span_edit_rotate.setAttribute('class', "edit_thumb");
335
+ div_edit.appendChild(span_edit_rotate);
336
+ var a_rotate = document.createElement('a');
337
+ a_rotate.setAttribute('class', "thickbox thickbox-preview");
338
+ a_rotate.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'rotate');");
339
+ a_rotate.innerHTML = "Rotate";
340
+ span_edit_rotate.appendChild(a_rotate);
341
+ div_edit.innerHTML += " | "
342
+ var span_edit_recover = document.createElement('span');
343
+ span_edit_recover.setAttribute('class', "edit_thumb");
344
+ div_edit.appendChild(span_edit_recover);
345
+ var a_recover = document.createElement('a');
346
+ a_recover.setAttribute('onclick', 'if (confirm("Do you want to reset the image?")) { spider_set_input_value("ajax_task", "recover"); spider_set_input_value("image_current_id", "' + bwg_j + '"); spider_ajax_save("galleries_form");} return false;');
347
+ a_recover.innerHTML = "Reset";
348
+ span_edit_recover.appendChild(a_recover);
349
+ }
350
  var input_image_url = document.createElement('input');
351
  input_image_url.setAttribute('id', "image_url_" + bwg_j);
352
  input_image_url.setAttribute('name', "image_url_" + bwg_j);
398
  input_alt.setAttribute('name', "image_alt_text_" + bwg_j);
399
  input_alt.setAttribute('type', "text");
400
  input_alt.setAttribute('size', "24");
401
+ if (is_video) {
402
+ input_alt.setAttribute('value', files[i]['name']);
403
+ }
404
+ else {
405
+ input_alt.setAttribute('value', files[i]['filename']);
406
+ }
407
  td_alt.appendChild(input_alt);
408
  // Description TD.
409
  var td_desc = document.createElement('td');
415
  textarea_desc.setAttribute('rows', "2");
416
  textarea_desc.setAttribute('cols', "20");
417
  textarea_desc.setAttribute('style', "resize:vertical;");
418
+ if (is_video) {
419
+ textarea_desc.innerHTML = files[i]['description'];
420
+ }
421
  td_desc.appendChild(textarea_desc);
422
  // Tag TD.
423
  var td_tag = document.createElement('td');
592
  $ids_string = '';
593
  ?>
594
  <div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table should be saved.</p></strong></div>
595
+ <div class="buttons_div_left">
596
+ <a href="<?php echo add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
597
+ Add Images
598
+ </a>
599
+ <input id="show_add_video" class="button-primary" type="button" onclick="jQuery('.opacity_add_video').show(); return false;" value="Add Video" />
600
+ </div>
601
+ <div class="buttons_div_right">
602
  <span class="button-secondary non_selectable" onclick="spider_check_all_items()">
603
  <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
604
  <span style="vertical-align: middle;">Select All</span>
624
  return false;
625
  }" value="Delete" />
626
  </div>
627
+ <div id="opacity_add_video" class="opacity_add_video bwg_opacity_video" onclick="jQuery('.opacity_add_video').hide();"></div>
628
+ <div id="add_video" class="opacity_add_video bwg_add_video">
629
+ <input type="text" id="video_url" name="video_url" value="" />
630
+ <input class="button-primary" type="button" onclick="if (bwg_get_video_info('video_url')) {jQuery('.opacity_add_video').hide();} return false;" value="Add to gallery" />
631
+ <input class="button-secondary" type="button" onclick="jQuery('.opacity_add_video').hide(); return false;" value="Cancel" />
632
+ <div class="spider_description">Enter YouTube or Vimeo link here.</div>
633
+ </div>
634
  <div class="tablenav top">
635
  <?php
636
  WDWLibrary::ajax_search('Filename', $search_value, 'galleries_form');
692
  $i = ($page_number - 1) * 20;
693
  if ($rows_data) {
694
  foreach ($rows_data as $row_data) {
695
+ $is_video = $row_data->filetype == 'YOUTUBE' || $row_data->filetype == 'VIMEO';
696
  $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
697
  $rows_tag_data = $this->model->get_tag_rows_data($row_data->id);
698
  $published_image = (($row_data->published) ? 'publish' : 'unpublish');
703
  <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
704
  <td class="table_small_col"><?php echo ++$i; ?></td>
705
  <td class="table_extra_large_col">
706
+ <a class="thickbox thickbox-preview" title="<?php echo $row_data->alt; ?>" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display'/*thumb_display*/, 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>">
707
+ <img id="image_thumb_<?php echo $row_data->id; ?>" class="thumb" src="<?php echo (!$is_video ? site_url() . '/' . $WD_BWG_UPLOAD_DIR : "") . $row_data->thumb_url . '?date=' . date('Y-m-y H:i:s'); ?>">
708
  </a>
709
  </td>
710
  <td class="table_extra_large_col">
711
  <div class="filename" id="filename_<?php echo $row_data->id; ?>">
712
+ <strong><a title="<?php echo $row_data->alt; ?>" class="spider_word_wrap thickbox thickbox-preview" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display', 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>"><?php echo $row_data->filename; ?></a></strong>
713
  </div>
714
  <div class="fileDescription" title="Date modified" id="date_modified_<?php echo $row_data->id; ?>"><?php echo date("d F Y, H:i", strtotime($row_data->date)); ?></div>
715
  <div class="fileDescription" title="Image Resolution" id="fileresolution_<?php echo $row_data->id; ?>"><?php echo $row_data->resolution; ?></div>
716
+ <div class="fileDescription" title="<?php echo (!$is_video ? "Image size" : "Duration")?>" id="filesize_<?php echo $row_data->id; ?>"><?php echo $row_data->size; ?></div>
717
+ <div class="fileDescription" title="Type" id="filetype_<?php echo $row_data->id; ?>"><?php echo $row_data->filetype; ?></div>
718
+ <?php if(!$is_video) {?>
719
  <div>
720
  <span class="edit_thumb"><a class="thickbox thickbox-preview" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'crop', 'image_id' => $row_data->id, 'TB_iframe' => '1', 'width' => '800', 'height' => '500'), admin_url('admin-ajax.php')); ?>">Crop</a></span> |
721
  <span class="edit_thumb"><a class="thickbox thickbox-preview" href="<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'rotate', 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>">Rotate</a></span> |
726
  }
727
  return false;">Reset</a></span>
728
  </div>
729
+ <?php } ?>
730
  <input type="hidden" id="image_url_<?php echo $row_data->id; ?>" name="image_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->image_url; ?>" />
731
  <input type="hidden" id="thumb_url_<?php echo $row_data->id; ?>" name="thumb_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->thumb_url; ?>" />
732
  <input type="hidden" id="input_filename_<?php echo $row_data->id; ?>" name="input_filename_<?php echo $row_data->id; ?>" value="<?php echo $row_data->filename; ?>" />
admin/views/BWGViewLicensing_bwg.php CHANGED
@@ -173,9 +173,8 @@ class BWGViewLicensing_bwg {
173
  </table>
174
  </div>
175
  <div style="float: right; text-align: right;">
176
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
177
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
178
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
179
  </a>
180
  </div>
181
  <div style="float: left; clear: both;">
173
  </table>
174
  </div>
175
  <div style="float: right; text-align: right;">
176
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
177
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
178
  </a>
179
  </div>
180
  <div style="float: left; clear: both;">
admin/views/BWGViewOptions_bwg.php CHANGED
@@ -31,9 +31,8 @@ class BWGViewOptions_bwg {
31
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-5/5-1.html">Read More in User Manual</a>
32
  </div>
33
  <div style="float: right; text-align: right;">
34
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
35
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
36
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
37
  </a>
38
  </div>
39
  </div>
@@ -468,13 +467,13 @@ class BWGViewOptions_bwg {
468
  <div class="spider_div_options" id="div_content_3">
469
  <table>
470
  <tbody>
471
- <tr id="tr_popup_fullscreen">
472
  <td class="spider_label_options">
473
  <label>Full width lightbox:</label>
474
  </td>
475
  <td>
476
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1">Yes</label>
477
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0">No</label>
478
  <div class="spider_description">Enable full width feature for the lightbox.</div>
479
  </td>
480
  </tr>
@@ -505,6 +504,16 @@ class BWGViewOptions_bwg {
505
  <div class="spider_description"></div>
506
  </td>
507
  </tr>
 
 
 
 
 
 
 
 
 
 
508
  <tr>
509
  <td class="spider_label_options">
510
  <label for="popup_interval">Time interval:</label>
@@ -687,6 +696,16 @@ class BWGViewOptions_bwg {
687
  <div class="spider_description"></div>
688
  </td>
689
  </tr>
 
 
 
 
 
 
 
 
 
 
690
  <tr>
691
  <td class="spider_label_options">
692
  <label>Show title:</label>
@@ -1086,7 +1105,7 @@ class BWGViewOptions_bwg {
1086
  window.onload = bwg_inputs();
1087
  window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
1088
  window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
1089
- window.onload = bwg_popup_fullscreen;
1090
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_0'" ?>);
1091
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_download', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_download', 'popup_enable_ctrl_btn_0'" ?>);
1092
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_0'" ?>);
31
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-5/5-1.html">Read More in User Manual</a>
32
  </div>
33
  <div style="float: right; text-align: right;">
34
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
35
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
36
  </a>
37
  </div>
38
  </div>
467
  <div class="spider_div_options" id="div_content_3">
468
  <table>
469
  <tbody>
470
+ <tr id="tr_popup_full_width">
471
  <td class="spider_label_options">
472
  <label>Full width lightbox:</label>
473
  </td>
474
  <td>
475
+ <input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen(1)" /><label for="popup_fullscreen_1">Yes</label>
476
+ <input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen(0)" /><label for="popup_fullscreen_0">No</label>
477
  <div class="spider_description">Enable full width feature for the lightbox.</div>
478
  </td>
479
  </tr>
504
  <div class="spider_description"></div>
505
  </td>
506
  </tr>
507
+ <tr id="tr_popup_autoplay">
508
+ <td class="spider_label_options">
509
+ <label>Lightbox autoplay: </label>
510
+ </td>
511
+ <td>
512
+ <input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1">Yes</label>
513
+ <input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0">No</label>
514
+ <div class="spider_description"></div>
515
+ </td>
516
+ </tr>
517
  <tr>
518
  <td class="spider_label_options">
519
  <label for="popup_interval">Time interval:</label>
696
  <div class="spider_description"></div>
697
  </td>
698
  </tr>
699
+ <tr>
700
+ <td class="spider_label_options">
701
+ <label>Album view type:</label>
702
+ </td>
703
+ <td>
704
+ <input disabled="disabled" type="radio" name="album_view_type" id="album_view_type_1" value="thumbnail" <?php if ($row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> /><label for="album_view_type_1">Thumbnail</label>
705
+ <input disabled="disabled" type="radio" name="album_view_type" id="album_view_type_0" value="masonry" <?php if ($row->album_view_type == "masonry") echo 'checked="checked"'; ?> /><label for="album_view_type_0">Masonry</label>
706
+ <div class="spider_description spider_free_version">This option is disabled in free version.</div>
707
+ </td>
708
+ </tr>
709
  <tr>
710
  <td class="spider_label_options">
711
  <label>Show title:</label>
1105
  window.onload = bwg_inputs();
1106
  window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
1107
  window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
1108
+ window.onload = bwg_popup_fullscreen(<?php echo $row->popup_fullscreen; ?>);
1109
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_0'" ?>);
1110
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_download', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_download', 'popup_enable_ctrl_btn_0'" ?>);
1111
  window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_0'" ?>);
admin/views/BWGViewTags_bwg.php CHANGED
@@ -40,9 +40,8 @@ class BWGViewTags_bwg {
40
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-3.html">Read More in User Manual</a>
41
  </div>
42
  <div style="float: right; text-align: right;">
43
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
44
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
45
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
46
  </a>
47
  </div>
48
  </div>
40
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-3.html">Read More in User Manual</a>
41
  </div>
42
  <div style="float: right; text-align: right;">
43
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
44
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
45
  </a>
46
  </div>
47
  </div>
admin/views/BWGViewThemes_bwg.php CHANGED
@@ -46,9 +46,8 @@ class BWGViewThemes_bwg {
46
  ?>
47
  </div>
48
  <div style="float: right; text-align: right;">
49
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
50
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
51
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
52
  </a>
53
  </div>
54
  </div>
@@ -184,7 +183,7 @@ class BWGViewThemes_bwg {
184
  public function edit($id, $reset) {
185
  $row = $this->model->get_row_data($id, $reset);
186
  $page_title = (($id != 0) ? 'Edit theme ' . $row->name : 'Create new theme');
187
- $current_type = ((isset($_POST['current_type'])) ? esc_html($_POST['current_type']) : 'Thumbnail');
188
  $border_styles = array(
189
  'none' => 'None',
190
  'solid' => 'Solid',
@@ -236,9 +235,8 @@ class BWGViewThemes_bwg {
236
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
237
  </div>
238
  <div style="float: right; text-align: right;">
239
- <a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
240
- <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/header.png'; ?>" />
241
- <p style="font-size: 16px; margin: 0; padding: 0 20px 0 0;">Get the full version</p>
242
  </a>
243
  </div>
244
  </div>
@@ -418,6 +416,15 @@ class BWGViewThemes_bwg {
418
  <fieldset class="spider_child_fieldset" id="Thumbnail_3">
419
  <table style="clear:both;">
420
  <tbody>
 
 
 
 
 
 
 
 
 
421
  <tr>
422
  <td class="spider_label"><label for="thumb_title_font_size">Title font size: </label></td>
423
  <td>
@@ -1361,6 +1368,15 @@ class BWGViewThemes_bwg {
1361
  <fieldset class="spider_child_fieldset" id="Compact_album_3">
1362
  <table style="clear:both;">
1363
  <tbody>
 
 
 
 
 
 
 
 
 
1364
  <tr>
1365
  <td class="spider_label"><label for="album_compact_title_font_size">Title font size: </label></td>
1366
  <td>
46
  ?>
47
  </div>
48
  <div style="float: right; text-align: right;">
49
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
50
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
51
  </a>
52
  </div>
53
  </div>
183
  public function edit($id, $reset) {
184
  $row = $this->model->get_row_data($id, $reset);
185
  $page_title = (($id != 0) ? 'Edit theme ' . $row->name : 'Create new theme');
186
+ $current_type = WDWLibrary::get('current_type', 'Thumbnail');
187
  $border_styles = array(
188
  'none' => 'None',
189
  'solid' => 'Solid',
235
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
236
  </div>
237
  <div style="float: right; text-align: right;">
238
+ <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
239
+ <img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
 
240
  </a>
241
  </div>
242
  </div>
416
  <fieldset class="spider_child_fieldset" id="Thumbnail_3">
417
  <table style="clear:both;">
418
  <tbody>
419
+ <tr>
420
+ <td class="spider_label"><label>Title position: </label></td>
421
+ <td>
422
+ <input type="radio" name="thumb_title_pos" id="thumb_title_pos1" value="top" <?php if ($row->thumb_title_pos == "top") echo 'checked="checked"'; ?> />
423
+ <label for="thumb_title_pos1" id="thumb_title_pos1_lbl">Top</label>
424
+ <input type="radio" name="thumb_title_pos" id="thumb_title_pos0" value="bottom" <?php if ($row->thumb_title_pos == "bottom") echo 'checked="checked"'; ?> />
425
+ <label for="thumb_title_pos0" id="thumb_title_pos0_lbl">Bottom</label>
426
+ </td>
427
+ </tr>
428
  <tr>
429
  <td class="spider_label"><label for="thumb_title_font_size">Title font size: </label></td>
430
  <td>
1368
  <fieldset class="spider_child_fieldset" id="Compact_album_3">
1369
  <table style="clear:both;">
1370
  <tbody>
1371
+ <tr>
1372
+ <td class="spider_label"><label>Title position: </label></td>
1373
+ <td>
1374
+ <input type="radio" name="album_compact_thumb_title_pos" id="album_compact_thumb_title_pos1" value="top" <?php if ($row->album_compact_thumb_title_pos == "top") echo 'checked="checked"'; ?> />
1375
+ <label for="album_compact_thumb_title_pos1" id="album_compact_thumb_title_pos1_lbl">Top</label>
1376
+ <input type="radio" name="album_compact_thumb_title_pos" id="album_compact_thumb_title_pos0" value="bottom" <?php if ($row->album_compact_thumb_title_pos == "bottom") echo 'checked="checked"'; ?> />
1377
+ <label for="album_compact_thumb_title_pos0" id="album_compact_thumb_title_pos0_lbl">Bottom</label>
1378
+ </td>
1379
+ </tr>
1380
  <tr>
1381
  <td class="spider_label"><label for="album_compact_title_font_size">Title font size: </label></td>
1382
  <td>
admin/views/BWGViewWidget.php CHANGED
@@ -43,29 +43,27 @@ class BWGViewWidget {
43
  echo $before_title . $title . $after_title;
44
  }
45
  // Widget output.
46
- if ($id) {
47
- if ($type == 'gallery') {
48
- require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerThumbnails.php');
49
- $controller_class = 'BWGControllerThumbnails';
50
- }
51
- else {
52
- require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerAlbum_compact_preview.php');
53
- $controller_class = 'BWGControllerAlbum_compact_preview';
54
- }
55
- $controller = new $controller_class();
56
- global $bwg;
57
- $params = array (
58
- 'from' => 'widget',
59
- 'gallery_type' => $type,
60
- 'id' => ($type == 'gallery' ? $gallery_id : $album_id),
61
- 'show' => $show,
62
- 'count' => $count,
63
- 'width' => $width,
64
- 'height' => $height,
65
- 'theme_id' => $theme_id);
66
- $controller->execute($params, 1, $bwg);
67
- $bwg++;
68
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  // After widget.
70
  echo $after_widget;
71
  }
@@ -94,10 +92,12 @@ class BWGViewWidget {
94
  if (jQuery(jQuery(div).find(".sel_gallery")[0]).prop("checked")) {
95
  jQuery(jQuery(div).find("#p_galleries")).css("display", "");
96
  jQuery(jQuery(div).find("#p_albums")).css("display", "none");
 
97
  }
98
  else {
99
  jQuery(jQuery(div).find("#p_galleries")).css("display", "none");
100
  jQuery(jQuery(div).find("#p_albums")).css("display", "");
 
101
  }
102
  }
103
  </script>
@@ -107,7 +107,8 @@ class BWGViewWidget {
107
  </p>
108
  <p>
109
  <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_1"; ?>" value="gallery" class="sel_gallery" onclick="bwg_change_type(event, this)" <?php if ($instance['type'] == "gallery") echo 'checked="checked"'; ?> /><label for="<?php echo $id_type . "_1"; ?>">Gallery</label>
110
- <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_2"; ?>" value="album" class="sel_album" onclick="bwg_change_type(event, this)" <?php if ($instance['type'] == "album") echo 'checked="checked"'; ?> /><label for="<?php echo $id_type . "_2"; ?>">Album</label>
 
111
  </p>
112
  <p id="p_galleries" style="display:<?php echo ($instance['type'] == "gallery") ? "" : "none" ?>;">
113
  <select name="<?php echo $name_gallery_id; ?>" id="<?php echo $id_gallery_id; ?>" class="widefat">
@@ -134,9 +135,10 @@ class BWGViewWidget {
134
  </select>
135
  </p>
136
  <p>
137
- <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_1"; ?>" value="random" onclick="bwg_change_type(event, this)" <?php if ($instance['show'] == "random") echo 'checked="checked"'; ?> /><label for="<?php echo $id_show . "_1"; ?>">Random</label>
138
- <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_2"; ?>" value="first" onclick="bwg_change_type(event, this)" <?php if ($instance['show'] == "first") echo 'checked="checked"'; ?> /><label for="<?php echo $id_show . "_2"; ?>">First</label>
139
- <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_3"; ?>" value="last" onclick="bwg_change_type(event, this)" <?php if ($instance['show'] == "last") echo 'checked="checked"'; ?> /><label for="<?php echo $id_show . "_3"; ?>">Last</label>
 
140
  </p>
141
  <p>
142
  <label for="<?php echo $id_count; ?>">Count:</label>
43
  echo $before_title . $title . $after_title;
44
  }
45
  // Widget output.
46
+ if ($type == 'gallery') {
47
+ require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerThumbnails.php');
48
+ $controller_class = 'BWGControllerThumbnails';
49
+ }
50
+ else {
51
+ require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerAlbum_compact_preview.php');
52
+ $controller_class = 'BWGControllerAlbum_compact_preview';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
+ $controller = new $controller_class();
55
+ global $bwg;
56
+ $params = array (
57
+ 'from' => 'widget',
58
+ 'gallery_type' => $type,
59
+ 'id' => ($type == 'gallery' ? $gallery_id : $album_id),
60
+ 'show' => $show,
61
+ 'count' => $count,
62
+ 'width' => $width,
63
+ 'height' => $height,
64
+ 'theme_id' => $theme_id);
65
+ $controller->execute($params, 1, $bwg);
66
+ $bwg++;
67
  // After widget.
68
  echo $after_widget;
69
  }
92
  if (jQuery(jQuery(div).find(".sel_gallery")[0]).prop("checked")) {
93
  jQuery(jQuery(div).find("#p_galleries")).css("display", "");
94
  jQuery(jQuery(div).find("#p_albums")).css("display", "none");
95
+ jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "gallery");
96
  }
97
  else {
98
  jQuery(jQuery(div).find("#p_galleries")).css("display", "none");
99
  jQuery(jQuery(div).find("#p_albums")).css("display", "");
100
+ jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "album");
101
  }
102
  }
103
  </script>
107
  </p>
108
  <p>
109
  <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_1"; ?>" value="gallery" class="sel_gallery" onclick="bwg_change_type(event, this)" <?php if ($instance['type'] == "gallery") echo 'checked="checked"'; ?> /><label for="<?php echo $id_type . "_1"; ?>">Gallery</label>
110
+ <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_2"; ?>" value="album" class="sel_album" onclick="bwg_change_type(event, this)" <?php if ($instance['type'] == "album") echo 'checked="checked"'; ?> /><label for="<?php echo $id_type . "_2"; ?>">Album</label>
111
+ <input type="hidden" name="<?php echo $name_type; ?>" id="<?php echo $id_type; ?>" value="<?php echo $instance['type']; ?>" class="bwg_hidden" />
112
  </p>
113
  <p id="p_galleries" style="display:<?php echo ($instance['type'] == "gallery") ? "" : "none" ?>;">
114
  <select name="<?php echo $name_gallery_id; ?>" id="<?php echo $id_gallery_id; ?>" class="widefat">
135
  </select>
136
  </p>
137
  <p>
138
+ <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_1"; ?>" value="random" <?php if ($instance['show'] == "random") echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "random");' /><label for="<?php echo $id_show . "_1"; ?>">Random</label>
139
+ <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_2"; ?>" value="first" <?php if ($instance['show'] == "first") echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "first");' /><label for="<?php echo $id_show . "_2"; ?>">First</label>
140
+ <input type="radio" name="<?php echo $name_show; ?>" id="<?php echo $id_show . "_3"; ?>" value="last" <?php if ($instance['show'] == "last") echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "last");' /><label for="<?php echo $id_show . "_3"; ?>">Last</label>
141
+ <input type="hidden" name="<?php echo $name_show; ?>" id="<?php echo $id_show; ?>" value="<?php echo $instance['show']; ?>" class="bwg_hidden" />
142
  </p>
143
  <p>
144
  <label for="<?php echo $id_count; ?>">Count:</label>
admin/views/BWGViewWidgetSlideshow.php CHANGED
@@ -27,7 +27,7 @@ class BWGViewWidgetSlideshow {
27
 
28
  function widget($args, $instance) {
29
  extract($args);
30
- $title = (isset($instance['title']) ? $instance['title'] : '');
31
  $gallery_id = (isset($instance['gallery_id']) ? $instance['gallery_id'] : 0);
32
  $width = (isset($instance['width']) ? $instance['width'] : 200);
33
  $height = (isset($instance['height']) ? $instance['height'] : 200);
@@ -42,24 +42,22 @@ class BWGViewWidgetSlideshow {
42
  echo $before_title . $title . $after_title;
43
  }
44
  // Widget output.
45
- if ($id) {
46
- require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
47
- $controller_class = 'BWGControllerSlideshow';
48
- $controller = new $controller_class();
49
- global $bwg;
50
- $params = array (
51
- 'from' => 'widget',
52
- 'gallery_type' => 'slideshow',
53
- 'gallery_id' => $gallery_id,
54
- 'width' => $width,
55
- 'height' => $height,
56
- 'effect' => $effect,
57
- 'interval' => $interval,
58
- 'shuffle' => $shuffle,
59
- 'theme_id' => $theme_id);
60
- $controller->execute($params, 1, $bwg);
61
- $bwg++;
62
- }
63
  // After widget.
64
  echo $after_widget;
65
  }
@@ -142,8 +140,9 @@ class BWGViewWidgetSlideshow {
142
  </p>
143
  <p>
144
  <label>Enable shuffle:</label>
145
- <input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_1"; ?>" value="1" <?php if ($instance['shuffle']) echo 'checked="checked"'; ?> /><label for="<?php echo $id_shuffle . "_1"; ?>">Yes</label>
146
- <input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_0"; ?>" value="0" <?php if (!$instance['shuffle']) echo 'checked="checked"'; ?> /><label for="<?php echo $id_shuffle . "_0"; ?>">No</label>
 
147
  </p>
148
  <p>
149
  <select name="<?php echo $name_theme_id; ?>" id="<?php echo $id_theme_id; ?>" class="widefat" <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." disabled="disabled"' : ''); ?>>
27
 
28
  function widget($args, $instance) {
29
  extract($args);
30
+ $title = (isset($instance['title']) ? $instance['title'] : "");
31
  $gallery_id = (isset($instance['gallery_id']) ? $instance['gallery_id'] : 0);
32
  $width = (isset($instance['width']) ? $instance['width'] : 200);
33
  $height = (isset($instance['height']) ? $instance['height'] : 200);
42
  echo $before_title . $title . $after_title;
43
  }
44
  // Widget output.
45
+ require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
46
+ $controller_class = 'BWGControllerSlideshow';
47
+ $controller = new $controller_class();
48
+ global $bwg;
49
+ $params = array (
50
+ 'from' => 'widget',
51
+ 'gallery_type' => 'slideshow',
52
+ 'gallery_id' => $gallery_id,
53
+ 'width' => $width,
54
+ 'height' => $height,
55
+ 'effect' => $effect,
56
+ 'interval' => $interval,
57
+ 'shuffle' => $shuffle,
58
+ 'theme_id' => $theme_id);
59
+ $controller->execute($params, 1, $bwg);
60
+ $bwg++;
 
 
61
  // After widget.
62
  echo $after_widget;
63
  }
140
  </p>
141
  <p>
142
  <label>Enable shuffle:</label>
143
+ <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"; ?>">Yes</label>
144
+ <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"; ?>">No</label>
145
+ <input type="hidden" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle; ?>" value="<?php echo $instance['shuffle']; ?>" class="bwg_hidden" />
146
  </p>
147
  <p>
148
  <select name="<?php echo $name_theme_id; ?>" id="<?php echo $id_theme_id; ?>" class="widefat" <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." disabled="disabled"' : ''); ?>>
admin/views/BWGViewWidgetTags.php CHANGED
@@ -27,9 +27,10 @@ class BWGViewWidgetTags {
27
 
28
  function widget($args, $instance) {
29
  extract($args);
30
- $title = (isset($instance['title']) ? $instance['title'] : '');
31
  $type = (isset($instance['type']) ? $instance['type'] : "text");
32
  $show_name = (isset($instance['show_name']) ? $instance['show_name'] : 0);
 
33
  $count = (isset($instance['count']) ? $instance['count'] : 0);
34
  $width = (isset($instance['width']) ? $instance['width'] : 250);
35
  $height = (isset($instance['height']) ? $instance['height'] : 250);
@@ -44,34 +45,34 @@ class BWGViewWidgetTags {
44
  echo $before_title . $title . $after_title;
45
  }
46
  // Widget output.
47
- if ($id) {
48
- require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerWidget.php');
49
- $controller_class = 'BWGControllerWidgetFrontEnd';
50
- $controller = new $controller_class();
51
- global $bwg;
52
- $params = array (
53
- 'type' => $type,
54
- 'show_name' => $show_name,
55
- 'count' => $count,
56
- 'width' => $width,
57
- 'height' => $height,
58
- 'background_transparent' => $background_transparent,
59
- 'background_color' => $background_color,
60
- 'text_color' => $text_color,
61
- 'theme_id' => $theme_id);
62
- $controller->execute($params);
63
- $bwg++;
64
- }
65
  // After widget.
66
  echo $after_widget;
67
  }
68
 
69
  // Widget Control Panel.
70
- function form($instance, $id_title, $name_title, $id_type, $name_type, $id_show_name, $name_show_name, $id_count, $name_count, $id_width, $name_width, $id_height, $name_height, $id_background_transparent, $name_background_transparent, $id_background_color, $name_background_color, $id_text_color, $name_text_color, $id_theme_id, $name_theme_id) {
71
  $defaults = array(
72
  'title' => 'Photo Gallery Tags Cloud',
73
  'type' => 'text',
74
  'show_name' => 0,
 
75
  'count' => 0,
76
  'width' => 250,
77
  'height' => 250,
@@ -88,9 +89,11 @@ class BWGViewWidgetTags {
88
  var div = jQuery(obj).closest("div");
89
  if(jQuery(jQuery(div).find(".sel_image")[0]).prop("checked")) {
90
  jQuery(jQuery(div).find("#p_show_name")).css("display", "");
 
91
  }
92
  else {
93
  jQuery(jQuery(div).find("#p_show_name")).css("display", "none");
 
94
  }
95
  }
96
 
@@ -98,9 +101,11 @@ class BWGViewWidgetTags {
98
  var div = jQuery(obj).closest("div");
99
  if(jQuery(jQuery(div).find(".bg_transparent")[0]).prop("checked")) {
100
  jQuery(jQuery(div).find("#p_bg_color")).css("display", "none");
 
101
  }
102
  else {
103
  jQuery(jQuery(div).find("#p_bg_color")).css("display", "");
 
104
  }
105
  }
106
  </script>
@@ -111,12 +116,20 @@ class BWGViewWidgetTags {
111
  </p>
112
  <p>
113
  <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_1"; ?>" value="text" class="sel_text" <?php if ($instance['type'] == "text") echo 'checked="checked"'; ?> onclick="bwg_change_type_tag(event, this)" /><label for="<?php echo $id_type . "_1"; ?>">Text</label>
114
- <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_2"; ?>" value="image" class="sel_image" <?php if ($instance['type'] == "image") echo 'checked="checked"'; ?> onclick="bwg_change_type_tag(event, this)" /><label for="<?php echo $id_type . "_2"; ?>">Image</label>
 
115
  </p>
116
  <p id="p_show_name" style="display:<?php echo ($instance['type'] == 'image') ? "" : "none" ?>;">
117
  <label>Show Tag Names:</label>
118
- <input type="radio" name="<?php echo $name_show_name; ?>" id="<?php echo $id_show_name . "_1"; ?>" value="1" <?php if ($instance['show_name']) echo 'checked="checked"'; ?> /><label for="<?php echo $id_show_name . "_1"; ?>">Yes</label>
119
- <input type="radio" name="<?php echo $name_show_name; ?>" id="<?php echo $id_show_name . "_0"; ?>" value="0" <?php if (!$instance['show_name']) echo 'checked="checked"'; ?> /><label for="<?php echo $id_show_name . "_0"; ?>">No</label>
 
 
 
 
 
 
 
120
  </p>
121
  <p>
122
  <label for="<?php echo $id_count; ?>">Number (0 for all):</label>
@@ -130,7 +143,8 @@ class BWGViewWidgetTags {
130
  <p>
131
  <label>Transparent Background:</label>
132
  <input type="radio" name="<?php echo $name_background_transparent; ?>" id="<?php echo $id_background_transparent . "_1"; ?>" value="1" <?php if ($instance['background_transparent']) echo 'checked="checked"'; ?> onclick="bwg_change_bg_transparency(event, this)" class="bg_transparent" /><label for="<?php echo $id_background_transparent . "_1"; ?>">Yes</label>
133
- <input type="radio" name="<?php echo $name_background_transparent; ?>" id="<?php echo $id_background_transparent . "_0"; ?>" value="0" <?php if (!$instance['background_transparent']) echo 'checked="checked"'; ?> onclick="bwg_change_bg_transparency(event, this)" /><label for="<?php echo $id_background_transparent . "_0"; ?>">No</label>
 
134
  </p>
135
  <p id="p_bg_color" style="display:<?php echo (!$instance['background_transparent']) ? "" : "none" ?>;">
136
  <label for="<?php echo $id_background_color; ?>">Background Color:</label>
27
 
28
  function widget($args, $instance) {
29
  extract($args);
30
+ $title = (isset($instance['title']) ? $instance['title'] : "");
31
  $type = (isset($instance['type']) ? $instance['type'] : "text");
32
  $show_name = (isset($instance['show_name']) ? $instance['show_name'] : 0);
33
+ $open_option = (isset($instance['open_option']) ? $instance['open_option'] : 'page');
34
  $count = (isset($instance['count']) ? $instance['count'] : 0);
35
  $width = (isset($instance['width']) ? $instance['width'] : 250);
36
  $height = (isset($instance['height']) ? $instance['height'] : 250);
45
  echo $before_title . $title . $after_title;
46
  }
47
  // Widget output.
48
+ require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerWidget.php');
49
+ $controller_class = 'BWGControllerWidgetFrontEnd';
50
+ $controller = new $controller_class();
51
+ global $bwg;
52
+ $params = array (
53
+ 'type' => $type,
54
+ 'show_name' => $show_name,
55
+ 'open_option' => $open_option,
56
+ 'count' => $count,
57
+ 'width' => $width,
58
+ 'height' => $height,
59
+ 'background_transparent' => $background_transparent,
60
+ 'background_color' => $background_color,
61
+ 'text_color' => $text_color,
62
+ 'theme_id' => $theme_id);
63
+ $controller->execute($params);
64
+ $bwg++;
 
65
  // After widget.
66
  echo $after_widget;
67
  }
68
 
69
  // Widget Control Panel.
70
+ function form($instance, $id_title, $name_title, $id_type, $name_type, $id_show_name, $name_show_name, $id_open_option, $name_open_option, $id_count, $name_count, $id_width, $name_width, $id_height, $name_height, $id_background_transparent, $name_background_transparent, $id_background_color, $name_background_color, $id_text_color, $name_text_color, $id_theme_id, $name_theme_id) {
71
  $defaults = array(
72
  'title' => 'Photo Gallery Tags Cloud',
73
  'type' => 'text',
74
  'show_name' => 0,
75
+ 'open_option' => 'page',
76
  'count' => 0,
77
  'width' => 250,
78
  'height' => 250,
89
  var div = jQuery(obj).closest("div");
90
  if(jQuery(jQuery(div).find(".sel_image")[0]).prop("checked")) {
91
  jQuery(jQuery(div).find("#p_show_name")).css("display", "");
92
+ jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "image");
93
  }
94
  else {
95
  jQuery(jQuery(div).find("#p_show_name")).css("display", "none");
96
+ jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "text");
97
  }
98
  }
99
 
101
  var div = jQuery(obj).closest("div");
102
  if(jQuery(jQuery(div).find(".bg_transparent")[0]).prop("checked")) {
103
  jQuery(jQuery(div).find("#p_bg_color")).css("display", "none");
104
+ jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "1");
105
  }
106
  else {
107
  jQuery(jQuery(div).find("#p_bg_color")).css("display", "");
108
+ jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "0");
109
  }
110
  }
111
  </script>
116
  </p>
117
  <p>
118
  <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_1"; ?>" value="text" class="sel_text" <?php if ($instance['type'] == "text") echo 'checked="checked"'; ?> onclick="bwg_change_type_tag(event, this)" /><label for="<?php echo $id_type . "_1"; ?>">Text</label>
119
+ <input type="radio" name="<?php echo $name_type; ?>" id="<?php echo $id_type . "_2"; ?>" value="image" class="sel_image" <?php if ($instance['type'] == "image") echo 'checked="checked"'; ?> onclick="bwg_change_type_tag(event, this)" /><label for="<?php echo $id_type . "_2"; ?>">Image</label>
120
+ <input type="hidden" name="<?php echo $name_type; ?>" id="<?php echo $id_type; ?>" value="<?php echo $instance['type']; ?>" class="bwg_hidden" />
121
  </p>
122
  <p id="p_show_name" style="display:<?php echo ($instance['type'] == 'image') ? "" : "none" ?>;">
123
  <label>Show Tag Names:</label>
124
+ <input type="radio" name="<?php echo $name_show_name; ?>" id="<?php echo $id_show_name . "_1"; ?>" value="1" <?php if ($instance['show_name']) echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "1");' /><label for="<?php echo $id_show_name . "_1"; ?>">Yes</label>
125
+ <input type="radio" name="<?php echo $name_show_name; ?>" id="<?php echo $id_show_name . "_0"; ?>" value="0" <?php if (!$instance['show_name']) echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "0");' /><label for="<?php echo $id_show_name . "_0"; ?>">No</label>
126
+ <input type="hidden" name="<?php echo $name_show_name; ?>" id="<?php echo $id_show_name; ?>" value="<?php echo $instance['show_name']; ?>" class="bwg_hidden" />
127
+ </p>
128
+ <p>
129
+ <label>Open in: </label>
130
+ <input type="radio" name="<?php echo $name_open_option; ?>" id="<?php echo $id_open_option . "_1"; ?>" value="page" <?php if ($instance['open_option'] == 'page') echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "page");' /><label for="<?php echo $id_open_option . "_1"; ?>"> page</label>
131
+ <input type="radio" name="<?php echo $name_open_option; ?>" id="<?php echo $id_open_option . "_0"; ?>" value="lightbox" <?php if ($instance['open_option'] == 'lightbox') echo 'checked="checked"'; ?> onclick='jQuery(this).nextAll(".bwg_hidden").first().attr("value", "lightbox");' /><label for="<?php echo $id_open_option . "_0"; ?>"> lightbox</label>
132
+ <input type="hidden" name="<?php echo $name_open_option; ?>" id="<?php echo $id_open_option; ?>" value="<?php echo $instance['open_option']; ?>" class="bwg_hidden" />
133
  </p>
134
  <p>
135
  <label for="<?php echo $id_count; ?>">Number (0 for all):</label>
143
  <p>
144
  <label>Transparent Background:</label>
145
  <input type="radio" name="<?php echo $name_background_transparent; ?>" id="<?php echo $id_background_transparent . "_1"; ?>" value="1" <?php if ($instance['background_transparent']) echo 'checked="checked"'; ?> onclick="bwg_change_bg_transparency(event, this)" class="bg_transparent" /><label for="<?php echo $id_background_transparent . "_1"; ?>">Yes</label>
146
+ <input type="radio" name="<?php echo $name_background_transparent; ?>" id="<?php echo $id_background_transparent . "_0"; ?>" value="0" <?php if (!$instance['background_transparent']) echo 'checked="checked"'; ?> onclick="bwg_change_bg_transparency(event, this)" /><label for="<?php echo $id_background_transparent . "_0"; ?>">No</label>
147
+ <input type="hidden" name="<?php echo $name_background_transparent; ?>" id="<?php echo $id_background_transparent; ?>" value="<?php echo $instance['background_transparent']; ?>" class="bwg_hidden" />
148
  </p>
149
  <p id="p_bg_color" style="display:<?php echo (!$instance['background_transparent']) ? "" : "none" ?>;">
150
  <label for="<?php echo $id_background_color; ?>">Background Color:</label>
css/bwg_featured_plugins.css CHANGED
@@ -32,17 +32,18 @@
32
  border-bottom-right-radius:3px;
33
  }
34
 
35
- #main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url(images/form.jpg) left center no-repeat;}
36
- #main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url(images/catalog.jpg) left center no-repeat;}
37
- #main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url(images/contact.maker.jpg) left center no-repeat;}
38
- #main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url(images/contacts.jpg) left center no-repeat;}
39
- #main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url(images/facebook.jpg) left center no-repeat;}
40
- #main_featured_plugins_page #featured-plugins-list li.faq .product {background:url(images/faq.jpg) left center no-repeat;}
41
- #main_featured_plugins_page #featured-plugins-list li.flash-calendar .product {background:url(images/flash.calendar.jpg) left center no-repeat;}
42
- #main_featured_plugins_page #featured-plugins-list li.folder-menu .product {background:url(images/folder.menu.jpg) left center no-repeat;}
43
- #main_featured_plugins_page #featured-plugins-list li.player .product {background:url(images/player.jpg) left center no-repeat;}
44
- #main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url(images/spider.calendar.jpg) left center no-repeat;}
45
- #main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url(images/zoom.jpg) left center no-repeat;}
 
46
 
47
 
48
  #main_featured_plugins_page #featured-plugins-list li .title .heading {
32
  border-bottom-right-radius:3px;
33
  }
34
 
35
+ #main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url("images/form.jpg") left center no-repeat;}
36
+ #main_featured_plugins_page #featured-plugins-list li.twitter-widget .product {background:url("images/twitter-widget.jpg") left center no-repeat;}
37
+ #main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url("images/catalog.jpg") left center no-repeat;}
38
+ #main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url("images/contact.maker.jpg") left center no-repeat;}
39
+ #main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url("images/contacts.jpg") left center no-repeat;}
40
+ #main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url("images/facebook.jpg") left center no-repeat;}
41
+ #main_featured_plugins_page #featured-plugins-list li.faq .product {background:url("images/faq.jpg") left center no-repeat;}
42
+ #main_featured_plugins_page #featured-plugins-list li.flash-calendar .product {background:url("images/flash.calendar.jpg") left center no-repeat;}
43
+ #main_featured_plugins_page #featured-plugins-list li.folder-menu .product {background:url("images/folder.menu.jpg") left center no-repeat;}
44
+ #main_featured_plugins_page #featured-plugins-list li.player .product {background:url("images/player.jpg") left center no-repeat;}
45
+ #main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url("images/spider.calendar.jpg") left center no-repeat;}
46
+ #main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url("images/zoom.jpg") left center no-repeat;}
47
 
48
 
49
  #main_featured_plugins_page #featured-plugins-list li .title .heading {
css/bwg_frontend.css CHANGED
@@ -86,10 +86,10 @@ div[id^="bwg_container"] p {
86
  #spider_popup_left,
87
  #spider_popup_right {
88
  background: transparent url("../images/blank.gif") repeat scroll 0 0;
89
- bottom: 0;
90
  cursor: pointer;
91
  display: inline;
92
- height: 100%;
93
  outline: medium none;
94
  position: absolute;
95
  width: 35%;
86
  #spider_popup_left,
87
  #spider_popup_right {
88
  background: transparent url("../images/blank.gif") repeat scroll 0 0;
89
+ bottom: 35%;
90
  cursor: pointer;
91
  display: inline;
92
+ height: 30%;
93
  outline: medium none;
94
  position: absolute;
95
  width: 35%;
css/bwg_shortcode.css CHANGED
@@ -15,6 +15,11 @@
15
  font-size: 10px;
16
  }
17
 
 
 
 
 
 
18
  .spider_label {
19
  font-weight: bold;
20
  font-family: Verdana;
@@ -46,7 +51,7 @@
46
 
47
  .bwg_short_div {
48
  float: left;
49
- height: 400px;
50
  padding: 15px;
51
  width: 30%;
52
  }
15
  font-size: 10px;
16
  }
17
 
18
+ .bwg_short_div input[type=radio],
19
+ .bwg_short_div label {
20
+ vertical-align: middle;
21
+ }
22
+
23
  .spider_label {
24
  font-weight: bold;
25
  font-family: Verdana;
51
 
52
  .bwg_short_div {
53
  float: left;
54
+ height: 415px;
55
  padding: 15px;
56
  width: 30%;
57
  }
css/bwg_tables.css CHANGED
@@ -328,6 +328,16 @@
328
  margin: 5px 0;
329
  }
330
 
 
 
 
 
 
 
 
 
 
 
331
  .spider_delete_img {
332
  background-image: url("../images/delete.png");
333
  border: none;
@@ -470,3 +480,35 @@
470
  display: none;
471
  }
472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  margin: 5px 0;
329
  }
330
 
331
+ .buttons_div_left {
332
+ float: left;
333
+ margin: 5px 0;
334
+ }
335
+
336
+ .buttons_div_right {
337
+ float: right;
338
+ margin: 5px 0;
339
+ }
340
+
341
  .spider_delete_img {
342
  background-image: url("../images/delete.png");
343
  border: none;
480
  display: none;
481
  }
482
 
483
+ .bwg_add_video {
484
+ display: none;
485
+ padding: 10px;
486
+ height: 60px;
487
+ background-color: #FFFFFF;
488
+ border: 1px solid #999999;
489
+ top: 50%;
490
+ position: fixed;
491
+ left: 50%;
492
+ text-align: left;
493
+ z-index: 100000;
494
+ border-radius: 3px;
495
+ margin-left: -340px;
496
+ margin-top: -45px;
497
+ }
498
+
499
+ #add_video input[type="text"] {
500
+ width: 500px;
501
+ }
502
+
503
+ .bwg_opacity_video {
504
+ display: none;
505
+ background-color: #000000;
506
+ opacity: 0.75;
507
+ filter: Alpha(opacity=75);
508
+ position: fixed;
509
+ top: 0;
510
+ left: 0;
511
+ width: 100%;
512
+ height: 100%;
513
+ z-index: 99998;
514
+ }
css/font-awesome-4.0.1/font-awesome.css CHANGED
@@ -32,14 +32,15 @@
32
  font-weight: normal;
33
  font-style: normal;
34
  }
35
- .fa {
 
36
  display: inline-block;
37
- font-family: FontAwesome;
38
  font-style: normal;
39
  font-weight: normal;
40
- line-height: 1;
41
- -webkit-font-smoothing: antialiased;
42
- -moz-osx-font-smoothing: grayscale;
43
  }
44
  /* makes the font 33% larger relative to the icon container */
45
  .fa-lg {
32
  font-weight: normal;
33
  font-style: normal;
34
  }
35
+ #spider_popup_wrap .fa,
36
+ div[id^="bwg_container"] .fa {
37
  display: inline-block;
38
+ font-family: FontAwesome !important;
39
  font-style: normal;
40
  font-weight: normal;
41
+ line-height: 1 !important;
42
+ -webkit-font-smoothing: antialiased !important;
43
+ -moz-osx-font-smoothing: grayscale !important;
44
  }
45
  /* makes the font 33% larger relative to the icon container */
46
  .fa-lg {
css/images/twitter-widget.jpg ADDED
Binary file
filemanager/UploadHandler.php CHANGED
@@ -12,7 +12,7 @@
12
 
13
  $upload_handler = new UploadHandler(array(
14
  'upload_dir' => $_GET['dir'],
15
- 'accept_file_types' => '/\.(gif|jpe?g|png|bmp|mp4|flv|webm|ogg|mp3|wav|pdf)$/i'
16
  ));
17
 
18
  class UploadHandler {
@@ -582,6 +582,53 @@ class UploadHandler {
582
  }
583
  }
584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) {
586
  $file = new stdClass();
587
  $file->name = $this->get_file_name($name, $type, $index, $content_range);
@@ -624,6 +671,9 @@ class UploadHandler {
624
  if (is_int($img_width)) {
625
  $this->handle_image_file($file_path, $file);
626
  }
 
 
 
627
  }
628
  else {
629
  $file->size = $file_size;
12
 
13
  $upload_handler = new UploadHandler(array(
14
  'upload_dir' => $_GET['dir'],
15
+ 'accept_file_types' => '/\.(gif|jpe?g|png|bmp|mp4|flv|webm|ogg|mp3|wav|pdf|zip)$/i'
16
  ));
17
 
18
  class UploadHandler {
582
  }
583
  }
584
 
585
+ protected function handle_zip_file($file_path, $file) {
586
+ $zip = new ZipArchive;
587
+ $res = $zip->open($file_path);
588
+ if ($res === TRUE) {
589
+ $target_dir = substr($file_path, 0, strlen($file_path) - 4);
590
+ if (!is_dir($target_dir)) {
591
+ mkdir($target_dir, 0777);
592
+ }
593
+ $zip->extractTo($target_dir);
594
+ $zip->close();
595
+ $this->handle_directory($target_dir);
596
+ }
597
+ }
598
+
599
+ protected function handle_directory($target_dir) {
600
+ $extracted_files = scandir($target_dir);
601
+ if ($extracted_files) {
602
+ $temp_upload_dir = $this->options['upload_dir'];
603
+ $this->options['upload_dir'] = $target_dir . '/';
604
+ foreach ($extracted_files as $ex_file) {
605
+ if ($ex_file != '.' && $ex_file != '..') {
606
+ $ex_file = $target_dir . '/' . $ex_file;
607
+ if (is_file($ex_file)) {
608
+ $type = filetype($ex_file);
609
+ $name = basename($ex_file);
610
+ $index = null;
611
+ $content_range = null;
612
+ $size = $this->get_file_size($ex_file);
613
+ $file = new stdClass();
614
+ $file->name = $name;
615
+ $file->size = $this->fix_integer_overflow(intval($size));
616
+ $file->type = $type;
617
+ $file->url = $this->get_download_url($file->name);
618
+ list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
619
+ if (is_int($img_width)) {
620
+ $this->handle_image_file($ex_file, $file);
621
+ }
622
+ }
623
+ elseif (is_dir($ex_file)) {
624
+ $this->handle_directory($ex_file);
625
+ }
626
+ }
627
+ }
628
+ $this->options['upload_dir'] = $temp_upload_dir;
629
+ }
630
+ }
631
+
632
  protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) {
633
  $file = new stdClass();
634
  $file->name = $this->get_file_name($name, $type, $index, $content_range);
671
  if (is_int($img_width)) {
672
  $this->handle_image_file($file_path, $file);
673
  }
674
+ else {
675
+ $this->handle_zip_file($file_path, $file);
676
+ }
677
  }
678
  else {
679
  $file->size = $file_size;
filemanager/view.php CHANGED
@@ -51,10 +51,9 @@ class FilemanagerView {
51
  $clipboard_dest = $file_manager_data['session_data']['clipboard_dest'];
52
  $icons_dir_url = WD_BWG_URL . '/filemanager/images/file_icons';
53
  $sort_icon = $icons_dir_url . '/' . $sort_order;
 
 
54
  ?>
55
-
56
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/jquery.js"></script>
57
- <script language="javascript" type="text/javascript" src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/ui/jquery.ui.widget.min.js"></script>
58
  <script src="<?php echo WD_BWG_URL; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
59
  <script src="<?php echo WD_BWG_URL; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
60
  <script>
51
  $clipboard_dest = $file_manager_data['session_data']['clipboard_dest'];
52
  $icons_dir_url = WD_BWG_URL . '/filemanager/images/file_icons';
53
  $sort_icon = $icons_dir_url . '/' . $sort_order;
54
+ wp_print_scripts('jquery');
55
+ wp_print_scripts('jquery-ui-widget');
56
  ?>
 
 
 
57
  <script src="<?php echo WD_BWG_URL; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
58
  <script src="<?php echo WD_BWG_URL; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
59
  <script>
framework/WDWLibrary.php CHANGED
@@ -23,7 +23,7 @@ class WDWLibrary {
23
  ////////////////////////////////////////////////////////////////////////////////////////
24
  // Getters & Setters //
25
  ////////////////////////////////////////////////////////////////////////////////////////
26
- public static function get($key) {
27
  if (isset($_GET[$key])) {
28
  $value = $_GET[$key];
29
  }
@@ -33,9 +33,122 @@ class WDWLibrary {
33
  else {
34
  $value = '';
35
  }
 
 
 
36
  return esc_html($value);
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  public static function message($message, $type) {
40
  return '<div style="width:95%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
41
  }
23
  ////////////////////////////////////////////////////////////////////////////////////////
24
  // Getters & Setters //
25
  ////////////////////////////////////////////////////////////////////////////////////////
26
+ public static function get($key, $default_value = '') {
27
  if (isset($_GET[$key])) {
28
  $value = $_GET[$key];
29
  }
33
  else {
34
  $value = '';
35
  }
36
+ if (!$value) {
37
+ $value = $default_value;
38
+ }
39
  return esc_html($value);
40
  }
41
 
42
+ public static function message_id($message_id) {
43
+ if ($message_id) {
44
+ switch($message_id) {
45
+ case 1: {
46
+ $message = 'Item Succesfully Saved.';
47
+ $type = 'updated';
48
+ break;
49
+
50
+ }
51
+ case 2: {
52
+ $message = 'Error. Please install plugin again.';
53
+ $type = 'error';
54
+ break;
55
+
56
+ }
57
+ case 3: {
58
+ $message = 'Item Succesfully Deleted.';
59
+ $type = 'updated';
60
+ break;
61
+
62
+ }
63
+ case 4: {
64
+ $message = "You can't delete default theme";
65
+ $type = 'error';
66
+ break;
67
+
68
+ }
69
+ case 5: {
70
+ $message = 'Items Succesfully Deleted.';
71
+ $type = 'updated';
72
+ break;
73
+
74
+ }
75
+ case 6: {
76
+ $message = 'You must select at least one item.';
77
+ $type = 'error';
78
+ break;
79
+
80
+ }
81
+ case 7: {
82
+ $message = 'The item is successfully set as default.';
83
+ $type = 'updated';
84
+ break;
85
+
86
+ }
87
+ case 8: {
88
+ $message = 'Options Succesfully Saved.';
89
+ $type = 'updated';
90
+ break;
91
+
92
+ }
93
+ case 9: {
94
+ $message = 'Item Succesfully Published.';
95
+ $type = 'updated';
96
+ break;
97
+
98
+ }
99
+ case 10: {
100
+ $message = 'Items Succesfully Published.';
101
+ $type = 'updated';
102
+ break;
103
+
104
+ }
105
+ case 11: {
106
+ $message = 'Item Succesfully Unpublished.';
107
+ $type = 'updated';
108
+ break;
109
+
110
+ }
111
+ case 12: {
112
+ $message = 'Items Succesfully Unpublished.';
113
+ $type = 'updated';
114
+ break;
115
+
116
+ }
117
+ case 13: {
118
+ $message = 'Ordering Succesfully Saved.';
119
+ $type = 'updated';
120
+ break;
121
+
122
+ }
123
+ case 14: {
124
+ $message = 'A term with the name provided already exists.';
125
+ $type = 'error';
126
+ break;
127
+
128
+ }
129
+ case 15: {
130
+ $message = 'Name field is required.';
131
+ $type = 'error';
132
+ break;
133
+
134
+ }
135
+ case 16: {
136
+ $message = 'The slug must be unique.';
137
+ $type = 'error';
138
+ break;
139
+
140
+ }
141
+ case 17: {
142
+ $message = 'Changes must be saved.';
143
+ $type = 'error';
144
+ break;
145
+
146
+ }
147
+ }
148
+ return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
149
+ }
150
+ }
151
+
152
  public static function message($message, $type) {
153
  return '<div style="width:95%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
154
  }
frontend/models/BWGModelGalleryBox.php CHANGED
@@ -41,7 +41,7 @@ class BWGModelGalleryBox {
41
  return $row;
42
  }
43
 
44
- public function get_image_rows_data($gallery_id, $sort_by) {
45
  global $wpdb;
46
  if ($sort_by == 'size' || $sort_by == 'resolution') {
47
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
@@ -49,7 +49,7 @@ class BWGModelGalleryBox {
49
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
50
  $sort_by = '`order`';
51
  }
52
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ASC', $gallery_id));
53
  return $row;
54
  }
55
 
41
  return $row;
42
  }
43
 
44
+ public function get_image_rows_data($gallery_id, $sort_by, $order_by = 'asc') {
45
  global $wpdb;
46
  if ($sort_by == 'size' || $sort_by == 'resolution') {
47
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
49
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
50
  $sort_by = '`order`';
51
  }
52
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $gallery_id));
53
  return $row;
54
  }
55
 
frontend/models/BWGModelImage_browser.php CHANGED
@@ -30,7 +30,7 @@ class BWGModelImage_browser {
30
  return $row;
31
  }
32
 
33
- public function get_image_rows_data($id, $images_per_page, $sort_by, $bwg) {
34
  global $wpdb;
35
  if ($sort_by == 'size' || $sort_by == 'resolution') {
36
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
@@ -50,7 +50,7 @@ class BWGModelImage_browser {
50
  else {
51
  $limit_str = '';
52
  }
53
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ASC ' . $limit_str, $id));
54
  return $row;
55
  }
56
 
30
  return $row;
31
  }
32
 
33
+ public function get_image_rows_data($id, $images_per_page, $sort_by, $order_by = 'asc', $bwg) {
34
  global $wpdb;
35
  if ($sort_by == 'size' || $sort_by == 'resolution') {
36
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
50
  else {
51
  $limit_str = '';
52
  }
53
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by . ' ' . $limit_str, $id));
54
  return $row;
55
  }
56
 
frontend/models/BWGModelSlideshow.php CHANGED
@@ -35,7 +35,7 @@ class BWGModelSlideshow {
35
  return $row;
36
  }
37
 
38
- public function get_image_rows_data($id, $sort_by, $bwg) {
39
  global $wpdb;
40
  if ($sort_by == 'size' || $sort_by == 'resolution') {
41
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
@@ -43,7 +43,7 @@ class BWGModelSlideshow {
43
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
44
  $sort_by = '`order`';
45
  }
46
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ASC', $id));
47
  return $row;
48
  }
49
 
35
  return $row;
36
  }
37
 
38
+ public function get_image_rows_data($id, $sort_by, $order_by = 'asc', $bwg) {
39
  global $wpdb;
40
  if ($sort_by == 'size' || $sort_by == 'resolution') {
41
  $sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
43
  elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
44
  $sort_by = '`order`';
45
  }
46
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $id));
47
  return $row;
48
  }
49
 
frontend/models/BWGModelThumbnails.php CHANGED
@@ -59,7 +59,7 @@ class BWGModelThumbnails {
59
  $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY ' . $sort_by . $sort_direction, $id));
60
  }
61
  else {
62
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . $sort_direction . $limit_str, $id));
63
  }
64
  return $row;
65
  }
59
  $row = $wpdb->get_results($wpdb->prepare('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY ' . $sort_by . $sort_direction, $id));
60
  }
61
  else {
62
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $sort_direction . ' ' . $limit_str, $id));
63
  }
64
  return $row;
65
  }
frontend/models/BWGModelWidget.php CHANGED
@@ -20,7 +20,7 @@ class BWGModelWidgetFrontEnd {
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function get_tags_data($count) {
22
  global $wpdb;
23
- $rows = $wpdb->get_results('SELECT image.thumb_url as thumb_url, image.id as image_id, tags.name, tags.slug, tags.term_id FROM ' . $wpdb->prefix . 'terms AS tags INNER JOIN ' . $wpdb->prefix . 'term_taxonomy AS taxonomy ON taxonomy.term_id=tags.term_id INNER JOIN (SELECT image.thumb_url, tag.tag_id, image.id FROM ' . $wpdb->prefix . 'bwg_image AS image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag AS tag ON image.id=tag.image_id ORDER BY RAND()) AS image ON image.tag_id=tags.term_id WHERE taxonomy.taxonomy="bwg_tag" GROUP BY tags.term_id' . ($count ? ' LIMIT ' . $count : ""));
24
  foreach ($rows as $row) {
25
  $row->permalink = $this->bwg_create_post($row->name, $row->slug, "tag", $row->term_id);
26
  }
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function get_tags_data($count) {
22
  global $wpdb;
23
+ $rows = $wpdb->get_results('SELECT image.thumb_url as thumb_url, image.id as image_id, tags.name, tags.slug, tags.term_id, image.filetype FROM ' . $wpdb->prefix . 'terms AS tags INNER JOIN ' . $wpdb->prefix . 'term_taxonomy AS taxonomy ON taxonomy.term_id=tags.term_id INNER JOIN (SELECT image.thumb_url, tag.tag_id, image.id, image.filetype FROM ' . $wpdb->prefix . 'bwg_image AS image INNER JOIN ' . $wpdb->prefix . 'bwg_image_tag AS tag ON image.id=tag.image_id ORDER BY RAND()) AS image ON image.tag_id=tags.term_id WHERE taxonomy.taxonomy="bwg_tag" GROUP BY tags.term_id' . ($count ? ' LIMIT ' . $count : ""));
24
  foreach ($rows as $row) {
25
  $row->permalink = $this->bwg_create_post($row->name, $row->slug, "tag", $row->term_id);
26
  }
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -34,6 +34,9 @@ class BWGViewAlbum_compact_preview {
34
  if (!isset($params['popup_fullscreen'])) {
35
  $params['popup_fullscreen'] = 0;
36
  }
 
 
 
37
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
38
  $type = (isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
39
  $sort_direction = ' ASC ';
@@ -397,6 +400,11 @@ class BWGViewAlbum_compact_preview {
397
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
398
  WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id']);
399
  }
 
 
 
 
 
400
  ?>
401
  <div id="bwg_album_compact_<?php echo $bwg; ?>" class="<?php echo $album_gallery_div_class; ?>">
402
  <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;">
@@ -405,13 +413,6 @@ class BWGViewAlbum_compact_preview {
405
  <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="float: none; width:50px;">
406
  </span>
407
  </div>
408
- <?php
409
- if ($bwg_previous_album_id) {
410
- ?>
411
- <a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', 'bwg_album_compact_<?php echo $bwg; ?>', 'back')"><?php echo __('Back', 'bwg'); ?></a>
412
- <?php
413
- }
414
- ?>
415
  <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; ?>" />
416
  <input type="hidden" id="bwg_previous_album_page_number_<?php echo $bwg; ?>" name="bwg_previous_album_page_number_<?php echo $bwg; ?>" value="<?php echo $bwg_previous_album_page_number; ?>" />
417
  <?php
@@ -466,6 +467,17 @@ class BWGViewAlbum_compact_preview {
466
  ?>
467
  <a style="font-size: 0;" <?php echo ($from !== "widget" ? "onclick=\"spider_frontend_ajax('gal_front_form_" . $bwg . "', '" . $bwg . "', 'bwg_album_compact_" . $bwg . "', '" . $album_galallery_row->alb_gal_id . "', '" . $album_gallery_id . "', '" . $def_type . "')\"" : "href='" . $permalink . "'") ?>>
468
  <span class="bwg_album_thumb_<?php echo $bwg; ?>">
 
 
 
 
 
 
 
 
 
 
 
469
  <span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
470
  <span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
471
  <img style="padding: 0 !important; max-height: none !important; max-width: none !important; width: <?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" src="<?php echo $preview_url; ?>" alt="<?php echo $title; ?>" />
@@ -483,7 +495,7 @@ class BWGViewAlbum_compact_preview {
483
  </span>
484
  </span>
485
  <?php
486
- if ($params['compuct_album_title'] == 'show') {
487
  ?>
488
  <span class="bwg_title_spun1_<?php echo $bwg; ?>">
489
  <span class="bwg_title_spun2_<?php echo $bwg; ?>">
@@ -515,6 +527,7 @@ class BWGViewAlbum_compact_preview {
515
  'thumb_width' => $params['compuct_album_image_thumb_width'],
516
  'thumb_height' => $params['compuct_album_image_thumb_height'],
517
  'open_with_fullscreen' => $params['popup_fullscreen'],
 
518
  'image_width' => $params['popup_width'],
519
  'image_height' => $params['popup_height'],
520
  'image_effect' => $params['popup_effect'],
@@ -547,7 +560,14 @@ class BWGViewAlbum_compact_preview {
547
  $params_array['watermark_width'] = $params['watermark_width'];
548
  $params_array['watermark_height'] = $params['watermark_height'];
549
  }
550
- list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
 
 
 
 
 
 
 
551
  $scale = max($params['compuct_album_image_thumb_width'] / $image_thumb_width, $params['compuct_album_image_thumb_height'] / $image_thumb_height);
552
  $image_thumb_width *= $scale;
553
  $image_thumb_height *= $scale;
@@ -556,9 +576,20 @@ class BWGViewAlbum_compact_preview {
556
  ?>
557
  <a style="font-size: 0;" onclick="spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5); return false;">
558
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
 
 
 
 
 
 
 
 
 
 
 
559
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
560
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
561
- <img style="max-height:none; max-width:none; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
562
  <?php
563
  if ($params['compuct_album_image_title'] == 'hover') {
564
  ?>
@@ -573,7 +604,7 @@ class BWGViewAlbum_compact_preview {
573
  </span>
574
  </span>
575
  <?php
576
- if ($params['compuct_album_image_title'] == 'show') {
577
  ?>
578
  <span class="bwg_image_title_spun1_<?php echo $bwg; ?>">
579
  <span class="bwg_image_title_spun2_<?php echo $bwg; ?>">
34
  if (!isset($params['popup_fullscreen'])) {
35
  $params['popup_fullscreen'] = 0;
36
  }
37
+ if (!isset($params['popup_autoplay'])) {
38
+ $params['popup_autoplay'] = 0;
39
+ }
40
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
41
  $type = (isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
42
  $sort_direction = ' ASC ';
400
  if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
401
  WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id']);
402
  }
403
+ if ($bwg_previous_album_id) {
404
+ ?>
405
+ <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')"><?php echo __('Back', 'bwg'); ?></a>
406
+ <?php
407
+ }
408
  ?>
409
  <div id="bwg_album_compact_<?php echo $bwg; ?>" class="<?php echo $album_gallery_div_class; ?>">
410
  <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;">
413
  <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="float: none; width:50px;">
414
  </span>
415
  </div>
 
 
 
 
 
 
 
416
  <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; ?>" />
417
  <input type="hidden" id="bwg_previous_album_page_number_<?php echo $bwg; ?>" name="bwg_previous_album_page_number_<?php echo $bwg; ?>" value="<?php echo $bwg_previous_album_page_number; ?>" />
418
  <?php
467
  ?>
468
  <a style="font-size: 0;" <?php echo ($from !== "widget" ? "onclick=\"spider_frontend_ajax('gal_front_form_" . $bwg . "', '" . $bwg . "', 'bwg_album_compact_" . $bwg . "', '" . $album_galallery_row->alb_gal_id . "', '" . $album_gallery_id . "', '" . $def_type . "')\"" : "href='" . $permalink . "'") ?>>
469
  <span class="bwg_album_thumb_<?php echo $bwg; ?>">
470
+ <?php
471
+ if ($params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
472
+ ?>
473
+ <span class="bwg_title_spun1_<?php echo $bwg; ?>">
474
+ <span class="bwg_title_spun2_<?php echo $bwg; ?>">
475
+ <?php echo $title; ?>
476
+ </span>
477
+ </span>
478
+ <?php
479
+ }
480
+ ?>
481
  <span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
482
  <span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
483
  <img style="padding: 0 !important; max-height: none !important; max-width: none !important; width: <?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" src="<?php echo $preview_url; ?>" alt="<?php echo $title; ?>" />
495
  </span>
496
  </span>
497
  <?php
498
+ if ($params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'bottom') {
499
  ?>
500
  <span class="bwg_title_spun1_<?php echo $bwg; ?>">
501
  <span class="bwg_title_spun2_<?php echo $bwg; ?>">
527
  'thumb_width' => $params['compuct_album_image_thumb_width'],
528
  'thumb_height' => $params['compuct_album_image_thumb_height'],
529
  'open_with_fullscreen' => $params['popup_fullscreen'],
530
+ 'open_with_autoplay' => $params['popup_autoplay'],
531
  'image_width' => $params['popup_width'],
532
  'image_height' => $params['popup_height'],
533
  'image_effect' => $params['popup_effect'],
560
  $params_array['watermark_width'] = $params['watermark_width'];
561
  $params_array['watermark_height'] = $params['watermark_height'];
562
  }
563
+ $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
564
+ if (!$is_video) {
565
+ list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
566
+ }
567
+ else {
568
+ $image_thumb_width = $params['compuct_album_image_thumb_width'];
569
+ $image_thumb_height = $params['compuct_album_image_thumb_height'];
570
+ }
571
  $scale = max($params['compuct_album_image_thumb_width'] / $image_thumb_width, $params['compuct_album_image_thumb_height'] / $image_thumb_height);
572
  $image_thumb_width *= $scale;
573
  $image_thumb_height *= $scale;
576
  ?>
577
  <a style="font-size: 0;" onclick="spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5); return false;">
578
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
579
+ <?php
580
+ if ($params['compuct_album_image_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
581
+ ?>
582
+ <span class="bwg_image_title_spun1_<?php echo $bwg; ?>">
583
+ <span class="bwg_image_title_spun2_<?php echo $bwg; ?>">
584
+ <?php echo $image_row->alt; ?>
585
+ </span>
586
+ </span>
587
+ <?php
588
+ }
589
+ ?>
590
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
591
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
592
+ <img style="max-height:none; max-width:none; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo ($is_video ? "" : site_url() . '/' . $WD_BWG_UPLOAD_DIR) . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
593
  <?php
594
  if ($params['compuct_album_image_title'] == 'hover') {
595
  ?>
604
  </span>
605
  </span>
606
  <?php
607
+ if ($params['compuct_album_image_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'bottom') {
608
  ?>
609
  <span class="bwg_image_title_spun1_<?php echo $bwg; ?>">
610
  <span class="bwg_image_title_spun2_<?php echo $bwg; ?>">
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -34,6 +34,9 @@ class BWGViewAlbum_extended_preview {
34
  if (!isset($params['popup_fullscreen'])) {
35
  $params['popup_fullscreen'] = 0;
36
  }
 
 
 
37
  $theme_row = $this->model->get_theme_row_data($params['theme_id']);
38
  if (!$theme_row) {
39
  echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
@@ -79,8 +82,8 @@ class BWGViewAlbum_extended_preview {
79
  ?>
80
  <style>
81
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
82
- -moz-box-sizing: border-box;
83
- box-sizing: border-box;
84
  }
85
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> {
86
  display: block;
@@ -407,6 +410,11 @@ class BWGViewAlbum_extended_preview {
407
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
408
  WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id']);
409
  }
 
 
 
 
 
410
  ?>
411
  <div id="bwg_album_extended_<?php echo $bwg; ?>" class="<?php echo $album_gallery_div_class; ?>">
412
  <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;">
@@ -415,13 +423,6 @@ class BWGViewAlbum_extended_preview {
415
  <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="float: none; width:50px;">
416
  </span>
417
  </div>
418
- <?php
419
- if ($bwg_previous_album_id) {
420
- ?>
421
- <a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', 'bwg_album_extended_<?php echo $bwg; ?>', 'back')"><?php echo __('Back', 'bwg'); ?></a>
422
- <?php
423
- }
424
- ?>
425
  <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; ?>" />
426
  <input type="hidden" id="bwg_previous_album_page_number_<?php echo $bwg; ?>" name="bwg_previous_album_page_number_<?php echo $bwg; ?>" value="<?php echo $bwg_previous_album_page_number; ?>" />
427
  <?php
@@ -545,6 +546,7 @@ class BWGViewAlbum_extended_preview {
545
  'thumb_width' => $params['extended_album_image_thumb_width'],
546
  'thumb_height' => $params['extended_album_image_thumb_height'],
547
  'open_with_fullscreen' => $params['popup_fullscreen'],
 
548
  'image_width' => $params['popup_width'],
549
  'image_height' => $params['popup_height'],
550
  'image_effect' => $params['popup_effect'],
@@ -577,7 +579,14 @@ class BWGViewAlbum_extended_preview {
577
  $params_array['watermark_width'] = $params['watermark_width'];
578
  $params_array['watermark_height'] = $params['watermark_height'];
579
  }
580
- list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
 
 
 
 
 
 
 
581
  $scale = max($params['extended_album_image_thumb_width'] / $image_thumb_width, $params['extended_album_image_thumb_height'] / $image_thumb_height);
582
  $image_thumb_width *= $scale;
583
  $image_thumb_height *= $scale;
@@ -588,7 +597,7 @@ class BWGViewAlbum_extended_preview {
588
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
589
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
590
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
591
- <img style="max-height:none; max-width:none; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
592
  <?php
593
  if ($params['extended_album_image_title'] == 'hover') {
594
  ?>
34
  if (!isset($params['popup_fullscreen'])) {
35
  $params['popup_fullscreen'] = 0;
36
  }
37
+ if (!isset($params['popup_autoplay'])) {
38
+ $params['popup_autoplay'] = 0;
39
+ }
40
  $theme_row = $this->model->get_theme_row_data($params['theme_id']);
41
  if (!$theme_row) {
42
  echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
82
  ?>
83
  <style>
84
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
85
+ -moz-box-sizing: border-box;
86
+ box-sizing: border-box;
87
  }
88
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> {
89
  display: block;
410
  if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
411
  WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id']);
412
  }
413
+ if ($bwg_previous_album_id) {
414
+ ?>
415
+ <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')"><?php echo __('Back', 'bwg'); ?></a>
416
+ <?php
417
+ }
418
  ?>
419
  <div id="bwg_album_extended_<?php echo $bwg; ?>" class="<?php echo $album_gallery_div_class; ?>">
420
  <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;">
423
  <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="float: none; width:50px;">
424
  </span>
425
  </div>
 
 
 
 
 
 
 
426
  <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; ?>" />
427
  <input type="hidden" id="bwg_previous_album_page_number_<?php echo $bwg; ?>" name="bwg_previous_album_page_number_<?php echo $bwg; ?>" value="<?php echo $bwg_previous_album_page_number; ?>" />
428
  <?php
546
  'thumb_width' => $params['extended_album_image_thumb_width'],
547
  'thumb_height' => $params['extended_album_image_thumb_height'],
548
  'open_with_fullscreen' => $params['popup_fullscreen'],
549
+ 'open_with_autoplay' => $params['popup_autoplay'],
550
  'image_width' => $params['popup_width'],
551
  'image_height' => $params['popup_height'],
552
  'image_effect' => $params['popup_effect'],
579
  $params_array['watermark_width'] = $params['watermark_width'];
580
  $params_array['watermark_height'] = $params['watermark_height'];
581
  }
582
+ $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
583
+ if (!$is_video) {
584
+ list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
585
+ }
586
+ else {
587
+ $image_thumb_width = $params['extended_album_image_thumb_width'];
588
+ $image_thumb_height = $params['extended_album_image_thumb_height'];
589
+ }
590
  $scale = max($params['extended_album_image_thumb_width'] / $image_thumb_width, $params['extended_album_image_thumb_height'] / $image_thumb_height);
591
  $image_thumb_width *= $scale;
592
  $image_thumb_height *= $scale;
597
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
598
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
599
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
600
+ <img style="max-height:none; max-width:none; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo ($is_video ? "" : site_url() . '/' . $WD_BWG_UPLOAD_DIR) . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
601
  <?php
602
  if ($params['extended_album_image_title'] == 'hover') {
603
  ?>
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -34,10 +34,12 @@ class BWGViewGalleryBox {
34
  $thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 120);
35
  $thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90);
36
  $open_with_fullscreen = (isset($_GET['open_with_fullscreen']) ? esc_html($_GET['open_with_fullscreen']) : 0);
 
37
  $image_width = (isset($_GET['image_width']) ? esc_html($_GET['image_width']) : 800);
38
  $image_height = (isset($_GET['image_height']) ? esc_html($_GET['image_height']) : 500);
39
  $image_effect = ((isset($_GET['image_effect']) && esc_html($_GET['image_effect'])) ? esc_html($_GET['image_effect']) : 'fade');
40
  $sort_by = (isset($_GET['sort_by']) ? esc_html($_GET['sort_by']) : 'order');
 
41
  $enable_image_filmstrip = FALSE;
42
  $enable_image_fullscreen = (isset($_GET['enable_image_fullscreen']) ? esc_html($_GET['enable_image_fullscreen']) : 0);
43
 
@@ -78,7 +80,7 @@ class BWGViewGalleryBox {
78
  $image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by);
79
  }
80
  else {
81
- $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by);
82
  }
83
  $image_id = (isset($_POST['image_id']) ? (int) $_POST['image_id'] : $current_image_id);
84
  $comment_rows = $this->model->get_comment_rows_data($image_id);
@@ -95,6 +97,7 @@ class BWGViewGalleryBox {
95
  'image_height' => $image_height,
96
  'image_effect' => $image_effect,
97
  'sort_by' => $sort_by,
 
98
  'enable_image_filmstrip' => $enable_image_filmstrip,
99
  'image_filmstrip_height' => $image_filmstrip_height,
100
  'enable_image_ctrl_btn' => $enable_image_ctrl_btn,
@@ -124,6 +127,24 @@ class BWGViewGalleryBox {
124
  $params_array['watermark_height'] = $watermark_height;
125
  }
126
  $popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  ?>
128
  <style>
129
  .spider_popup_wrap * {
@@ -151,6 +172,12 @@ class BWGViewGalleryBox {
151
  max-height: <?php echo $image_height - $image_filmstrip_height; ?>px;
152
  vertical-align: middle;
153
  }
 
 
 
 
 
 
154
  .bwg_ctrl_btn {
155
  color: #<?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
156
  font-size: <?php echo $theme_row->lightbox_ctrl_btn_height; ?>px;
@@ -297,6 +324,7 @@ class BWGViewGalleryBox {
297
  position: absolute;
298
  right: 0;
299
  top: 0;
 
300
  }
301
  .bwg_comment_container {
302
  -moz-box-sizing: border-box;
@@ -443,7 +471,7 @@ class BWGViewGalleryBox {
443
  margin: 0 auto;
444
  overflow: hidden;
445
  position: relative;
446
- width: <?php echo ($image_filmstrip_width + 2) * count($image_rows); ?>px;
447
  }
448
  .bwg_filmstrip_thumbnail {
449
  position: relative;
@@ -651,19 +679,60 @@ class BWGViewGalleryBox {
651
  }
652
  $current_pos = 0;
653
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  <div id="bwg_image_container" class="bwg_image_container">
655
  <div class="bwg_slide_container">
656
  <div class="bwg_slide_bg">
657
  <div class="bwg_slider">
658
  <?php
659
  foreach ($image_rows as $key => $image_row) {
 
660
  if ($image_row->id == $current_image_id) {
661
  $current_key = $key;
662
  ?>
663
  <span class="bwg_popup_image_spun" id="image_id_<?php echo $image_row->id; ?>">
664
  <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
665
  <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
666
- <img id="bwg_popup_image" class="bwg_popup_image" 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; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
667
  </span>
668
  </span>
669
  </span>
@@ -681,7 +750,19 @@ class BWGViewGalleryBox {
681
  <span class="bwg_popup_image_second_spun" id="image_id_<?php echo $image_row->id; ?>">
682
  <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
683
  <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
684
- <img id="bwg_popup_image_second" class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
685
  </span>
686
  </span>
687
  </span>
@@ -695,34 +776,6 @@ class BWGViewGalleryBox {
695
  <a id="spider_popup_left" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data); return false;"><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>
696
  <a id="spider_popup_right" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data); return false;"><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>
697
  </div>
698
- <?php
699
- if ($watermark_type != 'none') {
700
- ?>
701
- <div class="bwg_image_container">
702
- <div class="bwg_watermark_container">
703
- <div style="display:table; margin:0 auto;">
704
- <span class="bwg_watermark_spun" id="bwg_watermark_container">
705
- <?php
706
- if ($watermark_type == 'image') {
707
- ?>
708
- <a href="<?php echo $watermark_link; ?>" target="_blank">
709
- <img class="bwg_watermark_image bwg_watermark" src="<?php echo $watermark_url; ?>" />
710
- </a>
711
- <?php
712
- }
713
- elseif ($watermark_type == 'text') {
714
- ?>
715
- <a class="bwg_none_selectable bwg_watermark_text bwg_watermark" target="_blank" href="<?php echo $watermark_link; ?>"><?php echo $watermark_text; ?></a>
716
- <?php
717
- }
718
- ?>
719
- </span>
720
- </div>
721
- </div>
722
- </div>
723
- <?php
724
- }
725
- ?>
726
  </div>
727
  <a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
728
 
@@ -740,7 +793,10 @@ class BWGViewGalleryBox {
740
  jQuery(".bwg_slider").children().each(function() {
741
  if (jQuery(this).css("zIndex") == 2) {
742
  var bwg_current_image_span = jQuery(this).find("img");
743
- var width = jQuery(this).find("img").width();
 
 
 
744
  var height = bwg_current_image_span.height();
745
  jQuery(".bwg_watermark_spun").width(width);
746
  jQuery(".bwg_watermark_spun").height(height);
@@ -1072,6 +1128,11 @@ class BWGViewGalleryBox {
1072
  jQuery('meta[name="bwg_title"]').attr("content", "");
1073
  });*/
1074
  function bwg_change_image(current_key, key, data, from_effect) {
 
 
 
 
 
1075
  if (data[key]) {
1076
  if (jQuery('.bwg_ctrl_btn').hasClass('fa-pause')) {
1077
  clearInterval(bwg_playInterval);
@@ -1189,6 +1250,9 @@ class BWGViewGalleryBox {
1189
  jQuery(".bwg_popup_image").css({
1190
  maxHeight: <?php echo $image_height - $image_filmstrip_height; ?>
1191
  });
 
 
 
1192
  bwg_popup_current_height = <?php echo $image_height; ?>;
1193
  }
1194
  else {
@@ -1202,6 +1266,9 @@ class BWGViewGalleryBox {
1202
  jQuery(".bwg_popup_image").css({
1203
  maxHeight: jQuery(window).height() - <?php echo $image_filmstrip_height; ?>
1204
  });
 
 
 
1205
  bwg_popup_current_height = jQuery(window).height();
1206
  }
1207
  if (jQuery(window).width() >= <?php echo $image_width; ?> && <?php echo $open_with_fullscreen; ?> != 1 ) {
@@ -1215,6 +1282,9 @@ class BWGViewGalleryBox {
1215
  jQuery(".bwg_popup_image").css({
1216
  maxWidth: <?php echo $image_width; ?> - comment_container_width
1217
  });
 
 
 
1218
  jQuery(".bwg_filmstrip_container").css({width: <?php echo $image_width; ?> - comment_container_width});
1219
  jQuery(".bwg_filmstrip").css({width: (<?php echo $image_width; ?> - comment_container_width- 40)});
1220
  bwg_popup_current_width = <?php echo $image_width; ?>;
@@ -1230,6 +1300,9 @@ class BWGViewGalleryBox {
1230
  jQuery(".bwg_popup_image").css({
1231
  maxWidth: jQuery(window).width() - comment_container_width
1232
  });
 
 
 
1233
  jQuery(".bwg_filmstrip_container").css({width: (jQuery(window).width() - comment_container_width)});
1234
  jQuery(".bwg_filmstrip").css({width: (jQuery(window).width() - comment_container_width - 40)});
1235
  bwg_popup_current_width = jQuery(window).width();
@@ -1273,6 +1346,12 @@ class BWGViewGalleryBox {
1273
  duration: 500,
1274
  complete: function () { bwg_change_watermark_container(); }
1275
  });
 
 
 
 
 
 
1276
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(".spider_popup_wrap").width()}, 500);
1277
  jQuery(".bwg_filmstrip").animate({width: jQuery(".spider_popup_wrap").width() - 40}, 500);
1278
  /* Set filmstrip initial position.*/
@@ -1308,6 +1387,12 @@ class BWGViewGalleryBox {
1308
  duration: 500,
1309
  complete: function () { bwg_change_watermark_container(); }
1310
  });
 
 
 
 
 
 
1311
  jQuery(".bwg_filmstrip_container").css({width: jQuery("#spider_popup_wrap").width() - jQuery(".bwg_comment_container").width()});
1312
  jQuery(".bwg_filmstrip").animate({width: jQuery(".bwg_filmstrip_container").width() - 40}, 500);
1313
  /* Set filmstrip initial position.*/
@@ -1406,11 +1491,11 @@ class BWGViewGalleryBox {
1406
  jQuery( ".bwg_filmstrip_thumbnails" ).stop(true, false);
1407
  if (jQuery(".bwg_filmstrip_thumbnails").position().left >= -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width())) {
1408
  jQuery(".bwg_filmstrip_left").css({opacity: 1, filter: "Alpha(opacity=100)"});
1409
- if (jQuery(".bwg_filmstrip_thumbnails").position().left < -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width() - 2 - <?php echo $image_filmstrip_width; ?>)) {
1410
  jQuery(".bwg_filmstrip_thumbnails").animate({left: -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width())}, 500, 'linear');
1411
  }
1412
  else {
1413
- jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left - 2 - <?php echo $image_filmstrip_width; ?>)}, 500, 'linear');
1414
  }
1415
  }
1416
  /* Disable right arrow.*/
@@ -1424,11 +1509,11 @@ class BWGViewGalleryBox {
1424
  jQuery( ".bwg_filmstrip_thumbnails" ).stop(true, false);
1425
  if (jQuery(".bwg_filmstrip_thumbnails").position().left < 0) {
1426
  jQuery(".bwg_filmstrip_right").css({opacity: 1, filter: "Alpha(opacity=100)"});
1427
- if (jQuery(".bwg_filmstrip_thumbnails").position().left > -(2 + <?php echo $image_filmstrip_width; ?>)) {
1428
  jQuery(".bwg_filmstrip_thumbnails").animate({left: 0}, 500, 'linear');
1429
  }
1430
  else {
1431
- jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left + 2 + <?php echo $image_filmstrip_width; ?>)}, 500, 'linear');
1432
  }
1433
  }
1434
  /* Disable left arrow.*/
@@ -1505,6 +1590,18 @@ class BWGViewGalleryBox {
1505
  }
1506
  }
1507
  });
 
 
 
 
 
 
 
 
 
 
 
 
1508
  jQuery(".bwg_filmstrip_container").animate({width: bwg_popup_current_width - comment_container_width}, 500);
1509
  jQuery(".bwg_filmstrip").animate({width: bwg_popup_current_width - comment_container_width - 40}, 500);
1510
  /* Set filmstrip initial position.*/
@@ -1533,6 +1630,13 @@ class BWGViewGalleryBox {
1533
  duration: 500,
1534
  complete: function () { bwg_change_watermark_container(); }
1535
  });
 
 
 
 
 
 
 
1536
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(window).width() - comment_container_width}, 500);
1537
  jQuery(".bwg_filmstrip").animate({width: jQuery(window).width() - comment_container_width - 40}, 500);
1538
  /* Set filmstrip initial position.*/
@@ -1588,6 +1692,10 @@ class BWGViewGalleryBox {
1588
  maxWidth: bwg_popup_current_width - comment_container_width,
1589
  maxHeight: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>
1590
  });
 
 
 
 
1591
  /* Set watermark container size.*/
1592
  bwg_change_watermark_container();
1593
  jQuery(".bwg_filmstrip_container").css({width: bwg_popup_current_width - comment_container_width});
@@ -1604,45 +1712,51 @@ class BWGViewGalleryBox {
1604
  }
1605
  });
1606
  }
1607
- if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen) && jQuery.fullscreen.isFullScreen()) {
1608
- /* Exit Fullscreen.*/
1609
- jQuery.fullscreen.exit();
1610
- bwg_exit_fullscreen();
1611
- }
1612
- else {
1613
- /* Fullscreen.*/
1614
- jQuery("#spider_popup_wrap").fullscreen();
1615
- /*jQuery("#spider_popup_wrap").on("fscreenopen", function() {
1616
- if (jQuery.fullscreen.isFullScreen()) {*/
1617
- var screen_width = screen.width;
1618
- var screen_height = screen.height;
1619
- jQuery("#spider_popup_wrap").css({
1620
- width: screen_width,
1621
- height: screen_height,
1622
- left: 0,
1623
- top: 0,
1624
- margin: 0,
1625
- zIndex: 100000
1626
- });
1627
- jQuery(".bwg_image_wrap").css({width: screen_width - comment_container_width});
1628
- jQuery(".bwg_image_container").css({height: (screen_height - <?php echo $image_filmstrip_height; ?>)});
1629
- /* jQuery(".bwg_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
1630
- jQuery(".bwg_popup_image").css({
1631
- maxWidth: (screen_width - comment_container_width),
1632
- maxHeight: (screen_height - <?php echo $image_filmstrip_height; ?>)
1633
- });
1634
- /* Set watermark container size.*/
1635
- bwg_change_watermark_container();
1636
- jQuery(".bwg_filmstrip_container").css({width: (screen_width - comment_container_width)});
1637
- jQuery(".bwg_filmstrip").css({width: (screen_width - comment_container_width - 40)});
1638
- /* Set filmstrip initial position.*/
1639
- bwg_set_filmstrip_pos(screen_width - comment_container_width - 40);
1640
- jQuery(".bwg_resize-full").hide();
1641
- jQuery(".bwg_fullscreen").attr("class", "bwg_ctrl_btn bwg_fullscreen fa fa-resize-small");
1642
- jQuery(".bwg_fullscreen").attr("title", "<?php echo __('Exit Fullscreen', 'bwg'); ?>");
1643
- jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1644
- /*});
1645
- }*/
 
 
 
 
 
 
1646
  }
1647
  return false;
1648
  });
@@ -1661,6 +1775,16 @@ class BWGViewGalleryBox {
1661
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-play");
1662
  }
1663
  });
 
 
 
 
 
 
 
 
 
 
1664
  /* Open with fullscreen.*/
1665
  <?php
1666
  if ($open_with_fullscreen) {
@@ -1695,6 +1819,12 @@ class BWGViewGalleryBox {
1695
  }, {
1696
  complete: function () { bwg_change_watermark_container(); }
1697
  });
 
 
 
 
 
 
1698
  jQuery(".bwg_filmstrip_container").css({width: jQuery(window).width() - comment_container_width});
1699
  jQuery(".bwg_filmstrip").css({width: jQuery(window).width() - comment_container_width - 40});
1700
  /* Set filmstrip initial position.*/
34
  $thumb_width = (isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 120);
35
  $thumb_height = (isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90);
36
  $open_with_fullscreen = (isset($_GET['open_with_fullscreen']) ? esc_html($_GET['open_with_fullscreen']) : 0);
37
+ $open_with_autoplay = (isset($_GET['open_with_autoplay']) ? esc_html($_GET['open_with_autoplay']) : 0);
38
  $image_width = (isset($_GET['image_width']) ? esc_html($_GET['image_width']) : 800);
39
  $image_height = (isset($_GET['image_height']) ? esc_html($_GET['image_height']) : 500);
40
  $image_effect = ((isset($_GET['image_effect']) && esc_html($_GET['image_effect'])) ? esc_html($_GET['image_effect']) : 'fade');
41
  $sort_by = (isset($_GET['sort_by']) ? esc_html($_GET['sort_by']) : 'order');
42
+ $order_by = (isset($_GET['order_by']) ? esc_html($_GET['order_by']) : 'asc');
43
  $enable_image_filmstrip = FALSE;
44
  $enable_image_fullscreen = (isset($_GET['enable_image_fullscreen']) ? esc_html($_GET['enable_image_fullscreen']) : 0);
45
 
80
  $image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by);
81
  }
82
  else {
83
+ $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by);
84
  }
85
  $image_id = (isset($_POST['image_id']) ? (int) $_POST['image_id'] : $current_image_id);
86
  $comment_rows = $this->model->get_comment_rows_data($image_id);
97
  'image_height' => $image_height,
98
  'image_effect' => $image_effect,
99
  'sort_by' => $sort_by,
100
+ 'order_by' => $order_by,
101
  'enable_image_filmstrip' => $enable_image_filmstrip,
102
  'image_filmstrip_height' => $image_filmstrip_height,
103
  'enable_image_ctrl_btn' => $enable_image_ctrl_btn,
127
  $params_array['watermark_height'] = $watermark_height;
128
  }
129
  $popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
130
+ $filmstrip_thumb_margin = $theme_row->lightbox_filmstrip_thumb_margin;
131
+ $margins_split = explode(" ", $filmstrip_thumb_margin);
132
+ $filmstrip_thumb_margin_right = 0;
133
+ $filmstrip_thumb_margin_left = 0;
134
+ if (isset($margins_split[1])) {
135
+ $filmstrip_thumb_margin_right = (int) $margins_split[1];
136
+ if (isset($margins_split[3])) {
137
+ $filmstrip_thumb_margin_left = (int) $margins_split[3];
138
+ }
139
+ else {
140
+ $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
141
+ }
142
+ }
143
+ elseif (isset($margins_split[0])) {
144
+ $filmstrip_thumb_margin_right = (int) $margins_split[0];
145
+ $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
146
+ }
147
+ $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
148
  ?>
149
  <style>
150
  .spider_popup_wrap * {
172
  max-height: <?php echo $image_height - $image_filmstrip_height; ?>px;
173
  vertical-align: middle;
174
  }
175
+ .bwg_popup_video {
176
+ width: <?php echo $image_width; ?>px;
177
+ height: <?php echo $image_height - $image_filmstrip_height; ?>px;
178
+ vertical-align: middle;
179
+ display: inline-block;
180
+ }
181
  .bwg_ctrl_btn {
182
  color: #<?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
183
  font-size: <?php echo $theme_row->lightbox_ctrl_btn_height; ?>px;
324
  position: absolute;
325
  right: 0;
326
  top: 0;
327
+ z-index: -1;
328
  }
329
  .bwg_comment_container {
330
  -moz-box-sizing: border-box;
471
  margin: 0 auto;
472
  overflow: hidden;
473
  position: relative;
474
+ width: <?php echo ($image_filmstrip_width + $filmstrip_thumb_margin_hor) * count($image_rows); ?>px;
475
  }
476
  .bwg_filmstrip_thumbnail {
477
  position: relative;
679
  }
680
  $current_pos = 0;
681
  ?>
682
+ <?php
683
+ if ($watermark_type != 'none') {
684
+ ?>
685
+ <div class="bwg_image_container">
686
+ <div class="bwg_watermark_container">
687
+ <div style="display:table; margin:0 auto;">
688
+ <span class="bwg_watermark_spun" id="bwg_watermark_container">
689
+ <?php
690
+ if ($watermark_type == 'image') {
691
+ ?>
692
+ <a href="<?php echo $watermark_link; ?>" target="_blank">
693
+ <img class="bwg_watermark_image bwg_watermark" src="<?php echo $watermark_url; ?>" />
694
+ </a>
695
+ <?php
696
+ }
697
+ elseif ($watermark_type == 'text') {
698
+ ?>
699
+ <a class="bwg_none_selectable bwg_watermark_text bwg_watermark" target="_blank" href="<?php echo $watermark_link; ?>"><?php echo $watermark_text; ?></a>
700
+ <?php
701
+ }
702
+ ?>
703
+ </span>
704
+ </div>
705
+ </div>
706
+ </div>
707
+ <?php
708
+ }
709
+ ?>
710
  <div id="bwg_image_container" class="bwg_image_container">
711
  <div class="bwg_slide_container">
712
  <div class="bwg_slide_bg">
713
  <div class="bwg_slider">
714
  <?php
715
  foreach ($image_rows as $key => $image_row) {
716
+ $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
717
  if ($image_row->id == $current_image_id) {
718
  $current_key = $key;
719
  ?>
720
  <span class="bwg_popup_image_spun" id="image_id_<?php echo $image_row->id; ?>">
721
  <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
722
  <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
723
+ <?php
724
+ if (!$is_video) {
725
+ ?>
726
+ <img id="bwg_popup_image" class="bwg_popup_image" 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; ?>" />
727
+ <?php
728
+ }
729
+ else { ?>
730
+ <span id="bwg_popup_image" class="bwg_popup_video" image_id="<?php echo $image_row->id; ?>">
731
+ <iframe class="bwg_video_frame" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
732
+ </span>
733
+ <?php
734
+ }
735
+ ?>
736
  </span>
737
  </span>
738
  </span>
750
  <span class="bwg_popup_image_second_spun" id="image_id_<?php echo $image_row->id; ?>">
751
  <span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
752
  <span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
753
+ <?php
754
+ if (!$is_video) {
755
+ ?>
756
+ <img id="bwg_popup_image_second" class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
757
+ <?php
758
+ }
759
+ else { ?>
760
+ <span id="bwg_popup_image_second" class="bwg_popup_video">
761
+ <iframe class="bwg_video_frame" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
762
+ </span>
763
+ <?php
764
+ }
765
+ ?>
766
  </span>
767
  </span>
768
  </span>
776
  <a id="spider_popup_left" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data); return false;"><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>
777
  <a id="spider_popup_right" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data); return false;"><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>
778
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
779
  </div>
780
  <a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
781
 
793
  jQuery(".bwg_slider").children().each(function() {
794
  if (jQuery(this).css("zIndex") == 2) {
795
  var bwg_current_image_span = jQuery(this).find("img");
796
+ if (!bwg_current_image_span.length) {
797
+ bwg_current_image_span = jQuery(this).find("iframe");
798
+ }
799
+ var width = bwg_current_image_span.width();
800
  var height = bwg_current_image_span.height();
801
  jQuery(".bwg_watermark_spun").width(width);
802
  jQuery(".bwg_watermark_spun").height(height);
1128
  jQuery('meta[name="bwg_title"]').attr("content", "");
1129
  });*/
1130
  function bwg_change_image(current_key, key, data, from_effect) {
1131
+ /* Pause videos.*/
1132
+ jQuery("#bwg_image_container").find("iframe").each(function () {
1133
+ jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
1134
+ jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
1135
+ });
1136
  if (data[key]) {
1137
  if (jQuery('.bwg_ctrl_btn').hasClass('fa-pause')) {
1138
  clearInterval(bwg_playInterval);
1250
  jQuery(".bwg_popup_image").css({
1251
  maxHeight: <?php echo $image_height - $image_filmstrip_height; ?>
1252
  });
1253
+ jQuery(".bwg_popup_video").css({
1254
+ height: <?php echo $image_height - $image_filmstrip_height; ?>
1255
+ });
1256
  bwg_popup_current_height = <?php echo $image_height; ?>;
1257
  }
1258
  else {
1266
  jQuery(".bwg_popup_image").css({
1267
  maxHeight: jQuery(window).height() - <?php echo $image_filmstrip_height; ?>
1268
  });
1269
+ jQuery(".bwg_popup_video").css({
1270
+ height: jQuery(window).height() - <?php echo $image_filmstrip_height; ?>
1271
+ });
1272
  bwg_popup_current_height = jQuery(window).height();
1273
  }
1274
  if (jQuery(window).width() >= <?php echo $image_width; ?> && <?php echo $open_with_fullscreen; ?> != 1 ) {
1282
  jQuery(".bwg_popup_image").css({
1283
  maxWidth: <?php echo $image_width; ?> - comment_container_width
1284
  });
1285
+ jQuery(".bwg_popup_video").css({
1286
+ width: <?php echo $image_width; ?> - comment_container_width
1287
+ });
1288
  jQuery(".bwg_filmstrip_container").css({width: <?php echo $image_width; ?> - comment_container_width});
1289
  jQuery(".bwg_filmstrip").css({width: (<?php echo $image_width; ?> - comment_container_width- 40)});
1290
  bwg_popup_current_width = <?php echo $image_width; ?>;
1300
  jQuery(".bwg_popup_image").css({
1301
  maxWidth: jQuery(window).width() - comment_container_width
1302
  });
1303
+ jQuery(".bwg_popup_video").css({
1304
+ width: jQuery(window).width() - comment_container_width
1305
+ });
1306
  jQuery(".bwg_filmstrip_container").css({width: (jQuery(window).width() - comment_container_width)});
1307
  jQuery(".bwg_filmstrip").css({width: (jQuery(window).width() - comment_container_width - 40)});
1308
  bwg_popup_current_width = jQuery(window).width();
1346
  duration: 500,
1347
  complete: function () { bwg_change_watermark_container(); }
1348
  });
1349
+ jQuery(".bwg_popup_video").animate({
1350
+ width: jQuery("#spider_popup_wrap").width()
1351
+ }, {
1352
+ duration: 500,
1353
+ complete: function () { bwg_change_watermark_container(); }
1354
+ });
1355
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(".spider_popup_wrap").width()}, 500);
1356
  jQuery(".bwg_filmstrip").animate({width: jQuery(".spider_popup_wrap").width() - 40}, 500);
1357
  /* Set filmstrip initial position.*/
1387
  duration: 500,
1388
  complete: function () { bwg_change_watermark_container(); }
1389
  });
1390
+ jQuery(".bwg_popup_video").animate({
1391
+ width: jQuery("#spider_popup_wrap").width() - jQuery(".bwg_comment_container").width()
1392
+ }, {
1393
+ duration: 500,
1394
+ complete: function () { bwg_change_watermark_container(); }
1395
+ });
1396
  jQuery(".bwg_filmstrip_container").css({width: jQuery("#spider_popup_wrap").width() - jQuery(".bwg_comment_container").width()});
1397
  jQuery(".bwg_filmstrip").animate({width: jQuery(".bwg_filmstrip_container").width() - 40}, 500);
1398
  /* Set filmstrip initial position.*/
1491
  jQuery( ".bwg_filmstrip_thumbnails" ).stop(true, false);
1492
  if (jQuery(".bwg_filmstrip_thumbnails").position().left >= -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width())) {
1493
  jQuery(".bwg_filmstrip_left").css({opacity: 1, filter: "Alpha(opacity=100)"});
1494
+ if (jQuery(".bwg_filmstrip_thumbnails").position().left < -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width() - <?php echo $filmstrip_thumb_margin_hor + $image_filmstrip_width; ?>)) {
1495
  jQuery(".bwg_filmstrip_thumbnails").animate({left: -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width())}, 500, 'linear');
1496
  }
1497
  else {
1498
+ jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left - <?php echo $filmstrip_thumb_margin_hor + $image_filmstrip_width; ?>)}, 500, 'linear');
1499
  }
1500
  }
1501
  /* Disable right arrow.*/
1509
  jQuery( ".bwg_filmstrip_thumbnails" ).stop(true, false);
1510
  if (jQuery(".bwg_filmstrip_thumbnails").position().left < 0) {
1511
  jQuery(".bwg_filmstrip_right").css({opacity: 1, filter: "Alpha(opacity=100)"});
1512
+ if (jQuery(".bwg_filmstrip_thumbnails").position().left > - <?php echo $filmstrip_thumb_margin_hor + $image_filmstrip_width; ?>) {
1513
  jQuery(".bwg_filmstrip_thumbnails").animate({left: 0}, 500, 'linear');
1514
  }
1515
  else {
1516
+ jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left + <?php echo $image_filmstrip_width + $filmstrip_thumb_margin_hor; ?>)}, 500, 'linear');
1517
  }
1518
  }
1519
  /* Disable left arrow.*/
1590
  }
1591
  }
1592
  });
1593
+ jQuery(".bwg_popup_video").animate({
1594
+ width: bwg_popup_current_width - comment_container_width,
1595
+ height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>
1596
+ }, {
1597
+ duration: 500,
1598
+ complete: function () {
1599
+ bwg_change_watermark_container();
1600
+ if ((jQuery("#spider_popup_wrap").width() < jQuery(window).width()) && (jQuery("#spider_popup_wrap").height() < jQuery(window).height())) {
1601
+ jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
1602
+ }
1603
+ }
1604
+ });
1605
  jQuery(".bwg_filmstrip_container").animate({width: bwg_popup_current_width - comment_container_width}, 500);
1606
  jQuery(".bwg_filmstrip").animate({width: bwg_popup_current_width - comment_container_width - 40}, 500);
1607
  /* Set filmstrip initial position.*/
1630
  duration: 500,
1631
  complete: function () { bwg_change_watermark_container(); }
1632
  });
1633
+ jQuery(".bwg_popup_video").animate({
1634
+ width: jQuery(window).width() - comment_container_width,
1635
+ height: jQuery(window).height() - <?php echo $image_filmstrip_height; ?>
1636
+ }, {
1637
+ duration: 500,
1638
+ complete: function () { bwg_change_watermark_container(); }
1639
+ });
1640
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(window).width() - comment_container_width}, 500);
1641
  jQuery(".bwg_filmstrip").animate({width: jQuery(window).width() - comment_container_width - 40}, 500);
1642
  /* Set filmstrip initial position.*/
1692
  maxWidth: bwg_popup_current_width - comment_container_width,
1693
  maxHeight: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>
1694
  });
1695
+ jQuery(".bwg_popup_video").css({
1696
+ width: bwg_popup_current_width - comment_container_width,
1697
+ height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>
1698
+ });
1699
  /* Set watermark container size.*/
1700
  bwg_change_watermark_container();
1701
  jQuery(".bwg_filmstrip_container").css({width: bwg_popup_current_width - comment_container_width});
1712
  }
1713
  });
1714
  }
1715
+ if (typeof jQuery().fullscreen !== 'undefined' && jQuery.isFunction(jQuery().fullscreen)) {
1716
+ if (jQuery.fullscreen.isFullScreen()) {
1717
+ /* Exit Fullscreen.*/
1718
+ jQuery.fullscreen.exit();
1719
+ bwg_exit_fullscreen();
1720
+ }
1721
+ else {
1722
+ /* Fullscreen.*/
1723
+ jQuery("#spider_popup_wrap").fullscreen();
1724
+ /*jQuery("#spider_popup_wrap").on("fscreenopen", function() {
1725
+ if (jQuery.fullscreen.isFullScreen()) {*/
1726
+ var screen_width = screen.width;
1727
+ var screen_height = screen.height;
1728
+ jQuery("#spider_popup_wrap").css({
1729
+ width: screen_width,
1730
+ height: screen_height,
1731
+ left: 0,
1732
+ top: 0,
1733
+ margin: 0,
1734
+ zIndex: 100000
1735
+ });
1736
+ jQuery(".bwg_image_wrap").css({width: screen_width - comment_container_width});
1737
+ jQuery(".bwg_image_container").css({height: (screen_height - <?php echo $image_filmstrip_height; ?>)});
1738
+ /* jQuery(".bwg_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
1739
+ jQuery(".bwg_popup_image").css({
1740
+ maxWidth: (screen_width - comment_container_width),
1741
+ maxHeight: (screen_height - <?php echo $image_filmstrip_height; ?>)
1742
+ });
1743
+ jQuery(".bwg_popup_video").css({
1744
+ width: (screen_width - comment_container_width),
1745
+ height: (screen_height - <?php echo $image_filmstrip_height; ?>)
1746
+ });
1747
+ /* Set watermark container size.*/
1748
+ bwg_change_watermark_container();
1749
+ jQuery(".bwg_filmstrip_container").css({width: (screen_width - comment_container_width)});
1750
+ jQuery(".bwg_filmstrip").css({width: (screen_width - comment_container_width - 40)});
1751
+ /* Set filmstrip initial position.*/
1752
+ bwg_set_filmstrip_pos(screen_width - comment_container_width - 40);
1753
+ jQuery(".bwg_resize-full").hide();
1754
+ jQuery(".bwg_fullscreen").attr("class", "bwg_ctrl_btn bwg_fullscreen fa fa-resize-small");
1755
+ jQuery(".bwg_fullscreen").attr("title", "<?php echo __('Exit Fullscreen', 'bwg'); ?>");
1756
+ jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1757
+ /*});
1758
+ }*/
1759
+ }
1760
  }
1761
  return false;
1762
  });
1775
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-play");
1776
  }
1777
  });
1778
+ /* Open with autoplay.*/
1779
+ <?php
1780
+ if ($open_with_autoplay) {
1781
+ ?>
1782
+ bwg_play();
1783
+ jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1784
+ jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
1785
+ <?php
1786
+ }
1787
+ ?>
1788
  /* Open with fullscreen.*/
1789
  <?php
1790
  if ($open_with_fullscreen) {
1819
  }, {
1820
  complete: function () { bwg_change_watermark_container(); }
1821
  });
1822
+ jQuery(".bwg_popup_video").css({
1823
+ width: jQuery(window).width() - comment_container_width,
1824
+ height: jQuery(window).height() - <?php echo $image_filmstrip_height; ?>
1825
+ }, {
1826
+ complete: function () { bwg_change_watermark_container(); }
1827
+ });
1828
  jQuery(".bwg_filmstrip_container").css({width: jQuery(window).width() - comment_container_width});
1829
  jQuery(".bwg_filmstrip").css({width: jQuery(window).width() - comment_container_width - 40});
1830
  /* Set filmstrip initial position.*/
frontend/views/BWGViewImage_browser.php CHANGED
@@ -28,6 +28,12 @@ class BWGViewImage_browser {
28
  global $WD_BWG_UPLOAD_DIR;
29
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
30
  $theme_row = $this->model->get_theme_row_data($params['theme_id']);
 
 
 
 
 
 
31
  if (!$theme_row) {
32
  echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
33
  return;
@@ -37,7 +43,7 @@ class BWGViewImage_browser {
37
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
38
  return;
39
  }
40
- $image_rows = $this->model->get_image_rows_data($params['gallery_id'], 1, $params['sort_by'], $bwg);
41
  if (!$image_rows) {
42
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
43
  }
@@ -52,16 +58,21 @@ class BWGViewImage_browser {
52
  if (!isset($params['popup_fullscreen'])) {
53
  $params['popup_fullscreen'] = 0;
54
  }
 
 
 
55
  $params_array = array(
56
  'action' => 'GalleryBox',
57
  'current_view' => $bwg,
58
  'gallery_id' => $params['gallery_id'],
59
  'theme_id' => $params['theme_id'],
60
  'open_with_fullscreen' => $params['popup_fullscreen'],
 
61
  'image_width' => $params['popup_width'],
62
  'image_height' => $params['popup_height'],
63
  'image_effect' => $params['popup_effect'],
64
  'sort_by' => $params['sort_by'],
 
65
  'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
66
  'image_filmstrip_height' => $params['popup_filmstrip_height'],
67
  'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
@@ -142,7 +153,7 @@ class BWGViewImage_browser {
142
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_browser_image_<?php echo $bwg; ?> {
143
  background-color: rgba(<?php echo $bwg_image_browser_image['red']; ?>, <?php echo $bwg_image_browser_image['green']; ?>, <?php echo $bwg_image_browser_image['blue']; ?>, <?php echo $theme_row->image_browser_transparent / 100; ?>);
144
  text-align: center;
145
- display: inline-block;
146
  vertical-align: middle;
147
  margin: <?php echo $theme_row->image_browser_margin; ?>;
148
  padding: <?php echo $theme_row->image_browser_padding; ?>;
@@ -160,7 +171,7 @@ class BWGViewImage_browser {
160
  color: #<?php echo $theme_row->image_browser_img_font_color; ?>;
161
  text-align:<?php echo $theme_row->image_browser_image_description_align; ?>;
162
  padding-left: 8px;
163
- word-break: break-all;
164
  }
165
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_browser_img_<?php echo $bwg; ?> {
166
  padding: 0 !important;
@@ -292,7 +303,7 @@ class BWGViewImage_browser {
292
  font-size: <?php echo $theme_row->image_browser_img_font_size; ?>px;
293
  font-family: <?php echo $theme_row->image_browser_img_font_family; ?>;
294
  padding: <?php echo $theme_row->image_browser_image_description_padding; ?>;
295
- word-break: break-all;
296
  border-style: <?php echo $theme_row->image_browser_image_description_border_style; ?>;
297
  background-color: #<?php echo $theme_row->image_browser_image_description_bg_color; ?>;
298
  border-radius: <?php echo $theme_row->image_browser_image_description_border_radius; ?>;
@@ -390,6 +401,7 @@ class BWGViewImage_browser {
390
  foreach ($image_rows as $image_row) {
391
  $params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
392
  $popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
 
393
  ?>
394
  <div class="image_browser_image_buttons_conteiner_<?php echo $bwg; ?>">
395
  <div class="image_browser_image_buttons_<?php echo $bwg;?>">
@@ -398,7 +410,7 @@ class BWGViewImage_browser {
398
  if ($image_title) {
399
  ?>
400
  <div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
401
- <?php echo $image_row->alt; ?>
402
  </div>
403
  <?php
404
  }
@@ -421,12 +433,21 @@ class BWGViewImage_browser {
421
  </div>
422
  <?php
423
  }
 
 
 
 
 
 
 
 
 
 
 
424
  ?>
425
- <a style="position:relative;" onclick="spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5); return false;">
426
- <img class="bwg_image_browser_img_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
427
- </a>
428
  <script>
429
  setTimeout(function(){
 
430
  if (jQuery('.image_browser_images_<?php echo $bwg; ?>').width() <= 108) {
431
  jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
432
  }
@@ -454,6 +475,7 @@ class BWGViewImage_browser {
454
  }
455
  }, 3);
456
  jQuery(window).resize(function() {
 
457
  if (jQuery('.image_browser_images_<?php echo $bwg; ?>').width() <= 108) {
458
  jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
459
  }
@@ -487,7 +509,7 @@ class BWGViewImage_browser {
487
  ?>
488
  <div class="bwg_image_browser_image_desp_<?php echo $bwg; ?>">
489
  <div class="bwg_image_browser_image_description_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
490
- <?php echo $image_row->description; ?>
491
  </div>
492
  </div>
493
  <?php
28
  global $WD_BWG_UPLOAD_DIR;
29
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
30
  $theme_row = $this->model->get_theme_row_data($params['theme_id']);
31
+ if (!isset($params['order_by'])) {
32
+ $order_by = 'asc';
33
+ }
34
+ else {
35
+ $order_by = $params['order_by'];
36
+ }
37
  if (!$theme_row) {
38
  echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
39
  return;
43
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
44
  return;
45
  }
46
+ $image_rows = $this->model->get_image_rows_data($params['gallery_id'], 1, $params['sort_by'], $order_by, $bwg);
47
  if (!$image_rows) {
48
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
49
  }
58
  if (!isset($params['popup_fullscreen'])) {
59
  $params['popup_fullscreen'] = 0;
60
  }
61
+ if (!isset($params['popup_autoplay'])) {
62
+ $params['popup_autoplay'] = 0;
63
+ }
64
  $params_array = array(
65
  'action' => 'GalleryBox',
66
  'current_view' => $bwg,
67
  'gallery_id' => $params['gallery_id'],
68
  'theme_id' => $params['theme_id'],
69
  'open_with_fullscreen' => $params['popup_fullscreen'],
70
+ 'open_with_autoplay' => $params['popup_autoplay'],
71
  'image_width' => $params['popup_width'],
72
  'image_height' => $params['popup_height'],
73
  'image_effect' => $params['popup_effect'],
74
  'sort_by' => $params['sort_by'],
75
+ 'order_by' => $order_by,
76
  'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
77
  'image_filmstrip_height' => $params['popup_filmstrip_height'],
78
  'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
153
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_browser_image_<?php echo $bwg; ?> {
154
  background-color: rgba(<?php echo $bwg_image_browser_image['red']; ?>, <?php echo $bwg_image_browser_image['green']; ?>, <?php echo $bwg_image_browser_image['blue']; ?>, <?php echo $theme_row->image_browser_transparent / 100; ?>);
155
  text-align: center;
156
+ /*display: inline-block;*/
157
  vertical-align: middle;
158
  margin: <?php echo $theme_row->image_browser_margin; ?>;
159
  padding: <?php echo $theme_row->image_browser_padding; ?>;
171
  color: #<?php echo $theme_row->image_browser_img_font_color; ?>;
172
  text-align:<?php echo $theme_row->image_browser_image_description_align; ?>;
173
  padding-left: 8px;
174
+ word-break: break-word;
175
  }
176
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_browser_img_<?php echo $bwg; ?> {
177
  padding: 0 !important;
303
  font-size: <?php echo $theme_row->image_browser_img_font_size; ?>px;
304
  font-family: <?php echo $theme_row->image_browser_img_font_family; ?>;
305
  padding: <?php echo $theme_row->image_browser_image_description_padding; ?>;
306
+ word-break: break-word;
307
  border-style: <?php echo $theme_row->image_browser_image_description_border_style; ?>;
308
  background-color: #<?php echo $theme_row->image_browser_image_description_bg_color; ?>;
309
  border-radius: <?php echo $theme_row->image_browser_image_description_border_radius; ?>;
401
  foreach ($image_rows as $image_row) {
402
  $params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
403
  $popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
404
+ $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
405
  ?>
406
  <div class="image_browser_image_buttons_conteiner_<?php echo $bwg; ?>">
407
  <div class="image_browser_image_buttons_<?php echo $bwg;?>">
410
  if ($image_title) {
411
  ?>
412
  <div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
413
+ <?php echo html_entity_decode($image_row->alt); ?>
414
  </div>
415
  <?php
416
  }
433
  </div>
434
  <?php
435
  }
436
+ if (!$is_video) {
437
+ ?>
438
+ <a style="position:relative;" onclick="spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5); return false;">
439
+ <img class="bwg_image_browser_img_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
440
+ </a>
441
+ <?php
442
+ }
443
+ else { ?>
444
+ <iframe id="bwg_video_frame_<?php echo $bwg; ?>" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename : "//player.vimeo.com/video/" . $image_row->filename); ?>" width="<?php echo $params['image_browser_width']; ?>" height="<?php echo $params['image_browser_width'] * 0.5625; ?>" frameborder="0" allowfullscreen style="position: relative;"></iframe>
445
+ <?php
446
+ }
447
  ?>
 
 
 
448
  <script>
449
  setTimeout(function(){
450
+ jQuery('#bwg_video_frame_<?php echo $bwg; ?>').height(jQuery('#bwg_video_frame_<?php echo $bwg; ?>').width() * 0.5625);
451
  if (jQuery('.image_browser_images_<?php echo $bwg; ?>').width() <= 108) {
452
  jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
453
  }
475
  }
476
  }, 3);
477
  jQuery(window).resize(function() {
478
+ jQuery('#bwg_video_frame_<?php echo $bwg; ?>').height(jQuery('#bwg_video_frame_<?php echo $bwg; ?>').width() * 0.5625);
479
  if (jQuery('.image_browser_images_<?php echo $bwg; ?>').width() <= 108) {
480
  jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
481
  }
509
  ?>
510
  <div class="bwg_image_browser_image_desp_<?php echo $bwg; ?>">
511
  <div class="bwg_image_browser_image_description_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
512
+ <?php echo html_entity_decode($image_row->description); ?>
513
  </div>
514
  </div>
515
  <?php
frontend/views/BWGViewSlideshow.php CHANGED
@@ -27,6 +27,12 @@ class BWGViewSlideshow {
27
  global $WD_BWG_UPLOAD_DIR;
28
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
29
  $options_row = $this->model->get_options_row_data();
 
 
 
 
 
 
30
  $image_right_click = $options_row->image_right_click;
31
  if (!$from) {
32
  $theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
@@ -127,11 +133,28 @@ class BWGViewSlideshow {
127
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
128
  return;
129
  }
130
- $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $bwg);
131
  if (!$image_rows) {
132
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
133
  }
134
  $current_image_id = ($image_rows ? $image_rows[0]->id : 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  ?>
136
  <style>
137
  #bwg_container1_<?php echo $bwg; ?> {
@@ -170,6 +193,15 @@ class BWGViewSlideshow {
170
  max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
171
  vertical-align: middle;
172
  }
 
 
 
 
 
 
 
 
 
173
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_prev_btn_<?php echo $bwg; ?>,
174
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_next_btn_<?php echo $bwg; ?> {
175
  /*opacity: <?php echo $theme_row->slideshow_close_btn_transparent / 100; ?>;
@@ -220,10 +252,10 @@ class BWGViewSlideshow {
220
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>,
221
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?> {
222
  background: transparent url("<?php echo WD_BWG_URL . '/images/blank.gif'; ?>") repeat scroll 0 0;
223
- bottom: 0;
224
  cursor: pointer;
225
  display: inline;
226
- height: 100%;
227
  outline: medium none;
228
  position: absolute;
229
  width: 35%;
@@ -313,7 +345,7 @@ class BWGViewSlideshow {
313
  margin: 0 auto;
314
  overflow: hidden;
315
  position: relative;
316
- width: <?php echo ($slideshow_filmstrip_width + 2) * count($image_rows); ?>px;
317
  }
318
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?> {
319
  position: relative;
@@ -577,6 +609,7 @@ class BWGViewSlideshow {
577
  data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
578
  data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
579
  data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
 
580
  <?php
581
  }
582
  ?>
@@ -610,34 +643,59 @@ class BWGViewSlideshow {
610
  <div class="bwg_slide_container_<?php echo $bwg; ?>">
611
  <div class="bwg_slide_bg_<?php echo $bwg; ?>">
612
  <div class="bwg_slider_<?php echo $bwg; ?>">
613
- <?php
614
- foreach ($image_rows as $key => $image_row) {
615
- if ($image_row->id == $current_image_id) {
616
- $current_key = $key;
617
- ?>
618
- <span class="bwg_slideshow_image_spun_<?php echo $bwg; ?>" id="image_id_<?php echo $bwg; ?>_<?php echo $image_row->id; ?>">
619
- <span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>">
620
- <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
621
- <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; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  </span>
623
  </span>
624
- </span>
625
- <input type="hidden" id="bwg_current_image_key_<?php echo $bwg; ?>" value="<?php echo $key; ?>" />
626
- <?php
627
- }
628
- else {
629
- ?>
630
- <span class="bwg_slideshow_image_second_spun_<?php echo $bwg; ?>" id="image_id_<?php echo $bwg; ?>_<?php echo $image_row->id; ?>">
631
- <span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>">
632
- <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
633
- <img id="bwg_slideshow_image_second_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
634
  </span>
635
  </span>
636
- </span>
637
- <?php
638
  }
639
- }
640
- ?>
641
  </div>
642
  </div>
643
  </div>
@@ -645,7 +703,7 @@ class BWGViewSlideshow {
645
  if ($enable_slideshow_ctrl) {
646
  ?>
647
  <a id="spider_slideshow_left_<?php echo $bwg; ?>" onclick="bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) >= 0 ? (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length : data_<?php echo $bwg; ?>.length - 1, data_<?php echo $bwg; ?>); return false;"><span id="spider_slideshow_left-ico_<?php echo $bwg; ?>"><span><i class="bwg_slideshow_prev_btn_<?php echo $bwg; ?> fa <?php echo $theme_row->slideshow_rl_btn_style; ?>-left"></i></span></span></a>
648
- <span id="bwg_slideshow_play_pause_<?php echo $bwg; ?>"><span><span id="bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>"><i class="bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-play"></i></span></span></span>
649
  <a id="spider_slideshow_right_<?php echo $bwg; ?>" onclick="bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) + iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length, data_<?php echo $bwg; ?>); return false;"><span id="spider_slideshow_right-ico_<?php echo $bwg; ?>"><span><i class="bwg_slideshow_next_btn_<?php echo $bwg; ?> fa <?php echo $theme_row->slideshow_rl_btn_style; ?>-right"></i></span></span></a>
650
  <?php
651
  }
@@ -729,6 +787,9 @@ class BWGViewSlideshow {
729
  jQuery(".bwg_slider_<?php echo $bwg; ?>").children().each(function() {
730
  if (jQuery(this).css("zIndex") == 2) {
731
  var bwg_current_image_span = jQuery(this).find("img");
 
 
 
732
  var width = bwg_current_image_span.width();
733
  var height = bwg_current_image_span.height();
734
  jQuery(".bwg_slideshow_watermark_spun_<?php echo $bwg; ?>").width(width);
@@ -751,7 +812,7 @@ class BWGViewSlideshow {
751
  var bwg_current_filmstrip_pos_<?php echo $bwg; ?> = <?php echo $current_pos; ?>;
752
  /* Set filmstrip initial position.*/
753
  function bwg_set_filmstrip_pos_<?php echo $bwg; ?>(filmStripWidth) {
754
- var selectedImagePos = -bwg_current_filmstrip_pos_<?php echo $bwg; ?> - (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2) / 2;
755
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width(), selectedImagePos + filmStripWidth / 2));
756
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({
757
  left: imagesContainerLeft
@@ -1103,6 +1164,11 @@ class BWGViewSlideshow {
1103
  return iterator;
1104
  }
1105
  function bwg_change_image_<?php echo $bwg; ?>(current_key, key, data_<?php echo $bwg; ?>, from_effect) {
 
 
 
 
 
1106
  if (data_<?php echo $bwg; ?>[key]) {
1107
  if (jQuery('.bwg_ctrl_btn_<?php echo $bwg; ?>').hasClass('fa-pause')) {
1108
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
@@ -1154,6 +1220,12 @@ class BWGViewSlideshow {
1154
  <?php
1155
  }
1156
  ?>
 
 
 
 
 
 
1157
  }
1158
  }
1159
  function bwg_popup_resize_<?php echo $bwg; ?>() {
@@ -1168,6 +1240,9 @@ class BWGViewSlideshow {
1168
  maxHeight: <?php echo $image_height - $slideshow_filmstrip_height; ?>*/
1169
  cssText: "max-width: <?php echo $image_width; ?>px !important; max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1170
  });
 
 
 
1171
  /* Set watermark container size.*/
1172
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1173
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
@@ -1189,6 +1264,9 @@ class BWGViewSlideshow {
1189
  maxHeight: ((parent_width) * <?php echo $image_height / $image_width ?> - <?php echo $slideshow_filmstrip_height; ?>)*/
1190
  cssText: "max-width: " + parent_width + "px !important; max-height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
1191
  });
 
 
 
1192
  /* Set watermark container size.*/
1193
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1194
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: (parent_width)});
@@ -1259,11 +1337,11 @@ class BWGViewSlideshow {
1259
  jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1260
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left >= -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
1261
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1262
- if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width() - 2 - <?php echo $slideshow_filmstrip_width; ?>)) {
1263
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())}, 500, 'linear');
1264
  }
1265
  else {
1266
- jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left - 2 - <?php echo $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1267
  }
1268
  }
1269
  /* Disable right arrow.*/
@@ -1277,11 +1355,11 @@ class BWGViewSlideshow {
1277
  jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1278
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
1279
  jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1280
- if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left > -(2 + <?php echo $slideshow_filmstrip_width; ?>)) {
1281
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: 0}, 500, 'linear');
1282
  }
1283
  else {
1284
- jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left + 2 + <?php echo $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1285
  }
1286
  }
1287
  /* Disable left arrow.*/
27
  global $WD_BWG_UPLOAD_DIR;
28
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
29
  $options_row = $this->model->get_options_row_data();
30
+ if (!isset($params['order_by'])) {
31
+ $order_by = 'asc';
32
+ }
33
+ else {
34
+ $order_by = $params['order_by'];
35
+ }
36
  $image_right_click = $options_row->image_right_click;
37
  if (!$from) {
38
  $theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
133
  echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
134
  return;
135
  }
136
+ $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by, $bwg);
137
  if (!$image_rows) {
138
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
139
  }
140
  $current_image_id = ($image_rows ? $image_rows[0]->id : 0);
141
+ $play_pause_button_display = 'undefined';
142
+ $filmstrip_thumb_margin = $theme_row->slideshow_filmstrip_thumb_margin;
143
+ $margins_split = explode(" ", $filmstrip_thumb_margin);
144
+ if (isset($margins_split[1])) {
145
+ $filmstrip_thumb_margin_right = (int) $margins_split[1];
146
+ if (isset($margins_split[3])) {
147
+ $filmstrip_thumb_margin_left = (int) $margins_split[3];
148
+ }
149
+ else {
150
+ $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
151
+ }
152
+ }
153
+ elseif (isset($margins_split[0])) {
154
+ $filmstrip_thumb_margin_right = (int) $margins_split[0];
155
+ $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
156
+ }
157
+ $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
158
  ?>
159
  <style>
160
  #bwg_container1_<?php echo $bwg; ?> {
193
  max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
194
  vertical-align: middle;
195
  }
196
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_video_<?php echo $bwg; ?> {
197
+ padding: 0 !important;
198
+ margin: 0 !important;
199
+ float: none !important;
200
+ width: <?php echo $image_width; ?>px;
201
+ height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
202
+ vertical-align: middle;
203
+ display: inline-block;
204
+ }
205
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_prev_btn_<?php echo $bwg; ?>,
206
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_next_btn_<?php echo $bwg; ?> {
207
  /*opacity: <?php echo $theme_row->slideshow_close_btn_transparent / 100; ?>;
252
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>,
253
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?> {
254
  background: transparent url("<?php echo WD_BWG_URL . '/images/blank.gif'; ?>") repeat scroll 0 0;
255
+ bottom: 35%;
256
  cursor: pointer;
257
  display: inline;
258
+ height: 30%;
259
  outline: medium none;
260
  position: absolute;
261
  width: 35%;
345
  margin: 0 auto;
346
  overflow: hidden;
347
  position: relative;
348
+ width: <?php echo ($slideshow_filmstrip_width + $filmstrip_thumb_margin_hor) * count($image_rows); ?>px;
349
  }
350
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?> {
351
  position: relative;
609
  data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
610
  data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
611
  data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
612
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["is_video"] = "<?php echo $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO"; ?>";
613
  <?php
614
  }
615
  ?>
643
  <div class="bwg_slide_container_<?php echo $bwg; ?>">
644
  <div class="bwg_slide_bg_<?php echo $bwg; ?>">
645
  <div class="bwg_slider_<?php echo $bwg; ?>">
646
+ <?php
647
+ foreach ($image_rows as $key => $image_row) {
648
+ $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
649
+ if ($image_row->id == $current_image_id) {
650
+ $current_key = $key;
651
+ ?>
652
+ <span class="bwg_slideshow_image_spun_<?php echo $bwg; ?>" id="image_id_<?php echo $bwg; ?>_<?php echo $image_row->id; ?>">
653
+ <span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>">
654
+ <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
655
+ <?php
656
+ if (!$is_video) {
657
+ ?>
658
+ <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; ?>" />
659
+ <?php
660
+ }
661
+ else { ?>
662
+ <span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_video_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
663
+ <iframe class="bwg_video_frame_<?php echo $bwg; ?>" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
664
+ </span>
665
+ <?php
666
+ }
667
+ ?>
668
+ </span>
669
  </span>
670
  </span>
671
+ <input type="hidden" id="bwg_current_image_key_<?php echo $bwg; ?>" value="<?php echo $key; ?>" />
672
+ <?php
673
+ }
674
+ else {
675
+ ?>
676
+ <span class="bwg_slideshow_image_second_spun_<?php echo $bwg; ?>" id="image_id_<?php echo $bwg; ?>_<?php echo $image_row->id; ?>">
677
+ <span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>">
678
+ <span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
679
+ <?php
680
+ if (!$is_video) {
681
+ ?>
682
+ <img id="bwg_slideshow_image_second_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" />
683
+ <?php
684
+ }
685
+ else { ?>
686
+ <span id="bwg_slideshow_image_second_<?php echo $bwg; ?>" class="bwg_slideshow_video_<?php echo $bwg; ?>">
687
+ <iframe class="bwg_video_frame_<?php echo $bwg; ?>" src="<?php echo ($image_row->filetype == "YOUTUBE" ? "//www.youtube.com/embed/" . $image_row->filename . "?enablejsapi=1" : "//player.vimeo.com/video/" . $image_row->filename . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
688
+ </span>
689
+ <?php
690
+ }
691
+ ?>
692
+ </span>
693
  </span>
694
  </span>
695
+ <?php
696
+ }
697
  }
698
+ ?>
 
699
  </div>
700
  </div>
701
  </div>
703
  if ($enable_slideshow_ctrl) {
704
  ?>
705
  <a id="spider_slideshow_left_<?php echo $bwg; ?>" onclick="bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) >= 0 ? (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length : data_<?php echo $bwg; ?>.length - 1, data_<?php echo $bwg; ?>); return false;"><span id="spider_slideshow_left-ico_<?php echo $bwg; ?>"><span><i class="bwg_slideshow_prev_btn_<?php echo $bwg; ?> fa <?php echo $theme_row->slideshow_rl_btn_style; ?>-left"></i></span></span></a>
706
+ <span id="bwg_slideshow_play_pause_<?php echo $bwg; ?>" style="display: <?php echo $play_pause_button_display; ?>;"><span><span id="bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>"><i class="bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-play"></i></span></span></span>
707
  <a id="spider_slideshow_right_<?php echo $bwg; ?>" onclick="bwg_change_image_<?php echo $bwg; ?>(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) + iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length, data_<?php echo $bwg; ?>); return false;"><span id="spider_slideshow_right-ico_<?php echo $bwg; ?>"><span><i class="bwg_slideshow_next_btn_<?php echo $bwg; ?> fa <?php echo $theme_row->slideshow_rl_btn_style; ?>-right"></i></span></span></a>
708
  <?php
709
  }
787
  jQuery(".bwg_slider_<?php echo $bwg; ?>").children().each(function() {
788
  if (jQuery(this).css("zIndex") == 2) {
789
  var bwg_current_image_span = jQuery(this).find("img");
790
+ if (!bwg_current_image_span.length) {
791
+ bwg_current_image_span = jQuery(this).find("iframe");
792
+ }
793
  var width = bwg_current_image_span.width();
794
  var height = bwg_current_image_span.height();
795
  jQuery(".bwg_slideshow_watermark_spun_<?php echo $bwg; ?>").width(width);
812
  var bwg_current_filmstrip_pos_<?php echo $bwg; ?> = <?php echo $current_pos; ?>;
813
  /* Set filmstrip initial position.*/
814
  function bwg_set_filmstrip_pos_<?php echo $bwg; ?>(filmStripWidth) {
815
+ var selectedImagePos = -bwg_current_filmstrip_pos_<?php echo $bwg; ?> - (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + <?php echo $filmstrip_thumb_margin_hor; ?>) / 2;
816
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width(), selectedImagePos + filmStripWidth / 2));
817
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({
818
  left: imagesContainerLeft
1164
  return iterator;
1165
  }
1166
  function bwg_change_image_<?php echo $bwg; ?>(current_key, key, data_<?php echo $bwg; ?>, from_effect) {
1167
+ /* Pause videos.*/
1168
+ jQuery("#bwg_slideshow_image_container_<?php echo $bwg; ?>").find("iframe").each(function () {
1169
+ jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
1170
+ jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
1171
+ });
1172
  if (data_<?php echo $bwg; ?>[key]) {
1173
  if (jQuery('.bwg_ctrl_btn_<?php echo $bwg; ?>').hasClass('fa-pause')) {
1174
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1220
  <?php
1221
  }
1222
  ?>
1223
+ if (data_<?php echo $bwg; ?>[key]["is_video"]) {
1224
+ jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: 'none'});
1225
+ }
1226
+ else {
1227
+ jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: ''});
1228
+ }
1229
  }
1230
  }
1231
  function bwg_popup_resize_<?php echo $bwg; ?>() {
1240
  maxHeight: <?php echo $image_height - $slideshow_filmstrip_height; ?>*/
1241
  cssText: "max-width: <?php echo $image_width; ?>px !important; max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1242
  });
1243
+ jQuery(".bwg_slideshow_video_<?php echo $bwg; ?>").css({
1244
+ cssText: "width: <?php echo $image_width; ?>px !important; height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1245
+ });
1246
  /* Set watermark container size.*/
1247
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1248
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1264
  maxHeight: ((parent_width) * <?php echo $image_height / $image_width ?> - <?php echo $slideshow_filmstrip_height; ?>)*/
1265
  cssText: "max-width: " + parent_width + "px !important; max-height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
1266
  });
1267
+ jQuery(".bwg_slideshow_video_<?php echo $bwg; ?>").css({
1268
+ cssText: "width: " + parent_width + "px !important; height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
1269
+ });
1270
  /* Set watermark container size.*/
1271
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1272
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: (parent_width)});
1337
  jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1338
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left >= -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
1339
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1340
+ if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width() - <?php echo $filmstrip_thumb_margin_hor + $slideshow_filmstrip_width; ?>)) {
1341
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())}, 500, 'linear');
1342
  }
1343
  else {
1344
+ jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left - <?php echo $filmstrip_thumb_margin_hor + $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1345
  }
1346
  }
1347
  /* Disable right arrow.*/
1355
  jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1356
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
1357
  jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1358
+ if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left > - <?php echo $filmstrip_thumb_margin_hor + $slideshow_filmstrip_width; ?>) {
1359
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: 0}, 500, 'linear');
1360
  }
1361
  else {
1362
+ jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left + <?php echo $filmstrip_thumb_margin_hor + $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1363
  }
1364
  }
1365
  /* Disable left arrow.*/
frontend/views/BWGViewThumbnails.php CHANGED
@@ -34,8 +34,14 @@ class BWGViewThumbnails {
34
  if (!isset($params['popup_fullscreen'])) {
35
  $params['popup_fullscreen'] = 0;
36
  }
 
 
 
 
 
 
37
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
38
- $sort_direction = ' ASC ';
39
  if ($from) {
40
  $options_row = $this->model->get_options_row_data();
41
  $params['gallery_id'] = $params['id'];
@@ -44,12 +50,16 @@ class BWGViewThumbnails {
44
  if ($params['show'] == 'last') {
45
  $sort_direction = ' DESC ';
46
  }
 
 
 
47
  $params['image_enable_page'] = 0;
48
  $params['image_title'] = $options_row->image_title_show_hover;
49
  $params['thumb_height'] = $params['height'];
50
  $params['thumb_width'] = $params['width'];
51
  $params['image_column_number'] = $params['count'];
52
  $params['popup_fullscreen'] = $options_row->popup_fullscreen;
 
53
  $params['popup_width'] = $options_row->popup_width;
54
  $params['popup_height'] = $options_row->popup_height;
55
  $params['popup_effect'] = $options_row->popup_type;
@@ -298,10 +308,12 @@ class BWGViewThumbnails {
298
  'thumb_width' => $params['thumb_width'],
299
  'thumb_height' => $params['thumb_height'],
300
  'open_with_fullscreen' => $params['popup_fullscreen'],
 
301
  'image_width' => $params['popup_width'],
302
  'image_height' => $params['popup_height'],
303
  'image_effect' => $params['popup_effect'],
304
  'sort_by' => (isset($params['type']) ? 'order' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
 
305
  'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
306
  'image_filmstrip_height' => $params['popup_filmstrip_height'],
307
  'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
@@ -330,7 +342,14 @@ class BWGViewThumbnails {
330
  $params_array['watermark_width'] = $params['watermark_width'];
331
  $params_array['watermark_height'] = $params['watermark_height'];
332
  }
333
- list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
 
 
 
 
 
 
 
334
  $scale = max($params['thumb_width'] / $image_thumb_width, $params['thumb_height'] / $image_thumb_height);
335
  $image_thumb_width *= $scale;
336
  $image_thumb_height *= $scale;
@@ -339,9 +358,20 @@ class BWGViewThumbnails {
339
  ?>
340
  <a style="font-size: 0;" onclick="spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5); return false;">
341
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
 
 
 
 
 
 
 
 
 
 
 
342
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
343
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
344
- <img class="bwg_standart_thumb_img_<?php echo $bwg; ?>" style="max-height: none !important; max-width: none !important; padding: 0 !important; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
345
  <?php
346
  if ($params['image_title'] == 'hover') {
347
  ?>
@@ -356,7 +386,7 @@ class BWGViewThumbnails {
356
  </span>
357
  </span>
358
  <?php
359
- if ($params['image_title'] == 'show') {
360
  ?>
361
  <span class="bwg_title_spun1_<?php echo $bwg; ?>">
362
  <span class="bwg_title_spun2_<?php echo $bwg; ?>">
34
  if (!isset($params['popup_fullscreen'])) {
35
  $params['popup_fullscreen'] = 0;
36
  }
37
+ if (!isset($params['popup_autoplay'])) {
38
+ $params['popup_autoplay'] = 0;
39
+ }
40
+ if (!isset($params['order_by'])) {
41
+ $params['order_by'] = ' asc ';
42
+ }
43
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
44
+ $sort_direction = ' ' . $params['order_by'] . ' ';
45
  if ($from) {
46
  $options_row = $this->model->get_options_row_data();
47
  $params['gallery_id'] = $params['id'];
50
  if ($params['show'] == 'last') {
51
  $sort_direction = ' DESC ';
52
  }
53
+ elseif ($params['show'] == 'first') {
54
+ $sort_direction = ' ASC ';
55
+ }
56
  $params['image_enable_page'] = 0;
57
  $params['image_title'] = $options_row->image_title_show_hover;
58
  $params['thumb_height'] = $params['height'];
59
  $params['thumb_width'] = $params['width'];
60
  $params['image_column_number'] = $params['count'];
61
  $params['popup_fullscreen'] = $options_row->popup_fullscreen;
62
+ $params['popup_autoplay'] = $options_row->popup_autoplay;
63
  $params['popup_width'] = $options_row->popup_width;
64
  $params['popup_height'] = $options_row->popup_height;
65
  $params['popup_effect'] = $options_row->popup_type;
308
  'thumb_width' => $params['thumb_width'],
309
  'thumb_height' => $params['thumb_height'],
310
  'open_with_fullscreen' => $params['popup_fullscreen'],
311
+ 'open_with_autoplay' => $params['popup_autoplay'],
312
  'image_width' => $params['popup_width'],
313
  'image_height' => $params['popup_height'],
314
  'image_effect' => $params['popup_effect'],
315
  'sort_by' => (isset($params['type']) ? 'order' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
316
+ 'order_by' => $sort_direction,
317
  'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
318
  'image_filmstrip_height' => $params['popup_filmstrip_height'],
319
  'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
342
  $params_array['watermark_width'] = $params['watermark_width'];
343
  $params_array['watermark_height'] = $params['watermark_height'];
344
  }
345
+ $is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
346
+ if (!$is_video) {
347
+ list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
348
+ }
349
+ else {
350
+ $image_thumb_width = $params['thumb_width'];
351
+ $image_thumb_height = $params['thumb_height'];
352
+ }
353
  $scale = max($params['thumb_width'] / $image_thumb_width, $params['thumb_height'] / $image_thumb_height);
354
  $image_thumb_width *= $scale;
355
  $image_thumb_height *= $scale;
358
  ?>
359
  <a style="font-size: 0;" onclick="spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>', '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5); return false;">
360
  <span class="bwg_standart_thumb_<?php echo $bwg; ?>">
361
+ <?php
362
+ if ($params['image_title'] == 'show' and $theme_row->thumb_title_pos == 'top') {
363
+ ?>
364
+ <span class="bwg_title_spun1_<?php echo $bwg; ?>">
365
+ <span class="bwg_title_spun2_<?php echo $bwg; ?>">
366
+ <?php echo $image_row->alt; ?>
367
+ </span>
368
+ </span>
369
+ <?php
370
+ }
371
+ ?>
372
  <span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
373
  <span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
374
+ <img class="bwg_standart_thumb_img_<?php echo $bwg; ?>" style="max-height: none !important; max-width: none !important; padding: 0 !important; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo ($is_video ? "" : site_url() . '/' . $WD_BWG_UPLOAD_DIR) . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
375
  <?php
376
  if ($params['image_title'] == 'hover') {
377
  ?>
386
  </span>
387
  </span>
388
  <?php
389
+ if ($params['image_title'] == 'show' and $theme_row->thumb_title_pos == 'bottom') {
390
  ?>
391
  <span class="bwg_title_spun1_<?php echo $bwg; ?>">
392
  <span class="bwg_title_spun2_<?php echo $bwg; ?>">
images/header.png DELETED
Binary file
images/logo.png ADDED
Binary file
js/bwg.js CHANGED
@@ -74,7 +74,7 @@ function spider_ajax_save(form_id, tr_group) {
74
  }
75
  var name = jQuery("#name").val();
76
  var slug = jQuery("#slug").val();
77
- if ((typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
78
  var description = tinyMCE.activeEditor.getContent();
79
  }
80
  else {
@@ -795,8 +795,8 @@ function bwg_enable_disable(display, id, current) {
795
  jQuery("#" + id).css('display', display);
796
  }
797
 
798
- function bwg_popup_fullscreen() {
799
- if (jQuery("#popup_fullscreen_1").is(':checked')) {
800
  jQuery("#tr_popup_dimensions").css('display', 'none');
801
  }
802
  else {
@@ -804,6 +804,19 @@ function bwg_popup_fullscreen() {
804
  }
805
  }
806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
807
  function spider_check_isnum(e) {
808
  var chCode1 = e.which || e.paramlist_keyCode;
809
  if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57) && (chCode1 != 46) && (chCode1 != 45)) {
@@ -839,3 +852,116 @@ function bwg_change_theme_type(type) {
839
  jQuery("#type_Navigation").attr("style", "background-color: #F4F4F4;");
840
  jQuery("#type_" + type).attr("style", "background-color: #CFCBCB;");
841
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
  var name = jQuery("#name").val();
76
  var slug = jQuery("#slug").val();
77
+ if ((typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden() && tinyMCE.activeEditor.getContent) {
78
  var description = tinyMCE.activeEditor.getContent();
79
  }
80
  else {
795
  jQuery("#" + id).css('display', display);
796
  }
797
 
798
+ function bwg_popup_fullscreen(num) {
799
+ if (num) {
800
  jQuery("#tr_popup_dimensions").css('display', 'none');
801
  }
802
  else {
804
  }
805
  }
806
 
807
+ function bwg_change_album_view_type(type) {
808
+ if (type == 'thumbnail') {
809
+ jQuery("#album_thumb_dimensions").html('Album thumb dimensions: ');
810
+ jQuery("#album_thumb_dimensions_x").css('display', '');
811
+ jQuery("#album_thumb_height").css('display', '');
812
+ }
813
+ else {
814
+ jQuery("#album_thumb_dimensions").html('Album thumb width: ');
815
+ jQuery("#album_thumb_dimensions_x").css('display', 'none');
816
+ jQuery("#album_thumb_height").css('display', 'none');
817
+ }
818
+ }
819
+
820
  function spider_check_isnum(e) {
821
  var chCode1 = e.which || e.paramlist_keyCode;
822
  if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57) && (chCode1 != 46) && (chCode1 != 45)) {
852
  jQuery("#type_Navigation").attr("style", "background-color: #F4F4F4;");
853
  jQuery("#type_" + type).attr("style", "background-color: #CFCBCB;");
854
  }
855
+
856
+ function bwg_get_video_host(url) {
857
+ if ((/youtu\.be/i).test(url) || (/youtube\.com\/watch/i).test(url)) {
858
+ return 'YOUTUBE';
859
+ }
860
+ if ((/vimeo\.com/i).test(url)) {
861
+ return 'VIMEO';
862
+ }
863
+ alert('Enter only YouTube or Vimeo url.');
864
+ return '';
865
+ }
866
+
867
+ function bwg_get_youtube_video_id(url) {
868
+ pattern = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
869
+ var matches = url.match(pattern);
870
+ if (matches && (matches[7]).length == 11) {
871
+ return matches[7];
872
+ }
873
+ return '';
874
+ }
875
+
876
+ function bwg_get_vimeo_video_id(url) {
877
+ pattern = /\/\/(www\.)?vimeo.com\/(\d+)($|\/)/;
878
+ var matches = url.match(pattern);
879
+ if (matches) {
880
+ return matches[2];
881
+ }
882
+ return '';
883
+ }
884
+
885
+ function bwg_get_video_info(input_id) {
886
+ var url = jQuery("#" + input_id).val();
887
+ if (!url) {
888
+ alert('Please enter video url to add.');
889
+ return '';
890
+ }
891
+ var host = bwg_get_video_host(url);
892
+ var filesValid = [];
893
+ var fileData = [];
894
+ switch (host) {
895
+ case 'YOUTUBE':
896
+ var video_id = bwg_get_youtube_video_id(url);
897
+ if (video_id) {
898
+ jQuery.getJSON('http://gdata.youtube.com/feeds/api/videos/'+video_id+'?v=2&alt=jsonc',function(data,status,xhr){
899
+ fileData['name'] = data.data.title;
900
+ fileData['description'] = data.data.description;
901
+ fileData['filename'] = video_id;
902
+ fileData['url'] = url;
903
+ fileData['reliative_url'] = url;
904
+ fileData['thumb_url'] = data.data.thumbnail.hqDefault;
905
+ fileData['thumb'] = data.data.thumbnail.hqDefault;
906
+ fileData['size'] = bwg_convert_seconds(data.data.duration);
907
+ fileData['filetype'] = 'YOUTUBE';
908
+ fileData['date_modified'] = bwg_convert_date(data.data.uploaded, 'T');
909
+ fileData['resolution'] = '';
910
+ filesValid.push(fileData);
911
+ bwg_add_image(filesValid);
912
+ document.getElementById(input_id).value = '';
913
+ });
914
+ return 'ok';
915
+ }
916
+ else {
917
+ alert('Please enter a valid YouTube link.');
918
+ return '';
919
+ }
920
+ case 'VIMEO':
921
+ var video_id = bwg_get_vimeo_video_id(url);
922
+ if (video_id) {
923
+ jQuery.getJSON('http://vimeo.com/api/v2/video/'+video_id+'.json',function(data,status,xhr){
924
+ fileData['name'] = data[0].title;
925
+ fileData['description'] = data[0].description;
926
+ fileData['filename'] = video_id;
927
+ fileData['url'] = url;
928
+ fileData['reliative_url'] = url;
929
+ fileData['thumb_url'] = data[0].thumbnail_large;
930
+ fileData['thumb'] = data[0].thumbnail_large;
931
+ fileData['size'] = bwg_convert_seconds(data[0].duration);
932
+ fileData['filetype'] = 'VIMEO';
933
+ fileData['date_modified'] = bwg_convert_date(data[0].upload_date, ' ');
934
+ fileData['resolution'] = '';
935
+ filesValid.push(fileData);
936
+ bwg_add_image(filesValid);
937
+ document.getElementById(input_id).value = '';
938
+ });
939
+ return 'ok';
940
+ }
941
+ else {
942
+ alert('Please enter a valid Vimeo link.');
943
+ return '';
944
+ }
945
+ default:
946
+ return '';
947
+ }
948
+ }
949
+
950
+ function bwg_convert_seconds(seconds) {
951
+ var sec_num = parseInt(seconds, 10);
952
+ var hours = Math.floor(sec_num / 3600);
953
+ var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
954
+ var seconds = sec_num - (hours * 3600) - (minutes * 60);
955
+
956
+ if (minutes < 10 && hours != 0) {minutes = "0" + minutes;}
957
+ if (seconds < 10) {seconds = "0" + seconds;}
958
+ var time = (hours != 0 ? hours + ':' : '') + minutes + ':' + seconds;
959
+ return time;
960
+ }
961
+
962
+ function bwg_convert_date(date, separator) {
963
+ var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
964
+ date = date.split(separator);
965
+ var dateArray = date[0].split("-");
966
+ return dateArray[2] + " " + m_names[dateArray[1] - 1] + " " + dateArray[0] + ", " + date[1].substring(0, 5);
967
+ }
js/bwg_frontend.js CHANGED
@@ -43,8 +43,8 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
43
  window.location,
44
  post_data,
45
  function (data) {
46
- var str = jQuery(data).find('#' + id).parent().html();
47
- jQuery('#' + id).parent().html(str);
48
  }
49
  ).success(function(jqXHR, textStatus, errorThrown) {
50
  jQuery("#opacity_div_" + current_view).css({display: 'none'});
43
  window.location,
44
  post_data,
45
  function (data) {
46
+ var str = jQuery(data).find('#gal_front_form_' + current_view).html();
47
+ jQuery('#gal_front_form_' + current_view).html(str);
48
  }
49
  ).success(function(jqXHR, textStatus, errorThrown) {
50
  jQuery("#opacity_div_" + current_view).css({display: 'none'});
js/bwg_shortcode.js CHANGED
@@ -63,6 +63,36 @@ function bwg_popup_fullscreen() {
63
  }
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  function bwg_change_label(id, text) {
67
  jQuery('#' + id).html(text);
68
  }
@@ -71,6 +101,7 @@ function bwg_gallery_type(gallery_type) {
71
  jQuery("#" + gallery_type).prop('checked', true);
72
  jQuery("#tr_gallery").css('display', 'none');
73
  jQuery("#tr_sort_by").css('display', 'none');
 
74
  jQuery("#tr_album").css('display', 'none');
75
 
76
  // Thumbnails, Masonry.
@@ -86,6 +117,7 @@ function bwg_gallery_type(gallery_type) {
86
  jQuery("#tr_compuct_album_column_number").css('display', 'none');
87
  jQuery("#tr_compuct_albums_per_page").css('display', 'none');
88
  jQuery("#tr_compuct_album_title_hover").css('display', 'none');
 
89
  jQuery("#tr_compuct_album_thumb_width_height").css('display', 'none');
90
  jQuery("#tr_compuct_album_image_column_number").css('display', 'none');
91
  jQuery("#tr_compuct_album_images_per_page").css('display', 'none');
@@ -98,6 +130,7 @@ function bwg_gallery_type(gallery_type) {
98
  jQuery("#tr_extended_albums_per_page").css('display', 'none');
99
  jQuery("#tr_extended_album_height").css('display', 'none');
100
  jQuery("#tr_extended_album_description_enable").css('display', 'none');
 
101
  jQuery("#tr_extended_album_thumb_width_height").css('display', 'none');
102
  jQuery("#tr_extended_album_image_column_number").css('display', 'none');
103
  jQuery("#tr_extended_album_images_per_page").css('display', 'none');
@@ -162,6 +195,7 @@ function bwg_gallery_type(gallery_type) {
162
  case 'thumbnails': {
163
  jQuery("#tr_gallery").css('display', '');
164
  jQuery("#tr_sort_by").css('display', '');
 
165
  bwg_change_label('image_column_number_label', 'Max. number of image columns: ');
166
  bwg_change_label('thumb_width_height_label', 'Image thumbnail dimensions: ');
167
  jQuery('#thumb_width').show();
@@ -180,6 +214,7 @@ function bwg_gallery_type(gallery_type) {
180
  case 'thumbnails_masonry': {
181
  jQuery("#tr_gallery").css('display', '');
182
  jQuery("#tr_sort_by").css('display', '');
 
183
  if (jQuery("input[name=masonry_hor_ver]:checked").val() == 'horizontal') {
184
  bwg_change_label('image_column_number_label', 'Number of image rows: ');
185
  bwg_change_label('thumb_width_height_label', 'Image thumbnail height: ');
@@ -203,6 +238,7 @@ function bwg_gallery_type(gallery_type) {
203
  case 'slideshow': {
204
  jQuery("#tr_gallery").css('display', '');
205
  jQuery("#tr_sort_by").css('display', '');
 
206
  jQuery("#tr_slideshow_effect").css('display', '');
207
  jQuery("#tr_slideshow_interval").css('display', '');
208
  jQuery("#tr_slideshow_width_height").css('display', '');
@@ -246,6 +282,7 @@ function bwg_gallery_type(gallery_type) {
246
  case 'image_browser': {
247
  jQuery("#tr_gallery").css('display', '');
248
  jQuery("#tr_sort_by").css('display', '');
 
249
  jQuery("#tr_image_browser_width_height").css('display', '');
250
  jQuery("#tr_image_browser_title_enable").css('display', '');
251
  jQuery("#tr_image_browser_description_enable").css('display', '');
@@ -259,6 +296,7 @@ function bwg_gallery_type(gallery_type) {
259
  jQuery("#tr_compuct_album_column_number").css('display', '');
260
  jQuery("#tr_compuct_albums_per_page").css('display', '');
261
  jQuery("#tr_compuct_album_title_hover").css('display', '');
 
262
  jQuery("#tr_compuct_album_thumb_width_height").css('display', '');
263
  jQuery("#tr_compuct_album_image_column_number").css('display', '');
264
  jQuery("#tr_compuct_album_images_per_page").css('display', '');
@@ -266,6 +304,7 @@ function bwg_gallery_type(gallery_type) {
266
  jQuery("#tr_compuct_album_image_title").css('display', '');
267
  jQuery("#tr_compuct_album_image_thumb_width_height").css('display', '');
268
  jQuery("#tr_compuct_album_enable_page").css('display', '');
 
269
  jQuery("#bwg_pro_version").html('Compact Album');
270
  jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/compact-album-view/");
271
  break;
@@ -276,12 +315,14 @@ function bwg_gallery_type(gallery_type) {
276
  jQuery("#tr_extended_albums_per_page").css('display', '');
277
  jQuery("#tr_extended_album_height").css('display', '');
278
  jQuery("#tr_extended_album_description_enable").css('display', '');
 
279
  jQuery("#tr_extended_album_thumb_width_height").css('display', '');
280
  jQuery("#tr_extended_album_image_column_number").css('display', '');
281
  jQuery("#tr_extended_album_images_per_page").css('display', '');
282
  jQuery("#tr_extended_album_image_title").css('display', '');
283
  jQuery("#tr_extended_album_image_thumb_width_height").css('display', '');
284
  jQuery("#tr_extended_album_enable_page").css('display', '');
 
285
  jQuery("#bwg_pro_version").html('Extended Album');
286
  jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/extended-album-view/");
287
  break;
@@ -290,6 +331,7 @@ function bwg_gallery_type(gallery_type) {
290
  case 'blog_style': {
291
  jQuery("#tr_gallery").css('display', '');
292
  jQuery("#tr_sort_by").css('display', '');
 
293
  jQuery("#tr_blog_style_width_height").css('display', '');
294
  jQuery("#tr_blog_style_title_enable").css('display', '');
295
  jQuery("#tr_blog_style_images_per_page").css('display', '');
63
  }
64
  }
65
 
66
+ function bwg_change_compuct_album_view_type() {
67
+ if (jQuery("input[name=compuct_album_view_type]:checked").val() == 'thumbnail') {
68
+ jQuery("#compuct_album_image_thumb_dimensions").html('Image thumbnail dimensions: ');
69
+ jQuery("#compuct_album_image_thumb_dimensions_x").css('display', '');
70
+ jQuery("#compuct_album_image_thumb_height").css('display', '');
71
+ jQuery("#tr_compuct_album_image_title").css('display', '');
72
+ }
73
+ else {
74
+ jQuery("#compuct_album_image_thumb_dimensions").html('Image thumbnail width: ');
75
+ jQuery("#compuct_album_image_thumb_dimensions_x").css('display', 'none');
76
+ jQuery("#compuct_album_image_thumb_height").css('display', 'none');
77
+ jQuery("#tr_compuct_album_image_title").css('display', 'none');
78
+ }
79
+ }
80
+
81
+ function bwg_change_extended_album_view_type() {
82
+ if (jQuery("input[name=extended_album_view_type]:checked").val() == 'thumbnail') {
83
+ jQuery("#extended_album_image_thumb_dimensions").html('Image thumbnail dimensions: ');
84
+ jQuery("#extended_album_image_thumb_dimensions_x").css('display', '');
85
+ jQuery("#extended_album_image_thumb_height").css('display', '');
86
+ jQuery("#tr_extended_album_image_title").css('display', '');
87
+ }
88
+ else {
89
+ jQuery("#extended_album_image_thumb_dimensions").html('Image thumbnail width: ');
90
+ jQuery("#extended_album_image_thumb_dimensions_x").css('display', 'none');
91
+ jQuery("#extended_album_image_thumb_height").css('display', 'none');
92
+ jQuery("#tr_extended_album_image_title").css('display', 'none');
93
+ }
94
+ }
95
+
96
  function bwg_change_label(id, text) {
97
  jQuery('#' + id).html(text);
98
  }
101
  jQuery("#" + gallery_type).prop('checked', true);
102
  jQuery("#tr_gallery").css('display', 'none');
103
  jQuery("#tr_sort_by").css('display', 'none');
104
+ jQuery("#tr_order_by").css('display', 'none');
105
  jQuery("#tr_album").css('display', 'none');
106
 
107
  // Thumbnails, Masonry.
117
  jQuery("#tr_compuct_album_column_number").css('display', 'none');
118
  jQuery("#tr_compuct_albums_per_page").css('display', 'none');
119
  jQuery("#tr_compuct_album_title_hover").css('display', 'none');
120
+ jQuery("#tr_compuct_album_view_type").css('display', 'none');
121
  jQuery("#tr_compuct_album_thumb_width_height").css('display', 'none');
122
  jQuery("#tr_compuct_album_image_column_number").css('display', 'none');
123
  jQuery("#tr_compuct_album_images_per_page").css('display', 'none');
130
  jQuery("#tr_extended_albums_per_page").css('display', 'none');
131
  jQuery("#tr_extended_album_height").css('display', 'none');
132
  jQuery("#tr_extended_album_description_enable").css('display', 'none');
133
+ jQuery("#tr_extended_album_view_type").css('display', 'none');
134
  jQuery("#tr_extended_album_thumb_width_height").css('display', 'none');
135
  jQuery("#tr_extended_album_image_column_number").css('display', 'none');
136
  jQuery("#tr_extended_album_images_per_page").css('display', 'none');
195
  case 'thumbnails': {
196
  jQuery("#tr_gallery").css('display', '');
197
  jQuery("#tr_sort_by").css('display', '');
198
+ jQuery("#tr_order_by").css('display', '');
199
  bwg_change_label('image_column_number_label', 'Max. number of image columns: ');
200
  bwg_change_label('thumb_width_height_label', 'Image thumbnail dimensions: ');
201
  jQuery('#thumb_width').show();
214
  case 'thumbnails_masonry': {
215
  jQuery("#tr_gallery").css('display', '');
216
  jQuery("#tr_sort_by").css('display', '');
217
+ jQuery("#tr_order_by").css('display', '');
218
  if (jQuery("input[name=masonry_hor_ver]:checked").val() == 'horizontal') {
219
  bwg_change_label('image_column_number_label', 'Number of image rows: ');
220
  bwg_change_label('thumb_width_height_label', 'Image thumbnail height: ');
238
  case 'slideshow': {
239
  jQuery("#tr_gallery").css('display', '');
240
  jQuery("#tr_sort_by").css('display', '');
241
+ jQuery("#tr_order_by").css('display', '');
242
  jQuery("#tr_slideshow_effect").css('display', '');
243
  jQuery("#tr_slideshow_interval").css('display', '');
244
  jQuery("#tr_slideshow_width_height").css('display', '');
282
  case 'image_browser': {
283
  jQuery("#tr_gallery").css('display', '');
284
  jQuery("#tr_sort_by").css('display', '');
285
+ jQuery("#tr_order_by").css('display', '');
286
  jQuery("#tr_image_browser_width_height").css('display', '');
287
  jQuery("#tr_image_browser_title_enable").css('display', '');
288
  jQuery("#tr_image_browser_description_enable").css('display', '');
296
  jQuery("#tr_compuct_album_column_number").css('display', '');
297
  jQuery("#tr_compuct_albums_per_page").css('display', '');
298
  jQuery("#tr_compuct_album_title_hover").css('display', '');
299
+ jQuery("#tr_compuct_album_view_type").css('display', '');
300
  jQuery("#tr_compuct_album_thumb_width_height").css('display', '');
301
  jQuery("#tr_compuct_album_image_column_number").css('display', '');
302
  jQuery("#tr_compuct_album_images_per_page").css('display', '');
304
  jQuery("#tr_compuct_album_image_title").css('display', '');
305
  jQuery("#tr_compuct_album_image_thumb_width_height").css('display', '');
306
  jQuery("#tr_compuct_album_enable_page").css('display', '');
307
+ bwg_change_compuct_album_view_type();
308
  jQuery("#bwg_pro_version").html('Compact Album');
309
  jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/compact-album-view/");
310
  break;
315
  jQuery("#tr_extended_albums_per_page").css('display', '');
316
  jQuery("#tr_extended_album_height").css('display', '');
317
  jQuery("#tr_extended_album_description_enable").css('display', '');
318
+ jQuery("#tr_extended_album_view_type").css('display', '');
319
  jQuery("#tr_extended_album_thumb_width_height").css('display', '');
320
  jQuery("#tr_extended_album_image_column_number").css('display', '');
321
  jQuery("#tr_extended_album_images_per_page").css('display', '');
322
  jQuery("#tr_extended_album_image_title").css('display', '');
323
  jQuery("#tr_extended_album_image_thumb_width_height").css('display', '');
324
  jQuery("#tr_extended_album_enable_page").css('display', '');
325
+ bwg_change_extended_album_view_type();
326
  jQuery("#bwg_pro_version").html('Extended Album');
327
  jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/extended-album-view/");
328
  break;
331
  case 'blog_style': {
332
  jQuery("#tr_gallery").css('display', '');
333
  jQuery("#tr_sort_by").css('display', '');
334
+ jQuery("#tr_order_by").css('display', '');
335
  jQuery("#tr_blog_style_width_height").css('display', '');
336
  jQuery("#tr_blog_style_title_enable").css('display', '');
337
  jQuery("#tr_blog_style_images_per_page").css('display', '');
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.1.11
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
@@ -153,6 +153,7 @@ function bwg_shortcode($params) {
153
  shortcode_atts(array(
154
  'gallery_id' => 1,
155
  'sort_by' => 'order',
 
156
  'image_column_number' => 3,
157
  'images_per_page' => 15,
158
  'image_title' => 'none',
@@ -179,6 +180,7 @@ function bwg_shortcode($params) {
179
  shortcode_atts(array(
180
  'gallery_id' => 1,
181
  'sort_by' => 'order',
 
182
  'slideshow_effect' => 'fade',
183
  'slideshow_interval' => 5,
184
  'slideshow_width' => 800,
@@ -187,7 +189,7 @@ function bwg_shortcode($params) {
187
  'enable_slideshow_shuffle' => 0,
188
  'enable_slideshow_ctrl' => 1,
189
  'enable_slideshow_filmstrip' => 1,
190
- 'slideshow_filmstrip_height' => 90,
191
  'slideshow_enable_title' => 0,
192
  'slideshow_title_position' => 'top-right',
193
  'slideshow_enable_description' => 0,
@@ -202,6 +204,7 @@ function bwg_shortcode($params) {
202
  shortcode_atts(array(
203
  'gallery_id' => 1,
204
  'sort_by' => 'order',
 
205
  'image_browser_width' => 800,
206
  'image_browser_title_enable' => 1,
207
  'image_browser_description_enable' => 1,
@@ -217,6 +220,7 @@ function bwg_shortcode($params) {
217
  'compuct_album_column_number' => 3,
218
  'compuct_albums_per_page' => 15,
219
  'compuct_album_title' => 'hover',
 
220
  'compuct_album_thumb_width' => 120,
221
  'compuct_album_thumb_height' => 90,
222
  'compuct_album_image_column_number' => 3,
@@ -237,6 +241,7 @@ function bwg_shortcode($params) {
237
  'extended_albums_per_page' => 15,
238
  'extended_album_height' => 150,
239
  'extended_album_description_enable' => 1,
 
240
  'extended_album_thumb_width' => 120,
241
  'extended_album_thumb_height' => 90,
242
  'extended_album_image_column_number' => 3,
@@ -257,7 +262,8 @@ function bwg_shortcode($params) {
257
 
258
  if ($params['gallery_type'] != 'slideshow') {
259
  shortcode_atts(array(
260
- 'popup_fullscreen' => 0,
 
261
  'popup_width' => 800,
262
  'popup_height' => 600,
263
  'popup_effect' => 'fade',
@@ -522,6 +528,8 @@ function bwg_activate() {
522
  `gallery_role` tinyint(1) NOT NULL,
523
  `album_role` tinyint(1) NOT NULL,
524
  `image_role` tinyint(1) NOT NULL,
 
 
525
  PRIMARY KEY (`id`)
526
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
527
  $wpdb->query($bwg_option);
@@ -545,6 +553,7 @@ function bwg_activate() {
545
  `thumb_transition` tinyint(1) NOT NULL,
546
  `thumb_title_font_color` varchar(64) NOT NULL,
547
  `thumb_title_font_style` varchar(64) NOT NULL,
 
548
  `thumb_title_font_size` int(4) NOT NULL,
549
  `thumb_title_font_weight` varchar(64) NOT NULL,
550
  `thumb_title_margin` varchar(64) NOT NULL,
@@ -657,6 +666,7 @@ function bwg_activate() {
657
  `album_compact_back_padding` varchar(64) NOT NULL,
658
  `album_compact_title_font_color` varchar(64) NOT NULL,
659
  `album_compact_title_font_style` varchar(64) NOT NULL,
 
660
  `album_compact_title_font_size` int(4) NOT NULL,
661
  `album_compact_title_font_weight` varchar(64) NOT NULL,
662
  `album_compact_title_margin` varchar(64) NOT NULL,
@@ -877,97 +887,99 @@ function bwg_activate() {
877
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_option');
878
  if (!$exists_default) {
879
  $save = $wpdb->insert($wpdb->prefix . 'bwg_option', array(
880
- 'id' => 1,
881
- 'images_directory' => str_replace(ABSPATH, '', $upload_dir['basedir']),
882
-
883
- 'masonry' => 'vertical',
884
- 'image_column_number' => 5,
885
- 'images_per_page' => 30,
886
- 'thumb_width' => 180,
887
- 'thumb_height' => 90,
888
- 'upload_thumb_width' => 300,
889
- 'upload_thumb_height' => 300,
890
- 'image_enable_page' => 1,
891
- 'image_title_show_hover' => 'none',
892
-
893
- 'album_column_number' => 5,
894
- 'albums_per_page' => 30,
895
- 'album_title_show_hover' => 'hover',
896
- 'album_thumb_width' => 120,
897
- 'album_thumb_height' => 90,
898
- 'album_enable_page' => 1,
899
- 'extended_album_height' => 150,
900
- 'extended_album_description_enable' => 1,
901
-
902
- 'image_browser_width' => 800,
903
- 'image_browser_title_enable' => 1,
904
- 'image_browser_description_enable' => 1,
905
-
906
- 'blog_style_width' => 800,
907
- 'blog_style_title_enable' => 1,
908
- 'blog_style_images_per_page' => 5,
909
- 'blog_style_enable_page' => 1,
910
-
911
- 'slideshow_type' => 'fade',
912
- 'slideshow_interval' => 5,
913
- 'slideshow_width' => 800,
914
- 'slideshow_height' => 500,
915
- 'slideshow_enable_autoplay' => 0,
916
- 'slideshow_enable_shuffle' => 0,
917
- 'slideshow_enable_ctrl' => 1,
918
- 'slideshow_enable_filmstrip' => 1,
919
- 'slideshow_filmstrip_height' => 90,
920
- 'slideshow_enable_title' => 0,
921
- 'slideshow_title_position' => 'top-right',
922
- 'slideshow_enable_description' => 0,
923
- 'slideshow_description_position' => 'bottom-right',
924
- 'slideshow_enable_music' => 0,
925
- 'slideshow_audio_url' => '',
926
-
927
- 'popup_width' => 800,
928
- 'popup_height' => 500,
929
- 'popup_type' => 'fade',
930
- 'popup_interval' => 5,
931
- 'popup_enable_filmstrip' => 1,
932
- 'popup_filmstrip_height' => 70,
933
- 'popup_enable_ctrl_btn' => 1,
934
- 'popup_enable_fullscreen' => 1,
935
- 'popup_enable_comment' => 1,
936
- 'popup_enable_email' => 0,
937
- 'popup_enable_captcha' => 0,
938
- 'popup_enable_download' => 0,
939
- 'popup_enable_fullsize_image' => 0,
940
- 'popup_enable_facebook' => 1,
941
- 'popup_enable_twitter' => 1,
942
- 'popup_enable_google' => 1,
943
-
944
- 'watermark_type' => 'none',
945
- 'watermark_position' => 'bottom-left',
946
- 'watermark_width' => 90,
947
- 'watermark_height' => 90,
948
- 'watermark_url' => WD_BWG_URL . '/images/watermark.png',
949
- 'watermark_text' => 'web-dorado.com',
950
- 'watermark_link' => 'http://web-dorado.com',
951
- 'watermark_font_size' => 20,
952
- 'watermark_font' => 'arial',
953
- 'watermark_color' => 'FFFFFF',
954
- 'watermark_opacity' => 30,
955
-
956
- 'built_in_watermark_type' => 'none',
957
- 'built_in_watermark_position' => 'middle-center',
958
- 'built_in_watermark_size' => 15,
959
- 'built_in_watermark_url' => WD_BWG_URL . '/images/watermark.png',
960
- 'built_in_watermark_text' => 'web-dorado.com',
961
- 'built_in_watermark_font_size' => 20,
962
- 'built_in_watermark_font' => 'arial',
963
- 'built_in_watermark_color' => 'FFFFFF',
964
- 'built_in_watermark_opacity' => 30,
965
-
966
- 'image_right_click' => 0,
967
- 'popup_fullscreen' => 0,
968
- 'gallery_role' => 0,
969
- 'album_role' => 0,
970
- 'image_role' => 0
 
 
971
  ), array(
972
  '%d',
973
  '%s',
@@ -1060,6 +1072,8 @@ function bwg_activate() {
1060
  '%d',
1061
  '%d',
1062
  '%d',
 
 
1063
  ));
1064
  }
1065
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
@@ -1084,6 +1098,7 @@ function bwg_activate() {
1084
  'thumb_transition' => 1,
1085
  'thumb_title_font_color' => 'CCCCCC',
1086
  'thumb_title_font_style' => 'segoe ui',
 
1087
  'thumb_title_font_size' => 16,
1088
  'thumb_title_font_weight' => 'bold',
1089
  'thumb_title_margin' => '2px',
@@ -1091,7 +1106,7 @@ function bwg_activate() {
1091
 
1092
  'page_nav_position' => 'bottom',
1093
  'page_nav_align' => 'center',
1094
- 'page_nav_number' => 1,
1095
  'page_nav_font_size' => 12,
1096
  'page_nav_font_style' => 'segoe ui',
1097
  'page_nav_font_color' => '666666',
@@ -1195,6 +1210,7 @@ function bwg_activate() {
1195
  'album_compact_back_padding' => '0',
1196
  'album_compact_title_font_color' => 'CCCCCC',
1197
  'album_compact_title_font_style' => 'segoe ui',
 
1198
  'album_compact_title_font_size' => 16,
1199
  'album_compact_title_font_weight' => 'bold',
1200
  'album_compact_title_margin' => '2px',
@@ -1412,6 +1428,7 @@ function bwg_activate() {
1412
  '%d',
1413
  '%s',
1414
  '%s',
 
1415
  '%d',
1416
  '%s',
1417
  '%s',
@@ -1523,6 +1540,7 @@ function bwg_activate() {
1523
  '%s',
1524
  '%s',
1525
  '%s',
 
1526
  '%d',
1527
  '%s',
1528
  '%s',
@@ -1742,6 +1760,7 @@ function bwg_activate() {
1742
  'thumb_transition' => 1,
1743
  'thumb_title_font_color' => 'CCCCCC',
1744
  'thumb_title_font_style' => 'segoe ui',
 
1745
  'thumb_title_font_size' => 16,
1746
  'thumb_title_font_weight' => 'bold',
1747
  'thumb_title_margin' => '5px',
@@ -1749,7 +1768,7 @@ function bwg_activate() {
1749
 
1750
  'page_nav_position' => 'bottom',
1751
  'page_nav_align' => 'center',
1752
- 'page_nav_number' => 1,
1753
  'page_nav_font_size' => 12,
1754
  'page_nav_font_style' => 'segoe ui',
1755
  'page_nav_font_color' => '666666',
@@ -1853,6 +1872,7 @@ function bwg_activate() {
1853
  'album_compact_back_padding' => '0',
1854
  'album_compact_title_font_color' => 'CCCCCC',
1855
  'album_compact_title_font_style' => 'segoe ui',
 
1856
  'album_compact_title_font_size' => 16,
1857
  'album_compact_title_font_weight' => 'bold',
1858
  'album_compact_title_margin' => '5px',
@@ -2070,6 +2090,7 @@ function bwg_activate() {
2070
  '%d',
2071
  '%s',
2072
  '%s',
 
2073
  '%d',
2074
  '%s',
2075
  '%s',
@@ -2181,6 +2202,7 @@ function bwg_activate() {
2181
  '%s',
2182
  '%s',
2183
  '%s',
 
2184
  '%d',
2185
  '%s',
2186
  '%s',
@@ -2381,7 +2403,7 @@ function bwg_activate() {
2381
  ));
2382
  }
2383
  $version = get_option("wd_bwg_version");
2384
- $new_version = '1.1.11';
2385
  if ($version && version_compare($version, $new_version, '<')) {
2386
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2387
  bwg_update($version);
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.1.12
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
153
  shortcode_atts(array(
154
  'gallery_id' => 1,
155
  'sort_by' => 'order',
156
+ 'order_by' => 'asc',
157
  'image_column_number' => 3,
158
  'images_per_page' => 15,
159
  'image_title' => 'none',
180
  shortcode_atts(array(
181
  'gallery_id' => 1,
182
  'sort_by' => 'order',
183
+ 'order_by' => 'asc',
184
  'slideshow_effect' => 'fade',
185
  'slideshow_interval' => 5,
186
  'slideshow_width' => 800,
189
  'enable_slideshow_shuffle' => 0,
190
  'enable_slideshow_ctrl' => 1,
191
  'enable_slideshow_filmstrip' => 1,
192
+ 'slideshow_filmstrip_height' => 70,
193
  'slideshow_enable_title' => 0,
194
  'slideshow_title_position' => 'top-right',
195
  'slideshow_enable_description' => 0,
204
  shortcode_atts(array(
205
  'gallery_id' => 1,
206
  'sort_by' => 'order',
207
+ 'order_by' => 'asc',
208
  'image_browser_width' => 800,
209
  'image_browser_title_enable' => 1,
210
  'image_browser_description_enable' => 1,
220
  'compuct_album_column_number' => 3,
221
  'compuct_albums_per_page' => 15,
222
  'compuct_album_title' => 'hover',
223
+ 'compuct_album_view_type' => 'thumbnail',
224
  'compuct_album_thumb_width' => 120,
225
  'compuct_album_thumb_height' => 90,
226
  'compuct_album_image_column_number' => 3,
241
  'extended_albums_per_page' => 15,
242
  'extended_album_height' => 150,
243
  'extended_album_description_enable' => 1,
244
+ 'extended_album_view_type' => 'thumbnail',
245
  'extended_album_thumb_width' => 120,
246
  'extended_album_thumb_height' => 90,
247
  'extended_album_image_column_number' => 3,
262
 
263
  if ($params['gallery_type'] != 'slideshow') {
264
  shortcode_atts(array(
265
+ 'popup_fullscreen' => 0,
266
+ 'popup_autoplay' => 0,
267
  'popup_width' => 800,
268
  'popup_height' => 600,
269
  'popup_effect' => 'fade',
528
  `gallery_role` tinyint(1) NOT NULL,
529
  `album_role` tinyint(1) NOT NULL,
530
  `image_role` tinyint(1) NOT NULL,
531
+ `popup_autoplay` tinyint(1) NOT NULL,
532
+ `album_view_type` varchar(64) NOT NULL,
533
  PRIMARY KEY (`id`)
534
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
535
  $wpdb->query($bwg_option);
553
  `thumb_transition` tinyint(1) NOT NULL,
554
  `thumb_title_font_color` varchar(64) NOT NULL,
555
  `thumb_title_font_style` varchar(64) NOT NULL,
556
+ `thumb_title_pos` varchar(64) NOT NULL,
557
  `thumb_title_font_size` int(4) NOT NULL,
558
  `thumb_title_font_weight` varchar(64) NOT NULL,
559
  `thumb_title_margin` varchar(64) NOT NULL,
666
  `album_compact_back_padding` varchar(64) NOT NULL,
667
  `album_compact_title_font_color` varchar(64) NOT NULL,
668
  `album_compact_title_font_style` varchar(64) NOT NULL,
669
+ `album_compact_thumb_title_pos` varchar(64) NOT NULL,
670
  `album_compact_title_font_size` int(4) NOT NULL,
671
  `album_compact_title_font_weight` varchar(64) NOT NULL,
672
  `album_compact_title_margin` varchar(64) NOT NULL,
887
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_option');
888
  if (!$exists_default) {
889
  $save = $wpdb->insert($wpdb->prefix . 'bwg_option', array(
890
+ 'id' => 1,
891
+ 'images_directory' => str_replace(ABSPATH, '', $upload_dir['basedir']),
892
+
893
+ 'masonry' => 'vertical',
894
+ 'image_column_number' => 5,
895
+ 'images_per_page' => 30,
896
+ 'thumb_width' => 180,
897
+ 'thumb_height' => 90,
898
+ 'upload_thumb_width' => 300,
899
+ 'upload_thumb_height' => 300,
900
+ 'image_enable_page' => 1,
901
+ 'image_title_show_hover' => 'none',
902
+
903
+ 'album_column_number' => 5,
904
+ 'albums_per_page' => 30,
905
+ 'album_title_show_hover' => 'hover',
906
+ 'album_thumb_width' => 120,
907
+ 'album_thumb_height' => 90,
908
+ 'album_enable_page' => 1,
909
+ 'extended_album_height' => 150,
910
+ 'extended_album_description_enable' => 1,
911
+
912
+ 'image_browser_width' => 800,
913
+ 'image_browser_title_enable' => 1,
914
+ 'image_browser_description_enable' => 1,
915
+
916
+ 'blog_style_width' => 800,
917
+ 'blog_style_title_enable' => 1,
918
+ 'blog_style_images_per_page' => 5,
919
+ 'blog_style_enable_page' => 1,
920
+
921
+ 'slideshow_type' => 'fade',
922
+ 'slideshow_interval' => 5,
923
+ 'slideshow_width' => 800,
924
+ 'slideshow_height' => 500,
925
+ 'slideshow_enable_autoplay' => 0,
926
+ 'slideshow_enable_shuffle' => 0,
927
+ 'slideshow_enable_ctrl' => 1,
928
+ 'slideshow_enable_filmstrip' => 1,
929
+ 'slideshow_filmstrip_height' => 90,
930
+ 'slideshow_enable_title' => 0,
931
+ 'slideshow_title_position' => 'top-right',
932
+ 'slideshow_enable_description' => 0,
933
+ 'slideshow_description_position' => 'bottom-right',
934
+ 'slideshow_enable_music' => 0,
935
+ 'slideshow_audio_url' => '',
936
+
937
+ 'popup_width' => 800,
938
+ 'popup_height' => 500,
939
+ 'popup_type' => 'fade',
940
+ 'popup_interval' => 5,
941
+ 'popup_enable_filmstrip' => 1,
942
+ 'popup_filmstrip_height' => 70,
943
+ 'popup_enable_ctrl_btn' => 1,
944
+ 'popup_enable_fullscreen' => 1,
945
+ 'popup_enable_comment' => 1,
946
+ 'popup_enable_email' => 0,
947
+ 'popup_enable_captcha' => 0,
948
+ 'popup_enable_download' => 0,
949
+ 'popup_enable_fullsize_image' => 0,
950
+ 'popup_enable_facebook' => 1,
951
+ 'popup_enable_twitter' => 1,
952
+ 'popup_enable_google' => 1,
953
+
954
+ 'watermark_type' => 'none',
955
+ 'watermark_position' => 'bottom-left',
956
+ 'watermark_width' => 90,
957
+ 'watermark_height' => 90,
958
+ 'watermark_url' => WD_BWG_URL . '/images/watermark.png',
959
+ 'watermark_text' => 'web-dorado.com',
960
+ 'watermark_link' => 'http://web-dorado.com',
961
+ 'watermark_font_size' => 20,
962
+ 'watermark_font' => 'arial',
963
+ 'watermark_color' => 'FFFFFF',
964
+ 'watermark_opacity' => 30,
965
+
966
+ 'built_in_watermark_type' => 'none',
967
+ 'built_in_watermark_position' => 'middle-center',
968
+ 'built_in_watermark_size' => 15,
969
+ 'built_in_watermark_url' => WD_BWG_URL . '/images/watermark.png',
970
+ 'built_in_watermark_text' => 'web-dorado.com',
971
+ 'built_in_watermark_font_size' => 20,
972
+ 'built_in_watermark_font' => 'arial',
973
+ 'built_in_watermark_color' => 'FFFFFF',
974
+ 'built_in_watermark_opacity' => 30,
975
+
976
+ 'image_right_click' => 0,
977
+ 'popup_fullscreen' => 0,
978
+ 'gallery_role' => 0,
979
+ 'album_role' => 0,
980
+ 'image_role' => 0,
981
+ 'popup_autoplay' => 0,
982
+ 'album_view_type' => 'thumbnail',
983
  ), array(
984
  '%d',
985
  '%s',
1072
  '%d',
1073
  '%d',
1074
  '%d',
1075
+ '%d',
1076
+ '%s',
1077
  ));
1078
  }
1079
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
1098
  'thumb_transition' => 1,
1099
  'thumb_title_font_color' => 'CCCCCC',
1100
  'thumb_title_font_style' => 'segoe ui',
1101
+ 'thumb_title_pos' => 'bottom',
1102
  'thumb_title_font_size' => 16,
1103
  'thumb_title_font_weight' => 'bold',
1104
  'thumb_title_margin' => '2px',
1106
 
1107
  'page_nav_position' => 'bottom',
1108
  'page_nav_align' => 'center',
1109
+ 'page_nav_number' => 0,
1110
  'page_nav_font_size' => 12,
1111
  'page_nav_font_style' => 'segoe ui',
1112
  'page_nav_font_color' => '666666',
1210
  'album_compact_back_padding' => '0',
1211
  'album_compact_title_font_color' => 'CCCCCC',
1212
  'album_compact_title_font_style' => 'segoe ui',
1213
+ 'album_compact_thumb_title_pos' => 'bottom',
1214
  'album_compact_title_font_size' => 16,
1215
  'album_compact_title_font_weight' => 'bold',
1216
  'album_compact_title_margin' => '2px',
1428
  '%d',
1429
  '%s',
1430
  '%s',
1431
+ '%s',
1432
  '%d',
1433
  '%s',
1434
  '%s',
1540
  '%s',
1541
  '%s',
1542
  '%s',
1543
+ '%s',
1544
  '%d',
1545
  '%s',
1546
  '%s',
1760
  'thumb_transition' => 1,
1761
  'thumb_title_font_color' => 'CCCCCC',
1762
  'thumb_title_font_style' => 'segoe ui',
1763
+ 'thumb_title_pos' => 'bottom',
1764
  'thumb_title_font_size' => 16,
1765
  'thumb_title_font_weight' => 'bold',
1766
  'thumb_title_margin' => '5px',
1768
 
1769
  'page_nav_position' => 'bottom',
1770
  'page_nav_align' => 'center',
1771
+ 'page_nav_number' => 0,
1772
  'page_nav_font_size' => 12,
1773
  'page_nav_font_style' => 'segoe ui',
1774
  'page_nav_font_color' => '666666',
1872
  'album_compact_back_padding' => '0',
1873
  'album_compact_title_font_color' => 'CCCCCC',
1874
  'album_compact_title_font_style' => 'segoe ui',
1875
+ 'album_compact_thumb_title_pos' => 'bottom',
1876
  'album_compact_title_font_size' => 16,
1877
  'album_compact_title_font_weight' => 'bold',
1878
  'album_compact_title_margin' => '5px',
2090
  '%d',
2091
  '%s',
2092
  '%s',
2093
+ '%s',
2094
  '%d',
2095
  '%s',
2096
  '%s',
2202
  '%s',
2203
  '%s',
2204
  '%s',
2205
+ '%s',
2206
  '%d',
2207
  '%s',
2208
  '%s',
2403
  ));
2404
  }
2405
  $version = get_option("wd_bwg_version");
2406
+ $new_version = '1.1.12';
2407
  if ($version && version_compare($version, $new_version, '<')) {
2408
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2409
  bwg_update($version);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.9
7
- Stable tag: 1.1.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -61,6 +61,7 @@ Photo Gallery product in addition to the main plugin includes 4 specific widgets
61
  * WordPress Tag cloud hosted widget
62
  * Photo Gallery Slideshow widget
63
  * Photo Gallery Widget for displaying albums and galleries as widgets
 
64
 
65
  Upgrade to [WordPress Photo Gallery Pro](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html) to add features:
66
 
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.9
7
+ Stable tag: 1.1.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
61
  * WordPress Tag cloud hosted widget
62
  * Photo Gallery Slideshow widget
63
  * Photo Gallery Widget for displaying albums and galleries as widgets
64
+ * Separate shortcode generator page for the websites using custom pages/custom editors.
65
 
66
  Upgrade to [WordPress Photo Gallery Pro](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html) to add features:
67
 
update/bwg_update.php CHANGED
@@ -22,5 +22,16 @@ function bwg_update($version) {
22
  // Add popup fullscreen option
23
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `popup_fullscreen` tinyint(1) NOT NULL DEFAULT 0 AFTER `image_right_click`");
24
  }
 
 
 
 
 
 
 
 
 
25
  return;
26
  }
 
 
22
  // Add popup fullscreen option
23
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `popup_fullscreen` tinyint(1) NOT NULL DEFAULT 0 AFTER `image_right_click`");
24
  }
25
+ if (version_compare($version, '1.1.12') == -1) {
26
+ // Add image title position.
27
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `thumb_title_pos` varchar(64) NOT NULL DEFAULT 'bottom' AFTER `thumb_title_font_style`");
28
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `album_compact_thumb_title_pos` varchar(64) NOT NULL DEFAULT 'bottom' AFTER `album_compact_title_font_style`");
29
+ // Add popup autoplay option.
30
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `popup_autoplay` tinyint(1) NOT NULL DEFAULT 0 AFTER `popup_fullscreen`");
31
+ // Add album view type option.
32
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `album_view_type` varchar(255) NOT NULL DEFAULT 'thumbnail' AFTER `popup_autoplay`");
33
+ }
34
  return;
35
  }
36
+
37
+ ?>