Visual Portfolio, Photo Gallery & Post Grid - Version 1.14.1

Version Description

Download this release

Release Info

Developer nko
Plugin Icon 128x128 Visual Portfolio, Photo Gallery & Post Grid
Version 1.14.1
Comparing to
See all releases

Code changes from version 1.14.0 to 1.14.1

assets/admin/js/layouts-editor.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 1.14.0
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.14.1
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
assets/admin/js/mce-dropdown.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 1.14.0
4
  * Author : nK https://nkdev.info
5
  */
6
  const {
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.14.1
4
  * Author : nK https://nkdev.info
5
  */
6
  const {
assets/admin/js/script.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 1.14.0
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.14.1
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
assets/admin/js/vc-frontend.js CHANGED
@@ -2,7 +2,7 @@
2
  * Additional js for frontend VC
3
  *
4
  * Name : Visual Portfolio
5
- * Version : 1.14.0
6
  * Author : nK https://nkdev.info
7
  */
8
  const {
2
  * Additional js for frontend VC
3
  *
4
  * Name : Visual Portfolio
5
+ * Version : 1.14.1
6
  * Author : nK https://nkdev.info
7
  */
8
  const {
assets/js/plugin-fancybox.js CHANGED
@@ -191,8 +191,12 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
191
  },
192
  };
193
 
 
 
194
  // Start new fancybox instance
195
  fancyboxInstance = $.fancybox.open( items, options, index );
 
 
196
  };
197
 
198
  // click action
@@ -233,7 +237,13 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
233
  VP.prototype.destroyFancybox = function() {
234
  const self = this;
235
 
 
 
 
 
236
  self.$item.off( `click.vpf-uid-${ self.uid }` );
 
 
237
  };
238
  } );
239
 
191
  },
192
  };
193
 
194
+ self.emitEvent( 'beforeInitFancybox', [ options, items, index ] );
195
+
196
  // Start new fancybox instance
197
  fancyboxInstance = $.fancybox.open( items, options, index );
198
+
199
+ self.emitEvent( 'initFancybox', [ options, items, index ] );
200
  };
201
 
202
  // click action
237
  VP.prototype.destroyFancybox = function() {
238
  const self = this;
239
 
240
+ if ( typeof $.fancybox === 'undefined' || ! self.options.itemsClickAction || self.options.itemsClickAction !== 'popup_gallery' || 'fancybox' !== settingsPopupGallery.vendor ) {
241
+ return;
242
+ }
243
+
244
  self.$item.off( `click.vpf-uid-${ self.uid }` );
245
+
246
+ self.emitEvent( 'destroyFancybox' );
247
  };
248
  } );
249
 
