WD Instagram Feed – Instagram Gallery - Version 1.1.21

Version Description

New: Three new plugins added to featured plugins list: Ad Manager WD, Youtube WD and Staff Team WD
Fixed: Colors and opacities of share buttons in lightbox (PRO)

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Instagram Feed – Instagram Gallery
Version 1.1.21
Comparing to
See all releases

Code changes from version 1.1.20 to 1.1.21

featured/WDIFeaturedPlugins.php CHANGED
@@ -52,6 +52,18 @@ class WDIFeaturedPlugins
52
  'content' => 'Organize and publish your events in an easy and elegant way using Event Calendar WD.',
53
  'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
54
  ),
 
 
 
 
 
 
 
 
 
 
 
 
55
  "mailchimp" => array(
56
  'title' => 'Mailchimp Forms WD',
57
  'text' => 'WordPress Mailchimp forms plugin',
@@ -83,6 +95,12 @@ class WDIFeaturedPlugins
83
  'content' => 'Organize and publish your FAQs in an easy and elegant way using FAQ WD.',
84
  'href' => 'https://web-dorado.com/products/wordpress-faq-wd.html'
85
  ),
 
 
 
 
 
 
86
  "instagram_feed" => array(
87
  'title' => 'Instagram Feed WD',
88
  'text' => 'WordPress Instagram Feed plugin',
@@ -330,6 +348,12 @@ class WDIFeaturedPlugins
330
  #main_featured_plugins_page #featured-plugins-list li.events-wd .product {
331
  background: url("<?php echo WDI_URL; ?>/featured/images/events-wd.png") center center no-repeat;
332
  }
 
 
 
 
 
 
333
  #main_featured_plugins_page #featured-plugins-list li.mailchimp .product {
334
  background: url("<?php echo WDI_URL; ?>/featured/images/mailchimp.png") center center no-repeat;
335
  }
@@ -337,6 +361,9 @@ class WDIFeaturedPlugins
337
  #main_featured_plugins_page #featured-plugins-list li.faq_wd .product {
338
  background: url("<?php echo WDI_URL; ?>/featured/images/faq_wd.png") center center no-repeat;
339
  }
 
 
 
340
 
341
  #main_featured_plugins_page #featured-plugins-list li.instagram_feed .product {
342
  background: url("<?php echo WDI_URL; ?>/featured/images/instagram_feed.png") center center no-repeat;
52
  'content' => 'Organize and publish your events in an easy and elegant way using Event Calendar WD.',
53
  'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
54
  ),
55
+ "youtube-wd" => array(
56
+ 'title' => 'Youtube WD',
57
+ 'text' => 'WordPress Youtube plugin',
58
+ 'content' => 'Adding YouTube videos, channels and playlists to your WordPress website is super easy with YouTube WD plugin.',
59
+ 'href' => 'https://web-dorado.com/products/wordpress-youtube-plugin.html'
60
+ ),
61
+ "admanager-wd" => array(
62
+ 'title' => 'Ad Manager WD',
63
+ 'text' => 'WordPress ads plugin',
64
+ 'content' => 'Thinking of ways to monetize your WordPress website with ads? Now you can do it without any difficulty.',
65
+ 'href' => 'https://web-dorado.com/products/wordpress-ad-manager-wd.html'
66
+ ),
67
  "mailchimp" => array(
68
  'title' => 'Mailchimp Forms WD',
69
  'text' => 'WordPress Mailchimp forms plugin',
95
  'content' => 'Organize and publish your FAQs in an easy and elegant way using FAQ WD.',
96
  'href' => 'https://web-dorado.com/products/wordpress-faq-wd.html'
97
  ),
98
+ "staff-team" => array(
99
+ 'title' => 'Team WD',
100
+ 'text' => 'WordPress team plugin',
101
+ 'content' => 'Team WD plugin is a perfect solution to display the members of your staff, team or employees on your WordPress website.',
102
+ 'href' => 'https://web-dorado.com/products/wordpress-team-wd.html'
103
+ ),
104
  "instagram_feed" => array(
105
  'title' => 'Instagram Feed WD',
106
  'text' => 'WordPress Instagram Feed plugin',
348
  #main_featured_plugins_page #featured-plugins-list li.events-wd .product {
349
  background: url("<?php echo WDI_URL; ?>/featured/images/events-wd.png") center center no-repeat;
350
  }
351
+ #main_featured_plugins_page #featured-plugins-list li.youtube-wd .product {
352
+ background: url("<?php echo WDI_URL; ?>/featured/images/youtube-wd.png") center center no-repeat;
353
+ }
354
+ #main_featured_plugins_page #featured-plugins-list li.admanager-wd .product {
355
+ background: url("<?php echo WDI_URL; ?>/featured/images/admanager-wd.png") center center no-repeat;
356
+ }
357
  #main_featured_plugins_page #featured-plugins-list li.mailchimp .product {
358
  background: url("<?php echo WDI_URL; ?>/featured/images/mailchimp.png") center center no-repeat;
359
  }
361
  #main_featured_plugins_page #featured-plugins-list li.faq_wd .product {
362
  background: url("<?php echo WDI_URL; ?>/featured/images/faq_wd.png") center center no-repeat;
363
  }
364
+ #main_featured_plugins_page #featured-plugins-list li.staff-team .product {
365
+ background: url("<?php echo WDI_URL; ?>/featured/images/staff-team.png") center center no-repeat;
366
+ }
367
 
368
  #main_featured_plugins_page #featured-plugins-list li.instagram_feed .product {
369
  background: url("<?php echo WDI_URL; ?>/featured/images/instagram_feed.png") center center no-repeat;
