Photo Gallery by WD – Responsive Photo Gallery - Version 1.3.23

Version Description

  • Fixed: Ordering bug in Gallery Box.
  • Added: Possibility to include styles/scripts in necessary pages only.
  • Fixed: Share after image change.
  • Fixed: Author for custom posts.
  • Fixed: Removed unnecessary spaces from ordering.
  • Fixed: Tag select on mobile.
  • Changed: Include only necessary Google Fonts.
Download this release

Release Info

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

Code changes from version 1.3.22 to 1.3.23

admin/controllers/BWGControllerOptions_bwg.php CHANGED
@@ -230,6 +230,7 @@ class BWGControllerOptions_bwg {
230
  $show_tag_box = (isset($_POST['show_tag_box']) ? esc_html(stripslashes($_POST['show_tag_box'])) : 0);
231
  $show_hide_custom_post = (isset($_POST['show_hide_custom_post']) ? esc_html(stripslashes($_POST['show_hide_custom_post'])) : 0);
232
  $show_hide_post_meta = (isset($_POST['show_hide_post_meta']) ? esc_html(stripslashes($_POST['show_hide_post_meta'])) : 0);
 
233
  $placeholder = (isset($_POST['placeholder']) ? esc_html(stripslashes($_POST['placeholder'])) : '');
234
  $slideshow_effect_duration = (isset($_POST['slideshow_effect_duration']) ? esc_html(stripslashes($_POST['slideshow_effect_duration'])) : 1);
235
  $popup_effect_duration = (isset($_POST['popup_effect_duration']) ? (int) (stripslashes($_POST['popup_effect_duration'])) : 1);
@@ -372,6 +373,7 @@ class BWGControllerOptions_bwg {
372
  'show_tag_box' => $show_tag_box,
373
  'show_hide_custom_post' => $show_hide_custom_post,
374
  'show_hide_post_meta' => $show_hide_post_meta,
 
375
  'placeholder' => $placeholder,
376
  'slideshow_effect_duration' => $slideshow_effect_duration,
377
  'popup_effect_duration' => $popup_effect_duration,
230
  $show_tag_box = (isset($_POST['show_tag_box']) ? esc_html(stripslashes($_POST['show_tag_box'])) : 0);
231
  $show_hide_custom_post = (isset($_POST['show_hide_custom_post']) ? esc_html(stripslashes($_POST['show_hide_custom_post'])) : 0);
232
  $show_hide_post_meta = (isset($_POST['show_hide_post_meta']) ? esc_html(stripslashes($_POST['show_hide_post_meta'])) : 0);
233
+ $use_inline_stiles_and_scripts = (isset($_POST['use_inline_stiles_and_scripts']) ? esc_html(stripslashes($_POST['use_inline_stiles_and_scripts'])) : 0);
234
  $placeholder = (isset($_POST['placeholder']) ? esc_html(stripslashes($_POST['placeholder'])) : '');
235
  $slideshow_effect_duration = (isset($_POST['slideshow_effect_duration']) ? esc_html(stripslashes($_POST['slideshow_effect_duration'])) : 1);
236
  $popup_effect_duration = (isset($_POST['popup_effect_duration']) ? (int) (stripslashes($_POST['popup_effect_duration'])) : 1);
373
  'show_tag_box' => $show_tag_box,
374
  'show_hide_custom_post' => $show_hide_custom_post,
375
  'show_hide_post_meta' => $show_hide_post_meta,
376
+ 'use_inline_stiles_and_scripts' => $use_inline_stiles_and_scripts,
377
  'placeholder' => $placeholder,
378
  'slideshow_effect_duration' => $slideshow_effect_duration,
379
  'popup_effect_duration' => $popup_effect_duration,
admin/models/BWGModelOptions_bwg.php CHANGED
@@ -176,6 +176,7 @@ class BWGModelOptions_bwg {
176
  $row->show_tag_box = 0;
177
  $row->show_hide_custom_post = 0;
178
  $row->show_hide_post_meta = 0;
 
179
  $row->placeholder = '';
180
  }
181
  return $row;
176
  $row->show_tag_box = 0;
177
  $row->show_hide_custom_post = 0;
178
  $row->show_hide_post_meta = 0;
179
+ $row->use_inline_stiles_and_scripts = 0;
180
  $row->placeholder = '';
181
  }
182
  return $row;
admin/views/BWGViewOptions_bwg.php CHANGED
@@ -1384,6 +1384,16 @@ class BWGViewOptions_bwg {
1384
  </td>
1385
  </tr>
1386
  <tr>
 
 
 
 
 
 
 
 
 
 
1387
  <td class="spider_label_options">
1388
  <label><?php echo __('Introduction tour:', 'bwg_back'); ?></label>
1389
  </td>
1384
  </td>
1385
  </tr>
1386
  <tr>
1387
+ <td class="spider_label_options">
1388
+ <label><?php echo __('Include styles/scripts in necessary pages only:', 'bwg_back'); ?></label>
1389
+ </td>
1390
+ <td>
1391
+ <input type="radio" name="use_inline_stiles_and_scripts" id="use_inline_stiles_and_scripts_1" value="1" <?php if ($row->use_inline_stiles_and_scripts) echo 'checked="checked"'; ?> /><label for="use_inline_stiles_and_scripts_1"><?php echo __('Yes', 'bwg_back'); ?></label>
1392
+ <input type="radio" name="use_inline_stiles_and_scripts" id="use_inline_stiles_and_scripts_0" value="0" <?php if (!$row->use_inline_stiles_and_scripts) echo 'checked="checked"'; ?> /><label for="use_inline_stiles_and_scripts_0"><?php echo __('No', 'bwg_back'); ?></label>
1393
+ <div class="spider_description"></div>
1394
+ </td>
1395
+ </tr>
1396
+ <tr>
1397
  <td class="spider_label_options">
1398
  <label><?php echo __('Introduction tour:', 'bwg_back'); ?></label>
1399
  </td>
admin/views/BWGViewThemes_bwg.php CHANGED
@@ -91,7 +91,7 @@ class BWGViewThemes_bwg {
91
  </div>
92
  <div class="tablenav top">
93
  <?php
94
- WDWLibrary::search(__('Title','bwg_back'), $search_value, 'themes_form');
95
  WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'themes_form', $per_page);
96
  ?>
97
  </div>
91
  </div>
92
  <div class="tablenav top">
93
  <?php
94
+ WDWLibrary::search(__('Title','bwg_back'), $search_value, 'themes_form', 'position_search');
95
  WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'themes_form', $per_page);
96
  ?>
97
  </div>
css/bwg_frontend.css CHANGED
@@ -279,4 +279,84 @@ div[id^="bwg_container"] div[id^="bwg_container"] .bwg_img_clear {
279
  .bwg_ctrl_btn_container {
280
  height:auto !important;
281
  }
282
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  .bwg_ctrl_btn_container {
280
  height:auto !important;
281
  }
282
+ }
283
+
284
+ /* search */
285
+ .bwg_search_container_1 {
286
+ display: inline-block;
287
+ width: 100%;
288
+ text-align: right;
289
+ margin: 0 5px 20px 5px;
290
+ background-color: rgba(0,0,0,0);
291
+ }
292
+ .bwg_search_container_2 {
293
+ display: inline-block;
294
+ position: relative;
295
+ border-radius: 4px;
296
+ box-shadow: 0 0 3px 1px #CCCCCC;
297
+ background-color: #FFFFFF;
298
+ border: 1px solid #CCCCCC;
299
+ max-width: 100%;
300
+ }
301
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_search_input_container {
302
+ display: block;
303
+ margin-right: 45px;
304
+ }
305
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_search_loupe_container {
306
+ display: inline-block;
307
+ margin-right: 1px;
308
+ vertical-align: middle;
309
+ float: right;
310
+ padding-top: 3px;
311
+ }
312
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_search_reset_container {
313
+ display: inline-block;
314
+ margin-right: 5px;
315
+ vertical-align: middle;
316
+ float: right;
317
+ padding-top: 3px;
318
+ }
319
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_search,
320
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_reset {
321
+ font-size: 18px;
322
+ color: #CCCCCC;
323
+ cursor: pointer;
324
+ }
325
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_search_input,
326
+ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_search_input:focus {
327
+ color: hsl(0, 1%, 3%);
328
+ outline: none;
329
+ border: none;
330
+ box-shadow: none;
331
+ background: none;
332
+ padding: 0 5px;
333
+ font-family: inherit;
334
+ width: 100%;
335
+ }
336
+ /* end search */
337
+
338
+ /* sort */
339
+ .bwg_order_cont {
340
+ background-color: rgba(0,0,0,0);
341
+ display: block;
342
+ margin: 0 5px 20px 5px;
343
+ text-align: right;
344
+ width: 100%;
345
+ }
346
+ .bwg_order_label {
347
+ border: none;
348
+ box-shadow: none;
349
+ color: #BBBBBB;
350
+ font-family: inherit;
351
+ font-weight: bold;
352
+ outline: none;
353
+ }
354
+ .bwg_order {
355
+ background-color: #FFFFFF;
356
+ border: 1px solid #CCCCCC;
357
+ box-shadow: 0 0 3px 1px #CCCCCC;
358
+ border-radius: 4px;
359
+ height: initial;
360
+ max-width: 100%;
361
+ }
362
+ /* end sort */
framework/WDWLibrary.php CHANGED
@@ -303,7 +303,7 @@ class WDWLibrary {
303
  <span class="displaying-num">
304
  <?php
305
  if ($count_items != 0) {
306
- echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
307
  }
308
  ?>
309
  </span>
@@ -535,7 +535,7 @@ class WDWLibrary {
535
  <?php
536
  if ($theme_row->page_nav_number) {
537
  ?>
538
- <span class="displaying-num_<?php echo $current_view; ?>"><?php echo $count_items . __(' item(s)', 'bwg'); ?></span>
539
  <?php
540
  }
541
  if ($count_items > $limit) {
@@ -668,67 +668,26 @@ class WDWLibrary {
668
  $bwg_search = ((isset($_POST['bwg_search_' . $current_view]) && esc_html($_POST['bwg_search_' . $current_view]) != '') ? esc_html($_POST['bwg_search_' . $current_view]) : '');
669
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
670
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
  ?>
672
- <style>
673
- .bwg_search_container_1 {
674
- display: inline-block;
675
- width: 100%;
676
- text-align: right;
677
- margin: 0 5px 20px 5px;
678
- background-color: rgba(0,0,0,0);
679
- }
680
- .bwg_search_container_2 {
681
- display: inline-block;
682
- position: relative;
683
- border-radius: 4px;
684
- box-shadow: 0 0 3px 1px #CCCCCC;
685
- background-color: #FFFFFF;
686
- border: 1px solid #CCCCCC;
687
- width: <?php echo $search_box_width; ?>px;
688
- max-width: 100%;
689
- }
690
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_search_input_container {
691
- display: block;
692
- margin-right: 45px;
693
- }
694
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_search_loupe_container {
695
- display: inline-block;
696
- margin-right: 1px;
697
- vertical-align: middle;
698
- float: right;
699
- padding-top: 3px;
700
- }
701
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_search_reset_container {
702
- display: inline-block;
703
- margin-right: 5px;
704
- vertical-align: middle;
705
- float: right;
706
- padding-top: 3px;
707
- }
708
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_search,
709
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_reset {
710
- font-size: 18px;
711
- color: #CCCCCC;
712
- cursor: pointer;
713
- }
714
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_search_input_<?php echo $current_view; ?>,
715
- #bwg_search_container_1_<?php echo $current_view; ?> #bwg_search_container_2_<?php echo $current_view; ?> .bwg_search_input_<?php echo $current_view; ?>:focus {
716
- color: hsl(0, 1%, 3%);
717
- outline: none;
718
- border: none;
719
- box-shadow: none;
720
- background: none;
721
- padding: 0 5px;
722
- font-family: inherit;
723
- width: 100%;
724
- }
725
-
726
- </style>
727
  <script type="text/javascript">
728
  function clear_input_<?php echo $current_view; ?> (current_view) {
729
  jQuery("#bwg_search_input_" + current_view).val('');
730
  }
731
- function check_enter_key(e) {
732
  var key_code = e.which || e.keyCode;
733
  if (key_code == 13) {
734
  spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1);
@@ -746,7 +705,7 @@ class WDWLibrary {
746
  <i title="<?php echo __('Search', 'bwg'); ?>" class="bwg_search fa fa-search" onclick="spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
747
  </span>
748
  <span class="bwg_search_input_container">
749
- <input id="bwg_search_input_<?php echo $current_view; ?>" class="bwg_search_input_<?php echo $current_view; ?>" type="text" onkeypress="return check_enter_key(event)" name="bwg_search_<?php echo $current_view; ?>" value="<?php echo $bwg_search; ?>" placeholder="<?php echo $placeholder; ?>" />
750
  <input id="bwg_images_count_<?php echo $current_view; ?>" class="bwg_search_input" type="hidden" name="bwg_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
751
  </span>
752
  </div>
@@ -755,6 +714,10 @@ class WDWLibrary {
755
  }
756
 
757
  public static function ajax_html_frontend_search_tags($form_id, $current_view, $cur_gal_id, $images_count, $tags_rows) {
 
 
 
 
758
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
759
  $bwg_search_tags = (isset($_POST['bwg_tag_id_' . $cur_gal_id]) && $_POST['bwg_tag_id_' . $cur_gal_id] != '' )? $_POST['bwg_tag_id_' . $cur_gal_id] : array();
760
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
@@ -795,35 +758,24 @@ class WDWLibrary {
795
  $bwg_search = ((isset($_POST['bwg_search_' . $current_view]) && esc_html($_POST['bwg_search_' . $current_view]) != '') ? esc_html($_POST['bwg_search_' . $current_view]) : '');
796
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
797
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
 
798
  ?>
799
- <style>
800
- .bwg_order_cont_<?php echo $current_view; ?> {
801
- background-color: rgba(0,0,0,0);
802
- display: block;
803
- margin: 0 5px 20px 5px;
804
- text-align: right;
805
- width: 100%;
806
- }
807
- .bwg_order_label_<?php echo $current_view; ?> {
808
- border: none;
809
- box-shadow: none;
810
- color: #BBBBBB;
811
- font-family: inherit;
812
- font-weight: bold;
813
- outline: none;
814
- }
815
- .bwg_order_<?php echo $current_view; ?> {
816
- background-color: #FFFFFF;
817
- border: 1px solid #CCCCCC;
818
- box-shadow: 0 0 3px 1px #CCCCCC;
819
- border-radius: 4px;
820
- max-width: 100%;
821
- width: <?php echo $search_box_width; ?>px;
822
- }
823
- </style>
824
- <div class="bwg_order_cont_<?php echo $current_view; ?>">
825
- <span class="bwg_order_label_<?php echo $current_view; ?>"><?php echo __('Order by: ', 'bwg'); ?></span>
826
- <select class="bwg_order_<?php echo $current_view; ?>" onchange="spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
827
  <option <?php if ($sort_by == 'default') echo 'selected'; ?> value="default"><?php echo __('Default', 'bwg'); ?></option>
828
  <option <?php if ($sort_by == 'filename') echo 'selected'; ?> value="filename"><?php echo __('Filename', 'bwg'); ?></option>
829
  <option <?php if ($sort_by == 'size') echo 'selected'; ?> value="size"><?php echo __('Size', 'bwg'); ?></option>
@@ -920,6 +872,51 @@ class WDWLibrary {
920
  $google_fonts = array('ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alef' => 'Alef', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alegreya Sans' => 'Alegreya Sans', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra display' => 'Almendra Display', 'Almendra sc' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic sc' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Amiri' => 'Amiri', 'Amita' => 'Amita', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus slab' => 'Arbutus Slab', 'Architects daughter' => 'Architects Daughter', 'Archivo black' => 'Archivo Black', 'Archivo narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Arya' => 'Arya', 'Asap' => 'Asap', 'Asar' => 'Asar', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour one' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Biryani' => 'Biryani', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buda Light 300' => 'Buda Light 300', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambay' => 'Cambay', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Caveat Brush' => 'Caveat Brush', 'Cedarville cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Chonburi' => 'Chonburi', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Dekko' => 'Dekko', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Dhurjati' => 'Dhurjati', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'Eb Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Eczar' => 'Eczar', 'Ek Mukta' => 'Ek Mukta', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Exo 2' => 'Exo 2', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Fauna One' => 'Fauna One', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fira Mono' => 'Fira Mono', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gidugu' => 'Gidugu', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Gurajada' => 'Gurajada', 'Habibi' => 'Habibi', 'Halant' => 'Halant', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Hind' => 'Hind', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Inknut Antiqua' => 'Inknut Antiqua', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Itim' => 'Itim', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jaldi' => 'Jaldi', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kadwa' => 'Kadwa', 'Kameron' => 'Kameron', 'Kanit' => 'Kanit', 'Karla' => 'Karla', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Keania One' => 'Keania One', 'kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khand' => 'Khand', 'Khmer' => 'Khmer', 'Khula' => 'Khula', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'Kurale' => 'Kurale', 'La Belle Aurore' => 'La Belle Aurore', 'Laila' => 'Laila', 'Lakki Reddy' => 'Lakki Reddy', 'Lancelot' => 'Lancelot', 'Lateef' => 'Lateef', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Lily Script One' => 'Lily Script One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Mandali' => 'Mandali', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Martel' => 'Martel', 'Martel Sans' => 'Martel Sans', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modak' => 'Modak', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle:400i', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'NTR' => 'NTR', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old standard tt' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed:300', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Palanquin' => 'Palanquin', 'Palanquin Dark' => 'Palanquin Dark', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Pathway Gothic One' => 'Pathway Gothic One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peddana' => 'Peddana', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Poppins' => 'Poppins', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Pragati Narrow' => 'Pragati Narrow', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Rajdhani' => 'Rajdhani', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Ramabhadra' => 'Ramabhadra', 'Ramaraja' => 'Ramaraja', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Ranga' => 'Ranga', 'Rationale' => 'Rationale', 'Ravi Prakash' => 'Ravi Prakash', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Rhodium Libre' => 'Rhodium Libre', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Roboto Mono' => 'Roboto Mono', 'Roboto Slab' => 'Roboto Slab', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Rozha One' => 'Rozha One', 'Rubik' => 'Rubik', 'Rubik Mono One' => 'Rubik Mono One', 'Rubik One' => 'Rubik One', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sahitya' => 'Sahitya', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Sarpanch' => 'Sarpanch', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slabo 13px' => 'Slabo 13px', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Source Serif Pro' => 'Source Serif Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Sree Krushnadevaraya' => 'Sree Krushnadevaraya', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sumana' => 'Sumana', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Sura' => 'Sura', 'Suranna' => 'Suranna', 'Suravaram' => 'Suravaram', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Teko' => 'Teko', 'Telex' => 'Telex', 'Tenali Ramakrishna' => 'Tenali Ramakrishna', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tillana' => 'Tillana', 'Timmana' => 'Timmana', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook:700', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Work Sans' => 'Work Sans', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yantramanav' => 'Yantramanav', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
921
  return $google_fonts;
922
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
923
 
924
  public static function get_theme_row_data($id) {
925
  global $wpdb;
@@ -990,12 +987,14 @@ class WDWLibrary {
990
  'post_name' => $slug,
991
  'post_status' => 'publish',
992
  'post_title' => $title,
 
993
  'post_type' => $post_type
994
  );
995
  wp_insert_post($post);
996
  }
997
  else {
998
  $bwg_post_id->post_name = $slug;
 
999
  $bwg_post_id->post_content = $shortecode_string;
1000
  wp_update_post($bwg_post_id);
1001
  }
303
  <span class="displaying-num">
304
  <?php
305
  if ($count_items != 0) {
306
+ echo $count_items; ?> <?php echo __('item', 'bwg_back'); ?><?php echo (($count_items == 1) ? '' : 's');
307
  }
308
  ?>
309
  </span>
535
  <?php
536
  if ($theme_row->page_nav_number) {
537
  ?>
538
+ <span class="displaying-num_<?php echo $current_view; ?>"><?php echo $count_items . ' ' . __(' item(s)', 'bwg'); ?></span>
539
  <?php
540
  }
541
  if ($count_items > $limit) {
668
  $bwg_search = ((isset($_POST['bwg_search_' . $current_view]) && esc_html($_POST['bwg_search_' . $current_view]) != '') ? esc_html($_POST['bwg_search_' . $current_view]) : '');
669
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
670
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
671
+ ob_start();
672
+ ?>
673
+ #bwg_search_container_2_<?php echo $current_view; ?> {
674
+ width: <?php echo $search_box_width; ?>px;
675
+ }
676
+ <?php
677
+ global $wd_bwg_inline_stiles;
678
+ $inline_style = ob_get_clean();
679
+ if ($wd_bwg_inline_stiles) {
680
+ wp_add_inline_style('bwg_frontend', $inline_style);
681
+ }
682
+ else {
683
+ echo '<style>' . $inline_style . '</style>';
684
+ }
685
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  <script type="text/javascript">
687
  function clear_input_<?php echo $current_view; ?> (current_view) {
688
  jQuery("#bwg_search_input_" + current_view).val('');
689
  }
690
+ function check_enter_key_<?php echo $current_view; ?>(e) {
691
  var key_code = e.which || e.keyCode;
692
  if (key_code == 13) {
693
  spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1);
705
  <i title="<?php echo __('Search', 'bwg'); ?>" class="bwg_search fa fa-search" onclick="spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
706
  </span>
707
  <span class="bwg_search_input_container">
708
+ <input id="bwg_search_input_<?php echo $current_view; ?>" class="bwg_search_input" type="text" onkeypress="return check_enter_key_<?php echo $current_view; ?>(event)" name="bwg_search_<?php echo $current_view; ?>" value="<?php echo $bwg_search; ?>" placeholder="<?php echo $placeholder; ?>" />
709
  <input id="bwg_images_count_<?php echo $current_view; ?>" class="bwg_search_input" type="hidden" name="bwg_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
710
  </span>
711
  </div>
714
  }
715
 
716
  public static function ajax_html_frontend_search_tags($form_id, $current_view, $cur_gal_id, $images_count, $tags_rows) {
717
+ global $wd_bwg_inline_stiles;
718
+ if ($wd_bwg_inline_stiles) {
719
+ wp_enqueue_style('bwg_sumoselect');
720
+ }
721
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
722
  $bwg_search_tags = (isset($_POST['bwg_tag_id_' . $cur_gal_id]) && $_POST['bwg_tag_id_' . $cur_gal_id] != '' )? $_POST['bwg_tag_id_' . $cur_gal_id] : array();
723
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
758
  $bwg_search = ((isset($_POST['bwg_search_' . $current_view]) && esc_html($_POST['bwg_search_' . $current_view]) != '') ? esc_html($_POST['bwg_search_' . $current_view]) : '');
759
  $type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : 'album');
760
  $album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : 0);
761
+ ob_start();
762
  ?>
763
+ #bwg_order_<?php echo $current_view; ?> {
764
+ width: <?php echo $search_box_width; ?>px;
765
+ }
766
+ <?php
767
+ $inline_style = ob_get_clean();
768
+ global $wd_bwg_inline_stiles;
769
+ if ($wd_bwg_inline_stiles) {
770
+ wp_add_inline_style('bwg_frontend', $inline_style);
771
+ }
772
+ else {
773
+ echo '<style>' . $inline_style . '</style>';
774
+ }
775
+ ?>
776
+ <div class="bwg_order_cont">
777
+ <span class="bwg_order_label"><?php echo __('Order by: ', 'bwg'); ?></span>
778
+ <select id="bwg_order_<?php echo $current_view; ?>" class="bwg_order" onchange="spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
 
 
 
 
 
 
 
 
 
 
 
 
779
  <option <?php if ($sort_by == 'default') echo 'selected'; ?> value="default"><?php echo __('Default', 'bwg'); ?></option>
780
  <option <?php if ($sort_by == 'filename') echo 'selected'; ?> value="filename"><?php echo __('Filename', 'bwg'); ?></option>
781
  <option <?php if ($sort_by == 'size') echo 'selected'; ?> value="size"><?php echo __('Size', 'bwg'); ?></option>
872
  $google_fonts = array('ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alef' => 'Alef', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alegreya Sans' => 'Alegreya Sans', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra display' => 'Almendra Display', 'Almendra sc' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic sc' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Amiri' => 'Amiri', 'Amita' => 'Amita', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus slab' => 'Arbutus Slab', 'Architects daughter' => 'Architects Daughter', 'Archivo black' => 'Archivo Black', 'Archivo narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Arya' => 'Arya', 'Asap' => 'Asap', 'Asar' => 'Asar', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour one' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Biryani' => 'Biryani', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buda Light 300' => 'Buda Light 300', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambay' => 'Cambay', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Caveat Brush' => 'Caveat Brush', 'Cedarville cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Chonburi' => 'Chonburi', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Dekko' => 'Dekko', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Dhurjati' => 'Dhurjati', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'Eb Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Eczar' => 'Eczar', 'Ek Mukta' => 'Ek Mukta', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Exo 2' => 'Exo 2', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Fauna One' => 'Fauna One', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fira Mono' => 'Fira Mono', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gidugu' => 'Gidugu', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Gurajada' => 'Gurajada', 'Habibi' => 'Habibi', 'Halant' => 'Halant', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Hind' => 'Hind', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Inknut Antiqua' => 'Inknut Antiqua', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Itim' => 'Itim', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jaldi' => 'Jaldi', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kadwa' => 'Kadwa', 'Kameron' => 'Kameron', 'Kanit' => 'Kanit', 'Karla' => 'Karla', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Keania One' => 'Keania One', 'kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khand' => 'Khand', 'Khmer' => 'Khmer', 'Khula' => 'Khula', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'Kurale' => 'Kurale', 'La Belle Aurore' => 'La Belle Aurore', 'Laila' => 'Laila', 'Lakki Reddy' => 'Lakki Reddy', 'Lancelot' => 'Lancelot', 'Lateef' => 'Lateef', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Lily Script One' => 'Lily Script One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Mandali' => 'Mandali', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Martel' => 'Martel', 'Martel Sans' => 'Martel Sans', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modak' => 'Modak', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle:400i', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'NTR' => 'NTR', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old standard tt' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed:300', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Palanquin' => 'Palanquin', 'Palanquin Dark' => 'Palanquin Dark', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Pathway Gothic One' => 'Pathway Gothic One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peddana' => 'Peddana', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Poppins' => 'Poppins', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Pragati Narrow' => 'Pragati Narrow', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Rajdhani' => 'Rajdhani', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Ramabhadra' => 'Ramabhadra', 'Ramaraja' => 'Ramaraja', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Ranga' => 'Ranga', 'Rationale' => 'Rationale', 'Ravi Prakash' => 'Ravi Prakash', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Rhodium Libre' => 'Rhodium Libre', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Roboto Mono' => 'Roboto Mono', 'Roboto Slab' => 'Roboto Slab', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Rozha One' => 'Rozha One', 'Rubik' => 'Rubik', 'Rubik Mono One' => 'Rubik Mono One', 'Rubik One' => 'Rubik One', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sahitya' => 'Sahitya', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Sarpanch' => 'Sarpanch', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slabo 13px' => 'Slabo 13px', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Source Serif Pro' => 'Source Serif Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Sree Krushnadevaraya' => 'Sree Krushnadevaraya', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sumana' => 'Sumana', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Sura' => 'Sura', 'Suranna' => 'Suranna', 'Suravaram' => 'Suravaram', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Teko' => 'Teko', 'Telex' => 'Telex', 'Tenali Ramakrishna' => 'Tenali Ramakrishna', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tillana' => 'Tillana', 'Timmana' => 'Timmana', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook:700', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Work Sans' => 'Work Sans', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yantramanav' => 'Yantramanav', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
873
  return $google_fonts;
874
  }
875
+ public static function get_used_google_fonts($theme = null, $shortcode = null) {
876
+ global $wpdb;
877
+ $options_google_font = $wpdb->get_row('SELECT watermark_font FROM ' . $wpdb->prefix . 'bwg_option');
878
+ $google_array = array();
879
+ $google_fonts = self::get_google_fonts();
880
+ if (null === $theme) {
881
+ $theme = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme');
882
+ }
883
+ else {
884
+ $theme = array($theme);
885
+ }
886
+ if (null === $shortcode) {
887
+ $shortcode_google_fonts = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'bwg_shortcode');
888
+ }
889
+ else {
890
+ $shortcode_google_fonts = array($shortcode);
891
+ }
892
+ if ($shortcode_google_fonts) {
893
+ foreach($shortcode_google_fonts as $shortcode_google_font){
894
+ $shortcode_font_string = $shortcode_google_font->tagtext;
895
+ $len_start = strpos($shortcode_font_string, 'watermark_font="');
896
+ $len_current = strpos(substr($shortcode_font_string, $len_start), '"');
897
+ $len_end = strpos(substr(substr($shortcode_font_string, $len_start), $len_current + 1), '"');
898
+ $shortcode_fonts = str_replace('"', '', substr(substr($shortcode_font_string, $len_start), $len_current, $len_end + 1));
899
+ if (true == in_array($shortcode_fonts, $google_fonts)) {
900
+ $google_array[$shortcode_fonts] = $shortcode_fonts;
901
+ }
902
+ }
903
+ }
904
+ if ($theme) {
905
+ foreach ($theme as $row) {
906
+ $options = json_decode($row->options);
907
+ foreach ($options as $option) {
908
+ $is_google_fonts = (in_array((string)$option, $google_fonts)) ? true : false;
909
+ if (true == $is_google_fonts) {
910
+ $google_array[$option] = $option;
911
+ }
912
+ }
913
+ }
914
+ }
915
+ if (true == in_array($options_google_font->watermark_font, $google_fonts)) {
916
+ $google_array[$options_google_font->watermark_font] = $options_google_font->watermark_font;
917
+ }
918
+ return $google_array;
919
+ }
920
 
921
  public static function get_theme_row_data($id) {
922
  global $wpdb;
987
  'post_name' => $slug,
988
  'post_status' => 'publish',
989
  'post_title' => $title,
990
+ 'post_author' => 1,
991
  'post_type' => $post_type
992
  );
993
  wp_insert_post($post);
994
  }
995
  else {
996
  $bwg_post_id->post_name = $slug;
997
+ $bwg_post_id->post_author = 1;
998
  $bwg_post_id->post_content = $shortecode_string;
999
  wp_update_post($bwg_post_id);
1000
  }
frontend/models/BWGModelGalleryBox.php CHANGED
@@ -33,7 +33,7 @@ class BWGModelGalleryBox {
33
  $where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $filter_tags) . ')," ';
34
  }
35
 
36
- $row = $wpdb->get_results('SELECT image.*, rates.rate FROM ' . $wpdb->prefix . 'bwg_image as image LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as rates ON image.id=rates.image_id ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . $sort_by);
37
 
38
  return $row;
39
  }
33
  $where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $filter_tags) . ')," ';
34
  }
35
 
36
+ $row = $wpdb->get_results('SELECT image.*, rates.rate FROM ' . $wpdb->prefix . 'bwg_image as image LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as rates ON image.id=rates.image_id ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . $sort_by . ' ' . $order_by);
37
 
38
  return $row;
39
  }
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -53,7 +53,7 @@ class BWGViewAlbum_compact_preview {
53
  $params['popup_hit_counter'] = 0;
54
  }
55
  if (!isset($params['order_by'])) {
56
- $params['order_by'] = ' ASC ';
57
  }
58
  if (!isset($params['show_sort_images'])) {
59
  $params['show_sort_images'] = 0;
@@ -72,14 +72,14 @@ class BWGViewAlbum_compact_preview {
72
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
73
  $type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
74
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
75
- $sort_direction = ' ' . $params['order_by'] . ' ';
76
 
77
  $play_icon = $options_row->play_icon;
78
  if ($from === "widget") {
79
  $params['album_id'] = $params['id'];
80
  $params['sort_by'] = $params['show'] == 'random' ? 'RAND()' : 'order';
81
  if ($params['show'] == 'last') {
82
- $sort_direction = ' DESC ';
83
  }
84
  $params['compuct_albums_per_page'] = $params['count'];
85
  $params['compuct_album_column_number'] = $options_row->album_column_number;
@@ -197,10 +197,6 @@ class BWGViewAlbum_compact_preview {
197
  $bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : $params['album_id']);
198
  $bwg_previous_album_page_number = (isset($_REQUEST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_page_number_' . $bwg]) : 0);
199
 
200
- $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
201
- $rgb_album_compact_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_compact_thumbs_bg_color);
202
- $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
203
-
204
  $params_array = array(
205
  'action' => 'GalleryBox',
206
  'current_view' => $bwg,
@@ -252,302 +248,21 @@ class BWGViewAlbum_compact_preview {
252
  $params_array_hash = $params_array;
253
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
254
  $image_right_click = $options_row->image_right_click;
255
- ?>
256
- <style>
257
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
258
- display: inline-block;
259
- text-align: center;
260
- }
261
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .<?php echo $album_gallery_div_class; ?> * {
262
- -moz-box-sizing: content-box;
263
- box-sizing: content-box;
264
- }
265
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?> {
266
- background-color: #<?php echo $theme_row->album_compact_thumb_bg_color; ?>;
267
- display: inline-block;
268
- height: <?php echo $params['compuct_album_thumb_height']; ?>px;
269
- margin: <?php echo $theme_row->album_compact_thumb_margin; ?>px;
270
- opacity: <?php echo number_format($theme_row->album_compact_thumb_transparent / 100, 2, ".", ""); ?>;
271
- filter: Alpha(opacity=<?php echo $theme_row->album_compact_thumb_transparent; ?>);
272
- <?php echo ($theme_row->album_compact_thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
273
- padding: <?php echo $theme_row->album_compact_thumb_padding; ?>px;
274
- text-align: center;
275
- vertical-align: middle;
276
- width: <?php echo $params['compuct_album_thumb_width']; ?>px;
277
- z-index: 100;
278
- -webkit-backface-visibility: visible;
279
- -ms-backface-visibility: visible;
280
- }
281
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover {
282
- opacity: 1;
283
- filter: Alpha(opacity=100);
284
- transform: <?php echo $theme_row->album_compact_thumb_hover_effect; ?>(<?php echo $theme_row->album_compact_thumb_hover_effect_value; ?>);
285
- -ms-transform: <?php echo $theme_row->album_compact_thumb_hover_effect; ?>(<?php echo $theme_row->album_compact_thumb_hover_effect_value; ?>);
286
- -webkit-transform: <?php echo $theme_row->album_compact_thumb_hover_effect; ?>(<?php echo $theme_row->album_compact_thumb_hover_effect_value; ?>);
287
- backface-visibility: hidden;
288
- -webkit-backface-visibility: hidden;
289
- -moz-backface-visibility: hidden;
290
- -ms-backface-visibility: hidden;
291
- z-index: 102;
292
- }
293
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun2_<?php echo $bwg; ?> {
294
- border-radius: <?php echo $theme_row->album_compact_thumb_border_radius; ?>;
295
- border: <?php echo $theme_row->album_compact_thumb_border_width; ?>px <?php echo $theme_row->album_compact_thumb_border_style; ?> #<?php echo $theme_row->album_compact_thumb_border_color; ?>;
296
- box-shadow: <?php echo $theme_row->album_compact_thumb_box_shadow; ?>;
297
- display: inline-block;
298
- height: <?php echo $params['compuct_album_thumb_height']; ?>px;
299
- overflow: hidden;
300
- width: <?php echo $params['compuct_album_thumb_width']; ?>px;
301
- }
302
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> {
303
- display: inline-block;
304
- -moz-box-sizing: border-box;
305
- box-sizing: border-box;
306
- background-color: rgba(<?php echo $rgb_album_compact_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_compact_thumb_bg_transparent / 100, 2, ".", ""); ?>);
307
- font-size: 0;
308
- text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
309
- max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
310
- }
311
- <?php
312
- if ($params['compuct_album_title'] == 'show') { /* Show album/gallery title at the bottom.*/
313
- ?>
314
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
315
- display: block;
316
- opacity: 1;
317
- filter: Alpha(opacity=100);
318
- text-align: center;
319
- width: <?php echo $params['compuct_album_thumb_width']; ?>px;
320
- }
321
- <?php
322
- }
323
- elseif ($params['compuct_album_title'] == 'hover') { /* Show album/gallery title on hover.*/
324
- ?>
325
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
326
- display: table;
327
- height: inherit;
328
- left: -3000px;
329
- opacity: 0;
330
- filter: Alpha(opacity=0);
331
- position: absolute;
332
- top: 0px;
333
- width: inherit;
334
- }
335
- <?php
336
- }
337
- ?>
338
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_title_spun1_<?php echo $bwg; ?> {
339
- left: <?php echo $theme_row->album_compact_thumb_padding; ?>px;
340
- top: <?php echo $theme_row->album_compact_thumb_padding; ?>px;
341
- opacity: 1;
342
- filter: Alpha(opacity=100);
343
- }
344
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun2_<?php echo $bwg; ?> {
345
- color: #<?php echo $theme_row->album_compact_title_font_color; ?>;
346
- display: table-cell;
347
- font-family: <?php echo $theme_row->album_compact_title_font_style; ?>;
348
- font-size: <?php echo $theme_row->album_compact_title_font_size; ?>px;
349
- font-weight: <?php echo $theme_row->album_compact_title_font_weight; ?>;
350
- height: inherit;
351
- padding: <?php echo $theme_row->album_compact_title_margin; ?>;
352
- text-shadow: <?php echo $theme_row->album_compact_title_shadow; ?>;
353
- vertical-align: middle;
354
- width: inherit;
355
- }
356
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> {
357
- display: inline-block;
358
- -moz-box-sizing: border-box;
359
- box-sizing: border-box;
360
- background-color: rgba(<?php echo $rgb_album_compact_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_compact_thumb_bg_transparent / 100, 2, ".", ""); ?>);
361
- font-size: 0;
362
- text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
363
- max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
364
- }
365
- /*Image thumbs styles.*/
366
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
367
- background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
368
- display: inline-block;
369
- height: <?php echo $params['compuct_album_image_thumb_height']; ?>px;
370
- margin: <?php echo $theme_row->thumb_margin; ?>px;
371
- opacity: <?php echo number_format($theme_row->thumb_transparent / 100, 2, ".", ""); ?>;
372
- filter: Alpha(opacity=<?php echo $theme_row->thumb_transparent; ?>);
373
- <?php echo ($theme_row->thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
374
- padding: <?php echo $theme_row->thumb_padding; ?>px;
375
- text-align: center;
376
- vertical-align: middle;
377
- width: <?php echo $params['compuct_album_image_thumb_width']; ?>px;
378
- z-index: 100;
379
- }
380
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover {
381
- -ms-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
382
- -webkit-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
383
- backface-visibility: hidden;
384
- -webkit-backface-visibility: hidden;
385
- -moz-backface-visibility: hidden;
386
- -ms-backface-visibility: hidden;
387
- opacity: 1;
388
- filter: Alpha(opacity=100);
389
- transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
390
- z-index: 102;
391
- position: relative;
392
- }
393
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun2_<?php echo $bwg; ?> {
394
- border-radius: <?php echo $theme_row->thumb_border_radius; ?>;
395
- border: <?php echo $theme_row->thumb_border_width; ?>px <?php echo $theme_row->thumb_border_style; ?> #<?php echo $theme_row->thumb_border_color; ?>;
396
- box-shadow: <?php echo $theme_row->thumb_box_shadow; ?>;
397
- display: inline-block;
398
- height: <?php echo $params['compuct_album_image_thumb_height']; ?>px;
399
- overflow: hidden;
400
- width: <?php echo $params['compuct_album_image_thumb_width']; ?>px;
401
- }
402
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> {
403
- -moz-box-sizing: border-box;
404
- display: inline-block;
405
- background-color: rgba(<?php echo $rgb_thumbs_bg_color['red']; ?>, <?php echo $rgb_thumbs_bg_color['green']; ?>, <?php echo $rgb_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->thumb_bg_transparent / 100, 2, ".", ""); ?>);
406
- box-sizing: border-box;
407
- font-size: 0;
408
- max-width: <?php echo $params['compuct_album_image_column_number'] * ($params['compuct_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
409
- text-align: <?php echo $theme_row->thumb_align; ?>;
410
- }
411
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
412
- display: inline-block;
413
- text-align: center;
414
- }
415
- <?php
416
- if ($params['compuct_album_image_title'] == 'show') { /* Show image title at the bottom.*/
417
- ?>
418
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
419
- display: block;
420
- margin: 0 auto;
421
- opacity: 1;
422
- filter: Alpha(opacity=100);
423
- text-align: center;
424
- width: <?php echo $params['compuct_album_thumb_width']; ?>px;
425
- }
426
- <?php
427
- }
428
- elseif ($params['compuct_album_image_title'] == 'hover') { /* Show image title on hover.*/
429
- ?>
430
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
431
- display: table;
432
- height: inherit;
433
- left: -3000px;
434
- opacity: 0;
435
- filter: Alpha(opacity=0);
436
- position: absolute;
437
- top: 0px;
438
- width: inherit;
439
- }
440
- <?php
441
- }
442
- ?>
443
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_image_title_spun1_<?php echo $bwg; ?> {
444
- left: <?php echo $theme_row->thumb_padding; ?>px;
445
- top: <?php echo $theme_row->thumb_padding; ?>px;
446
- opacity: 1;
447
- filter: Alpha(opacity=100);
448
- }
449
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun2_<?php echo $bwg; ?> {
450
- color: #<?php echo $theme_row->thumb_title_font_color; ?>;
451
- display: table-cell;
452
- font-family: <?php echo $theme_row->thumb_title_font_style; ?>;
453
- font-size: <?php echo $theme_row->thumb_title_font_size; ?>px;
454
- font-weight: <?php echo $theme_row->thumb_title_font_weight; ?>;
455
- height: inherit;
456
- margin: <?php echo $theme_row->thumb_title_margin; ?>;
457
- text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
458
- vertical-align: middle;
459
- width: inherit;
460
- word-wrap: break-word;
461
- }
462
- /*Pagination styles.*/
463
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> {
464
- text-align: <?php echo $theme_row->page_nav_align; ?>;
465
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
466
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
467
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
468
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
469
- margin: 6px 0 4px;
470
- display: block;
471
- height: 30px;
472
- line-height: 30px;
473
- }
474
- @media only screen and (max-width : 320px) {
475
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
476
- display: none;
477
- }
478
- }
479
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
480
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
481
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
482
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
483
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
484
- margin-right: 10px;
485
- vertical-align: middle;
486
- }
487
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .paging-input_<?php echo $bwg; ?> {
488
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
489
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
490
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
491
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
492
- vertical-align: middle;
493
- }
494
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled,
495
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:hover,
496
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:focus {
497
- cursor: default;
498
- color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
499
- }
500
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
501
- cursor: pointer;
502
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
503
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
504
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
505
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
506
- text-decoration: none;
507
- padding: <?php echo $theme_row->page_nav_padding; ?>;
508
- margin: <?php echo $theme_row->page_nav_margin; ?>;
509
- border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
510
- border-style: <?php echo $theme_row->page_nav_border_style; ?>;
511
- border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
512
- border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
513
- background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
514
- opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
515
- filter: Alpha(opacity=<?php echo $theme_row->page_nav_button_bg_transparent; ?>);
516
- box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
517
- <?php echo ($theme_row->page_nav_button_transition ) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
518
- }
519
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_back_<?php echo $bwg; ?> {
520
- background-color: rgba(0, 0, 0, 0);
521
- color: #<?php echo $theme_row->album_compact_back_font_color; ?> !important;
522
- cursor: pointer;
523
- display: block;
524
- font-family: <?php echo $theme_row->album_compact_back_font_style; ?>;
525
- font-size: <?php echo $theme_row->album_compact_back_font_size; ?>px;
526
- font-weight: <?php echo $theme_row->album_compact_back_font_weight; ?>;
527
- text-decoration: none;
528
- padding: <?php echo $theme_row->album_compact_back_padding; ?>;
529
- }
530
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
531
- background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
532
- opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
533
- filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
534
- }
535
- .bwg_play_icon_spun_<?php echo $bwg; ?> {
536
- width: inherit;
537
- height: inherit;
538
- display: table;
539
- position: absolute;
540
- }
541
- .bwg_play_icon_<?php echo $bwg; ?> {
542
- color: #<?php echo $theme_row->thumb_title_font_color; ?>;
543
- font-size: <?php echo 2 * $theme_row->thumb_title_font_size; ?>px;
544
- vertical-align: middle;
545
- display: table-cell !important;
546
- z-index: 1;
547
- text-align: center;
548
- margin: 0 auto;
549
- }
550
- </style>
551
  <div id="bwg_container1_<?php echo $bwg; ?>">
