Visual Portfolio, Photo Gallery & Post Grid - Version 2.10.4

Version Description

Download this release

Release Info

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

Code changes from version 2.10.3 to 2.10.4

Files changed (44) hide show
  1. assets/admin/js/elementor.js +1 -1
  2. assets/admin/js/mce-dropdown.js +1 -1
  3. assets/admin/js/script.js +1 -1
  4. assets/admin/js/vc-frontend.js +1 -1
  5. assets/css/lazyload-rtl.min.css +1 -1
  6. assets/css/lazyload.min.css +1 -1
  7. assets/js/lazyload.js +2 -2
  8. assets/js/lazyload.min.js +1 -1
  9. assets/js/{lazysizes-config.js → lazysizes-cfg.js} +0 -0
  10. assets/js/{lazysizes-config.min.js → lazysizes-cfg.min.js} +0 -0
  11. assets/js/popup-gallery.js +1 -1
  12. assets/js/popup-gallery.min.js +1 -1
  13. assets/js/preview.js +1 -1
  14. class-visual-portfolio.php +10 -6
  15. classes/3rd/plugins/class-a3-lazy-load.php +42 -0
  16. classes/3rd/{class-elementor-widget.php → plugins/class-elementor-widget.php} +2 -2
  17. classes/3rd/{class-elementor.php → plugins/class-elementor.php} +1 -1
  18. classes/3rd/plugins/class-ewww-image-optimizer.php +29 -0
  19. classes/3rd/{class-imagify.php → plugins/class-imagify.php} +0 -0
  20. classes/3rd/plugins/class-lazy-loading-responsive-images.php +29 -0
  21. classes/3rd/{class-tinymce.php → plugins/class-tinymce.php} +1 -1
  22. classes/3rd/{class-vc.php → plugins/class-vc.php} +1 -1
  23. classes/3rd/{class-wpml.php → plugins/class-wpml.php} +0 -0
  24. classes/3rd/themes/class-avada.php +36 -0
  25. classes/class-admin.php +5 -5
  26. classes/class-assets.php +13 -7
  27. classes/class-custom-post-type.php +7 -2
  28. classes/class-deprecated.php +1 -1
  29. classes/class-get-portfolio.php +62 -3
  30. classes/class-gutenberg.php +3 -3
  31. classes/class-images.php +23 -16
  32. classes/class-migration.php +1 -1
  33. classes/class-preview.php +2 -2
  34. classes/class-settings.php +1 -1
  35. classes/class-supported-themes.php +1 -1
  36. gutenberg/components/controls-render/index.js +1 -1
  37. languages/visual-portfolio.pot +46 -46
  38. readme.md +15 -1
  39. templates/items-list/item-parts/image.php +19 -0
  40. templates/items-list/items-style/emerge/image.php +8 -1
  41. templates/items-list/items-style/fade/image.php +7 -1
  42. templates/items-list/items-style/fly/image.php +7 -1
  43. templates/items-list/items-style/image.php +7 -1
  44. templates/items-list/layouts/slider/thumbnails.php +5 -2
assets/admin/js/elementor.js CHANGED
@@ -2,7 +2,7 @@
2
  * Additional js for Elementor
3
  *
4
  * Name : Visual Portfolio
5
- * Version : 2.10.3
6
  * Author : nK https://nkdev.info
7
  */
8
  import { throttle } from 'throttle-debounce';
2
  * Additional js for Elementor
3
  *
4
  * Name : Visual Portfolio
5
+ * Version : 2.10.4
6
  * Author : nK https://nkdev.info
7
  */
8
  import { throttle } from 'throttle-debounce';
assets/admin/js/mce-dropdown.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 2.10.3
4
  * Author : nK https://nkdev.info
5
  */