featured/images/admanager-wd.png ADDED
Binary file
featured/images/mailchimp.png CHANGED
Binary file
featured/images/staff-team.png ADDED
Binary file
featured/images/youtube-wd.png ADDED
Binary file
frontend/views/WDIViewGalleryBox.php CHANGED
@@ -27,7 +27,7 @@ class WDIViewGalleryBox {
27
 
28
  //////////////////////////////////////////////////////////////////
29
  $current_feed = $this->model->get_feed_row_data($_POST['feed_id']);
30
-
31
  $theme_row = WDILibrary::arrayToObject($this->model->get_theme_row_data($current_feed['theme_id']));
32
  $option_row = WDILibrary::arrayToObject($current_feed);
33
  $option_row->preload_images_count = 0;
@@ -51,7 +51,7 @@ class WDIViewGalleryBox {
51
  $open_with_autoplay = (isset($current_feed['popup_autoplay']) ? esc_html($current_feed['popup_autoplay']) : 0);
52
  $image_width = (isset($current_feed['popup_width']) ? esc_html($current_feed['popup_width']) : 800);
53
  $image_height = (isset($current_feed['popup_height']) ? esc_html($current_feed['popup_height']) : 500);
54
-
55
  $image_effect = (isset($current_feed['popup_type']) && esc_html(isset($current_feed['popup_type'])) ? esc_html($current_feed['popup_type']) : 'fade');
56
 
57
  $sort_by = (isset($_GET['wd_sor']) ? esc_html($_GET['wd_sor']) : 'order');/*watch later*/
@@ -99,17 +99,17 @@ class WDIViewGalleryBox {
99
  $watermark_height = (isset($_GET['watermark_height']) ? esc_html($_GET['watermark_height']) : 90);/*watch later*//*deprecated*/
100
 
101
 
102
-
103
 
104
  //$option_row = $this->model->get_option_row_data();
105
 
106
 
107
- // $image_right_click = 0; //$option_row->image_right_click;/*watch later havent this options*/
108
  $comment_moderation = 0;//$option_row->comment_moderation;/*watch later havent this options*/
109
 
110
  $filmstrip_direction = 'horizontal';
111
  if ($theme_row->lightbox_filmstrip_pos == 'right' || $theme_row->lightbox_filmstrip_pos == 'left') {
112
- $filmstrip_direction = 'vertical';
113
  }
114
  if ($enable_image_filmstrip) {
115
  if ($filmstrip_direction == 'horizontal') {
@@ -132,16 +132,17 @@ class WDIViewGalleryBox {
132
  //$image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by, $order_by);
133
  }
134
  else {
135
- // $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by);
136
  }
137
 
138
-
139
  $json = (($_POST['image_rows']));
140
  str_replace('"',"&quot;", $json);
 
141
  $image_rows = json_decode(stripslashes($json));
142
  $image_rows_count = count($image_rows);
143
  $image_rows = WDILibrary::arrayToObject($image_rows);
144
-
145
  /////////////////////////////////Parametes for deprecated content////////////////////
146
  $theme_row->lightbox_rate_stars_count = 0;
147
  $theme_row->lightbox_rate_size = 0;
@@ -217,7 +218,7 @@ class WDIViewGalleryBox {
217
  $filmstrip_thumb_margin_right = (int) $margins_split[0];
218
  $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
219
  }
220
-
221
  $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
222
  $rgb_wdi_image_info_bg_color = WDILibrary::wdi_spider_hex2rgb($theme_row->lightbox_info_bg_color);
223
  $rgb_lightbox_ctrl_cont_bg_color = WDILibrary::wdi_spider_hex2rgb($theme_row->lightbox_ctrl_cont_bg_color);
@@ -239,13 +240,13 @@ class WDIViewGalleryBox {
239
  }
240
 
241
  $current_filename = '';
242
-
243
  if ($option_row->enable_addthis && $option_row->addthis_profile_id) {
244
  ?>
245
  <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $option_row->addthis_profile_id; ?>" async="async"></script>
246
  <?php
247
  }
248
-
249
  ?>
250
  <style>
251
  /*@import url(https://fonts.googleapis.com/css?family=Maven+Pro:400,500);*/
@@ -304,24 +305,24 @@ class WDIViewGalleryBox {
304
  right: 0;
305
  top: 0;
306
  }
307
-
308
  .wdi_ctrl_btn_container {
309
  background-color: rgba(<?php echo $rgb_lightbox_ctrl_cont_bg_color['red']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['green']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>);
310
  /*background: none repeat scroll 0 0 #<?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;*/
311
- <?php
312
- if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
313
- ?>
314
- border-bottom-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
315
- border-bottom-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
316
- <?php
317
- }
318
- else {
319
- ?>
320
- bottom: 0;
321
- border-top-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
322
- border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
323
- <?php
324
- }?>
325
  height: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
326
  /*opacity: <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>;
327
  filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_cont_transparent; ?>);*/
@@ -332,27 +333,27 @@ class WDIViewGalleryBox {
332
  }
333
  .wdi_toggle_container {
334
  background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;
335
- <?php
336
- if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
337
- ?>
338
- border-bottom-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
339
- border-bottom-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
340
- /****/
341
- border-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
342
- /****/
343
- top: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
344
- <?php
345
- }
346
- else {
347
- ?>
348
- border-top-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
349
- border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
350
- /****/
351
- border-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
352
- /****/
353
- bottom: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
354
- <?php
355
- }?>
356
  cursor: pointer;
357
  left: 50%;
358
  line-height: 0;
@@ -415,20 +416,20 @@ class WDIViewGalleryBox {
415
  }
416
  #wdi_spider_popup_right-ico{
417
  left: -9999px;
418
- }
419
  <?php }
420
  else { ?>
421
- #wdi_spider_popup_left-ico {
422
  left: 20px;
423
- }
424
- #wdi_spider_popup_right-ico {
425
- left: auto;
426
- right: 20px;
427
- }
428
  <?php } ?>
429
  .wdi_ctrl_btn:hover,
430
  .wdi_toggle_btn:hover,
431
-
432
  #wdi_spider_popup_left-ico:hover,
433
  #wdi_spider_popup_right-ico:hover {
434
  color: <?php echo $theme_row->lightbox_close_rl_btn_hover_color; ?>;
@@ -474,7 +475,7 @@ class WDIViewGalleryBox {
474
  height: 100%;
475
  overflow: hidden;
476
  position: absolute;
477
- <?php echo $theme_row->lightbox_comment_pos; ?>: -<?php echo $theme_row->lightbox_comment_width; ?>px;
478
  top: 0;
479
  width: <?php echo $theme_row->lightbox_comment_width; ?>px;
480
  z-index: 10103;
@@ -501,7 +502,7 @@ class WDIViewGalleryBox {
501
  word-break: break-word;
502
  }
503
  .wdi_no_comment{
504
- text-align: center !important;
505
  }
506
  .wdi_comments input[type="submit"] {
507
  background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_comment_button_bg_color; ?>;
@@ -551,8 +552,8 @@ class WDIViewGalleryBox {
551
  font-size: 14px;
552
  margin: 2px;
553
  }
554
-
555
-
556
  .wdi_comments_close {
557
  cursor: pointer;
558
  line-height: 0;
@@ -560,9 +561,9 @@ class WDIViewGalleryBox {
560
  font-size: 13px;
561
  text-align: <?php echo (($theme_row->lightbox_comment_pos == 'left') ? 'right' : 'left'); ?>;
562
  margin: 5px;
563
- <?php echo (($theme_row->lightbox_comment_pos == 'left') ? 'right' : 'left'); ?> : 0;
564
  top: 0;
565
- background-color: <?php echo $theme_row->lightbox_comment_bg_color; ?>;
566
  z-index: 10202;
567
  }
568
  .wdi_comments_close i{
@@ -576,7 +577,7 @@ class WDIViewGalleryBox {
576
  .wdi_comment_textarea::-webkit-scrollbar-thumb {
577
  background-color: rgba(255, 255, 255, 0.55);
578
  border-radius: 2px;
579
- }
580
  .wdi_comment_textarea::-webkit-scrollbar-thumb:hover {
581
  background-color: #D9D9D9;
582
  }
@@ -584,7 +585,7 @@ class WDIViewGalleryBox {
584
  .wdi_ctrl_btn_container a:hover {
585
  text-decoration: none;
586
  }
587
-
588
  .wdi_facebook:hover {
589
  color: #3B5998 !important;
590
  cursor: pointer;
@@ -621,28 +622,28 @@ class WDIViewGalleryBox {
621
  display: table;
622
  position: absolute;
623
  text-align: center;
624
- <?php echo $theme_row->lightbox_filmstrip_pos; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : $image_filmstrip_width); ?>px;
625
  vertical-align: middle;
626
  width: 100%;
627
- }
628
  .wdi_filmstrip_container {
629
  display: <?php echo ($filmstrip_direction == 'horizontal'? 'table' : 'block'); ?>;
630
  height: <?php echo ($filmstrip_direction == 'horizontal'? $image_filmstrip_height : $image_height); ?>px;
631
  position: absolute;
632
  width: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width : $image_filmstrip_width); ?>px;
633
  z-index: 10105;
634
- <?php echo $theme_row->lightbox_filmstrip_pos; ?>: 0;
635
  }
636
  .wdi_filmstrip {
637
- <?php echo $left_or_top; ?>: 20px;
638
  overflow: hidden;
639
  position: absolute;
640
- <?php echo $width_or_height; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width - 40 : $image_height - 40); ?>px;
641
  z-index: 10106;
642
  }
643
  .wdi_filmstrip_thumbnails {
644
  height: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : ($image_filmstrip_height + $filmstrip_thumb_margin_hor + 2 * $theme_row->lightbox_filmstrip_thumb_border_width) * $image_rows_count); ?>px;
645
- <?php echo $left_or_top; ?>: 0px;
646
  margin: 0 auto;
647
  overflow: hidden;
648
  position: relative;
@@ -682,22 +683,22 @@ class WDIViewGalleryBox {
682
  cursor: pointer;
683
  display: <?php echo ($filmstrip_direction == 'horizontal' ? 'table-cell' : 'block') ?>;
684
  vertical-align: middle;
685
- <?php echo $width_or_height; ?>: 20px;
686
  z-index: 10106;
687
- <?php echo $left_or_top; ?>: 0;
688
- <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'position: absolute;') ?>
689
- <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'width: 100%;') ?>
690
  }
691
  .wdi_filmstrip_right {
692
  background-color: <?php echo $theme_row->lightbox_filmstrip_rl_bg_color; ?>;
693
  cursor: pointer;
694
- <?php echo($filmstrip_direction == 'horizontal' ? 'right' : 'bottom') ?>: 0;
695
- <?php echo $width_or_height; ?>: 20px;
696
  display: <?php echo ($filmstrip_direction == 'horizontal' ? 'table-cell' : 'block') ?>;
697
  vertical-align: middle;
698
  z-index: 10106;
699
- <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'position: absolute;') ?>
700
- <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'width: 100%;') ?>
701
  }
702
  .wdi_filmstrip_left i,
703
  .wdi_filmstrip_right i {
@@ -798,26 +799,26 @@ class WDIViewGalleryBox {
798
  .wdi_image_info_container1 {
799
  display: <?php echo $popup_info_always_show ? 'table-cell' : 'none'; ?>;
800
  }
801
-
802
  .wdi_image_info_spun {
803
  text-align: <?php echo $theme_row->lightbox_info_align; ?>;
804
  vertical-align: <?php echo $theme_row->lightbox_info_pos; ?>;
805
  }
806
-
807
-
808
  .wdi_image_info {
809
  background: rgba(<?php echo $rgb_wdi_image_info_bg_color['red']; ?>, <?php echo $rgb_wdi_image_info_bg_color['green']; ?>, <?php echo $rgb_wdi_image_info_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_info_bg_transparent / 100, 2, ".", ""); ?>);
810
  border: <?php echo $theme_row->lightbox_info_border_width; ?>px <?php echo $theme_row->lightbox_info_border_style; ?> <?php echo $theme_row->lightbox_info_border_color; ?>;
811
  border-radius: <?php echo $theme_row->lightbox_info_border_radius; ?>px;
812
- <?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') ? 'bottom: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
813
- <?php if($params_array['popup_info_full_width']) { ?>
814
  width: 100%;
815
- <?php } else { ?>
816
  width: 33%;
817
  margin: <?php echo $theme_row->lightbox_info_margin; ?>;
818
- <?php } ?>
819
  padding: <?php echo $theme_row->lightbox_info_padding; ?>;
820
- <?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') ? 'top: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
821
  overflow: auto;
822
  }
823
  .wdi_image_title,
@@ -856,17 +857,17 @@ class WDIViewGalleryBox {
856
  vertical-align: middle;
857
  word-break: break-all;
858
  }
859
-
860
  .wdi_share_btns{
861
  position: absolute;
862
- <?php echo ($theme_row->lightbox_ctrl_btn_pos == 'top')? 'bottom' : 'top';?>: -115%;
863
  width: <?php echo $theme_row->lightbox_ctrl_btn_height*7.5;?>px;
864
  border-radius: 3px;
865
  left: -150%;
866
  margin: 0;
867
  z-index: 200000;
868
- background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;
869
- opacity: <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>;
870
  }
871
  .wdi_share_btns_container{
872
  position: relative;
@@ -874,9 +875,9 @@ class WDIViewGalleryBox {
874
  }
875
  .wdi_share_popup_btn{
876
  color: <?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
877
- filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_btn_transparent; ?>);
878
  padding: 3px;
879
- opacity: 1;
 
880
  font-size: <?php echo $theme_row->lightbox_ctrl_btn_height;?>px;
881
  }
882
  .wdi_share_caret{
@@ -896,8 +897,8 @@ class WDIViewGalleryBox {
896
  .wdi_facebook_btn:hover{
897
  color: #4099FB;
898
  }
899
-
900
-
901
  .wdi_comment_header a,.wdi_comment_header a:visited{
902
  color: <?php echo $theme_row->lightbox_comment_author_font_color; ?> !important;
903
  }
@@ -905,14 +906,14 @@ class WDIViewGalleryBox {
905
  color: <?php echo $theme_row->lightbox_comment_author_font_color; ?>!important;
906
  }
907
  .wdi_comment_header a:hover,a.wdi_comm_text_link:hover{
908
- text-decoration: none;
909
- color: <?php echo $theme_row->lightbox_comment_author_font_color_hover; ?>!important;
910
  }
911
  .wdi_load_more_comments{
912
  display: inline-block;
913
  color: <?php echo $theme_row->lightbox_comment_load_more_color; ?>;
914
- background-color: <?php echo $theme_row->lightbox_comment_bg_color; ?>;
915
- -webkit-user-select: none; /* Chrome/Safari */
916
  -moz-user-select: none; /* Firefox */
917
  -ms-user-select: none; /* IE10+ */
918
  /* Rules below not implemented in browsers yet */
@@ -923,23 +924,23 @@ class WDIViewGalleryBox {
923
  font-size: 17px;
924
  }
925
  .wdi_load_more_comments:hover{
926
- color: <?php echo $theme_row->lightbox_comment_load_more_color_hover;?>;
927
- cursor: pointer;
928
  }
929
 
930
- @media (max-width: 480px) {
931
- .wdi_image_count_container {
932
- display: none;
933
- }
934
  .wdi_image_title,
935
  .wdi_image_title * {
936
- font-size: 12px;
937
- }
938
  .wdi_image_description,
939
  .wdi_image_description * {
940
- font-size: 10px;
941
- }
942
- }
943
  .wdi_image_count_container {
944
  left: 0;
945
  line-height: 1;
@@ -953,54 +954,55 @@ class WDIViewGalleryBox {
953
  <?php
954
  $image_id_exist = FALSE;
955
  foreach ($image_rows as $key => $image_row) {
956
- if ($image_row->id == $image_id) {
957
- $current_avg_rating = $image_row->avg_rating;
958
- $current_rate = $image_row->rate;
959
- $current_rate_count = $image_row->rate_count;
960
- $current_image_key = $key;
961
- }
962
- if ($image_row->id == $current_image_id) {
963
- $current_image_alt = $image_row->alt;
964
- $current_image_user_name = $image_row->username;
965
- $current_image_user_pic = $image_row->profile_picture;
966
- $current_image_hit_count = $image_row->hit_count;
967
- $current_image_description = str_replace('#',' #',str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description));
968
- $current_image_url = $image_row->image_url;
969
- $current_thumb_url = $image_row->thumb_url;
970
- $current_filetype = $image_row->filetype;
971
- $current_filename = $image_row->filename;
972
- $image_id_exist = TRUE;
973
- }
974
-
975
-
976
- //sanitizing image description
977
- $instaDesc = $image_row->description;
978
- $instaDesc = preg_replace('/\\\\/', esc_html('&#92;'), $instaDesc);
979
-
980
- /*last two are ZWSP and P-SEP*/
981
- $instaDesc = str_replace(array("\r\n", "\n", "\r",'
', '
'), esc_html(''), str_replace('"','\"',$instaDesc));
982
- $instaDesc = str_replace('#', ' #', $instaDesc);
983
- ?>
984
-
985
- wdi_data["<?php echo $key; ?>"] = [];
986
- wdi_data["<?php echo $key; ?>"]["number"] = <?php echo $key + 1; ?>;
987
- wdi_data["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
988
- wdi_data["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->alt); ?>";
989
- wdi_data["<?php echo $key; ?>"]["description"] = "<?php echo $instaDesc; ?>";
990
- wdi_data["<?php echo $key; ?>"]['username'] = "<?php echo $image_row->username;?>";
991
- wdi_data["<?php echo $key; ?>"]['profile_picture'] = "<?php echo $image_row->profile_picture;?>";
992
- wdi_data["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
993
- wdi_data["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
994
- wdi_data["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
995
- wdi_data["<?php echo $key; ?>"]["comment_count"] = "<?php echo $image_row->comment_count; ?>";
996
- wdi_data["<?php echo $key; ?>"]["filetype"] = "<?php echo $image_row->filetype; ?>";
997
- wdi_data["<?php echo $key; ?>"]["filename"] = "<?php echo $image_row->filename; ?>";
998
- wdi_data["<?php echo $key; ?>"]["avg_rating"] = "<?php echo $image_row->avg_rating; ?>";
999
- wdi_data["<?php echo $key; ?>"]["rate"] = "<?php echo $image_row->rate; ?>";
1000
- wdi_data["<?php echo $key; ?>"]["rate_count"] = "<?php echo $image_row->rate_count; ?>";
1001
- wdi_data["<?php echo $key; ?>"]["hit_count"] = "<?php echo $image_row->hit_count; ?>";
1002
- wdi_data["<?php echo $key; ?>"]["comments_data"] = <?php echo isset($image_row->comments_data) ? json_encode($image_row->comments_data) : 'null'; ?>;
1003
- <?php
 
1004
  }
1005
  ?>
1006
 
@@ -1016,76 +1018,76 @@ class WDIViewGalleryBox {
1016
  <?php
1017
  if ($enable_image_ctrl_btn) {
1018
  $share_url = add_query_arg(array('action' => 'Share', 'curr_url' => $current_url, 'image_id' => $current_image_id), admin_url('admin-ajax.php')) . '#wdi' . $gallery_id . '/' . $current_image_id;
1019
- ?>
1020
- <div class="wdi_btn_container">
1021
- <div class="wdi_ctrl_btn_container">
1022
- <?php
1023
- if ($option_row->show_image_counts) {
1024
- ?>
1025
- <span class="wdi_image_count_container wdi_ctrl_btn">
1026
  <span class="wdi_image_count"><?php echo $current_image_key + 1; ?></span> /
1027
  <span><?php echo $image_rows_count; ?></span>
1028
  </span>
1029
- <?php
1030
- }
1031
- ?>
1032
- <i title="<?php echo __('Play', "wdi"); ?>" class="wdi_ctrl_btn wdi_play_pause fa fa-play"></i>
1033
- <?php if ($enable_image_fullscreen) {
1034
- if (!$open_with_fullscreen) {
1035
- ?>
1036
- <i title="<?php echo __('Maximize', "wdi"); ?>" class="wdi_ctrl_btn wdi_resize-full fa fa-expand "></i>
1037
- <?php
1038
- }
1039
- ?>
1040
- <i title="<?php echo __('Fullscreen', "wdi"); ?>" class="wdi_ctrl_btn wdi_fullscreen fa fa-arrows-alt"></i>
1041
- <?php } if ($popup_enable_info) { ?>
1042
- <i title="<?php echo __('Show info', "wdi"); ?>" class="wdi_ctrl_btn wdi_info fa fa-info"></i>
1043
- <?php } if ($enable_comment_social) { ?>
1044
- <i title="<?php echo __('Show comments', "wdi"); ?>" class="wdi_ctrl_btn wdi_comment fa fa-comment"></i>
1045
- <?php } if ($popup_enable_rate) { ?>
1046
- <i title="<?php echo __('Show rating', "wdi"); ?>" class="wdi_ctrl_btn wdi_rate fa fa-star"></i>
1047
- <?php }
1048
- $is_embed = preg_match('/EMBED/', $current_filetype) == 1 ? TRUE : FALSE;
1049
- $share_image_url = urlencode( $is_embed ? $current_thumb_url : site_url() . '/' . $WD_WDI_UPLOAD_DIR . $current_image_url);
1050
- if ($enable_image_facebook) {
1051
- ?>
1052
- <a id="wdi_facebook_a" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Facebook', "wdi"); ?>">
1053
- <i title="<?php echo __('Share on Facebook', "wdi"); ?>" class="wdi_ctrl_btn wdi_facebook fa fa-facebook"></i>
1054
- </a>
1055
- <?php
1056
- }
1057
- if ($enable_image_twitter) {
1058
- ?>
1059
- <a id="wdi_twitter_a" href="https://twitter.com/share?url=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Twitter', "wdi"); ?>">
1060
- <i title="<?php echo __('Share on Twitter', "wdi"); ?>" class="wdi_ctrl_btn wdi_twitter fa fa-twitter"></i>
1061
- </a>
1062
- <?php
1063
- }
1064
- if ($enable_image_google) {
1065
- ?>
1066
- <a id="wdi_google_a" href="https://plus.google.com/share?url=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Google+', "wdi"); ?>">
1067
- <i title="<?php echo __('Share on Google+', "wdi"); ?>" class="wdi_ctrl_btn wdi_google fa fa-google-plus"></i>
1068
- </a>
1069
- <?php
1070
- }
1071
- if ($enable_image_pinterest) {
1072
- ?>
1073
- <a id="wdi_pinterest_a" href="http://pinterest.com/pin/create/button/?s=100&url=<?php echo urlencode($share_url); ?>&media=<?php echo $share_image_url; ?>&description=<?php echo $current_image_description; ?>" target="_blank" title="<?php echo __('Share on Pinterest', "wdi"); ?>">
1074
- <i title="<?php echo __('Share on Pinterest', "wdi"); ?>" class="wdi_ctrl_btn wdi_pinterest fa fa-pinterest"></i>
1075
- </a>
1076
- <?php
1077
- }
1078
- if ($enable_image_tumblr) {
1079
  ?>
1080
- <a id="wdi_tumblr_a" href="https://www.tumblr.com/share/photo?source=<?php echo $share_image_url; ?>&caption=<?php echo urlencode($current_image_alt); ?>&clickthru=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Tumblr', "wdi"); ?>">
1081
- <i title="<?php echo __('Share on Tumblr', "wdi"); ?>" class="wdi_ctrl_btn wdi_tumblr fa fa-tumblr"></i>
1082
- </a>
1083
- <?php
1084
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1085
 
1086
- if ($enable_share_buttons) {
1087
- ?>
1088
- <span class="wdi_share_btns_container">
1089
  <i onclick="jQuery(this).parent().find('.wdi_share_btns').toggleClass('wdi_share_toggler');jQuery(this).parent().find('.wdi_share_caret').toggleClass('wdi_share_toggler')" title="<?php echo __('Share', "wdi"); ?>" class="wdi_ctrl_btn fa fa-share"></i>
1090
  <p class="wdi_share_btns" style="display:none">
1091
  <a id="wdi_popup_fb" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $current_image_url;?>" target="_blank" class='wdi_share_popup_btn wdi_facebook fa fa-facebook'></a>
@@ -1096,54 +1098,54 @@ class WDIViewGalleryBox {
1096
  </p>
1097
  <i class="wdi_share_caret " style="display:none;"></i>
1098
  </span>
1099
-
1100
-
1101
- <?php
1102
- }
1103
 
1104
 
1105
- if ($option_row->popup_enable_fullsize_image) {
1106
- ?>
1107
- <a id="wdi_fullsize_image" href="<?php echo !$is_embed ? site_url() . '/' . $WD_WDI_UPLOAD_DIR . $current_image_url : $current_image_url; ?>" target="_blank">
1108
- <i title="<?php echo __('Open image in Instagram.', "wdi"); ?>" class="wdi_ctrl_btn fa fa-instagram"></i>
1109
- </a>
1110
- <?php
1111
- }
1112
- if ($option_row->popup_enable_download) {
1113
- $style = 'none';
1114
- $current_image_arr = explode('/', $current_image_url);
1115
- if (!$is_embed) {
1116
- $download_href = site_url() . '/' . $WD_WDI_UPLOAD_DIR . $current_image_url;
1117
- $style = 'inline-block';
1118
  }
1119
- elseif (preg_match('/FLICKR/', $current_filetype) == 1) {
1120
- $download_href = $current_filename;
1121
- $style = 'inline-block';
 
 
 
 
 
1122
  }
1123
- elseif (preg_match('/INSTAGRAM/', $current_filetype) == 1) {
1124
- if(preg_match('/IMAGE/',$current_filetype) == 1){
1125
- $download_href = substr_replace($current_thumb_url, 'l', -1);
 
 
 
1126
  }
1127
- if(preg_match('/VIDEO/',$current_filetype) == 1){
1128
  $download_href = $current_filename;
 
1129
  }
 
 
 
 
 
 
 
 
1130
 
1131
-
1132
- $style = 'inline-block';
 
 
 
 
 
1133
  }
1134
  ?>
1135
- <a id="wdi_download" href="<?php echo $download_href; ?>" target="_blank" download="<?php echo end($current_image_arr); ?>" style="display: <?php echo $style; ?>;">
1136
- <i title="<?php echo __('Download original image', "wdi"); ?>" class="wdi_ctrl_btn fa fa-download"></i>
1137
- </a>
1138
- <?php
1139
- }
1140
- ?>
1141
- </div>
1142
- <div class="wdi_toggle_container">
1143
- <i class="wdi_toggle_btn fa <?php echo (($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-up' : 'fa-angle-down'); ?>"></i>
1144
  </div>
1145
- </div>
1146
- <?php
1147
  }
1148
  $current_pos = 0;
1149
 
@@ -1159,7 +1161,7 @@ class WDIViewGalleryBox {
1159
  $current_pos = $key * (($filmstrip_direction == 'horizontal' ? $image_filmstrip_width : $image_filmstrip_height) + $filmstrip_thumb_margin_hor);
1160
  $current_key = $key;
1161
  }
1162
-
1163
  $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
1164
  if (!$is_embed) {
1165
  list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_WDI_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
@@ -1175,8 +1177,8 @@ class WDIViewGalleryBox {
1175
  $image_thumb_height = $resolution_h * $scale;
1176
  }
1177
  else{
1178
- $image_thumb_width = $image_filmstrip_width;
1179
- $image_thumb_height = $image_filmstrip_height;
1180
  }
1181
  }
1182
  else {
@@ -1189,11 +1191,11 @@ class WDIViewGalleryBox {
1189
  $image_thumb_height *= $scale;
1190
  $thumb_left = ($image_filmstrip_width - $image_thumb_width) / 2;
1191
  $thumb_top = ($image_filmstrip_height - $image_thumb_height) / 2;
1192
- ?>
1193
- <div id="wdi_filmstrip_thumbnail_<?php echo $key; ?>" class="wdi_filmstrip_thumbnail <?php echo (($image_row->id == $current_image_id) ? 'wdi_thumb_active' : 'wdi_thumb_deactive'); ?>">
1194
- <img style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" class="wdi_filmstrip_thumbnail_img" src="<?php echo ($is_embed ? "" : site_url() . '/' . $WD_WDI_UPLOAD_DIR) . $image_row->thumb_url; ?>" onclick="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '<?php echo $key; ?>', wdi_data)" ontouchend="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '<?php echo $key; ?>', wdi_data)" image_id="<?php echo $image_row->id; ?>" image_key="<?php echo $key; ?>" alt="<?php echo $image_row->alt; ?>" />
1195
- </div>
1196
- <?php
1197
  }
1198
  ?>
1199
  </div>
@@ -1203,30 +1205,30 @@ class WDIViewGalleryBox {
1203
  <?php
1204
  }
1205
  if ($watermark_type != 'none') {
1206
- ?>
1207
- <div class="wdi_image_container">
1208
- <div class="wdi_watermark_container">
1209
- <div style="display:table; margin:0 auto;">
1210
  <span class="wdi_watermark_spun" id="wdi_watermark_container">
1211
  <?php
1212
  if ($watermark_type == 'image') {
1213
- ?>
1214
- <a href="<?php echo urldecode($watermark_link); ?>" target="_blank">
1215
  <img class="wdi_watermark_image wdi_watermark" src="<?php echo $watermark_url; ?>" />
1216
  </a>
1217
- <?php
1218
  }
1219
  elseif ($watermark_type == 'text') {
1220
- ?>
1221
- <a class="wdi_none_selectable wdi_watermark_text wdi_watermark" target="_blank" href="<?php echo $watermark_link; ?>"><?php echo $watermark_text; ?></a>
1222
- <?php
1223
  }
1224
  ?>
1225
  </span>
 
1226
  </div>
1227
  </div>
1228
- </div>
1229
- <?php
1230
  }
1231
  ?>
1232
  <div id="wdi_image_container" class="wdi_image_container">
@@ -1245,62 +1247,62 @@ class WDIViewGalleryBox {
1245
  </span>
1246
  </div>
1247
  </div>
1248
-
1249
  <div class="wdi_slide_container">
1250
  <div class="wdi_slide_bg">
1251
  <div class="wdi_slider">
1252
- <?php
1253
- $current_key = -6;
1254
- foreach ($image_rows as $key => $image_row) {
1255
-
1256
- $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
1257
- $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
1258
- if ($image_row->id == $current_image_id) {
1259
- $current_key = $key;
1260
- ?>
1261
- <span class="wdi_popup_image_spun" id="wdi_popup_image" image_id="<?php echo $image_row->id; ?>">
1262
  <span class="wdi_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
1263
  <span class="wdi_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
1264
- <?php
1265
- if (!$is_embed) {
1266
  ?>
1267
  <img class="wdi_popup_image wdi_popup_watermark" src="<?php echo site_url() . '/' . $WD_WDI_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
1268
-
1269
- <?php
1270
- }
1271
- else { /*$is_embed*/ ?>
1272
- <span class="wdi_popup_embed wdi_popup_watermark" style="display:table; table-layout:fixed;">
1273
  <?php
1274
  if($is_embed_instagram_post){
1275
  $post_width = $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0);
1276
  $post_height = $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0);
1277
  if($post_height <$post_width +88 ){
1278
- $post_width =$post_height -88;
1279
  }
1280
  else{
1281
- $post_height =$post_width +88;
1282
  }
1283
  WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'style'=>"width:".$post_width."px; height:".$post_height."px; vertical-align:middle; display:inline-block; position:relative;"));
1284
  }
1285
  else{
1286
- WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"));
1287
  }
1288
  ?>
1289
  </span>
1290
  <?php
1291
- }
1292
  ?>
1293
  </span>
1294
  </span>
1295
  </span>
1296
- <span class="wdi_popup_image_second_spun">
1297
  </span>
1298
- <input type="hidden" id="wdi_current_image_key" value="<?php echo $key; ?>" />
1299
- <?php
1300
- break;
1301
- }
1302
- }
1303
- ?>
1304
  </div>
1305
  </div>
1306
  </div>
@@ -1309,101 +1311,101 @@ class WDIViewGalleryBox {
1309
  </div>
1310
  </div>
1311
  <?php if ($enable_comment_social) { ?>
1312
- <div class="wdi_comment_wrap">
1313
- <div class="wdi_comment_container wdi_close">
1314
- <div id="ajax_loading" style="position:absolute;">
1315
- <div id="opacity_div" style="display:none; background-color:rgba(255, 255, 255, 0.2); position:absolute; z-index:10150;"></div>
1316
  <span id="loading_div" style="display:none; text-align:center; position:relative; vertical-align:middle; z-index:10170">
1317
  <img src="<?php echo WDI_URL . '/images/ajax_loader.png'; ?>" class="wdi_spider_ajax_loading" style="width:50px;">
1318
  </span>
1319
- </div>
1320
- <div class="wdi_comments">
1321
- <?php
1322
- $captcha_error_message = '';
1323
- $email_error_message = '';
1324
- $wdi_name = '';
1325
- $wdi_comment = '';
1326
- $wdi_email = '';
1327
- if (isset($_POST['ajax_task']) && (esc_html(stripslashes($_POST['ajax_task'])) === 'save')) {
1328
- if ($option_row->popup_enable_captcha) {
1329
- $wdi_captcha_input = (isset($_POST['wdi_captcha_input']) ? esc_html(stripslashes($_POST['wdi_captcha_input'])) : '');
1330
- @session_start();
1331
- $wdi_captcha_code = (isset($_SESSION['wdi_captcha_code']) ? esc_html(stripslashes($_SESSION['wdi_captcha_code'])) : '');
1332
- if ($wdi_captcha_input !== $wdi_captcha_code) {
1333
- $captcha_error_message = __('Error. Incorrect Verification Code.', "wdi");
 
 
 
 
 
 
 
1334
  $wdi_name = (isset($_POST['wdi_name']) ? esc_html(stripslashes($_POST['wdi_name'])) : '');
1335
  $wdi_comment = (isset($_POST['wdi_comment']) ? esc_html(stripslashes($_POST['wdi_comment'])) : '');
1336
  $wdi_email = (isset($_POST['wdi_email']) ? esc_html(stripslashes($_POST['wdi_email'])) : '');
1337
  }
1338
  }
1339
- if ($option_row->popup_enable_email && isset($_POST['wdi_email']) && !is_email(stripslashes($_POST['wdi_email']))) {
1340
- $email_error_message = __( 'This is not a valid email address.', "wdi" );
1341
- $wdi_name = (isset($_POST['wdi_name']) ? esc_html(stripslashes($_POST['wdi_name'])) : '');
1342
- $wdi_comment = (isset($_POST['wdi_comment']) ? esc_html(stripslashes($_POST['wdi_comment'])) : '');
1343
- $wdi_email = (isset($_POST['wdi_email']) ? esc_html(stripslashes($_POST['wdi_email'])) : '');
1344
- }
1345
- }
1346
- ?>
1347
- <div id="wdi_comments">
1348
- <div title="<?php echo __('Hide Comments', "wdi"); ?>" class="wdi_comments_close">
1349
- <i class="wdi_comments_close_btn fa fa-arrow-<?php echo $theme_row->lightbox_comment_pos; ?>"></i>
1350
- </div>
1351
 
1352
- <form id="wdi_comment_form" style="display:none !important;"> method="post" action="<?php echo $popup_url; ?>"><!--Deprecated-->
1353
- <p><label for="wdi_name"><?php echo __('Name', "wdi"); ?> * </label></p>
1354
- <p><input type="text" name="wdi_name" id="wdi_name" <?php echo ((get_current_user_id() != 0) ? 'readonly="readonly"' : ''); ?>
1355
- value="<?php echo ((get_current_user_id() != 0) ? get_userdata(get_current_user_id())->display_name : $wdi_name); ?>" /></p>
1356
- <?php
1357
- if ($option_row->popup_enable_email) {
1358
- ?>
1359
- <p><label for="wdi_email"><?php echo __('Email', "wdi"); ?> * </label></p>
1360
- <p><input type="text" name="wdi_email" id="wdi_email"
1361
- value="<?php echo ((get_current_user_id() != 0) ? get_userdata(get_current_user_id())->user_email : $wdi_email); ?>" /></p>
1362
- <p><span class="wdi_comment_error"><?php echo $email_error_message; ?></span></p>
1363
- <?php
1364
- }
1365
- ?>
1366
- <p><label for="wdi_comment"><?php echo __('Comment', "wdi"); ?> * </label></p>
1367
- <p><textarea class="wdi_comment_textarea" name="wdi_comment" id="wdi_comment"><?php echo $wdi_comment; ?></textarea></p>
1368
- <?php
1369
- if ($option_row->popup_enable_captcha) {
1370
- ?>
1371
- <p><label for="wdi_captcha_input"><?php echo __('Verification Code', "wdi"); ?></label></p>
1372
- <p>
1373
- <input id="wdi_captcha_input" name="wdi_captcha_input" class="wdi_captcha_input" type="text">
1374
- <img id="wdi_captcha_img" class="wdi_captcha_img" type="captcha" digit="6" src="<?php echo add_query_arg(array('action' => 'wdi_captcha', 'digit' => 6, 'i' => ''), admin_url('admin-ajax.php')); ?>" onclick="wdi_captcha_refresh('wdi_captcha')" ontouchend="wdi_captcha_refresh('wdi_captcha')" />
1375
- <span id="wdi_captcha_refresh" class="wdi_captcha_refresh" onclick="wdi_captcha_refresh('wdi_captcha')" ontouchend="wdi_captcha_refresh('wdi_captcha')"></span>
1376
- </p>
1377
- <p><span class="wdi_comment_error"><?php echo $captcha_error_message; ?></span></p>
1378
- <?php
1379
- }
1380
- ?>
1381
- <p><input onclick="if (wdi_spider_check_required('wdi_name', '<?php echo __('Name', "wdi"); ?>') <?php if ($option_row->popup_enable_email) { ?> || wdi_spider_check_required('wdi_email', '<?php echo __('Email', "wdi"); ?>') || wdi_spider_check_email('wdi_email') <?php } ?> || wdi_spider_check_required('wdi_comment', '<?php echo __('Comment', "wdi"); ?>')) { return false;}
1382
- var cur_image_key = parseInt(jQuery('#wdi_current_image_key').val());
1383
- ++wdi_data[cur_image_key]['comment_count'];
1384
- wdi_spider_set_input_value('ajax_task', 'save');
1385
- wdi_spider_set_input_value('image_id', jQuery('#wdi_popup_image').attr('image_id'));
1386
- wdi_spider_ajax_save('wdi_comment_form');
1387
- return false;"
1388
- ontouchend="if (wdi_spider_check_required('wdi_name', '<?php echo __('Name', "wdi"); ?>') <?php if ($option_row->popup_enable_email) { ?> || wdi_spider_check_required('wdi_email', '<?php echo __('Email', "wdi"); ?>') || wdi_spider_check_email('wdi_email') <?php } ?> || wdi_spider_check_required('wdi_comment', '<?php echo __('Comment', "wdi"); ?>')) {return false;}
1389
  var cur_image_key = parseInt(jQuery('#wdi_current_image_key').val());
1390
  ++wdi_data[cur_image_key]['comment_count'];
1391
  wdi_spider_set_input_value('ajax_task', 'save');
1392
  wdi_spider_set_input_value('image_id', jQuery('#wdi_popup_image').attr('image_id'));
1393
  wdi_spider_ajax_save('wdi_comment_form');
1394
  return false;" class="wdi_submit" type="submit" name="wdi_submit" id="wdi_submit" value="<?php echo __('Submit', "wdi"); ?>" /></p>
1395
- <?php echo (!current_user_can('manage_options') && ($comment_moderation && (isset($_POST['wdi_comment']) && esc_html($_POST['wdi_comment'])))) ? __('Your comment is awaiting moderation', "wdi") : ''; ?>
1396
- <input id="ajax_task" name="ajax_task" type="hidden" value="" />
1397
- <input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
1398
- <input id="comment_id" name="comment_id" type="hidden" value="" />
1399
- </form>
1400
- </div>
1401
- <div id="wdi_added_comments">
1402
  <p class="wdi_no_comment"><?php _e('There are no comments to show','wdi');?></p>
 
1403
  </div>
1404
  </div>
1405
  </div>
1406
- </div>
1407
  <?php } ?>
1408
 
1409
  <a class="wdi_spider_popup_close" onclick="wdi_spider_destroypopup(1000); return false;" ontouchend="wdi_spider_destroypopup(1000); return false;"><span><i class="wdi_close_btn fa fa-times"></i></span></a>
@@ -1411,19 +1413,19 @@ class WDIViewGalleryBox {
1411
  <script language="javascript" type="text/javascript" src="<?php echo WDI_URL . '/js/gallerybox/wdi_embed.js?ver=' . WDI_VERSION; ?>"></script>
1412
  <script>
1413
 
1414
-
1415
-
1416
-
1417
-
1418
 
1419
 
1420
  <?php
1421
  if ($option_row->enable_addthis && $option_row->addthis_profile_id) {
1422
- ?>
1423
- var addthis_share = {
1424
- url: "<?php echo urlencode($share_url); ?>"
1425
- }
1426
- <?php
1427
  }
1428
  ?>
1429
  var wdi_trans_in_progress = false;
@@ -1450,7 +1452,7 @@ class WDIViewGalleryBox {
1450
  setTimeout(function () {
1451
  var width = wdi_current_image_span.width();
1452
  var height = wdi_current_image_span.height();
1453
-
1454
 
1455
  jQuery(".wdi_watermark_spun").width(width);
1456
  jQuery(".wdi_watermark_spun").height(height);
@@ -1459,7 +1461,7 @@ class WDIViewGalleryBox {
1459
  var comment_container_width = 0;
1460
  if (jQuery(".wdi_comment_container").hasClass("wdi_open")) {
1461
  comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
1462
- }
1463
  if (width <= (jQuery(window).width() - comment_container_width)) {
1464
  jQuery(".wdi_watermark_image").css({
1465
  width: ((jQuery(".wdi_spider_popup_wrap").width() - comment_container_width) * <?php echo $watermark_width / $image_width; ?>)
@@ -1472,7 +1474,7 @@ class WDIViewGalleryBox {
1472
  }
1473
  });
1474
 
1475
-
1476
 
1477
  }
1478
  var wdi_current_key = '<?php echo $current_key; ?>';
@@ -1482,11 +1484,11 @@ class WDIViewGalleryBox {
1482
  var selectedImagePos = -wdi_current_filmstrip_pos - (jQuery(".wdi_filmstrip_thumbnail").<?php echo $outerWidth_or_outerHeight; ?>(true)) / 2;
1483
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".wdi_filmstrip_thumbnails").<?php echo $width_or_height; ?>(), selectedImagePos + filmStripWidth / 2));
1484
  jQuery(".wdi_filmstrip_thumbnails").animate({
1485
- <?php echo $left_or_top; ?>: imagesContainerLeft
1486
- }, {
1487
- duration: 500,
1488
  complete: function () { wdi_filmstrip_arrows(); }
1489
- });
1490
  }
1491
  function wdi_move_filmstrip() {
1492
  var image_left = jQuery(".wdi_thumb_active").position().<?php echo $left_or_top; ?>;
@@ -1500,18 +1502,18 @@ class WDIViewGalleryBox {
1500
  }
1501
  if (image_left < Math.abs(long_filmstrip_cont_left)) {
1502
  jQuery(".wdi_filmstrip_thumbnails").animate({
1503
- <?php echo $left_or_top; ?>: -image_left
1504
- }, {
1505
  duration: 500,
1506
- complete: function () { wdi_filmstrip_arrows(); }
1507
  });
1508
  }
1509
  else if (image_right > long_filmstrip_cont_right) {
1510
  jQuery(".wdi_filmstrip_thumbnails").animate({
1511
- <?php echo $left_or_top; ?>: -(image_right - wdi_filmstrip_width)
1512
- }, {
1513
  duration: 500,
1514
- complete: function () { wdi_filmstrip_arrows(); }
1515
  });
1516
  }
1517
  }
@@ -1587,7 +1589,7 @@ class WDIViewGalleryBox {
1587
  jQuery(".wdi_slider").removeAttr('style');
1588
  jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
1589
  jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
1590
-
1591
  wdi_trans_in_progress = false;
1592
  jQuery(current_image_class).html('');
1593
  if (typeof event_stack !== 'undefined') {
@@ -1635,7 +1637,7 @@ class WDIViewGalleryBox {
1635
  /* Set active thumbnail.*/
1636
  jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
1637
  jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
1638
- wdi_trans_in_progress = false;
1639
  jQuery(current_image_class).html('');
1640
  wdi_change_watermark_container();
1641
  }
@@ -1652,16 +1654,16 @@ class WDIViewGalleryBox {
1652
  else {
1653
  jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, wdi_transition_duration);
1654
  jQuery(next_image_class).animate({
1655
- 'opacity' : 1,
1656
- 'z-index': 2
1657
- }, {
1658
- duration: wdi_transition_duration,
1659
- complete: function () {
1660
 
1661
- wdi_trans_in_progress = false;
1662
- jQuery(current_image_class).html('');
1663
- wdi_change_watermark_container(); }
1664
- });
1665
  /* For IE.*/
1666
  jQuery(current_image_class).fadeTo(wdi_transition_duration, 0);
1667
  jQuery(next_image_class).fadeTo(wdi_transition_duration, 1);
@@ -1709,16 +1711,16 @@ class WDIViewGalleryBox {
1709
  var imgWidth = cur_img.width();
1710
  var imgHeight = cur_img.height();
1711
  var contWidth = cont.width(),
1712
- contHeight = cont.height(),
1713
- colWidth = Math.floor(contWidth / cols),
1714
- rowHeight = Math.floor(contHeight / rows),
1715
- colRemainder = contWidth - (cols * colWidth),
1716
- colAdd = Math.ceil(colRemainder / cols),
1717
- rowRemainder = contHeight - (rows * rowHeight),
1718
- rowAdd = Math.ceil(rowRemainder / rows),
1719
- leftDist = 0,
1720
- img_leftDist = Math.ceil((jQuery(".wdi_slide_bg").width() - cur_img.width()) / 2);
1721
- var imgSrc = typeof cur_img.attr('src')=='undefined' ? '' :cur_img.attr('src');
1722
  /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
1723
  tx = tx === 'auto' ? contWidth : tx;
1724
  tx = tx === 'min-auto' ? - contWidth : tx;
@@ -1727,8 +1729,8 @@ class WDIViewGalleryBox {
1727
  /* Loop through cols.*/
1728
  for (var i = 0; i < cols; i++) {
1729
  var topDist = 0,
1730
- img_topDst = Math.floor((jQuery(".wdi_slide_bg").height() - cur_img.height()) / 2),
1731
- newColWidth = colWidth;
1732
  /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
1733
  if (colRemainder > 0) {
1734
  var add = colRemainder >= colAdd ? colAdd : colRemainder;
@@ -1738,7 +1740,7 @@ class WDIViewGalleryBox {
1738
  /* Nested loop to create row gridlets for each col.*/
1739
  for (var j = 0; j < rows; j++) {
1740
  var newRowHeight = rowHeight,
1741
- newRowRemainder = rowRemainder;
1742
  /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
1743
  if (newRowRemainder > 0) {
1744
  add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
@@ -1883,19 +1885,19 @@ class WDIViewGalleryBox {
1883
  jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
1884
  jQuery(this)[0].contentWindow.postMessage('pause', '*');
1885
  });
1886
-
1887
  if (typeof wdi_data[key] != 'undefined') {
1888
  if (typeof wdi_data[current_key] != 'undefined') {
1889
  if (jQuery('.wdi_ctrl_btn').hasClass('fa-pause')) {
1890
-
1891
  wdi_play();
1892
  }
1893
  if (!from_effect) {
1894
  /* Change image key.*/
1895
  jQuery("#wdi_current_image_key").val(key);
1896
  /*if (current_key == '-1') {
1897
- current_key = jQuery(".wdi_thumb_active").children("img").attr("image_key");
1898
- }*/
1899
  }
1900
  if (wdi_trans_in_progress) {
1901
  event_stack.push(current_key + '-' + key);
@@ -1909,7 +1911,7 @@ class WDIViewGalleryBox {
1909
  return;
1910
  }
1911
  /*jQuery("#wdi_spider_popup_left").hover().css({"display": "inline"});
1912
- jQuery("#wdi_spider_popup_right").hover().css({"display": "inline"});*/
1913
  jQuery(".wdi_image_count").html(wdi_data[key]["number"]);
1914
  /* Set filmstrip initial position.*/
1915
  jQuery(".wdi_watermark").css({display: 'none'});
@@ -1931,7 +1933,7 @@ class WDIViewGalleryBox {
1931
  jQuery(".wdi_image_hits span").html(++wdi_data[key]["hit_count"]);
1932
  /* Change image id.*/
1933
  jQuery("#wdi_popup_image").attr('image_id', wdi_data[key]["id"]);
1934
-
1935
 
1936
  //creating image title template
1937
  var wdi_title_div = jQuery('<div class="wdi_title"></div>').on('click',function(){window.open('//instagram.com/'+wdi_data[key]['username'],'_blank');});
@@ -1940,9 +1942,9 @@ class WDIViewGalleryBox {
1940
 
1941
  //resetting title and description for custom scrollbar
1942
  jQuery('.wdi_image_info_spun').html('<div class="wdi_image_info" >'+
1943
- '<div class="wdi_image_title"></div>'+
1944
- '<div class="wdi_image_description"></div>'+
1945
- '</div>');
1946
 
1947
  /* Change image title, description.*/
1948
  jQuery(".wdi_image_title").html(jQuery('<span style="display: block;" />').append(wdi_title_div));
@@ -1950,7 +1952,7 @@ class WDIViewGalleryBox {
1950
  jQuery(".wdi_image_info").removeAttr("style");
1951
  if (wdi_data[key]["alt"].trim() == "") {
1952
  if (wdi_data[key]["description"].trim() == "") {
1953
- jQuery(".wdi_image_info").css("background", "none");
1954
  }
1955
  }
1956
  if (jQuery(".wdi_image_info_container1").css("display") != 'none') {
@@ -1968,7 +1970,7 @@ class WDIViewGalleryBox {
1968
  }
1969
  var current_image_class = jQuery(".wdi_popup_image_spun").css("zIndex") == 2 ? ".wdi_popup_image_spun" : ".wdi_popup_image_second_spun";
1970
  var next_image_class = current_image_class == ".wdi_popup_image_second_spun" ? ".wdi_popup_image_spun" : ".wdi_popup_image_second_spun";
1971
-
1972
  var is_embed = wdi_data[key]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1973
  var is_embed_instagram_post = wdi_data[key]['filetype'].indexOf('INSTAGRAM_POST') > -1 ? true :false;
1974
  var cur_height = jQuery(current_image_class).height();
@@ -1985,11 +1987,11 @@ class WDIViewGalleryBox {
1985
  var post_height = 0;
1986
  if(cur_height <cur_width +88 ){
1987
  post_height = cur_height;
1988
- post_width = post_height -88;
1989
  }
1990
  else{
1991
  post_width = cur_width;
1992
- post_height = post_width +88 ;
1993
  }
1994
  innhtml += wdi_spider_display_embed(wdi_data[key]['filetype'], wdi_data[key]['filename'], {class:"wdi_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:"+post_width+"px; height:"+post_height+"px; vertical-align:middle; display:inline-block; position:relative; top: "+0.5*(cur_height-post_height)+ "px; " });
1995
  }
@@ -2000,7 +2002,7 @@ class WDIViewGalleryBox {
2000
  }
2001
  innhtml += '</span></span>';
2002
  jQuery(next_image_class).html(innhtml);
2003
-
2004
  function wdi_afterload() {
2005
 
2006
 
@@ -2033,7 +2035,7 @@ class WDIViewGalleryBox {
2033
  jQuery("#wdi_download").attr("href", wdi_data[key]['thumb_url'].substring(0, wdi_data[key]['thumb_url'].length - 1) + 'l');
2034
  }
2035
  else {
2036
- jQuery("#wdi_download").hide();
2037
  }
2038
  }
2039
  var image_arr = wdi_data[key]['image_url'].split("/");
@@ -2042,7 +2044,7 @@ class WDIViewGalleryBox {
2042
  jQuery("#wdi_download").attr("download", image_arr[image_arr.length - 1]);
2043
  /* Change image social networks urls.*/
2044
  var wdi_share_url = encodeURIComponent("<?php echo add_query_arg(array('action' => 'Share', 'curr_url' => $current_url, 'image_id' => ''), admin_url('admin-ajax.php')); ?>") + "=" + wdi_data[key]['id'] + encodeURIComponent('#wdi<?php echo $gallery_id; ?>/') + wdi_data[key]['id'];
2045
-
2046
  if (is_embed) {
2047
  var wdi_share_image_url = encodeURIComponent(wdi_data[key]['thumb_url']);
2048
  }
@@ -2091,9 +2093,9 @@ class WDIViewGalleryBox {
2091
  // jQuery(".mCSB_scrollTools").hide();
2092
  <?php
2093
  if ($enable_image_filmstrip) {
2094
- ?>
2095
- wdi_move_filmstrip();
2096
- <?php
2097
  }
2098
  ?>
2099
 
@@ -2123,11 +2125,11 @@ class WDIViewGalleryBox {
2123
  wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), parseInt(jQuery('#wdi_current_image_key').val()) - 1, wdi_data)
2124
  }
2125
  else if (e.keyCode === 27) { /* Esc.*/
2126
- wdi_spider_destroypopup(1000);
2127
- }
2128
- else if (e.keyCode === 32) { /* Space.*/
2129
- jQuery(".wdi_play_pause").trigger('click');
2130
- }
2131
  });
2132
  function wdi_preload_images(key) {
2133
  count = <?php echo (int) $option_row->preload_images_count / 2; ?>;
@@ -2193,7 +2195,7 @@ class WDIViewGalleryBox {
2193
  });
2194
 
2195
  jQuery(".wdi_image_container").css({height: (<?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)});
2196
-
2197
  jQuery(".wdi_popup_image").css({
2198
  maxHeight: <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2199
  });
@@ -2207,7 +2209,7 @@ class WDIViewGalleryBox {
2207
  <?php } ?>
2208
  wdi_popup_current_height = <?php echo $image_height; ?>;
2209
  }
2210
- else {
2211
  jQuery("#wdi_spider_popup_wrap").css({
2212
  height: jQuery(window).height(),
2213
  top: 0,
@@ -2215,7 +2217,7 @@ class WDIViewGalleryBox {
2215
  zIndex: 100000
2216
  });
2217
  jQuery(".wdi_image_container").css({height: (jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)});
2218
-
2219
  jQuery(".wdi_popup_image").css({
2220
  maxHeight: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2221
  });
@@ -2238,7 +2240,7 @@ class WDIViewGalleryBox {
2238
  });
2239
  jQuery(".wdi_image_wrap").css({width: <?php echo $image_width; ?> - comment_container_width});
2240
  jQuery(".wdi_image_container").css({width: (<?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width)});
2241
-
2242
  jQuery(".wdi_popup_image").css({
2243
  maxWidth: <?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width
2244
  });
@@ -2252,7 +2254,7 @@ class WDIViewGalleryBox {
2252
  <?php } ?>
2253
  wdi_popup_current_width = <?php echo $image_width; ?>;
2254
  }
2255
- else {
2256
  jQuery("#wdi_spider_popup_wrap").css({
2257
  width: jQuery(window).width(),
2258
  left: 0,
@@ -2261,7 +2263,7 @@ class WDIViewGalleryBox {
2261
  });
2262
  jQuery(".wdi_image_wrap").css({width: (jQuery(window).width() - comment_container_width)});
2263
  jQuery(".wdi_image_container").css({width: (jQuery(window).width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width)});
2264
-
2265
  jQuery(".wdi_popup_image").css({
2266
  maxWidth: jQuery(window).width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width
2267
  });
@@ -2280,7 +2282,7 @@ class WDIViewGalleryBox {
2280
  if (!(!(jQuery(window).height() > <?php echo $image_height - 2 * $theme_row->lightbox_close_btn_top; ?>) || !(jQuery(window).width() >= <?php echo $image_width - 2 * $theme_row->lightbox_close_btn_right; ?>) || !(<?php echo $open_with_fullscreen; ?> != 1))) {
2281
  jQuery(".wdi_spider_popup_close_fullscreen").attr("class", "wdi_spider_popup_close");
2282
  }
2283
- else {
2284
  if (!(!(jQuery("#wdi_spider_popup_wrap").width() <= jQuery(window).width()) || !(jQuery("#wdi_spider_popup_wrap").height() <= jQuery(window).height()))) {
2285
  jQuery(".wdi_spider_popup_close").attr("class", "wdi_ctrl_btn wdi_spider_popup_close_fullscreen");
2286
  }
@@ -2300,10 +2302,10 @@ class WDIViewGalleryBox {
2300
  var wdi_popup_current_height = <?php echo $image_height; ?>;
2301
  /* Open/close comments.*/
2302
  function wdi_comment() {
2303
-
2304
  jQuery(".wdi_watermark").css({display: 'none'});
2305
  if (jQuery(".wdi_comment_container").hasClass("wdi_open")) {
2306
-
2307
  /* Close comment.*/
2308
  var border_width = parseInt(jQuery(".wdi_comment_container").css('borderRightWidth'));
2309
  if (!border_width) {
@@ -2311,25 +2313,25 @@ class WDIViewGalleryBox {
2311
  }
2312
  jQuery(".wdi_comment_container").animate({<?php echo $theme_row->lightbox_comment_pos; ?>: -jQuery(".wdi_comment_container").width() - border_width}, 500);
2313
  jQuery(".wdi_image_wrap").animate({
2314
- <?php echo $theme_row->lightbox_comment_pos; ?>: 0,
2315
  width: jQuery("#wdi_spider_popup_wrap").width()
2316
- }, 500);
2317
  jQuery(".wdi_image_container").animate({
2318
  width: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>}, 500);
2319
  jQuery(".wdi_popup_image").animate({
2320
- maxWidth: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2321
- }, {
2322
- duration: 500,
2323
- complete: function () { wdi_change_watermark_container(); }
2324
- });
2325
  jQuery(".wdi_popup_embed").animate({
2326
- width: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2327
- }, {
2328
- duration: 500,
2329
- complete: function () {
2330
- wdi_resize_instagram_post();
2331
- wdi_change_watermark_container(); }
2332
- });
2333
  jQuery(".wdi_filmstrip_container").animate({<?php echo $width_or_height; ?>: jQuery(".wdi_spider_popup_wrap").<?php echo $width_or_height; ?>()}, 500);
2334
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: jQuery(".wdi_spider_popup_wrap").<?php echo $width_or_height; ?>() - 40}, 500);
2335
  /* Set filmstrip initial position.*/
@@ -2341,7 +2343,7 @@ class WDIViewGalleryBox {
2341
  // console.log("has clos:"+jQuery(".wdi_comment_container").hasClass("wdi_close"));
2342
  }
2343
  else {
2344
-
2345
  /* Open comment.*/
2346
  var comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
2347
  if (comment_container_width > jQuery(window).width()) {
@@ -2360,24 +2362,24 @@ class WDIViewGalleryBox {
2360
  }
2361
  jQuery(".wdi_comment_container").animate({<?php echo $theme_row->lightbox_comment_pos; ?>: 0}, 500);
2362
  jQuery(".wdi_image_wrap").animate({
2363
- <?php echo $theme_row->lightbox_comment_pos; ?>: jQuery(".wdi_comment_container").width(),
2364
  width: jQuery("#wdi_spider_popup_wrap").width() - jQuery(".wdi_comment_container").width()}, 500);
2365
  jQuery(".wdi_image_container").animate({
2366
  width: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - jQuery(".wdi_comment_container").width()}, 500);
2367
  jQuery(".wdi_popup_image").animate({
2368
- maxWidth: jQuery("#wdi_spider_popup_wrap").width() - jQuery(".wdi_comment_container").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2369
- }, {
2370
- duration: 500,
2371
- complete: function () { wdi_change_watermark_container(); }
2372
- });
2373
  jQuery(".wdi_popup_embed").animate({
2374
- width: jQuery("#wdi_spider_popup_wrap").width() - jQuery(".wdi_comment_container").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2375
- }, {
2376
- duration: 500,
2377
- complete: function () {
2378
- wdi_resize_instagram_post();
2379
- wdi_change_watermark_container(); }
2380
- });
2381
  jQuery(".wdi_filmstrip_container").css({<?php echo $width_or_height; ?>: jQuery("#wdi_spider_popup_wrap").<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'vertical' ? 0: 'jQuery(".wdi_comment_container").width()'); ?>});
2382
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: jQuery(".wdi_filmstrip_container").<?php echo $width_or_height; ?>() - 40}, 500);
2383
  /* Set filmstrip initial position.*/
@@ -2385,7 +2387,7 @@ class WDIViewGalleryBox {
2385
  jQuery(".wdi_comment_container").attr("class", "wdi_comment_container wdi_open");
2386
  jQuery(".wdi_comment").attr("title", "<?php echo __('Hide Comments', "wdi"); ?>");
2387
  /* Load comments.*/
2388
-
2389
  var cur_image_key = parseInt(jQuery("#wdi_current_image_key").val());
2390
  if (wdi_data[cur_image_key]["comment_count"] != 0) {
2391
  jQuery("#wdi_added_comments").show();/*deprecated*/
@@ -2393,7 +2395,7 @@ class WDIViewGalleryBox {
2393
  wdi_spider_set_input_value('image_id', jQuery('#wdi_popup_image').attr('image_id'));/*deprecated*/
2394
  wdi_spider_ajax_save('wdi_comment_form',cur_image_key);/*deprecated*/
2395
  }else{
2396
- jQuery("#wdi_added_comments").html('<p class="wdi_no_comment"><?php _e('There are no comments to show','wdi');?></p>');
2397
  }
2398
  // console.log("has open:"+jQuery(".wdi_comment_container").hasClass("wdi_open"));
2399
  // console.log("has clos:"+jQuery(".wdi_comment_container").hasClass("wdi_close"));
@@ -2409,15 +2411,15 @@ class WDIViewGalleryBox {
2409
  }
2410
  }
2411
  jQuery(document).ready(function () {
2412
-
2413
 
2414
  <?php
2415
  if ($option_row->enable_addthis && $option_row->addthis_profile_id) {
2416
- ?>
2417
- jQuery(".at4-share-outer").show();
2418
- <?php
2419
  }
2420
- ?>
2421
  /* Increase image hit counter.*/
2422
  // wdi_spider_set_input_value('rate_ajax_task', 'save_hit_count');
2423
  // wdi_spider_rate_ajax_save('wdi_rate_form');
@@ -2426,14 +2428,14 @@ class WDIViewGalleryBox {
2426
  // if (!wdi_hash || wdi_hash.indexOf("wdi") == "-1") {
2427
  // window.location.hash = "wdi<?php echo $gallery_id; ?>/<?php echo $current_image_id; ?>";
2428
  // }
2429
- <?php
2430
  if ($image_right_click) {
2431
- ?>
2432
- /* Disable right click.*/
2433
- jQuery(".wdi_image_wrap").bind("contextmenu", function (e) {
2434
- return false;
2435
- });
2436
- <?php
2437
  }
2438
  ?>
2439
  if (typeof jQuery().swiperight !== 'undefined') {
@@ -2461,7 +2463,7 @@ class WDIViewGalleryBox {
2461
  return false;
2462
  });
2463
  jQuery("#wdi_spider_popup_right").on(wdi_click, function () {
2464
-
2465
  wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), (parseInt(jQuery('#wdi_current_image_key').val()) + 1) % wdi_data.length, wdi_data);
2466
  return false;
2467
  });
@@ -2488,17 +2490,17 @@ class WDIViewGalleryBox {
2488
  }
2489
  /* Set image container height.*/
2490
  <?php if ($filmstrip_direction == 'horizontal') { ?>
2491
- jQuery(".wdi_image_container").height(jQuery(".wdi_image_wrap").height() - <?php echo $image_filmstrip_height; ?>);
2492
- jQuery(".wdi_image_container").width(jQuery(".wdi_image_wrap").width());
2493
-
2494
-
2495
- <?php }
2496
  else {
2497
- ?>
2498
- jQuery(".wdi_image_container").height(jQuery(".wdi_image_wrap").height());
2499
- jQuery(".wdi_image_container").width(jQuery(".wdi_image_wrap").width() - <?php echo $image_filmstrip_width; ?>);
2500
-
2501
- <?php
2502
  } ?>
2503
  /* Change default scrollbar in comments.*/
2504
  // if (typeof jQuery().mCustomScrollbar !== 'undefined') {
@@ -2506,8 +2508,8 @@ class WDIViewGalleryBox {
2506
  // jQuery(".wdi_comments").mCustomScrollbar({scrollInertia: 150});
2507
  // }
2508
  // }
2509
-
2510
-
2511
  var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel" /*FF doesn't recognize mousewheel as of FF3.x*/
2512
  jQuery('.wdi_filmstrip').on(mousewheelevt, function(e) {
2513
  var evt = window.event || e; /* Equalize event object.*/
@@ -2523,8 +2525,8 @@ class WDIViewGalleryBox {
2523
  jQuery(".wdi_filmstrip_right").trigger(isMobile ? 'touchend' : 'click');
2524
  }
2525
  });
2526
-
2527
-
2528
  jQuery(".wdi_filmstrip_right").on(wdi_click, function () {
2529
  jQuery( ".wdi_filmstrip_thumbnails" ).stop(true, false);
2530
  if (jQuery(".wdi_filmstrip_thumbnails").position().<?php echo $left_or_top; ?> >= -(jQuery(".wdi_filmstrip_thumbnails").<?php echo $width_or_height; ?>() - jQuery(".wdi_filmstrip").<?php echo $width_or_height; ?>())) {
@@ -2570,15 +2572,15 @@ class WDIViewGalleryBox {
2570
  if (jQuery(".wdi_image_info_container1").css("display") == 'none') {
2571
  jQuery(".wdi_image_info_container1").css("display", "table-cell");
2572
  jQuery(".wdi_info").attr("title", "<?php echo __('Hide info', "wdi"); ?>");
2573
-
2574
 
2575
 
2576
- if(!jQuery('.wdi_image_info').hasClass('mCustomScrollbar')){
2577
- var wdi_desc_max_height = <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?> -jQuery(".wdi_ctrl_btn_container").height()-parseInt(jQuery('.wdi_image_info').css('margin-bottom'))-parseInt(jQuery('.wdi_image_info').css('padding-bottom'));
2578
- jQuery('.wdi_image_info').css('max-height',wdi_desc_max_height+"px");
2579
- jQuery('.wdi_image_info').mCustomScrollbar({scrollInertia: 250});
2580
- }
2581
-
 
2582
 
2583
  }
2584
  else {
@@ -2586,7 +2588,7 @@ class WDIViewGalleryBox {
2586
  jQuery(".wdi_info").attr("title", "<?php echo __('Show info', "wdi"); ?>");
2587
  }
2588
 
2589
-
2590
  });
2591
  /* Show/hide image rating.*/
2592
  jQuery(".wdi_rate").on(wdi_click, function() {
@@ -2610,48 +2612,48 @@ class WDIViewGalleryBox {
2610
  if (jQuery(".wdi_toggle_container i").hasClass(wdi_open_toggle_btn_class)) {
2611
  /* Close controll buttons.*/
2612
  <?php
2613
- if ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') {
2614
- ?>
2615
- jQuery(".wdi_image_info").animate({bottom: 0}, 500);
2616
- <?php
2617
- }
2618
- elseif ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') {
2619
- ?>
2620
- jQuery(".wdi_image_info").animate({top: 0}, 500);
2621
- <?php
2622
- }
2623
-
2624
  ?>
2625
  jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '-' + jQuery(".wdi_ctrl_btn_container").height()}, 500);
2626
  jQuery(".wdi_toggle_container").animate({
2627
- <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0
2628
- }, {
2629
- duration: 500,
2630
  complete: function () { jQuery(".wdi_toggle_container i").attr("class", "wdi_toggle_btn fa " + wdi_close_toggle_btn_class) }
2631
- });
2632
  }
2633
  else {
2634
  /* Open controll buttons.*/
2635
  <?php
2636
- if ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') {
2637
- ?>
2638
- jQuery(".wdi_image_info").animate({bottom: jQuery(".wdi_ctrl_btn_container").height()}, 500);
2639
- <?php
2640
- }
2641
- elseif ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') {
2642
- ?>
2643
- jQuery(".wdi_image_info").animate({top: jQuery(".wdi_ctrl_btn_container").height()}, 500);
2644
- <?php
2645
- }
2646
-
2647
  ?>
2648
  jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0}, 500);
2649
  jQuery(".wdi_toggle_container").animate({
2650
- <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".wdi_ctrl_btn_container").height()
2651
- }, {
2652
- duration: 500,
2653
  complete: function () { jQuery(".wdi_toggle_container i").attr("class", "wdi_toggle_btn fa " + wdi_open_toggle_btn_class) }
2654
- });
2655
  }
2656
 
2657
 
@@ -2686,34 +2688,34 @@ class WDIViewGalleryBox {
2686
  jQuery(".wdi_image_wrap").animate({width: wdi_popup_current_width - comment_container_width}, 500);
2687
  jQuery(".wdi_image_container").animate({height: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>, width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>}, 500);
2688
  jQuery(".wdi_popup_image").animate({
2689
- maxWidth: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2690
- maxHeight: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2691
- }, {
2692
- duration: 500,
2693
- complete: function () {
2694
- wdi_change_watermark_container();
2695
- if ((jQuery("#wdi_spider_popup_wrap").width() < jQuery(window).width())) {
2696
- if (jQuery("#wdi_spider_popup_wrap").height() < jQuery(window).height()) {
2697
- jQuery(".wdi_spider_popup_close_fullscreen").attr("class", "wdi_spider_popup_close");
2698
- }
2699
  }
2700
  }
2701
- });
 
2702
  jQuery(".wdi_popup_embed").animate({
2703
- width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2704
- height: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2705
- }, {
2706
- duration: 500,
2707
- complete: function () {
2708
- wdi_resize_instagram_post();
2709
- wdi_change_watermark_container();
2710
- if (jQuery("#wdi_spider_popup_wrap").width() < jQuery(window).width()) {
2711
- if (jQuery("#wdi_spider_popup_wrap").height() < jQuery(window).height()) {
2712
- jQuery(".wdi_spider_popup_close_fullscreen").attr("class", "wdi_spider_popup_close");
2713
- }
2714
  }
2715
  }
2716
- });
 
2717
  jQuery(".wdi_filmstrip_container").animate({<?php echo $width_or_height; ?>: wdi_popup_current_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>}, 500);
2718
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: wdi_popup_current_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40}, 500);
2719
  /* Set filmstrip initial position.*/
@@ -2736,21 +2738,21 @@ class WDIViewGalleryBox {
2736
  jQuery(".wdi_image_wrap").animate({width: (jQuery(window).width() - comment_container_width)}, 500);
2737
  jQuery(".wdi_image_container").animate({height: (wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>), width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>}, 500);
2738
  jQuery(".wdi_popup_image").animate({
2739
- maxWidth: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2740
- maxHeight: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2741
- }, {
2742
- duration: 500,
2743
- complete: function () { wdi_change_watermark_container(); }
2744
- });
2745
  jQuery(".wdi_popup_embed").animate({
2746
- width: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2747
- height: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2748
- }, {
2749
- duration: 500,
2750
- complete: function () {
2751
- wdi_resize_instagram_post();
2752
- wdi_change_watermark_container(); }
2753
- });
2754
  jQuery(".wdi_filmstrip_container").animate({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>}, 500);
2755
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40}, 500);
2756
  /* Set filmstrip initial position.*/
@@ -2778,10 +2780,10 @@ class WDIViewGalleryBox {
2778
  <?php
2779
  /* "Full width lightbox" sets yes.*/
2780
  if ($open_with_fullscreen) {
2781
- ?>
2782
  wdi_popup_current_width = jQuery(window).width();
2783
  wdi_popup_current_height = jQuery(window).height();
2784
- <?php
2785
  }
2786
  ?>
2787
  jQuery("#wdi_spider_popup_wrap").on("fscreenclose", function() {
@@ -2796,9 +2798,9 @@ class WDIViewGalleryBox {
2796
  });
2797
  jQuery(".wdi_image_wrap").css({width: wdi_popup_current_width - comment_container_width});
2798
  jQuery(".wdi_image_container").css({height: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>, width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>});
2799
-
2800
  /*jQuery(".wdi_slide_bg").css({height: wdi_popup_current_height - <?php echo $image_filmstrip_height; ?>});
2801
- jQuery(".wdi_popup_image_spun1").css({height: wdi_popup_current_height - <?php echo $image_filmstrip_height; ?>});*/
2802
  jQuery(".wdi_popup_image").css({
2803
  maxWidth: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2804
  maxHeight: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
@@ -2837,44 +2839,44 @@ class WDIViewGalleryBox {
2837
  /* Fullscreen.*/
2838
  jQuery("#wdi_spider_popup_wrap").fullscreen();
2839
  /*jQuery("#wdi_spider_popup_wrap").on("fscreenopen", function() {
2840
- if (jQuery.fullscreen.isFullScreen()) {*/
2841
- var screen_width = screen.width;
2842
- var screen_height = screen.height;
2843
- jQuery("#wdi_spider_popup_wrap").css({
2844
- width: screen_width,
2845
- height: screen_height,
2846
- left: 0,
2847
- top: 0,
2848
- margin: 0,
2849
- zIndex: 100000
2850
- });
2851
- jQuery(".wdi_image_wrap").css({width: screen_width - comment_container_width});
2852
- jQuery(".wdi_image_container").css({height: (screen_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>), width: screen_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>});
2853
- /* jQuery(".wdi_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
2854
- jQuery(".wdi_popup_image").css({
2855
- maxWidth: (screen_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>),
2856
- maxHeight: (screen_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)
2857
- });
2858
-
2859
- jQuery(".wdi_popup_embed").css({
2860
- width: (screen_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>),
2861
- height: (screen_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)
2862
- });
2863
-
2864
- wdi_resize_instagram_post();
2865
-
2866
- /* Set watermark container size.*/
2867
- wdi_change_watermark_container();
2868
- jQuery(".wdi_filmstrip_container").css({<?php echo $width_or_height; ?>: (screen_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>)});
2869
- jQuery(".wdi_filmstrip").css({<?php echo $width_or_height; ?>: (screen_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40)});
2870
- /* Set filmstrip initial position.*/
2871
- wdi_set_filmstrip_pos(screen_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40);
2872
- jQuery(".wdi_resize-full").hide();
2873
- jQuery(".wdi_fullscreen").attr("class", "wdi_ctrl_btn wdi_fullscreen fa fa-compress");
2874
- jQuery(".wdi_fullscreen").attr("title", "<?php echo __('Exit Fullscreen', "wdi"); ?>");
2875
- jQuery(".wdi_spider_popup_close").attr("class", "wdi_ctrl_btn wdi_spider_popup_close_fullscreen");
2876
  /*});
2877
- }*/
2878
  }
2879
  }
2880
  }
@@ -2883,7 +2885,7 @@ class WDIViewGalleryBox {
2883
  /* Play/pause.*/
2884
  jQuery(".wdi_play_pause, .wdi_popup_image").on(wdi_click, function () {
2885
  if (jQuery(".wdi_ctrl_btn").hasClass("fa-play")) {
2886
-
2887
  /* PLay.*/
2888
  wdi_play();
2889
  jQuery(".wdi_play_pause").attr("title", "<?php echo __('Pause', "wdi"); ?>");
@@ -2900,35 +2902,35 @@ class WDIViewGalleryBox {
2900
  <?php
2901
 
2902
  if ($open_with_autoplay) {
2903
- ?>
2904
-
2905
- wdi_play();
2906
- jQuery(".wdi_play_pause").attr("title", "<?php echo __('Pause', "wdi"); ?>");
2907
- jQuery(".wdi_play_pause").attr("class", "wdi_ctrl_btn wdi_play_pause fa fa-pause");
2908
- <?php
2909
  }
2910
  ?>
2911
  /* Open with fullscreen.*/
2912
  <?php
2913
  if ($open_with_fullscreen) {
2914
- ?>
2915
- wdi_open_with_fullscreen();
2916
- <?php
2917
  }
2918
  ?>
2919
-
2920
  jQuery(".wdi_popup_image").removeAttr("width");
2921
  jQuery(".wdi_popup_image").removeAttr("height");
2922
-
2923
- //if info is displayed by defult then double trigger
2924
- //info click for displaying it with proper scrollbar
2925
- if(<?php echo $popup_info_always_show?>){
2926
- setTimeout(function(){
2927
- jQuery(".wdi_info").trigger(wdi_click);
2928
- jQuery(".wdi_info").trigger(wdi_click);
2929
- },100);
2930
- }
2931
-
2932
 
2933
  });
2934
  /* Open with fullscreen.*/
@@ -2951,33 +2953,33 @@ class WDIViewGalleryBox {
2951
  jQuery(".wdi_image_wrap").css({width: (jQuery(window).width() - comment_container_width)});
2952
  jQuery(".wdi_image_container").css({height: (wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>), width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>});
2953
  jQuery(".wdi_popup_image").css({
2954
- maxWidth: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2955
- maxHeight: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2956
  }, {
2957
  complete: function () { wdi_change_watermark_container(); }
2958
- });
2959
  jQuery(".wdi_popup_video").css({
2960
- width: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2961
- height: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2962
  }, {
2963
  complete: function () { wdi_change_watermark_container(); }
2964
- });
2965
  jQuery(".wdi_popup_embed").css({
2966
- width: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2967
- height: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2968
  }, {
2969
- complete: function () {
2970
  wdi_resize_instagram_post();
2971
  wdi_change_watermark_container(); }
2972
- });
2973
  jQuery(".wdi_filmstrip_container").css({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>});
2974
- jQuery(".wdi_filmstrip").css({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40});
2975
  /* Set filmstrip initial position.*/
2976
  wdi_set_filmstrip_pos(jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40);
2977
 
2978
  jQuery(".wdi_resize-full").attr("class", "wdi_ctrl_btn wdi_resize-full fa fa-compress");
2979
  jQuery(".wdi_resize-full").attr("title", "<?php echo __('Restore', "wdi"); ?>");
2980
- jQuery(".wdi_spider_popup_close").attr("class", "wdi_ctrl_btn wdi_spider_popup_close_fullscreen");
2981
  }
2982
 
2983
  function wdi_resize_instagram_post(){
@@ -2992,19 +2994,19 @@ class WDIViewGalleryBox {
2992
 
2993
  if(h <w +88 ){
2994
  post_height = h;
2995
- post_width = h -88;
2996
  }
2997
  else{
2998
  post_width = w;
2999
- post_height = w +88 ;
3000
  }
3001
-
3002
  jQuery('.inner_instagram_iframe_wdi_embed_frame').each(function(){
3003
-
3004
- post_height = post_height;
3005
- post_width = post_width;
3006
-
3007
- var top_pos = (0.5 *( h-post_height));
3008
  jQuery(this).parent().css({
3009
  height: post_height,
3010
  width: post_width,
@@ -3031,18 +3033,18 @@ class WDIViewGalleryBox {
3031
  }, '<?php echo $slideshow_interval * 1000; ?>');
3032
  }
3033
  jQuery(window).focus(function() {
3034
-
3035
  /* event_stack = [];*/
3036
  if (!jQuery(".wdi_ctrl_btn").hasClass("fa-play")) {
3037
  wdi_play();
3038
  }
3039
  /*var i = 0;
3040
- jQuery(".wdi_slider").children("span").each(function () {
3041
- if (jQuery(this).css('opacity') == 1) {
3042
- jQuery("#wdi_current_image_key").val(i);
3043
- }
3044
- i++;
3045
- });*/
3046
  });
3047
  jQuery(window).blur(function() {
3048
  event_stack = [];
@@ -3053,7 +3055,7 @@ class WDIViewGalleryBox {
3053
  <?php
3054
  die();
3055
  }
3056
-
3057
  ////////////////////////////////////////////////////////////////////////////////////////
3058
  // Getters & Setters //
3059
  ////////////////////////////////////////////////////////////////////////////////////////
27
 
28
  //////////////////////////////////////////////////////////////////
29
  $current_feed = $this->model->get_feed_row_data($_POST['feed_id']);
30
+
31
  $theme_row = WDILibrary::arrayToObject($this->model->get_theme_row_data($current_feed['theme_id']));
32
  $option_row = WDILibrary::arrayToObject($current_feed);
33
  $option_row->preload_images_count = 0;
51
  $open_with_autoplay = (isset($current_feed['popup_autoplay']) ? esc_html($current_feed['popup_autoplay']) : 0);
52
  $image_width = (isset($current_feed['popup_width']) ? esc_html($current_feed['popup_width']) : 800);
53
  $image_height = (isset($current_feed['popup_height']) ? esc_html($current_feed['popup_height']) : 500);
54
+
55
  $image_effect = (isset($current_feed['popup_type']) && esc_html(isset($current_feed['popup_type'])) ? esc_html($current_feed['popup_type']) : 'fade');
56
 
57
  $sort_by = (isset($_GET['wd_sor']) ? esc_html($_GET['wd_sor']) : 'order');/*watch later*/
99
  $watermark_height = (isset($_GET['watermark_height']) ? esc_html($_GET['watermark_height']) : 90);/*watch later*//*deprecated*/
100
 
101
 
102
+
103
 
104
  //$option_row = $this->model->get_option_row_data();
105
 
106
 
107
+ // $image_right_click = 0; //$option_row->image_right_click;/*watch later havent this options*/
108
  $comment_moderation = 0;//$option_row->comment_moderation;/*watch later havent this options*/
109
 
110
  $filmstrip_direction = 'horizontal';
111
  if ($theme_row->lightbox_filmstrip_pos == 'right' || $theme_row->lightbox_filmstrip_pos == 'left') {
112
+ $filmstrip_direction = 'vertical';
113
  }
114
  if ($enable_image_filmstrip) {
115
  if ($filmstrip_direction == 'horizontal') {
132
  //$image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by, $order_by);
133
  }
134
  else {
135
+ // $image_rows = $this->model->get_image_rows_data($gallery_id, $sort_by, $order_by);
136
  }
137
 
138
+
139
  $json = (($_POST['image_rows']));
140
  str_replace('"',"&quot;", $json);
141
+
142
  $image_rows = json_decode(stripslashes($json));
143
  $image_rows_count = count($image_rows);
144
  $image_rows = WDILibrary::arrayToObject($image_rows);
145
+
146
  /////////////////////////////////Parametes for deprecated content////////////////////
147
  $theme_row->lightbox_rate_stars_count = 0;
148
  $theme_row->lightbox_rate_size = 0;
218
  $filmstrip_thumb_margin_right = (int) $margins_split[0];
219
  $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
220
  }
221
+
222
  $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
223
  $rgb_wdi_image_info_bg_color = WDILibrary::wdi_spider_hex2rgb($theme_row->lightbox_info_bg_color);
224
  $rgb_lightbox_ctrl_cont_bg_color = WDILibrary::wdi_spider_hex2rgb($theme_row->lightbox_ctrl_cont_bg_color);
240
  }
241
 
242
  $current_filename = '';
243
+
244
  if ($option_row->enable_addthis && $option_row->addthis_profile_id) {
245
  ?>
246
  <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $option_row->addthis_profile_id; ?>" async="async"></script>
247
  <?php
248
  }
249
+
250
  ?>
251
  <style>
252
  /*@import url(https://fonts.googleapis.com/css?family=Maven+Pro:400,500);*/
305
  right: 0;
306
  top: 0;
307
  }
308
+
309
  .wdi_ctrl_btn_container {
310
  background-color: rgba(<?php echo $rgb_lightbox_ctrl_cont_bg_color['red']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['green']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>);
311
  /*background: none repeat scroll 0 0 #<?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;*/
312
+ <?php
313
+ if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
314
+ ?>
315
+ border-bottom-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
316
+ border-bottom-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
317
+ <?php
318
+ }
319
+ else {
320
+ ?>
321
+ bottom: 0;
322
+ border-top-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
323
+ border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
324
+ <?php
325
+ }?>
326
  height: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
327
  /*opacity: <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>;
328
  filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_cont_transparent; ?>);*/
333
  }
334
  .wdi_toggle_container {
335
  background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_ctrl_cont_bg_color; ?>;
336
+ <?php
337
+ if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
338
+ ?>
339
+ border-bottom-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
340
+ border-bottom-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
341
+ /****/
342
+ border-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
343
+ /****/
344
+ top: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
345
+ <?php
346
+ }
347
+ else {
348
+ ?>
349
+ border-top-left-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
350
+ border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
351
+ /****/
352
+ border-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
353
+ /****/
354
+ bottom: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
355
+ <?php
356
+ }?>
357
  cursor: pointer;
358
  left: 50%;
359
  line-height: 0;
416
  }
417
  #wdi_spider_popup_right-ico{
418
  left: -9999px;
419
+ }
420
  <?php }
421
  else { ?>
422
+ #wdi_spider_popup_left-ico {
423
  left: 20px;
424
+ }
425
+ #wdi_spider_popup_right-ico {
426
+ left: auto;
427
+ right: 20px;
428
+ }
429
  <?php } ?>
430
  .wdi_ctrl_btn:hover,
431
  .wdi_toggle_btn:hover,
432
+
433
  #wdi_spider_popup_left-ico:hover,
434
  #wdi_spider_popup_right-ico:hover {
435
  color: <?php echo $theme_row->lightbox_close_rl_btn_hover_color; ?>;
475
  height: 100%;
476
  overflow: hidden;
477
  position: absolute;
478
+ <?php echo $theme_row->lightbox_comment_pos; ?>: -<?php echo $theme_row->lightbox_comment_width; ?>px;
479
  top: 0;
480
  width: <?php echo $theme_row->lightbox_comment_width; ?>px;
481
  z-index: 10103;
502
  word-break: break-word;
503
  }
504
  .wdi_no_comment{
505
+ text-align: center !important;
506
  }
507
  .wdi_comments input[type="submit"] {
508
  background: none repeat scroll 0 0 <?php echo $theme_row->lightbox_comment_button_bg_color; ?>;
552
  font-size: 14px;
553
  margin: 2px;
554
  }
555
+
556
+
557
  .wdi_comments_close {
558
  cursor: pointer;
559
  line-height: 0;
561
  font-size: 13px;
562
  text-align: <?php echo (($theme_row->lightbox_comment_pos == 'left') ? 'right' : 'left'); ?>;
563
  margin: 5px;
564
+ <?php echo (($theme_row->lightbox_comment_pos == 'left') ? 'right' : 'left'); ?> : 0;
565
  top: 0;
566
+ background-color: <?php echo $theme_row->lightbox_comment_bg_color; ?>;
567
  z-index: 10202;
568
  }
569
  .wdi_comments_close i{
577
  .wdi_comment_textarea::-webkit-scrollbar-thumb {
578
  background-color: rgba(255, 255, 255, 0.55);
579
  border-radius: 2px;
580
+ }
581
  .wdi_comment_textarea::-webkit-scrollbar-thumb:hover {
582
  background-color: #D9D9D9;
583
  }
585
  .wdi_ctrl_btn_container a:hover {
586
  text-decoration: none;
587
  }
588
+
589
  .wdi_facebook:hover {
590
  color: #3B5998 !important;
591
  cursor: pointer;
622
  display: table;
623
  position: absolute;
624
  text-align: center;
625
+ <?php echo $theme_row->lightbox_filmstrip_pos; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : $image_filmstrip_width); ?>px;
626
  vertical-align: middle;
627
  width: 100%;
628
+ }
629
  .wdi_filmstrip_container {
630
  display: <?php echo ($filmstrip_direction == 'horizontal'? 'table' : 'block'); ?>;
631
  height: <?php echo ($filmstrip_direction == 'horizontal'? $image_filmstrip_height : $image_height); ?>px;
632
  position: absolute;
633
  width: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width : $image_filmstrip_width); ?>px;
634
  z-index: 10105;
635
+ <?php echo $theme_row->lightbox_filmstrip_pos; ?>: 0;
636
  }
637
  .wdi_filmstrip {
638
+ <?php echo $left_or_top; ?>: 20px;
639
  overflow: hidden;
640
  position: absolute;
641
+ <?php echo $width_or_height; ?>: <?php echo ($filmstrip_direction == 'horizontal' ? $image_width - 40 : $image_height - 40); ?>px;
642
  z-index: 10106;
643
  }
644
  .wdi_filmstrip_thumbnails {
645
  height: <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : ($image_filmstrip_height + $filmstrip_thumb_margin_hor + 2 * $theme_row->lightbox_filmstrip_thumb_border_width) * $image_rows_count); ?>px;
646
+ <?php echo $left_or_top; ?>: 0px;
647
  margin: 0 auto;
648
  overflow: hidden;
649
  position: relative;
683
  cursor: pointer;
684
  display: <?php echo ($filmstrip_direction == 'horizontal' ? 'table-cell' : 'block') ?>;
685
  vertical-align: middle;
686
+ <?php echo $width_or_height; ?>: 20px;
687
  z-index: 10106;
688
+ <?php echo $left_or_top; ?>: 0;
689
+ <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'position: absolute;') ?>
690
+ <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'width: 100%;') ?>
691
  }
692
  .wdi_filmstrip_right {
693
  background-color: <?php echo $theme_row->lightbox_filmstrip_rl_bg_color; ?>;
694
  cursor: pointer;
695
+ <?php echo($filmstrip_direction == 'horizontal' ? 'right' : 'bottom') ?>: 0;
696
+ <?php echo $width_or_height; ?>: 20px;
697
  display: <?php echo ($filmstrip_direction == 'horizontal' ? 'table-cell' : 'block') ?>;
698
  vertical-align: middle;
699
  z-index: 10106;
700
+ <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'position: absolute;') ?>
701
+ <?php echo ($filmstrip_direction == 'horizontal' ? '' : 'width: 100%;') ?>
702
  }
703
  .wdi_filmstrip_left i,
704
  .wdi_filmstrip_right i {
799
  .wdi_image_info_container1 {
800
  display: <?php echo $popup_info_always_show ? 'table-cell' : 'none'; ?>;
801
  }
802
+
803
  .wdi_image_info_spun {
804
  text-align: <?php echo $theme_row->lightbox_info_align; ?>;
805
  vertical-align: <?php echo $theme_row->lightbox_info_pos; ?>;
806
  }
807
+
808
+
809
  .wdi_image_info {
810
  background: rgba(<?php echo $rgb_wdi_image_info_bg_color['red']; ?>, <?php echo $rgb_wdi_image_info_bg_color['green']; ?>, <?php echo $rgb_wdi_image_info_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_info_bg_transparent / 100, 2, ".", ""); ?>);
811
  border: <?php echo $theme_row->lightbox_info_border_width; ?>px <?php echo $theme_row->lightbox_info_border_style; ?> <?php echo $theme_row->lightbox_info_border_color; ?>;
812
  border-radius: <?php echo $theme_row->lightbox_info_border_radius; ?>px;
813
+ <?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') ? 'bottom: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
814
+ <?php if($params_array['popup_info_full_width']) { ?>
815
  width: 100%;
816
+ <?php } else { ?>
817
  width: 33%;
818
  margin: <?php echo $theme_row->lightbox_info_margin; ?>;
819
+ <?php } ?>
820
  padding: <?php echo $theme_row->lightbox_info_padding; ?>;
821
+ <?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') ? 'top: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
822
  overflow: auto;
823
  }
824
  .wdi_image_title,
857
  vertical-align: middle;
858
  word-break: break-all;
859
  }
860
+
861
  .wdi_share_btns{
862
  position: absolute;
863
+ <?php echo ($theme_row->lightbox_ctrl_btn_pos == 'top')? 'bottom' : 'top';?>: -115%;
864
  width: <?php echo $theme_row->lightbox_ctrl_btn_height*7.5;?>px;
865
  border-radius: 3px;
866
  left: -150%;
867
  margin: 0;
868
  z-index: 200000;
869
+ background-color: rgba(<?php echo $rgb_lightbox_ctrl_cont_bg_color['red']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['green']; ?>, <?php echo $rgb_lightbox_ctrl_cont_bg_color['blue']; ?>, <?php echo number_format($theme_row->lightbox_ctrl_cont_transparent / 100, 2, ".", ""); ?>);
870
+
871
  }
872
  .wdi_share_btns_container{
873
  position: relative;
875
  }
876
  .wdi_share_popup_btn{
877
  color: <?php echo $theme_row->lightbox_ctrl_btn_color; ?>;
 
878
  padding: 3px;
879
+ opacity: <?php echo number_format($theme_row->lightbox_ctrl_btn_transparent / 100, 2, ".", ""); ?>;
880
+ filter: Alpha(opacity=<?php echo $theme_row->lightbox_ctrl_btn_transparent; ?>);
881
  font-size: <?php echo $theme_row->lightbox_ctrl_btn_height;?>px;
882
  }
883
  .wdi_share_caret{
897
  .wdi_facebook_btn:hover{
898
  color: #4099FB;
899
  }
900
+
901
+
902
  .wdi_comment_header a,.wdi_comment_header a:visited{
903
  color: <?php echo $theme_row->lightbox_comment_author_font_color; ?> !important;
904
  }
906
  color: <?php echo $theme_row->lightbox_comment_author_font_color; ?>!important;
907
  }
908
  .wdi_comment_header a:hover,a.wdi_comm_text_link:hover{
909
+ text-decoration: none;
910
+ color: <?php echo $theme_row->lightbox_comment_author_font_color_hover; ?>!important;
911
  }
912
  .wdi_load_more_comments{
913
  display: inline-block;
914
  color: <?php echo $theme_row->lightbox_comment_load_more_color; ?>;
915
+ background-color: <?php echo $theme_row->lightbox_comment_bg_color; ?>;
916
+ -webkit-user-select: none; /* Chrome/Safari */
917
  -moz-user-select: none; /* Firefox */
918
  -ms-user-select: none; /* IE10+ */
919
  /* Rules below not implemented in browsers yet */
924
  font-size: 17px;
925
  }
926
  .wdi_load_more_comments:hover{
927
+ color: <?php echo $theme_row->lightbox_comment_load_more_color_hover;?>;
928
+ cursor: pointer;
929
  }
930
 
931
+ @media (max-width: 480px) {
932
+ .wdi_image_count_container {
933
+ display: none;
934
+ }
935
  .wdi_image_title,
936
  .wdi_image_title * {
937
+ font-size: 12px;
938
+ }
939
  .wdi_image_description,
940
  .wdi_image_description * {
941
+ font-size: 10px;
942
+ }
943
+ }
944
  .wdi_image_count_container {
945
  left: 0;
946
  line-height: 1;
954
  <?php
955
  $image_id_exist = FALSE;
956
  foreach ($image_rows as $key => $image_row) {
957
+ if ($image_row->id == $image_id) {
958
+ $current_avg_rating = $image_row->avg_rating;
959
+ $current_rate = $image_row->rate;
960
+ $current_rate_count = $image_row->rate_count;
961
+ $current_image_key = $key;
962
+ }
963
+ if ($image_row->id == $current_image_id) {
964
+ $current_image_alt = $image_row->alt;
965
+ $current_image_user_name = $image_row->username;
966
+ $current_image_user_pic = $image_row->profile_picture;
967
+ $current_image_hit_count = $image_row->hit_count;
968
+ $current_image_description = str_replace('#',' #',str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description));
969
+ $current_image_url = $image_row->image_url;
970
+ $current_thumb_url = $image_row->thumb_url;
971
+ $current_filetype = $image_row->filetype;
972
+ $current_filename = $image_row->filename;
973
+ $image_id_exist = TRUE;
974
+ }
975
+
976
+
977
+ //sanitizing image description
978
+ $instaDesc = $image_row->description;
979
+ $instaDesc = preg_replace('/\\\\/', esc_html('&#92;'), $instaDesc);
980
+
981
+ /*last two are ZWSP and P-SEP*/
982
+ $instaDesc = str_replace(array("\r\n", "\n", "\r",'
', '
'), esc_html(''), str_replace('"','\"',$instaDesc));
983
+ $instaDesc = str_replace('#', ' #', $instaDesc);
984
+ ?>
985
+
986
+ wdi_data["<?php echo $key; ?>"] = [];
987
+ wdi_data["<?php echo $key; ?>"]["number"] = <?php echo $key + 1; ?>;
988
+ wdi_data["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
989
+ wdi_data["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->alt); ?>";
990
+ wdi_data["<?php echo $key; ?>"]["description"] = "<?php echo $instaDesc; ?>";
991
+ wdi_data["<?php echo $key; ?>"]['username'] = "<?php echo $image_row->username;?>";
992
+ wdi_data["<?php echo $key; ?>"]['profile_picture'] = "<?php echo $image_row->profile_picture;?>";
993
+
994
+ wdi_data["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
995
+ wdi_data["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
996
+ wdi_data["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
997
+ wdi_data["<?php echo $key; ?>"]["comment_count"] = "<?php echo $image_row->comment_count; ?>";
998
+ wdi_data["<?php echo $key; ?>"]["filetype"] = "<?php echo $image_row->filetype; ?>";
999
+ wdi_data["<?php echo $key; ?>"]["filename"] = "<?php echo $image_row->filename; ?>";
1000
+ wdi_data["<?php echo $key; ?>"]["avg_rating"] = "<?php echo $image_row->avg_rating; ?>";
1001
+ wdi_data["<?php echo $key; ?>"]["rate"] = "<?php echo $image_row->rate; ?>";
1002
+ wdi_data["<?php echo $key; ?>"]["rate_count"] = "<?php echo $image_row->rate_count; ?>";
1003
+ wdi_data["<?php echo $key; ?>"]["hit_count"] = "<?php echo $image_row->hit_count; ?>";
1004
+ wdi_data["<?php echo $key; ?>"]["comments_data"] = <?php echo isset($image_row->comments_data) ? json_encode($image_row->comments_data) : 'null'; ?>;
1005
+ <?php
1006
  }
1007
  ?>
1008
 
1018
  <?php
1019
  if ($enable_image_ctrl_btn) {
1020
  $share_url = add_query_arg(array('action' => 'Share', 'curr_url' => $current_url, 'image_id' => $current_image_id), admin_url('admin-ajax.php')) . '#wdi' . $gallery_id . '/' . $current_image_id;
1021
+ ?>
1022
+ <div class="wdi_btn_container">
1023
+ <div class="wdi_ctrl_btn_container">
1024
+ <?php
1025
+ if ($option_row->show_image_counts) {
1026
+ ?>
1027
+ <span class="wdi_image_count_container wdi_ctrl_btn">
1028
  <span class="wdi_image_count"><?php echo $current_image_key + 1; ?></span> /
1029
  <span><?php echo $image_rows_count; ?></span>
1030
  </span>
1031
+ <?php
1032
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1033
  ?>
1034
+ <i title="<?php echo __('Play', "wdi"); ?>" class="wdi_ctrl_btn wdi_play_pause fa fa-play"></i>
1035
+ <?php if ($enable_image_fullscreen) {
1036
+ if (!$open_with_fullscreen) {
1037
+ ?>
1038
+ <i title="<?php echo __('Maximize', "wdi"); ?>" class="wdi_ctrl_btn wdi_resize-full fa fa-expand "></i>
1039
+ <?php
1040
+ }
1041
+ ?>
1042
+ <i title="<?php echo __('Fullscreen', "wdi"); ?>" class="wdi_ctrl_btn wdi_fullscreen fa fa-arrows-alt"></i>
1043
+ <?php } if ($popup_enable_info) { ?>
1044
+ <i title="<?php echo __('Show info', "wdi"); ?>" class="wdi_ctrl_btn wdi_info fa fa-info"></i>
1045
+ <?php } if ($enable_comment_social) { ?>
1046
+ <i title="<?php echo __('Show comments', "wdi"); ?>" class="wdi_ctrl_btn wdi_comment fa fa-comment"></i>
1047
+ <?php } if ($popup_enable_rate) { ?>
1048
+ <i title="<?php echo __('Show rating', "wdi"); ?>" class="wdi_ctrl_btn wdi_rate fa fa-star"></i>
1049
+ <?php }
1050
+ $is_embed = preg_match('/EMBED/', $current_filetype) == 1 ? TRUE : FALSE;
1051
+ $share_image_url = urlencode( $is_embed ? $current_thumb_url : site_url() . '/' . $WD_WDI_UPLOAD_DIR . $current_image_url);
1052
+ if ($enable_image_facebook) {
1053
+ ?>
1054
+ <a id="wdi_facebook_a" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Facebook', "wdi"); ?>">
1055
+ <i title="<?php echo __('Share on Facebook', "wdi"); ?>" class="wdi_ctrl_btn wdi_facebook fa fa-facebook"></i>
1056
+ </a>
1057
+ <?php
1058
+ }
1059
+ if ($enable_image_twitter) {
1060
+ ?>
1061
+ <a id="wdi_twitter_a" href="https://twitter.com/share?url=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Twitter', "wdi"); ?>">
1062
+ <i title="<?php echo __('Share on Twitter', "wdi"); ?>" class="wdi_ctrl_btn wdi_twitter fa fa-twitter"></i>
1063
+ </a>
1064
+ <?php
1065
+ }
1066
+ if ($enable_image_google) {
1067
+ ?>
1068
+ <a id="wdi_google_a" href="https://plus.google.com/share?url=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Google+', "wdi"); ?>">
1069
+ <i title="<?php echo __('Share on Google+', "wdi"); ?>" class="wdi_ctrl_btn wdi_google fa fa-google-plus"></i>
1070
+ </a>
1071
+ <?php
1072
+ }
1073
+ if ($enable_image_pinterest) {
1074
+ ?>
1075
+ <a id="wdi_pinterest_a" href="http://pinterest.com/pin/create/button/?s=100&url=<?php echo urlencode($share_url); ?>&media=<?php echo $share_image_url; ?>&description=<?php echo $current_image_description; ?>" target="_blank" title="<?php echo __('Share on Pinterest', "wdi"); ?>">
1076
+ <i title="<?php echo __('Share on Pinterest', "wdi"); ?>" class="wdi_ctrl_btn wdi_pinterest fa fa-pinterest"></i>
1077
+ </a>
1078
+ <?php
1079
+ }
1080
+ if ($enable_image_tumblr) {
1081
+ ?>
1082
+ <a id="wdi_tumblr_a" href="https://www.tumblr.com/share/photo?source=<?php echo $share_image_url; ?>&caption=<?php echo urlencode($current_image_alt); ?>&clickthru=<?php echo urlencode($share_url); ?>" target="_blank" title="<?php echo __('Share on Tumblr', "wdi"); ?>">
1083
+ <i title="<?php echo __('Share on Tumblr', "wdi"); ?>" class="wdi_ctrl_btn wdi_tumblr fa fa-tumblr"></i>
1084
+ </a>
1085
+ <?php
1086
+ }
1087
 
1088
+ if ($enable_share_buttons) {
1089
+ ?>
1090
+ <span class="wdi_share_btns_container">
1091
  <i onclick="jQuery(this).parent().find('.wdi_share_btns').toggleClass('wdi_share_toggler');jQuery(this).parent().find('.wdi_share_caret').toggleClass('wdi_share_toggler')" title="<?php echo __('Share', "wdi"); ?>" class="wdi_ctrl_btn fa fa-share"></i>
1092
  <p class="wdi_share_btns" style="display:none">
1093
  <a id="wdi_popup_fb" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $current_image_url;?>" target="_blank" class='wdi_share_popup_btn wdi_facebook fa fa-facebook'></a>
1098
  </p>
1099
  <i class="wdi_share_caret " style="display:none;"></i>
1100
  </span>
 
 
 
 
1101
 
1102
 
1103
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
1104
  }
1105
+
1106
+
1107
+ if ($option_row->popup_enable_fullsize_image) {
1108
+ ?>
1109
+ <a id="wdi_fullsize_image" href="<?php echo !$is_embed ? site_url() . '/' . $WD_WDI_UPLOAD_DIR . $current_image_url : $current_image_url; ?>" target="_blank">
1110
+ <i title="<?php echo __('Open image in Instagram.', "wdi"); ?>" class="wdi_ctrl_btn fa fa-instagram"></i>
1111
+ </a>
1112
+ <?php
1113
  }
1114
+ if ($option_row->popup_enable_download) {
1115
+ $style = 'none';
1116
+ $current_image_arr = explode('/', $current_image_url);
1117
+ if (!$is_embed) {
1118
+ $download_href = site_url() . '/' . $WD_WDI_UPLOAD_DIR . $current_image_url;
1119
+ $style = 'inline-block';
1120
  }
1121
+ elseif (preg_match('/FLICKR/', $current_filetype) == 1) {
1122
  $download_href = $current_filename;
1123
+ $style = 'inline-block';
1124
  }
1125
+ elseif (preg_match('/INSTAGRAM/', $current_filetype) == 1) {
1126
+ if(preg_match('/IMAGE/',$current_filetype) == 1){
1127
+ $download_href = substr_replace($current_thumb_url, 'l', -1);
1128
+ }
1129
+ if(preg_match('/VIDEO/',$current_filetype) == 1){
1130
+ $download_href = $current_filename;
1131
+ }
1132
+
1133
 
1134
+ $style = 'inline-block';
1135
+ }
1136
+ ?>
1137
+ <a id="wdi_download" href="<?php echo $download_href; ?>" target="_blank" download="<?php echo end($current_image_arr); ?>" style="display: <?php echo $style; ?>;">
1138
+ <i title="<?php echo __('Download original image', "wdi"); ?>" class="wdi_ctrl_btn fa fa-download"></i>
1139
+ </a>
1140
+ <?php
1141
  }
1142
  ?>
1143
+ </div>
1144
+ <div class="wdi_toggle_container">
1145
+ <i class="wdi_toggle_btn fa <?php echo (($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-up' : 'fa-angle-down'); ?>"></i>
1146
+ </div>
 
 
 
 
 
1147
  </div>
1148
+ <?php
 
1149
  }
1150
  $current_pos = 0;
1151
 
1161
  $current_pos = $key * (($filmstrip_direction == 'horizontal' ? $image_filmstrip_width : $image_filmstrip_height) + $filmstrip_thumb_margin_hor);
1162
  $current_key = $key;
1163
  }
1164
+
1165
  $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
1166
  if (!$is_embed) {
1167
  list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_WDI_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
1177
  $image_thumb_height = $resolution_h * $scale;
1178
  }
1179
  else{
1180
+ $image_thumb_width = $image_filmstrip_width;
1181
+ $image_thumb_height = $image_filmstrip_height;
1182
  }
1183
  }
1184
  else {
1191
  $image_thumb_height *= $scale;
1192
  $thumb_left = ($image_filmstrip_width - $image_thumb_width) / 2;
1193
  $thumb_top = ($image_filmstrip_height - $image_thumb_height) / 2;
1194
+ ?>
1195
+ <div id="wdi_filmstrip_thumbnail_<?php echo $key; ?>" class="wdi_filmstrip_thumbnail <?php echo (($image_row->id == $current_image_id) ? 'wdi_thumb_active' : 'wdi_thumb_deactive'); ?>">
1196
+ <img style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" class="wdi_filmstrip_thumbnail_img" src="<?php echo ($is_embed ? "" : site_url() . '/' . $WD_WDI_UPLOAD_DIR) . $image_row->thumb_url; ?>" onclick="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '<?php echo $key; ?>', wdi_data)" ontouchend="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '<?php echo $key; ?>', wdi_data)" image_id="<?php echo $image_row->id; ?>" image_key="<?php echo $key; ?>" alt="<?php echo $image_row->alt; ?>" />
1197
+ </div>
1198
+ <?php
1199
  }
1200
  ?>
1201
  </div>
1205
  <?php
1206
  }
1207
  if ($watermark_type != 'none') {
1208
+ ?>
1209
+ <div class="wdi_image_container">
1210
+ <div class="wdi_watermark_container">
1211
+ <div style="display:table; margin:0 auto;">
1212
  <span class="wdi_watermark_spun" id="wdi_watermark_container">
1213
  <?php
1214
  if ($watermark_type == 'image') {
1215
+ ?>
1216
+ <a href="<?php echo urldecode($watermark_link); ?>" target="_blank">
1217
  <img class="wdi_watermark_image wdi_watermark" src="<?php echo $watermark_url; ?>" />
1218
  </a>
1219
+ <?php
1220
  }
1221
  elseif ($watermark_type == 'text') {
1222
+ ?>
1223
+ <a class="wdi_none_selectable wdi_watermark_text wdi_watermark" target="_blank" href="<?php echo $watermark_link; ?>"><?php echo $watermark_text; ?></a>
1224
+ <?php
1225
  }
1226
  ?>
1227
  </span>
1228
+ </div>
1229
  </div>
1230
  </div>
1231
+ <?php
 
1232
  }
1233
  ?>
1234
  <div id="wdi_image_container" class="wdi_image_container">
1247
  </span>
1248
  </div>
1249
  </div>
1250
+
1251
  <div class="wdi_slide_container">
1252
  <div class="wdi_slide_bg">
1253
  <div class="wdi_slider">
1254
+ <?php
1255
+ $current_key = -6;
1256
+ foreach ($image_rows as $key => $image_row) {
1257
+
1258
+ $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
1259
+ $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
1260
+ if ($image_row->id == $current_image_id) {
1261
+ $current_key = $key;
1262
+ ?>
1263
+ <span class="wdi_popup_image_spun" id="wdi_popup_image" image_id="<?php echo $image_row->id; ?>">
1264
  <span class="wdi_popup_image_spun1" style="display: table; width: inherit; height: inherit;">
1265
  <span class="wdi_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">
1266
+ <?php
1267
+ if (!$is_embed) {
1268
  ?>
1269
  <img class="wdi_popup_image wdi_popup_watermark" src="<?php echo site_url() . '/' . $WD_WDI_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
1270
+
1271
+ <?php
1272
+ }
1273
+ else { /*$is_embed*/ ?>
1274
+ <span class="wdi_popup_embed wdi_popup_watermark" style="display:table; table-layout:fixed;">
1275
  <?php
1276
  if($is_embed_instagram_post){
1277
  $post_width = $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0);
1278
  $post_height = $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0);
1279
  if($post_height <$post_width +88 ){
1280
+ $post_width =$post_height -88;
1281
  }
1282
  else{
1283
+ $post_height =$post_width +88;
1284
  }
1285
  WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'style'=>"width:".$post_width."px; height:".$post_height."px; vertical-align:middle; display:inline-block; position:relative;"));
1286
  }
1287
  else{
1288
+ WDILibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"wdi_embed_frame", 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"));
1289
  }
1290
  ?>
1291
  </span>
1292
  <?php
1293
+ }
1294
  ?>
1295
  </span>
1296
  </span>
1297
  </span>
1298
+ <span class="wdi_popup_image_second_spun">
1299
  </span>
1300
+ <input type="hidden" id="wdi_current_image_key" value="<?php echo $key; ?>" />
1301
+ <?php
1302
+ break;
1303
+ }
1304
+ }
1305
+ ?>
1306
  </div>
1307
  </div>
1308
  </div>
1311
  </div>
1312
  </div>
1313
  <?php if ($enable_comment_social) { ?>
1314
+ <div class="wdi_comment_wrap">
1315
+ <div class="wdi_comment_container wdi_close">
1316
+ <div id="ajax_loading" style="position:absolute;">
1317
+ <div id="opacity_div" style="display:none; background-color:rgba(255, 255, 255, 0.2); position:absolute; z-index:10150;"></div>
1318
  <span id="loading_div" style="display:none; text-align:center; position:relative; vertical-align:middle; z-index:10170">
1319
  <img src="<?php echo WDI_URL . '/images/ajax_loader.png'; ?>" class="wdi_spider_ajax_loading" style="width:50px;">
1320
  </span>
1321
+ </div>
1322
+ <div class="wdi_comments">
1323
+ <?php
1324
+ $captcha_error_message = '';
1325
+ $email_error_message = '';
1326
+ $wdi_name = '';
1327
+ $wdi_comment = '';
1328
+ $wdi_email = '';
1329
+ if (isset($_POST['ajax_task']) && (esc_html(stripslashes($_POST['ajax_task'])) === 'save')) {
1330
+ if ($option_row->popup_enable_captcha) {
1331
+ $wdi_captcha_input = (isset($_POST['wdi_captcha_input']) ? esc_html(stripslashes($_POST['wdi_captcha_input'])) : '');
1332
+ @session_start();
1333
+ $wdi_captcha_code = (isset($_SESSION['wdi_captcha_code']) ? esc_html(stripslashes($_SESSION['wdi_captcha_code'])) : '');
1334
+ if ($wdi_captcha_input !== $wdi_captcha_code) {
1335
+ $captcha_error_message = __('Error. Incorrect Verification Code.', "wdi");
1336
+ $wdi_name = (isset($_POST['wdi_name']) ? esc_html(stripslashes($_POST['wdi_name'])) : '');
1337
+ $wdi_comment = (isset($_POST['wdi_comment']) ? esc_html(stripslashes($_POST['wdi_comment'])) : '');
1338
+ $wdi_email = (isset($_POST['wdi_email']) ? esc_html(stripslashes($_POST['wdi_email'])) : '');
1339
+ }
1340
+ }
1341
+ if ($option_row->popup_enable_email && isset($_POST['wdi_email']) && !is_email(stripslashes($_POST['wdi_email']))) {
1342
+ $email_error_message = __( 'This is not a valid email address.', "wdi" );
1343
  $wdi_name = (isset($_POST['wdi_name']) ? esc_html(stripslashes($_POST['wdi_name'])) : '');
1344
  $wdi_comment = (isset($_POST['wdi_comment']) ? esc_html(stripslashes($_POST['wdi_comment'])) : '');
1345
  $wdi_email = (isset($_POST['wdi_email']) ? esc_html(stripslashes($_POST['wdi_email'])) : '');
1346
  }
1347
  }
1348
+ ?>
1349
+ <div id="wdi_comments">
1350
+ <div title="<?php echo __('Hide Comments', "wdi"); ?>" class="wdi_comments_close">
1351
+ <i class="wdi_comments_close_btn fa fa-arrow-<?php echo $theme_row->lightbox_comment_pos; ?>"></i>
1352
+ </div>
 
 
 
 
 
 
 
1353
 
1354
+ <form id="wdi_comment_form" style="display:none !important;"> method="post" action="<?php echo $popup_url; ?>"><!--Deprecated-->
1355
+ <p><label for="wdi_name"><?php echo __('Name', "wdi"); ?> * </label></p>
1356
+ <p><input type="text" name="wdi_name" id="wdi_name" <?php echo ((get_current_user_id() != 0) ? 'readonly="readonly"' : ''); ?>
1357
+ value="<?php echo ((get_current_user_id() != 0) ? get_userdata(get_current_user_id())->display_name : $wdi_name); ?>" /></p>
1358
+ <?php
1359
+ if ($option_row->popup_enable_email) {
1360
+ ?>
1361
+ <p><label for="wdi_email"><?php echo __('Email', "wdi"); ?> * </label></p>
1362
+ <p><input type="text" name="wdi_email" id="wdi_email"
1363
+ value="<?php echo ((get_current_user_id() != 0) ? get_userdata(get_current_user_id())->user_email : $wdi_email); ?>" /></p>
1364
+ <p><span class="wdi_comment_error"><?php echo $email_error_message; ?></span></p>
1365
+ <?php
1366
+ }
1367
+ ?>
1368
+ <p><label for="wdi_comment"><?php echo __('Comment', "wdi"); ?> * </label></p>
1369
+ <p><textarea class="wdi_comment_textarea" name="wdi_comment" id="wdi_comment"><?php echo $wdi_comment; ?></textarea></p>
1370
+ <?php
1371
+ if ($option_row->popup_enable_captcha) {
1372
+ ?>
1373
+ <p><label for="wdi_captcha_input"><?php echo __('Verification Code', "wdi"); ?></label></p>
1374
+ <p>
1375
+ <input id="wdi_captcha_input" name="wdi_captcha_input" class="wdi_captcha_input" type="text">
1376
+ <img id="wdi_captcha_img" class="wdi_captcha_img" type="captcha" digit="6" src="<?php echo add_query_arg(array('action' => 'wdi_captcha', 'digit' => 6, 'i' => ''), admin_url('admin-ajax.php')); ?>" onclick="wdi_captcha_refresh('wdi_captcha')" ontouchend="wdi_captcha_refresh('wdi_captcha')" />
1377
+ <span id="wdi_captcha_refresh" class="wdi_captcha_refresh" onclick="wdi_captcha_refresh('wdi_captcha')" ontouchend="wdi_captcha_refresh('wdi_captcha')"></span>
1378
+ </p>
1379
+ <p><span class="wdi_comment_error"><?php echo $captcha_error_message; ?></span></p>
1380
+ <?php
1381
+ }
1382
+ ?>
1383
+ <p><input onclick="if (wdi_spider_check_required('wdi_name', '<?php echo __('Name', "wdi"); ?>') <?php if ($option_row->popup_enable_email) { ?> || wdi_spider_check_required('wdi_email', '<?php echo __('Email', "wdi"); ?>') || wdi_spider_check_email('wdi_email') <?php } ?> || wdi_spider_check_required('wdi_comment', '<?php echo __('Comment', "wdi"); ?>')) { return false;}
1384
+ var cur_image_key = parseInt(jQuery('#wdi_current_image_key').val());
1385
+ ++wdi_data[cur_image_key]['comment_count'];
1386
+ wdi_spider_set_input_value('ajax_task', 'save');
1387
+ wdi_spider_set_input_value('image_id', jQuery('#wdi_popup_image').attr('image_id'));
1388
+ wdi_spider_ajax_save('wdi_comment_form');
1389
+ return false;"
1390
+ ontouchend="if (wdi_spider_check_required('wdi_name', '<?php echo __('Name', "wdi"); ?>') <?php if ($option_row->popup_enable_email) { ?> || wdi_spider_check_required('wdi_email', '<?php echo __('Email', "wdi"); ?>') || wdi_spider_check_email('wdi_email') <?php } ?> || wdi_spider_check_required('wdi_comment', '<?php echo __('Comment', "wdi"); ?>')) {return false;}
1391
  var cur_image_key = parseInt(jQuery('#wdi_current_image_key').val());
1392
  ++wdi_data[cur_image_key]['comment_count'];
1393
  wdi_spider_set_input_value('ajax_task', 'save');
1394
  wdi_spider_set_input_value('image_id', jQuery('#wdi_popup_image').attr('image_id'));
1395
  wdi_spider_ajax_save('wdi_comment_form');
1396
  return false;" class="wdi_submit" type="submit" name="wdi_submit" id="wdi_submit" value="<?php echo __('Submit', "wdi"); ?>" /></p>
1397
+ <?php echo (!current_user_can('manage_options') && ($comment_moderation && (isset($_POST['wdi_comment']) && esc_html($_POST['wdi_comment'])))) ? __('Your comment is awaiting moderation', "wdi") : ''; ?>
1398
+ <input id="ajax_task" name="ajax_task" type="hidden" value="" />
1399
+ <input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
1400
+ <input id="comment_id" name="comment_id" type="hidden" value="" />
1401
+ </form>
1402
+ </div>
1403
+ <div id="wdi_added_comments">
1404
  <p class="wdi_no_comment"><?php _e('There are no comments to show','wdi');?></p>
1405
+ </div>
1406
  </div>
1407
  </div>
1408
  </div>
 
1409
  <?php } ?>
1410
 
1411
  <a class="wdi_spider_popup_close" onclick="wdi_spider_destroypopup(1000); return false;" ontouchend="wdi_spider_destroypopup(1000); return false;"><span><i class="wdi_close_btn fa fa-times"></i></span></a>
1413
  <script language="javascript" type="text/javascript" src="<?php echo WDI_URL . '/js/gallerybox/wdi_embed.js?ver=' . WDI_VERSION; ?>"></script>
1414
  <script>
1415
 
1416
+
1417
+
1418
+
1419
+
1420
 
1421
 
1422
  <?php
1423
  if ($option_row->enable_addthis && $option_row->addthis_profile_id) {
1424
+ ?>
1425
+ var addthis_share = {
1426
+ url: "<?php echo urlencode($share_url); ?>"
1427
+ }
1428
+ <?php
1429
  }
1430
  ?>
1431
  var wdi_trans_in_progress = false;
1452
  setTimeout(function () {
1453
  var width = wdi_current_image_span.width();
1454
  var height = wdi_current_image_span.height();
1455
+
1456
 
1457
  jQuery(".wdi_watermark_spun").width(width);
1458
  jQuery(".wdi_watermark_spun").height(height);
1461
  var comment_container_width = 0;
1462
  if (jQuery(".wdi_comment_container").hasClass("wdi_open")) {
1463
  comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
1464
+ }
1465
  if (width <= (jQuery(window).width() - comment_container_width)) {
1466
  jQuery(".wdi_watermark_image").css({
1467
  width: ((jQuery(".wdi_spider_popup_wrap").width() - comment_container_width) * <?php echo $watermark_width / $image_width; ?>)
1474
  }
1475
  });
1476
 
1477
+
1478
 
1479
  }
1480
  var wdi_current_key = '<?php echo $current_key; ?>';
1484
  var selectedImagePos = -wdi_current_filmstrip_pos - (jQuery(".wdi_filmstrip_thumbnail").<?php echo $outerWidth_or_outerHeight; ?>(true)) / 2;
1485
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".wdi_filmstrip_thumbnails").<?php echo $width_or_height; ?>(), selectedImagePos + filmStripWidth / 2));
1486
  jQuery(".wdi_filmstrip_thumbnails").animate({
1487
+ <?php echo $left_or_top; ?>: imagesContainerLeft
1488
+ }, {
1489
+ duration: 500,
1490
  complete: function () { wdi_filmstrip_arrows(); }
1491
+ });
1492
  }
1493
  function wdi_move_filmstrip() {
1494
  var image_left = jQuery(".wdi_thumb_active").position().<?php echo $left_or_top; ?>;
1502
  }
1503
  if (image_left < Math.abs(long_filmstrip_cont_left)) {
1504
  jQuery(".wdi_filmstrip_thumbnails").animate({
1505
+ <?php echo $left_or_top; ?>: -image_left
1506
+ }, {
1507
  duration: 500,
1508
+ complete: function () { wdi_filmstrip_arrows(); }
1509
  });
1510
  }
1511
  else if (image_right > long_filmstrip_cont_right) {
1512
  jQuery(".wdi_filmstrip_thumbnails").animate({
1513
+ <?php echo $left_or_top; ?>: -(image_right - wdi_filmstrip_width)
1514
+ }, {
1515
  duration: 500,
1516
+ complete: function () { wdi_filmstrip_arrows(); }
1517
  });
1518
  }
1519
  }
1589
  jQuery(".wdi_slider").removeAttr('style');
1590
  jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
1591
  jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
1592
+
1593
  wdi_trans_in_progress = false;
1594
  jQuery(current_image_class).html('');
1595
  if (typeof event_stack !== 'undefined') {
1637
  /* Set active thumbnail.*/
1638
  jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");
1639
  jQuery("#wdi_filmstrip_thumbnail_" + wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");
1640
+ wdi_trans_in_progress = false;
1641
  jQuery(current_image_class).html('');
1642
  wdi_change_watermark_container();
1643
  }
1654
  else {
1655
  jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, wdi_transition_duration);
1656
  jQuery(next_image_class).animate({
1657
+ 'opacity' : 1,
1658
+ 'z-index': 2
1659
+ }, {
1660
+ duration: wdi_transition_duration,
1661
+ complete: function () {
1662
 
1663
+ wdi_trans_in_progress = false;
1664
+ jQuery(current_image_class).html('');
1665
+ wdi_change_watermark_container(); }
1666
+ });
1667
  /* For IE.*/
1668
  jQuery(current_image_class).fadeTo(wdi_transition_duration, 0);
1669
  jQuery(next_image_class).fadeTo(wdi_transition_duration, 1);
1711
  var imgWidth = cur_img.width();
1712
  var imgHeight = cur_img.height();
1713
  var contWidth = cont.width(),
1714
+ contHeight = cont.height(),
1715
+ colWidth = Math.floor(contWidth / cols),
1716
+ rowHeight = Math.floor(contHeight / rows),
1717
+ colRemainder = contWidth - (cols * colWidth),
1718
+ colAdd = Math.ceil(colRemainder / cols),
1719
+ rowRemainder = contHeight - (rows * rowHeight),
1720
+ rowAdd = Math.ceil(rowRemainder / rows),
1721
+ leftDist = 0,
1722
+ img_leftDist = Math.ceil((jQuery(".wdi_slide_bg").width() - cur_img.width()) / 2);
1723
+ var imgSrc = typeof cur_img.attr('src')=='undefined' ? '' :cur_img.attr('src');
1724
  /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
1725
  tx = tx === 'auto' ? contWidth : tx;
1726
  tx = tx === 'min-auto' ? - contWidth : tx;
1729
  /* Loop through cols.*/
1730
  for (var i = 0; i < cols; i++) {
1731
  var topDist = 0,
1732
+ img_topDst = Math.floor((jQuery(".wdi_slide_bg").height() - cur_img.height()) / 2),
1733
+ newColWidth = colWidth;
1734
  /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
1735
  if (colRemainder > 0) {
1736
  var add = colRemainder >= colAdd ? colAdd : colRemainder;
1740
  /* Nested loop to create row gridlets for each col.*/
1741
  for (var j = 0; j < rows; j++) {
1742
  var newRowHeight = rowHeight,
1743
+ newRowRemainder = rowRemainder;
1744
  /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
1745
  if (newRowRemainder > 0) {
1746
  add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
1885
  jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
1886
  jQuery(this)[0].contentWindow.postMessage('pause', '*');
1887
  });
1888
+
1889
  if (typeof wdi_data[key] != 'undefined') {
1890
  if (typeof wdi_data[current_key] != 'undefined') {
1891
  if (jQuery('.wdi_ctrl_btn').hasClass('fa-pause')) {
1892
+
1893
  wdi_play();
1894
  }
1895
  if (!from_effect) {
1896
  /* Change image key.*/
1897
  jQuery("#wdi_current_image_key").val(key);
1898
  /*if (current_key == '-1') {
1899
+ current_key = jQuery(".wdi_thumb_active").children("img").attr("image_key");
1900
+ }*/
1901
  }
1902
  if (wdi_trans_in_progress) {
1903
  event_stack.push(current_key + '-' + key);
1911
  return;
1912
  }
1913
  /*jQuery("#wdi_spider_popup_left").hover().css({"display": "inline"});
1914
+ jQuery("#wdi_spider_popup_right").hover().css({"display": "inline"});*/
1915
  jQuery(".wdi_image_count").html(wdi_data[key]["number"]);
1916
  /* Set filmstrip initial position.*/
1917
  jQuery(".wdi_watermark").css({display: 'none'});
1933
  jQuery(".wdi_image_hits span").html(++wdi_data[key]["hit_count"]);
1934
  /* Change image id.*/
1935
  jQuery("#wdi_popup_image").attr('image_id', wdi_data[key]["id"]);
1936
+
1937
 
1938
  //creating image title template
1939
  var wdi_title_div = jQuery('<div class="wdi_title"></div>').on('click',function(){window.open('//instagram.com/'+wdi_data[key]['username'],'_blank');});
1942
 
1943
  //resetting title and description for custom scrollbar
1944
  jQuery('.wdi_image_info_spun').html('<div class="wdi_image_info" >'+
1945
+ '<div class="wdi_image_title"></div>'+
1946
+ '<div class="wdi_image_description"></div>'+
1947
+ '</div>');
1948
 
1949
  /* Change image title, description.*/
1950
  jQuery(".wdi_image_title").html(jQuery('<span style="display: block;" />').append(wdi_title_div));
1952
  jQuery(".wdi_image_info").removeAttr("style");
1953
  if (wdi_data[key]["alt"].trim() == "") {
1954
  if (wdi_data[key]["description"].trim() == "") {
1955
+ jQuery(".wdi_image_info").css("background", "none");
1956
  }
1957
  }
1958
  if (jQuery(".wdi_image_info_container1").css("display") != 'none') {
1970
  }
1971
  var current_image_class = jQuery(".wdi_popup_image_spun").css("zIndex") == 2 ? ".wdi_popup_image_spun" : ".wdi_popup_image_second_spun";
1972
  var next_image_class = current_image_class == ".wdi_popup_image_second_spun" ? ".wdi_popup_image_spun" : ".wdi_popup_image_second_spun";
1973
+
1974
  var is_embed = wdi_data[key]['filetype'].indexOf("EMBED_") > -1 ? true : false;
1975
  var is_embed_instagram_post = wdi_data[key]['filetype'].indexOf('INSTAGRAM_POST') > -1 ? true :false;
1976
  var cur_height = jQuery(current_image_class).height();
1987
  var post_height = 0;
1988
  if(cur_height <cur_width +88 ){
1989
  post_height = cur_height;
1990
+ post_width = post_height -88;
1991
  }
1992
  else{
1993
  post_width = cur_width;
1994
+ post_height = post_width +88 ;
1995
  }
1996
  innhtml += wdi_spider_display_embed(wdi_data[key]['filetype'], wdi_data[key]['filename'], {class:"wdi_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:"+post_width+"px; height:"+post_height+"px; vertical-align:middle; display:inline-block; position:relative; top: "+0.5*(cur_height-post_height)+ "px; " });
1997
  }
2002
  }
2003
  innhtml += '</span></span>';
2004
  jQuery(next_image_class).html(innhtml);
2005
+
2006
  function wdi_afterload() {
2007
 
2008
 
2035
  jQuery("#wdi_download").attr("href", wdi_data[key]['thumb_url'].substring(0, wdi_data[key]['thumb_url'].length - 1) + 'l');
2036
  }
2037
  else {
2038
+ jQuery("#wdi_download").hide();
2039
  }
2040
  }
2041
  var image_arr = wdi_data[key]['image_url'].split("/");
2044
  jQuery("#wdi_download").attr("download", image_arr[image_arr.length - 1]);
2045
  /* Change image social networks urls.*/
2046
  var wdi_share_url = encodeURIComponent("<?php echo add_query_arg(array('action' => 'Share', 'curr_url' => $current_url, 'image_id' => ''), admin_url('admin-ajax.php')); ?>") + "=" + wdi_data[key]['id'] + encodeURIComponent('#wdi<?php echo $gallery_id; ?>/') + wdi_data[key]['id'];
2047
+
2048
  if (is_embed) {
2049
  var wdi_share_image_url = encodeURIComponent(wdi_data[key]['thumb_url']);
2050
  }
2093
  // jQuery(".mCSB_scrollTools").hide();
2094
  <?php
2095
  if ($enable_image_filmstrip) {
2096
+ ?>
2097
+ wdi_move_filmstrip();
2098
+ <?php
2099
  }
2100
  ?>
2101
 
2125
  wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), parseInt(jQuery('#wdi_current_image_key').val()) - 1, wdi_data)
2126
  }
2127
  else if (e.keyCode === 27) { /* Esc.*/
2128
+ wdi_spider_destroypopup(1000);
2129
+ }
2130
+ else if (e.keyCode === 32) { /* Space.*/
2131
+ jQuery(".wdi_play_pause").trigger('click');
2132
+ }
2133
  });
2134
  function wdi_preload_images(key) {
2135
  count = <?php echo (int) $option_row->preload_images_count / 2; ?>;
2195
  });
2196
 
2197
  jQuery(".wdi_image_container").css({height: (<?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)});
2198
+
2199
  jQuery(".wdi_popup_image").css({
2200
  maxHeight: <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2201
  });
2209
  <?php } ?>
2210
  wdi_popup_current_height = <?php echo $image_height; ?>;
2211
  }
2212
+ else {
2213
  jQuery("#wdi_spider_popup_wrap").css({
2214
  height: jQuery(window).height(),
2215
  top: 0,
2217
  zIndex: 100000
2218
  });
2219
  jQuery(".wdi_image_container").css({height: (jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)});
2220
+
2221
  jQuery(".wdi_popup_image").css({
2222
  maxHeight: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2223
  });
2240
  });
2241
  jQuery(".wdi_image_wrap").css({width: <?php echo $image_width; ?> - comment_container_width});
2242
  jQuery(".wdi_image_container").css({width: (<?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width)});
2243
+
2244
  jQuery(".wdi_popup_image").css({
2245
  maxWidth: <?php echo $image_width - ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width
2246
  });
2254
  <?php } ?>
2255
  wdi_popup_current_width = <?php echo $image_width; ?>;
2256
  }
2257
+ else {
2258
  jQuery("#wdi_spider_popup_wrap").css({
2259
  width: jQuery(window).width(),
2260
  left: 0,
2263
  });
2264
  jQuery(".wdi_image_wrap").css({width: (jQuery(window).width() - comment_container_width)});
2265
  jQuery(".wdi_image_container").css({width: (jQuery(window).width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width)});
2266
+
2267
  jQuery(".wdi_popup_image").css({
2268
  maxWidth: jQuery(window).width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - comment_container_width
2269
  });
2282
  if (!(!(jQuery(window).height() > <?php echo $image_height - 2 * $theme_row->lightbox_close_btn_top; ?>) || !(jQuery(window).width() >= <?php echo $image_width - 2 * $theme_row->lightbox_close_btn_right; ?>) || !(<?php echo $open_with_fullscreen; ?> != 1))) {
2283
  jQuery(".wdi_spider_popup_close_fullscreen").attr("class", "wdi_spider_popup_close");
2284
  }
2285
+ else {
2286
  if (!(!(jQuery("#wdi_spider_popup_wrap").width() <= jQuery(window).width()) || !(jQuery("#wdi_spider_popup_wrap").height() <= jQuery(window).height()))) {
2287
  jQuery(".wdi_spider_popup_close").attr("class", "wdi_ctrl_btn wdi_spider_popup_close_fullscreen");
2288
  }
2302
  var wdi_popup_current_height = <?php echo $image_height; ?>;
2303
  /* Open/close comments.*/
2304
  function wdi_comment() {
2305
+
2306
  jQuery(".wdi_watermark").css({display: 'none'});
2307
  if (jQuery(".wdi_comment_container").hasClass("wdi_open")) {
2308
+
2309
  /* Close comment.*/
2310
  var border_width = parseInt(jQuery(".wdi_comment_container").css('borderRightWidth'));
2311
  if (!border_width) {
2313
  }
2314
  jQuery(".wdi_comment_container").animate({<?php echo $theme_row->lightbox_comment_pos; ?>: -jQuery(".wdi_comment_container").width() - border_width}, 500);
2315
  jQuery(".wdi_image_wrap").animate({
2316
+ <?php echo $theme_row->lightbox_comment_pos; ?>: 0,
2317
  width: jQuery("#wdi_spider_popup_wrap").width()
2318
+ }, 500);
2319
  jQuery(".wdi_image_container").animate({
2320
  width: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>}, 500);
2321
  jQuery(".wdi_popup_image").animate({
2322
+ maxWidth: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2323
+ }, {
2324
+ duration: 500,
2325
+ complete: function () { wdi_change_watermark_container(); }
2326
+ });
2327
  jQuery(".wdi_popup_embed").animate({
2328
+ width: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2329
+ }, {
2330
+ duration: 500,
2331
+ complete: function () {
2332
+ wdi_resize_instagram_post();
2333
+ wdi_change_watermark_container(); }
2334
+ });
2335
  jQuery(".wdi_filmstrip_container").animate({<?php echo $width_or_height; ?>: jQuery(".wdi_spider_popup_wrap").<?php echo $width_or_height; ?>()}, 500);
2336
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: jQuery(".wdi_spider_popup_wrap").<?php echo $width_or_height; ?>() - 40}, 500);
2337
  /* Set filmstrip initial position.*/
2343
  // console.log("has clos:"+jQuery(".wdi_comment_container").hasClass("wdi_close"));
2344
  }
2345
  else {
2346
+
2347
  /* Open comment.*/
2348
  var comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
2349
  if (comment_container_width > jQuery(window).width()) {
2362
  }
2363
  jQuery(".wdi_comment_container").animate({<?php echo $theme_row->lightbox_comment_pos; ?>: 0}, 500);
2364
  jQuery(".wdi_image_wrap").animate({
2365
+ <?php echo $theme_row->lightbox_comment_pos; ?>: jQuery(".wdi_comment_container").width(),
2366
  width: jQuery("#wdi_spider_popup_wrap").width() - jQuery(".wdi_comment_container").width()}, 500);
2367
  jQuery(".wdi_image_container").animate({
2368
  width: jQuery("#wdi_spider_popup_wrap").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?> - jQuery(".wdi_comment_container").width()}, 500);
2369
  jQuery(".wdi_popup_image").animate({
2370
+ maxWidth: jQuery("#wdi_spider_popup_wrap").width() - jQuery(".wdi_comment_container").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2371
+ }, {
2372
+ duration: 500,
2373
+ complete: function () { wdi_change_watermark_container(); }
2374
+ });
2375
  jQuery(".wdi_popup_embed").animate({
2376
+ width: jQuery("#wdi_spider_popup_wrap").width() - jQuery(".wdi_comment_container").width() - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>
2377
+ }, {
2378
+ duration: 500,
2379
+ complete: function () {
2380
+ wdi_resize_instagram_post();
2381
+ wdi_change_watermark_container(); }
2382
+ });
2383
  jQuery(".wdi_filmstrip_container").css({<?php echo $width_or_height; ?>: jQuery("#wdi_spider_popup_wrap").<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'vertical' ? 0: 'jQuery(".wdi_comment_container").width()'); ?>});
2384
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: jQuery(".wdi_filmstrip_container").<?php echo $width_or_height; ?>() - 40}, 500);
2385
  /* Set filmstrip initial position.*/
2387
  jQuery(".wdi_comment_container").attr("class", "wdi_comment_container wdi_open");
2388
  jQuery(".wdi_comment").attr("title", "<?php echo __('Hide Comments', "wdi"); ?>");
2389
  /* Load comments.*/
2390
+
2391
  var cur_image_key = parseInt(jQuery("#wdi_current_image_key").val());
2392
  if (wdi_data[cur_image_key]["comment_count"] != 0) {
2393
  jQuery("#wdi_added_comments").show();/*deprecated*/
2395
  wdi_spider_set_input_value('image_id', jQuery('#wdi_popup_image').attr('image_id'));/*deprecated*/
2396
  wdi_spider_ajax_save('wdi_comment_form',cur_image_key);/*deprecated*/
2397
  }else{
2398
+ jQuery("#wdi_added_comments").html('<p class="wdi_no_comment"><?php _e('There are no comments to show','wdi');?></p>');
2399
  }
2400
  // console.log("has open:"+jQuery(".wdi_comment_container").hasClass("wdi_open"));
2401
  // console.log("has clos:"+jQuery(".wdi_comment_container").hasClass("wdi_close"));
2411
  }
2412
  }
2413
  jQuery(document).ready(function () {
2414
+
2415
 
2416
  <?php
2417
  if ($option_row->enable_addthis && $option_row->addthis_profile_id) {
2418
+ ?>
2419
+ jQuery(".at4-share-outer").show();
2420
+ <?php
2421
  }
2422
+ ?>
2423
  /* Increase image hit counter.*/
2424
  // wdi_spider_set_input_value('rate_ajax_task', 'save_hit_count');
2425
  // wdi_spider_rate_ajax_save('wdi_rate_form');
2428
  // if (!wdi_hash || wdi_hash.indexOf("wdi") == "-1") {
2429
  // window.location.hash = "wdi<?php echo $gallery_id; ?>/<?php echo $current_image_id; ?>";
2430
  // }
2431
+ <?php
2432
  if ($image_right_click) {
2433
+ ?>
2434
+ /* Disable right click.*/
2435
+ jQuery(".wdi_image_wrap").bind("contextmenu", function (e) {
2436
+ return false;
2437
+ });
2438
+ <?php
2439
  }
2440
  ?>
2441
  if (typeof jQuery().swiperight !== 'undefined') {
2463
  return false;
2464
  });
2465
  jQuery("#wdi_spider_popup_right").on(wdi_click, function () {
2466
+
2467
  wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), (parseInt(jQuery('#wdi_current_image_key').val()) + 1) % wdi_data.length, wdi_data);
2468
  return false;
2469
  });
2490
  }
2491
  /* Set image container height.*/
2492
  <?php if ($filmstrip_direction == 'horizontal') { ?>
2493
+ jQuery(".wdi_image_container").height(jQuery(".wdi_image_wrap").height() - <?php echo $image_filmstrip_height; ?>);
2494
+ jQuery(".wdi_image_container").width(jQuery(".wdi_image_wrap").width());
2495
+
2496
+
2497
+ <?php }
2498
  else {
2499
+ ?>
2500
+ jQuery(".wdi_image_container").height(jQuery(".wdi_image_wrap").height());
2501
+ jQuery(".wdi_image_container").width(jQuery(".wdi_image_wrap").width() - <?php echo $image_filmstrip_width; ?>);
2502
+
2503
+ <?php
2504
  } ?>
2505
  /* Change default scrollbar in comments.*/
2506
  // if (typeof jQuery().mCustomScrollbar !== 'undefined') {
2508
  // jQuery(".wdi_comments").mCustomScrollbar({scrollInertia: 150});
2509
  // }
2510
  // }
2511
+
2512
+
2513
  var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel" /*FF doesn't recognize mousewheel as of FF3.x*/
2514
  jQuery('.wdi_filmstrip').on(mousewheelevt, function(e) {
2515
  var evt = window.event || e; /* Equalize event object.*/
2525
  jQuery(".wdi_filmstrip_right").trigger(isMobile ? 'touchend' : 'click');
2526
  }
2527
  });
2528
+
2529
+
2530
  jQuery(".wdi_filmstrip_right").on(wdi_click, function () {
2531
  jQuery( ".wdi_filmstrip_thumbnails" ).stop(true, false);
2532
  if (jQuery(".wdi_filmstrip_thumbnails").position().<?php echo $left_or_top; ?> >= -(jQuery(".wdi_filmstrip_thumbnails").<?php echo $width_or_height; ?>() - jQuery(".wdi_filmstrip").<?php echo $width_or_height; ?>())) {
2572
  if (jQuery(".wdi_image_info_container1").css("display") == 'none') {
2573
  jQuery(".wdi_image_info_container1").css("display", "table-cell");
2574
  jQuery(".wdi_info").attr("title", "<?php echo __('Hide info', "wdi"); ?>");
 
2575
 
2576
 
2577
+
2578
+ if(!jQuery('.wdi_image_info').hasClass('mCustomScrollbar')){
2579
+ var wdi_desc_max_height = <?php echo $image_height - ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?> -jQuery(".wdi_ctrl_btn_container").height()-parseInt(jQuery('.wdi_image_info').css('margin-bottom'))-parseInt(jQuery('.wdi_image_info').css('padding-bottom'));
2580
+ jQuery('.wdi_image_info').css('max-height',wdi_desc_max_height+"px");
2581
+ jQuery('.wdi_image_info').mCustomScrollbar({scrollInertia: 250});
2582
+ }
2583
+
2584
 
2585
  }
2586
  else {
2588
  jQuery(".wdi_info").attr("title", "<?php echo __('Show info', "wdi"); ?>");
2589
  }
2590
 
2591
+
2592
  });
2593
  /* Show/hide image rating.*/
2594
  jQuery(".wdi_rate").on(wdi_click, function() {
2612
  if (jQuery(".wdi_toggle_container i").hasClass(wdi_open_toggle_btn_class)) {
2613
  /* Close controll buttons.*/
2614
  <?php
2615
+ if ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') {
2616
+ ?>
2617
+ jQuery(".wdi_image_info").animate({bottom: 0}, 500);
2618
+ <?php
2619
+ }
2620
+ elseif ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') {
2621
+ ?>
2622
+ jQuery(".wdi_image_info").animate({top: 0}, 500);
2623
+ <?php
2624
+ }
2625
+
2626
  ?>
2627
  jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '-' + jQuery(".wdi_ctrl_btn_container").height()}, 500);
2628
  jQuery(".wdi_toggle_container").animate({
2629
+ <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0
2630
+ }, {
2631
+ duration: 500,
2632
  complete: function () { jQuery(".wdi_toggle_container i").attr("class", "wdi_toggle_btn fa " + wdi_close_toggle_btn_class) }
2633
+ });
2634
  }
2635
  else {
2636
  /* Open controll buttons.*/
2637
  <?php
2638
+ if ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'bottom') && $theme_row->lightbox_ctrl_btn_pos == 'bottom' && $theme_row->lightbox_info_pos == 'bottom') {
2639
+ ?>
2640
+ jQuery(".wdi_image_info").animate({bottom: jQuery(".wdi_ctrl_btn_container").height()}, 500);
2641
+ <?php
2642
+ }
2643
+ elseif ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') {
2644
+ ?>
2645
+ jQuery(".wdi_image_info").animate({top: jQuery(".wdi_ctrl_btn_container").height()}, 500);
2646
+ <?php
2647
+ }
2648
+
2649
  ?>
2650
  jQuery(".wdi_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0}, 500);
2651
  jQuery(".wdi_toggle_container").animate({
2652
+ <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".wdi_ctrl_btn_container").height()
2653
+ }, {
2654
+ duration: 500,
2655
  complete: function () { jQuery(".wdi_toggle_container i").attr("class", "wdi_toggle_btn fa " + wdi_open_toggle_btn_class) }
2656
+ });
2657
  }
2658
 
2659
 
2688
  jQuery(".wdi_image_wrap").animate({width: wdi_popup_current_width - comment_container_width}, 500);
2689
  jQuery(".wdi_image_container").animate({height: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>, width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>}, 500);
2690
  jQuery(".wdi_popup_image").animate({
2691
+ maxWidth: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2692
+ maxHeight: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2693
+ }, {
2694
+ duration: 500,
2695
+ complete: function () {
2696
+ wdi_change_watermark_container();
2697
+ if ((jQuery("#wdi_spider_popup_wrap").width() < jQuery(window).width())) {
2698
+ if (jQuery("#wdi_spider_popup_wrap").height() < jQuery(window).height()) {
2699
+ jQuery(".wdi_spider_popup_close_fullscreen").attr("class", "wdi_spider_popup_close");
 
2700
  }
2701
  }
2702
+ }
2703
+ });
2704
  jQuery(".wdi_popup_embed").animate({
2705
+ width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2706
+ height: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2707
+ }, {
2708
+ duration: 500,
2709
+ complete: function () {
2710
+ wdi_resize_instagram_post();
2711
+ wdi_change_watermark_container();
2712
+ if (jQuery("#wdi_spider_popup_wrap").width() < jQuery(window).width()) {
2713
+ if (jQuery("#wdi_spider_popup_wrap").height() < jQuery(window).height()) {
2714
+ jQuery(".wdi_spider_popup_close_fullscreen").attr("class", "wdi_spider_popup_close");
 
2715
  }
2716
  }
2717
+ }
2718
+ });
2719
  jQuery(".wdi_filmstrip_container").animate({<?php echo $width_or_height; ?>: wdi_popup_current_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>}, 500);
2720
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: wdi_popup_current_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40}, 500);
2721
  /* Set filmstrip initial position.*/
2738
  jQuery(".wdi_image_wrap").animate({width: (jQuery(window).width() - comment_container_width)}, 500);
2739
  jQuery(".wdi_image_container").animate({height: (wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>), width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>}, 500);
2740
  jQuery(".wdi_popup_image").animate({
2741
+ maxWidth: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2742
+ maxHeight: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2743
+ }, {
2744
+ duration: 500,
2745
+ complete: function () { wdi_change_watermark_container(); }
2746
+ });
2747
  jQuery(".wdi_popup_embed").animate({
2748
+ width: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2749
+ height: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2750
+ }, {
2751
+ duration: 500,
2752
+ complete: function () {
2753
+ wdi_resize_instagram_post();
2754
+ wdi_change_watermark_container(); }
2755
+ });
2756
  jQuery(".wdi_filmstrip_container").animate({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>}, 500);
2757
  jQuery(".wdi_filmstrip").animate({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40}, 500);
2758
  /* Set filmstrip initial position.*/
2780
  <?php
2781
  /* "Full width lightbox" sets yes.*/
2782
  if ($open_with_fullscreen) {
2783
+ ?>
2784
  wdi_popup_current_width = jQuery(window).width();
2785
  wdi_popup_current_height = jQuery(window).height();
2786
+ <?php
2787
  }
2788
  ?>
2789
  jQuery("#wdi_spider_popup_wrap").on("fscreenclose", function() {
2798
  });
2799
  jQuery(".wdi_image_wrap").css({width: wdi_popup_current_width - comment_container_width});
2800
  jQuery(".wdi_image_container").css({height: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>, width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>});
2801
+
2802
  /*jQuery(".wdi_slide_bg").css({height: wdi_popup_current_height - <?php echo $image_filmstrip_height; ?>});
2803
+ jQuery(".wdi_popup_image_spun1").css({height: wdi_popup_current_height - <?php echo $image_filmstrip_height; ?>});*/
2804
  jQuery(".wdi_popup_image").css({
2805
  maxWidth: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2806
  maxHeight: wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2839
  /* Fullscreen.*/
2840
  jQuery("#wdi_spider_popup_wrap").fullscreen();
2841
  /*jQuery("#wdi_spider_popup_wrap").on("fscreenopen", function() {
2842
+ if (jQuery.fullscreen.isFullScreen()) {*/
2843
+ var screen_width = screen.width;
2844
+ var screen_height = screen.height;
2845
+ jQuery("#wdi_spider_popup_wrap").css({
2846
+ width: screen_width,
2847
+ height: screen_height,
2848
+ left: 0,
2849
+ top: 0,
2850
+ margin: 0,
2851
+ zIndex: 100000
2852
+ });
2853
+ jQuery(".wdi_image_wrap").css({width: screen_width - comment_container_width});
2854
+ jQuery(".wdi_image_container").css({height: (screen_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>), width: screen_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>});
2855
+ /* jQuery(".wdi_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
2856
+ jQuery(".wdi_popup_image").css({
2857
+ maxWidth: (screen_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>),
2858
+ maxHeight: (screen_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)
2859
+ });
2860
+
2861
+ jQuery(".wdi_popup_embed").css({
2862
+ width: (screen_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>),
2863
+ height: (screen_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>)
2864
+ });
2865
+
2866
+ wdi_resize_instagram_post();
2867
+
2868
+ /* Set watermark container size.*/
2869
+ wdi_change_watermark_container();
2870
+ jQuery(".wdi_filmstrip_container").css({<?php echo $width_or_height; ?>: (screen_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>)});
2871
+ jQuery(".wdi_filmstrip").css({<?php echo $width_or_height; ?>: (screen_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40)});
2872
+ /* Set filmstrip initial position.*/
2873
+ wdi_set_filmstrip_pos(screen_<?php echo $width_or_height; ?> - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40);
2874
+ jQuery(".wdi_resize-full").hide();
2875
+ jQuery(".wdi_fullscreen").attr("class", "wdi_ctrl_btn wdi_fullscreen fa fa-compress");
2876
+ jQuery(".wdi_fullscreen").attr("title", "<?php echo __('Exit Fullscreen', "wdi"); ?>");
2877
+ jQuery(".wdi_spider_popup_close").attr("class", "wdi_ctrl_btn wdi_spider_popup_close_fullscreen");
2878
  /*});
2879
+ }*/
2880
  }
2881
  }
2882
  }