552
  <div id="bwg_container2_<?php echo $bwg; ?>">
553
  <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
@@ -882,4 +597,307 @@ class BWGViewAlbum_compact_preview {
882
  die();
883
  }
884
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
885
  }
53
  $params['popup_hit_counter'] = 0;
54
  }
55
  if (!isset($params['order_by'])) {
56
+ $params['order_by'] = 'ASC';
57
  }
58
  if (!isset($params['show_sort_images'])) {
59
  $params['show_sort_images'] = 0;
72
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
73
  $type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
74
  $bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
75
+ $sort_direction = $params['order_by'];
76
 
77
  $play_icon = $options_row->play_icon;
78
  if ($from === "widget") {
79
  $params['album_id'] = $params['id'];
80
  $params['sort_by'] = $params['show'] == 'random' ? 'RAND()' : 'order';
81
  if ($params['show'] == 'last') {
82
+ $sort_direction = 'DESC';
83
  }
84
  $params['compuct_albums_per_page'] = $params['count'];
85
  $params['compuct_album_column_number'] = $options_row->album_column_number;
197
  $bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : $params['album_id']);
198
  $bwg_previous_album_page_number = (isset($_REQUEST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_page_number_' . $bwg]) : 0);
199
 
 
 
 
 
200
  $params_array = array(
201
  'action' => 'GalleryBox',
202
  'current_view' => $bwg,
248
  $params_array_hash = $params_array;
249
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
250
  $image_right_click = $options_row->image_right_click;
251
+
252
+ $inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_gallery_div_class, $items_col_num, $album_view_type);
253
+ global $wd_bwg_inline_stiles;
254
+ if ($wd_bwg_inline_stiles) {
255
+ wp_enqueue_style('bwg_frontend');
256
+ wp_add_inline_style('bwg_frontend', $inline_style);
257
+ wp_enqueue_style('bwg_font-awesome');
258
+ wp_enqueue_style('bwg_mCustomScrollbar');
259
+ $google_fonts = WDWLibrary::get_google_fonts();
260
+ wp_enqueue_style('bwg_googlefonts');
261
+ }
262
+ else {
263
+ echo '<style>' . $inline_style . '</style>';
264
+ }
265
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  <div id="bwg_container1_<?php echo $bwg; ?>">
267
  <div id="bwg_container2_<?php echo $bwg; ?>">
268
  <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
597
  die();
598
  }
599
  }
600
+
601
+ private function inline_styles($bwg, $theme_row, $params, $album_gallery_div_class, $items_col_num, $album_view_type) {
602
+ ob_start();
603
+ $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
604
+ $rgb_album_compact_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_compact_thumbs_bg_color);
605
+ $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
606
+ ?>
607
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
608
+ display: inline-block;
609
+ text-align: center;
610
+ }
611
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .<?php echo $album_gallery_div_class; ?> * {
612
+ -moz-box-sizing: content-box;
613
+ box-sizing: content-box;
614
+ }
615
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?> {
616
+ background-color: #<?php echo $theme_row->album_compact_thumb_bg_color; ?>;
617
+ display: inline-block;
618
+ height: <?php echo $params['compuct_album_thumb_height']; ?>px;
619
+ margin: <?php echo $theme_row->album_compact_thumb_margin; ?>px;
620
+ opacity: <?php echo number_format($theme_row->album_compact_thumb_transparent / 100, 2, ".", ""); ?>;
621
+ filter: Alpha(opacity=<?php echo $theme_row->album_compact_thumb_transparent; ?>);
622
+ <?php echo ($theme_row->album_compact_thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
623
+ padding: <?php echo $theme_row->album_compact_thumb_padding; ?>px;
624
+ text-align: center;
625
+ vertical-align: middle;
626
+ width: <?php echo $params['compuct_album_thumb_width']; ?>px;
627
+ z-index: 100;
628
+ -webkit-backface-visibility: visible;
629
+ -ms-backface-visibility: visible;
630
+ }
631
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover {
632
+ opacity: 1;
633
+ filter: Alpha(opacity=100);
634
+ transform: <?php echo $theme_row->album_compact_thumb_hover_effect; ?>(<?php echo $theme_row->album_compact_thumb_hover_effect_value; ?>);
635
+ -ms-transform: <?php echo $theme_row->album_compact_thumb_hover_effect; ?>(<?php echo $theme_row->album_compact_thumb_hover_effect_value; ?>);
636
+ -webkit-transform: <?php echo $theme_row->album_compact_thumb_hover_effect; ?>(<?php echo $theme_row->album_compact_thumb_hover_effect_value; ?>);
637
+ backface-visibility: hidden;
638
+ -webkit-backface-visibility: hidden;
639
+ -moz-backface-visibility: hidden;
640
+ -ms-backface-visibility: hidden;
641
+ z-index: 102;
642
+ }
643
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun2_<?php echo $bwg; ?> {
644
+ border-radius: <?php echo $theme_row->album_compact_thumb_border_radius; ?>;
645
+ border: <?php echo $theme_row->album_compact_thumb_border_width; ?>px <?php echo $theme_row->album_compact_thumb_border_style; ?> #<?php echo $theme_row->album_compact_thumb_border_color; ?>;
646
+ box-shadow: <?php echo $theme_row->album_compact_thumb_box_shadow; ?>;
647
+ display: inline-block;
648
+ height: <?php echo $params['compuct_album_thumb_height']; ?>px;
649
+ overflow: hidden;
650
+ width: <?php echo $params['compuct_album_thumb_width']; ?>px;
651
+ }
652
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> {
653
+ display: inline-block;
654
+ -moz-box-sizing: border-box;
655
+ box-sizing: border-box;
656
+ background-color: rgba(<?php echo $rgb_album_compact_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_compact_thumb_bg_transparent / 100, 2, ".", ""); ?>);
657
+ font-size: 0;
658
+ text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
659
+ max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
660
+ }
661
+ <?php
662
+ if ($params['compuct_album_title'] == 'show') { /* Show album/gallery title at the bottom.*/
663
+ ?>
664
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
665
+ display: block;
666
+ opacity: 1;
667
+ filter: Alpha(opacity=100);
668
+ text-align: center;
669
+ width: <?php echo $params['compuct_album_thumb_width']; ?>px;
670
+ }
671
+ <?php
672
+ }
673
+ elseif ($params['compuct_album_title'] == 'hover') { /* Show album/gallery title on hover.*/
674
+ ?>
675
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
676
+ display: table;
677
+ height: inherit;
678
+ left: -3000px;
679
+ opacity: 0;
680
+ filter: Alpha(opacity=0);
681
+ position: absolute;
682
+ top: 0px;
683
+ width: inherit;
684
+ }
685
+ <?php
686
+ }
687
+ ?>
688
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_title_spun1_<?php echo $bwg; ?> {
689
+ left: <?php echo $theme_row->album_compact_thumb_padding; ?>px;
690
+ top: <?php echo $theme_row->album_compact_thumb_padding; ?>px;
691
+ opacity: 1;
692
+ filter: Alpha(opacity=100);
693
+ }
694
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun2_<?php echo $bwg; ?> {
695
+ color: #<?php echo $theme_row->album_compact_title_font_color; ?>;
696
+ display: table-cell;
697
+ font-family: <?php echo $theme_row->album_compact_title_font_style; ?>;
698
+ font-size: <?php echo $theme_row->album_compact_title_font_size; ?>px;
699
+ font-weight: <?php echo $theme_row->album_compact_title_font_weight; ?>;
700
+ height: inherit;
701
+ padding: <?php echo $theme_row->album_compact_title_margin; ?>;
702
+ text-shadow: <?php echo $theme_row->album_compact_title_shadow; ?>;
703
+ vertical-align: middle;
704
+ width: inherit;
705
+ }
706
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> {
707
+ display: inline-block;
708
+ -moz-box-sizing: border-box;
709
+ box-sizing: border-box;
710
+ background-color: rgba(<?php echo $rgb_album_compact_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_compact_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_compact_thumb_bg_transparent / 100, 2, ".", ""); ?>);
711
+ font-size: 0;
712
+ text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
713
+ max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
714
+ }
715
+ /*Image thumbs styles.*/
716
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
717
+ background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
718
+ display: inline-block;
719
+ height: <?php echo $params['compuct_album_image_thumb_height']; ?>px;
720
+ margin: <?php echo $theme_row->thumb_margin; ?>px;
721
+ opacity: <?php echo number_format($theme_row->thumb_transparent / 100, 2, ".", ""); ?>;
722
+ filter: Alpha(opacity=<?php echo $theme_row->thumb_transparent; ?>);
723
+ <?php echo ($theme_row->thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
724
+ padding: <?php echo $theme_row->thumb_padding; ?>px;
725
+ text-align: center;
726
+ vertical-align: middle;
727
+ width: <?php echo $params['compuct_album_image_thumb_width']; ?>px;
728
+ z-index: 100;
729
+ }
730
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover {
731
+ -ms-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
732
+ -webkit-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
733
+ backface-visibility: hidden;
734
+ -webkit-backface-visibility: hidden;
735
+ -moz-backface-visibility: hidden;
736
+ -ms-backface-visibility: hidden;
737
+ opacity: 1;
738
+ filter: Alpha(opacity=100);
739
+ transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
740
+ z-index: 102;
741
+ position: relative;
742
+ }
743
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun2_<?php echo $bwg; ?> {
744
+ border-radius: <?php echo $theme_row->thumb_border_radius; ?>;
745
+ border: <?php echo $theme_row->thumb_border_width; ?>px <?php echo $theme_row->thumb_border_style; ?> #<?php echo $theme_row->thumb_border_color; ?>;
746
+ box-shadow: <?php echo $theme_row->thumb_box_shadow; ?>;
747
+ display: inline-block;
748
+ height: <?php echo $params['compuct_album_image_thumb_height']; ?>px;
749
+ overflow: hidden;
750
+ width: <?php echo $params['compuct_album_image_thumb_width']; ?>px;
751
+ }
752
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> {
753
+ -moz-box-sizing: border-box;
754
+ display: inline-block;
755
+ background-color: rgba(<?php echo $rgb_thumbs_bg_color['red']; ?>, <?php echo $rgb_thumbs_bg_color['green']; ?>, <?php echo $rgb_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->thumb_bg_transparent / 100, 2, ".", ""); ?>);
756
+ box-sizing: border-box;
757
+ font-size: 0;
758
+ max-width: <?php echo $params['compuct_album_image_column_number'] * ($params['compuct_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
759
+ text-align: <?php echo $theme_row->thumb_align; ?>;
760
+ }
761
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
762
+ display: inline-block;
763
+ text-align: center;
764
+ }
765
+ <?php
766
+ if ($params['compuct_album_image_title'] == 'show') { /* Show image title at the bottom.*/
767
+ ?>
768
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
769
+ display: block;
770
+ margin: 0 auto;
771
+ opacity: 1;
772
+ filter: Alpha(opacity=100);
773
+ text-align: center;
774
+ width: <?php echo $params['compuct_album_thumb_width']; ?>px;
775
+ }
776
+ <?php
777
+ }
778
+ elseif ($params['compuct_album_image_title'] == 'hover') { /* Show image title on hover.*/
779
+ ?>
780
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
781
+ display: table;
782
+ height: inherit;
783
+ left: -3000px;
784
+ opacity: 0;
785
+ filter: Alpha(opacity=0);
786
+ position: absolute;
787
+ top: 0px;
788
+ width: inherit;
789
+ }
790
+ <?php
791
+ }
792
+ ?>
793
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_image_title_spun1_<?php echo $bwg; ?> {
794
+ left: <?php echo $theme_row->thumb_padding; ?>px;
795
+ top: <?php echo $theme_row->thumb_padding; ?>px;
796
+ opacity: 1;
797
+ filter: Alpha(opacity=100);
798
+ }
799
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun2_<?php echo $bwg; ?> {
800
+ color: #<?php echo $theme_row->thumb_title_font_color; ?>;
801
+ display: table-cell;
802
+ font-family: <?php echo $theme_row->thumb_title_font_style; ?>;
803
+ font-size: <?php echo $theme_row->thumb_title_font_size; ?>px;
804
+ font-weight: <?php echo $theme_row->thumb_title_font_weight; ?>;
805
+ height: inherit;
806
+ margin: <?php echo $theme_row->thumb_title_margin; ?>;
807
+ text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
808
+ vertical-align: middle;
809
+ width: inherit;
810
+ word-wrap: break-word;
811
+ }
812
+ /*Pagination styles.*/
813
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> {
814
+ text-align: <?php echo $theme_row->page_nav_align; ?>;
815
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
816
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
817
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
818
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
819
+ margin: 6px 0 4px;
820
+ display: block;
821
+ height: 30px;
822
+ line-height: 30px;
823
+ }
824
+ @media only screen and (max-width : 320px) {
825
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
826
+ display: none;
827
+ }
828
+ }
829
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
830
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
831
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
832
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
833
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
834
+ margin-right: 10px;
835
+ vertical-align: middle;
836
+ }
837
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .paging-input_<?php echo $bwg; ?> {
838
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
839
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
840
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
841
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
842
+ vertical-align: middle;
843
+ }
844
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled,
845
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:hover,
846
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:focus {
847
+ cursor: default;
848
+ color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
849
+ }
850
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
851
+ cursor: pointer;
852
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
853
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
854
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
855
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
856
+ text-decoration: none;
857
+ padding: <?php echo $theme_row->page_nav_padding; ?>;
858
+ margin: <?php echo $theme_row->page_nav_margin; ?>;
859
+ border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
860
+ border-style: <?php echo $theme_row->page_nav_border_style; ?>;
861
+ border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
862
+ border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
863
+ background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
864
+ opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
865
+ filter: Alpha(opacity=<?php echo $theme_row->page_nav_button_bg_transparent; ?>);
866
+ box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
867
+ <?php echo ($theme_row->page_nav_button_transition ) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
868
+ }
869
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_back_<?php echo $bwg; ?> {
870
+ background-color: rgba(0, 0, 0, 0);
871
+ color: #<?php echo $theme_row->album_compact_back_font_color; ?> !important;
872
+ cursor: pointer;
873
+ display: block;
874
+ font-family: <?php echo $theme_row->album_compact_back_font_style; ?>;
875
+ font-size: <?php echo $theme_row->album_compact_back_font_size; ?>px;
876
+ font-weight: <?php echo $theme_row->album_compact_back_font_weight; ?>;
877
+ text-decoration: none;
878
+ padding: <?php echo $theme_row->album_compact_back_padding; ?>;
879
+ }
880
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
881
+ background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
882
+ opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
883
+ filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
884
+ }
885
+ .bwg_play_icon_spun_<?php echo $bwg; ?> {
886
+ width: inherit;
887
+ height: inherit;
888
+ display: table;
889
+ position: absolute;
890
+ }
891
+ .bwg_play_icon_<?php echo $bwg; ?> {
892
+ color: #<?php echo $theme_row->thumb_title_font_color; ?>;
893
+ font-size: <?php echo 2 * $theme_row->thumb_title_font_size; ?>px;
894
+ vertical-align: middle;
895
+ display: table-cell !important;
896
+ z-index: 1;
897
+ text-align: center;
898
+ margin: 0 auto;
899
+ }
900
+ <?php
901
+ return ob_get_clean();
902
+ }
903
  }
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -56,7 +56,7 @@ class BWGViewAlbum_extended_preview {
56
  $params['popup_hit_counter'] = 0;
57
  }
58
  if (!isset($params['order_by'])) {
59
- $params['order_by'] = ' ASC ';
60
  }