6
  const {
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 2.10.4
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 : 2.10.3
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 2.10.4
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 : 2.10.3
6
  * Author : nK https://nkdev.info
7
  */
8
  const {
2
  * Additional js for frontend VC
3
  *
4
  * Name : Visual Portfolio
5
+ * Version : 2.10.4
6
  * Author : nK https://nkdev.info
7
  */
8
  const {
assets/css/lazyload-rtl.min.css CHANGED
@@ -1 +1 @@
1
- :root{--vp-lazyload-images__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-lazyload-images__background-color: rgba(140, 140, 140, .05);--vp-lazyload-images__animation-duration: 3s;--vp-lazyload-transition-duration: .3s;--vp-lazyload-transition-easing: ease-in-out}img.vp-lazyload,img.vp-lazyloaded,img.vp-lazypreload,img.vp-lazyloading{opacity:0;-webkit-transition:var(--vp-lazyload-transition-duration) opacity;-o-transition:var(--vp-lazyload-transition-duration) opacity;transition:var(--vp-lazyload-transition-duration) opacity;will-change:opacity}img.vp-lazyloaded{opacity:1}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background:var(--vp-lazyload-images__background);background-color:var(--vp-lazyload-images__background-color);background-position:100% 50%;background-size:500% 100%;-webkit-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;-o-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}
1
+ :root{--vp-lazyload-images__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-lazyload-images__background-color: rgba(140, 140, 140, .05);--vp-lazyload-images__animation-duration: 3s;--vp-lazyload-transition-duration: .3s;--vp-lazyload-transition-easing: ease-in-out}img.vp-lazyload,img.vp-lazyloaded,img.vp-lazypreload,img.vp-lazyloading{opacity:0;-webkit-transition:var(--vp-lazyload-transition-duration) opacity;-o-transition:var(--vp-lazyload-transition-duration) opacity;transition:var(--vp-lazyload-transition-duration) opacity;will-change:opacity}img.vp-lazyloaded{opacity:1}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;visibility:visible;background:var(--vp-lazyload-images__background);background-color:var(--vp-lazyload-images__background-color);background-position:100% 50%;background-size:500% 100%;opacity:1;-webkit-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;-o-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{-webkit-animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloaded::before,.vp-portfolio__thumbnail-img-lazyloaded::before{visibility:visible;opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}
assets/css/lazyload.min.css CHANGED
@@ -1 +1 @@
1
- :root{--vp-lazyload-images__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-lazyload-images__background-color: rgba(140, 140, 140, .05);--vp-lazyload-images__animation-duration: 3s;--vp-lazyload-transition-duration: .3s;--vp-lazyload-transition-easing: ease-in-out}img.vp-lazyload,img.vp-lazyloaded,img.vp-lazypreload,img.vp-lazyloading{opacity:0;-webkit-transition:var(--vp-lazyload-transition-duration) opacity;-o-transition:var(--vp-lazyload-transition-duration) opacity;transition:var(--vp-lazyload-transition-duration) opacity;will-change:opacity}img.vp-lazyloaded{opacity:1}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-lazyload-images__background);background-color:var(--vp-lazyload-images__background-color);background-position:0% 50%;background-size:500% 100%;-webkit-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;-o-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}
1
+ :root{--vp-lazyload-images__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-lazyload-images__background-color: rgba(140, 140, 140, .05);--vp-lazyload-images__animation-duration: 3s;--vp-lazyload-transition-duration: .3s;--vp-lazyload-transition-easing: ease-in-out}img.vp-lazyload,img.vp-lazyloaded,img.vp-lazypreload,img.vp-lazyloading{opacity:0;-webkit-transition:var(--vp-lazyload-transition-duration) opacity;-o-transition:var(--vp-lazyload-transition-duration) opacity;transition:var(--vp-lazyload-transition-duration) opacity;will-change:opacity}img.vp-lazyloaded{opacity:1}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;visibility:visible;background:var(--vp-lazyload-images__background);background-color:var(--vp-lazyload-images__background-color);background-position:0% 50%;background-size:500% 100%;opacity:1;-webkit-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;-o-transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;transition:var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity,var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{-webkit-animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloaded::before,.vp-portfolio__thumbnail-img-lazyloaded::before{visibility:visible;opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}
assets/js/lazyload.js CHANGED
@@ -47,6 +47,6 @@ $doc.on( 'lazybeforeunveil', ( e ) => {
47
  $doc.on( 'lazyloaded', ( e ) => {
48
  const $img = $( e.target );
49
 
50
- $img.closest( '.vp-portfolio__item-img-lazyloading' ).removeClass( 'vp-portfolio__item-img-lazyloading' );
51
- $img.closest( '.vp-portfolio__thumbnail-img-lazyloading' ).removeClass( 'vp-portfolio__thumbnail-img-lazyloading' );
52
  } );
47
  $doc.on( 'lazyloaded', ( e ) => {
48
  const $img = $( e.target );
49
 
50
+ $img.closest( '.vp-portfolio__item-img' ).removeClass( 'vp-portfolio__item-img-lazyloading' ).addClass( 'vp-portfolio__item-img-lazyloaded' );
51
+ $img.closest( '.vp-portfolio__thumbnail-img' ).removeClass( 'vp-portfolio__thumbnail-img-lazyloading' ).addClass( 'vp-portfolio__thumbnail-img-lazyloaded' );
52
  } );
assets/js/lazyload.min.js CHANGED
@@ -1 +1 @@
1
- !function(o){var t={};function e(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return o[n].call(r.exports,r,r.exports,e),r.l=!0,r.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 r in o)e.d(n,r,function(t){return o[t]}.bind(null,r));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=233)}({233:function(o,t,e){o.exports=e(234)},234:function(o,t){var e=window,n=e.jQuery,r=e.objectFitImages,i=n(document);void 0!==r&&(r(".vp-portfolio img:not(.vp-lazyload)"),i.on("lazybeforeunveil",(function(o){var t=n(o.target);t.closest(".vp-portfolio").length&&t.one("load",(function(){r(t[0])}))}))),i.on("lazybeforesizes",(function(o){o.detail.width=n(o.target).parents(":not(picture)").innerWidth()||o.detail.width})),i.on("lazybeforeunveil",(function(o){var t=n(o.target);t.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),t.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"),t.prev("noscript").remove()})),i.on("lazyloaded",(function(o){var t=n(o.target);t.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),t.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading")}))}});
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=233)}({233:function(o,t,e){o.exports=e(234)},234:function(o,t){var e=window,n=e.jQuery,i=e.objectFitImages,r=n(document);void 0!==i&&(i(".vp-portfolio img:not(.vp-lazyload)"),r.on("lazybeforeunveil",(function(o){var t=n(o.target);t.closest(".vp-portfolio").length&&t.one("load",(function(){i(t[0])}))}))),r.on("lazybeforesizes",(function(o){o.detail.width=n(o.target).parents(":not(picture)").innerWidth()||o.detail.width})),r.on("lazybeforeunveil",(function(o){var t=n(o.target);t.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),t.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"),t.prev("noscript").remove()})),r.on("lazyloaded",(function(o){var t=n(o.target);t.closest(".vp-portfolio__item-img").removeClass("vp-portfolio__item-img-lazyloading").addClass("vp-portfolio__item-img-lazyloaded"),t.closest(".vp-portfolio__thumbnail-img").removeClass("vp-portfolio__thumbnail-img-lazyloading").addClass("vp-portfolio__thumbnail-img-lazyloaded")}))}});
assets/js/{lazysizes-config.js → lazysizes-cfg.js} RENAMED
File without changes
assets/js/{lazysizes-config.min.js → lazysizes-cfg.min.js} RENAMED
File without changes
assets/js/popup-gallery.js CHANGED
@@ -262,7 +262,7 @@ $( document ).on( 'destroy.vpf', ( event, self ) => {
262
 
263
  // Check if link is image.
264
  function isLinkImage( link ) {
265
- return /(.png|.jpg|.jpeg|.gif|.tiff|.bmp|.webp)$/.test( link.href.toLowerCase().split( '?' )[ 0 ].split( '#' )[ 0 ] );
266
  }
267
 
268
  // Parse image data from link.
262
 
263
  // Check if link is image.
264
  function isLinkImage( link ) {
265
+ return /(.png|.jpg|.jpeg|.gif|.tiff|.tif|.jfif|.jpe|.svg|.bmp|.webp)$/.test( link.href.toLowerCase().split( '?' )[ 0 ].split( '#' )[ 0 ] );
266
  }
267
 
268
  // Parse image data from link.
assets/js/popup-gallery.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function i(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=253)}({253:function(e,t,i){e.exports=i(254)},254:function(e,t){var i=window.jQuery,o=window.VPData.settingsPopupGallery,r={vendor:!1,vendors:[{vendor:"youtube",embedUrl:"https://www.youtube.com/embed/{{video_id}}",pattern:/(https?:\/\/)?(www.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|v\/|watch\?v=|watch\?list=(.*)&v=|watch\?(.*[^&]&)v=)?((\w|-){11})(&list=(\w+)&?)?/,patternIndex:6},{vendor:"vimeo",embedUrl:"https://player.vimeo.com/video/{{video_id}}",pattern:/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,patternIndex:3}],init:function(){},open:function(){},close:function(){},parseVideo:function(e){var t=!1;return r.vendors.forEach((function(i){if(!t){var o=e.match(i.pattern),r=!(!o||!o[i.patternIndex])&&o[i.patternIndex];if(r)if(i.embedCallback)t=i.embedCallback(e,o);else{var p=i.embedUrl;p=(p=(p=p.replace(/{{video_id}}/g,r)).replace(/{{video_url}}/g,e)).replace(/{{video_url_encoded}}/g,encodeURIComponent(e));var n=i.width||1920,a=i.height||1080;t={vendor:i.vendor,id:r,embed:'<iframe width="'.concat(n,'" height="').concat(a,'" src="').concat(p,'" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>'),embedUrl:p,url:e,width:n,height:a}}}})),t||{vendor:"unknown",id:e,url:e,embedUrl:e,embed:'<iframe width="1920" height="1080" src="'.concat(e,'" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>')}},parseGallery:function(e){var t,o,p,n,a,l=[];return e.find(".vp-portfolio__item-wrap:not(.swiper-slide-duplicate):not(.swiper-slide-duplicate-active)").each((function(){if((t=i(this).find(".vp-portfolio__item-popup"))&&t.length){if(o=(t.attr("data-vp-popup-img-size")||"1920x1080").split("x"),n=t.attr("data-vp-popup-video"),a=!1,n&&(a=r.parseVideo(n)),a)p={type:"embed",el:this,src:a.embedUrl,embed:a.embed,width:a.width||1920,height:a.height||1080};else{p={type:"image",el:this,src:t.attr("data-vp-popup-img"),srcset:t.attr("data-vp-popup-img-srcset"),width:parseInt(o[0],10),height:parseInt(o[1],10)};var e=t.attr("data-vp-popup-sm-img")||p.src;if(e){var c=(t.attr("data-vp-popup-sm-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");p.srcSmall=e,p.srcSmallWidth=parseInt(c[0],10),p.srcSmallHeight=parseInt(c[1],10)}var d=t.attr("data-vp-popup-md-img")||p.src;if(d){var s=(t.attr("data-vp-popup-md-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");p.srcMedium=d,p.srcMediumWidth=parseInt(s[0],10),p.srcMediumHeight=parseInt(s[1],10)}var u=t.children(".vp-portfolio__item-popup-title").get(0),f=t.children(".vp-portfolio__item-popup-description").get(0);(u||f)&&(p.caption=(u?u.outerHTML:"")+(f?f.outerHTML:""))}l.push(p)}})),l}};function p(e){return/(.png|.jpg|.jpeg|.gif|.tiff|.bmp|.webp)$/.test(e.href.toLowerCase().split("?")[0].split("#")[0])}function n(e){var t=i(e),o=e.childNodes[0],r=t.next("figcaption");return"NOSCRIPT"===o.nodeName&&e.childNodes[1]&&(o=e.childNodes[1]),!r.length&&t.parent(".gallery-icon").length&&(r=t.parent(".gallery-icon").next("figcaption")),(r=r.html())&&(r='<div class="vp-portfolio__item-popup-description">'.concat(r,"</div>")),{type:"image",el:o,linkEl:e,src:e.href,caption:r}}window.VPPopupAPI=r,i(document).on("extendClass.vpf",(function(e,t){"vpf"===e.namespace&&(t.prototype.initPopupGallery=function(){var e=this;e.options.itemsClickAction&&"popup_gallery"===e.options.itemsClickAction&&(e.isPreview()||e.$item.on("click.vpf-uid-".concat(e.uid),".vp-portfolio__item a.vp-portfolio__item-meta, .vp-portfolio__item .vp-portfolio__item-img > a, .vp-portfolio__item .vp-portfolio__item-meta-title > a, .vp-portfolio__item a.vp-portfolio__item-overlay",(function(t){var o=i(this);if(o.closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){t.preventDefault();var p=-1,n=o.closest(".vp-portfolio__item")[0];e.$item.find(".vp-portfolio__item-wrap:not(.swiper-slide-duplicate):not(.swiper-slide-duplicate-active) .vp-portfolio__item-popup").each((function(e){-1===p&&i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===n&&(p=e)})),0>p&&(p=0);var a=r.parseGallery(e.$item);r.open(a,p,e)}})))},t.prototype.destroyPopupGallery=function(){this.options.itemsClickAction&&"popup_gallery"===this.options.itemsClickAction&&(this.$item.off("click.vpf-uid-".concat(this.uid)),this.emitEvent("destroyPopupGallery"))})})),i(document).on("init.vpf",(function(e,t){"vpf"===e.namespace&&t.initPopupGallery()})),i(document).on("destroy.vpf",(function(e,t){"vpf"===e.namespace&&t.destroyPopupGallery()})),o.enable_on_wordpress_images&&i(document).on("click","\n .wp-block-image > a,\n .wp-block-image > figure > a,\n .wp-block-gallery .blocks-gallery-item > figure > a,\n .wp-block-media-text > figure > a,\n .gallery .gallery-icon > a,\n figure.wp-caption > a,\n figure.tiled-gallery__item > a,\n p > a\n ",(function(e){if(this.childNodes.length){var t=this.childNodes[0];if("NOSCRIPT"===t.nodeName&&this.childNodes[1]&&(t=this.childNodes[1]),("IMG"===t.nodeName||"PICTURE"===t.nodeName)&&p(this)){e.preventDefault();var o=i(this),a=[],l=n(this),c=o.closest(".wp-block-gallery, .gallery, .tiled-gallery__gallery"),d=0;if(c.length){var s=c.find(".blocks-gallery-item > figure > a, .gallery-icon > a, figure.tiled-gallery__item > a"),u=0;s.each((function(){p(this)&&(this===l.linkEl&&(d=u),a.push(n(this)),u+=1)}))}else a.push(l);r.open(a,d)}}}))}});
1
+ !function(e){var t={};function i(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=253)}({253:function(e,t,i){e.exports=i(254)},254:function(e,t){var i=window.jQuery,o=window.VPData.settingsPopupGallery,r={vendor:!1,vendors:[{vendor:"youtube",embedUrl:"https://www.youtube.com/embed/{{video_id}}",pattern:/(https?:\/\/)?(www.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|v\/|watch\?v=|watch\?list=(.*)&v=|watch\?(.*[^&]&)v=)?((\w|-){11})(&list=(\w+)&?)?/,patternIndex:6},{vendor:"vimeo",embedUrl:"https://player.vimeo.com/video/{{video_id}}",pattern:/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,patternIndex:3}],init:function(){},open:function(){},close:function(){},parseVideo:function(e){var t=!1;return r.vendors.forEach((function(i){if(!t){var o=e.match(i.pattern),r=!(!o||!o[i.patternIndex])&&o[i.patternIndex];if(r)if(i.embedCallback)t=i.embedCallback(e,o);else{var p=i.embedUrl;p=(p=(p=p.replace(/{{video_id}}/g,r)).replace(/{{video_url}}/g,e)).replace(/{{video_url_encoded}}/g,encodeURIComponent(e));var n=i.width||1920,a=i.height||1080;t={vendor:i.vendor,id:r,embed:'<iframe width="'.concat(n,'" height="').concat(a,'" src="').concat(p,'" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>'),embedUrl:p,url:e,width:n,height:a}}}})),t||{vendor:"unknown",id:e,url:e,embedUrl:e,embed:'<iframe width="1920" height="1080" src="'.concat(e,'" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>')}},parseGallery:function(e){var t,o,p,n,a,l=[];return e.find(".vp-portfolio__item-wrap:not(.swiper-slide-duplicate):not(.swiper-slide-duplicate-active)").each((function(){if((t=i(this).find(".vp-portfolio__item-popup"))&&t.length){if(o=(t.attr("data-vp-popup-img-size")||"1920x1080").split("x"),n=t.attr("data-vp-popup-video"),a=!1,n&&(a=r.parseVideo(n)),a)p={type:"embed",el:this,src:a.embedUrl,embed:a.embed,width:a.width||1920,height:a.height||1080};else{p={type:"image",el:this,src:t.attr("data-vp-popup-img"),srcset:t.attr("data-vp-popup-img-srcset"),width:parseInt(o[0],10),height:parseInt(o[1],10)};var e=t.attr("data-vp-popup-sm-img")||p.src;if(e){var c=(t.attr("data-vp-popup-sm-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");p.srcSmall=e,p.srcSmallWidth=parseInt(c[0],10),p.srcSmallHeight=parseInt(c[1],10)}var d=t.attr("data-vp-popup-md-img")||p.src;if(d){var s=(t.attr("data-vp-popup-md-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");p.srcMedium=d,p.srcMediumWidth=parseInt(s[0],10),p.srcMediumHeight=parseInt(s[1],10)}var u=t.children(".vp-portfolio__item-popup-title").get(0),f=t.children(".vp-portfolio__item-popup-description").get(0);(u||f)&&(p.caption=(u?u.outerHTML:"")+(f?f.outerHTML:""))}l.push(p)}})),l}};function p(e){return/(.png|.jpg|.jpeg|.gif|.tiff|.tif|.jfif|.jpe|.svg|.bmp|.webp)$/.test(e.href.toLowerCase().split("?")[0].split("#")[0])}function n(e){var t=i(e),o=e.childNodes[0],r=t.next("figcaption");return"NOSCRIPT"===o.nodeName&&e.childNodes[1]&&(o=e.childNodes[1]),!r.length&&t.parent(".gallery-icon").length&&(r=t.parent(".gallery-icon").next("figcaption")),(r=r.html())&&(r='<div class="vp-portfolio__item-popup-description">'.concat(r,"</div>")),{type:"image",el:o,linkEl:e,src:e.href,caption:r}}window.VPPopupAPI=r,i(document).on("extendClass.vpf",(function(e,t){"vpf"===e.namespace&&(t.prototype.initPopupGallery=function(){var e=this;e.options.itemsClickAction&&"popup_gallery"===e.options.itemsClickAction&&(e.isPreview()||e.$item.on("click.vpf-uid-".concat(e.uid),".vp-portfolio__item a.vp-portfolio__item-meta, .vp-portfolio__item .vp-portfolio__item-img > a, .vp-portfolio__item .vp-portfolio__item-meta-title > a, .vp-portfolio__item a.vp-portfolio__item-overlay",(function(t){var o=i(this);if(o.closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){t.preventDefault();var p=-1,n=o.closest(".vp-portfolio__item")[0];e.$item.find(".vp-portfolio__item-wrap:not(.swiper-slide-duplicate):not(.swiper-slide-duplicate-active) .vp-portfolio__item-popup").each((function(e){-1===p&&i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===n&&(p=e)})),0>p&&(p=0);var a=r.parseGallery(e.$item);r.open(a,p,e)}})))},t.prototype.destroyPopupGallery=function(){this.options.itemsClickAction&&"popup_gallery"===this.options.itemsClickAction&&(this.$item.off("click.vpf-uid-".concat(this.uid)),this.emitEvent("destroyPopupGallery"))})})),i(document).on("init.vpf",(function(e,t){"vpf"===e.namespace&&t.initPopupGallery()})),i(document).on("destroy.vpf",(function(e,t){"vpf"===e.namespace&&t.destroyPopupGallery()})),o.enable_on_wordpress_images&&i(document).on("click","\n .wp-block-image > a,\n .wp-block-image > figure > a,\n .wp-block-gallery .blocks-gallery-item > figure > a,\n .wp-block-media-text > figure > a,\n .gallery .gallery-icon > a,\n figure.wp-caption > a,\n figure.tiled-gallery__item > a,\n p > a\n ",(function(e){if(this.childNodes.length){var t=this.childNodes[0];if("NOSCRIPT"===t.nodeName&&this.childNodes[1]&&(t=this.childNodes[1]),("IMG"===t.nodeName||"PICTURE"===t.nodeName)&&p(this)){e.preventDefault();var o=i(this),a=[],l=n(this),c=o.closest(".wp-block-gallery, .gallery, .tiled-gallery__gallery"),d=0;if(c.length){var s=c.find(".blocks-gallery-item > figure > a, .gallery-icon > a, figure.tiled-gallery__item > a"),u=0;s.each((function(){p(this)&&(this===l.linkEl&&(d=u),a.push(n(this)),u+=1)}))}else a.push(l);r.open(a,d)}}}))}});
assets/js/preview.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 2.10.3
4
  * Author : nK https://nkdev.info
5
  */
6
  const $ = window.jQuery;
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 2.10.4
4
  * Author : nK https://nkdev.info
5
  */
6
  const $ = window.jQuery;
class-visual-portfolio.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Visual Portfolio, Posts & Image Gallery
4
  * Description: Modern gallery and portfolio plugin with advanced layouts editor. Clean and powerful gallery styles with enormous settings in the Gutenberg block.
5
- * Version: 2.10.3
6
  * Author: nK
7
  * Author URI: https://nkdev.info
8
  * License: GPLv2 or later
@@ -146,11 +146,15 @@ class Visual_Portfolio {
146
  require_once $this->plugin_path . 'classes/class-supported-themes.php';
147
 
148
  // 3rd code integration.
149
- require_once $this->plugin_path . 'classes/3rd/class-tinymce.php';
150
- require_once $this->plugin_path . 'classes/3rd/class-vc.php';
151
- require_once $this->plugin_path . 'classes/3rd/class-elementor.php';
152
- require_once $this->plugin_path . 'classes/3rd/class-imagify.php';
153
- require_once $this->plugin_path . 'classes/3rd/class-wpml.php';
 
 
 
 
154
 
155
  // Migration run after all features.
156
  require_once $this->plugin_path . 'classes/class-migration.php';
2
  /**
3
  * Plugin Name: Visual Portfolio, Posts & Image Gallery
4
  * Description: Modern gallery and portfolio plugin with advanced layouts editor. Clean and powerful gallery styles with enormous settings in the Gutenberg block.
5
+ * Version: 2.10.4
6
  * Author: nK
7
  * Author URI: https://nkdev.info
8
  * License: GPLv2 or later
146
  require_once $this->plugin_path . 'classes/class-supported-themes.php';
147
 
148
  // 3rd code integration.
149
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-a3-lazy-load.php';
150
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-elementor.php';
151
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-ewww-image-optimizer.php';
152
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-imagify.php';
153
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-lazy-loading-responsive-images.php';
154
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-tinymce.php';
155
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-vc.php';
156
+ require_once $this->plugin_path . 'classes/3rd/plugins/class-wpml.php';
157
+ require_once $this->plugin_path . 'classes/3rd/themes/class-avada.php';
158
 
159
  // Migration run after all features.
160
  require_once $this->plugin_path . 'classes/class-migration.php';
classes/3rd/plugins/class-a3-lazy-load.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * A3 Lazy Load Plugin.
4
+ *
5
+ * @package visual-portfolio
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Class Visual_Portfolio_3rd_A3_Lazy_Load
14
+ */
15
+ class Visual_Portfolio_3rd_A3_Lazy_Load {
16
+ /**
17
+ * Visual_Portfolio_3rd_A3_Lazy_Load constructor.
18
+ */
19
+ public function __construct() {
20
+ // Fix conflict with lazy loading.
21
+ add_filter( 'a3_lazy_load_skip_images_classes', array( $this, 'a3_lazy_load_skip_images_classes' ) );
22
+ }
23
+
24
+ /**
25
+ * Add lazyload class to skip.
26
+ *
27
+ * @param string $classes classes.
28
+ *
29
+ * @return string
30
+ */
31
+ public function a3_lazy_load_skip_images_classes( $classes ) {
32
+ if ( '' !== $classes && ! empty( $classes ) ) {
33
+ $classes .= ',';
34
+ }
35
+
36
+ $classes .= 'vp-lazyload';
37
+
38
+ return $classes;
39
+ }
40
+ }
41
+
42
+ new Visual_Portfolio_3rd_A3_Lazy_Load();
classes/3rd/{class-elementor-widget.php → plugins/class-elementor-widget.php} RENAMED
@@ -33,9 +33,9 @@ class Visual_Portfolio_3rd_Elementor_Widget extends \Elementor\Widget_Base {
33
 
34
  if ( $this->is_preview_mode() ) {
35
  wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.min.js', '', '4.2.11', true );
36
- wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '2.10.3', true );
37
 
38
- wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.10.3' );
39
  wp_style_add_data( 'visual-portfolio-elementor', 'rtl', 'replace' );
40
  wp_style_add_data( 'visual-portfolio-elementor', 'suffix', '.min' );
41
  }
33
 
34
  if ( $this->is_preview_mode() ) {
35
  wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.min.js', '', '4.2.11', true );
36
+ wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '2.10.4', true );
37
 
38
+ wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.10.4' );
39
  wp_style_add_data( 'visual-portfolio-elementor', 'rtl', 'replace' );
40
  wp_style_add_data( 'visual-portfolio-elementor', 'suffix', '.min' );
41
  }
classes/3rd/{class-elementor.php → plugins/class-elementor.php} RENAMED
@@ -24,7 +24,7 @@ class Visual_Portfolio_3rd_Elementor {
24
  * Register widget
25
  */
26
  public function widgets_registered() {
27
- require_once visual_portfolio()->plugin_path . 'classes/3rd/class-elementor-widget.php';
28
 
29
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Visual_Portfolio_3rd_Elementor_Widget() );
30
  }
24
  * Register widget
25
  */
26
  public function widgets_registered() {
27
+ require_once visual_portfolio()->plugin_path . 'classes/3rd/plugins/class-elementor-widget.php';
28
 
29
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Visual_Portfolio_3rd_Elementor_Widget() );
30
  }
classes/3rd/plugins/class-ewww-image-optimizer.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * EWWW Image Optimizer Plugin.
4
+ *
5
+ * @package visual-portfolio
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Class Visual_Portfolio_3rd_Ewww_Image_Optimizer
14
+ */
15
+ class Visual_Portfolio_3rd_Ewww_Image_Optimizer {
16
+ /**
17
+ * Visual_Portfolio_3rd_Ewww_Image_Optimizer constructor.
18
+ */
19
+ public function __construct() {
20
+ if ( ! function_exists( 'ewww_image_optimizer_get_option' ) || ! ewww_image_optimizer_get_option( 'ewww_image_optimizer_lazy_load' ) ) {
21
+ return;
22
+ }
23
+
24
+ // Disable our lazyload if EWWW lazyload used.
25
+ add_filter( 'vpf_images_lazyload', '__return_false' );
26
+ }
27
+ }
28
+
29
+ new Visual_Portfolio_3rd_Ewww_Image_Optimizer();
classes/3rd/{class-imagify.php → plugins/class-imagify.php} RENAMED
File without changes
classes/3rd/plugins/class-lazy-loading-responsive-images.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Lazy Loader Plugin.
4
+ *
5
+ * @package visual-portfolio
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Class Visual_Portfolio_3rd_Lazy_Loader
14
+ */
15
+ class Visual_Portfolio_3rd_Lazy_Loader {
16
+ /**
17
+ * Visual_Portfolio_3rd_Lazy_Loader constructor.
18
+ */
19
+ public function __construct() {
20
+ if ( ! class_exists( 'FlorianBrinkmann\LazyLoadResponsiveImages\Plugin' ) ) {
21
+ return;
22
+ }
23
+
24
+ // Disable our lazyload if Lazy Loader plugin installed.
25
+ add_filter( 'vpf_images_lazyload', '__return_false' );
26
+ }
27
+ }
28
+
29
+ new Visual_Portfolio_3rd_Lazy_Loader();
classes/3rd/{class-tinymce.php → plugins/class-tinymce.php} RENAMED
@@ -70,7 +70,7 @@ class Visual_Portfolio_3rd_TinyMCE {
70
  return;
71
  }
72
 
73
- wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '2.10.3', true );
74
  wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
75
  }
76
  }
70
  return;
71
  }
72
 
73
+ wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '2.10.4', true );
74
  wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
75
  }
76
  }
classes/3rd/{class-vc.php → plugins/class-vc.php} RENAMED
@@ -35,7 +35,7 @@ class Visual_Portfolio_3rd_VC {
35
  */
36
  public function admin_enqueue_scripts( $page ) {
37
  if ( 'post.php' === $page || 'post-new.php' === $page ) {
38
- wp_enqueue_script( 'visual-portfolio-vc-frontend', visual_portfolio()->plugin_url . 'assets/admin/js/vc-frontend.min.js', array( 'jquery' ), '2.10.3', true );
39
  }
40
  }
41
 
35
  */
36
  public function admin_enqueue_scripts( $page ) {
37
  if ( 'post.php' === $page || 'post-new.php' === $page ) {
38
+ wp_enqueue_script( 'visual-portfolio-vc-frontend', visual_portfolio()->plugin_url . 'assets/admin/js/vc-frontend.min.js', array( 'jquery' ), '2.10.4', true );
39
  }
40
  }
41
 
classes/3rd/{class-wpml.php → plugins/class-wpml.php} RENAMED
File without changes
classes/3rd/themes/class-avada.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Avada Theme.
4
+ *
5
+ * @package visual-portfolio
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Class Visual_Portfolio_3rd_Avada
14
+ */
15
+ class Visual_Portfolio_3rd_Avada {
16
+ /**
17
+ * Visual_Portfolio_3rd_Avada constructor.
18
+ */
19
+ public function __construct() {
20
+ if ( is_admin() ) {
21
+ return;
22
+ }
23
+
24
+ $current_theme = wp_get_theme();
25
+ $avada_options = get_option( 'fusion_options' );
26
+
27
+ if ( 'Avada' !== $current_theme->get( 'Name' ) || ! isset( $avada_options['lazy_load'] ) || 'avada' !== $avada_options['lazy_load'] ) {
28
+ return;
29
+ }
30
+
31
+ // Disable our lazyload if Avada's lazyload used.
32
+ add_filter( 'vpf_images_lazyload', '__return_false' );
33
+ }
34
+ }
35
+
36
+ new Visual_Portfolio_3rd_Avada();
classes/class-admin.php CHANGED
@@ -42,9 +42,9 @@ class Visual_Portfolio_Admin {
42
  'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
43
  );
44
 
45
- wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.10.3', true );
46
  wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
47
- wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', array(), '2.10.3' );
48
  wp_style_add_data( 'visual-portfolio-admin', 'rtl', 'replace' );
49
  wp_style_add_data( 'visual-portfolio-admin', 'suffix', '.min' );
50
  }
@@ -58,8 +58,8 @@ class Visual_Portfolio_Admin {
58
  );
59
 
60
  if ( 'vp_lists' === get_post_type() ) {
61
- wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.10.3', true );
62
- wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', array(), '2.10.3' );
63
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
64
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
65
 
@@ -105,7 +105,7 @@ class Visual_Portfolio_Admin {
105
  // phpcs:ignore
106
  if ( 'visual_portfolio_go_pro' === $_GET['page'] ) {
107
  // phpcs:ignore
108
- wp_redirect( 'https://visualportfolio.co/pro/?utm_source=freeplugin&utm_medium=link&utm_campaign=admin_page&utm_content=2.10.3' );
109
  exit();
110
  }
111
  }
42
  'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
43
  );
44
 
45
+ wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.10.4', true );
46
  wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
47
+ wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', array(), '2.10.4' );
48
  wp_style_add_data( 'visual-portfolio-admin', 'rtl', 'replace' );
49
  wp_style_add_data( 'visual-portfolio-admin', 'suffix', '.min' );
50
  }
58
  );