2885
  /* Play/pause.*/
2886
  jQuery(".wdi_play_pause, .wdi_popup_image").on(wdi_click, function () {
2887
  if (jQuery(".wdi_ctrl_btn").hasClass("fa-play")) {
2888
+
2889
  /* PLay.*/
2890
  wdi_play();
2891
  jQuery(".wdi_play_pause").attr("title", "<?php echo __('Pause', "wdi"); ?>");
2902
  <?php
2903
 
2904
  if ($open_with_autoplay) {
2905
+ ?>
2906
+
2907
+ wdi_play();
2908
+ jQuery(".wdi_play_pause").attr("title", "<?php echo __('Pause', "wdi"); ?>");
2909
+ jQuery(".wdi_play_pause").attr("class", "wdi_ctrl_btn wdi_play_pause fa fa-pause");
2910
+ <?php
2911
  }
2912
  ?>
2913
  /* Open with fullscreen.*/
2914
  <?php
2915
  if ($open_with_fullscreen) {
2916
+ ?>
2917
+ wdi_open_with_fullscreen();
2918
+ <?php
2919
  }
2920
  ?>
2921
+
2922
  jQuery(".wdi_popup_image").removeAttr("width");
2923
  jQuery(".wdi_popup_image").removeAttr("height");
2924
+
2925
+ //if info is displayed by defult then double trigger
2926
+ //info click for displaying it with proper scrollbar
2927
+ if(<?php echo $popup_info_always_show?>){
2928
+ setTimeout(function(){
2929
+ jQuery(".wdi_info").trigger(wdi_click);
2930
+ jQuery(".wdi_info").trigger(wdi_click);
2931
+ },100);
2932
+ }
2933
+
2934
 
2935
  });
2936
  /* Open with fullscreen.*/
2953
  jQuery(".wdi_image_wrap").css({width: (jQuery(window).width() - comment_container_width)});
2954
  jQuery(".wdi_image_container").css({height: (wdi_popup_current_height - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>), width: wdi_popup_current_width - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>});
2955
  jQuery(".wdi_popup_image").css({
2956
+ maxWidth: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2957
+ maxHeight: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2958
  }, {
2959
  complete: function () { wdi_change_watermark_container(); }
2960
+ });
2961
  jQuery(".wdi_popup_video").css({
2962
+ width: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2963
+ height: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2964
  }, {
2965
  complete: function () { wdi_change_watermark_container(); }
2966
+ });
2967
  jQuery(".wdi_popup_embed").css({
2968
+ width: jQuery(window).width() - comment_container_width - <?php echo ($filmstrip_direction == 'vertical' ? $image_filmstrip_width : 0); ?>,
2969
+ height: jQuery(window).height() - <?php echo ($filmstrip_direction == 'horizontal' ? $image_filmstrip_height : 0); ?>
2970
  }, {
2971
+ complete: function () {
2972
  wdi_resize_instagram_post();
2973
  wdi_change_watermark_container(); }
2974
+ });
2975
  jQuery(".wdi_filmstrip_container").css({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?>});
2976
+ jQuery(".wdi_filmstrip").css({<?php echo $width_or_height; ?>: jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40});
2977
  /* Set filmstrip initial position.*/
2978
  wdi_set_filmstrip_pos(jQuery(window).<?php echo $width_or_height; ?>() - <?php echo ($filmstrip_direction == 'horizontal' ? 'comment_container_width' : 0); ?> - 40);
2979
 
2980
  jQuery(".wdi_resize-full").attr("class", "wdi_ctrl_btn wdi_resize-full fa fa-compress");
2981
  jQuery(".wdi_resize-full").attr("title", "<?php echo __('Restore', "wdi"); ?>");
2982
+ jQuery(".wdi_spider_popup_close").attr("class", "wdi_ctrl_btn wdi_spider_popup_close_fullscreen");
2983
  }