61
  if (!isset($params['show_sort_images'])) {
62
  $params['show_sort_images'] = 0;
@@ -67,7 +67,7 @@ class BWGViewAlbum_extended_preview {
67
  if (!isset($params['extended_album_enable_page'])) {
68
  $params['extended_album_enable_page'] = 1;
69
  }
70
- $sort_direction = ' ' . $params['order_by'] . ' ';
71
  $theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
72
  if (!$theme_row) {
73
  echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
@@ -141,10 +141,6 @@ class BWGViewAlbum_extended_preview {
141
  $bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : $params['album_id']);
142
  $bwg_previous_album_page_number = (isset($_REQUEST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_page_number_' . $bwg]) : 0);
143
 
144
- $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
145
- $rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
146
- $rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
147
- $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
148
  $params_array = array(
149
  'action' => 'GalleryBox',
150
  'current_view' => $bwg,
@@ -195,342 +191,21 @@ class BWGViewAlbum_extended_preview {
195
  }
196
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
197
  $image_right_click = $options_row->image_right_click;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  ?>
199
- <style>
200
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
201
- -moz-box-sizing: border-box;
202
- box-sizing: border-box;
203
- }
204
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> {
205
- display: block;
206
- -moz-box-sizing: border-box;
207
- box-sizing: border-box;
208
- background-color: rgba(<?php echo $rgb_album_extended_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_thumb_bg_transparent / 100, 2, ".", ""); ?>);
209
- font-size: 0;
210
- text-align: <?php echo $theme_row->album_extended_thumb_align; ?>;
211
- max-width: inherit;
212
- }
213
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_div_<?php echo $bwg; ?> {
214
- display: table;
215
- width: 100%;
216
- height: <?php echo $params['extended_album_height']; ?>px;
217
- border-spacing: <?php echo $theme_row->album_extended_div_padding; ?>px;
218
- border-bottom: <?php echo $theme_row->album_extended_div_separator_width; ?>px <?php echo $theme_row->album_extended_div_separator_style; ?> #<?php echo $theme_row->album_extended_div_separator_color; ?>;
219
- background-color: rgba(<?php echo $rgb_album_extended_div_bg_color['red']; ?>, <?php echo $rgb_album_extended_div_bg_color['green']; ?>, <?php echo $rgb_album_extended_div_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_div_bg_transparent / 100, 2, ".", ""); ?>);
220
- border-radius: <?php echo $theme_row->album_extended_div_border_radius; ?>;
221
- margin: <?php echo $theme_row->album_extended_div_margin; ?>;
222
- }
223
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumb_div_<?php echo $bwg; ?> {
224
- background-color: #<?php echo $theme_row->album_extended_thumb_div_bg_color; ?>;
225
- border-radius: <?php echo $theme_row->album_extended_thumb_div_border_radius; ?>;
226
- text-align: center;
227
- border: <?php echo $theme_row->album_extended_thumb_div_border_width; ?>px <?php echo $theme_row->album_extended_thumb_div_border_style; ?> #<?php echo $theme_row->album_extended_thumb_div_border_color; ?>;
228
- display: table-cell;
229
- vertical-align: middle;
230
- padding: <?php echo $theme_row->album_extended_thumb_div_padding; ?>;
231
- }
232
- @media only screen and (max-width : 320px) {
233
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumb_div_<?php echo $bwg; ?> {
234
- display: table-row;
235
- }
236
- }
237
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_text_div_<?php echo $bwg; ?> {
238
- background-color: #<?php echo $theme_row->album_extended_text_div_bg_color; ?>;
239
- border-radius: <?php echo $theme_row->album_extended_text_div_border_radius; ?>;
240
- border: <?php echo $theme_row->album_extended_text_div_border_width; ?>px <?php echo $theme_row->album_extended_text_div_border_style; ?> #<?php echo $theme_row->album_extended_text_div_border_color; ?>;
241
- display: table-cell;
242
- width: 100%;
243
- border-collapse: collapse;
244
- vertical-align: middle;
245
- padding: <?php echo $theme_row->album_extended_text_div_padding; ?>;
246
- }
247
- @media only screen and (max-width : 320px) {
248
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_text_div_<?php echo $bwg; ?> {
249
- display: table-row;
250
- }
251
- }
252
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun_<?php echo $bwg; ?> {
253
- border: <?php echo $theme_row->album_extended_title_span_border_width; ?>px <?php echo $theme_row->album_extended_title_span_border_style; ?> #<?php echo $theme_row->album_extended_title_span_border_color; ?>;
254
- color: #<?php echo $theme_row->album_extended_title_font_color; ?>;
255
- display: block;
256
- font-family: <?php echo $theme_row->album_extended_title_font_style; ?>;
257
- font-size: <?php echo $theme_row->album_extended_title_font_size; ?>px;
258
- font-weight: <?php echo $theme_row->album_extended_title_font_weight; ?>;
259
- height: inherit;
260
- margin-bottom: <?php echo $theme_row->album_extended_title_margin_bottom; ?>px;
261
- padding: <?php echo $theme_row->album_extended_title_padding; ?>;
262
- text-align: left;
263
- vertical-align: middle;
264
- width: inherit;
265
- }
266
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> a {
267
- color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
268
- font-size: <?php echo $theme_row->album_extended_desc_font_size; ?>px;
269
- font-weight: <?php echo $theme_row->album_extended_desc_font_weight; ?>;
270
- font-family: <?php echo $theme_row->album_extended_desc_font_style; ?>;
271
- }
272
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> {
273
- border: <?php echo $theme_row->album_extended_desc_span_border_width; ?>px <?php echo $theme_row->album_extended_desc_span_border_style; ?> #<?php echo $theme_row->album_extended_desc_span_border_color; ?>;
274
- display: inline-block;
275
- color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
276
- font-size: <?php echo $theme_row->album_extended_desc_font_size; ?>px;
277
- font-weight: <?php echo $theme_row->album_extended_desc_font_weight; ?>;
278
- font-family: <?php echo $theme_row->album_extended_desc_font_style; ?>;
279
- height: inherit;
280
- padding: <?php echo $theme_row->album_extended_desc_padding; ?>;
281
- vertical-align: middle;
282
- width: inherit;
283
- word-wrap: break-word;
284
- word-break: break-word;
285
- }
286
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> * {
287
- margin: 0;
288
- text-align: left !important;
289
- }
290
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun2_<?php echo $bwg; ?> {
291
- float: left;
292
- }
293
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_short_<?php echo $bwg; ?> {
294
- display: inline;
295
- }
296
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_full_<?php echo $bwg; ?> {
297
- display: none;
298
- }
299
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_more_<?php echo $bwg; ?> {
300
- clear: both;
301
- color: #<?php echo $theme_row->album_extended_desc_more_color; ?>;
302
- cursor: pointer;
303
- float: right;
304
- font-size: <?php echo $theme_row->album_extended_desc_more_size; ?>px;
305
- font-weight: normal;
306
- }
307
- /*Album thumbs styles.*/
308
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
309
- display: inline-block;
310
- text-align: center;
311
- }
312
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?> {
313
- background-color: #<?php echo $theme_row->album_extended_thumb_bg_color; ?>;
314
- border-radius: <?php echo $theme_row->album_extended_thumb_border_radius; ?>;
315
- border: <?php echo $theme_row->album_extended_thumb_border_width; ?>px <?php echo $theme_row->album_extended_thumb_border_style; ?> #<?php echo $theme_row->album_extended_thumb_border_color; ?>;
316
- box-shadow: <?php echo $theme_row->album_extended_thumb_box_shadow; ?>;
317
- display: inline-block;
318
- height: <?php echo $params['extended_album_thumb_height']; ?>px;
319
- margin: <?php echo $theme_row->album_extended_thumb_margin; ?>px;
320
- opacity: <?php echo number_format($theme_row->album_extended_thumb_transparent / 100, 2, ".", ""); ?>;
321
- filter: Alpha(opacity=<?php echo $theme_row->album_extended_thumb_transparent; ?>);
322
- <?php echo ($theme_row->album_extended_thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
323
- padding: <?php echo $theme_row->album_extended_thumb_padding; ?>px;
324
- text-align: center;
325
- vertical-align: middle;
326
- width: <?php echo $params['extended_album_thumb_width']; ?>px;
327
- z-index: 100;
328
- }
329
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover {
330
- opacity: 1;
331
- filter: Alpha(opacity=100);
332
- transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
333
- -ms-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
334
- -webkit-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
335
- backface-visibility: hidden;
336
- -webkit-backface-visibility: hidden;
337
- -moz-backface-visibility: hidden;
338
- -ms-backface-visibility: hidden;
339
- z-index: 102;
340
- }
341
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun2_<?php echo $bwg; ?> {
342
- display: inline-block;
343
- height: <?php echo $params['extended_album_thumb_height']; ?>px;
344
- overflow: hidden;
345
- width: <?php echo $params['extended_album_thumb_width']; ?>px;
346
- }
347
- /*Image thumbs styles.*/
348
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
349
- background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
350
- border-radius: <?php echo $theme_row->thumb_border_radius; ?>;
351
- border: <?php echo $theme_row->thumb_border_width; ?>px <?php echo $theme_row->thumb_border_style; ?> #<?php echo $theme_row->thumb_border_color; ?>;
352
- box-shadow: <?php echo $theme_row->thumb_box_shadow; ?>;
353
- display: inline-block;
354
- height: <?php echo $params['extended_album_image_thumb_height']; ?>px;
355
- margin: <?php echo $theme_row->thumb_margin; ?>px;
356
- opacity: <?php echo number_format($theme_row->thumb_transparent / 100, 2, ".", ""); ?>;
357
- filter: Alpha(opacity=<?php echo $theme_row->thumb_transparent; ?>);
358
- <?php echo ($theme_row->thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
359
- padding: <?php echo $theme_row->thumb_padding; ?>px;
360
- text-align: center;
361
- vertical-align: middle;
362
- width: <?php echo $params['extended_album_image_thumb_width']; ?>px;
363
- z-index: 100;
364
- }
365
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover {
366
- -ms-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
367
- -webkit-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
368
- backface-visibility: hidden;
369
- -webkit-backface-visibility: hidden;
370
- -moz-backface-visibility: hidden;
371
- -ms-backface-visibility: hidden;
372
- opacity: 1;
373
- filter: Alpha(opacity=100);
374
- transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
375
- z-index: 102;
376
- position: relative;
377
- }
378
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun2_<?php echo $bwg; ?> {
379
- display: inline-block;
380
- height: <?php echo $params['extended_album_image_thumb_height']; ?>px;
381
- overflow: hidden;
382
- width: <?php echo $params['extended_album_image_thumb_width']; ?>px;
383
- }
384
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> {
385
- -moz-box-sizing: border-box;
386
- display: inline-block;
387
- background-color: rgba(<?php echo $rgb_thumbs_bg_color['red']; ?>, <?php echo $rgb_thumbs_bg_color['green']; ?>, <?php echo $rgb_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->thumb_bg_transparent / 100, 2, ".", ""); ?>);
388
- box-sizing: border-box;
389
- font-size: 0;
390
- max-width: <?php echo $params['extended_album_image_column_number'] * ($params['extended_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
391
- text-align: <?php echo $theme_row->thumb_align; ?>;
392
- }
393
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
394
- display: inline-block;
395
- text-align: center;
396
- }
397
- <?php
398
- if ($params['extended_album_image_title'] == 'show') { /* Show image title at the bottom.*/
399
- ?>
400
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
401
- display: block;
402
- margin: 0 auto;
403
- opacity: 1;
404
- filter: Alpha(opacity=100);
405
- text-align: center;
406
- width: <?php echo $params['extended_album_image_thumb_width']; ?>px;
407
- }
408
- <?php
409
- }
410
- elseif ($params['extended_album_image_title'] == 'hover') { /* Show image title on hover.*/
411
- ?>
412
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
413
- display: table;
414
- height: inherit;
415
- left: -3000px;
416
- opacity: 0;
417
- filter: Alpha(opacity=0);
418
- position: absolute;
419
- top: 0px;
420
- width: inherit;
421
- }
422
- <?php
423
- }
424
- ?>
425
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_image_title_spun1_<?php echo $bwg; ?> {
426
- left: <?php echo $theme_row->thumb_padding; ?>px;
427
- top: <?php echo $theme_row->thumb_padding; ?>px;
428
- opacity: 1;
429
- filter: Alpha(opacity=100);
430
- }
431
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun2_<?php echo $bwg; ?> {
432
- color: #<?php echo $theme_row->thumb_title_font_color; ?>;
433
- display: table-cell;
434
- font-family: <?php echo $theme_row->thumb_title_font_style; ?>;
435
- font-size: <?php echo $theme_row->thumb_title_font_size; ?>px;
436
- font-weight: <?php echo $theme_row->thumb_title_font_weight; ?>;
437
- height: inherit;
438
- margin: <?php echo $theme_row->thumb_title_margin; ?>;
439
- text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
440
- vertical-align: middle;
441
- width: inherit;
442
- word-break: break-all;
443
- word-wrap: break-word;
444
- }
445
- /*Pagination styles.*/
446
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> {
447
- text-align: <?php echo $theme_row->page_nav_align; ?>;
448
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
449
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
450
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
451
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
452
- margin: 6px 0 4px;
453
- display: block;
454
- height: 30px;
455
- line-height: 30px;
456
- }
457
- @media only screen and (max-width : 320px) {
458
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
459
- display: none;
460
- }
461
- }
462
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
463
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
464
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
465
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
466
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
467
- margin-right: 10px;
468
- vertical-align: middle;
469
- }
470
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .paging-input_<?php echo $bwg; ?> {
471
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
472
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
473
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
474
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
475
- vertical-align: middle;
476
- }
477
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled,
478
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:hover,
479
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:focus {
480
- cursor: default;
481
- color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
482
- }
483
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
484
- cursor: pointer;
485
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
486
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
487
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
488
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
489
- text-decoration: none;
490
- padding: <?php echo $theme_row->page_nav_padding; ?>;
491
- margin: <?php echo $theme_row->page_nav_margin; ?>;
492
- border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
493
- border-style: <?php echo $theme_row->page_nav_border_style; ?>;
494
- border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
495
- border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
496
- background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
497
- opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
498
- filter: Alpha(opacity=<?php echo $theme_row->page_nav_button_bg_transparent; ?>);
499
- box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
500
- <?php echo ($theme_row->page_nav_button_transition ) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
501
- }
502
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_back_<?php echo $bwg; ?> {
503
- background-color: rgba(0, 0, 0, 0);
504
- color: #<?php echo $theme_row->album_extended_back_font_color; ?> !important;
505
- cursor: pointer;
506
- display: block;
507
- font-family: <?php echo $theme_row->album_extended_back_font_style; ?>;
508
- font-size: <?php echo $theme_row->album_extended_back_font_size; ?>px;
509
- font-weight: <?php echo $theme_row->album_extended_back_font_weight; ?>;
510
- text-decoration: none;
511
- padding: <?php echo $theme_row->album_extended_back_padding; ?>;
512
- }
513
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
514
- background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
515
- opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
516
- filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
517
- }
518
- .bwg_play_icon_spun_<?php echo $bwg; ?> {
519
- width: inherit;
520
- height: inherit;
521
- display: table;
522
- position: absolute;
523
- }
524
- .bwg_play_icon_<?php echo $bwg; ?> {
525
- color: #<?php echo $theme_row->thumb_title_font_color; ?>;
526
- font-size: <?php echo 2 * $theme_row->thumb_title_font_size; ?>px;
527
- vertical-align: middle;
528
- display: table-cell !important;
529
- z-index: 1;
530
- text-align: center;
531
- margin: 0 auto;
532
- }
533
- </style>
534
  <div id="bwg_container1_<?php echo $bwg; ?>">
535
  <div id="bwg_container2_<?php echo $bwg; ?>">
536
  <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
@@ -867,4 +542,348 @@ class BWGViewAlbum_extended_preview {
867
  die();
868
  }
869
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
870
  }
56
  $params['popup_hit_counter'] = 0;
57
  }
58
  if (!isset($params['order_by'])) {
59
+ $params['order_by'] = 'ASC';
60
  }
61
  if (!isset($params['show_sort_images'])) {
62
  $params['show_sort_images'] = 0;
67
  if (!isset($params['extended_album_enable_page'])) {
68
  $params['extended_album_enable_page'] = 1;
69
  }
70
+ $sort_direction = $params['order_by'];
71
  $theme_row = WDWLibrary::get_theme_row_data($params['theme_id']);
72
  if (!$theme_row) {
73
  echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error');
141
  $bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : $params['album_id']);
142
  $bwg_previous_album_page_number = (isset($_REQUEST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_page_number_' . $bwg]) : 0);
143
 
 
 
 
 
144
  $params_array = array(
145
  'action' => 'GalleryBox',
146
  'current_view' => $bwg,
191
  }
192
  $tags_rows = WDWLibrary::get_tags_rows_data($album_gallery_id);
193
  $image_right_click = $options_row->image_right_click;
194
+
195
+ $inline_style = $this->inline_styles($bwg, $theme_row, $params, $album_view_type);
196
+ global $wd_bwg_inline_stiles;
197
+ if ($wd_bwg_inline_stiles) {
198
+ wp_enqueue_style('bwg_frontend');
199
+ wp_add_inline_style('bwg_frontend', $inline_style);
200
+ wp_enqueue_style('bwg_font-awesome');
201
+ wp_enqueue_style('bwg_mCustomScrollbar');
202
+ $google_fonts = WDWLibrary::get_google_fonts();
203
+ wp_enqueue_style('bwg_googlefonts');
204
+ }
205
+ else {
206
+ echo '<style>' . $inline_style . '</style>';
207
+ }
208
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  <div id="bwg_container1_<?php echo $bwg; ?>">
210
  <div id="bwg_container2_<?php echo $bwg; ?>">
211
  <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
542
  die();
543
  }
544
  }
545
+
546
+ private function inline_styles($bwg, $theme_row, $params, $album_view_type) {
547
+ ob_start();
548
+ $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
549
+ $rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
550
+ $rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
551
+ $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
552
+ ?>
553
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
554
+ -moz-box-sizing: border-box;
555
+ box-sizing: border-box;
556
+ }
557
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> {
558
+ display: block;
559
+ -moz-box-sizing: border-box;
560
+ box-sizing: border-box;
561
+ background-color: rgba(<?php echo $rgb_album_extended_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_thumb_bg_transparent / 100, 2, ".", ""); ?>);
562
+ font-size: 0;
563
+ text-align: <?php echo $theme_row->album_extended_thumb_align; ?>;
564
+ max-width: inherit;
565
+ }
566
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_div_<?php echo $bwg; ?> {
567
+ display: table;
568
+ width: 100%;
569
+ height: <?php echo $params['extended_album_height']; ?>px;
570
+ border-spacing: <?php echo $theme_row->album_extended_div_padding; ?>px;
571
+ border-bottom: <?php echo $theme_row->album_extended_div_separator_width; ?>px <?php echo $theme_row->album_extended_div_separator_style; ?> #<?php echo $theme_row->album_extended_div_separator_color; ?>;
572
+ background-color: rgba(<?php echo $rgb_album_extended_div_bg_color['red']; ?>, <?php echo $rgb_album_extended_div_bg_color['green']; ?>, <?php echo $rgb_album_extended_div_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_div_bg_transparent / 100, 2, ".", ""); ?>);
573
+ border-radius: <?php echo $theme_row->album_extended_div_border_radius; ?>;
574
+ margin: <?php echo $theme_row->album_extended_div_margin; ?>;
575
+ }
576
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumb_div_<?php echo $bwg; ?> {
577
+ background-color: #<?php echo $theme_row->album_extended_thumb_div_bg_color; ?>;
578
+ border-radius: <?php echo $theme_row->album_extended_thumb_div_border_radius; ?>;
579
+ text-align: center;
580
+ border: <?php echo $theme_row->album_extended_thumb_div_border_width; ?>px <?php echo $theme_row->album_extended_thumb_div_border_style; ?> #<?php echo $theme_row->album_extended_thumb_div_border_color; ?>;
581
+ display: table-cell;
582
+ vertical-align: middle;
583
+ padding: <?php echo $theme_row->album_extended_thumb_div_padding; ?>;
584
+ }
585
+ @media only screen and (max-width : 320px) {
586
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumb_div_<?php echo $bwg; ?> {
587
+ display: table-row;
588
+ }
589
+ }
590
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_text_div_<?php echo $bwg; ?> {
591
+ background-color: #<?php echo $theme_row->album_extended_text_div_bg_color; ?>;
592
+ border-radius: <?php echo $theme_row->album_extended_text_div_border_radius; ?>;
593
+ border: <?php echo $theme_row->album_extended_text_div_border_width; ?>px <?php echo $theme_row->album_extended_text_div_border_style; ?> #<?php echo $theme_row->album_extended_text_div_border_color; ?>;
594
+ display: table-cell;
595
+ width: 100%;
596
+ border-collapse: collapse;
597
+ vertical-align: middle;
598
+ padding: <?php echo $theme_row->album_extended_text_div_padding; ?>;
599
+ }
600
+ @media only screen and (max-width : 320px) {
601
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_text_div_<?php echo $bwg; ?> {
602
+ display: table-row;
603
+ }
604
+ }
605
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun_<?php echo $bwg; ?> {
606
+ border: <?php echo $theme_row->album_extended_title_span_border_width; ?>px <?php echo $theme_row->album_extended_title_span_border_style; ?> #<?php echo $theme_row->album_extended_title_span_border_color; ?>;
607
+ color: #<?php echo $theme_row->album_extended_title_font_color; ?>;
608
+ display: block;
609
+ font-family: <?php echo $theme_row->album_extended_title_font_style; ?>;
610
+ font-size: <?php echo $theme_row->album_extended_title_font_size; ?>px;
611
+ font-weight: <?php echo $theme_row->album_extended_title_font_weight; ?>;
612
+ height: inherit;
613
+ margin-bottom: <?php echo $theme_row->album_extended_title_margin_bottom; ?>px;
614
+ padding: <?php echo $theme_row->album_extended_title_padding; ?>;
615
+ text-align: left;
616
+ vertical-align: middle;
617
+ width: inherit;
618
+ }
619
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> a {
620
+ color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
621
+ font-size: <?php echo $theme_row->album_extended_desc_font_size; ?>px;
622
+ font-weight: <?php echo $theme_row->album_extended_desc_font_weight; ?>;
623
+ font-family: <?php echo $theme_row->album_extended_desc_font_style; ?>;
624
+ }
625
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> {
626
+ border: <?php echo $theme_row->album_extended_desc_span_border_width; ?>px <?php echo $theme_row->album_extended_desc_span_border_style; ?> #<?php echo $theme_row->album_extended_desc_span_border_color; ?>;
627
+ display: inline-block;
628
+ color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
629
+ font-size: <?php echo $theme_row->album_extended_desc_font_size; ?>px;
630
+ font-weight: <?php echo $theme_row->album_extended_desc_font_weight; ?>;
631
+ font-family: <?php echo $theme_row->album_extended_desc_font_style; ?>;
632
+ height: inherit;
633
+ padding: <?php echo $theme_row->album_extended_desc_padding; ?>;
634
+ vertical-align: middle;
635
+ width: inherit;
636
+ word-wrap: break-word;
637
+ word-break: break-word;
638
+ }
639
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> * {
640
+ margin: 0;
641
+ text-align: left !important;
642
+ }
643
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun2_<?php echo $bwg; ?> {
644
+ float: left;
645
+ }
646
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_short_<?php echo $bwg; ?> {
647
+ display: inline;
648
+ }
649
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_full_<?php echo $bwg; ?> {
650
+ display: none;
651
+ }
652
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_more_<?php echo $bwg; ?> {
653
+ clear: both;
654
+ color: #<?php echo $theme_row->album_extended_desc_more_color; ?>;
655
+ cursor: pointer;
656
+ float: right;
657
+ font-size: <?php echo $theme_row->album_extended_desc_more_size; ?>px;
658
+ font-weight: normal;
659
+ }
660
+ /*Album thumbs styles.*/
661
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
662
+ display: inline-block;
663
+ text-align: center;
664
+ }
665
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?> {
666
+ background-color: #<?php echo $theme_row->album_extended_thumb_bg_color; ?>;
667
+ border-radius: <?php echo $theme_row->album_extended_thumb_border_radius; ?>;
668
+ border: <?php echo $theme_row->album_extended_thumb_border_width; ?>px <?php echo $theme_row->album_extended_thumb_border_style; ?> #<?php echo $theme_row->album_extended_thumb_border_color; ?>;
669
+ box-shadow: <?php echo $theme_row->album_extended_thumb_box_shadow; ?>;
670
+ display: inline-block;
671
+ height: <?php echo $params['extended_album_thumb_height']; ?>px;
672
+ margin: <?php echo $theme_row->album_extended_thumb_margin; ?>px;
673
+ opacity: <?php echo number_format($theme_row->album_extended_thumb_transparent / 100, 2, ".", ""); ?>;
674
+ filter: Alpha(opacity=<?php echo $theme_row->album_extended_thumb_transparent; ?>);
675
+ <?php echo ($theme_row->album_extended_thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
676
+ padding: <?php echo $theme_row->album_extended_thumb_padding; ?>px;
677
+ text-align: center;
678
+ vertical-align: middle;
679
+ width: <?php echo $params['extended_album_thumb_width']; ?>px;
680
+ z-index: 100;
681
+ }
682
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover {
683
+ opacity: 1;
684
+ filter: Alpha(opacity=100);
685
+ transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
686
+ -ms-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
687
+ -webkit-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
688
+ backface-visibility: hidden;
689
+ -webkit-backface-visibility: hidden;
690
+ -moz-backface-visibility: hidden;
691
+ -ms-backface-visibility: hidden;
692
+ z-index: 102;
693
+ }
694
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun2_<?php echo $bwg; ?> {
695
+ display: inline-block;
696
+ height: <?php echo $params['extended_album_thumb_height']; ?>px;
697
+ overflow: hidden;
698
+ width: <?php echo $params['extended_album_thumb_width']; ?>px;
699
+ }
700
+ /*Image thumbs styles.*/
701
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
702
+ background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
703
+ border-radius: <?php echo $theme_row->thumb_border_radius; ?>;
704
+ border: <?php echo $theme_row->thumb_border_width; ?>px <?php echo $theme_row->thumb_border_style; ?> #<?php echo $theme_row->thumb_border_color; ?>;
705
+ box-shadow: <?php echo $theme_row->thumb_box_shadow; ?>;
706
+ display: inline-block;
707
+ height: <?php echo $params['extended_album_image_thumb_height']; ?>px;
708
+ margin: <?php echo $theme_row->thumb_margin; ?>px;
709
+ opacity: <?php echo number_format($theme_row->thumb_transparent / 100, 2, ".", ""); ?>;
710
+ filter: Alpha(opacity=<?php echo $theme_row->thumb_transparent; ?>);
711
+ <?php echo ($theme_row->thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
712
+ padding: <?php echo $theme_row->thumb_padding; ?>px;
713
+ text-align: center;
714
+ vertical-align: middle;
715
+ width: <?php echo $params['extended_album_image_thumb_width']; ?>px;
716
+ z-index: 100;
717
+ }
718
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover {
719
+ -ms-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
720
+ -webkit-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
721
+ backface-visibility: hidden;
722
+ -webkit-backface-visibility: hidden;
723
+ -moz-backface-visibility: hidden;
724
+ -ms-backface-visibility: hidden;
725
+ opacity: 1;
726
+ filter: Alpha(opacity=100);
727
+ transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
728
+ z-index: 102;
729
+ position: relative;
730
+ }
731
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun2_<?php echo $bwg; ?> {
732
+ display: inline-block;
733
+ height: <?php echo $params['extended_album_image_thumb_height']; ?>px;
734
+ overflow: hidden;
735
+ width: <?php echo $params['extended_album_image_thumb_width']; ?>px;
736
+ }
737
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> {
738
+ -moz-box-sizing: border-box;
739
+ display: inline-block;
740
+ background-color: rgba(<?php echo $rgb_thumbs_bg_color['red']; ?>, <?php echo $rgb_thumbs_bg_color['green']; ?>, <?php echo $rgb_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->thumb_bg_transparent / 100, 2, ".", ""); ?>);
741
+ box-sizing: border-box;
742
+ font-size: 0;
743
+ max-width: <?php echo $params['extended_album_image_column_number'] * ($params['extended_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
744
+ text-align: <?php echo $theme_row->thumb_align; ?>;
745
+ }
746
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
747
+ display: inline-block;
748
+ text-align: center;
749
+ }
750
+ <?php
751
+ if ($params['extended_album_image_title'] == 'show') { /* Show image title at the bottom.*/
752
+ ?>
753
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
754
+ display: block;
755
+ margin: 0 auto;
756
+ opacity: 1;
757
+ filter: Alpha(opacity=100);
758
+ text-align: center;
759
+ width: <?php echo $params['extended_album_image_thumb_width']; ?>px;
760
+ }
761
+ <?php
762
+ }
763
+ elseif ($params['extended_album_image_title'] == 'hover') { /* Show image title on hover.*/
764
+ ?>
765
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
766
+ display: table;
767
+ height: inherit;
768
+ left: -3000px;
769
+ opacity: 0;
770
+ filter: Alpha(opacity=0);
771
+ position: absolute;
772
+ top: 0px;
773
+ width: inherit;
774
+ }
775
+ <?php
776
+ }
777
+ ?>
778
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_image_title_spun1_<?php echo $bwg; ?> {
779
+ left: <?php echo $theme_row->thumb_padding; ?>px;
780
+ top: <?php echo $theme_row->thumb_padding; ?>px;
781
+ opacity: 1;
782
+ filter: Alpha(opacity=100);
783
+ }
784
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun2_<?php echo $bwg; ?> {
785
+ color: #<?php echo $theme_row->thumb_title_font_color; ?>;
786
+ display: table-cell;
787
+ font-family: <?php echo $theme_row->thumb_title_font_style; ?>;
788
+ font-size: <?php echo $theme_row->thumb_title_font_size; ?>px;
789
+ font-weight: <?php echo $theme_row->thumb_title_font_weight; ?>;
790
+ height: inherit;
791
+ margin: <?php echo $theme_row->thumb_title_margin; ?>;
792
+ text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
793
+ vertical-align: middle;
794
+ width: inherit;
795
+ word-break: break-all;
796
+ word-wrap: break-word;
797
+ }
798
+ /*Pagination styles.*/
799
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> {
800
+ text-align: <?php echo $theme_row->page_nav_align; ?>;
801
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
802
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
803
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
804
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
805
+ margin: 6px 0 4px;
806
+ display: block;
807
+ height: 30px;
808
+ line-height: 30px;
809
+ }
810
+ @media only screen and (max-width : 320px) {
811
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
812
+ display: none;
813
+ }
814
+ }
815
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
816
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
817
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
818
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
819
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
820
+ margin-right: 10px;
821
+ vertical-align: middle;
822
+ }
823
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .paging-input_<?php echo $bwg; ?> {
824
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
825
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
826
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
827
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
828
+ vertical-align: middle;
829
+ }
830
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled,
831
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:hover,
832
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:focus {
833
+ cursor: default;
834
+ color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
835
+ }
836
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
837
+ cursor: pointer;
838
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
839
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
840
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
841
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
842
+ text-decoration: none;
843
+ padding: <?php echo $theme_row->page_nav_padding; ?>;
844
+ margin: <?php echo $theme_row->page_nav_margin; ?>;
845
+ border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
846
+ border-style: <?php echo $theme_row->page_nav_border_style; ?>;
847
+ border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
848
+ border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
849
+ background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
850
+ opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
851
+ filter: Alpha(opacity=<?php echo $theme_row->page_nav_button_bg_transparent; ?>);
852
+ box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
853
+ <?php echo ($theme_row->page_nav_button_transition ) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
854
+ }
855
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_back_<?php echo $bwg; ?> {
856
+ background-color: rgba(0, 0, 0, 0);
857
+ color: #<?php echo $theme_row->album_extended_back_font_color; ?> !important;
858
+ cursor: pointer;
859
+ display: block;
860
+ font-family: <?php echo $theme_row->album_extended_back_font_style; ?>;
861
+ font-size: <?php echo $theme_row->album_extended_back_font_size; ?>px;
862
+ font-weight: <?php echo $theme_row->album_extended_back_font_weight; ?>;
863
+ text-decoration: none;
864
+ padding: <?php echo $theme_row->album_extended_back_padding; ?>;
865
+ }
866
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
867
+ background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
868
+ opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
869
+ filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
870
+ }
871
+ .bwg_play_icon_spun_<?php echo $bwg; ?> {
872
+ width: inherit;
873
+ height: inherit;
874
+ display: table;
875
+ position: absolute;
876
+ }
877
+ .bwg_play_icon_<?php echo $bwg; ?> {
878
+ color: #<?php echo $theme_row->thumb_title_font_color; ?>;
879
+ font-size: <?php echo 2 * $theme_row->thumb_title_font_size; ?>px;
880
+ vertical-align: middle;
881
+ display: table-cell !important;
882
+ z-index: 1;
883
+ text-align: center;
884
+ margin: 0 auto;
885
+ }
886
+ <?php
887
+ return ob_get_clean();
888
+ }
889
  }