59
 
60
  if ( 'vp_lists' === get_post_type() ) {
61
+ wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.10.4', true );
62
+ wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', array(), '2.10.4' );
63
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
64
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
65
 
105
  // phpcs:ignore
106
  if ( 'visual_portfolio_go_pro' === $_GET['page'] ) {
107
  // phpcs:ignore
108
+ wp_redirect( 'https://visualportfolio.co/pro/?utm_source=freeplugin&utm_medium=link&utm_campaign=admin_page&utm_content=2.10.4' );
109
  exit();
110
  }
111
  }
classes/class-assets.php CHANGED
@@ -98,11 +98,11 @@ class Visual_Portfolio_Assets {
98
  foreach ( self::$stored_assets[ $type ] as $name => $data ) {
99
  if ( isset( $data['value'] ) && $data['value'] ) {
100
  if ( 'script' === $type ) {
101
- wp_enqueue_script( $name, '', array(), '2.10.3', true );
102
  } elseif ( is_string( $data['value'] ) ) {
103
- visual_portfolio()->include_template_style( $name, $data['value'], array(), '2.10.3' );
104
  } else {
105
- wp_enqueue_style( $name, '', array(), '2.10.3' );
106
  }
107
 
108
  self::$stored_assets[ $type ]['value'] = false;
@@ -259,7 +259,7 @@ class Visual_Portfolio_Assets {
259
  $dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
260
  $controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
261
 
262
- wp_register_style( $controls_css_handle, false, array(), '2.10.3' );
263
  wp_enqueue_style( $controls_css_handle );
264
  wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
265
 
@@ -294,6 +294,12 @@ class Visual_Portfolio_Assets {
294
  * @return void
295
  */
296
  public static function enqueue_lazyload_assets() {
 
 
 
 
 
 
297
  self::store_used_assets( 'visual-portfolio-lazyload', true, 'script' );
298
  self::store_used_assets( 'visual-portfolio-lazyload', true, 'style' );
299
  }
@@ -359,7 +365,7 @@ class Visual_Portfolio_Assets {
359
  // LazySizes.
360
  if ( apply_filters( 'vpf_enqueue_plugin_lazysizes', true ) ) {
361
  wp_register_script( 'lazysizes-object-fit-cover', visual_portfolio()->plugin_url . 'assets/js/lazysizes-object-fit-cover.min.js', array(), '4.1.0', true );
362
- wp_register_script( 'lazysizes-config', visual_portfolio()->plugin_url . 'assets/js/lazysizes-config.min.js', array(), '2.10.3', true );
363
  wp_register_script( 'lazysizes', visual_portfolio()->plugin_url . 'assets/vendor/lazysizes/lazysizes.min.js', array(), '5.2.2', true );
364
  }
365
 
@@ -407,7 +413,7 @@ class Visual_Portfolio_Assets {
407
  );
408
 
409
  foreach ( $vp_styles as $name => $data ) {
410
- wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.10.3' );
411
  wp_style_add_data( $name, 'rtl', 'replace' );
412
  wp_style_add_data( $name, 'suffix', '.min' );
413
  }
@@ -527,7 +533,7 @@ class Visual_Portfolio_Assets {
527
  );
528
 
529
  foreach ( $vp_scripts as $name => $data ) {
530
- wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.10.3', true );
531
  }
532
 
533
  do_action( 'vpf_after_assets_register' );
98
  foreach ( self::$stored_assets[ $type ] as $name => $data ) {
99
  if ( isset( $data['value'] ) && $data['value'] ) {
100
  if ( 'script' === $type ) {
101
+ wp_enqueue_script( $name, '', array(), '2.10.4', true );
102
  } elseif ( is_string( $data['value'] ) ) {
103
+ visual_portfolio()->include_template_style( $name, $data['value'], array(), '2.10.4' );
104
  } else {
105
+ wp_enqueue_style( $name, '', array(), '2.10.4' );
106
  }
107
 
108
  self::$stored_assets[ $type ]['value'] = false;
259
  $dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
260
  $controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
261
 
262
+ wp_register_style( $controls_css_handle, false, array(), '2.10.4' );
263
  wp_enqueue_style( $controls_css_handle );
264
  wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
265
 
294
  * @return void
295
  */
296
  public static function enqueue_lazyload_assets() {
297
+ // Disable lazyload assets using filter.
298
+ // Same filter used in `class-images.php`.
299
+ if ( ! apply_filters( 'vpf_images_lazyload', true ) ) {
300
+ return;
301
+ }
302
+
303
  self::store_used_assets( 'visual-portfolio-lazyload', true, 'script' );
304
  self::store_used_assets( 'visual-portfolio-lazyload', true, 'style' );
305
  }
365
  // LazySizes.
366
  if ( apply_filters( 'vpf_enqueue_plugin_lazysizes', true ) ) {
367
  wp_register_script( 'lazysizes-object-fit-cover', visual_portfolio()->plugin_url . 'assets/js/lazysizes-object-fit-cover.min.js', array(), '4.1.0', true );
368
+ wp_register_script( 'lazysizes-config', visual_portfolio()->plugin_url . 'assets/js/lazysizes-cfg.min.js', array(), '2.10.4', true );
369
  wp_register_script( 'lazysizes', visual_portfolio()->plugin_url . 'assets/vendor/lazysizes/lazysizes.min.js', array(), '5.2.2', true );
370
  }
371
 
413
  );
414
 
415
  foreach ( $vp_styles as $name => $data ) {
416
+ wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.10.4' );
417
  wp_style_add_data( $name, 'rtl', 'replace' );
418
  wp_style_add_data( $name, 'suffix', '.min' );
419
  }
533
  );
534
 
535
  foreach ( $vp_scripts as $name => $data ) {
536
+ wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.10.4', true );
537
  }
538
 
539
  do_action( 'vpf_after_assets_register' );
classes/class-custom-post-type.php CHANGED
@@ -248,7 +248,12 @@ class Visual_Portfolio_Custom_Post_Type {
248
  if ( ! is_blog_installed() ) {
249
  return;
250
  }
251
- if ( get_option( 'visual_portfolio_updated_caps' ) === '2.10.3' ) {
 
 
 
 
 
252
  return;
253
  }
254
 
@@ -325,7 +330,7 @@ class Visual_Portfolio_Custom_Post_Type {
325
  $wp_roles->add_cap( 'administrator', $cap );
326
  }
327
 
328
- update_option( 'visual_portfolio_updated_caps', '2.10.3' );
329
  }
330
 
331
  /**
248
  if ( ! is_blog_installed() ) {
249
  return;
250
  }
251
+
252
+ global $wp_version;
253
+
254
+ $check_string = 'Plugin: 2.10.4 WP: ' . $wp_version;
255
+
256
+ if ( get_option( 'visual_portfolio_updated_caps' ) === $check_string ) {
257
  return;
258
  }
259
 
330
  $wp_roles->add_cap( 'administrator', $cap );
331
  }
332
 
333
+ update_option( 'visual_portfolio_updated_caps', $check_string );
334
  }
335
 
336
  /**
classes/class-deprecated.php CHANGED
@@ -72,7 +72,7 @@ class Visual_Portfolio_Deprecations {
72
 
73
  // Add generic handler.
74
  // Use a priority of 10, and accepted args of 10 (ignored by WP).
75
- add_action( $replacement, '_acf_apply_deprecated_hook', 10, 10 );
76
  }
77
 
78
  /**
72
 
73
  // Add generic handler.
74
  // Use a priority of 10, and accepted args of 10 (ignored by WP).
75
+ add_action( $replacement, array( $this, 'apply_deprecated_hook' ), 10, 10 );
76
  }
77
 
78
  /**
classes/class-get-portfolio.php CHANGED
@@ -18,17 +18,74 @@ if ( version_compare( PHP_VERSION, '5.5.9' ) >= 0 && ! class_exists( 'Cocur\Slug
18
  }
19
 
20
  /**
21
- * Session Start
22
  */
23
  function vpf_session_start() {
 
 
 
 
 
24
  // Fixes problem with headers sent - https://wordpress.org/support/topic/headers-already-sent-43/ .
25
- if ( ! is_admin() && ! session_id() && ! headers_sent() ) {
26
- session_start();
 
 
 
 
 
 
 
 
 
 
27
  }
28
  }
29
  // We need a lower priority to prevent errors when 3rd-party plugins output something.
30
  add_action( 'init', 'vpf_session_start', 5 );
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Class Visual_Portfolio_Get
34
  */
@@ -500,6 +557,8 @@ class Visual_Portfolio_Get {
500
  'image_id' => '',
501
  // wp_kses allowed attributes for image
502
  // extended in class-images for lazyloading support.
 
 
503
  'image_allowed_html' => array(
504
  'img' => array(
505
  'src' => array(),
18
  }
19
 
20
  /**
21
+ * Session Start.
22
  */
23
  function vpf_session_start() {
24
+ // We don't need sessions in admin side.
25
+ if ( is_admin() ) {
26
+ return;
27
+ }
28
+
29
  // Fixes problem with headers sent - https://wordpress.org/support/topic/headers-already-sent-43/ .
30
+ if ( headers_sent() ) {
31
+ return;
32
+ }
33
+
34
+ if ( ! function_exists( 'session_status' ) ) {
35
+ if ( session_id() ) {
36
+ // phpcs:ignore
37
+ @session_start();
38
+ }
39
+ } elseif ( session_status() !== PHP_SESSION_ACTIVE ) {
40
+ // phpcs:ignore
41
+ @session_start();
42
  }
43
  }
44
  // We need a lower priority to prevent errors when 3rd-party plugins output something.
45
  add_action( 'init', 'vpf_session_start', 5 );
46
 
47
+ /**
48
+ * Session Close.
49
+ */
50
+ function vpf_session_close() {
51
+ if ( session_id() ) {
52
+ // phpcs:ignore
53
+ @session_write_close();
54
+ }
55
+ }
56
+ add_action( 'shutdown', 'vpf_session_close', 999 );
57
+
58
+ /**
59
+ * Write session to disk to prevent cURL time-out which may occur with
60
+ * WordPress (since 4.9.2, see https://core.trac.wordpress.org/ticket/43358),
61
+ * or plugins such as "Health Check".
62
+ *
63
+ * @param false|array|WP_Error $preempt - A preemptive return value of an HTTP request.
64
+ * @param array $r - HTTP request arguments.
65
+ * @param string $url - The request URL.
66
+ *
67
+ * @return mixed
68
+ */
69
+ function vpf_pre_http_request( $preempt, $r, $url ) {
70
+ // VPF_DISABLE_SWC can be defined in wp-config.php (undocumented).
71
+ if ( ! defined( 'VPF_DISABLE_SWC' ) && isset( $_SESSION ) ) {
72
+ if ( function_exists( 'get_site_url' ) ) {
73
+ // phpcs:ignore
74
+ $parse = parse_url( get_site_url() );
75
+
76
+ // phpcs:ignore
77
+ $s_url = @$parse['scheme'] . "://{$parse['host']}";
78
+
79
+ if ( strpos( $url, $s_url ) === 0 ) {
80
+ vpf_session_close();
81
+ }
82
+ }
83
+ }
84
+
85
+ return $preempt;
86
+ }
87
+ add_filter( 'pre_http_request', 'vpf_pre_http_request', 10, 3 );
88
+
89
  /**
90
  * Class Visual_Portfolio_Get
91
  */
557
  'image_id' => '',
558
  // wp_kses allowed attributes for image
559
  // extended in class-images for lazyloading support.
560
+ //
561
+ // DEPRECATED, but we should keep it, as a lot of custom user templates may still use it.
562
  'image_allowed_html' => array(
563
  'img' => array(
564
  'src' => array(),
classes/class-gutenberg.php CHANGED
@@ -173,14 +173,14 @@ class Visual_Portfolio_Gutenberg_Block {
173
  'visual-portfolio-gutenberg',
174
  plugins_url( '../gutenberg/index.min.js', __FILE__ ),
175
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
176
- '2.10.3',
177
  true
178
  );
179
  wp_enqueue_style(
180
  'visual-portfolio-gutenberg',
181
  plugins_url( '../gutenberg/style.min.css', __FILE__ ),
182
  array(),
183
- '2.10.3'
184
  );
185
  wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
186
  wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
@@ -200,7 +200,7 @@ class Visual_Portfolio_Gutenberg_Block {
200
  'visual-portfolio-gutenberg-custom-post-meta',
201
  plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
202
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
203
- '2.10.3',
204
  true
205
  );
206
 
173
  'visual-portfolio-gutenberg',
174
  plugins_url( '../gutenberg/index.min.js', __FILE__ ),
175
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
176
+ '2.10.4',
177
  true
178
  );
179
  wp_enqueue_style(
180
  'visual-portfolio-gutenberg',
181
  plugins_url( '../gutenberg/style.min.css', __FILE__ ),
182
  array(),
183
+ '2.10.4'
184
  );
185
  wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
186
  wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
200
  'visual-portfolio-gutenberg-custom-post-meta',
201
  plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
202
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
203
+ '2.10.4',
204
  true
205
  );
206
 
classes/class-images.php CHANGED
@@ -100,6 +100,12 @@ class Visual_Portfolio_Images {
100
  return;
101
  }
102
 
 
 
 
 
 
 
103
  self::$allow_vp_lazyload = ! ! Visual_Portfolio_Settings::get_option( 'lazy_loading', 'vp_images' );
104
  self::$allow_wp_lazyload = 'full' === Visual_Portfolio_Settings::get_option( 'lazy_loading', 'vp_images' );
105
 
@@ -108,11 +114,6 @@ class Visual_Portfolio_Images {
108
  return;
109
  }
110
 
111
- // disable using filter.
112
- if ( ! apply_filters( 'vpf_images_lazyload', true ) ) {
113
- return;
114
- }
115
-
116
  if ( self::$allow_wp_lazyload ) {
117
  add_filter( 'the_content', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
118
  add_filter( 'post_thumbnail_html', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
@@ -120,6 +121,7 @@ class Visual_Portfolio_Images {
120
  add_filter( 'widget_text', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
121
  add_filter( 'get_image_tag', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
122
  }
 
123
  add_filter( 'wp_get_attachment_image_attributes', 'Visual_Portfolio_Images::process_image_attributes', 9999 );
124
 
125
  add_action( 'wp_kses_allowed_html', 'Visual_Portfolio_Images::allow_lazy_attributes' );
@@ -226,7 +228,10 @@ class Visual_Portfolio_Images {
226
  */
227
  public static function add_image_placeholders( $content ) {
228
  // This is a pretty simple regex, but it works.
229
- $content = preg_replace_callback( '#<(img)([^>]+?)(>(.*?)</\\1>|[\/]?>)#si', 'Visual_Portfolio_Images::process_image', $content );
 
 
 
230
 
231
  return $content;
232
  }
@@ -243,7 +248,9 @@ class Visual_Portfolio_Images {
243
  // Check for blocked classes.
244
  if ( ! empty( $attributes['class'] ) ) {
245
  $blocked_classes = array(
 
246
  'lazyload',
 
247
  'skip-lazy',
248
  'gazette-featured-content-thumbnail',
249
  );
@@ -266,9 +273,19 @@ class Visual_Portfolio_Images {
266
 
267
  $blocked_attributes = array(
268
  'data-skip-lazy',
 
269
  'data-src',
 
 
 
 
270
  );
271
 
 
 
 
 
 
272
  foreach ( $blocked_attributes as $attr ) {
273
  if ( isset( $attributes[ $attr ] ) ) {
274
  return true;
@@ -388,16 +405,6 @@ class Visual_Portfolio_Images {
388
  // Add custom classname.
389
  $attributes['class'] = sprintf( '%s vp-lazyload', empty( $attributes['class'] ) ? '' : $attributes['class'] );
390
 
391
- // Prevent WP Rocket lazy loading.
392
- if ( defined( 'WP_ROCKET_VERSION' ) ) {
393
- $attributes['data-no-lazy'] = '1';
394
- }
395
-
396
- // Prevent WP Smush lazy loading.
397
- if ( class_exists( 'WP_Smush' ) || class_exists( 'Smush\WP_Smush' ) ) {
398
- $attributes['class'] .= ' no-lazyload';
399
- }
400
-
401
  /**
402
  * Allow plugins and themes to override the attributes on the image before the content is updated.
403
  *
100
  return;
101
  }
102
 
103
+ // Disable using filter.
104
+ // Same filter used in `class-assets.php`.
105
+ if ( ! apply_filters( 'vpf_images_lazyload', true ) ) {
106
+ return;
107
+ }
108
+
109
  self::$allow_vp_lazyload = ! ! Visual_Portfolio_Settings::get_option( 'lazy_loading', 'vp_images' );
110
  self::$allow_wp_lazyload = 'full' === Visual_Portfolio_Settings::get_option( 'lazy_loading', 'vp_images' );
111
 
114
  return;
115
  }
116
 
 
 
 
 
 
117
  if ( self::$allow_wp_lazyload ) {
118
  add_filter( 'the_content', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
119
  add_filter( 'post_thumbnail_html', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
121
  add_filter( 'widget_text', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
122
  add_filter( 'get_image_tag', 'Visual_Portfolio_Images::add_image_placeholders', 9999 );
123
  }
124
+
125
  add_filter( 'wp_get_attachment_image_attributes', 'Visual_Portfolio_Images::process_image_attributes', 9999 );
126
 
127
  add_action( 'wp_kses_allowed_html', 'Visual_Portfolio_Images::allow_lazy_attributes' );
228
  */
229
  public static function add_image_placeholders( $content ) {
230
  // This is a pretty simple regex, but it works.
231
+ //
232
+ // 1. Find <img> tags
233
+ // 2. Exclude tags, placed inside <noscript>.
234
+ $content = preg_replace_callback( '#(?<!noscript\>)<(img)([^>]+?)(>(.*?)</\\1>|[\/]?>)#si', 'Visual_Portfolio_Images::process_image', $content );
235
 
236
  return $content;
237
  }
248
  // Check for blocked classes.
249
  if ( ! empty( $attributes['class'] ) ) {
250
  $blocked_classes = array(
251
+ 'lazy',
252
  'lazyload',
253
+ 'lazy-load',
254
  'skip-lazy',
255
  'gazette-featured-content-thumbnail',
256
  );
273
 
274
  $blocked_attributes = array(
275
  'data-skip-lazy',
276
+ 'data-no-lazy',
277
  'data-src',
278
+ 'data-srcset',
279
+ 'data-lazy-original',
280
+ 'data-lazy-src',
281
+ 'data-lazyload',
282
  );
283
 
284
+ /**
285
+ * Allow plugins and themes to tell lazy images to skip an image with a given attribute.
286
+ */
287
+ $blocked_attributes = apply_filters( 'vpf_lazyload_images_blocked_attributes', $blocked_attributes );
288
+
289
  foreach ( $blocked_attributes as $attr ) {
290
  if ( isset( $attributes[ $attr ] ) ) {
291
  return true;
405
  // Add custom classname.
406
  $attributes['class'] = sprintf( '%s vp-lazyload', empty( $attributes['class'] ) ? '' : $attributes['class'] );
407
 
 
 
 
 
 
 
 
 
 
 
408
  /**
409
  * Allow plugins and themes to override the attributes on the image before the content is updated.
410
  *
classes/class-migration.php CHANGED
@@ -18,7 +18,7 @@ class Visual_Portfolio_Migrations {
18
  *
19
  * @var string
20
  */
21
- protected $version = '2.10.3';
22
 
23
  /**
24
  * Initial version.
18
  *
19
  * @var string
20
  */
21
+ protected $version = '2.10.4';
22
 
23
  /**
24
  * Initial version.
classes/class-preview.php CHANGED
@@ -232,7 +232,7 @@ class Visual_Portfolio_Preview {
232
 
233
  // Enqueue assets.
234
  wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.contentWindow.min.js', array(), '4.2.11', true );
235
- wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.min.js', array( 'jquery', 'iframe-resizer-content' ), '2.10.3', true );
236
 
237
  // Post data for script.
238
  wp_localize_script(
@@ -275,7 +275,7 @@ class Visual_Portfolio_Preview {
275
  Visual_Portfolio_Assets::enqueue( $options );
276
 
277
  // Custom styles.
278
- visual_portfolio()->include_template_style( 'visual-portfolio-preview', 'preview/style', array(), '2.10.3' );
279
 
280
  // Output template.
281
  visual_portfolio()->include_template(
232
 
233
  // Enqueue assets.
234
  wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.contentWindow.min.js', array(), '4.2.11', true );
235
+ wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.min.js', array( 'jquery', 'iframe-resizer-content' ), '2.10.4', true );
236
 
237
  // Post data for script.
238
  wp_localize_script(
275
  Visual_Portfolio_Assets::enqueue( $options );
276
 
277
  // Custom styles.
278
+ visual_portfolio()->include_template_style( 'visual-portfolio-preview', 'preview/style', array(), '2.10.4' );
279
 
280
  // Output template.
281
  visual_portfolio()->include_template(
classes/class-settings.php CHANGED
@@ -486,7 +486,7 @@ class Visual_Portfolio_Settings {
486
  <h3>' . esc_html__( 'PRO Feature', 'visual-portfolio' ) . '</h3>
487
  <div>
488
  <p>' . esc_html__( 'Social feeds such as Instagram, Youtube, Flickr, Twitter, etc...', 'visual-portfolio' ) . '</p>
489
- <a class="vpf-settings-info-pro-button" target="_blank" rel="noopener noreferrer" href="https://visualportfolio.co/pro/?utm_source=freeplugin&utm_medium=link&utm_campaign=plugin_settings&utm_content=2.10.3">' . esc_html__( 'Read More', 'visual-portfolio' ) . '</a>
490
  </div>
491
  </div>
492
  ',
486
  <h3>' . esc_html__( 'PRO Feature', 'visual-portfolio' ) . '</h3>
487
  <div>
488
  <p>' . esc_html__( 'Social feeds such as Instagram, Youtube, Flickr, Twitter, etc...', 'visual-portfolio' ) . '</p>
489
+ <a class="vpf-settings-info-pro-button" target="_blank" rel="noopener noreferrer" href="https://visualportfolio.co/pro/?utm_source=freeplugin&utm_medium=link&utm_campaign=plugin_settings&utm_content=2.10.4">' . esc_html__( 'Read More', 'visual-portfolio' ) . '</a>
490
  </div>
491
  </div>
492
  ',
classes/class-supported-themes.php CHANGED
@@ -74,7 +74,7 @@ class Visual_Portfolio_Supported_Themes {
74
  public function wp_enqueue_scripts() {
75
  $theme_compat = $this->get_theme_compatibility_style();
76
  if ( $theme_compat ) {
77
- wp_enqueue_style( $theme_compat['name'], $theme_compat['url'], array(), '2.10.3' );
78
  wp_style_add_data( $theme_compat['name'], 'rtl', 'replace' );
79
  wp_style_add_data( $theme_compat['name'], 'suffix', '.min' );
80
  }
74
  public function wp_enqueue_scripts() {
75
  $theme_compat = $this->get_theme_compatibility_style();
76
  if ( $theme_compat ) {
77
+ wp_enqueue_style( $theme_compat['name'], $theme_compat['url'], array(), '2.10.4' );
78
  wp_style_add_data( $theme_compat['name'], 'rtl', 'replace' );
79
  wp_style_add_data( $theme_compat['name'], 'suffix', '.min' );
80
  }
gutenberg/components/controls-render/index.js CHANGED
@@ -463,7 +463,7 @@ ControlsRender.Control = function( props ) {
463
  { renderControlHelp ? (
464
  <p>{ renderControlHelp }</p>
465
  ) : '' }
466
- <ProNote.Button target="_blank" rel="noopener noreferrer" href="https://visualportfolio.co/pro/?utm_source=freeplugin&amp;utm_medium=link&amp;utm_campaign=block_settings&amp;utm_content=2.10.3">
467
  { __( 'Read More', 'visual-portfolio' ) }
468
  </ProNote.Button>
469
  </ProNote>
463
  { renderControlHelp ? (
464
  <p>{ renderControlHelp }</p>
465
  ) : '' }
466
+ <ProNote.Button target="_blank" rel="noopener noreferrer" href="https://visualportfolio.co/pro/?utm_source=freeplugin&amp;utm_medium=link&amp;utm_campaign=block_settings&amp;utm_content=2.10.4">
467
  { __( 'Read More', 'visual-portfolio' ) }
468
  </ProNote.Button>
469
  </ProNote>
languages/visual-portfolio.pot CHANGED
@@ -770,83 +770,83 @@ msgstr ""
770
  msgid "Current Query"
771
  msgstr ""
772
 
773
- #: dist/visual-portfolio/classes/class-assets.php:566
774
  msgid "Couldn't retrieve Visual Portfolio ID."
775
  msgstr ""
776
 
777
- #: dist/visual-portfolio/classes/class-assets.php:568
778
  msgid "Close (Esc)"
779
  msgstr ""
780
 
781
- #: dist/visual-portfolio/classes/class-assets.php:569, dist/visual-portfolio/classes/class-assets.php:587
782
  msgid "Share"
783
  msgstr ""
784
 
785
- #: dist/visual-portfolio/classes/class-assets.php:570
786
  msgid "Toggle fullscreen"
787
  msgstr ""
788
 
789
- #: dist/visual-portfolio/classes/class-assets.php:571
790
  msgid "Zoom in/out"
791
  msgstr ""
792
 
793
- #: dist/visual-portfolio/classes/class-assets.php:572
794
  msgid "Previous (arrow left)"
795
  msgstr ""
796
 
797
- #: dist/visual-portfolio/classes/class-assets.php:573
798
  msgid "Next (arrow right)"
799
  msgstr ""
800
 
801
- #: dist/visual-portfolio/classes/class-assets.php:574
802
  msgid "Share on Facebook"
803
  msgstr ""
804
 
805
- #: dist/visual-portfolio/classes/class-assets.php:575
806
  msgid "Tweet"
807
  msgstr ""
808
 
809
- #: dist/visual-portfolio/classes/class-assets.php:576
810
  msgid "Pin it"
811
  msgstr ""
812
 
813
- #: dist/visual-portfolio/classes/class-assets.php:578
814
  msgid "Close"
815
  msgstr ""
816
 
817
- #: dist/visual-portfolio/classes/class-assets.php:579
818
  msgid "Next"
819
  msgstr ""
820
 
821
- #: dist/visual-portfolio/classes/class-assets.php:580
822
  msgid "Previous"
823
  msgstr ""
824
 
825
- #: dist/visual-portfolio/classes/class-assets.php:581
826
  msgid "The requested content cannot be loaded. <br /> Please try again later."
827
  msgstr ""
828
 
829
- #: dist/visual-portfolio/classes/class-assets.php:582
830
  msgid "Start slideshow"
831
  msgstr ""
832
 
833
- #: dist/visual-portfolio/classes/class-assets.php:583
834
  msgid "Pause slideshow"
835
  msgstr ""
836
 
837
- #: dist/visual-portfolio/classes/class-assets.php:584
838
  msgid "Full screen"
839
  msgstr ""
840
 
841
- #: dist/visual-portfolio/classes/class-assets.php:585
842
  msgid "Thumbnails"
843
  msgstr ""
844
 
845
- #: dist/visual-portfolio/classes/class-assets.php:586
846
  msgid "Download"
847
  msgstr ""
848
 
849
- #: dist/visual-portfolio/classes/class-assets.php:588
850
  msgid "Zoom"
851
  msgstr ""
852
 
@@ -872,7 +872,7 @@ msgctxt "Post Type Singular Name"
872
  msgid "Portfolio Item"
873
  msgstr ""
874
 
875
- #: dist/visual-portfolio/classes/class-custom-post-type.php:72, dist/visual-portfolio/classes/class-custom-post-type.php:166, dist/visual-portfolio/classes/class-custom-post-type.php:511, dist/visual-portfolio/classes/3rd/class-elementor-widget.php:68, dist/visual-portfolio/classes/3rd/class-vc.php:65
876
  msgid "Visual Portfolio"
877
  msgstr ""
878
 
@@ -967,71 +967,71 @@ msgstr ""
967
  msgid "Show All %s"
968
  msgstr ""
969
 
970
- #: dist/visual-portfolio/classes/class-custom-post-type.php:265
971
  msgid "Portfolio Manager"
972
  msgstr ""
973
 
974
- #: dist/visual-portfolio/classes/class-custom-post-type.php:270
975
  msgid "Portfolio Author"
976
  msgstr ""
977
 
978
- #: dist/visual-portfolio/classes/class-custom-post-type.php:355
979
  msgid "Thumbnail"
980
  msgstr ""
981
 
982
- #: dist/visual-portfolio/classes/class-custom-post-type.php:393
983
  msgid "When to use Saved Layouts"
984
  msgstr ""
985
 
986
  #. translators: %s - url to documentation.
987
- #: dist/visual-portfolio/classes/class-custom-post-type.php:398
988
  msgid "If you are using the Gutenberg page builder for your pages and posts, you should <strong>avoid using Saved Layouts</strong>. See here more info about <a href=\"%s\" target=\"_blank\">Visual Portfolio Blocks</a>."
989
  msgstr ""
990
 
991
  #. translators: %s - url to documentation.
992
- #: dist/visual-portfolio/classes/class-custom-post-type.php:404
993
  msgid "To reuse blocks, you can use the built-in Gutenberg feature - <a href=\"%s\" target=\"_blank\">Reusable Blocks</a>."
994
  msgstr ""
995
 
996
  #. translators: %s - url to documentation.
997
- #: dist/visual-portfolio/classes/class-custom-post-type.php:410
998
  msgid "Saved Layouts may be only used for 3rd-party builders only (such as Elementor, WPBakery Page Builder, etc), <a href=\"%s\" target=\"_blank\">read more info in documentation</a>. Since WordPress moved from Shortcodes to Blocks system, we prepared for you advanced blocks."
999
  msgstr ""
1000
 
1001
- #: dist/visual-portfolio/classes/class-custom-post-type.php:427
1002
  msgid "Icon"
1003
  msgstr ""
1004
 
1005
- #: dist/visual-portfolio/classes/class-custom-post-type.php:435
1006
  msgid "Shortcode"
1007
  msgstr ""
1008
 
1009
- #: dist/visual-portfolio/classes/class-custom-post-type.php:610, dist/visual-portfolio/classes/class-custom-post-type.php:611
1010
  msgid "Documentation"
1011
  msgstr ""
1012
 
1013
- #: dist/visual-portfolio/classes/class-get-portfolio.php:1790
1014
  msgid "Default sorting"
1015
  msgstr ""
1016
 
1017
- #: dist/visual-portfolio/classes/class-get-portfolio.php:1791
1018
  msgid "Sort by date (newest)"
1019
  msgstr ""
1020
 
1021
- #: dist/visual-portfolio/classes/class-get-portfolio.php:1792
1022
  msgid "Sort by date (oldest)"
1023
  msgstr ""
1024
 
1025
- #: dist/visual-portfolio/classes/class-get-portfolio.php:1793
1026
  msgid "Sort by title (A-Z)"
1027
  msgstr ""
1028
 
1029
- #: dist/visual-portfolio/classes/class-get-portfolio.php:1794
1030
  msgid "Sort by title (Z-A)"
1031
  msgstr ""
1032
 
1033
  #. translators: %s - published in human format.
1034
- #: dist/visual-portfolio/classes/class-get-portfolio.php:1906
1035
  msgid "%s ago"
1036
  msgstr ""
1037
 
@@ -1067,7 +1067,7 @@ msgstr ""
1067
  msgid "Settings"
1068
  msgstr ""
1069
 
1070
- #: dist/visual-portfolio/classes/class-settings.php:131, dist/visual-portfolio/classes/3rd/class-elementor-widget.php:148
1071
  msgid "General"
1072
  msgstr ""
1073
 
@@ -1297,26 +1297,26 @@ msgstr ""
1297
  msgid "This feature available in PRO plugin only"
1298
  msgstr ""
1299
 
1300
- #: dist/visual-portfolio/classes/3rd/class-elementor-widget.php:156, dist/visual-portfolio/classes/3rd/class-vc.php:72
 
 
 
 
1301
  msgid "Select Layout"
1302
  msgstr ""
1303
 
1304
- #: dist/visual-portfolio/classes/3rd/class-vc.php:80
1305
  msgid "Custom Classes"
1306
  msgstr ""
1307
 
1308
- #: dist/visual-portfolio/classes/3rd/class-vc.php:87
1309
  msgid "CSS"
1310
  msgstr ""
1311
 
1312
- #: dist/visual-portfolio/classes/3rd/class-vc.php:89
1313
  msgid "Design Options"
1314
  msgstr ""
1315
 
1316
- #: dist/visual-portfolio/templates/items-list/wrapper-start.php:34
1317
- msgid "Visual Portfolio, Posts & Image Gallery for WordPress"
1318
- msgstr ""
1319
-
1320
  #: dist/visual-portfolio/templates/items-list/item-parts/meta-author.php:32
1321
  msgid "Author"
1322
  msgstr ""
770
  msgid "Current Query"
771
  msgstr ""
772
 
773
+ #: dist/visual-portfolio/classes/class-assets.php:572
774
  msgid "Couldn't retrieve Visual Portfolio ID."
775
  msgstr ""
776
 
777
+ #: dist/visual-portfolio/classes/class-assets.php:574
778
  msgid "Close (Esc)"
779
  msgstr ""
780
 
781
+ #: dist/visual-portfolio/classes/class-assets.php:575, dist/visual-portfolio/classes/class-assets.php:593
782
  msgid "Share"
783
  msgstr ""
784
 
785
+ #: dist/visual-portfolio/classes/class-assets.php:576
786
  msgid "Toggle fullscreen"
787
  msgstr ""
788
 
789
+ #: dist/visual-portfolio/classes/class-assets.php:577
790
  msgid "Zoom in/out"
791
  msgstr ""
792
 
793
+ #: dist/visual-portfolio/classes/class-assets.php:578
794
  msgid "Previous (arrow left)"
795
  msgstr ""
796
 
797
+ #: dist/visual-portfolio/classes/class-assets.php:579
798
  msgid "Next (arrow right)"
799
  msgstr ""
800
 
801
+ #: dist/visual-portfolio/classes/class-assets.php:580
802
  msgid "Share on Facebook"
803
  msgstr ""
804
 
805
+ #: dist/visual-portfolio/classes/class-assets.php:581
806
  msgid "Tweet"
807
  msgstr ""
808
 
809
+ #: dist/visual-portfolio/classes/class-assets.php:582
810
  msgid "Pin it"
811
  msgstr ""
812
 
813
+ #: dist/visual-portfolio/classes/class-assets.php:584
814
  msgid "Close"
815
  msgstr ""
816
 
817
+ #: dist/visual-portfolio/classes/class-assets.php:585
818
  msgid "Next"
819
  msgstr ""
820
 
821
+ #: dist/visual-portfolio/classes/class-assets.php:586
822
  msgid "Previous"
823
  msgstr ""
824
 
825
+ #: dist/visual-portfolio/classes/class-assets.php:587
826
  msgid "The requested content cannot be loaded. <br /> Please try again later."
827
  msgstr ""
828
 
829
+ #: dist/visual-portfolio/classes/class-assets.php:588
830
  msgid "Start slideshow"
831
  msgstr ""
832
 
833
+ #: dist/visual-portfolio/classes/class-assets.php:589
834
  msgid "Pause slideshow"
835
  msgstr ""
836
 
837
+ #: dist/visual-portfolio/classes/class-assets.php:590
838
  msgid "Full screen"
839
  msgstr ""
840
 
841
+ #: dist/visual-portfolio/classes/class-assets.php:591
842
  msgid "Thumbnails"
843
  msgstr ""
844
 
845
+ #: dist/visual-portfolio/classes/class-assets.php:592
846
  msgid "Download"
847
  msgstr ""
848
 
849
+ #: dist/visual-portfolio/classes/class-assets.php:594
850
  msgid "Zoom"
851
  msgstr ""
852
 
872
  msgid "Portfolio Item"
873
  msgstr ""
874
 
875
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:72, dist/visual-portfolio/classes/class-custom-post-type.php:166, dist/visual-portfolio/classes/class-custom-post-type.php:516, dist/visual-portfolio/classes/3rd/plugins/class-elementor-widget.php:68, dist/visual-portfolio/classes/3rd/plugins/class-vc.php:65
876
  msgid "Visual Portfolio"
877
  msgstr ""
878
 
967
  msgid "Show All %s"
968
  msgstr ""
969
 
970
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:270
971
  msgid "Portfolio Manager"
972
  msgstr ""
973
 
974
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:275
975
  msgid "Portfolio Author"
976
  msgstr ""
977
 
978
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:360
979
  msgid "Thumbnail"
980
  msgstr ""
981
 
982
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:398
983
  msgid "When to use Saved Layouts"
984
  msgstr ""
985
 
986
  #. translators: %s - url to documentation.
987
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:403
988
  msgid "If you are using the Gutenberg page builder for your pages and posts, you should <strong>avoid using Saved Layouts</strong>. See here more info about <a href=\"%s\" target=\"_blank\">Visual Portfolio Blocks</a>."
989
  msgstr ""
990
 
991
  #. translators: %s - url to documentation.
992
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:409
993
  msgid "To reuse blocks, you can use the built-in Gutenberg feature - <a href=\"%s\" target=\"_blank\">Reusable Blocks</a>."
994
  msgstr ""
995
 
996
  #. translators: %s - url to documentation.
997
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:415
998
  msgid "Saved Layouts may be only used for 3rd-party builders only (such as Elementor, WPBakery Page Builder, etc), <a href=\"%s\" target=\"_blank\">read more info in documentation</a>. Since WordPress moved from Shortcodes to Blocks system, we prepared for you advanced blocks."
999
  msgstr ""
1000
 
1001
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:432
1002
  msgid "Icon"
1003
  msgstr ""
1004
 
1005
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:440
1006
  msgid "Shortcode"
1007
  msgstr ""
1008
 
1009
+ #: dist/visual-portfolio/classes/class-custom-post-type.php:615, dist/visual-portfolio/classes/class-custom-post-type.php:616
1010
  msgid "Documentation"
1011
  msgstr ""
1012
 
1013
+ #: dist/visual-portfolio/classes/class-get-portfolio.php:1849
1014
  msgid "Default sorting"
1015
  msgstr ""
1016
 
1017
+ #: dist/visual-portfolio/classes/class-get-portfolio.php:1850
1018
  msgid "Sort by date (newest)"
1019
  msgstr ""
1020
 
1021
+ #: dist/visual-portfolio/classes/class-get-portfolio.php:1851
1022
  msgid "Sort by date (oldest)"
1023
  msgstr ""
1024
 
1025
+ #: dist/visual-portfolio/classes/class-get-portfolio.php:1852
1026
  msgid "Sort by title (A-Z)"
1027
  msgstr ""
1028
 
1029
+ #: dist/visual-portfolio/classes/class-get-portfolio.php:1853
1030
  msgid "Sort by title (Z-A)"
1031
  msgstr ""
1032
 
1033
  #. translators: %s - published in human format.
1034
+ #: dist/visual-portfolio/classes/class-get-portfolio.php:1965
1035
  msgid "%s ago"
1036
  msgstr ""
1037
 
1067
  msgid "Settings"
1068
  msgstr ""
1069
 
1070
+ #: dist/visual-portfolio/classes/class-settings.php:131, dist/visual-portfolio/classes/3rd/plugins/class-elementor-widget.php:148
1071
  msgid "General"
1072
  msgstr ""
1073
 
1297
  msgid "This feature available in PRO plugin only"
1298
  msgstr ""
1299
 
1300
+ #: dist/visual-portfolio/templates/items-list/wrapper-start.php:34
1301
+ msgid "Visual Portfolio, Posts & Image Gallery for WordPress"
1302
+ msgstr ""
1303
+
1304
+ #: dist/visual-portfolio/classes/3rd/plugins/class-elementor-widget.php:156, dist/visual-portfolio/classes/3rd/plugins/class-vc.php:72
1305
  msgid "Select Layout"
1306
  msgstr ""
1307
 
1308
+ #: dist/visual-portfolio/classes/3rd/plugins/class-vc.php:80
1309
  msgid "Custom Classes"
1310
  msgstr ""
1311
 
1312
+ #: dist/visual-portfolio/classes/3rd/plugins/class-vc.php:87
1313
  msgid "CSS"
1314
  msgstr ""
1315
 
1316
+ #: dist/visual-portfolio/classes/3rd/plugins/class-vc.php:89
1317
  msgid "Design Options"
1318
  msgstr ""
1319
 
 
 
 
 
1320
  #: dist/visual-portfolio/templates/items-list/item-parts/meta-author.php:32
1321
  msgid "Author"
1322
  msgstr ""
readme.md CHANGED
@@ -5,7 +5,7 @@
5
  * Requires at least: 5.4
6
  * Tested up to: 5.6
7
  * Requires PHP: 5.5.9
8
- * Stable tag: 2.10.3
9
  * License: GPLv2 or later
10
  * License URI: <http://www.gnu.org/licenses/gpl-2.0.html>
11
 
@@ -290,6 +290,20 @@ For more information, feel free to visit [Visual Portfolio official website](htt
290
 
291
  ## Changelog ##
292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  = 2.10.3 =
294
 
295
  * fixed Elementor widget PHP error
5
  * Requires at least: 5.4
6
  * Tested up to: 5.6
7
  * Requires PHP: 5.5.9
8
+ * Stable tag: 2.10.4
9
  * License: GPLv2 or later
10
  * License URI: <http://www.gnu.org/licenses/gpl-2.0.html>
11
 
290
 
291
  ## Changelog ##
292
 
293
+ = 2.10.4 =
294
+
295
+ * added more image extensions support for popup gallery (tif, jfif, jpe, svg)
296
+ * changed images output to separate template include, no more needed `image_allowed_html` config
297
+ * removed color overlay from lazyloaded image (we saw it in the transparent PNG images, even if it does not needed)
298
+ * fixed Health Check loopback error on some hosts
299
+ * fixed role caps update after WordPress updated
300
+ * fixed Lazy Load conflicts in 3rd-party code:
301
+ * Avada theme
302
+ * EWWW Image Optimizer plugin
303
+ * A3 Lazy Load plugin
304
+ * Lazy Loader plugin
305
+ * renamed `lazy-sizes-config` file to prevent conflicts with some security plugins
306
+
307
  = 2.10.3 =
308
 
309
  * fixed Elementor widget PHP error
templates/items-list/item-parts/image.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Item image template.
4
+ *
5
+ * @var $args
6
+ *
7
+ * @package visual-portfolio
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ if ( ! isset( $args['image'] ) || ! $args['image'] ) {
15
+ return;
16
+ }
17
+
18
+ // phpcs:ignore
19
+ echo $args['image'];
templates/items-list/items-style/emerge/image.php CHANGED
@@ -26,7 +26,14 @@ $link_data = array(
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
- <?php echo wp_kses( $args['image'], $args['image_allowed_html'] ); ?>
 
 
 
 
 
 
 
30
  <div class="vp-portfolio__item-img-overlay"></div>
31
 
32
  <?php visual_portfolio()->include_template( 'global/link-end', $link_data ); ?>
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
+ <?php
30
+ // Show Image.
31
+ visual_portfolio()->include_template(
32
+ 'items-list/item-parts/image',
33
+ array( 'image' => $args['image'] )
34
+ );
35
+ ?>
36
+
37
  <div class="vp-portfolio__item-img-overlay"></div>
38
 
39
  <?php visual_portfolio()->include_template( 'global/link-end', $link_data ); ?>
templates/items-list/items-style/fade/image.php CHANGED
@@ -26,7 +26,13 @@ $link_data = array(
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
- <?php echo wp_kses( $args['image'], $args['image_allowed_html'] ); ?>
 
 
 
 
 
 
30
 
31
  <?php visual_portfolio()->include_template( 'global/link-end', $link_data ); ?>
32
  </div>
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
+ <?php
30
+ // Show Image.
31
+ visual_portfolio()->include_template(
32
+ 'items-list/item-parts/image',
33
+ array( 'image' => $args['image'] )
34
+ );
35
+ ?>
36
 
37
  <?php visual_portfolio()->include_template( 'global/link-end', $link_data ); ?>
38
  </div>
templates/items-list/items-style/fly/image.php CHANGED
@@ -26,7 +26,13 @@ $link_data = array(
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
- <?php echo wp_kses( $args['image'], $args['image_allowed_html'] ); ?>
 
 
 
 
 
 
30
 
31
  <?php visual_portfolio()->include_template( 'global/link-end', $link_data ); ?>
32
  </div>
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
+ <?php
30
+ // Show Image.
31
+ visual_portfolio()->include_template(
32
+ 'items-list/item-parts/image',
33
+ array( 'image' => $args['image'] )
34
+ );
35
+ ?>
36
 
37
  <?php visual_portfolio()->include_template( 'global/link-end', $link_data ); ?>
38
  </div>
templates/items-list/items-style/image.php CHANGED
@@ -26,7 +26,13 @@ $link_data = array(
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
- <?php echo wp_kses( $args['image'], $args['image_allowed_html'] ); ?>
 
 
 
 
 
 
30
 
31
  <div class="vp-portfolio__item-img-overlay">
32
  <?php
26
  <div class="vp-portfolio__item-img">
27
  <?php visual_portfolio()->include_template( 'global/link-start', $link_data ); ?>
28
 
29
+ <?php
30
+ // Show Image.
31
+ visual_portfolio()->include_template(
32
+ 'items-list/item-parts/image',
33
+ array( 'image' => $args['image'] )
34
+ );
35
+ ?>
36
 
37
  <div class="vp-portfolio__item-img-overlay">
38
  <?php
templates/items-list/layouts/slider/thumbnails.php CHANGED
@@ -28,8 +28,11 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  <div class="vp-portfolio__thumbnail-img-wrap">
29
  <div class="vp-portfolio__thumbnail-img">
30
  <?php
31
- // phpcs:ignore
32
- echo Visual_Portfolio_Images::get_attachment_image( $image_id, $img_size );
 
 
 
33
  ?>
34
  </div>
35
  </div>
28
  <div class="vp-portfolio__thumbnail-img-wrap">
29
  <div class="vp-portfolio__thumbnail-img">
30
  <?php
31
+ // Show Image.
32
+ visual_portfolio()->include_template(
33
+ 'items-list/item-parts/image',
34
+ array( 'image' => Visual_Portfolio_Images::get_attachment_image( $image_id, $img_size ) )
35
+ );
36
  ?>
37
  </div>
38
  </div>