assets/js/plugin-fancybox.min.js CHANGED
@@ -1 +1 @@
1
- !function(o){var t={};function e(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return o[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=o,e.c=t,e.d=function(o,t,n){e.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:n})},e.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,t){if(1&t&&(o=e(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var i in o)e.d(n,i,function(t){return o[t]}.bind(null,i));return n},e.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(t,"a",t),t},e.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},e.p="",e(e.s=22)}({22:function(o,t,e){o.exports=e(23)},23:function(o,t){var e=window.jQuery,n=window.VPData,i=n.__,r=n.settingsPopupGallery,p=e(window);e(document).on("extendClass.vpf",function(o,t){"vpf"===o.namespace&&(t.prototype.initFancybox=function(){var o,t=this;if(void 0!==e.fancybox&&t.options.itemsClickAction&&"popup_gallery"===t.options.itemsClickAction&&"fancybox"===r.vendor&&!t.isPreview()){var n=function(n,p){var a=function(o){var n,i,r,p,a,s,c=e(o).find(".vp-portfolio__item-wrap"),u=[];return c.each(function(){if((n=e(this).find(".vp-portfolio__item-popup"))&&n.length){if(i=(n.attr("data-vp-popup-img-size")||"1920x1080").split("x"),r="1920x1080".split("x"),a=n.attr("data-vp-popup-video"),s=!1,a&&(s=t.parseVideo(a)),s)p={type:"iframe",src:s.embedUrl,opts:{width:parseInt(r[0],10),height:parseInt(r[1],10)}};else{p={type:"image",src:n.attr("data-vp-popup-img"),opts:{width:parseInt(i[0],10),height:parseInt(i[1],10),srcset:n.attr("data-vp-popup-img-srcset")}};var o=n.children(".vp-portfolio__item-popup-title").get(0),c=n.children(".vp-portfolio__item-popup-description").get(0);(o||c)&&(p.opts.caption=(o?o.outerHTML:"")+(c?c.outerHTML:"")),p.el=this;var f=n.attr("data-vp-popup-sm-img")||p.src;f&&(p.opts.thumb=f)}u.push(p)}}),u}(p),s=[];r.show_zoom_button&&s.push("zoom"),r.show_fullscreen_button&&s.push("fullScreen"),r.show_slideshow&&s.push("slideShow"),r.show_thumbs&&s.push("thumbs"),r.show_share_button&&s.push("share"),r.show_download_button&&s.push("download"),r.show_close_button&&s.push("close");var c={closeExisting:!0,loop:!0,arrows:r.show_arrows,infobar:r.show_counter,smallBtn:!1,toolbar:"auto",buttons:s,baseClass:"vp-fancybox",hideScrollbar:!1,wheel:!1,lang:"wordpress",i18n:{wordpress:{CLOSE:i.fancybox_close,NEXT:i.fancybox_next,PREV:i.fancybox_prev,ERROR:i.fancybox_error,PLAY_START:i.fancybox_play_start,PLAY_STOP:i.fancybox_play_stop,FULL_SCREEN:i.fancybox_full_screen,THUMBS:i.fancybox_thumbs,DOWNLOAD:i.fancybox_download,SHARE:i.fancybox_share,ZOOM:i.fancybox_zoom}},beforeClose:function(){o=!1}};o=e.fancybox.open(a,c,n)};t.$item.on("click.vpf-uid-".concat(t.uid),".vp-portfolio__item",function(o){if(e(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){o.preventDefault();var i=-1,r=this;t.$item.find(".vp-portfolio__item-wrap .vp-portfolio__item-popup").each(function(o){-1===i&&e(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===r&&(i=o)}),i<0&&(i=0),n(i,t.$item[0])}}),p.on("scroll.vpf-uid-".concat(t.uid),function(){o&&(o.close(),o=!1)})}},t.prototype.destroyFancybox=function(){this.$item.off("click.vpf-uid-".concat(this.uid))})}),e(document).on("init.vpf",function(o,t){"vpf"===o.namespace&&t.initFancybox()}),e(document).on("destroy.vpf",function(o,t){"vpf"===o.namespace&&t.destroyFancybox()})}});
1
+ !function(o){var t={};function e(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return o[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=o,e.c=t,e.d=function(o,t,n){e.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:n})},e.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,t){if(1&t&&(o=e(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var i in o)e.d(n,i,function(t){return o[t]}.bind(null,i));return n},e.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(t,"a",t),t},e.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},e.p="",e(e.s=22)}({22:function(o,t,e){o.exports=e(23)},23:function(o,t){var e=window.jQuery,n=window.VPData,i=n.__,r=n.settingsPopupGallery,p=e(window);e(document).on("extendClass.vpf",function(o,t){"vpf"===o.namespace&&(t.prototype.initFancybox=function(){var o,t=this;if(void 0!==e.fancybox&&t.options.itemsClickAction&&"popup_gallery"===t.options.itemsClickAction&&"fancybox"===r.vendor&&!t.isPreview()){var n=function(n,p){var s=function(o){var n,i,r,p,s,a,c=e(o).find(".vp-portfolio__item-wrap"),u=[];return c.each(function(){if((n=e(this).find(".vp-portfolio__item-popup"))&&n.length){if(i=(n.attr("data-vp-popup-img-size")||"1920x1080").split("x"),r="1920x1080".split("x"),s=n.attr("data-vp-popup-video"),a=!1,s&&(a=t.parseVideo(s)),a)p={type:"iframe",src:a.embedUrl,opts:{width:parseInt(r[0],10),height:parseInt(r[1],10)}};else{p={type:"image",src:n.attr("data-vp-popup-img"),opts:{width:parseInt(i[0],10),height:parseInt(i[1],10),srcset:n.attr("data-vp-popup-img-srcset")}};var o=n.children(".vp-portfolio__item-popup-title").get(0),c=n.children(".vp-portfolio__item-popup-description").get(0);(o||c)&&(p.opts.caption=(o?o.outerHTML:"")+(c?c.outerHTML:"")),p.el=this;var f=n.attr("data-vp-popup-sm-img")||p.src;f&&(p.opts.thumb=f)}u.push(p)}}),u}(p),a=[];r.show_zoom_button&&a.push("zoom"),r.show_fullscreen_button&&a.push("fullScreen"),r.show_slideshow&&a.push("slideShow"),r.show_thumbs&&a.push("thumbs"),r.show_share_button&&a.push("share"),r.show_download_button&&a.push("download"),r.show_close_button&&a.push("close");var c={closeExisting:!0,loop:!0,arrows:r.show_arrows,infobar:r.show_counter,smallBtn:!1,toolbar:"auto",buttons:a,baseClass:"vp-fancybox",hideScrollbar:!1,wheel:!1,lang:"wordpress",i18n:{wordpress:{CLOSE:i.fancybox_close,NEXT:i.fancybox_next,PREV:i.fancybox_prev,ERROR:i.fancybox_error,PLAY_START:i.fancybox_play_start,PLAY_STOP:i.fancybox_play_stop,FULL_SCREEN:i.fancybox_full_screen,THUMBS:i.fancybox_thumbs,DOWNLOAD:i.fancybox_download,SHARE:i.fancybox_share,ZOOM:i.fancybox_zoom}},beforeClose:function(){o=!1}};t.emitEvent("beforeInitFancybox",[c,s,n]),o=e.fancybox.open(s,c,n),t.emitEvent("initFancybox",[c,s,n])};t.$item.on("click.vpf-uid-".concat(t.uid),".vp-portfolio__item",function(o){if(e(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){o.preventDefault();var i=-1,r=this;t.$item.find(".vp-portfolio__item-wrap .vp-portfolio__item-popup").each(function(o){-1===i&&e(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===r&&(i=o)}),i<0&&(i=0),n(i,t.$item[0])}}),p.on("scroll.vpf-uid-".concat(t.uid),function(){o&&(o.close(),o=!1)})}},t.prototype.destroyFancybox=function(){void 0!==e.fancybox&&this.options.itemsClickAction&&"popup_gallery"===this.options.itemsClickAction&&"fancybox"===r.vendor&&(this.$item.off("click.vpf-uid-".concat(this.uid)),this.emitEvent("destroyFancybox"))})}),e(document).on("init.vpf",function(o,t){"vpf"===o.namespace&&t.initFancybox()}),e(document).on("destroy.vpf",function(o,t){"vpf"===o.namespace&&t.destroyFancybox()})}});
assets/js/plugin-photoswipe.js CHANGED
@@ -274,6 +274,8 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
274
  options.showAnimationDuration = 0;
275
  }
276
 
 
 
277
  // Pass data to PhotoSwipe and initialize it
278
  const gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options );
279
 
@@ -370,6 +372,8 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
370
  } );
371
 
372
  gallery.init();
 
 
373
  };
374
 
375
  const photoswipeParseHash = function() {
@@ -431,9 +435,15 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
431
  VP.prototype.destroyPhotoswipe = function() {
432
  const self = this;
433
 
 
 
 
 
434
  self.$item.off( `click.vpf-uid-${ self.uid }` );
435
 
436
  $( `.vp-pswp-uid-${ self.uid }` ).remove();
 
 
437
  };
438
  } );
439
 
274
  options.showAnimationDuration = 0;
275
  }
276
 
277
+ self.emitEvent( 'beforeInitPhotoSwipe', [ options, items, index ] );
278
+
279
  // Pass data to PhotoSwipe and initialize it
280
  const gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options );
281
 
372
  } );
373
 
374
  gallery.init();
375
+
376
+ self.emitEvent( 'initPhotoSwipe', [ options, items, index ] );
377
  };
378
 
379
  const photoswipeParseHash = function() {
435
  VP.prototype.destroyPhotoswipe = function() {
436
  const self = this;
437
 
438
+ if ( typeof PhotoSwipe === 'undefined' || ! self.options.itemsClickAction || self.options.itemsClickAction !== 'popup_gallery' || 'photoswipe' !== settingsPopupGallery.vendor ) {
439
+ return;
440
+ }
441
+
442
  self.$item.off( `click.vpf-uid-${ self.uid }` );
443
 
444
  $( `.vp-pswp-uid-${ self.uid }` ).remove();
445
+
446
+ self.emitEvent( 'destroyPhotoSwipe' );
447
  };
448
  } );
449
 