frontend/views/BWGViewImage_browser.php CHANGED
@@ -68,9 +68,6 @@ class BWGViewImage_browser {
68
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error');
69
  }
70
  }
71
- $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
72
- $image_browser_images_conteiner = WDWLibrary::spider_hex2rgb($theme_row->image_browser_full_bg_color);
73
- $bwg_image_browser_image = WDWLibrary::spider_hex2rgb($theme_row->image_browser_bg_color);
74
  $image_title = $params['image_browser_title_enable'];
75
  $enable_image_description = $params['image_browser_description_enable'];
76
  $option_row = WDWLibrary::get_options_row_data();
@@ -159,8 +156,239 @@ class BWGViewImage_browser {
159
  $params_array['watermark_font_size'] = '';
160
  }
161
  $image_browser_image_title_align = (isset($theme_row->image_browser_image_title_align)) ? $theme_row->image_browser_image_title_align : 'top';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  ?>
163
- <style>
164
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .image_browser_images_conteiner_<?php echo $bwg; ?> * {
165
  -moz-box-sizing: border-box;
166
  box-sizing: border-box;
@@ -425,216 +653,7 @@ class BWGViewImage_browser {
425
  -ms-user-select: none;
426
  user-select: none;
427
  }
428
- </style>
429
- <div id="bwg_container1_<?php echo $bwg; ?>">
430
- <div id="bwg_container2_<?php echo $bwg; ?>">
431
- <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
432
- <?php
433
- if ($params['show_search_box']) {
434
- WDWLibrary::ajax_html_frontend_search_box('gal_front_form_' . $bwg, $bwg, 'bwg_standart_thumbnails_' . $bwg, $images_count, $params['search_box_width'], $placeholder);
435
- }
436
- ?>
437
- <div class="image_browser_images_conteiner_<?php echo $bwg; ?>">
438
- <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;width: 100%; z-index: 115; text-align: center; height: 100%; vertical-align: middle; display:none;">
439
- <div style="display: table; vertical-align: middle; width: 100%; height: 100%; background-color: #FFFFFF; opacity: 0.7; filter: Alpha(opacity=70);">
440
- <div style="display: table-cell; text-align: center; position: relative; vertical-align: middle;" >
441
- <div id="loading_div_<?php echo $bwg; ?>" class="bwg_spider_ajax_loading" style="display: inline-block; text-align:center; position:relative; vertical-align:middle; background-image:url(<?php echo WD_BWG_URL . '/images/ajax_loader.gif'; ?>); float: none; width:30px;height:30px;background-size:30px 30px;">
442
- </div>
443
- </div>
444
- </div>
445
- </div>
446
- <div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
447
- <?php
448
- if ( $theme_row->page_nav_position == 'top') {
449
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
450
- }
451
- foreach ($image_rows as $image_row) {
452
- $params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
453
- $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
454
- $is_embed_16x9 = ((preg_match('/EMBED/',$image_row->filetype)==1 ? true : false) && (preg_match('/VIDEO/',$image_row->filetype)==1 ? true : false) && !(preg_match('/INSTAGRAM/',$image_row->filetype)==1 ? true :false));
455
- $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
456
- ?>
457
- <div class="image_browser_image_buttons_conteiner_<?php echo $bwg; ?>">
458
- <div class="image_browser_image_buttons_<?php echo $bwg;?>">
459
- <?php
460
- if ($image_title && ($image_browser_image_title_align == 'top')) {
461
- ?>
462
- <div class="bwg_image_browser_image_alt_<?php echo $bwg; ?>">
463
- <div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
464
- <?php echo html_entity_decode($image_row->alt); ?>
465
- </div>
466
- </div>
467
- <?php
468
- }
469
- ?>
470
- <div class="bwg_image_browser_image_<?php echo $bwg; ?>">
471
- <?php
472
- if ($show_watermark) {
473
- ?>
474
- <div class="bwg_image_browser_image_contain_<?php echo $bwg; ?>" id="bwg_image_browser_image_contain_<?php echo $image_row->id ?>">
475
- <div class="bwg_image_browser_watermark_contain_<?php echo $bwg; ?>">
476
- <div class="bwg_image_browser_watermark_cont_<?php echo $bwg; ?>">
477
- <div <?php echo $watermark_div; ?> >
478
- <a class="bwg_none_selectable <?php echo $watermark_a; ?>" id="watermark_a<?php echo $image_row->id; ?>" href="<?php echo urldecode($params_array['watermark_link']); ?>" target="_blank">
479
- <?php echo $watermark_image_or_text; ?>
480
- </a>
481
- </div>
482
- </div>
483
- </div>
484
- </div>
485
- <?php
486
- }
487
- if (!$is_embed) {
488
- ?>
489
- <a style="position:relative;" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
490
- <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; ?>" />
491
- </a>
492
- <?php
493
- }
494
- else{ /*$is_embed*/
495
-
496
- if($is_embed_16x9){
497
- WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_16x9_".$bwg,'width'=>$params['image_browser_width'], 'height'=>$params['image_browser_width']*0.5625, 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
498
- }
499
- else if($is_embed_instagram_post) {
500
- $instagram_post_width = $params['image_browser_width'];
501
- $instagram_post_height = $params['image_browser_width'];
502
- $image_resolution = explode(' x ', $image_row->resolution);
503
- if (is_array($image_resolution)) {
504
- $instagram_post_width = $image_resolution[0];
505
- $instagram_post_height = explode(' ', $image_resolution[1]);
506
- $instagram_post_height = $instagram_post_height[0];
507
- }
508
- WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class' => "bwg_embed_frame_instapost_" . $bwg, 'data-width' => $instagram_post_width, 'data-height' => $instagram_post_height, 'frameborder' => "0", 'allowfullscreen' => "allowfullscreen", 'style' => "position: relative; margin:0;"));
509
- }
510
- else{/*for instagram image, video and flickr enable lightbox onclick*/
511
- ?>
512
- <a style="position:relative;" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
513
- <?php
514
- WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_".$bwg,'width'=>$params['image_browser_width'], 'height'=>'auto', 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
515
- ?>
516
- </a>
517
-
518
- <?php
519
- }
520
- }
521
- ?>
522
- <script>
523
- function bwg_image_browser_<?php echo $bwg; ?>() {
524
- jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
525
- jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width() * 0.5625);
526
- jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
527
- /* 16 is 2*padding inside iframe */
528
- /* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
529
- jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').height((jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').width() - 16) * jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').attr('data-height') / jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').attr('data-width') + 96);
530
-
531
- var bwg_image_browser_width = jQuery('.image_browser_images_<?php echo $bwg; ?>').width();
532
- if (bwg_image_browser_width <= 108) {
533
- jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
534
- }
535
- else if (bwg_image_browser_width <= 200) {
536
- jQuery('.paging-input_<?php echo $bwg; ?>').css('margin', '0% 0% 0% 0%');
537
- jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'inline');
538
- jQuery('.tablenav-pages_<?php echo $bwg; ?> .next-page').css('margin', '0% 0% 0% 0%');
539
- jQuery('.tablenav-pages_<?php echo $bwg; ?> .prev-page').css('margin', '0% 0% 0% 0%');
540
- }
541
- else if (bwg_image_browser_width <= 580) {
542
- jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'inline');
543
- jQuery('.tablenav-pages_<?php echo $bwg; ?> a').css('font-size', '13px');
544
- jQuery('.paging-input_<?php echo $bwg; ?>').css('margin', '0% 7% 0% 7%');
545
- jQuery('.tablenav-pages_<?php echo $bwg; ?> .next-page').css('margin', '0% 0% 0% 0%');
546
- jQuery('.tablenav-pages_<?php echo $bwg; ?> .prev-page').css('margin', '0% 0% 0% 0%');
547
- }
548
- else {
549
- jQuery('.tablenav-pages_<?php echo $bwg; ?> a').css('font-size', '15px');
550
- jQuery('.paging-input_<?php echo $bwg; ?>').css('margin', '0% 14% 0% 14%');
551
- jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'inline');
552
- jQuery('.tablenav-pages_<?php echo $bwg; ?> .next-page').css('margin', '0% 0% 0% 0%');
553
- jQuery('.tablenav-pages_<?php echo $bwg; ?> .prev-page').css('margin', '0% 0% 0% 0%');
554
- }
555
- }
556
- setTimeout(function() {
557
- bwg_image_browser_<?php echo $bwg; ?>();
558
- }, 3);
559
- </script>
560
- </div>
561
- <?php
562
- if ($image_title && ($image_browser_image_title_align == 'bottom')) {
563
- ?>
564
- <div class="bwg_image_browser_image_alt_<?php echo $bwg; ?>">
565
- <div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
566
- <?php echo html_entity_decode($image_row->alt); ?>
567
- </div>
568
- </div>
569
- <?php
570
- }
571
- if ($enable_image_description && ($image_row->description != "")) {
572
- ?>
573
- <div class="bwg_image_browser_image_desp_<?php echo $bwg; ?>">
574
- <div class="bwg_image_browser_image_description_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
575
- <?php echo html_entity_decode($image_row->description); ?>
576
- </div>
577
- </div>
578
- <?php
579
- }
580
- ?>
581
- </div>
582
- </div>
583
- <?php
584
- }
585
- if ( $theme_row->page_nav_position == 'bottom') {
586
- WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
587
- }
588
- ?>
589
- </div>
590
- </div>
591
- </form>
592
- <div id="bwg_spider_popup_loading_<?php echo $bwg; ?>" class="bwg_spider_popup_loading"></div>
593
- <div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
594
- </div>
595
- </div>
596
- <script>
597
- jQuery(window).load(function () {
598
- <?php
599
- if ($image_right_click) {
600
- ?>
601
- /* Disable right click.*/
602
- jQuery('div[id^="bwg_container"]').bind("contextmenu", function (e) {
603
- return false;
604
- });
605
- jQuery('div[id^="bwg_container"]').css('webkitTouchCallout','none');
606
- <?php
607
- }
608
- ?>
609
- });
610
- jQuery(window).resize(function() {
611
- bwg_image_browser_<?php echo $bwg; ?>();
612
- });
613
- function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
614
- var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
615
- spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&image_id=' + image_id + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
616
- }
617
- function bwg_document_ready_<?php echo $bwg; ?>() {
618
- var bwg_touch_flag = false;
619
- jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
620
- if (!bwg_touch_flag) {
621
- bwg_touch_flag = true;
622
- setTimeout(function(){ bwg_touch_flag = false; }, 100);
623
- bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-image-id"));
624
- return false;
625
- }
626
- });
627
- }
628
- jQuery(document).ready(function () {
629
- bwg_document_ready_<?php echo $bwg; ?>();
630
- });
631
- </script>
632
  <?php
633
- if ($from_shortcode) {
634
- return;
635
- }
636
- else {
637
- die();
638
- }
639
  }
640
  }
68
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error');
69
  }
70
  }
 
 
 
71
  $image_title = $params['image_browser_title_enable'];
72
  $enable_image_description = $params['image_browser_description_enable'];
73
  $option_row = WDWLibrary::get_options_row_data();
156
  $params_array['watermark_font_size'] = '';
157
  }
158
  $image_browser_image_title_align = (isset($theme_row->image_browser_image_title_align)) ? $theme_row->image_browser_image_title_align : 'top';
159
+
160
+ $inline_style = $this->inline_styles($bwg, $theme_row, $params, $params_array, $text_align, $vertical_align);
161
+ global $wd_bwg_inline_stiles;
162
+ if ($wd_bwg_inline_stiles) {
163
+ wp_enqueue_style('bwg_frontend');
164
+ wp_add_inline_style('bwg_frontend', $inline_style);
165
+ wp_enqueue_style('bwg_font-awesome');
166
+ wp_enqueue_style('bwg_mCustomScrollbar');
167
+ $google_fonts = WDWLibrary::get_google_fonts();
168
+ wp_enqueue_style('bwg_googlefonts');
169
+ }
170
+ else {
171
+ echo '<style>' . $inline_style . '</style>';
172
+ }
173
+ ?>
174
+ <div id="bwg_container1_<?php echo $bwg; ?>">
175
+ <div id="bwg_container2_<?php echo $bwg; ?>">
176
+ <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
177
+ <?php
178
+ if ($params['show_search_box']) {
179
+ WDWLibrary::ajax_html_frontend_search_box('gal_front_form_' . $bwg, $bwg, 'bwg_standart_thumbnails_' . $bwg, $images_count, $params['search_box_width'], $placeholder);
180
+ }
181
+ ?>
182
+ <div class="image_browser_images_conteiner_<?php echo $bwg; ?>">
183
+ <div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;width: 100%; z-index: 115; text-align: center; height: 100%; vertical-align: middle; display:none;">
184
+ <div style="display: table; vertical-align: middle; width: 100%; height: 100%; background-color: #FFFFFF; opacity: 0.7; filter: Alpha(opacity=70);">
185
+ <div style="display: table-cell; text-align: center; position: relative; vertical-align: middle;" >
186
+ <div id="loading_div_<?php echo $bwg; ?>" class="bwg_spider_ajax_loading" style="display: inline-block; text-align:center; position:relative; vertical-align:middle; background-image:url(<?php echo WD_BWG_URL . '/images/ajax_loader.gif'; ?>); float: none; width:30px;height:30px;background-size:30px 30px;">
187
+ </div>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
192
+ <?php
193
+ if ( $theme_row->page_nav_position == 'top') {
194
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
195
+ }
196
+ foreach ($image_rows as $image_row) {
197
+ $params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
198
+ $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
199
+ $is_embed_16x9 = ((preg_match('/EMBED/',$image_row->filetype)==1 ? true : false) && (preg_match('/VIDEO/',$image_row->filetype)==1 ? true : false) && !(preg_match('/INSTAGRAM/',$image_row->filetype)==1 ? true :false));
200
+ $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
201
+ ?>
202
+ <div class="image_browser_image_buttons_conteiner_<?php echo $bwg; ?>">
203
+ <div class="image_browser_image_buttons_<?php echo $bwg;?>">
204
+ <?php
205
+ if ($image_title && ($image_browser_image_title_align == 'top')) {
206
+ ?>
207
+ <div class="bwg_image_browser_image_alt_<?php echo $bwg; ?>">
208
+ <div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
209
+ <?php echo html_entity_decode($image_row->alt); ?>
210
+ </div>
211
+ </div>
212
+ <?php
213
+ }
214
+ ?>
215
+ <div class="bwg_image_browser_image_<?php echo $bwg; ?>">
216
+ <?php
217
+ if ($show_watermark) {
218
+ ?>
219
+ <div class="bwg_image_browser_image_contain_<?php echo $bwg; ?>" id="bwg_image_browser_image_contain_<?php echo $image_row->id ?>">
220
+ <div class="bwg_image_browser_watermark_contain_<?php echo $bwg; ?>">
221
+ <div class="bwg_image_browser_watermark_cont_<?php echo $bwg; ?>">
222
+ <div <?php echo $watermark_div; ?> >
223
+ <a class="bwg_none_selectable <?php echo $watermark_a; ?>" id="watermark_a<?php echo $image_row->id; ?>" href="<?php echo urldecode($params_array['watermark_link']); ?>" target="_blank">
224
+ <?php echo $watermark_image_or_text; ?>
225
+ </a>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ </div>
230
+ <?php
231
+ }
232
+ if (!$is_embed) {
233
+ ?>
234
+ <a style="position:relative;" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
235
+ <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; ?>" />
236
+ </a>
237
+ <?php
238
+ }
239
+ else{ /*$is_embed*/
240
+
241
+ if($is_embed_16x9){
242
+ WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_16x9_".$bwg,'width'=>$params['image_browser_width'], 'height'=>$params['image_browser_width']*0.5625, 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
243
+ }
244
+ else if($is_embed_instagram_post) {
245
+ $instagram_post_width = $params['image_browser_width'];
246
+ $instagram_post_height = $params['image_browser_width'];
247
+ $image_resolution = explode(' x ', $image_row->resolution);
248
+ if (is_array($image_resolution)) {
249
+ $instagram_post_width = $image_resolution[0];
250
+ $instagram_post_height = explode(' ', $image_resolution[1]);
251
+ $instagram_post_height = $instagram_post_height[0];
252
+ }
253
+ WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class' => "bwg_embed_frame_instapost_" . $bwg, 'data-width' => $instagram_post_width, 'data-height' => $instagram_post_height, 'frameborder' => "0", 'allowfullscreen' => "allowfullscreen", 'style' => "position: relative; margin:0;"));
254
+ }
255
+ else{/*for instagram image, video and flickr enable lightbox onclick*/
256
+ ?>
257
+ <a style="position:relative;" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
258
+ <?php
259
+ WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_".$bwg,'width'=>$params['image_browser_width'], 'height'=>'auto', 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
260
+ ?>
261
+ </a>
262
+
263
+ <?php
264
+ }
265
+ }
266
+ ?>
267
+ <script>
268
+ function bwg_image_browser_<?php echo $bwg; ?>() {
269
+ jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
270
+ jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width() * 0.5625);
271
+ jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
272
+ /* 16 is 2*padding inside iframe */
273
+ /* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
274
+ jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').height((jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').width() - 16) * jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').attr('data-height') / jQuery('.bwg_embed_frame_instapost_<?php echo $bwg; ?>').attr('data-width') + 96);
275
+
276
+ var bwg_image_browser_width = jQuery('.image_browser_images_<?php echo $bwg; ?>').width();
277
+ if (bwg_image_browser_width <= 108) {
278
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
279
+ }
280
+ else if (bwg_image_browser_width <= 200) {
281
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('margin', '0% 0% 0% 0%');
282
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'inline');
283
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> .next-page').css('margin', '0% 0% 0% 0%');
284
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> .prev-page').css('margin', '0% 0% 0% 0%');
285
+ }
286
+ else if (bwg_image_browser_width <= 580) {
287
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'inline');
288
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> a').css('font-size', '13px');
289
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('margin', '0% 7% 0% 7%');
290
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> .next-page').css('margin', '0% 0% 0% 0%');
291
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> .prev-page').css('margin', '0% 0% 0% 0%');
292
+ }
293
+ else {
294
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> a').css('font-size', '15px');
295
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('margin', '0% 14% 0% 14%');
296
+ jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'inline');
297
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> .next-page').css('margin', '0% 0% 0% 0%');
298
+ jQuery('.tablenav-pages_<?php echo $bwg; ?> .prev-page').css('margin', '0% 0% 0% 0%');
299
+ }
300
+ }
301
+ setTimeout(function() {
302
+ bwg_image_browser_<?php echo $bwg; ?>();
303
+ }, 3);
304
+ </script>
305
+ </div>
306
+ <?php
307
+ if ($image_title && ($image_browser_image_title_align == 'bottom')) {
308
+ ?>
309
+ <div class="bwg_image_browser_image_alt_<?php echo $bwg; ?>">
310
+ <div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
311
+ <?php echo html_entity_decode($image_row->alt); ?>
312
+ </div>
313
+ </div>
314
+ <?php
315
+ }
316
+ if ($enable_image_description && ($image_row->description != "")) {
317
+ ?>
318
+ <div class="bwg_image_browser_image_desp_<?php echo $bwg; ?>">
319
+ <div class="bwg_image_browser_image_description_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
320
+ <?php echo html_entity_decode($image_row->description); ?>
321
+ </div>
322
+ </div>
323
+ <?php
324
+ }
325
+ ?>
326
+ </div>
327
+ </div>
328
+ <?php
329
+ }
330
+ if ( $theme_row->page_nav_position == 'bottom') {
331
+ WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
332
+ }
333
+ ?>
334
+ </div>
335
+ </div>
336
+ </form>
337
+ <div id="bwg_spider_popup_loading_<?php echo $bwg; ?>" class="bwg_spider_popup_loading"></div>
338
+ <div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
339
+ </div>
340
+ </div>
341
+ <script>
342
+ jQuery(window).load(function () {
343
+ <?php
344
+ if ($image_right_click) {
345
+ ?>
346
+ /* Disable right click.*/
347
+ jQuery('div[id^="bwg_container"]').bind("contextmenu", function (e) {
348
+ return false;
349
+ });
350
+ jQuery('div[id^="bwg_container"]').css('webkitTouchCallout','none');
351
+ <?php
352
+ }
353
+ ?>
354
+ });
355
+ jQuery(window).resize(function() {
356
+ bwg_image_browser_<?php echo $bwg; ?>();
357
+ });
358
+ function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
359
+ var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
360
+ spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&image_id=' + image_id + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
361
+ }
362
+ function bwg_document_ready_<?php echo $bwg; ?>() {
363
+ var bwg_touch_flag = false;
364
+ jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
365
+ if (!bwg_touch_flag) {
366
+ bwg_touch_flag = true;
367
+ setTimeout(function(){ bwg_touch_flag = false; }, 100);
368
+ bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-image-id"));
369
+ return false;
370
+ }
371
+ });
372
+ }
373
+ jQuery(document).ready(function () {
374
+ bwg_document_ready_<?php echo $bwg; ?>();
375
+ });
376
+ </script>
377
+ <?php
378
+ if ($from_shortcode) {
379
+ return;
380
+ }
381
+ else {
382
+ die();
383
+ }
384
+ }
385
+
386
+ private function inline_styles($bwg, $theme_row, $params, $params_array, $text_align, $vertical_align) {
387
+ ob_start();
388
+ $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
389
+ $image_browser_images_conteiner = WDWLibrary::spider_hex2rgb($theme_row->image_browser_full_bg_color);
390
+ $bwg_image_browser_image = WDWLibrary::spider_hex2rgb($theme_row->image_browser_bg_color);
391
  ?>
 
392
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .image_browser_images_conteiner_<?php echo $bwg; ?> * {
393
  -moz-box-sizing: border-box;
394
  box-sizing: border-box;
653
  -ms-user-select: none;
654
  user-select: none;
655
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
656
  <?php
657
+ return ob_get_clean();
 
 
 
 
 
658
  }
659
  }
frontend/views/BWGViewSlideshow.php CHANGED
@@ -137,481 +137,40 @@ class BWGViewSlideshow {
137
  $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
138
  }
139
  $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  ?>
141
- <style>
142
- #bwg_container1_<?php echo $bwg; ?> {
143
- visibility: hidden;
144
- }
145
- #bwg_container1_<?php echo $bwg; ?> * {
146
- -moz-user-select: none;
147
- -khtml-user-select: none;
148
- -webkit-user-select: none;
149
- -ms-user-select: none;
150
- user-select: none;
151
- }
152
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_wrap_<?php echo $bwg; ?> * {
153
- box-sizing: border-box;
154
- -moz-box-sizing: border-box;
155
- -webkit-box-sizing: border-box;
156
- /*backface-visibility: hidden;
157
- -webkit-backface-visibility: hidden;
158
- -moz-backface-visibility: hidden;
159
- -ms-backface-visibility: hidden;*/
160
- }
161
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_wrap_<?php echo $bwg; ?> {
162
- background-color: #<?php echo $theme_row->slideshow_cont_bg_color; ?>;
163
- border-collapse: collapse;
164
- display: table;
165
- position: relative;
166
- text-align: center;
167
- width: <?php echo $image_width; ?>px;
168
- height: <?php echo $image_height; ?>px;
169
- }
170
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_<?php echo $bwg; ?> {
171
- padding: 0 !important;
172
- margin: 0 !important;
173
- float: none !important;
174
- max-width: <?php echo $image_width; ?>px;
175
- max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
176
- vertical-align: middle;
177
- }
178
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_embed_<?php echo $bwg; ?> {
179
- padding: 0 !important;
180
- margin: 0 !important;
181
- float: none !important;
182
- width: <?php echo $image_width; ?>px;
183
- height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
184
- vertical-align: middle;
185
- display: inline-block;
186
- text-align: center;
187
- }
188
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_<?php echo $bwg; ?> {
189
- position: relative;
190
- z-index: 15;
191
- }
192
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?> {
193
- background: transparent url("<?php echo WD_BWG_URL . '/images/blank.gif'; ?>") repeat scroll 0 0;
194
- bottom: 0;
195
- cursor: pointer;
196
- display: table;
197
- height: inherit;
198
- outline: medium none;
199
- position: absolute;
200
- width: 30%;
201
- left: 35%;
202
- z-index: 13;
203
- }
204
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?>:hover #bwg_slideshow_play_pause-ico_<?php echo $bwg; ?> {
205
- display: inline-block !important;
206
- }
207
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?>:hover span {
208
- position: relative;
209
- z-index: 13;
210
- }
211
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?> span {
212
- display: table-cell;
213
- text-align: center;
214
- vertical-align: middle;
215
- }
216
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause-ico_<?php echo $bwg; ?> {
217
- display: none !important;
218
- color: #<?php echo $theme_row->slideshow_rl_btn_color; ?>;
219
- font-size: <?php echo $theme_row->slideshow_play_pause_btn_size; ?>px;
220
- cursor: pointer;
221
- position: relative;
222
- z-index: 13;
223
- }
224
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>:hover {
225
- color: #<?php echo $theme_row->slideshow_close_rl_btn_hover_color; ?>;
226
- display: inline-block;
227
- position: relative;
228
- z-index: 13;
229
- }
230
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>,
231
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?> {
232
- background: transparent url("<?php echo WD_BWG_URL . '/images/blank.gif'; ?>") repeat scroll 0 0;
233
- bottom: 35%;
234
- cursor: pointer;
235
- display: inline;
236
- height: 30%;
237
- outline: medium none;
238
- position: absolute;
239
- width: 35%;
240
- /*z-index: 10130;*/
241
- z-index: 13;
242
- }
243
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?> {
244
- left: 0;
245
- }
246
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?> {
247
- right: 0;
248
- }
249
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>:hover,
250
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?>:hover {
251
- visibility: visible;
252
- }
253
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>:hover span {
254
- left: 20px;
255
- }
256
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?>:hover span {
257
- left: auto;
258
- right: 20px;
259
- }
260
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left-ico_<?php echo $bwg; ?> span,
261
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right-ico_<?php echo $bwg; ?> span {
262
- display: table-cell;
263
- text-align: center;
264
- vertical-align: middle;
265
- z-index: 13;
266
- }
267
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left-ico_<?php echo $bwg; ?>,
268
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right-ico_<?php echo $bwg; ?> {
269
- background-color: #<?php echo $theme_row->slideshow_rl_btn_bg_color; ?>;
270
- border-radius: <?php echo $theme_row->slideshow_rl_btn_border_radius; ?>;
271
- border: <?php echo $theme_row->slideshow_rl_btn_border_width; ?>px <?php echo $theme_row->slideshow_rl_btn_border_style; ?> #<?php echo $theme_row->slideshow_rl_btn_border_color; ?>;
272
- box-shadow: <?php echo $theme_row->slideshow_rl_btn_box_shadow; ?>;
273
- color: #<?php echo $theme_row->slideshow_rl_btn_color; ?>;
274
- height: <?php echo $theme_row->slideshow_rl_btn_height; ?>px;
275
- font-size: <?php echo $theme_row->slideshow_rl_btn_size; ?>px;
276
- width: <?php echo $theme_row->slideshow_rl_btn_width; ?>px;
277
- z-index: 13;
278
- -moz-box-sizing: content-box;
279
- box-sizing: content-box;
280
- cursor: pointer;
281
- display: table;
282
- line-height: 0;
283
- margin-top: -15px;
284
- position: absolute;
285
- top: 50%;
286
- /*z-index: 10135;*/
287
- opacity: <?php echo number_format($theme_row->slideshow_close_btn_transparent / 100, 2, ".", ""); ?>;
288
- filter: Alpha(opacity=<?php echo $theme_row->slideshow_close_btn_transparent; ?>);
289
- }
290
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left-ico_<?php echo $bwg; ?>:hover,
291
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right-ico_<?php echo $bwg; ?>:hover {
292
- color: #<?php echo $theme_row->slideshow_close_rl_btn_hover_color; ?>;
293
- cursor: pointer;
294
- }
295
  <?php