2984
 
2985
  function wdi_resize_instagram_post(){
2994
 
2995
  if(h <w +88 ){
2996
  post_height = h;
2997
+ post_width = h -88;
2998
  }
2999
  else{
3000
  post_width = w;
3001
+ post_height = w +88 ;
3002
  }
3003
+
3004
  jQuery('.inner_instagram_iframe_wdi_embed_frame').each(function(){
3005
+
3006
+ post_height = post_height;
3007
+ post_width = post_width;
3008
+
3009
+ var top_pos = (0.5 *( h-post_height));
3010
  jQuery(this).parent().css({
3011
  height: post_height,
3012
  width: post_width,
3033
  }, '<?php echo $slideshow_interval * 1000; ?>');
3034
  }
3035
  jQuery(window).focus(function() {
3036
+
3037
  /* event_stack = [];*/
3038
  if (!jQuery(".wdi_ctrl_btn").hasClass("fa-play")) {
3039
  wdi_play();
3040
  }
3041
  /*var i = 0;
3042
+ jQuery(".wdi_slider").children("span").each(function () {
3043
+ if (jQuery(this).css('opacity') == 1) {
3044
+ jQuery("#wdi_current_image_key").val(i);
3045
+ }
3046
+ i++;
3047
+ });*/
3048
  });
3049
  jQuery(window).blur(function() {
3050
  event_stack = [];
3055
  <?php
3056
  die();
3057
  }
3058
+
3059
  ////////////////////////////////////////////////////////////////////////////////////////
3060
  // Getters & Setters //
3061
  ////////////////////////////////////////////////////////////////////////////////////////
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
4
  Tags: : custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, Instagram wall, lightbox, photos
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
- Stable tag: 1.1.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,10 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
107
 
108
  == Changelog ==
109
 
 
 
 
 
110
  = 1.1.20 =
111
  New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
112
 
4
  Tags: : custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, Instagram wall, lightbox, photos
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.1.21 =
111
+ New: Three new plugins added to featured plugins list: Ad Manager WD, Youtube WD and Staff Team WD
112
+ Fixed: Colors and opacities of share buttons in lightbox (PRO)
113
+
114
  = 1.1.20 =
115
  New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
116
 
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Instagram Feed WD
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
- Version: 1.1.20
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
@@ -20,7 +20,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
20
  //define("wdi",'wdi');
21
  define('WDI_FEED_TABLE','wdi_feeds');
22
  define('WDI_THEME_TABLE','wdi_themes');
23
- define('WDI_VERSION','1.1.20');
24
  define('WDI_IS_PRO','false');
25
 
26
 
3
  Plugin Name: Instagram Feed WD
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
+ Version: 1.1.21
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
20
  //define("wdi",'wdi');
21
  define('WDI_FEED_TABLE','wdi_feeds');
22
  define('WDI_THEME_TABLE','wdi_themes');
23
+ define('WDI_VERSION','1.1.21');
24
  define('WDI_IS_PRO','false');
25
 
26