assets/js/plugin-photoswipe.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}({28:function(t,e,i){t.exports=i(29)},29:function(t,e){var i=window.jQuery,o=window,n=o.VPData,p=o.PhotoSwipe,s=o.PhotoSwipeUI_Default,r=n.__,a=n.settingsPopupGallery;i(document).on("extendClass.vpf",function(t,e){"vpf"===t.namespace&&(e.prototype.initPhotoswipe=function(){var t=this;if(void 0!==p&&t.options.itemsClickAction&&"popup_gallery"===t.options.itemsClickAction&&"photoswipe"===a.vendor&&!t.isPreview()){if(!i(".vp-pswp").length){var e='\n <div class="pswp vp-pswp vp-pswp-uid-'.concat(t.uid,'" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="pswp__bg"></div>\n <div class="pswp__scroll-wrap">\n <div class="pswp__container">\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n </div>\n <div class="pswp__ui pswp__ui--hidden">\n <div class="pswp__top-bar">\n <div class="pswp__counter"></div>\n <button class="pswp__button pswp__button--close" title="').concat(r.pswp_close,'"></button>\n <button class="pswp__button pswp__button--share" title="').concat(r.pswp_share,'"></button>\n <button class="pswp__button pswp__button--fs" title="').concat(r.pswp_fs,'"></button>\n <button class="pswp__button pswp__button--zoom" title="').concat(r.pswp_zoom,'"></button>\n </div>\n <div class="pswp__preloader">\n <div class="pswp__preloader__icn">\n <div class="pswp__preloader__cut">\n <div class="pswp__preloader__donut"></div>\n </div>\n </div>\n </div>\n <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\n <div class="pswp__share-tooltip"></div>\n </div>\n <button class="pswp__button pswp__button--arrow--left" title="').concat(r.pswp_prev,'"></button>\n <button class="pswp__button pswp__button--arrow--right" title="').concat(r.pswp_next,'"></button>\n <div class="pswp__caption">\n <div class="pswp__caption__center"></div>\n </div>\n </div>\n </div>\n </div>\n ');i("body").append(e)}var o=function(e,o,n,c){var d=i(".vp-pswp"),u=d[0],_=function(e){var o,n,p,s,r,a,l=i(e).find(".vp-portfolio__item-wrap"),c=[];return l.each(function(){if((o=i(this).find(".vp-portfolio__item-popup"))&&o.length){if(n=(o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),p="1920x1080".split("x"),r=o.attr("data-vp-popup-video"),a=!1,r&&(a=t.parseVideo(r)),a)s={html:'<div class="vp-pswp-video"><div>'.concat(a.embed,"</div></div>"),vw:parseInt(p[0],10),vh:parseInt(p[1],10)};else{s={src:o.attr("data-vp-popup-img"),w:parseInt(n[0],10),h:parseInt(n[1],10)};var e=o.children(".vp-portfolio__item-popup-title").get(0),l=o.children(".vp-portfolio__item-popup-description").get(0);(e||l)&&(s.title=(e?e.outerHTML:"")+(l?l.outerHTML:"")),s.el=this;var d=o.attr("data-vp-popup-md-img")||s.src;d&&(n=(o.attr("data-vp-popup-md-img-size")||o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),s.m={src:d,w:parseInt(n[0],10),h:parseInt(n[1],10)},s.msrc=d),s.o={src:s.src,w:s.w,h:s.h}}c.push(s)}}),c}(o),v={captionAndToolbarShowEmptyCaptions:!1,closeEl:a.show_close_button,captionEl:!0,fullscreenEl:a.show_fullscreen_button,zoomEl:a.show_zoom_button,shareEl:a.show_share_button,counterEl:a.show_counter,arrowEl:a.show_arrows,shareButtons:[{id:"facebook",label:r.pswp_share_fb,url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:r.pswp_share_tw,url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:r.pswp_share_pin,url:"https://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"}],bgOpacity:1,tapToClose:!1,tapToToggleControls:!0,showHideOpacity:!0,galleryUID:t.uid,getThumbBoundsFn:function(t){if(!_[t]||!_[t].el)return!1;var e=i(_[t].el).find("img")[0];if(!e)return!1;var o=e.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,p=parseFloat(d.css("top"))||0;return{x:o.left,y:o.top+n-p,w:o.width,h:o.height}}};if(c)if(v.galleryPIDs){for(var f=0;f<_.length;f++)if(_[f].pid===e){v.index=f;break}}else v.index=parseInt(e,10)-1;else v.index=parseInt(e,10);if(!isNaN(v.index)){n&&(v.showAnimationDuration=0);var w,h,m=new p(u,s,_,v),b=!1,g=!0;m.listen("beforeResize",function(){w=m.viewportSize.x*window.devicePixelRatio,b&&w<1e3?(b=!1,h=!0):!b&&w>=1e3&&(b=!0,h=!0),h&&!g&&m.invalidateCurrItems(),g&&(g=!1),h=!1}),m.listen("gettingData",function(t,e){e.html||(b?(e.src=e.o.src,e.w=e.o.w,e.h=e.o.h):(e.src=e.m.src,e.w=e.m.w,e.h=e.m.h))}),m.listen("resize",function(){l(this)}),m.listen("afterChange",function(){l(this)}),m.listen("beforeChange",function(){if(this&&this.itemHolders.length){var t=this.getCurrentIndex();this.itemHolders.forEach(function(e){if(e.el&&e.index!==t){var o=i(e.el).find(".vp-pswp-video iframe");o.length&&o.attr("src",o.attr("src"))}})}}),m.listen("destroy",function(){this&&this.itemHolders.length&&this.itemHolders.forEach(function(t){t.el&&i(t.el).find(".vp-pswp-video").remove()})}),m.init()}};t.$item.on("click.vpf-uid-".concat(t.uid),".vp-portfolio__item",function(e){if(i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){e.preventDefault();var n=-1,p=this;t.$item.find(".vp-portfolio__item-wrap .vp-portfolio__item-popup").each(function(t){-1===n&&i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===p&&(n=t)}),n<0&&(n=0),o(n,t.$item[0])}});var n=function(){var t=window.location.hash.substring(1),e={};if(t.length<5)return e;for(var i=t.split("&"),o=0;o<i.length;o++)if(i[o]){var n=i[o].split("=");n.length<2||(e[n[0]]=n[1])}return e}();n.pid&&n.gid===t.uid&&o(n.pid,t.$item[0],!0,!0)}function l(t,e){if(void 0!==e){var o,n=t.viewportSize.x,p=t.viewportSize.y,s=e.vw/e.vh,r=i(e.container),a=t.options.barsSize,c=0,d=0;a&&(c=a.top&&"auto"!==a.top?a.top:0,d=a.bottom&&"auto"!==a.bottom?a.bottom:0),o=s>n/(p-=c+d)?n:p*s,r.find(".vp-pswp-video").css("max-width",o),r.css({top:c,bottom:d})}else t&&t.itemHolders.length&&t.itemHolders.forEach(function(e){e.item&&e.item.html&&l(t,e.item)})}},e.prototype.destroyPhotoswipe=function(){this.$item.off("click.vpf-uid-".concat(this.uid)),i(".vp-pswp-uid-".concat(this.uid)).remove()})}),i(document).on("init.vpf",function(t,e){"vpf"===t.namespace&&e.initPhotoswipe()}),i(document).on("destroy.vpf",function(t,e){"vpf"===t.namespace&&e.destroyPhotoswipe()})}});
1
+ !function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}({28:function(t,e,i){t.exports=i(29)},29:function(t,e){var i=window.jQuery,o=window,n=o.VPData,p=o.PhotoSwipe,s=o.PhotoSwipeUI_Default,r=n.__,a=n.settingsPopupGallery;i(document).on("extendClass.vpf",function(t,e){"vpf"===t.namespace&&(e.prototype.initPhotoswipe=function(){var t=this;if(void 0!==p&&t.options.itemsClickAction&&"popup_gallery"===t.options.itemsClickAction&&"photoswipe"===a.vendor&&!t.isPreview()){if(!i(".vp-pswp").length){var e='\n <div class="pswp vp-pswp vp-pswp-uid-'.concat(t.uid,'" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="pswp__bg"></div>\n <div class="pswp__scroll-wrap">\n <div class="pswp__container">\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n </div>\n <div class="pswp__ui pswp__ui--hidden">\n <div class="pswp__top-bar">\n <div class="pswp__counter"></div>\n <button class="pswp__button pswp__button--close" title="').concat(r.pswp_close,'"></button>\n <button class="pswp__button pswp__button--share" title="').concat(r.pswp_share,'"></button>\n <button class="pswp__button pswp__button--fs" title="').concat(r.pswp_fs,'"></button>\n <button class="pswp__button pswp__button--zoom" title="').concat(r.pswp_zoom,'"></button>\n </div>\n <div class="pswp__preloader">\n <div class="pswp__preloader__icn">\n <div class="pswp__preloader__cut">\n <div class="pswp__preloader__donut"></div>\n </div>\n </div>\n </div>\n <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\n <div class="pswp__share-tooltip"></div>\n </div>\n <button class="pswp__button pswp__button--arrow--left" title="').concat(r.pswp_prev,'"></button>\n <button class="pswp__button pswp__button--arrow--right" title="').concat(r.pswp_next,'"></button>\n <div class="pswp__caption">\n <div class="pswp__caption__center"></div>\n </div>\n </div>\n </div>\n </div>\n ');i("body").append(e)}var o=function(e,o,n,c){var d=i(".vp-pswp"),u=d[0],v=function(e){var o,n,p,s,r,a,l=i(e).find(".vp-portfolio__item-wrap"),c=[];return l.each(function(){if((o=i(this).find(".vp-portfolio__item-popup"))&&o.length){if(n=(o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),p="1920x1080".split("x"),r=o.attr("data-vp-popup-video"),a=!1,r&&(a=t.parseVideo(r)),a)s={html:'<div class="vp-pswp-video"><div>'.concat(a.embed,"</div></div>"),vw:parseInt(p[0],10),vh:parseInt(p[1],10)};else{s={src:o.attr("data-vp-popup-img"),w:parseInt(n[0],10),h:parseInt(n[1],10)};var e=o.children(".vp-portfolio__item-popup-title").get(0),l=o.children(".vp-portfolio__item-popup-description").get(0);(e||l)&&(s.title=(e?e.outerHTML:"")+(l?l.outerHTML:"")),s.el=this;var d=o.attr("data-vp-popup-md-img")||s.src;d&&(n=(o.attr("data-vp-popup-md-img-size")||o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),s.m={src:d,w:parseInt(n[0],10),h:parseInt(n[1],10)},s.msrc=d),s.o={src:s.src,w:s.w,h:s.h}}c.push(s)}}),c}(o),_={captionAndToolbarShowEmptyCaptions:!1,closeEl:a.show_close_button,captionEl:!0,fullscreenEl:a.show_fullscreen_button,zoomEl:a.show_zoom_button,shareEl:a.show_share_button,counterEl:a.show_counter,arrowEl:a.show_arrows,shareButtons:[{id:"facebook",label:r.pswp_share_fb,url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:r.pswp_share_tw,url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:r.pswp_share_pin,url:"https://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"}],bgOpacity:1,tapToClose:!1,tapToToggleControls:!0,showHideOpacity:!0,galleryUID:t.uid,getThumbBoundsFn:function(t){if(!v[t]||!v[t].el)return!1;var e=i(v[t].el).find("img")[0];if(!e)return!1;var o=e.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,p=parseFloat(d.css("top"))||0;return{x:o.left,y:o.top+n-p,w:o.width,h:o.height}}};if(c)if(_.galleryPIDs){for(var w=0;w<v.length;w++)if(v[w].pid===e){_.index=w;break}}else _.index=parseInt(e,10)-1;else _.index=parseInt(e,10);if(!isNaN(_.index)){n&&(_.showAnimationDuration=0),t.emitEvent("beforeInitPhotoSwipe",[_,v,e]);var f,h,m=new p(u,s,v,_),b=!1,g=!0;m.listen("beforeResize",function(){f=m.viewportSize.x*window.devicePixelRatio,b&&f<1e3?(b=!1,h=!0):!b&&f>=1e3&&(b=!0,h=!0),h&&!g&&m.invalidateCurrItems(),g&&(g=!1),h=!1}),m.listen("gettingData",function(t,e){e.html||(b?(e.src=e.o.src,e.w=e.o.w,e.h=e.o.h):(e.src=e.m.src,e.w=e.m.w,e.h=e.m.h))}),m.listen("resize",function(){l(this)}),m.listen("afterChange",function(){l(this)}),m.listen("beforeChange",function(){if(this&&this.itemHolders.length){var t=this.getCurrentIndex();this.itemHolders.forEach(function(e){if(e.el&&e.index!==t){var o=i(e.el).find(".vp-pswp-video iframe");o.length&&o.attr("src",o.attr("src"))}})}}),m.listen("destroy",function(){this&&this.itemHolders.length&&this.itemHolders.forEach(function(t){t.el&&i(t.el).find(".vp-pswp-video").remove()})}),m.init(),t.emitEvent("initPhotoSwipe",[_,v,e])}};t.$item.on("click.vpf-uid-".concat(t.uid),".vp-portfolio__item",function(e){if(i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){e.preventDefault();var n=-1,p=this;t.$item.find(".vp-portfolio__item-wrap .vp-portfolio__item-popup").each(function(t){-1===n&&i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===p&&(n=t)}),n<0&&(n=0),o(n,t.$item[0])}});var n=function(){var t=window.location.hash.substring(1),e={};if(t.length<5)return e;for(var i=t.split("&"),o=0;o<i.length;o++)if(i[o]){var n=i[o].split("=");n.length<2||(e[n[0]]=n[1])}return e}();n.pid&&n.gid===t.uid&&o(n.pid,t.$item[0],!0,!0)}function l(t,e){if(void 0!==e){var o,n=t.viewportSize.x,p=t.viewportSize.y,s=e.vw/e.vh,r=i(e.container),a=t.options.barsSize,c=0,d=0;a&&(c=a.top&&"auto"!==a.top?a.top:0,d=a.bottom&&"auto"!==a.bottom?a.bottom:0),o=s>n/(p-=c+d)?n:p*s,r.find(".vp-pswp-video").css("max-width",o),r.css({top:c,bottom:d})}else t&&t.itemHolders.length&&t.itemHolders.forEach(function(e){e.item&&e.item.html&&l(t,e.item)})}},e.prototype.destroyPhotoswipe=function(){void 0!==p&&this.options.itemsClickAction&&"popup_gallery"===this.options.itemsClickAction&&"photoswipe"===a.vendor&&(this.$item.off("click.vpf-uid-".concat(this.uid)),i(".vp-pswp-uid-".concat(this.uid)).remove(),this.emitEvent("destroyPhotoSwipe"))})}),i(document).on("init.vpf",function(t,e){"vpf"===t.namespace&&e.initPhotoswipe()}),i(document).on("destroy.vpf",function(t,e){"vpf"===t.namespace&&e.destroyPhotoswipe()})}});
assets/js/plugin-swiper.js CHANGED
@@ -42,21 +42,23 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
42
  }