296
- if($options_row->autohide_slideshow_navigation){?>
297
- #spider_slideshow_left-ico_<?php echo $bwg; ?>{
298
- left: -9999px;
299
- }
300
- #spider_slideshow_right-ico_<?php echo $bwg; ?>{
301
- left: -9999px;
302
- }
303
-
304
- <?php }
305
- else{ ?>
306
- #spider_slideshow_left-ico_<?php echo $bwg; ?>{
307
- left: 20px;
308
- }
309
- #spider_slideshow_right-ico_<?php echo $bwg; ?>{
310
- left: auto;
311
- right: 20px;
312
- }
313
- <?php } ?>
314
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_container_<?php echo $bwg; ?> {
315
- display: table;
316
- position: absolute;
317
- text-align: center;
318
- <?php echo $theme_row->slideshow_filmstrip_pos; ?>: <?php echo $slideshow_filmstrip_height; ?>px;
319
- vertical-align: middle;
320
- width: <?php echo $image_width; ?>px;
321
- height: <?php echo $image_height; ?>px;
322
- }
323
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_container_<?php echo $bwg; ?> {
324
- display: table;
325
- height: <?php echo $slideshow_filmstrip_height; ?>px;
326
- position: absolute;
327
- width: <?php echo $image_width; ?>px;
328
- /*z-index: 10105;*/
329
- <?php echo $theme_row->slideshow_filmstrip_pos; ?>: 0;
330
- }
331
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_<?php echo $bwg; ?> {
332
- left: 20px;
333
- overflow: hidden;
334
- position: absolute;
335
- width: <?php echo $image_width - 40; ?>px;
336
- /*z-index: 10106;*/
337
- }
338
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?> {
339
- height: <?php echo $slideshow_filmstrip_height; ?>px;
340
- left: 0px;
341
- margin: 0 auto;
342
- overflow: hidden;
343
- position: relative;
344
- width: <?php echo ($slideshow_filmstrip_width + $filmstrip_thumb_margin_hor) * count($image_rows); ?>px;
345
- }
346
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?> {
347
- position: relative;
348
- background: none;
349
- border: <?php echo $theme_row->slideshow_filmstrip_thumb_border_width; ?>px <?php echo $theme_row->slideshow_filmstrip_thumb_border_style; ?> #<?php echo $theme_row->slideshow_filmstrip_thumb_border_color; ?>;
350
- border-radius: <?php echo $theme_row->slideshow_filmstrip_thumb_border_radius; ?>;
351
- cursor: pointer;
352
- float: left;
353
- height: <?php echo $slideshow_filmstrip_height; ?>px;
354
- margin: <?php echo $theme_row->slideshow_filmstrip_thumb_margin; ?>;
355
- width: <?php echo $slideshow_filmstrip_width; ?>px;
356
- overflow: hidden;
357
- }
358
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_thumb_active_<?php echo $bwg; ?> {
359
- opacity: 1;
360
- filter: Alpha(opacity=100);
361
- border: <?php echo $theme_row->slideshow_filmstrip_thumb_active_border_width; ?>px solid #<?php echo $theme_row->slideshow_filmstrip_thumb_active_border_color; ?>;
362
- }
363
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_thumb_deactive_<?php echo $bwg; ?> {
364
- opacity: <?php echo number_format($theme_row->slideshow_filmstrip_thumb_deactive_transparent / 100, 2, ".", ""); ?>;
365
- filter: Alpha(opacity=<?php echo $theme_row->slideshow_filmstrip_thumb_deactive_transparent; ?>);
366
- }
367
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnail_img_<?php echo $bwg; ?> {
368
- display: block;
369
- opacity: 1;
370
- filter: Alpha(opacity=100);
371
- padding: 0 !important;
372
- }
373
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_left_<?php echo $bwg; ?> {
374
- background-color: #<?php echo $theme_row->slideshow_filmstrip_rl_bg_color; ?>;
375
- cursor: pointer;
376
- display: table-cell;
377
- vertical-align: middle;
378
- width: 20px;
379
- /*z-index: 10106;*/
380
- left: 0;
381
- }
382
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_right_<?php echo $bwg; ?> {
383
- background-color: #<?php echo $theme_row->slideshow_filmstrip_rl_bg_color; ?>;
384
- cursor: pointer;
385
- right: 0;
386
- width: 20px;
387
- display: table-cell;
388
- vertical-align: middle;
389
- /*z-index: 10106;*/
390
- }
391
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_left_<?php echo $bwg; ?> i,
392
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_right_<?php echo $bwg; ?> i {
393
- color: #<?php echo $theme_row->slideshow_filmstrip_rl_btn_color; ?>;
394
- font-size: <?php echo $theme_row->slideshow_filmstrip_rl_btn_size; ?>px;
395
- }
396
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_none_selectable_<?php echo $bwg; ?> {
397
- -webkit-touch-callout: none;
398
- -webkit-user-select: none;
399
- -khtml-user-select: none;
400
- -moz-user-select: none;
401
- -ms-user-select: none;
402
- user-select: none;
403
- }
404
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_container_<?php echo $bwg; ?> {
405
- display: table-cell;
406
- margin: 0 auto;
407
- position: relative;
408
- vertical-align: middle;
409
- }
410
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_spun_<?php echo $bwg; ?> {
411
- display: table-cell;
412
- overflow: hidden;
413
- position: relative;
414
- text-align: <?php echo $watermark_position[1]; ?>;
415
- vertical-align: <?php echo $watermark_position[0]; ?>;
416
- }
417
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_title_spun_<?php echo $bwg; ?> {
418
- display: table-cell;
419
- overflow: hidden;
420
- position: relative;
421
- text-align: <?php echo $slideshow_title_position[1]; ?>;
422
- vertical-align: <?php echo $slideshow_title_position[0]; ?>;
423
- }
424
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_description_spun_<?php echo $bwg; ?> {
425
- display: table-cell;
426
- overflow: hidden;
427
- position: relative;
428
- text-align: <?php echo $slideshow_description_position[1]; ?>;
429
- vertical-align: <?php echo $slideshow_description_position[0]; ?>;
430
- }
431
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_image_<?php echo $bwg; ?> {
432
- padding: 0 !important;
433
- float: none !important;
434
- margin: 4px !important;
435
- max-height: <?php echo $watermark_height; ?>px;
436
- max-width: <?php echo $watermark_width; ?>px;
437
- opacity: <?php echo number_format($watermark_opacity / 100, 2, ".", ""); ?>;
438
- filter: Alpha(opacity=<?php echo $watermark_opacity; ?>);
439
- position: relative;
440
- z-index: 15;
441
- }
442
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_text_<?php echo $bwg; ?>,
443
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_text_<?php echo $bwg; ?>:hover {
444
- text-decoration: none;
445
- margin: 4px;
446
- font-size: <?php echo $watermark_font_size; ?>px;
447
- font-family: <?php echo $watermark_font; ?>;
448
- color: #<?php echo $watermark_color; ?> !important;
449
- opacity: <?php echo number_format($watermark_opacity / 100, 2, ".", ""); ?>;
450
- filter: Alpha(opacity=<?php echo $watermark_opacity; ?>);
451
- position: relative;
452
- z-index: 15;
453
- }
454
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_title_text_<?php echo $bwg; ?> {
455
- text-decoration: none;
456
- font-size: <?php echo $theme_row->slideshow_title_font_size; ?>px;
457
- font-family: <?php echo $theme_row->slideshow_title_font; ?>;
458
- color: #<?php echo $theme_row->slideshow_title_color; ?> !important;
459
- opacity: <?php echo number_format($theme_row->slideshow_title_opacity / 100, 2, ".", ""); ?>;
460
- filter: Alpha(opacity=<?php echo $theme_row->slideshow_title_opacity; ?>);
461
- position: relative;
462
- z-index: 11;
463
- border-radius: <?php echo $theme_row->slideshow_title_border_radius; ?>;
464
- background-color: #<?php echo $theme_row->slideshow_title_background_color; ?>;
465
- padding: <?php echo $theme_row->slideshow_title_padding; ?>;
466
- <?php if($params['slideshow_title_full_width']) { ?>
467
- width: 100%;
468
- <?php } else { ?>
469
- margin: 5px;
470
- <?php } ?>
471
- display: inline-block;
472
- word-wrap: break-word;
473
- word-break: break-word;
474
- <?php if (!$enable_slideshow_filmstrip && $slideshow_title_position[0] == $theme_row->slideshow_filmstrip_pos) echo $theme_row->slideshow_filmstrip_pos . ':' . ($theme_row->slideshow_dots_height + 4) . 'px;'; ?>
475
- }
476
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_description_text_<?php echo $bwg; ?> {
477
- text-decoration: none;
478
- font-size: <?php echo $theme_row->slideshow_description_font_size; ?>px;
479
- font-family: <?php echo $theme_row->slideshow_description_font; ?>;
480
- color: #<?php echo $theme_row->slideshow_description_color; ?> !important;
481
- opacity: <?php echo number_format($theme_row->slideshow_description_opacity / 100, 2, ".", ""); ?>;
482
- filter: Alpha(opacity=<?php echo $theme_row->slideshow_description_opacity; ?>);
483
- position: relative;
484
- z-index: 15;
485
- border-radius: <?php echo $theme_row->slideshow_description_border_radius; ?>;
486
- background-color: #<?php echo $theme_row->slideshow_description_background_color; ?>;
487
- padding: <?php echo $theme_row->slideshow_description_padding; ?>;
488
- margin: 5px;
489
- display: inline-block;
490
- word-wrap: break-word;
491
- word-break: break-word;
492
- <?php if (!$enable_slideshow_filmstrip && $slideshow_description_position[0] == $theme_row->slideshow_filmstrip_pos) echo $theme_row->slideshow_filmstrip_pos . ':' . ($theme_row->slideshow_dots_height + 4) . 'px;'; ?>
493
- }
494
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_description_text_<?php echo $bwg; ?> * {
495
- text-decoration: none;
496
- color: #<?php echo $theme_row->slideshow_description_color; ?> !important;
497
- }
498
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slide_container_<?php echo $bwg; ?> {
499
- display: table-cell;
500
- margin: 0 auto;
501
- position: absolute;
502
- vertical-align: middle;
503
- width: 100%;
504
- height: 100%;
505
- }
506
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slide_bg_<?php echo $bwg; ?> {
507
- margin: 0 auto;
508
- width: inherit;
509
- height: inherit;
510
- }
511
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slider_<?php echo $bwg; ?> {
512
- height: inherit;
513
- width: inherit;
514
- }
515
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_spun_<?php echo $bwg; ?> {
516
- width: inherit;
517
- height: inherit;
518
- display: table-cell;
519
- filter: Alpha(opacity=100);
520
- opacity: 1;
521
- position: absolute;
522
- vertical-align: middle;
523
- z-index: 2;
524
- }
525
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_second_spun_<?php echo $bwg; ?> {
526
- width: inherit;
527
- height: inherit;
528
- display: table-cell;
529
- filter: Alpha(opacity=0);
530
- opacity: 0;
531
- position: absolute;
532
- vertical-align: middle;
533
- z-index: 1;
534
- }
535
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_grid_<?php echo $bwg; ?> {
536
- display: none;
537
- height: 100%;
538
- overflow: hidden;
539
- position: absolute;
540
- width: 100%;
541
- }
542
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_gridlet_<?php echo $bwg; ?> {
543
- opacity: 1;
544
- filter: Alpha(opacity=100);
545
- position: absolute;
546
- }
547
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_<?php echo $bwg; ?> {
548
- display: inline-block;
549
- position: relative;
550
- width: <?php echo $theme_row->slideshow_dots_width; ?>px;
551
- height: <?php echo $theme_row->slideshow_dots_height; ?>px;
552
- border-radius: <?php echo $theme_row->slideshow_dots_border_radius; ?>;
553
- background: #<?php echo $theme_row->slideshow_dots_background_color; ?>;
554
- margin: <?php echo $theme_row->slideshow_dots_margin; ?>px;
555
- cursor: pointer;
556
- overflow: hidden;
557
- z-index: 17;
558
- }
559
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_container_<?php echo $bwg; ?> {
560
- display: block;
561
- overflow: hidden;
562
- position: absolute;
563
- width: <?php echo $image_width; ?>px;
564
- <?php echo $theme_row->slideshow_filmstrip_pos; ?>: 0;
565
- z-index: 17;
566
- }
567
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?> {
568
- left: 0px;
569
- font-size: 0;
570
- margin: 0 auto;
571
- overflow: hidden;
572
- position: relative;
573
- height: <?php echo ($theme_row->slideshow_dots_height + $theme_row->slideshow_dots_margin * 2); ?>px;
574
- width: <?php echo ($theme_row->slideshow_dots_width + $theme_row->slideshow_dots_margin * 2) * count($image_rows); ?>px;
575
- }
576
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_active_<?php echo $bwg; ?> {
577
- background: #<?php echo $theme_row->slideshow_dots_active_background_color; ?>;
578
- opacity: 1;
579
- filter: Alpha(opacity=100);
580
- border: <?php echo $theme_row->slideshow_dots_active_border_width; ?>px solid #<?php echo $theme_row->slideshow_dots_active_border_color; ?>;
581
- }
582
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_deactive_<?php echo $bwg; ?> {
583
- }
584
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_spun1_<?php echo $bwg; ?> {
585
- display: table;
586
- width: inherit;
587
- height: inherit;
588
- }
589
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_spun2_<?php echo $bwg; ?> {
590
- display: table-cell;
591
- vertical-align: middle;
592
- text-align: center;
593
- }
594
- </style>
595
- <script>
596
- var data_<?php echo $bwg; ?> = [];
597
- var event_stack_<?php echo $bwg; ?> = [];
598
- <?php
599
- foreach ($image_rows as $key => $image_row) {
600
- if ($image_row->id == $current_image_id) {
601
- $current_image_alt = $image_row->alt;
602
- $current_image_description = str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description);
603
- }
604
- ?>
605
- data_<?php echo $bwg; ?>["<?php echo $key; ?>"] = [];
606
- data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
607
- data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; ?>";
608
- data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["description"] = "<?php echo str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description); ?>";
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_embed"] = "<?php echo (preg_match('/EMBED/',$image_row->filetype)==1 ? true :false); ?>";
613
- data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["is_embed_video"] = "<?php echo (((preg_match('/EMBED/',$image_row->filetype)==1) && (preg_match('/_VIDEO/',$image_row->filetype)==1)) ? true :false); ?>";
614
- <?php
615
  }
616
  ?>
617
  </script>
@@ -928,624 +487,1083 @@ class BWGViewSlideshow {
928
  });
929
  }
930
  }
931
- function bwg_move_dots_<?php echo $bwg; ?>() {
932
- var image_left = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left;
933
- var image_right = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left + jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").outerWidth(true);
934
- var bwg_dots_width = jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").outerWidth(true);
935
- var bwg_dots_thumbnails_width = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").outerWidth(false);
936
- var long_filmstrip_cont_left = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left;
937
- var long_filmstrip_cont_right = Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left) + bwg_dots_width;
938
- if (bwg_dots_width > bwg_dots_thumbnails_width) {
939
- return;
940
- }
941
- if (image_left < Math.abs(long_filmstrip_cont_left)) {
942
- jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").animate({
943
- left: -image_left
944
- }, {
945
- duration: 500,
946
- complete: function () { }
947
- });
948
- }
949
- else if (image_right > long_filmstrip_cont_right) {
950
- jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").animate({
951
- left: -(image_right - bwg_dots_width)
952
- }, {
953
- duration: 500,
954
- complete: function () { }
955
- });
956
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
957
  }
958
- /* Show/hide filmstrip arrows.*/
959
- function bwg_filmstrip_arrows_<?php echo $bwg; ?>() {
960
- if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() < jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width()) {
961
- jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").hide();
962
- jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").hide();
963
- }
964
- else {
965
- jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").show();
966
- jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").show();
967
- }
968
  }
969
- function bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>() {
970
- return bwg_testDom_<?php echo $bwg; ?>('Transition');
 
 
 
 
971
  }
972
- function bwg_testBrowser_cssTransforms3d_<?php echo $bwg; ?>() {
973
- return bwg_testDom_<?php echo $bwg; ?>('Perspective');
 
 
 
 
974
  }
975
- function bwg_testDom_<?php echo $bwg; ?>(prop) {
976
- /* Browser vendor CSS prefixes.*/
977
- var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
978
- /* Browser vendor DOM prefixes.*/
979
- var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
980
- var i = domPrefixes.length;
981
- while (i--) {
982
- if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') {
983
- return true;
984
- }
985
- }
986
- return false;
987
  }
988
- function bwg_cube_<?php echo $bwg; ?>(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
989
- /* If browser does not support 3d transforms/CSS transitions.*/
990
- if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
991
- return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
992
- }
993
- if (!bwg_testBrowser_cssTransforms3d_<?php echo $bwg; ?>()) {
994
- return bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
995
- }
996
- bwg_trans_in_progress_<?php echo $bwg; ?> = true;
997
- /* Set active thumbnail.*/
998
- jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
999
- jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
1000
- jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
1001
- jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
1002
- jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").css('perspective', 1000);
1003
- jQuery(current_image_class).css({
1004
- transform : 'translateZ(' + tz + 'px)',
1005
- backfaceVisibility : 'hidden'
1006
- });
1007
- jQuery(next_image_class).css({
1008
- opacity : 1,
1009
- filter: 'Alpha(opacity=100)',
1010
- zIndex: 2,
1011
- backfaceVisibility : 'hidden',
1012
- transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)'
1013
- });
1014
- jQuery(".bwg_slider_<?php echo $bwg; ?>").css({
1015
- transform: 'translateZ(-' + tz + 'px)',
1016
- transformStyle: 'preserve-3d'
1017
- });
1018
- /* Execution steps.*/
1019
- setTimeout(function () {
1020
- jQuery(".bwg_slider_<?php echo $bwg; ?>").css({
1021
- transition: 'all ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms ease-in-out',
1022
- transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
1023
- });
1024
- }, 20);
1025
- /* After transition.*/
1026
- jQuery(".bwg_slider_<?php echo $bwg; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
1027
- function bwg_after_trans() {
1028
- /*if (bwg_from_focus_<?php echo $bwg; ?>) {
1029
- bwg_from_focus_<?php echo $bwg; ?> = false;
1030
- return;
1031
- }*/
1032
- jQuery(current_image_class).removeAttr('style');
1033
- jQuery(next_image_class).removeAttr('style');
1034
- jQuery(".bwg_slider_<?php echo $bwg; ?>").removeAttr('style');
1035
- jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
1036
- jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
1037
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1038
- bwg_trans_in_progress_<?php echo $bwg; ?> = false;
1039
- if (typeof event_stack_<?php echo $bwg; ?> !== 'undefined') {
1040
- if (event_stack_<?php echo $bwg; ?>.length > 0) {
1041
- key = event_stack_<?php echo $bwg; ?>[0].split("-");
1042
- event_stack_<?php echo $bwg; ?>.shift();
1043
- bwg_change_image_<?php echo $bwg; ?>(key[0], key[1], data_<?php echo $bwg; ?>, true);
1044
- }
1045
- }
1046
- }
1047
  }
1048
- function bwg_cubeH_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1049
- /* Set to half of image width.*/
1050
- var dimension = jQuery(current_image_class).width() / 2;
1051
- if (direction == 'right') {
1052
- bwg_cube_<?php echo $bwg; ?>(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
1053
- }
1054
- else if (direction == 'left') {
1055
- bwg_cube_<?php echo $bwg; ?>(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
1056
- }
 
 
 
 
 
 
 
 
 
 
 
 
1057
  }
1058
- /* For browsers that does not support transitions.*/
1059
- function bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1060
- bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1061
  }
1062
- /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
1063
- function bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1064
- bwg_sliceV_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
1065
  }
1066
- function bwg_none_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1067
- jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
1068
- jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
1069
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1070
- /* Set active thumbnail.*/
1071
- jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
1072
- jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
1073
- jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
1074
- jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
1075
  }
1076
- function bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1077
- /* Set active thumbnail.*/
1078
- jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
1079
- jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
1080
- jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
1081
- jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
1082
- if (bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
1083
- jQuery(next_image_class).css('transition', 'opacity ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms linear');
1084
- jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
1085
- jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
1086
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1087
- }
1088
- else {
1089
- jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, bwg_transition_duration_<?php echo $bwg; ?>);
1090
- jQuery(next_image_class).animate({
1091
- 'opacity' : 1,
1092
- 'z-index': 2
1093
- }, {
1094
- duration: bwg_transition_duration_<?php echo $bwg; ?>,
1095
- complete: function () { bwg_change_watermark_container_<?php echo $bwg; ?>(); }
1096
- });
1097
- /* For IE.*/
1098
- jQuery(current_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 0);
1099
- jQuery(next_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 1);
1100
- }
1101
  }
1102
- function bwg_grid_<?php echo $bwg; ?>(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
1103
- /* If browser does not support CSS transitions.*/
1104
- if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
1105
- return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
1106
- }
1107
- bwg_trans_in_progress_<?php echo $bwg; ?> = true;
1108
- /* Set active thumbnail.*/
1109
- jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
1110
- jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
1111
- jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
1112
- jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
1113
- /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
1114
- var count = (bwg_transition_duration_<?php echo $bwg; ?>) / (cols + rows);
1115
- /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
1116
- function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
1117
- var delay = (c + r) * count;
1118
- /* Return a gridlet elem with styles for specific transition.*/
1119
- return jQuery('<span class="bwg_gridlet_<?php echo $bwg; ?>" />').css({
1120
- display : "block",
1121
- width : width,
1122
- height : height,
1123
- top : top,
1124
- left : left,
1125
- backgroundImage : 'url("' + src + '")',
1126
- backgroundColor: jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css("background-color"),
1127
- /*backgroundColor: rgba(0, 0, 0, 0),*/
1128
- backgroundRepeat: 'no-repeat',
1129
- backgroundPosition : img_left + 'px ' + img_top + 'px',
1130
- backgroundSize : imgWidth + 'px ' + imgHeight + 'px',
1131
- transition : 'all ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms ease-in-out ' + delay + 'ms',
1132
- transform : 'none'
1133
- });
1134
- }
1135
- /* Get the current slide's image.*/
1136
- var cur_img = jQuery(current_image_class).find('img');
1137
- /* Create a grid to hold the gridlets.*/
1138
- var grid = jQuery('<span style="display: block;" />').addClass('bwg_grid_<?php echo $bwg; ?>');
1139
- /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
1140
- jQuery(current_image_class).prepend(grid);
1141
- /* vars to calculate positioning/size of gridlets*/
1142
- var cont = jQuery(".bwg_slide_bg_<?php echo $bwg; ?>");
1143
- var imgWidth = cur_img.width();
1144
- var imgHeight = cur_img.height();
1145
- var contWidth = cont.width(),
1146
- contHeight = cont.height(),
1147
- imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/
1148
- colWidth = Math.floor(contWidth / cols),
1149
- rowHeight = Math.floor(contHeight / rows),
1150
- colRemainder = contWidth - (cols * colWidth),
1151
- colAdd = Math.ceil(colRemainder / cols),
1152
- rowRemainder = contHeight - (rows * rowHeight),
1153
- rowAdd = Math.ceil(rowRemainder / rows),
1154
- leftDist = 0,
1155
- img_leftDist = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").width() - cur_img.width()) / 2;
1156
- /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
1157
- tx = tx === 'auto' ? contWidth : tx;
1158
- tx = tx === 'min-auto' ? - contWidth : tx;
1159
- ty = ty === 'auto' ? contHeight : ty;
1160
- ty = ty === 'min-auto' ? - contHeight : ty;
1161
- /* Loop through cols*/
1162
- for (var i = 0; i < cols; i++) {
1163
- var topDist = 0,
1164
- img_topDst = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").height() - cur_img.height()) / 2,
1165
- newColWidth = colWidth;
1166
- /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
1167
- if (colRemainder > 0) {
1168
- var add = colRemainder >= colAdd ? colAdd : colRemainder;
1169
- newColWidth += add;
1170
- colRemainder -= add;
1171
- }
1172
- /* Nested loop to create row gridlets for each col.*/
1173
- for (var j = 0; j < rows; j++) {
1174
- var newRowHeight = rowHeight,
1175
- newRowRemainder = rowRemainder;
1176
- /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
1177
- if (newRowRemainder > 0) {
1178
- add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
1179
- newRowHeight += add;
1180
- newRowRemainder -= add;
1181
- }
1182
- /* Create & append gridlet to grid.*/
1183
- grid.append(bwg_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
1184
- topDist += newRowHeight;
1185
- img_topDst -= newRowHeight;
1186
- }
1187
- img_leftDist -= newColWidth;
1188
- leftDist += newColWidth;
1189
- }
1190
- /* Set event listener on last gridlet to finish transitioning.*/
1191
- var last_gridlet = grid.children().last();
1192
- /* Show grid & hide the image it replaces.*/
1193
- grid.show();
1194
- cur_img.css('opacity', 0);
1195
- /* Add identifying classes to corner gridlets (useful if applying border radius).*/
1196
- grid.children().first().addClass('rs-top-left');
1197
- grid.children().last().addClass('rs-bottom-right');
1198
- grid.children().eq(rows - 1).addClass('rs-bottom-left');
1199
- grid.children().eq(- rows).addClass('rs-top-right');
1200
- /* Execution steps.*/
1201
- setTimeout(function () {
1202
- grid.children().css({
1203
- opacity: op,
1204
- transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
1205
- });
1206
- }, 1);
1207
- jQuery(next_image_class).css('opacity', 1);
1208
- /* After transition.*/
1209
- jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
1210
- function bwg_after_trans() {
1211
- /*if (bwg_from_focus_<?php echo $bwg; ?>) {
1212
- bwg_from_focus_<?php echo $bwg; ?> = false;
1213
- return;
1214
- }*/
1215
- jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
1216
- jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
1217
- cur_img.css('opacity', 1);
1218
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1219
- grid.remove();
1220
- bwg_trans_in_progress_<?php echo $bwg; ?> = false;
1221
- if (typeof event_stack_<?php echo $bwg; ?> !== 'undefined') {
1222
- if (event_stack_<?php echo $bwg; ?>.length > 0) {
1223
- key = event_stack_<?php echo $bwg; ?>[0].split("-");
1224
- event_stack_<?php echo $bwg; ?>.shift();
1225
- bwg_change_image_<?php echo $bwg; ?>(key[0], key[1], data_<?php echo $bwg; ?>, true);
1226
- }
1227
- }
1228
- }
1229
  }
1230
- function bwg_sliceV_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1231
- if (direction == 'right') {
1232
- var translateY = 'min-auto';
1233
- }
1234
- else if (direction == 'left') {
1235
- var translateY = 'auto';
1236
- }
1237
- bwg_grid_<?php echo $bwg; ?>(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
 
1238
  }
1239
- function bwg_scaleOut_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1240
- bwg_grid_<?php echo $bwg; ?>(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
 
 
 
 
 
 
 
1241
  }
1242
- function bwg_blindH_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
1243
- bwg_grid_<?php echo $bwg; ?>(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
 
 
 
 
1244
  }
1245
- function bwg_iterator_<?php echo $bwg; ?>() {
1246
- var iterator = 1;
1247
- if (<?php echo $enable_slideshow_shuffle; ?>) {
1248
- iterator = Math.floor((data_<?php echo $bwg; ?>.length - 1) * Math.random() + 1);
1249
- }
1250
- return iterator;
1251
  }
1252
- function bwg_change_image_<?php echo $bwg; ?>(current_key, key, data_<?php echo $bwg; ?>, from_effect) {
1253
- /* Pause videos.*/
1254
- jQuery("#bwg_slideshow_image_container_<?php echo $bwg; ?>").find("iframe").each(function () {
1255
- jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
1256
- jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
1257
- jQuery(this)[0].contentWindow.postMessage('pause', '*');
1258
- });
1259
- if (data_<?php echo $bwg; ?>[key]) {
1260
- if (jQuery('.bwg_ctrl_btn_<?php echo $bwg; ?>').hasClass('fa-pause')) {
1261
- bwg_play_<?php echo $bwg; ?>();
1262
- }
1263
- if (!from_effect) {
1264
- /* Change image key.*/
1265
- jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val(key);
1266
- if (current_key == '-1') { /* Filmstrip.*/
1267
- current_key = jQuery(".bwg_slideshow_thumb_active_<?php echo $bwg; ?>").children("img").attr("image_key");
1268
- }
1269
- else if (current_key == '-2') { /* Dots.*/
1270
- current_key = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").attr("image_key");
1271
- }
1272
- }
1273
- if (bwg_trans_in_progress_<?php echo $bwg; ?>) {
1274
- event_stack_<?php echo $bwg; ?>.push(current_key + '-' + key);
1275
- return;
1276
- }
1277
- var direction = 'right';
1278
- if (bwg_current_key_<?php echo $bwg; ?> > key) {
1279
- var direction = 'left';
1280
- }
1281
- else if (bwg_current_key_<?php echo $bwg; ?> == key) {
1282
- return;
1283
- }
1284
- jQuery(".bwg_slideshow_watermark_<?php echo $bwg; ?>").css({display: 'none'});
1285
- jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({display: 'none'});
1286
- jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({display: 'none'});
1287
- /* Set active thumbnail position.*/
1288
- bwg_current_filmstrip_pos_<?php echo $bwg; ?> = key * (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2 + 2 * <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>);
1289
- bwg_current_key_<?php echo $bwg; ?> = key;
1290
- /* Change image id, title, description.*/
1291
- jQuery("#bwg_slideshow_image_<?php echo $bwg; ?>").attr('image_id', data_<?php echo $bwg; ?>[key]["id"]);
1292
- jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["alt"]).text());
1293
- jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["description"]).text());
1294
- var current_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[current_key]["id"];
1295
- var next_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[key]["id"];
1296
- bwg_<?php echo $slideshow_effect; ?>_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
1297
- <?php
1298
- if ($enable_slideshow_filmstrip) {
1299
- ?>
1300
- bwg_move_filmstrip_<?php echo $bwg; ?>();
1301
- <?php
1302
- }
1303
- else {
1304
- ?>
1305
- bwg_move_dots_<?php echo $bwg; ?>();
1306
- <?php
1307
- }
1308
- ?>
1309
- if (data_<?php echo $bwg; ?>[key]["is_embed_video"]) {
1310
- jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: 'none'});
1311
- }
1312
- else {
1313
- jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: ''});
1314
- }
1315
- }
1316
  }
1317
- function bwg_popup_resize_<?php echo $bwg; ?>() {
1318
- var parent_width = jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").parent().width();
1319
- if (parent_width >= <?php echo $image_width; ?>) {
1320
- jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1321
- jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({height: <?php echo $image_height; ?>});
1322
- jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1323
- jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({height: (<?php echo $image_height - $slideshow_filmstrip_height; ?>)});
1324
- jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({
1325
- cssText: "max-width: <?php echo $image_width; ?>px !important; max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1326
- });
1327
- jQuery(".bwg_slideshow_embed_<?php echo $bwg; ?>").css({
1328
- cssText: "width: <?php echo $image_width; ?>px !important; height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1329
- });
1330
- bwg_resize_instagram_post_<?php echo $bwg?>();
1331
- /* Set watermark container size.*/
1332
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1333
- jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1334
- jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (<?php echo $image_width; ?> - 40)});
1335
- jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1336
- jQuery("#bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>").css({fontSize: (<?php echo $theme_row->slideshow_play_pause_btn_size; ?>)});
1337
- jQuery(".bwg_slideshow_watermark_image_<?php echo $bwg; ?>").css({maxWidth: <?php echo $watermark_width; ?>, maxHeight: <?php echo $watermark_height; ?>});
1338
- jQuery(".bwg_slideshow_watermark_text_<?php echo $bwg; ?>, .bwg_slideshow_watermark_text_<?php echo $bwg; ?>:hover").css({fontSize: (<?php echo $watermark_font_size; ?>)});
1339
- jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({fontSize: (<?php echo $theme_row->slideshow_title_font_size * 2; ?>)});
1340
- jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({fontSize: (<?php echo $theme_row->slideshow_description_font_size * 2; ?>)});
1341
- }
1342
- else {
1343
- jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({width: (parent_width)});
1344
- jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({height: ((parent_width) * <?php echo $image_height / $image_width ?>)});
1345
- jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({width: (parent_width)});
1346
- jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({height: ((parent_width) * <?php echo $image_height / $image_width ?> - <?php echo $slideshow_filmstrip_height; ?>)});
1347
- jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({
1348
- 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;"
1349
- });
1350
- jQuery(".bwg_slideshow_embed_<?php echo $bwg; ?>").css({
1351
- cssText: "width: " + parent_width + "px !important; height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
1352
- });
1353
- bwg_resize_instagram_post_<?php echo $bwg?>();
1354
- /* Set watermark container size.*/
1355
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1356
- jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: (parent_width)});
1357
- jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (parent_width - 40)});
1358
- jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").css({width: (parent_width)});
1359
- jQuery("#bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo $theme_row->slideshow_play_pause_btn_size / $image_width; ?>)});
1360
- jQuery(".bwg_slideshow_watermark_image_<?php echo $bwg; ?>").css({maxWidth: ((parent_width) * <?php echo $watermark_width / $image_width; ?>), maxHeight: ((parent_width) * <?php echo $watermark_height / $image_width; ?>)});
1361
- jQuery(".bwg_slideshow_watermark_text_<?php echo $bwg; ?>, .bwg_slideshow_watermark_text_<?php echo $bwg; ?>:hover").css({fontSize: ((parent_width) * <?php echo $watermark_font_size / $image_width; ?>)});
1362
- jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo 2 * $theme_row->slideshow_title_font_size / $image_width; ?>)});
1363
- jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo 2 * $theme_row->slideshow_description_font_size / $image_width; ?>)});
1364
- jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({'display':'inline-block'});
1365
- }
1366
  }
1367
- jQuery(window).resize(function() {
1368
- bwg_popup_resize_<?php echo $bwg; ?>();
1369
- });
1370
- jQuery(window).load(function () {
1371
- jQuery('#ajax_loading_<?php echo $bwg; ?>').hide();
1372
- <?php
1373
- if ($image_right_click) {
1374
- ?>
1375
- /* Disable right click.*/
1376
- jQuery('div[id^="bwg_container"]').bind("contextmenu", function () {
1377
- return false;
1378
- });
1379
- jQuery('div[id^="bwg_container"]').css('webkitTouchCallout','none');
1380
- <?php
1381
- }
1382
- ?>
1383
- if (typeof jQuery().swiperight !== 'undefined') {
1384
- if (jQuery.isFunction(jQuery().swiperight)) {
1385
- jQuery('#bwg_container1_<?php echo $bwg; ?>').swiperight(function () {
1386
- 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()) - bwg_iterator_<?php echo $bwg; ?>()) >= 0 ? (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - bwg_iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length : data_<?php echo $bwg; ?>.length - 1, data_<?php echo $bwg; ?>);
1387
- return false;
1388
- });
1389
- }
1390
- }
1391
- if (typeof jQuery().swipeleft !== 'undefined') {
1392
- if (jQuery.isFunction(jQuery().swipeleft)) {
1393
- jQuery('#bwg_container1_<?php echo $bwg; ?>').swipeleft(function () {
1394
- 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()) + bwg_iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length, data_<?php echo $bwg; ?>);
1395
- return false;
1396
- });
1397
- }
1398
- }
1399
-
1400
- var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1401
- var bwg_click = isMobile ? 'touchend' : 'click';
1402
- bwg_popup_resize_<?php echo $bwg; ?>();
1403
- jQuery("#bwg_container1_<?php echo $bwg; ?>").css({visibility: 'visible'});
1404
- jQuery(".bwg_slideshow_watermark_<?php echo $bwg; ?>").css({display: 'none'});
1405
- jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({display: 'none'});
1406
- jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({display: 'none'});
1407
- setTimeout(function () {
1408
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1409
- }, 500);
1410
- /* Set image container height.*/
1411
- jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").height(jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").height() - <?php echo $slideshow_filmstrip_height; ?>);
1412
- var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /* FF doesn't recognize mousewheel as of FF3.x */
1413
- jQuery('.bwg_slideshow_filmstrip_<?php echo $bwg; ?>').bind(mousewheelevt, function(e) {
1414
- var evt = window.event || e; /* Equalize event object.*/
1415
- evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
1416
- var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta; /* Check for detail first, because it is used by Opera and FF.*/
1417
- if (delta > 0) {
1418
- /* Scroll up.*/
1419
- jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").trigger("click");
1420
- }
1421
- else {
1422
- /* Scroll down.*/
1423
- jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").trigger("click");
1424
- }
1425
- return false;
1426
- });
1427
- jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").on(bwg_click, function () {
1428
- jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1429
- 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())) {
1430
- jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1431
- 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; ?>)) {
1432
- 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');
1433
- }
1434
- else {
1435
- 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');
1436
- }
1437
- }
1438
- /* Disable right arrow.*/
1439
- window.setTimeout(function(){
1440
- 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())) {
1441
- jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1442
- }
1443
- }, 500);
1444
- });
1445
- jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").on(bwg_click, function () {
1446
- jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1447
- if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
1448
- jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1449
- if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left > - <?php echo $filmstrip_thumb_margin_hor + $slideshow_filmstrip_width; ?>) {
1450
- jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: 0}, 500, 'linear');
1451
- }
1452
- else {
1453
- 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');
1454
- }
1455
- }
1456
- /* Disable left arrow.*/
1457
- window.setTimeout(function(){
1458
- if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left == 0) {
1459
- jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1460
- }
1461
- }, 500);
1462
- });
1463
- /* Set filmstrip initial position.*/
1464
- bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
1465
- /* Play/pause.*/
1466
- jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").on(bwg_click, function () {
1467
- if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1468
- bwg_play_<?php echo $bwg; ?>();
1469
- jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1470
- jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-pause");
1471
- if (<?php echo $enable_slideshow_music ?>) {
1472
- document.getElementById("bwg_audio_<?php echo $bwg; ?>").play();
1473
- }
1474
- }
1475
- else {
1476
- /* Pause.*/
1477
- window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1478
- jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Play', 'bwg'); ?>");
1479
- jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-play");
1480
- if (<?php echo $enable_slideshow_music ?>) {
1481
- document.getElementById("bwg_audio_<?php echo $bwg; ?>").pause();
1482
- }
1483
- }
1484
- });
1485
- if (<?php echo $enable_slideshow_autoplay; ?>) {
1486
- bwg_play_<?php echo $bwg; ?>();
1487
- jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1488
- jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-pause");
1489
- if (<?php echo $enable_slideshow_music ?>) {
1490
- document.getElementById("bwg_audio_<?php echo $bwg; ?>").play();
1491
- }
1492
- }
1493
- jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("width");
1494
- jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("height");
1495
- });
1496
- function bwg_resize_instagram_post_<?php echo $bwg?>() {
1497
- if (jQuery('.inner_instagram_iframe_bwg_embed_frame_<?php echo $bwg?>').length) {
1498
- var post_width = jQuery('.bwg_slideshow_embed_<?php echo $bwg?>').width();
1499
- var post_height = jQuery('.bwg_slideshow_embed_<?php echo $bwg?>').height();
1500
- jQuery('.inner_instagram_iframe_bwg_embed_frame_<?php echo $bwg?>').each(function() {
1501
- var parent_container = jQuery(this).parent();
1502
- if (post_height / (parseInt(parent_container.attr('data-height')) + 96) < post_width / parseInt(parent_container.attr('data-width'))) {
1503
- parent_container.height(post_height);
1504
- parent_container.width((parent_container.height() - 96) * parent_container.attr('data-width') / parent_container.attr('data-height') + 16);
1505
- }
1506
- else {
1507
- parent_container.width(post_width);
1508
- parent_container.height((parent_container.width() - 16) * parent_container.attr('data-height') / parent_container.attr('data-width') + 96);
1509
- }
1510
- });
1511
- }
1512
- bwg_change_watermark_container_<?php echo $bwg; ?>();
1513
  }
1514
- function bwg_play_<?php echo $bwg; ?>() {
1515
- window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1516
- /* Play.*/
1517
- bwg_playInterval_<?php echo $bwg; ?> = setInterval(function () {
1518
- var iterator = 1;
1519
- if (<?php echo $enable_slideshow_shuffle; ?>) {
1520
- iterator = Math.floor((data_<?php echo $bwg; ?>.length - 1) * Math.random() + 1);
1521
- }
1522
- 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) % data_<?php echo $bwg; ?>.length, data_<?php echo $bwg; ?>)
1523
- }, '<?php echo $slideshow_interval * 1000; ?>');
 
1524
  }
1525
- jQuery(window).focus(function() {
1526
- /* event_stack_<?php echo $bwg; ?> = [];*/
1527
- if (!jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1528
- bwg_play_<?php echo $bwg; ?>();
1529
- }
1530
- var i_<?php echo $bwg; ?> = 0;
1531
- jQuery(".bwg_slider_<?php echo $bwg; ?>").children("span").each(function () {
1532
- if (jQuery(this).css('opacity') == 1) {
1533
- jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val(i_<?php echo $bwg; ?>);
1534
- }
1535
- i_<?php echo $bwg; ?>++;
1536
- });
1537
- });
1538
- jQuery(window).blur(function() {
1539
- event_stack_<?php echo $bwg; ?> = [];
1540
- window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1541
- });
1542
- </script>
1543
  <?php
1544
- if ($from_shortcode) {
1545
- return;
1546
- }
1547
- else {
1548
- die();
1549
- }
1550
  }
1551
  }
137
  $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
138
  }
139
  $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
140
+ $inline_style = $this->inline_styles($bwg, $theme_row, $params, $image_width, $image_height, $slideshow_filmstrip_height, $options_row, $filmstrip_thumb_margin_hor, $slideshow_filmstrip_width, $image_rows, $watermark_position, $slideshow_title_position, $slideshow_description_position, $watermark_height, $watermark_width, $watermark_opacity, $watermark_font_size, $watermark_font, $watermark_color, $enable_slideshow_filmstrip);
141
+ global $wd_bwg_inline_stiles;
142
+ if ($wd_bwg_inline_stiles) {
143
+ wp_enqueue_style('bwg_frontend');
144
+ wp_add_inline_style('bwg_frontend', $inline_style);
145
+ wp_enqueue_style('bwg_font-awesome');
146
+ wp_enqueue_style('bwg_mCustomScrollbar');
147
+ $google_fonts = WDWLibrary::get_google_fonts();
148
+ wp_enqueue_style('bwg_googlefonts');
149
+ }
150
+ else {
151
+ echo '<style>' . $inline_style . '</style>';
152
+ }
153
  ?>
154
+ <script>
155
+ var data_<?php echo $bwg; ?> = [];
156
+ var event_stack_<?php echo $bwg; ?> = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <?php
158
+ foreach ($image_rows as $key => $image_row) {
159
+ if ($image_row->id == $current_image_id) {
160
+ $current_image_alt = $image_row->alt;
161
+ $current_image_description = str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description);
162
+ }
163
+ ?>
164
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"] = [];
165
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
166
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; ?>";
167
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["description"] = "<?php echo str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description); ?>";
168
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
169
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
170
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
171
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["is_embed"] = "<?php echo (preg_match('/EMBED/',$image_row->filetype)==1 ? true :false); ?>";
172
+ data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["is_embed_video"] = "<?php echo (((preg_match('/EMBED/',$image_row->filetype)==1) && (preg_match('/_VIDEO/',$image_row->filetype)==1)) ? true :false); ?>";
173
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  }
175
  ?>
176
  </script>
487
  });
488
  }
489
  }