43
 
44
  // calculate responsive.
45
- const slidesPerView = self.options.sliderSlidesPerView || 3;
46
  const breakPoints = {};
47
 
48
  if ( ! isNaN( slidesPerView ) ) {
49
- let count = slidesPerView - 1;
50
- let currentPoint = Math.min( screenSizes.length - 1, count );
51
 
52
  for ( ; currentPoint >= 0; currentPoint-- ) {
53
  if ( count > 0 && typeof screenSizes[ currentPoint ] !== 'undefined' ) {
54
- breakPoints[ screenSizes[ currentPoint ] ] = {
55
  slidesPerView: count,
56
  };
57
  }
58
  count -= 1;
59
  }
 
 
60
  }
61
 
62
  options = options || {
@@ -87,6 +89,9 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
87
  mousewheel: self.options.sliderMousewheel === 'true',
88
  slidesPerView: slidesPerView,
89
  breakpoints: breakPoints,
 
 
 
90
  keyboard: true,
91
  grabCursor: true,
92
  };
@@ -126,21 +131,23 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
126
  self.$slider_thumbnails_wrap.children().addClass( 'swiper-slide' );
127
 
128
  // calculate responsive.
129
- const thumbnailsPerView = self.options.sliderThumbnailsPerView || 8;
130
  const thumbnailsBreakPoints = {};