490
+ function bwg_move_dots_<?php echo $bwg; ?>() {
491
+ var image_left = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left;
492
+ var image_right = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left + jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").outerWidth(true);
493
+ var bwg_dots_width = jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").outerWidth(true);
494
+ var bwg_dots_thumbnails_width = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").outerWidth(false);
495
+ var long_filmstrip_cont_left = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left;
496
+ var long_filmstrip_cont_right = Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left) + bwg_dots_width;
497
+ if (bwg_dots_width > bwg_dots_thumbnails_width) {
498
+ return;
499
+ }
500
+ if (image_left < Math.abs(long_filmstrip_cont_left)) {
501
+ jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").animate({
502
+ left: -image_left
503
+ }, {
504
+ duration: 500,
505
+ complete: function () { }
506
+ });
507
+ }
508
+ else if (image_right > long_filmstrip_cont_right) {
509
+ jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").animate({
510
+ left: -(image_right - bwg_dots_width)
511
+ }, {
512
+ duration: 500,
513
+ complete: function () { }
514
+ });
515
+ }
516
+ }
517
+ /* Show/hide filmstrip arrows.*/
518
+ function bwg_filmstrip_arrows_<?php echo $bwg; ?>() {
519
+ if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() < jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width()) {
520
+ jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").hide();
521
+ jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").hide();
522
+ }
523
+ else {
524
+ jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").show();
525
+ jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").show();
526
+ }
527
+ }
528
+ function bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>() {
529
+ return bwg_testDom_<?php echo $bwg; ?>('Transition');
530
+ }
531
+ function bwg_testBrowser_cssTransforms3d_<?php echo $bwg; ?>() {
532
+ return bwg_testDom_<?php echo $bwg; ?>('Perspective');
533
+ }
534
+ function bwg_testDom_<?php echo $bwg; ?>(prop) {
535
+ /* Browser vendor CSS prefixes.*/
536
+ var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
537
+ /* Browser vendor DOM prefixes.*/
538
+ var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
539
+ var i = domPrefixes.length;
540
+ while (i--) {
541
+ if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') {
542
+ return true;
543
+ }
544
+ }
545
+ return false;
546
+ }
547
+ function bwg_cube_<?php echo $bwg; ?>(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
548
+ /* If browser does not support 3d transforms/CSS transitions.*/
549
+ if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
550
+ return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
551
+ }
552
+ if (!bwg_testBrowser_cssTransforms3d_<?php echo $bwg; ?>()) {
553
+ return bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
554
+ }
555
+ bwg_trans_in_progress_<?php echo $bwg; ?> = true;
556
+ /* Set active thumbnail.*/
557
+ jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
558
+ jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
559
+ jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
560
+ jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
561
+ jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").css('perspective', 1000);
562
+ jQuery(current_image_class).css({
563
+ transform : 'translateZ(' + tz + 'px)',
564
+ backfaceVisibility : 'hidden'
565
+ });
566
+ jQuery(next_image_class).css({
567
+ opacity : 1,
568
+ filter: 'Alpha(opacity=100)',
569
+ zIndex: 2,
570
+ backfaceVisibility : 'hidden',
571
+ transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)'
572
+ });
573
+ jQuery(".bwg_slider_<?php echo $bwg; ?>").css({
574
+ transform: 'translateZ(-' + tz + 'px)',
575
+ transformStyle: 'preserve-3d'
576
+ });
577
+ /* Execution steps.*/
578
+ setTimeout(function () {
579
+ jQuery(".bwg_slider_<?php echo $bwg; ?>").css({
580
+ transition: 'all ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms ease-in-out',
581
+ transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
582
+ });
583
+ }, 20);
584
+ /* After transition.*/
585
+ jQuery(".bwg_slider_<?php echo $bwg; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
586
+ function bwg_after_trans() {
587
+ /*if (bwg_from_focus_<?php echo $bwg; ?>) {
588
+ bwg_from_focus_<?php echo $bwg; ?> = false;
589
+ return;
590
+ }*/
591
+ jQuery(current_image_class).removeAttr('style');
592
+ jQuery(next_image_class).removeAttr('style');
593
+ jQuery(".bwg_slider_<?php echo $bwg; ?>").removeAttr('style');
594
+ jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
595
+ jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
596
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
597
+ bwg_trans_in_progress_<?php echo $bwg; ?> = false;
598
+ if (typeof event_stack_<?php echo $bwg; ?> !== 'undefined') {
599
+ if (event_stack_<?php echo $bwg; ?>.length > 0) {
600
+ key = event_stack_<?php echo $bwg; ?>[0].split("-");
601
+ event_stack_<?php echo $bwg; ?>.shift();
602
+ bwg_change_image_<?php echo $bwg; ?>(key[0], key[1], data_<?php echo $bwg; ?>, true);
603
+ }
604
+ }
605
+ }
606
+ }
607
+ function bwg_cubeH_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
608
+ /* Set to half of image width.*/
609
+ var dimension = jQuery(current_image_class).width() / 2;
610
+ if (direction == 'right') {
611
+ bwg_cube_<?php echo $bwg; ?>(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
612
+ }
613
+ else if (direction == 'left') {
614
+ bwg_cube_<?php echo $bwg; ?>(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
615
+ }
616
+ }
617
+ /* For browsers that does not support transitions.*/
618
+ function bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
619
+ bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
620
+ }
621
+ /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
622
+ function bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
623
+ bwg_sliceV_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
624
+ }
625
+ function bwg_none_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
626
+ jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
627
+ jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
628
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
629
+ /* Set active thumbnail.*/
630
+ jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
631
+ jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
632
+ jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
633
+ jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
634
+ }
635
+ function bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
636
+ /* Set active thumbnail.*/
637
+ jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
638
+ jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
639
+ jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
640
+ jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
641
+ if (bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
642
+ jQuery(next_image_class).css('transition', 'opacity ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms linear');
643
+ jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
644
+ jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
645
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
646
+ }
647
+ else {
648
+ jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, bwg_transition_duration_<?php echo $bwg; ?>);
649
+ jQuery(next_image_class).animate({
650
+ 'opacity' : 1,
651
+ 'z-index': 2
652
+ }, {
653
+ duration: bwg_transition_duration_<?php echo $bwg; ?>,
654
+ complete: function () { bwg_change_watermark_container_<?php echo $bwg; ?>(); }
655
+ });
656
+ /* For IE.*/
657
+ jQuery(current_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 0);
658
+ jQuery(next_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 1);
659
+ }
660
+ }
661
+ function bwg_grid_<?php echo $bwg; ?>(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
662
+ /* If browser does not support CSS transitions.*/
663
+ if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
664
+ return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
665
+ }
666
+ bwg_trans_in_progress_<?php echo $bwg; ?> = true;
667
+ /* Set active thumbnail.*/
668
+ jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
669
+ jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
670
+ jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
671
+ jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
672
+ /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
673
+ var count = (bwg_transition_duration_<?php echo $bwg; ?>) / (cols + rows);
674
+ /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
675
+ function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
676
+ var delay = (c + r) * count;
677
+ /* Return a gridlet elem with styles for specific transition.*/
678
+ return jQuery('<span class="bwg_gridlet_<?php echo $bwg; ?>" />').css({
679
+ display : "block",
680
+ width : width,
681
+ height : height,
682
+ top : top,
683
+ left : left,
684
+ backgroundImage : 'url("' + src + '")',
685
+ backgroundColor: jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css("background-color"),
686
+ /*backgroundColor: rgba(0, 0, 0, 0),*/
687
+ backgroundRepeat: 'no-repeat',
688
+ backgroundPosition : img_left + 'px ' + img_top + 'px',
689
+ backgroundSize : imgWidth + 'px ' + imgHeight + 'px',
690
+ transition : 'all ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms ease-in-out ' + delay + 'ms',
691
+ transform : 'none'
692
+ });
693
+ }
694
+ /* Get the current slide's image.*/
695
+ var cur_img = jQuery(current_image_class).find('img');
696
+ /* Create a grid to hold the gridlets.*/
697
+ var grid = jQuery('<span style="display: block;" />').addClass('bwg_grid_<?php echo $bwg; ?>');
698
+ /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
699
+ jQuery(current_image_class).prepend(grid);
700
+ /* vars to calculate positioning/size of gridlets*/
701
+ var cont = jQuery(".bwg_slide_bg_<?php echo $bwg; ?>");
702
+ var imgWidth = cur_img.width();
703
+ var imgHeight = cur_img.height();
704
+ var contWidth = cont.width(),
705
+ contHeight = cont.height(),
706
+ imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/
707
+ colWidth = Math.floor(contWidth / cols),
708
+ rowHeight = Math.floor(contHeight / rows),
709
+ colRemainder = contWidth - (cols * colWidth),
710
+ colAdd = Math.ceil(colRemainder / cols),
711
+ rowRemainder = contHeight - (rows * rowHeight),
712
+ rowAdd = Math.ceil(rowRemainder / rows),
713
+ leftDist = 0,
714
+ img_leftDist = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").width() - cur_img.width()) / 2;
715
+ /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
716
+ tx = tx === 'auto' ? contWidth : tx;
717
+ tx = tx === 'min-auto' ? - contWidth : tx;
718
+ ty = ty === 'auto' ? contHeight : ty;
719
+ ty = ty === 'min-auto' ? - contHeight : ty;
720
+ /* Loop through cols*/
721
+ for (var i = 0; i < cols; i++) {
722
+ var topDist = 0,
723
+ img_topDst = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").height() - cur_img.height()) / 2,
724
+ newColWidth = colWidth;
725
+ /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
726
+ if (colRemainder > 0) {
727
+ var add = colRemainder >= colAdd ? colAdd : colRemainder;
728
+ newColWidth += add;
729
+ colRemainder -= add;
730
+ }
731
+ /* Nested loop to create row gridlets for each col.*/
732
+ for (var j = 0; j < rows; j++) {
733
+ var newRowHeight = rowHeight,
734
+ newRowRemainder = rowRemainder;
735
+ /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
736
+ if (newRowRemainder > 0) {
737
+ add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
738
+ newRowHeight += add;
739
+ newRowRemainder -= add;
740
+ }
741
+ /* Create & append gridlet to grid.*/
742
+ grid.append(bwg_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
743
+ topDist += newRowHeight;
744
+ img_topDst -= newRowHeight;
745
+ }
746
+ img_leftDist -= newColWidth;
747
+ leftDist += newColWidth;
748
+ }
749
+ /* Set event listener on last gridlet to finish transitioning.*/
750
+ var last_gridlet = grid.children().last();
751
+ /* Show grid & hide the image it replaces.*/
752
+ grid.show();
753
+ cur_img.css('opacity', 0);
754
+ /* Add identifying classes to corner gridlets (useful if applying border radius).*/
755
+ grid.children().first().addClass('rs-top-left');
756
+ grid.children().last().addClass('rs-bottom-right');
757
+ grid.children().eq(rows - 1).addClass('rs-bottom-left');
758
+ grid.children().eq(- rows).addClass('rs-top-right');
759
+ /* Execution steps.*/
760
+ setTimeout(function () {
761
+ grid.children().css({
762
+ opacity: op,
763
+ transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
764
+ });
765
+ }, 1);
766
+ jQuery(next_image_class).css('opacity', 1);
767
+ /* After transition.*/
768
+ jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
769
+ function bwg_after_trans() {
770
+ /*if (bwg_from_focus_<?php echo $bwg; ?>) {
771
+ bwg_from_focus_<?php echo $bwg; ?> = false;
772
+ return;
773
+ }*/
774
+ jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
775
+ jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
776
+ cur_img.css('opacity', 1);
777
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
778
+ grid.remove();
779
+ bwg_trans_in_progress_<?php echo $bwg; ?> = false;
780
+ if (typeof event_stack_<?php echo $bwg; ?> !== 'undefined') {
781
+ if (event_stack_<?php echo $bwg; ?>.length > 0) {
782
+ key = event_stack_<?php echo $bwg; ?>[0].split("-");
783
+ event_stack_<?php echo $bwg; ?>.shift();
784
+ bwg_change_image_<?php echo $bwg; ?>(key[0], key[1], data_<?php echo $bwg; ?>, true);
785
+ }
786
+ }
787
+ }
788
+ }
789
+ function bwg_sliceV_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
790
+ if (direction == 'right') {
791
+ var translateY = 'min-auto';
792
+ }
793
+ else if (direction == 'left') {
794
+ var translateY = 'auto';
795
+ }
796
+ bwg_grid_<?php echo $bwg; ?>(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
797
+ }
798
+ function bwg_scaleOut_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
799
+ bwg_grid_<?php echo $bwg; ?>(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
800
+ }
801
+ function bwg_blindH_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
802
+ bwg_grid_<?php echo $bwg; ?>(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
803
+ }
804
+ function bwg_iterator_<?php echo $bwg; ?>() {
805
+ var iterator = 1;
806
+ if (<?php echo $enable_slideshow_shuffle; ?>) {
807
+ iterator = Math.floor((data_<?php echo $bwg; ?>.length - 1) * Math.random() + 1);
808
+ }
809
+ return iterator;
810
+ }
811
+ function bwg_change_image_<?php echo $bwg; ?>(current_key, key, data_<?php echo $bwg; ?>, from_effect) {
812
+ /* Pause videos.*/
813
+ jQuery("#bwg_slideshow_image_container_<?php echo $bwg; ?>").find("iframe").each(function () {
814
+ jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
815
+ jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
816
+ jQuery(this)[0].contentWindow.postMessage('pause', '*');
817
+ });
818
+ if (data_<?php echo $bwg; ?>[key]) {
819
+ if (jQuery('.bwg_ctrl_btn_<?php echo $bwg; ?>').hasClass('fa-pause')) {
820
+ bwg_play_<?php echo $bwg; ?>();
821
+ }
822
+ if (!from_effect) {
823
+ /* Change image key.*/
824
+ jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val(key);
825
+ if (current_key == '-1') { /* Filmstrip.*/
826
+ current_key = jQuery(".bwg_slideshow_thumb_active_<?php echo $bwg; ?>").children("img").attr("image_key");
827
+ }
828
+ else if (current_key == '-2') { /* Dots.*/
829
+ current_key = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").attr("image_key");
830
+ }
831
+ }
832
+ if (bwg_trans_in_progress_<?php echo $bwg; ?>) {
833
+ event_stack_<?php echo $bwg; ?>.push(current_key + '-' + key);
834
+ return;
835
+ }
836
+ var direction = 'right';
837
+ if (bwg_current_key_<?php echo $bwg; ?> > key) {
838
+ var direction = 'left';
839
+ }
840
+ else if (bwg_current_key_<?php echo $bwg; ?> == key) {
841
+ return;
842
+ }
843
+ jQuery(".bwg_slideshow_watermark_<?php echo $bwg; ?>").css({display: 'none'});
844
+ jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({display: 'none'});
845
+ jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({display: 'none'});
846
+ /* Set active thumbnail position.*/
847
+ bwg_current_filmstrip_pos_<?php echo $bwg; ?> = key * (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2 + 2 * <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>);
848
+ bwg_current_key_<?php echo $bwg; ?> = key;
849
+ /* Change image id, title, description.*/
850
+ jQuery("#bwg_slideshow_image_<?php echo $bwg; ?>").attr('image_id', data_<?php echo $bwg; ?>[key]["id"]);
851
+ jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["alt"]).text());
852
+ jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["description"]).text());
853
+ var current_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[current_key]["id"];
854
+ var next_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[key]["id"];
855
+ bwg_<?php echo $slideshow_effect; ?>_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
856
+ <?php
857
+ if ($enable_slideshow_filmstrip) {
858
+ ?>
859
+ bwg_move_filmstrip_<?php echo $bwg; ?>();
860
+ <?php
861
+ }
862
+ else {
863
+ ?>
864
+ bwg_move_dots_<?php echo $bwg; ?>();
865
+ <?php
866
+ }
867
+ ?>
868
+ if (data_<?php echo $bwg; ?>[key]["is_embed_video"]) {
869
+ jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: 'none'});
870
+ }
871
+ else {
872
+ jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: ''});
873
+ }
874
+ }
875
+ }
876
+ function bwg_popup_resize_<?php echo $bwg; ?>() {
877
+ var parent_width = jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").parent().width();
878
+ if (parent_width >= <?php echo $image_width; ?>) {
879
+ jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
880
+ jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({height: <?php echo $image_height; ?>});
881
+ jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
882
+ jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({height: (<?php echo $image_height - $slideshow_filmstrip_height; ?>)});
883
+ jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({
884
+ cssText: "max-width: <?php echo $image_width; ?>px !important; max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
885
+ });
886
+ jQuery(".bwg_slideshow_embed_<?php echo $bwg; ?>").css({
887
+ cssText: "width: <?php echo $image_width; ?>px !important; height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
888
+ });
889
+ bwg_resize_instagram_post_<?php echo $bwg?>();
890
+ /* Set watermark container size.*/
891
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
892
+ jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
893
+ jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (<?php echo $image_width; ?> - 40)});
894
+ jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
895
+ jQuery("#bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>").css({fontSize: (<?php echo $theme_row->slideshow_play_pause_btn_size; ?>)});
896
+ jQuery(".bwg_slideshow_watermark_image_<?php echo $bwg; ?>").css({maxWidth: <?php echo $watermark_width; ?>, maxHeight: <?php echo $watermark_height; ?>});
897
+ jQuery(".bwg_slideshow_watermark_text_<?php echo $bwg; ?>, .bwg_slideshow_watermark_text_<?php echo $bwg; ?>:hover").css({fontSize: (<?php echo $watermark_font_size; ?>)});
898
+ jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({fontSize: (<?php echo $theme_row->slideshow_title_font_size * 2; ?>)});
899
+ jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({fontSize: (<?php echo $theme_row->slideshow_description_font_size * 2; ?>)});
900
+ }
901
+ else {
902
+ jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({width: (parent_width)});
903
+ jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").css({height: ((parent_width) * <?php echo $image_height / $image_width ?>)});
904
+ jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({width: (parent_width)});
905
+ jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").css({height: ((parent_width) * <?php echo $image_height / $image_width ?> - <?php echo $slideshow_filmstrip_height; ?>)});
906
+ jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({
907
+ 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;"
908
+ });
909
+ jQuery(".bwg_slideshow_embed_<?php echo $bwg; ?>").css({
910
+ cssText: "width: " + parent_width + "px !important; height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
911
+ });
912
+ bwg_resize_instagram_post_<?php echo $bwg?>();
913
+ /* Set watermark container size.*/
914
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
915
+ jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: (parent_width)});
916
+ jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (parent_width - 40)});
917
+ jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").css({width: (parent_width)});
918
+ jQuery("#bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo $theme_row->slideshow_play_pause_btn_size / $image_width; ?>)});
919
+ jQuery(".bwg_slideshow_watermark_image_<?php echo $bwg; ?>").css({maxWidth: ((parent_width) * <?php echo $watermark_width / $image_width; ?>), maxHeight: ((parent_width) * <?php echo $watermark_height / $image_width; ?>)});
920
+ jQuery(".bwg_slideshow_watermark_text_<?php echo $bwg; ?>, .bwg_slideshow_watermark_text_<?php echo $bwg; ?>:hover").css({fontSize: ((parent_width) * <?php echo $watermark_font_size / $image_width; ?>)});
921
+ jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo 2 * $theme_row->slideshow_title_font_size / $image_width; ?>)});
922
+ jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo 2 * $theme_row->slideshow_description_font_size / $image_width; ?>)});
923
+ jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({'display':'inline-block'});
924
+ }
925
+ }
926
+ jQuery(window).resize(function() {
927
+ bwg_popup_resize_<?php echo $bwg; ?>();
928
+ });
929
+ jQuery(window).load(function () {
930
+ jQuery('#ajax_loading_<?php echo $bwg; ?>').hide();
931
+ <?php
932
+ if ($image_right_click) {
933
+ ?>
934
+ /* Disable right click.*/
935
+ jQuery('div[id^="bwg_container"]').bind("contextmenu", function () {
936
+ return false;
937
+ });
938
+ jQuery('div[id^="bwg_container"]').css('webkitTouchCallout','none');
939
+ <?php
940
+ }
941
+ ?>
942
+ if (typeof jQuery().swiperight !== 'undefined') {
943
+ if (jQuery.isFunction(jQuery().swiperight)) {
944
+ jQuery('#bwg_container1_<?php echo $bwg; ?>').swiperight(function () {
945
+ 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()) - bwg_iterator_<?php echo $bwg; ?>()) >= 0 ? (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) - bwg_iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length : data_<?php echo $bwg; ?>.length - 1, data_<?php echo $bwg; ?>);
946
+ return false;
947
+ });
948
+ }
949
+ }
950
+ if (typeof jQuery().swipeleft !== 'undefined') {
951
+ if (jQuery.isFunction(jQuery().swipeleft)) {
952
+ jQuery('#bwg_container1_<?php echo $bwg; ?>').swipeleft(function () {
953
+ 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()) + bwg_iterator_<?php echo $bwg; ?>()) % data_<?php echo $bwg; ?>.length, data_<?php echo $bwg; ?>);
954
+ return false;
955
+ });
956
+ }
957
+ }
958
+
959
+ var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
960
+ var bwg_click = isMobile ? 'touchend' : 'click';
961
+ bwg_popup_resize_<?php echo $bwg; ?>();
962
+ jQuery("#bwg_container1_<?php echo $bwg; ?>").css({visibility: 'visible'});
963
+ jQuery(".bwg_slideshow_watermark_<?php echo $bwg; ?>").css({display: 'none'});
964
+ jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({display: 'none'});
965
+ jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({display: 'none'});
966
+ setTimeout(function () {
967
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
968
+ }, 500);
969
+ /* Set image container height.*/
970
+ jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").height(jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").height() - <?php echo $slideshow_filmstrip_height; ?>);
971
+ var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /* FF doesn't recognize mousewheel as of FF3.x */
972
+ jQuery('.bwg_slideshow_filmstrip_<?php echo $bwg; ?>').bind(mousewheelevt, function(e) {
973
+ var evt = window.event || e; /* Equalize event object.*/
974
+ evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
975
+ var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta; /* Check for detail first, because it is used by Opera and FF.*/
976
+ if (delta > 0) {
977
+ /* Scroll up.*/
978
+ jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").trigger("click");
979
+ }
980
+ else {
981
+ /* Scroll down.*/
982
+ jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").trigger("click");
983
+ }
984
+ return false;
985
+ });
986
+ jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").on(bwg_click, function () {
987
+ jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
988
+ 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())) {
989
+ jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
990
+ 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; ?>)) {
991
+ 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');
992
+ }
993
+ else {
994
+ 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');
995
+ }
996
+ }
997
+ /* Disable right arrow.*/
998
+ window.setTimeout(function(){
999
+ 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())) {
1000
+ jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1001
+ }
1002
+ }, 500);
1003
+ });
1004
+ jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").on(bwg_click, function () {
1005
+ jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
1006
+ if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
1007
+ jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
1008
+ if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left > - <?php echo $filmstrip_thumb_margin_hor + $slideshow_filmstrip_width; ?>) {
1009
+ jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: 0}, 500, 'linear');
1010
+ }
1011
+ else {
1012
+ 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');
1013
+ }
1014
+ }
1015
+ /* Disable left arrow.*/
1016
+ window.setTimeout(function(){
1017
+ if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left == 0) {
1018
+ jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1019
+ }
1020
+ }, 500);
1021
+ });
1022
+ /* Set filmstrip initial position.*/
1023
+ bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
1024
+ /* Play/pause.*/
1025
+ jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").on(bwg_click, function () {
1026
+ if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1027
+ bwg_play_<?php echo $bwg; ?>();
1028
+ jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1029
+ jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-pause");
1030
+ if (<?php echo $enable_slideshow_music ?>) {
1031
+ document.getElementById("bwg_audio_<?php echo $bwg; ?>").play();
1032
+ }
1033
+ }
1034
+ else {
1035
+ /* Pause.*/
1036
+ window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1037
+ jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Play', 'bwg'); ?>");
1038
+ jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-play");
1039
+ if (<?php echo $enable_slideshow_music ?>) {
1040
+ document.getElementById("bwg_audio_<?php echo $bwg; ?>").pause();
1041
+ }
1042
+ }
1043
+ });
1044
+ if (<?php echo $enable_slideshow_autoplay; ?>) {
1045
+ bwg_play_<?php echo $bwg; ?>();
1046
+ jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1047
+ jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-pause");
1048
+ if (<?php echo $enable_slideshow_music ?>) {
1049
+ document.getElementById("bwg_audio_<?php echo $bwg; ?>").play();
1050
+ }
1051
+ }
1052
+ jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("width");
1053
+ jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("height");
1054
+ });
1055
+ function bwg_resize_instagram_post_<?php echo $bwg?>() {
1056
+ if (jQuery('.inner_instagram_iframe_bwg_embed_frame_<?php echo $bwg?>').length) {
1057
+ var post_width = jQuery('.bwg_slideshow_embed_<?php echo $bwg?>').width();
1058
+ var post_height = jQuery('.bwg_slideshow_embed_<?php echo $bwg?>').height();
1059
+ jQuery('.inner_instagram_iframe_bwg_embed_frame_<?php echo $bwg?>').each(function() {
1060
+ var parent_container = jQuery(this).parent();
1061
+ if (post_height / (parseInt(parent_container.attr('data-height')) + 96) < post_width / parseInt(parent_container.attr('data-width'))) {
1062
+ parent_container.height(post_height);
1063
+ parent_container.width((parent_container.height() - 96) * parent_container.attr('data-width') / parent_container.attr('data-height') + 16);
1064
+ }
1065
+ else {
1066
+ parent_container.width(post_width);
1067
+ parent_container.height((parent_container.width() - 16) * parent_container.attr('data-height') / parent_container.attr('data-width') + 96);
1068
+ }
1069
+ });
1070
+ }
1071
+ bwg_change_watermark_container_<?php echo $bwg; ?>();
1072
+ }
1073
+ function bwg_play_<?php echo $bwg; ?>() {
1074
+ window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1075
+ /* Play.*/
1076
+ bwg_playInterval_<?php echo $bwg; ?> = setInterval(function () {
1077
+ var iterator = 1;
1078
+ if (<?php echo $enable_slideshow_shuffle; ?>) {
1079
+ iterator = Math.floor((data_<?php echo $bwg; ?>.length - 1) * Math.random() + 1);
1080
+ }
1081
+ 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) % data_<?php echo $bwg; ?>.length, data_<?php echo $bwg; ?>)
1082
+ }, '<?php echo $slideshow_interval * 1000; ?>');
1083
+ }
1084
+ jQuery(window).focus(function() {
1085
+ /* event_stack_<?php echo $bwg; ?> = [];*/
1086
+ if (!jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1087
+ bwg_play_<?php echo $bwg; ?>();
1088
+ }
1089
+ var i_<?php echo $bwg; ?> = 0;
1090
+ jQuery(".bwg_slider_<?php echo $bwg; ?>").children("span").each(function () {
1091
+ if (jQuery(this).css('opacity') == 1) {
1092
+ jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val(i_<?php echo $bwg; ?>);
1093
+ }
1094
+ i_<?php echo $bwg; ?>++;
1095
+ });
1096
+ });
1097
+ jQuery(window).blur(function() {
1098
+ event_stack_<?php echo $bwg; ?> = [];
1099
+ window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1100
+ });
1101
+ </script>
1102
+ <?php
1103
+ if ($from_shortcode) {
1104
+ return;
1105
+ }
1106
+ else {
1107
+ die();
1108
+ }
1109
+ }
1110
+
1111
+ private function inline_styles($bwg, $theme_row, $params, $image_width, $image_height, $slideshow_filmstrip_height, $options_row, $filmstrip_thumb_margin_hor, $slideshow_filmstrip_width, $image_rows, $watermark_position, $slideshow_title_position, $slideshow_description_position, $watermark_height, $watermark_width, $watermark_opacity, $watermark_font_size, $watermark_font, $watermark_color, $enable_slideshow_filmstrip) {
1112
+ ob_start();
1113
+ ?>
1114
+ #bwg_container1_<?php echo $bwg; ?> {
1115
+ visibility: hidden;
1116
+ }
1117
+ #bwg_container1_<?php echo $bwg; ?> * {
1118
+ -moz-user-select: none;
1119
+ -khtml-user-select: none;
1120
+ -webkit-user-select: none;
1121
+ -ms-user-select: none;
1122
+ user-select: none;
1123
+ }
1124
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_wrap_<?php echo $bwg; ?> * {
1125
+ box-sizing: border-box;
1126
+ -moz-box-sizing: border-box;
1127
+ -webkit-box-sizing: border-box;
1128
+ /*backface-visibility: hidden;
1129
+ -webkit-backface-visibility: hidden;
1130
+ -moz-backface-visibility: hidden;
1131
+ -ms-backface-visibility: hidden;*/
1132
+ }
1133
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_wrap_<?php echo $bwg; ?> {
1134
+ background-color: #<?php echo $theme_row->slideshow_cont_bg_color; ?>;
1135
+ border-collapse: collapse;
1136
+ display: table;
1137
+ position: relative;
1138
+ text-align: center;
1139
+ width: <?php echo $image_width; ?>px;
1140
+ height: <?php echo $image_height; ?>px;
1141
+ }
1142
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_<?php echo $bwg; ?> {
1143
+ padding: 0 !important;
1144
+ margin: 0 !important;
1145
+ float: none !important;
1146
+ max-width: <?php echo $image_width; ?>px;
1147
+ max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
1148
+ vertical-align: middle;
1149
+ }
1150
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_embed_<?php echo $bwg; ?> {
1151
+ padding: 0 !important;
1152
+ margin: 0 !important;
1153
+ float: none !important;
1154
+ width: <?php echo $image_width; ?>px;
1155
+ height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px;
1156
+ vertical-align: middle;
1157
+ display: inline-block;
1158
+ text-align: center;
1159
+ }
1160
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_<?php echo $bwg; ?> {
1161
+ position: relative;
1162
+ z-index: 15;
1163
+ }
1164
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?> {
1165
+ background: transparent url("<?php echo WD_BWG_URL . '/images/blank.gif'; ?>") repeat scroll 0 0;
1166
+ bottom: 0;
1167
+ cursor: pointer;
1168
+ display: table;
1169
+ height: inherit;
1170
+ outline: medium none;
1171
+ position: absolute;
1172
+ width: 30%;
1173
+ left: 35%;
1174
+ z-index: 13;
1175
+ }
1176
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?>:hover #bwg_slideshow_play_pause-ico_<?php echo $bwg; ?> {
1177
+ display: inline-block !important;
1178
+ }
1179
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?>:hover span {
1180
+ position: relative;
1181
+ z-index: 13;
1182
+ }
1183
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause_<?php echo $bwg; ?> span {
1184
+ display: table-cell;
1185
+ text-align: center;
1186
+ vertical-align: middle;
1187
+ }
1188
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause-ico_<?php echo $bwg; ?> {
1189
+ display: none !important;
1190
+ color: #<?php echo $theme_row->slideshow_rl_btn_color; ?>;
1191
+ font-size: <?php echo $theme_row->slideshow_play_pause_btn_size; ?>px;
1192
+ cursor: pointer;
1193
+ position: relative;
1194
+ z-index: 13;
1195
+ }
1196
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>:hover {
1197
+ color: #<?php echo $theme_row->slideshow_close_rl_btn_hover_color; ?>;
1198
+ display: inline-block;
1199
+ position: relative;
1200
+ z-index: 13;
1201
+ }
1202
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>,
1203
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?> {
1204
+ background: transparent url("<?php echo WD_BWG_URL . '/images/blank.gif'; ?>") repeat scroll 0 0;
1205
+ bottom: 35%;
1206
+ cursor: pointer;
1207
+ display: inline;
1208
+ height: 30%;
1209
+ outline: medium none;
1210
+ position: absolute;
1211
+ width: 35%;
1212
+ /*z-index: 10130;*/
1213
+ z-index: 13;
1214
+ }
1215
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?> {
1216
+ left: 0;
1217
+ }
1218
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?> {
1219
+ right: 0;
1220
+ }
1221
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>:hover,
1222
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?>:hover {
1223
+ visibility: visible;
1224
+ }
1225
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left_<?php echo $bwg; ?>:hover span {
1226
+ left: 20px;
1227
+ }
1228
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right_<?php echo $bwg; ?>:hover span {
1229
+ left: auto;
1230
+ right: 20px;
1231
+ }
1232
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left-ico_<?php echo $bwg; ?> span,
1233
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right-ico_<?php echo $bwg; ?> span {
1234
+ display: table-cell;
1235
+ text-align: center;
1236
+ vertical-align: middle;
1237
+ z-index: 13;
1238
+ }
1239
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left-ico_<?php echo $bwg; ?>,
1240
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right-ico_<?php echo $bwg; ?> {
1241
+ background-color: #<?php echo $theme_row->slideshow_rl_btn_bg_color; ?>;
1242
+ border-radius: <?php echo $theme_row->slideshow_rl_btn_border_radius; ?>;
1243
+ border: <?php echo $theme_row->slideshow_rl_btn_border_width; ?>px <?php echo $theme_row->slideshow_rl_btn_border_style; ?> #<?php echo $theme_row->slideshow_rl_btn_border_color; ?>;
1244
+ box-shadow: <?php echo $theme_row->slideshow_rl_btn_box_shadow; ?>;
1245
+ color: #<?php echo $theme_row->slideshow_rl_btn_color; ?>;
1246
+ height: <?php echo $theme_row->slideshow_rl_btn_height; ?>px;
1247
+ font-size: <?php echo $theme_row->slideshow_rl_btn_size; ?>px;
1248
+ width: <?php echo $theme_row->slideshow_rl_btn_width; ?>px;
1249
+ z-index: 13;
1250
+ -moz-box-sizing: content-box;
1251
+ box-sizing: content-box;
1252
+ cursor: pointer;
1253
+ display: table;
1254
+ line-height: 0;
1255
+ margin-top: -15px;
1256
+ position: absolute;
1257
+ top: 50%;
1258
+ /*z-index: 10135;*/
1259
+ opacity: <?php echo number_format($theme_row->slideshow_close_btn_transparent / 100, 2, ".", ""); ?>;
1260
+ filter: Alpha(opacity=<?php echo $theme_row->slideshow_close_btn_transparent; ?>);
1261
+ }
1262
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_left-ico_<?php echo $bwg; ?>:hover,
1263
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_slideshow_right-ico_<?php echo $bwg; ?>:hover {
1264
+ color: #<?php echo $theme_row->slideshow_close_rl_btn_hover_color; ?>;
1265
+ cursor: pointer;
1266
+ }
1267
+ <?php
1268
+ if($options_row->autohide_slideshow_navigation){?>
1269
+ #spider_slideshow_left-ico_<?php echo $bwg; ?>{
1270
+ left: -9999px;
1271
+ }
1272
+ #spider_slideshow_right-ico_<?php echo $bwg; ?>{
1273
+ left: -9999px;
1274
+ }
1275
+
1276
+ <?php }
1277
+ else{ ?>
1278
+ #spider_slideshow_left-ico_<?php echo $bwg; ?>{
1279
+ left: 20px;
1280
+ }
1281
+ #spider_slideshow_right-ico_<?php echo $bwg; ?>{
1282
+ left: auto;
1283
+ right: 20px;
1284
+ }
1285
+ <?php } ?>
1286
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_container_<?php echo $bwg; ?> {
1287
+ display: table;
1288
+ position: absolute;
1289
+ text-align: center;
1290
+ <?php echo $theme_row->slideshow_filmstrip_pos; ?>: <?php echo $slideshow_filmstrip_height; ?>px;
1291
+ vertical-align: middle;
1292
+ width: <?php echo $image_width; ?>px;
1293
+ height: <?php echo $image_height; ?>px;
1294
+ }
1295
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_container_<?php echo $bwg; ?> {
1296
+ display: table;
1297
+ height: <?php echo $slideshow_filmstrip_height; ?>px;
1298
+ position: absolute;
1299
+ width: <?php echo $image_width; ?>px;
1300
+ /*z-index: 10105;*/
1301
+ <?php echo $theme_row->slideshow_filmstrip_pos; ?>: 0;
1302
+ }
1303
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_<?php echo $bwg; ?> {
1304
+ left: 20px;
1305
+ overflow: hidden;
1306
+ position: absolute;
1307
+ width: <?php echo $image_width - 40; ?>px;
1308
+ /*z-index: 10106;*/
1309
+ }
1310
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?> {
1311
+ height: <?php echo $slideshow_filmstrip_height; ?>px;
1312
+ left: 0px;
1313
+ margin: 0 auto;
1314
+ overflow: hidden;
1315
+ position: relative;
1316
+ width: <?php echo ($slideshow_filmstrip_width + $filmstrip_thumb_margin_hor) * count($image_rows); ?>px;
1317
+ }
1318
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?> {
1319
+ position: relative;
1320
+ background: none;
1321
+ border: <?php echo $theme_row->slideshow_filmstrip_thumb_border_width; ?>px <?php echo $theme_row->slideshow_filmstrip_thumb_border_style; ?> #<?php echo $theme_row->slideshow_filmstrip_thumb_border_color; ?>;
1322
+ border-radius: <?php echo $theme_row->slideshow_filmstrip_thumb_border_radius; ?>;
1323
+ cursor: pointer;
1324
+ float: left;
1325
+ height: <?php echo $slideshow_filmstrip_height; ?>px;
1326
+ margin: <?php echo $theme_row->slideshow_filmstrip_thumb_margin; ?>;
1327
+ width: <?php echo $slideshow_filmstrip_width; ?>px;
1328
+ overflow: hidden;
1329
+ }
1330
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_thumb_active_<?php echo $bwg; ?> {
1331
+ opacity: 1;
1332
+ filter: Alpha(opacity=100);
1333
+ border: <?php echo $theme_row->slideshow_filmstrip_thumb_active_border_width; ?>px solid #<?php echo $theme_row->slideshow_filmstrip_thumb_active_border_color; ?>;
1334
+ }
1335
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_thumb_deactive_<?php echo $bwg; ?> {
1336
+ opacity: <?php echo number_format($theme_row->slideshow_filmstrip_thumb_deactive_transparent / 100, 2, ".", ""); ?>;
1337
+ filter: Alpha(opacity=<?php echo $theme_row->slideshow_filmstrip_thumb_deactive_transparent; ?>);
1338
+ }
1339
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_thumbnail_img_<?php echo $bwg; ?> {
1340
+ display: block;
1341
+ opacity: 1;
1342
+ filter: Alpha(opacity=100);
1343
+ padding: 0 !important;
1344
+ }
1345
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_left_<?php echo $bwg; ?> {
1346
+ background-color: #<?php echo $theme_row->slideshow_filmstrip_rl_bg_color; ?>;
1347
+ cursor: pointer;
1348
+ display: table-cell;
1349
+ vertical-align: middle;
1350
+ width: 20px;
1351
+ /*z-index: 10106;*/
1352
+ left: 0;
1353
+ }
1354
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_right_<?php echo $bwg; ?> {
1355
+ background-color: #<?php echo $theme_row->slideshow_filmstrip_rl_bg_color; ?>;
1356
+ cursor: pointer;
1357
+ right: 0;
1358
+ width: 20px;
1359
+ display: table-cell;
1360
+ vertical-align: middle;
1361
+ /*z-index: 10106;*/
1362
+ }
1363
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_left_<?php echo $bwg; ?> i,
1364
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_filmstrip_right_<?php echo $bwg; ?> i {
1365
+ color: #<?php echo $theme_row->slideshow_filmstrip_rl_btn_color; ?>;
1366
+ font-size: <?php echo $theme_row->slideshow_filmstrip_rl_btn_size; ?>px;
1367
+ }
1368
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_none_selectable_<?php echo $bwg; ?> {
1369
+ -webkit-touch-callout: none;
1370
+ -webkit-user-select: none;
1371
+ -khtml-user-select: none;
1372
+ -moz-user-select: none;
1373
+ -ms-user-select: none;
1374
+ user-select: none;
1375
+ }
1376
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_container_<?php echo $bwg; ?> {
1377
+ display: table-cell;
1378
+ margin: 0 auto;
1379
+ position: relative;
1380
+ vertical-align: middle;
1381
  }
1382
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_spun_<?php echo $bwg; ?> {
1383
+ display: table-cell;
1384
+ overflow: hidden;
1385
+ position: relative;
1386
+ text-align: <?php echo $watermark_position[1]; ?>;
1387
+ vertical-align: <?php echo $watermark_position[0]; ?>;
 
 
 
 
1388
  }
1389
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_title_spun_<?php echo $bwg; ?> {
1390
+ display: table-cell;
1391
+ overflow: hidden;
1392
+ position: relative;
1393
+ text-align: <?php echo $slideshow_title_position[1]; ?>;
1394
+ vertical-align: <?php echo $slideshow_title_position[0]; ?>;
1395
  }
1396
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_description_spun_<?php echo $bwg; ?> {
1397
+ display: table-cell;
1398
+ overflow: hidden;
1399
+ position: relative;
1400
+ text-align: <?php echo $slideshow_description_position[1]; ?>;
1401
+ vertical-align: <?php echo $slideshow_description_position[0]; ?>;
1402
  }
1403
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_image_<?php echo $bwg; ?> {
1404
+ padding: 0 !important;
1405
+ float: none !important;
1406
+ margin: 4px !important;
1407
+ max-height: <?php echo $watermark_height; ?>px;
1408
+ max-width: <?php echo $watermark_width; ?>px;
1409
+ opacity: <?php echo number_format($watermark_opacity / 100, 2, ".", ""); ?>;
1410
+ filter: Alpha(opacity=<?php echo $watermark_opacity; ?>);
1411
+ position: relative;
1412
+ z-index: 15;
 
 
1413
  }
1414
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_text_<?php echo $bwg; ?>,
1415
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_watermark_text_<?php echo $bwg; ?>:hover {
1416
+ text-decoration: none;
1417
+ margin: 4px;
1418
+ font-size: <?php echo $watermark_font_size; ?>px;
1419
+ font-family: <?php echo $watermark_font; ?>;
1420
+ color: #<?php echo $watermark_color; ?> !important;
1421
+ opacity: <?php echo number_format($watermark_opacity / 100, 2, ".", ""); ?>;
1422
+ filter: Alpha(opacity=<?php echo $watermark_opacity; ?>);
1423
+ position: relative;
1424
+ z-index: 15;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1425
  }
1426
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_title_text_<?php echo $bwg; ?> {
1427
+ text-decoration: none;
1428
+ font-size: <?php echo $theme_row->slideshow_title_font_size; ?>px;
1429
+ font-family: <?php echo $theme_row->slideshow_title_font; ?>;
1430
+ color: #<?php echo $theme_row->slideshow_title_color; ?> !important;
1431
+ opacity: <?php echo number_format($theme_row->slideshow_title_opacity / 100, 2, ".", ""); ?>;
1432
+ filter: Alpha(opacity=<?php echo $theme_row->slideshow_title_opacity; ?>);
1433
+ position: relative;
1434
+ z-index: 11;
1435
+ border-radius: <?php echo $theme_row->slideshow_title_border_radius; ?>;
1436
+ background-color: #<?php echo $theme_row->slideshow_title_background_color; ?>;
1437
+ padding: <?php echo $theme_row->slideshow_title_padding; ?>;
1438
+ <?php if($params['slideshow_title_full_width']) { ?>
1439
+ width: 100%;
1440
+ <?php } else { ?>
1441
+ margin: 5px;
1442
+ <?php } ?>
1443
+ display: inline-block;
1444
+ word-wrap: break-word;
1445
+ word-break: break-word;
1446
+ <?php if (!$enable_slideshow_filmstrip && $slideshow_title_position[0] == $theme_row->slideshow_filmstrip_pos) echo $theme_row->slideshow_filmstrip_pos . ':' . ($theme_row->slideshow_dots_height + 4) . 'px;'; ?>
1447
  }
1448
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_description_text_<?php echo $bwg; ?> {
1449
+ text-decoration: none;
1450
+ font-size: <?php echo $theme_row->slideshow_description_font_size; ?>px;
1451
+ font-family: <?php echo $theme_row->slideshow_description_font; ?>;
1452
+ color: #<?php echo $theme_row->slideshow_description_color; ?> !important;
1453
+ opacity: <?php echo number_format($theme_row->slideshow_description_opacity / 100, 2, ".", ""); ?>;
1454
+ filter: Alpha(opacity=<?php echo $theme_row->slideshow_description_opacity; ?>);
1455
+ position: relative;
1456
+ z-index: 15;
1457
+ border-radius: <?php echo $theme_row->slideshow_description_border_radius; ?>;
1458
+ background-color: #<?php echo $theme_row->slideshow_description_background_color; ?>;
1459
+ padding: <?php echo $theme_row->slideshow_description_padding; ?>;
1460
+ margin: 5px;
1461
+ display: inline-block;
1462
+ word-wrap: break-word;
1463
+ word-break: break-word;
1464
+ <?php if (!$enable_slideshow_filmstrip && $slideshow_description_position[0] == $theme_row->slideshow_filmstrip_pos) echo $theme_row->slideshow_filmstrip_pos . ':' . ($theme_row->slideshow_dots_height + 4) . 'px;'; ?>
1465
  }
1466
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_description_text_<?php echo $bwg; ?> * {
1467
+ text-decoration: none;
1468
+ color: #<?php echo $theme_row->slideshow_description_color; ?> !important;
1469
  }
1470
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slide_container_<?php echo $bwg; ?> {
1471
+ display: table-cell;
1472
+ margin: 0 auto;
1473
+ position: absolute;
1474
+ vertical-align: middle;
1475
+ width: 100%;
1476
+ height: 100%;
 
 
1477
  }
1478
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slide_bg_<?php echo $bwg; ?> {
1479
+ margin: 0 auto;
1480
+ width: inherit;
1481
+ height: inherit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1482
  }
1483
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slider_<?php echo $bwg; ?> {
1484
+ height: inherit;
1485
+ width: inherit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1486
  }
1487
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_spun_<?php echo $bwg; ?> {
1488
+ width: inherit;
1489
+ height: inherit;
1490
+ display: table-cell;
1491
+ filter: Alpha(opacity=100);
1492
+ opacity: 1;
1493
+ position: absolute;
1494
+ vertical-align: middle;
1495
+ z-index: 2;
1496
  }
1497
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_second_spun_<?php echo $bwg; ?> {
1498
+ width: inherit;
1499
+ height: inherit;
1500
+ display: table-cell;
1501
+ filter: Alpha(opacity=0);
1502
+ opacity: 0;
1503
+ position: absolute;
1504
+ vertical-align: middle;
1505
+ z-index: 1;
1506
  }
1507
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_grid_<?php echo $bwg; ?> {
1508
+ display: none;
1509
+ height: 100%;
1510
+ overflow: hidden;
1511
+ position: absolute;
1512
+ width: 100%;
1513
  }
1514
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_gridlet_<?php echo $bwg; ?> {
1515
+ opacity: 1;
1516
+ filter: Alpha(opacity=100);
1517
+ position: absolute;
 
 
1518
  }
1519
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_<?php echo $bwg; ?> {
1520
+ display: inline-block;
1521
+ position: relative;
1522
+ width: <?php echo $theme_row->slideshow_dots_width; ?>px;
1523
+ height: <?php echo $theme_row->slideshow_dots_height; ?>px;
1524
+ border-radius: <?php echo $theme_row->slideshow_dots_border_radius; ?>;
1525
+ background: #<?php echo $theme_row->slideshow_dots_background_color; ?>;
1526
+ margin: <?php echo $theme_row->slideshow_dots_margin; ?>px;
1527
+ cursor: pointer;
1528
+ overflow: hidden;
1529
+ z-index: 17;
1530
+ }
1531
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_container_<?php echo $bwg; ?> {
1532
+ display: block;
1533
+ overflow: hidden;
1534
+ position: absolute;
1535
+ width: <?php echo $image_width; ?>px;
1536
+ <?php echo $theme_row->slideshow_filmstrip_pos; ?>: 0;
1537
+ z-index: 17;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1538
  }
1539
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?> {
1540
+ left: 0px;
1541
+ font-size: 0;
1542
+ margin: 0 auto;
1543
+ overflow: hidden;
1544
+ position: relative;
1545
+ height: <?php echo ($theme_row->slideshow_dots_height + $theme_row->slideshow_dots_margin * 2); ?>px;
1546
+ width: <?php echo ($theme_row->slideshow_dots_width + $theme_row->slideshow_dots_margin * 2) * count($image_rows); ?>px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1547
  }
1548
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_active_<?php echo $bwg; ?> {
1549
+ background: #<?php echo $theme_row->slideshow_dots_active_background_color; ?>;
1550
+ opacity: 1;
1551
+ filter: Alpha(opacity=100);
1552
+ border: <?php echo $theme_row->slideshow_dots_active_border_width; ?>px solid #<?php echo $theme_row->slideshow_dots_active_border_color; ?>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1553
  }