131
 
132
  if ( ! isNaN( thumbnailsPerView ) ) {
133
- let count = thumbnailsPerView - 1;
134
- let currentPoint = Math.min( screenSizes.length - 1, count );
135
 
136
  for ( ; currentPoint >= 0; currentPoint-- ) {
137
  if ( count > 0 && typeof screenSizes[ currentPoint ] !== 'undefined' ) {
138
- thumbnailsBreakPoints[ screenSizes[ currentPoint ] ] = {
139
  slidesPerView: count,
140
  };
141
  }
142
  count -= 1;
143
  }
 
 
144
  }
145
 
146
  const swiperThumbs = new window.Swiper( $thumbsParent[ 0 ], {
@@ -153,6 +160,9 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
153
  loopedSlides: 5,
154
  slidesPerView: thumbnailsPerView,
155
  breakpoints: thumbnailsBreakPoints,
 
 
 
156
  keyboard: true,
157
  grabCursor: true,
158
  watchSlidesVisibility: true,
42
  }
43
 
44
  // calculate responsive.
45
+ let slidesPerView = self.options.sliderSlidesPerView || 3;
46
  const breakPoints = {};
47
 
48
  if ( ! isNaN( slidesPerView ) ) {
49
+ let count = slidesPerView;
50
+ let currentPoint = Math.min( screenSizes.length - 1, count - 1 );
51
 
52
  for ( ; currentPoint >= 0; currentPoint-- ) {
53
  if ( count > 0 && typeof screenSizes[ currentPoint ] !== 'undefined' ) {
54
+ breakPoints[ screenSizes[ currentPoint ] + 1 ] = {
55
  slidesPerView: count,
56
  };
57
  }
58
  count -= 1;
59
  }
60
+
61
+ slidesPerView = count || 1;
62
  }
63
 
64
  options = options || {
89
  mousewheel: self.options.sliderMousewheel === 'true',
90
  slidesPerView: slidesPerView,
91
  breakpoints: breakPoints,
92
+ // Since Swiper 5.0 this option is removed and it is `true` by default, but in older versions it was `false`.
93
+ // So we need to keep it as a fallback.
94
+ breakpointsInverse: true,
95
  keyboard: true,
96
  grabCursor: true,
97
  };
131
  self.$slider_thumbnails_wrap.children().addClass( 'swiper-slide' );
132
 
133
  // calculate responsive.
134
+ let thumbnailsPerView = self.options.sliderThumbnailsPerView || 8;
135
  const thumbnailsBreakPoints = {};
136
 
137
  if ( ! isNaN( thumbnailsPerView ) ) {
138
+ let count = thumbnailsPerView;
139
+ let currentPoint = Math.min( screenSizes.length - 1, count - 1 );
140
 
141
  for ( ; currentPoint >= 0; currentPoint-- ) {
142
  if ( count > 0 && typeof screenSizes[ currentPoint ] !== 'undefined' ) {
143
+ thumbnailsBreakPoints[ screenSizes[ currentPoint ] + 1 ] = {
144
  slidesPerView: count,
145
  };
146
  }
147
  count -= 1;
148
  }
149
+
150
+ thumbnailsPerView = count || 1;
151
  }
152
 
153
  const swiperThumbs = new window.Swiper( $thumbsParent[ 0 ], {
160
  loopedSlides: 5,
161
  slidesPerView: thumbnailsPerView,
162
  breakpoints: thumbnailsBreakPoints,
163
+ // Since Swiper 5.0 this option is removed and it is `true` by default, but in older versions it was `false`.
164
+ // So we need to keep it as a fallback.
165
+ breakpointsInverse: true,
166
  keyboard: true,
167
  grabCursor: true,
168
  watchSlidesVisibility: true,
assets/js/plugin-swiper.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var i={};function t(s){if(i[s])return i[s].exports;var r=i[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:s})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var r in e)t.d(s,r,function(i){return e[i]}.bind(null,r));return s},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=30)}({30:function(e,i,t){e.exports=t(31)},31:function(e,i){var t=window.jQuery,s=window.VPData.screenSizes;t(document).on("extendClass.vpf",function(e,i){"vpf"===e.namespace&&(i.prototype.initSwiper=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("slider"===this.options.layout&&void 0!==window.Swiper){var i=this.$items_wrap.parent();i.addClass("swiper-container"),this.$items_wrap.addClass("swiper-wrapper"),this.$items_wrap.children().addClass("swiper-slide"),"true"!==this.options.sliderArrows||i.find(".vp-portfolio__items-arrow").length||i.append('\n <div class="vp-portfolio__items-arrow vp-portfolio__items-arrow-prev"><span class="'.concat(this.options.sliderArrowsIconPrev,'"></span></div>\n <div class="vp-portfolio__items-arrow vp-portfolio__items-arrow-next"><span class="').concat(this.options.sliderArrowsIconNext,'"></span></div>\n ')),"true"!==this.options.sliderBullets||i.find(".vp-portfolio__items-bullets").length||i.append('<div class="vp-portfolio__items-bullets"></div>');var t=this.options.sliderSlidesPerView||3,r={};if(!isNaN(t))for(var o=t-1,n=Math.min(s.length-1,o);n>=0;n--)o>0&&void 0!==s[n]&&(r[s[n]]={slidesPerView:o}),o-=1;"fade"===(e=e||{speed:1e3*(parseFloat(this.options.sliderSpeed)||0),autoHeight:"auto"===this.options.sliderItemsHeight,effect:this.options.sliderEffect||"slide",spaceBetween:parseFloat(this.options.itemsGap)||0,centeredSlides:"true"===this.options.sliderCenteredSlides,freeMode:"true"===this.options.sliderFreeMode,freeModeSticky:"true"===this.options.sliderFreeModeSticky,loop:"true"===this.options.sliderLoop,autoplay:parseFloat(this.options.sliderAutoplay)>0&&{delay:1e3*parseFloat(this.options.sliderAutoplay),disableOnInteraction:!1},navigation:"true"===this.options.sliderArrows&&{nextEl:".vp-portfolio__items-arrow-next",prevEl:".vp-portfolio__items-arrow-prev"},pagination:"true"===this.options.sliderBullets&&{el:".vp-portfolio__items-bullets",clickable:!0,dynamicBullets:"true"===this.options.sliderBulletsDynamic,renderBullet:function(e,i){return'<span class="'.concat(i,'" data-bullet-index="').concat(e,'" data-bullet-number="').concat(e+1,'"></span>')}},mousewheel:"true"===this.options.sliderMousewheel,slidesPerView:t,breakpoints:r,keyboard:!0,grabCursor:!0}).effect&&(e.fadeEffect={crossFade:!0}),0===e.speed&&(e.speed=1);var a=0;if(e.on={transitionEnd:function(){0===a?(a=1,this.setTransition(1),this.setTranslate(this.translate+.1)):1===a&&(a=2,this.slideReset())}},this.emitEvent("beforeInitSwiper",[e]),this.$slider_thumbnails_wrap.length){var p=this.$slider_thumbnails_wrap.parent();p.addClass("swiper-container"),this.$slider_thumbnails_wrap.addClass("swiper-wrapper"),this.$slider_thumbnails_wrap.children().addClass("swiper-slide");var l=this.options.sliderThumbnailsPerView||8,d={};if(!isNaN(l))for(var u=l-1,c=Math.min(s.length-1,u);c>=0;c--)u>0&&void 0!==s[c]&&(d[s[c]]={slidesPerView:u}),u-=1;var h=new window.Swiper(p[0],{autoHeight:"auto"===this.options.sliderThumbnailsHeight,effect:"slide",spaceBetween:parseFloat(this.options.sliderThumbnailsGap)||0,loop:!1,freeMode:!0,freeModeSticky:!0,loopedSlides:5,slidesPerView:l,breakpoints:d,keyboard:!0,grabCursor:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0});e.thumbs={swiper:h}}new window.Swiper(i[0],e),"true"===this.options.sliderAutoplayHoverPause&&parseFloat(this.options.sliderAutoplay)>0&&(this.$item.on("mouseenter.vpf-uid-".concat(this.uid),".swiper-container",function(){i[0].swiper.autoplay.stop()}),this.$item.on("mouseleave.vpf-uid-".concat(this.uid),".swiper-container",function(){i[0].swiper.autoplay.start()})),this.emitEvent("initSwiper",[e])}},i.prototype.destroySwiper=function(){var e=this.$items_wrap.parent(),i=!!this.$slider_thumbnails_wrap.length&&this.$slider_thumbnails_wrap.parent(),t=e[0].swiper,s=!!i&&i[0].swiper,r=!1;s&&(s.destroy(),i.removeClass("swiper-container"),this.$slider_thumbnails_wrap.removeClass("swiper-wrapper"),this.$slider_thumbnails_wrap.children().removeClass("swiper-slide"),r=!0),t&&(t.destroy(),e.removeClass("swiper-container"),this.$items_wrap.removeClass("swiper-wrapper"),this.$items_wrap.children().removeClass("swiper-slide"),e.find(".vp-portfolio__items-arrow, .vp-portfolio__items-bullets").remove(),r=!0),r&&this.emitEvent("destroySwiper")})}),t(document).on("addItems.vpf",function(e,i,t,s,r){if("vpf"===e.namespace){var o=i.$items_wrap.parent()[0].swiper;if(o){s&&o.removeAllSlides();var n=[];t.addClass("swiper-slide").each(function(){n.push(this)}),o.appendSlide(n);var a=!!i.$slider_thumbnails_wrap.length&&i.$slider_thumbnails_wrap.parent()[0].swiper;if(a){s&&a.removeAllSlides();var p=[];r.find(".vp-portfolio__thumbnails > .vp-portfolio__thumbnail-wrap").clone().addClass("swiper-slide").each(function(){p.push(this)}),a.appendSlide(p)}}}}),t(document).on("init.vpf",function(e,i){"vpf"===e.namespace&&i.initSwiper()}),t(document).on("destroy.vpf",function(e,i){"vpf"===e.namespace&&i.destroySwiper()})}});
1
+ !function(e){var i={};function t(s){if(i[s])return i[s].exports;var r=i[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:s})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var r in e)t.d(s,r,function(i){return e[i]}.bind(null,r));return s},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=30)}({30:function(e,i,t){e.exports=t(31)},31:function(e,i){var t=window.jQuery,s=window.VPData.screenSizes;t(document).on("extendClass.vpf",function(e,i){"vpf"===e.namespace&&(i.prototype.initSwiper=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("slider"===this.options.layout&&void 0!==window.Swiper){var i=this.$items_wrap.parent();i.addClass("swiper-container"),this.$items_wrap.addClass("swiper-wrapper"),this.$items_wrap.children().addClass("swiper-slide"),"true"!==this.options.sliderArrows||i.find(".vp-portfolio__items-arrow").length||i.append('\n <div class="vp-portfolio__items-arrow vp-portfolio__items-arrow-prev"><span class="'.concat(this.options.sliderArrowsIconPrev,'"></span></div>\n <div class="vp-portfolio__items-arrow vp-portfolio__items-arrow-next"><span class="').concat(this.options.sliderArrowsIconNext,'"></span></div>\n ')),"true"!==this.options.sliderBullets||i.find(".vp-portfolio__items-bullets").length||i.append('<div class="vp-portfolio__items-bullets"></div>');var t=this.options.sliderSlidesPerView||3,r={};if(!isNaN(t)){for(var o=t,n=Math.min(s.length-1,o-1);n>=0;n--)o>0&&void 0!==s[n]&&(r[s[n]+1]={slidesPerView:o}),o-=1;t=o||1}"fade"===(e=e||{speed:1e3*(parseFloat(this.options.sliderSpeed)||0),autoHeight:"auto"===this.options.sliderItemsHeight,effect:this.options.sliderEffect||"slide",spaceBetween:parseFloat(this.options.itemsGap)||0,centeredSlides:"true"===this.options.sliderCenteredSlides,freeMode:"true"===this.options.sliderFreeMode,freeModeSticky:"true"===this.options.sliderFreeModeSticky,loop:"true"===this.options.sliderLoop,autoplay:parseFloat(this.options.sliderAutoplay)>0&&{delay:1e3*parseFloat(this.options.sliderAutoplay),disableOnInteraction:!1},navigation:"true"===this.options.sliderArrows&&{nextEl:".vp-portfolio__items-arrow-next",prevEl:".vp-portfolio__items-arrow-prev"},pagination:"true"===this.options.sliderBullets&&{el:".vp-portfolio__items-bullets",clickable:!0,dynamicBullets:"true"===this.options.sliderBulletsDynamic,renderBullet:function(e,i){return'<span class="'.concat(i,'" data-bullet-index="').concat(e,'" data-bullet-number="').concat(e+1,'"></span>')}},mousewheel:"true"===this.options.sliderMousewheel,slidesPerView:t,breakpoints:r,breakpointsInverse:!0,keyboard:!0,grabCursor:!0}).effect&&(e.fadeEffect={crossFade:!0}),0===e.speed&&(e.speed=1);var a=0;if(e.on={transitionEnd:function(){0===a?(a=1,this.setTransition(1),this.setTranslate(this.translate+.1)):1===a&&(a=2,this.slideReset())}},this.emitEvent("beforeInitSwiper",[e]),this.$slider_thumbnails_wrap.length){var p=this.$slider_thumbnails_wrap.parent();p.addClass("swiper-container"),this.$slider_thumbnails_wrap.addClass("swiper-wrapper"),this.$slider_thumbnails_wrap.children().addClass("swiper-slide");var l=this.options.sliderThumbnailsPerView||8,d={};if(!isNaN(l)){for(var u=l,c=Math.min(s.length-1,u-1);c>=0;c--)u>0&&void 0!==s[c]&&(d[s[c]+1]={slidesPerView:u}),u-=1;l=u||1}var h=new window.Swiper(p[0],{autoHeight:"auto"===this.options.sliderThumbnailsHeight,effect:"slide",spaceBetween:parseFloat(this.options.sliderThumbnailsGap)||0,loop:!1,freeMode:!0,freeModeSticky:!0,loopedSlides:5,slidesPerView:l,breakpoints:d,breakpointsInverse:!0,keyboard:!0,grabCursor:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0});e.thumbs={swiper:h}}new window.Swiper(i[0],e),"true"===this.options.sliderAutoplayHoverPause&&parseFloat(this.options.sliderAutoplay)>0&&(this.$item.on("mouseenter.vpf-uid-".concat(this.uid),".swiper-container",function(){i[0].swiper.autoplay.stop()}),this.$item.on("mouseleave.vpf-uid-".concat(this.uid),".swiper-container",function(){i[0].swiper.autoplay.start()})),this.emitEvent("initSwiper",[e])}},i.prototype.destroySwiper=function(){var e=this.$items_wrap.parent(),i=!!this.$slider_thumbnails_wrap.length&&this.$slider_thumbnails_wrap.parent(),t=e[0].swiper,s=!!i&&i[0].swiper,r=!1;s&&(s.destroy(),i.removeClass("swiper-container"),this.$slider_thumbnails_wrap.removeClass("swiper-wrapper"),this.$slider_thumbnails_wrap.children().removeClass("swiper-slide"),r=!0),t&&(t.destroy(),e.removeClass("swiper-container"),this.$items_wrap.removeClass("swiper-wrapper"),this.$items_wrap.children().removeClass("swiper-slide"),e.find(".vp-portfolio__items-arrow, .vp-portfolio__items-bullets").remove(),r=!0),r&&this.emitEvent("destroySwiper")})}),t(document).on("addItems.vpf",function(e,i,t,s,r){if("vpf"===e.namespace){var o=i.$items_wrap.parent()[0].swiper;if(o){s&&o.removeAllSlides();var n=[];t.addClass("swiper-slide").each(function(){n.push(this)}),o.appendSlide(n);var a=!!i.$slider_thumbnails_wrap.length&&i.$slider_thumbnails_wrap.parent()[0].swiper;if(a){s&&a.removeAllSlides();var p=[];r.find(".vp-portfolio__thumbnails > .vp-portfolio__thumbnail-wrap").clone().addClass("swiper-slide").each(function(){p.push(this)}),a.appendSlide(p)}}}}),t(document).on("init.vpf",function(e,i){"vpf"===e.namespace&&i.initSwiper()}),t(document).on("destroy.vpf",function(e,i){"vpf"===e.namespace&&i.destroySwiper()})}});
assets/js/script-preview.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 1.14.0
4
  * Author : nK https://nkdev.info