1554
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_deactive_<?php echo $bwg; ?> {
1555
+ }
1556
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_spun1_<?php echo $bwg; ?> {
1557
+ display: table;
1558
+ width: inherit;
1559
+ height: inherit;
1560
+ }
1561
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_spun2_<?php echo $bwg; ?> {
1562
+ display: table-cell;
1563
+ vertical-align: middle;
1564
+ text-align: center;
1565
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1566
  <?php
1567
+ return ob_get_clean();
 
 
 
 
 
1568
  }
1569
  }
frontend/views/BWGViewThumbnails.php CHANGED
@@ -62,7 +62,7 @@ class BWGViewThumbnails {
62
  $params['tag'] = 0;
63
  }
64
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
65
- $sort_direction = ' ' . $params['order_by'] . ' ';
66
  $options_row = WDWLibrary::get_options_row_data();
67
  $placeholder = isset($options_row->placeholder) ? $options_row->placeholder : '';
68
  $play_icon = $options_row->play_icon;
@@ -71,10 +71,10 @@ class BWGViewThumbnails {
71
  $params['images_per_page'] = $params['count'];
72
  $params['sort_by'] = (($params['show'] == 'random') ? 'RAND()' : 'order');
73
  if ($params['show'] == 'last') {
74
- $sort_direction = ' DESC ';
75
  }
76
  elseif ($params['show'] == 'first') {
77
- $sort_direction = ' ASC ';
78
  }
79
  $params['image_enable_page'] = 0;
80
  $params['image_title'] = $options_row->image_title_show_hover;
@@ -161,201 +161,23 @@ class BWGViewThumbnails {
161
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error');
162
  }
163
  }
164
- $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
165
- $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
166
  $tags_rows = WDWLibrary::get_tags_rows_data($params['gallery_id']);
167
  $image_right_click = $options_row->image_right_click;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  ?>
169
- <style>
170
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> * {
171
- -moz-box-sizing: border-box;
172
- box-sizing: border-box;
173
- }
174
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
175
- -moz-box-sizing: content-box;
176
- box-sizing: content-box;
177
- background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
178
- display: inline-block;
179
- height: <?php echo $params['thumb_height']; ?>px;
180
- margin: <?php echo $theme_row->thumb_margin; ?>px;
181
- padding: <?php echo $theme_row->thumb_padding; ?>px;
182
- opacity: <?php echo number_format($theme_row->thumb_transparent / 100, 2, ".", ""); ?>;
183
- filter: Alpha(opacity=<?php echo $theme_row->thumb_transparent; ?>);
184
- text-align: center;
185
- vertical-align: middle;
186
- <?php echo ($theme_row->thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
187
- width: <?php echo $params['thumb_width']; ?>px;
188
- z-index: 100;
189
- }
190
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover {
191
- -ms-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
192
- -webkit-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
193
- backface-visibility: hidden;
194
- -webkit-backface-visibility: hidden;
195
- -moz-backface-visibility: hidden;
196
- -ms-backface-visibility: hidden;
197
- opacity: 1;
198
- filter: Alpha(opacity=100);
199
- transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
200
- z-index: 102;
201
- position: relative;
202
- }
203
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun2_<?php echo $bwg; ?> {
204
- border: <?php echo $theme_row->thumb_border_width; ?>px <?php echo $theme_row->thumb_border_style; ?> #<?php echo $theme_row->thumb_border_color; ?>;
205
- border-radius: <?php echo $theme_row->thumb_border_radius; ?>;
206
- box-shadow: <?php echo $theme_row->thumb_box_shadow; ?>;
207
- display: inline-block;
208
- height: <?php echo $params['thumb_height']; ?>px;
209
- overflow: hidden;
210
- width: <?php echo $params['thumb_width']; ?>px;
211
- }
212
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> {
213
- background-color: rgba(<?php echo $rgb_thumbs_bg_color['red']; ?>, <?php echo $rgb_thumbs_bg_color['green']; ?>, <?php echo $rgb_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->thumb_bg_transparent / 100, 2, ".", ""); ?>);
214
- display: inline-block;
215
- font-size: 0;
216
- max-width: <?php echo $params['image_column_number'] * ($params['thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
217
- text-align: <?php echo $theme_row->thumb_align; ?>;
218
- }
219
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
220
- display: inline-block;
221
- text-align: center;
222
- }
223
- <?php
224
- if ($params['image_title'] == 'show') { /* Show image title at the bottom.*/
225
- ?>
226
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
227
- display: block;
228
- margin: 0 auto;
229
- opacity: 1;
230
- filter: Alpha(opacity=100);
231
- text-align: center;
232
- width: <?php echo $params['thumb_width']; ?>px;
233
- }
234
- <?php
235
- }
236
- elseif ($params['image_title'] == 'hover') { /* Show image title on hover.*/
237
- ?>
238
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
239
- display: table;
240
- height: inherit;
241
- left: -3000px;
242
- opacity: 0;
243
- filter: Alpha(opacity=0);
244
- position: absolute;
245
- top: 0px;
246
- width: inherit;
247
- }
248
- <?php
249
- }
250
- ?>
251
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_title_spun1_<?php echo $bwg; ?> {
252
- left: <?php echo $theme_row->thumb_padding; ?>px;
253
- top: <?php echo $theme_row->thumb_padding; ?>px;
254
- opacity: 1;
255
- filter: Alpha(opacity=100);
256
- }
257
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun2_<?php echo $bwg; ?> {
258
- color: #<?php echo $theme_row->thumb_title_font_color; ?>;
259
- display: table-cell;
260
- font-family: <?php echo $theme_row->thumb_title_font_style; ?>;
261
- font-size: <?php echo $theme_row->thumb_title_font_size; ?>px;
262
- font-weight: <?php echo $theme_row->thumb_title_font_weight; ?>;
263
- height: inherit;
264
- padding: <?php echo $theme_row->thumb_title_margin; ?>;
265
- text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
266
- vertical-align: middle;
267
- width: inherit;
268
- word-wrap: break-word;
269
- }
270
- /*pagination styles*/
271
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> {
272
- text-align: <?php echo $theme_row->page_nav_align; ?>;
273
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
274
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
275
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
276
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
277
- margin: 6px 0 4px;
278
- display: block;
279
- height: 30px;
280
- line-height: 30px;
281
- }
282
- @media only screen and (max-width : 320px) {
283
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
284
- display: none;
285
- }
286
- }
287
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
288
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
289
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
290
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
291
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
292
- margin-right: 10px;
293
- vertical-align: middle;
294
- }
295
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .paging-input_<?php echo $bwg; ?> {
296
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
297
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
298
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
299
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
300
- vertical-align: middle;
301
- }
302
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled,
303
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:hover,
304
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:focus {
305
- cursor: default;
306
- color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
307
- }
308
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
309
- cursor: pointer;
310
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
311
- font-family: <?php echo str_replace('+', ' ', $theme_row->page_nav_font_style); ?>;
312
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
313
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
314
- text-decoration: none;
315
- padding: <?php echo $theme_row->page_nav_padding; ?>;
316
- margin: <?php echo $theme_row->page_nav_margin; ?>;
317
- border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
318
- border-style: <?php echo $theme_row->page_nav_border_style; ?>;
319
- border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
320
- border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
321
- background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
322
- opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
323
- filter: Alpha(opacity=<?php echo $theme_row->page_nav_button_bg_transparent; ?>);
324
- box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
325
- <?php echo ($theme_row->page_nav_button_transition ) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
326
- }
327
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_back_<?php echo $bwg; ?> {
328
- background-color: rgba(0, 0, 0, 0);
329
- color: #<?php echo $theme_row->album_compact_back_font_color; ?> !important;
330
- cursor: pointer;
331
- display: block;
332
- font-family: <?php echo str_replace('+', ' ', $theme_row->album_compact_back_font_style); ?>;
333
- font-size: <?php echo $theme_row->album_compact_back_font_size; ?>px;
334
- font-weight: <?php echo $theme_row->album_compact_back_font_weight; ?>;
335
- text-decoration: none;
336
- padding: <?php echo $theme_row->album_compact_back_padding; ?>;
337
- }
338
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
339
- background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
340
- opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
341
- filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
342
- }
343
- .bwg_play_icon_spun_<?php echo $bwg; ?> {
344
- width: inherit;
345
- height: inherit;
346
- display: table;
347
- position: absolute;
348
- }
349
- .bwg_play_icon_<?php echo $bwg; ?> {
350
- color: #<?php echo $theme_row->thumb_title_font_color; ?>;
351
- font-size: <?php echo 2 * $theme_row->thumb_title_font_size; ?>px;
352
- vertical-align: middle;
353
- display: table-cell !important;
354
- z-index: 1;
355
- text-align: center;
356
- margin: 0 auto;
357
- }
358
- </style>
359
  <div id="bwg_container1_<?php echo $bwg; ?>">
360
  <div id="bwg_container2_<?php echo $bwg; ?>">
361
  <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
@@ -584,4 +406,201 @@ class BWGViewThumbnails {
584
  die();
585
  }
586
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
  }
62
  $params['tag'] = 0;
63
  }
64
  $from = (isset($params['from']) ? esc_html($params['from']) : 0);
65
+ $sort_direction = $params['order_by'];
66
  $options_row = WDWLibrary::get_options_row_data();
67
  $placeholder = isset($options_row->placeholder) ? $options_row->placeholder : '';
68
  $play_icon = $options_row->play_icon;
71
  $params['images_per_page'] = $params['count'];
72
  $params['sort_by'] = (($params['show'] == 'random') ? 'RAND()' : 'order');
73
  if ($params['show'] == 'last') {
74
+ $sort_direction = 'DESC';
75
  }
76
  elseif ($params['show'] == 'first') {
77
+ $sort_direction = 'ASC';
78
  }
79
  $params['image_enable_page'] = 0;
80
  $params['image_title'] = $options_row->image_title_show_hover;
161
  echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error');
162
  }
163
  }
 
 
164
  $tags_rows = WDWLibrary::get_tags_rows_data($params['gallery_id']);
165
  $image_right_click = $options_row->image_right_click;
166
+
167
+ $inline_style = $this->inline_styles($bwg, $theme_row, $params);
168
+ global $wd_bwg_inline_stiles;
169
+ if ($wd_bwg_inline_stiles) {
170
+ wp_enqueue_style('bwg_frontend');
171
+ wp_add_inline_style('bwg_frontend', $inline_style);
172
+ wp_enqueue_style('bwg_font-awesome');
173
+ wp_enqueue_style('bwg_mCustomScrollbar');
174
+ $google_fonts = WDWLibrary::get_google_fonts();
175
+ wp_enqueue_style('bwg_googlefonts');
176
+ }
177
+ else {
178
+ echo '<style>' . $inline_style . '</style>';
179
+ }
180
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  <div id="bwg_container1_<?php echo $bwg; ?>">
182
  <div id="bwg_container2_<?php echo $bwg; ?>">
183
  <form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
406
  die();
407
  }
408
  }
409
+
410
+ private function inline_styles($bwg, $theme_row, $params) {
411
+ ob_start();
412
+ $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
413
+ $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
414
+ ?>
415
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> * {
416
+ -moz-box-sizing: border-box;
417
+ box-sizing: border-box;
418
+ }
419
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
420
+ -moz-box-sizing: content-box;
421
+ box-sizing: content-box;
422
+ background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
423
+ display: inline-block;
424
+ height: <?php echo $params['thumb_height']; ?>px;
425
+ margin: <?php echo $theme_row->thumb_margin; ?>px;
426
+ padding: <?php echo $theme_row->thumb_padding; ?>px;
427
+ opacity: <?php echo number_format($theme_row->thumb_transparent / 100, 2, ".", ""); ?>;
428
+ filter: Alpha(opacity=<?php echo $theme_row->thumb_transparent; ?>);
429
+ text-align: center;
430
+ vertical-align: middle;
431
+ <?php echo ($theme_row->thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
432
+ width: <?php echo $params['thumb_width']; ?>px;
433
+ z-index: 100;
434
+ }
435
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover {
436
+ -ms-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
437
+ -webkit-transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
438
+ backface-visibility: hidden;
439
+ -webkit-backface-visibility: hidden;
440
+ -moz-backface-visibility: hidden;
441
+ -ms-backface-visibility: hidden;
442
+ opacity: 1;
443
+ filter: Alpha(opacity=100);
444
+ transform: <?php echo $theme_row->thumb_hover_effect; ?>(<?php echo $theme_row->thumb_hover_effect_value; ?>);
445
+ z-index: 102;
446
+ position: relative;
447
+ }
448
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun2_<?php echo $bwg; ?> {
449
+ border: <?php echo $theme_row->thumb_border_width; ?>px <?php echo $theme_row->thumb_border_style; ?> #<?php echo $theme_row->thumb_border_color; ?>;
450
+ border-radius: <?php echo $theme_row->thumb_border_radius; ?>;
451
+ box-shadow: <?php echo $theme_row->thumb_box_shadow; ?>;
452
+ display: inline-block;
453
+ height: <?php echo $params['thumb_height']; ?>px;
454
+ overflow: hidden;
455
+ width: <?php echo $params['thumb_width']; ?>px;
456
+ }
457
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> {
458
+ background-color: rgba(<?php echo $rgb_thumbs_bg_color['red']; ?>, <?php echo $rgb_thumbs_bg_color['green']; ?>, <?php echo $rgb_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->thumb_bg_transparent / 100, 2, ".", ""); ?>);
459
+ display: inline-block;
460
+ font-size: 0;
461
+ max-width: <?php echo $params['image_column_number'] * ($params['thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
462
+ text-align: <?php echo $theme_row->thumb_align; ?>;
463
+ }
464
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
465
+ display: inline-block;
466
+ text-align: center;
467
+ }
468
+ <?php
469
+ if ($params['image_title'] == 'show') { /* Show image title at the bottom.*/
470
+ ?>
471
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
472
+ display: block;
473
+ margin: 0 auto;
474
+ opacity: 1;
475
+ filter: Alpha(opacity=100);
476
+ text-align: center;
477
+ width: <?php echo $params['thumb_width']; ?>px;
478
+ }
479
+ <?php
480
+ }
481
+ elseif ($params['image_title'] == 'hover') { /* Show image title on hover.*/
482
+ ?>
483
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
484
+ display: table;
485
+ height: inherit;
486
+ left: -3000px;
487
+ opacity: 0;
488
+ filter: Alpha(opacity=0);
489
+ position: absolute;
490
+ top: 0px;
491
+ width: inherit;
492
+ }
493
+ <?php
494
+ }
495
+ ?>
496
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?>:hover .bwg_title_spun1_<?php echo $bwg; ?> {
497
+ left: <?php echo $theme_row->thumb_padding; ?>px;
498
+ top: <?php echo $theme_row->thumb_padding; ?>px;
499
+ opacity: 1;
500
+ filter: Alpha(opacity=100);
501
+ }
502
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun2_<?php echo $bwg; ?> {
503
+ color: #<?php echo $theme_row->thumb_title_font_color; ?>;
504
+ display: table-cell;
505
+ font-family: <?php echo $theme_row->thumb_title_font_style; ?>;
506
+ font-size: <?php echo $theme_row->thumb_title_font_size; ?>px;
507
+ font-weight: <?php echo $theme_row->thumb_title_font_weight; ?>;
508
+ height: inherit;
509
+ padding: <?php echo $theme_row->thumb_title_margin; ?>;
510
+ text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
511
+ vertical-align: middle;
512
+ width: inherit;
513
+ word-wrap: break-word;
514
+ }
515
+ /*pagination styles*/
516
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> {
517
+ text-align: <?php echo $theme_row->page_nav_align; ?>;
518
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
519
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
520
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
521
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
522
+ margin: 6px 0 4px;
523
+ display: block;
524
+ height: 30px;
525
+ line-height: 30px;
526
+ }
527
+ @media only screen and (max-width : 320px) {
528
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
529
+ display: none;
530
+ }
531
+ }
532
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .displaying-num_<?php echo $bwg; ?> {
533
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
534
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
535
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
536
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
537
+ margin-right: 10px;
538
+ vertical-align: middle;
539
+ }
540
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .paging-input_<?php echo $bwg; ?> {
541
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
542
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
543
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
544
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
545
+ vertical-align: middle;
546
+ }
547
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled,
548
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:hover,
549
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a.disabled:focus {
550
+ cursor: default;
551
+ color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
552
+ }
553
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
554
+ cursor: pointer;
555
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
556
+ font-family: <?php echo str_replace('+', ' ', $theme_row->page_nav_font_style); ?>;
557
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
558
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
559
+ text-decoration: none;
560
+ padding: <?php echo $theme_row->page_nav_padding; ?>;
561
+ margin: <?php echo $theme_row->page_nav_margin; ?>;
562
+ border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
563
+ border-style: <?php echo $theme_row->page_nav_border_style; ?>;
564
+ border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
565
+ border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
566
+ background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
567
+ opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
568
+ filter: Alpha(opacity=<?php echo $theme_row->page_nav_button_bg_transparent; ?>);
569
+ box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
570
+ <?php echo ($theme_row->page_nav_button_transition ) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
571
+ }
572
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_back_<?php echo $bwg; ?> {
573
+ background-color: rgba(0, 0, 0, 0);
574
+ color: #<?php echo $theme_row->album_compact_back_font_color; ?> !important;
575
+ cursor: pointer;
576
+ display: block;
577
+ font-family: <?php echo str_replace('+', ' ', $theme_row->album_compact_back_font_style); ?>;
578
+ font-size: <?php echo $theme_row->album_compact_back_font_size; ?>px;
579
+ font-weight: <?php echo $theme_row->album_compact_back_font_weight; ?>;
580
+ text-decoration: none;
581
+ padding: <?php echo $theme_row->album_compact_back_padding; ?>;
582
+ }
583
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
584
+ background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
585
+ opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
586
+ filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
587
+ }
588
+ .bwg_play_icon_spun_<?php echo $bwg; ?> {
589
+ width: inherit;
590
+ height: inherit;
591
+ display: table;
592
+ position: absolute;
593
+ }
594
+ .bwg_play_icon_<?php echo $bwg; ?> {
595
+ color: #<?php echo $theme_row->thumb_title_font_color; ?>;
596
+ font-size: <?php echo 2 * $theme_row->thumb_title_font_size; ?>px;
597
+ vertical-align: middle;
598
+ display: table-cell !important;
599
+ z-index: 1;
600
+ text-align: center;
601
+ margin: 0 auto;
602
+ }
603
+ <?php
604
+ return ob_get_clean();
605
+ }
606
  }
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.3.22
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -15,6 +15,7 @@ define('WD_BWG_URL', plugins_url(plugin_basename(dirname(__FILE__))));
15
  define('WD_BWG_NAME', plugin_basename(dirname(__FILE__)));
16
  define('WD_BWG_PRO', false);
17
  define('WD_BWG_VERSION', get_option('wd_bwg_version'));
 
18
 
19
  function bwg_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -41,11 +42,14 @@ else {
41
 
42
  global $wpdb;
43
  if ($wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "bwg_option'")) {
44
- $WD_BWG_UPLOAD_DIR = $wpdb->get_var($wpdb->prepare('SELECT images_directory FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1)) . '/photo-gallery';
 
 
45
  }
46
  else {
47
  $upload_dir = wp_upload_dir();
48
  $WD_BWG_UPLOAD_DIR = str_replace(ABSPATH, '', $upload_dir['basedir']) . '/photo-gallery';
 
49
  }
50
 
51
  // Plugin menu.
@@ -811,6 +815,7 @@ function bwg_activate() {
811
  `show_tag_box` tinyint(1) NOT NULL,
812
  `show_hide_custom_post` tinyint(1) NOT NULL,
813
  `show_hide_post_meta` tinyint(1) NOT NULL,
 
814
  `placeholder` varchar(32) NOT NULL,
815
  PRIMARY KEY (`id`)
816
  ) DEFAULT CHARSET=utf8;";
@@ -1002,6 +1007,7 @@ function bwg_activate() {
1002
  'show_tag_box' => 0,
1003
  'show_hide_custom_post' => 0,
1004
  'show_hide_post_meta' => 0,
 
1005
  'placeholder' => '',
1006
  'ecommerce_icon_show_hover' => '',
1007
  'popup_enable_ecommerce' => 0,
@@ -1931,8 +1937,8 @@ function bwg_activate() {
1931
  'default_theme' => 0
1932
  ));
1933
  }
1934
- $version = WD_BWG_VERSION;
1935
- $new_version = '1.3.22';
1936
  if ($version && version_compare($version, $new_version, '<')) {
1937
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1938
  bwg_update($version);
@@ -1983,8 +1989,8 @@ add_action('wpmu_new_blog', 'bwg_new_blog_added', 10, 6);
1983
  wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.instagram.com/oembed', true );
1984
 
1985
  function bwg_update_hook() {
1986
- $version = WD_BWG_VERSION;
1987
- $new_version = '1.3.22';
1988
  if ($version && version_compare($version, $new_version, '<')) {
1989
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1990
  bwg_update($version);
@@ -2208,26 +2214,18 @@ function bwg_options_scripts() {
2208
 
2209
  function bwg_front_end_scripts() {
2210
  $version = wd_bwg_version();
2211
- global $wp_scripts;
2212
- if (isset($wp_scripts->registered['jquery'])) {
2213
- $jquery = $wp_scripts->registered['jquery'];
2214
- if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.8.2', '<')) {
2215
- wp_deregister_script('jquery');
2216
- wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
2217
- }
2218
- }
2219
  wp_enqueue_script('jquery');
2220
  /*wp_enqueue_style('jquery-ui', WD_BWG_FRONT_URL . '/css/jquery-ui-1.10.3.custom.css', array(), $version);*/
2221
 
2222
  wp_enqueue_script('bwg_frontend', WD_BWG_FRONT_URL . '/js/bwg_frontend.js', array(), $version);
2223
- wp_enqueue_style('bwg_frontend', WD_BWG_FRONT_URL . '/css/bwg_frontend.css', array(), $version);
2224
  wp_enqueue_script('bwg_sumoselect', WD_BWG_FRONT_URL . '/js/jquery.sumoselect.min.js', array(), '3.0.2');
2225
- wp_enqueue_style('bwg_sumoselect', WD_BWG_FRONT_URL . '/css/sumoselect.css', array(), '3.0.2');
2226
  // Styles/Scripts for popup.
2227
- wp_enqueue_style('bwg_font-awesome', WD_BWG_FRONT_URL . '/css/font-awesome/font-awesome.css', array(), '4.6.3');
2228
  wp_enqueue_script('bwg_jquery_mobile', WD_BWG_FRONT_URL . '/js/jquery.mobile.js', array(), $version);
2229
  wp_enqueue_script('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/js/jquery.mCustomScrollbar.concat.min.js', array(), $version);
2230
- wp_enqueue_style('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/css/jquery.mCustomScrollbar.css', array(), $version);
2231
  wp_enqueue_script('jquery-fullscreen', WD_BWG_FRONT_URL . '/js/jquery.fullscreen-0.4.1.js', array(), '0.4.1');
2232
  wp_enqueue_script('bwg_gallery_box', WD_BWG_FRONT_URL . '/js/bwg_gallery_box.js', array(), $version);
2233
  wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array(
@@ -2242,12 +2240,18 @@ function bwg_front_end_scripts() {
2242
 
2243
  // Google fonts.
2244
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
2245
- $google_fonts = WDWLibrary::get_google_fonts();
2246
- for ($i = 0; $i < count($google_fonts); $i = $i + 120) {
2247
- $fonts = array_slice($google_fonts, $i, 120);
2248
- $query = implode("|", str_replace(' ', '+', $fonts));
2249
- $url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
2250
- wp_enqueue_style('bwg_googlefonts_' . $i, $url, null, null);
 
 
 
 
 
 
2251
  }
2252
  }
2253
  add_action('wp_enqueue_scripts', 'bwg_front_end_scripts');
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.3.23
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
15
  define('WD_BWG_NAME', plugin_basename(dirname(__FILE__)));
16
  define('WD_BWG_PRO', false);
17
  define('WD_BWG_VERSION', get_option('wd_bwg_version'));
18
+ $wd_bwg_inline_stiles = FALSE;
19
 
20
  function bwg_use_home_url() {
21
  $home_url = str_replace("http://", "", home_url());
42
 
43
  global $wpdb;
44
  if ($wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "bwg_option'")) {
45
+ $bwg_options_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
46
+ $WD_BWG_UPLOAD_DIR = $bwg_options_row->images_directory . '/photo-gallery';
47
+ $wd_bwg_inline_stiles = isset($bwg_options_row->use_inline_stiles_and_scripts) ? $bwg_options_row->use_inline_stiles_and_scripts : 0;
48
  }
49
  else {
50
  $upload_dir = wp_upload_dir();
51
  $WD_BWG_UPLOAD_DIR = str_replace(ABSPATH, '', $upload_dir['basedir']) . '/photo-gallery';
52
+ $wd_bwg_inline_stiles = 0;
53
  }
54
 
55
  // Plugin menu.
815
  `show_tag_box` tinyint(1) NOT NULL,
816
  `show_hide_custom_post` tinyint(1) NOT NULL,
817
  `show_hide_post_meta` tinyint(1) NOT NULL,
818
+ `use_inline_stiles_and_scripts` tinyint(1) NOT NULL,
819
  `placeholder` varchar(32) NOT NULL,
820
  PRIMARY KEY (`id`)
821
  ) DEFAULT CHARSET=utf8;";
1007
  'show_tag_box' => 0,
1008
  'show_hide_custom_post' => 0,
1009
  'show_hide_post_meta' => 0,
1010
+ 'use_inline_stiles_and_scripts' => 0,
1011
  'placeholder' => '',
1012
  'ecommerce_icon_show_hover' => '',
1013
  'popup_enable_ecommerce' => 0,
1937
  'default_theme' => 0
1938
  ));
1939
  }
1940
+ $version = get_option('wd_bwg_version');
1941
+ $new_version = '1.3.23';
1942
  if ($version && version_compare($version, $new_version, '<')) {
1943
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1944
  bwg_update($version);
1989
  wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.instagram.com/oembed', true );
1990
 
1991
  function bwg_update_hook() {
1992
+ $version = get_option('wd_bwg_version');
1993
+ $new_version = '1.3.23';
1994
  if ($version && version_compare($version, $new_version, '<')) {
1995
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1996
  bwg_update($version);
2214
 
2215
  function bwg_front_end_scripts() {
2216
  $version = wd_bwg_version();
 
 
 
 
 
 
 
 
2217
  wp_enqueue_script('jquery');
2218
  /*wp_enqueue_style('jquery-ui', WD_BWG_FRONT_URL . '/css/jquery-ui-1.10.3.custom.css', array(), $version);*/
2219
 
2220
  wp_enqueue_script('bwg_frontend', WD_BWG_FRONT_URL . '/js/bwg_frontend.js', array(), $version);
2221
+ wp_register_style('bwg_frontend', WD_BWG_FRONT_URL . '/css/bwg_frontend.css', array(), $version);
2222
  wp_enqueue_script('bwg_sumoselect', WD_BWG_FRONT_URL . '/js/jquery.sumoselect.min.js', array(), '3.0.2');
2223
+ wp_register_style('bwg_sumoselect', WD_BWG_FRONT_URL . '/css/sumoselect.css', array(), '3.0.2');
2224
  // Styles/Scripts for popup.
2225
+ wp_register_style('bwg_font-awesome', WD_BWG_FRONT_URL . '/css/font-awesome/font-awesome.css', array(), '4.6.3');
2226
  wp_enqueue_script('bwg_jquery_mobile', WD_BWG_FRONT_URL . '/js/jquery.mobile.js', array(), $version);
2227
  wp_enqueue_script('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/js/jquery.mCustomScrollbar.concat.min.js', array(), $version);
2228
+ wp_register_style('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/css/jquery.mCustomScrollbar.css', array(), $version);
2229
  wp_enqueue_script('jquery-fullscreen', WD_BWG_FRONT_URL . '/js/jquery.fullscreen-0.4.1.js', array(), '0.4.1');
2230
  wp_enqueue_script('bwg_gallery_box', WD_BWG_FRONT_URL . '/js/bwg_gallery_box.js', array(), $version);
2231
  wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array(
2240
 
2241
  // Google fonts.
2242
  require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
2243
+ $google_fonts = WDWLibrary::get_used_google_fonts();
2244
+ $query = implode("|", str_replace(' ', '+', $google_fonts));
2245
+ $url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
2246
+ wp_register_style('bwg_googlefonts', $url, null, null);
2247
+
2248
+ global $wd_bwg_inline_stiles;
2249
+ if (!$wd_bwg_inline_stiles) {
2250
+ wp_enqueue_style('bwg_frontend');
2251
+ wp_enqueue_style('bwg_font-awesome');
2252
+ wp_enqueue_style('bwg_mCustomScrollbar');
2253
+ wp_enqueue_style('bwg_googlefonts');
2254
+ wp_enqueue_style('bwg_sumoselect');
2255
  }
2256
  }
2257
  add_action('wp_enqueue_scripts', 'bwg_front_end_scripts');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: album, image gallery, gallery, image, images, lightbox, photo, photo gallery, photos, responsive, thumbnail, widget
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
- Stable tag: 1.3.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -173,6 +173,15 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
173
 
174
  == Changelog ==
175
 
 
 
 
 
 
 
 
 
 
176
  = 1.3.22 =
177
  * Fixed: Styles on Twenty Seventeen theme.
178
  * Fixed: Conflict with lazy load in albums views.
4
  Tags: album, image gallery, gallery, image, images, lightbox, photo, photo gallery, photos, responsive, thumbnail, widget
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
+ Stable tag: 1.3.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
173
 
174
  == Changelog ==
175
 
176
+ = 1.3.23 =
177
+ * Fixed: Ordering bug in Gallery Box.
178
+ * Added: Possibility to include styles/scripts in necessary pages only.
179
+ * Fixed: Share after image change.
180
+ * Fixed: Author for custom posts.
181
+ * Fixed: Removed unnecessary spaces from ordering.
182
+ * Fixed: Tag select on mobile.
183
+ * Changed: Include only necessary Google Fonts.
184
+
185
  = 1.3.22 =
186
  * Fixed: Styles on Twenty Seventeen theme.
187
  * Fixed: Conflict with lazy load in albums views.
update/bwg_update.php CHANGED
@@ -369,6 +369,9 @@ function bwg_update($version) {
369
  }
370
  }
371
  }
372
- return;
 
 
 
373
  }
374
  ?>
369
  }
370
  }
371
  }
372
+ if (version_compare($version, '1.3.23') == -1) {
373
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `use_inline_stiles_and_scripts` tinyint(1) NOT NULL DEFAULT 0");
374
+ }
375
+ return;
376
  }
377
  ?>