5
  */
6
  ( function( $ ) {
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.14.1
4
  * Author : nK https://nkdev.info
5
  */
6
  ( function( $ ) {
class-visual-portfolio.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Visual Portfolio
4
  * Description: Portfolio post type with visual editor
5
- * Version: 1.14.0
6
  * Author: nK
7
  * Author URI: https://nkdev.info
8
  * License: GPLv2 or later
2
  /**
3
  * Plugin Name: Visual Portfolio
4
  * Description: Portfolio post type with visual editor
5
+ * Version: 1.14.1
6
  * Author: nK
7
  * Author URI: https://nkdev.info
8
  * License: GPLv2 or later
classes/class-admin.php CHANGED
@@ -152,13 +152,13 @@ class Visual_Portfolio_Admin {
152
  wp_enqueue_style( 'codemirror-addon-matchesonscrollbar', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/addon/search/matchesonscrollbar.css', '', $codemirror_version );
153
  wp_enqueue_style( 'codemirror-theme-eclipse', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/theme/eclipse.css', '', $codemirror_version );
154
 
155
- wp_enqueue_script( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/js/layouts-editor.min.js', array( 'jquery' ), '1.14.0', true );
156
- wp_enqueue_style( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/css/layouts-editor.min.css', '', '1.14.0' );
157
  wp_localize_script( 'visual-portfolio-layout-admin', 'VPAdminVariables', $data_init );
158
  }
159
 
160
- wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery' ), '1.14.0', true );
161
- wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '1.14.0' );
162
  wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
163
  }
164
 
@@ -496,7 +496,7 @@ class Visual_Portfolio_Admin {
496
  if ( ! is_blog_installed() ) {
497
  return;
498
  }
499
- if ( get_option( 'visual_portfolio_updated_caps' ) === '1.14.0' ) {
500
  return;
501
  }
502
 
@@ -573,7 +573,7 @@ class Visual_Portfolio_Admin {
573
  $wp_roles->add_cap( 'administrator', $cap );
574
  }
575
 
576
- update_option( 'visual_portfolio_updated_caps', '1.14.0' );
577
  }
578
 
579
  /**
152
  wp_enqueue_style( 'codemirror-addon-matchesonscrollbar', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/addon/search/matchesonscrollbar.css', '', $codemirror_version );
153
  wp_enqueue_style( 'codemirror-theme-eclipse', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/theme/eclipse.css', '', $codemirror_version );
154
 
155
+ wp_enqueue_script( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/js/layouts-editor.min.js', array( 'jquery' ), '1.14.1', true );
156
+ wp_enqueue_style( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/css/layouts-editor.min.css', '', '1.14.1' );
157
  wp_localize_script( 'visual-portfolio-layout-admin', 'VPAdminVariables', $data_init );
158
  }
159
 
160
+ wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery' ), '1.14.1', true );
161
+ wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '1.14.1' );
162
  wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
163
  }
164
 
496
  if ( ! is_blog_installed() ) {
497
  return;
498
  }
499
+ if ( get_option( 'visual_portfolio_updated_caps' ) === '1.14.1' ) {
500
  return;
501
  }
502
 
573
  $wp_roles->add_cap( 'administrator', $cap );
574
  }
575
 
576
+ update_option( 'visual_portfolio_updated_caps', '1.14.1' );
577
  }
578
 
579
  /**
classes/class-assets.php CHANGED
@@ -330,7 +330,7 @@ class Visual_Portfolio_Assets {
330
  );
331
 
332
  foreach ( $vp_styles as $name => $data ) {
333
- wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.14.0' );
334
  }
335
 
336
  // Visual Portfolio JS.
@@ -422,7 +422,7 @@ class Visual_Portfolio_Assets {
422
  );
423
 
424
  foreach ( $vp_scripts as $name => $data ) {
425
- wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.14.0', true );
426
  }
427
  }
428
 
330
  );
331
 
332
  foreach ( $vp_styles as $name => $data ) {
333
+ wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.14.1' );
334
  }
335
 
336
  // Visual Portfolio JS.
422
  );
423
 
424
  foreach ( $vp_scripts as $name => $data ) {
425
+ wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.14.1', true );
426
  }
427
  }
428
 
readme.md CHANGED
@@ -5,7 +5,7 @@
5
  * Requires at least: 4.0.0
6
  * Tested up to: 5.2
7
  * Requires PHP: 5.4
8
- * Stable tag: 1.14.0
9
  * License: GPLv2 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -122,6 +122,11 @@ The manual installation method involves downloading our Visual Portfolio plugin
122
 
123
  ## Changelog ##
124
 
 
 
 
 
 
125
  = 1.14.0 =
126
 
127
  * added settings to change registered image sizes
@@ -138,7 +143,7 @@ The manual installation method involves downloading our Visual Portfolio plugin
138
 
139
  = 1.13.2 =
140
 
141
- * fixed incorrect post date if something filters it (for example Events Manager plugin). Thanks to https://wordpress.org/support/topic/date-problem-with-events-and-1-13-1-version/
142
 
143
  = 1.13.1 =
144
 
@@ -181,8 +186,8 @@ The manual installation method involves downloading our Visual Portfolio plugin
181
  = 1.12.0 =
182
 
183
  * changed video oembed loading method
184
- * no more php oembed since it may be too heavy to load pages (used JS instead)
185
- * no more video thumbnail loading if no featured image specified in post
186
  * fixed portfolio categories and tags capabilities
187
  * fixed &lt;a&gt; tag in fly and fade effect when all meta disabled
188
 
@@ -323,7 +328,7 @@ Note: Don't forget to clear cache after plugin update. Changed portfolios with p
323
  = 1.6.5 =
324
 
325
  * added options for texts in filter and pagination
326
- * fixed paged /portfolio/ page (https://wordpress.org/support/topic/paging-infinite-loading-not-working/)
327
  * fixed vertical images quality
328
  * fixed conflict with Jetpack lazy
329
  * fixed filter shortcode output
5
  * Requires at least: 4.0.0
6
  * Tested up to: 5.2
7
  * Requires PHP: 5.4
8
+ * Stable tag: 1.14.1
9
  * License: GPLv2 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
122
 
123
  ## Changelog ##
124
 
125
+ = 1.14.1 =
126
+
127
+ * added jQuery events for PhotoSwipe and Fancybox <https://visualportfolio.co/documentation/developers/jquery-events/>
128
+ * fixed carousel responsive bug since new Swiper v5
129
+
130
  = 1.14.0 =
131
 
132
  * added settings to change registered image sizes
143
 
144
  = 1.13.2 =
145
 
146
+ * fixed incorrect post date if something filters it (for example Events Manager plugin). Thanks to <https://wordpress.org/support/topic/date-problem-with-events-and-1-13-1-version/>
147
 
148
  = 1.13.1 =
149
 
186
  = 1.12.0 =
187
 
188
  * changed video oembed loading method
189
+ * no more php oembed since it may be too heavy to load pages (used JS instead)
190
+ * no more video thumbnail loading if no featured image specified in post
191
  * fixed portfolio categories and tags capabilities
192
  * fixed &lt;a&gt; tag in fly and fade effect when all meta disabled
193
 
328
  = 1.6.5 =
329
 
330
  * added options for texts in filter and pagination
331
+ * fixed paged /portfolio/ page (<https://wordpress.org/support/topic/paging-infinite-loading-not-working/>)
332
  * fixed vertical images quality
333
  * fixed conflict with Jetpack lazy
334
  * fixed filter shortcode output