Version Description
Download this release
Release Info
Developer | nko |
Plugin | Visual Portfolio, Photo Gallery & Post Grid |
Version | 1.16.0 |
Comparing to | |
See all releases |
Code changes from version 1.15.1 to 1.16.0
- assets/admin/css/layouts-editor.min.css +1 -1
- assets/admin/images/icon-gray.svg +13 -13
- assets/admin/images/icon-mce.svg +13 -13
- assets/admin/js/elementor.js +1 -1
- assets/admin/js/gutenberg-block.min.js +1 -1
- assets/admin/js/layouts-editor.js +29 -2
- assets/admin/js/layouts-editor.min.js +1 -1
- assets/admin/js/mce-dropdown.js +1 -1
- assets/admin/js/script.js +1 -1
- assets/admin/js/vc-frontend.js +1 -1
- assets/css/main.min.css +1 -1
- assets/js/layout-grid.js +100 -0
- assets/js/layout-grid.min.js +1 -1
- assets/js/main.js +92 -64
- assets/js/main.min.js +1 -1
- assets/js/script-preview.js +12 -1
- assets/js/script-preview.min.js +1 -1
- assets/vendor/conditionize/conditionize.min.js.map +1 -1
- class-visual-portfolio.php +29 -28
- classes/class-admin.php +617 -572
- classes/class-assets.php +54 -41
- classes/class-controls.php +77 -75
- classes/class-elementor-widget.php +42 -16
- classes/class-extend.php +18 -2
- classes/class-get-portfolio.php +324 -249
- classes/class-images.php +51 -80
- classes/class-migration.php +2 -3
- classes/class-preview.php +19 -11
- classes/class-rest.php +13 -10
- classes/class-settings.php +28 -28
- classes/class-shortcode.php +10 -7
- classes/class-tinymce.php +1 -2
- classes/class-vc.php +9 -9
- languages/visual-portfolio.pot +218 -213
- readme.md +25 -6
- templates/items-list/filter/dropdown/filter.php +1 -0
- templates/items-list/filter/filter.php +1 -0
- templates/items-list/items-style/emerge/meta.php +4 -0
- templates/items-list/items-style/fade/meta.php +6 -0
- templates/items-list/items-style/fly/meta.php +6 -0
- templates/items-list/items-style/meta.php +4 -0
- templates/items-list/pagination/paged.php +1 -0
- templates/items-list/sort/dropdown/sort.php +1 -0
- templates/items-list/sort/sort.php +1 -0
- vendors/class-settings-api.php +1 -1
assets/admin/css/layouts-editor.min.css
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
* Name : Visual Portfolio
|
3 |
* Version : @@plugin_version
|
4 |
* Author : nK https://nkdev.info
|
5 |
-
*/.post-type-vp_lists.post-php,.post-type-vp_lists.post-new-php{background-color:#edeff0}.post-type-vp_lists.post-php #wpcontent,.post-type-vp_lists.post-new-php #wpcontent{padding-left:0}.post-type-vp_lists.post-php .wrap,.post-type-vp_lists.post-new-php .wrap{margin:0}.post-type-vp_lists.post-php #poststuff,.post-type-vp_lists.post-new-php #poststuff{padding-top:0}.post-type-vp_lists.post-php #wpfooter,.post-type-vp_lists.post-new-php #wpfooter{display:none}.post-type-vp_lists.post-php #wpbody-content,.post-type-vp_lists.post-new-php #wpbody-content{padding-bottom:0}.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:fixed;top:0;right:300px;bottom:0;width:300px;overflow:auto;-webkit-overflow-scrolling:touch}html.wp-toolbar .post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,html.wp-toolbar .post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{top:32px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:relative;top:auto;right:auto;bottom:auto;width:100%;margin-right:0}}.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{position:absolute;top:0;right:0;bottom:0;left:0;width:calc(100% - 300px);min-height:calc(100vh - 32px);overflow:auto;-webkit-overflow-scrolling:touch}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{right:0;bottom:auto;width:100%}}.post-type-vp_lists.post-php .columns-2 #side-sortables,.post-type-vp_lists.post-new-php .columns-2 #side-sortables{width:auto}.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin:0;margin-right:300px;margin-bottom:1px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin-right:0}}.post-type-vp_lists.post-php #poststuff .postbox,.post-type-vp_lists.post-new-php #poststuff .postbox{margin-bottom:0;border-color:#e2e4e7;border-top:0;border-right:0}.post-type-vp_lists.post-php #poststuff .postbox>h2,.post-type-vp_lists.post-new-php #poststuff .postbox>h2{padding:15px;border-bottom:none}.post-type-vp_lists.post-php #poststuff .postbox>.handlediv,.post-type-vp_lists.post-new-php #poststuff .postbox>.handlediv{height:50px}.post-type-vp_lists.post-php #poststuff .postbox>.inside,.post-type-vp_lists.post-new-php #poststuff .postbox>.inside{padding:15px;padding-top:0}.post-type-vp_lists.post-php.rtl #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php.rtl #post-body.columns-2 #postbox-container-1{right:auto;left:300px}.vp-control{display:-webkit-box;display:flex;flex-wrap:wrap;-webkit-box-align:center;align-items:center;margin-bottom:19px}.vp-control>label{width:100%;margin-bottom:5px}.vp-control>.vp-control-description{width:100%;margin:2px 0 5px;font-size:13px;font-style:italic;color:#666}.vp-control.vp-control-checkbox,.vp-control.vp-control-toggle{flex-wrap:nowrap}.vp-control.vp-control-checkbox>label,.vp-control.vp-control-toggle>label{margin-bottom:0}.vp-control.vp-control-textarea textarea{width:100%}.vp-image-picker{display:none}.vp-image-picker,.vp-image-picker *{box-sizing:border-box}.vp-image-picker+ul.thumbnails.image_picker_selector li{margin:0 10px 10px 0}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:0;cursor:pointer;border:none}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail img{display:block;border:2px solid transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected{background-color:transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected img{border-color:#0073aa}.vp-image-picker+ul.thumbnails.image_picker_selector .group_title{padding-top:5px;padding-left:5px;font-weight:500}.vp-control-range [type="number"]{width:50px;margin-left:10px}.vp-control-range [type="range"]{-webkit-box-flex:1;flex:1;width:100%;padding:0;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vp-control-range [type="range"]::-webkit-slider-thumb{box-sizing:border-box;width:18px;height:18px;margin-top:-7px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%;-webkit-appearance:none;appearance:none}.vp-control-range [type="range"]::-moz-range-thumb{box-sizing:border-box;width:18px;height:18px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%}.vp-control-range [type="range"]::-ms-thumb{box-sizing:border-box;width:14px;height:14px;margin-top:0;cursor:pointer;background:#555d66;background-clip:padding-box;border:2px solid transparent;border-radius:50%}.vp-control-range [type="range"]:focus{outline:none}.vp-control-range [type="range"]:focus::-webkit-slider-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-moz-range-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-ms-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]::-webkit-slider-runnable-track{height:3px;margin-top:-4px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-moz-range-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-ms-track{height:3px;margin-top:-4px;color:transparent;cursor:pointer;background:#e2e4e7;border-color:transparent;border-radius:1.5px}.vp-control-toggle,.vp-control-toggle *{box-sizing:border-box}.vp-control-toggle .vp-toggle{position:relative}.vp-control-toggle .vp-toggle .vp-toggle__track{content:"";display:inline-block;box-sizing:border-box;width:36px;height:18px;vertical-align:top;background-color:#fff;border:2px solid #6c7781;border-radius:9px;-webkit-transition:background .2s ease;transition:background .2s ease}.vp-control-toggle .vp-toggle .vp-toggle__track::after{content:"";position:absolute;display:block;top:50%;right:5px;width:3px;height:3px;margin-top:-3px;border:1.5px solid #6c7781;border-radius:3px}.vp-control-toggle .vp-toggle:hover .vp-toggle__track{background-color:#e2e4e7}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track{background-color:#33b3db;border:2px solid #33b3db}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track::after{top:50%;right:auto;left:8px;width:0;height:5px;margin-top:-3px;border:0;border-right:2px solid #fff;border-radius:0}.vp-control-toggle .vp-toggle .vp-toggle__thumb{position:absolute;display:block;top:4px;left:4px;width:10px;height:10px;background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;-webkit-transition:-webkit-transform .1s ease;transition:-webkit-transform .1s ease;transition:transform .1s ease;transition:transform .1s ease, -webkit-transform .1s ease}.vp-control-toggle .vp-toggle [type="checkbox"]:focus ~ .vp-toggle__track{box-shadow:0 0 0 2px #fff, 0 0 0 3px #6c7781}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__thumb{background-color:#fff;border-width:0;-webkit-transform:translateX(18px);transform:translateX(18px)}.vp-control-toggle .vp-toggle [type="checkbox"]{position:absolute;top:0;left:0;width:100%;height:100%;padding:0;margin:0;opacity:0;z-index:1}.vp-control-image-dropdown{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;width:100%;padding:5px 7px;cursor:pointer;background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-control-image-dropdown,.vp-control-image-dropdown *{box-sizing:border-box}.vp-control-image-dropdown::before{content:"";position:absolute;display:block;top:50%;right:6px;width:0;height:0;margin-top:-2px;border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px}.vp-control-image-dropdown.active::before{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.vp-control-image-dropdown .vp-control-image-dropdown__preview{display:block;-webkit-box-flex:0;flex:0 0 auto;width:32px}.vp-control-image-dropdown .vp-control-image-dropdown__preview img{display:block;width:100%;height:auto}.vp-control-image-dropdown .vp-control-image-dropdown__title{-webkit-box-flex:1;flex:1;padding-left:10px}.vp-control-image-dropdown .vp-control-image-dropdown__content{position:absolute;display:none;top:100%;left:0;width:100%;max-width:285px;margin-top:7px;margin-left:-1px;cursor:default;background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,0.04);z-index:1}.vp-control-image-dropdown .vp-control-image-dropdown__content>div{width:100%;max-height:250px;padding:4px;overflow:auto}.vp-control-image-dropdown .vp-control-image-dropdown__content::before{content:"";position:absolute;display:block;top:-5px;left:10px;width:0;height:0;border-right:5px solid transparent;border-bottom:5px solid #e5e5e5;border-left:5px solid transparent}.vp-control-image-dropdown .vp-control-image-dropdown__content::after{content:"";position:absolute;display:block;top:-7px;right:0;left:0;height:7px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector .group>ul{display:-webkit-box;display:flex;flex-wrap:wrap}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li{display:block;-webkit-box-flex:0;flex:0 0 25%;float:none;max-width:25%;margin:0}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group_title{-webkit-box-flex:0;flex:0 0 100%;max-width:100%}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:3px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li img{width:100%;height:auto}.vp-control-image-dropdown.active .vp-control-image-dropdown__content{display:block}.vp_list_preview{padding:0 12px;margin-right:-12px;margin-left:-12px}.vp_list_preview iframe{width:100%;min-height:120px;-webkit-transition:height .3s;transition:height .3s}.vp-content-source{display:-webkit-box;display:flex;flex-wrap:wrap;padding-right:9px;padding-left:9px;margin-right:-15px;margin-left:-15px}.vp-content-source .vp-content-source__item{position:relative;width:70px;height:50px;padding:12px;margin:0 5px;color:#6c7781;text-align:center;cursor:pointer;border:1px solid transparent;border-radius:3px}.vp-content-source .vp-content-source__item.active,.vp-content-source .vp-content-source__item:hover{color:#555;background-color:#ecf0f4}.vp-content-source .vp-content-source__item.active{color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-content-source .vp-content-source__item .vp-content-source__item-icon>span{width:24px;height:24px;margin-top:2px;font-size:24px}.vp-content-source .vp-content-source__item .vp-content-source__item-title{position:absolute;top:58%;right:8px;left:8px;font-weight:500}.vp-content-source .vp-content-source__item-content{-webkit-box-flex:1;flex:1;min-width:100%}.vp-content-source .vp-content-source__item-content>div{position:relative;display:none;padding:0 15px;padding-bottom:1px;margin-top:12px;margin-right:-9px;margin-bottom:-14px;margin-left:-9px;overflow:hidden;background-color:#f9f9fa;border-top:1px solid #eee}.vp-content-source .vp-content-source__item-content>div:empty{display:none !important}.vp-content-source .vp-content-source__item-content>div.active{display:block}.vp-select2{width:100%}.vp-select2+.select2{width:100%}.post-attributes-label+.vp-select2+.select2{margin-top:5px}.vp-select2+.select2 ul,.vp-select2+.select2 li{margin-bottom:0}.vp-select2+.select2 .select2-selection{border:1px solid #ddd;border-radius:0;box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-select2+.select2.select2-container--open .select2-selection{outline:none}.vp-select2+.select2 .select2-selection--multiple{min-height:27px}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice{padding:3px 8px;margin-top:3px;color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice__remove{float:right;margin-right:0;margin-left:3px;color:inherit;opacity:.5}.select2-vp-container ul,.select2-vp-container li{margin-bottom:0}.select2-vp-container .select2-dropdown{border-color:#ddd}.select2-vp-container .select2-search--dropdown .select2-search__field{padding:3px 4px;border:1px solid #ddd;outline:none;box-shadow:none}.select2-vp-container .select2-results__option[aria-selected="true"]{background-color:#efeeee}.select2-vp-container .select2-results__option--highlighted[aria-selected]{background-color:#33b3db}.vp-select2-ajax__result{display:-webkit-box;display:flex;-webkit-box-flex:0;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap}.vp-select2-ajax__result .vp-select2-ajax__result-img{position:relative;-webkit-box-flex:0;flex:0 0 35px;background-color:rgba(0,0,0,0.1);background-position:center center;background-size:cover;border-radius:3px}.vp-select2-ajax__result .vp-select2-ajax__result-img::after{content:"";display:block;width:100%;padding-top:100%}.vp-select2-ajax__result .vp-select2-ajax__result-data{padding-left:10px}.vp-select2-ajax__result .vp-select2-ajax__result-title{font-size:16px;font-weight:500;line-height:1}.vp-select2-ajax__result .vp-select2-ajax__result-post-type{font-size:12px;opacity:.5}.vp-control-gallery{position:relative;border-bottom:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data{position:absolute;box-sizing:border-box;top:-15px;right:-365px;bottom:0;width:350px;padding:15px 13px;overflow:auto;background-color:#fff;border-left:1px solid #eaeaea;-webkit-transition:.15s right;transition:.15s right}.vp-control-gallery .vp-control-gallery-additional-data>div{-webkit-transition:.3s margin-top;transition:.3s margin-top}.vp-control-gallery .vp-control-gallery-additional-data>div>.vp-control:last-of-type{margin-bottom:0}.vp-control-gallery .vp-control-gallery-additional-data.active{right:-15px}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:335px}@media (max-width: 910px){.vp-control-gallery .vp-control-gallery-additional-data{position:relative;display:none;right:0;width:120%;height:auto;margin-bottom:30px;border:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data.active{display:block}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:-15px}}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview{display:-webkit-box;display:flex;padding:15px 13px;margin:-15px -13px;margin-bottom:15px;border-bottom:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image{margin-right:15px}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image img{display:block;width:70px;border-radius:3px;box-shadow:0 0 0 1px #fff, 0 0 0 2px #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-size{color:#8f9498}.vp-control-gallery .vp-control-gallery-items{display:-webkit-box;display:flex;flex-wrap:wrap;align-content:flex-start;width:120%;min-height:325px;padding:7px;margin:-12px;margin-bottom:0;overflow:auto;-webkit-transition:.15s margin-right;transition:.15s margin-right}.vp-control-gallery .vp-control-gallery-items::after{content:"";display:block;width:100%}.vp-control-gallery .vp-control-gallery-items>div{position:relative;display:block;width:calc(12.5% - 10px);margin:5px;cursor:move;cursor:-webkit-grab;cursor:grab;border-radius:3px}@media (max-width: 1350px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(14.22% - 10px)}}@media (max-width: 1250px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(16.66% - 10px)}}@media (max-width: 1100px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(25% - 10px)}}.vp-control-gallery .vp-control-gallery-items>div::after{content:"";display:block;padding-top:100%}.vp-control-gallery .vp-control-gallery-items>div.sortable-ghost{opacity:.4}.vp-control-gallery .vp-control-gallery-items>div img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove{position:absolute;top:-5px;right:-5px;width:20px;height:20px;color:#fff;cursor:pointer;visibility:hidden;background-color:#dc3232;border-radius:50%;opacity:0;-webkit-transition:.15s visibility, .15s opacity;transition:.15s visibility, .15s opacity}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove span{width:20px;height:20px;font-size:10px;line-height:20px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img:hover .vp-control-gallery-items-remove{visibility:visible;opacity:1}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img.active{box-shadow:0 0 0 1px #fff, 0 0 0 4px #33b3db}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;color:#6c7781;text-align:center;cursor:pointer;background-color:#fff;border:1px solid #ccd3da;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add>span{position:absolute;top:50%;left:50%;width:24px;height:24px;margin-top:-12px;margin-left:-12px;line-height:24px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add:hover{color:#555;background-color:#f7f7f7}.post-type-vp_lists .CodeMirror{width:100%;text-align:left;border:1px solid #ddd}.post-type-vp_lists .CodeMirror .CodeMirror-matchingbracket{color:inherit;background:rgba(255,150,0,0.3)}.post-type-vp_lists [class*="CodeMirror-lint-message"],.post-type-vp_lists .CodeMirror-lint-marker-multiple,.post-type-vp_lists [class*="CodeMirror-lint-marker"]{background-image:none}.post-type-vp_lists .CodeMirror-lint-marker-error,.post-type-vp_lists .CodeMirror-lint-marker-warning{cursor:help}.post-type-vp_lists .CodeMirror-lint-marker-multiple{position:absolute;top:0}.post-type-vp_lists [class*="CodeMirror-lint-marker"]::before{position:relative;top:-2px;font:400 18px/1 dashicons}.post-type-vp_lists [class*="CodeMirror-lint-message"]::before{position:absolute;left:16px;font:400 16px/1 dashicons}.post-type-vp_lists .CodeMirror-lint-message-error,.post-type-vp_lists .CodeMirror-lint-message-warning{padding:3px 12px 3px 28px;margin:5px 0 2px;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}.post-type-vp_lists .CodeMirror-lint-message-warning{background-color:#fff8e5;border-left:4px solid #ffb900}.post-type-vp_lists .CodeMirror-lint-message-warning::before,.post-type-vp_lists .CodeMirror-lint-marker-warning::before{content:"\f534";color:#f6a306}.post-type-vp_lists .CodeMirror-lint-message-error{background-color:#fbeaea;border-left:4px solid #dc3232}.post-type-vp_lists .CodeMirror-lint-message-error::before,.post-type-vp_lists .CodeMirror-lint-marker-error::before{content:"\f153";color:#dc3232}.post-type-vp_lists .CodeMirror-lint-tooltip{background:0 0;border:none;border-radius:0;direction:ltr}.post-type-vp_lists .CodeMirror-resizer{display:none;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;width:100%;height:20px;margin-top:-2px;font-size:13px;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fbfbfb}.post-type-vp_lists .CodeMirror-resizer::before{content:"\2261";position:absolute;left:50%;color:#999}.post-type-vp_lists .CodeMirror-resizer:hover{background:#f7f7f7}.post-type-vp_lists .CodeMirror-resizer:hover::before{color:#000}.post-type-vp_lists .CodeMirror ~ .CodeMirror-resizer{display:block}.vp-dom-tree-help code{display:inline-block;padding:2px 6px;line-height:1.2;color:#595d67;cursor:pointer;background-color:#dcdfe6;border-radius:3px;-webkit-transition:.15s background-color, .15s color;transition:.15s background-color, .15s color}.vp-dom-tree-help code:hover{color:#2a2c30;background-color:#bec4d1}.vp-dom-tree{padding:15px;padding-top:1px;padding-bottom:0;padding-left:0;font-family:monospace;color:#67666d;background-color:#f9f9fa;border:1px solid #ddd}.vp-dom-tree .spinner{float:none;margin-top:15px;margin-bottom:15px}.vp-dom-tree ul{position:relative;padding-left:15px;list-style:none}.vp-dom-tree .vp-dom-tree-node>div{position:relative;display:inline-block;line-height:1.6}.vp-dom-tree .vp-dom-tree-node-class{display:inline-block;padding:2px 6px;line-height:1.2;color:#595d67;cursor:pointer;background-color:#dcdfe6;border-radius:3px;-webkit-transition:.15s background-color, .15s color;transition:.15s background-color, .15s color}.vp-dom-tree .vp-dom-tree-node-class:hover{color:#2a2c30;background-color:#bec4d1}.vp-dom-tree .vp-dom-tree-node-class+.vp-dom-tree-node-class{margin-left:5px}.vp-dom-tree .vp-dom-tree-node-collapse{position:relative;display:inline-block;top:-1px;margin-right:5px;cursor:pointer;border-top:6px solid;border-right:4px solid transparent;border-left:4px solid transparent}.vp-dom-tree .vp-dom-tree-node-collapse::after{content:"";position:absolute;display:block;top:-12px;right:-10px;bottom:-7px;left:-10px}.vp-dom-tree .is-collapsed .vp-dom-tree-node-collapse{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vp-dom-tree .is-collapsed ~ .vp-dom-tree-child{display:none}.vp-dom-tree .vp-dom-tree-child{position:relative}.vp-dom-tree .vp-dom-tree-child::before{content:"";position:absolute;display:block;top:-3px;right:0;bottom:-3px;left:8px;background-color:#f0f0f1;border-radius:4px;opacity:0;-webkit-transition:.2s opacity;transition:.2s opacity}.vp-dom-tree .vp-dom-tree-node:hover ~ .vp-dom-tree-child::before{opacity:1}@media (max-width: 850px){.vp-steps__right,.vp-steps__step{float:none;width:100%}}.post-type-vp_lists #slugdiv,.post-type-vp_lists #postcustom{display:none}
|
2 |
* Name : Visual Portfolio
|
3 |
* Version : @@plugin_version
|
4 |
* Author : nK https://nkdev.info
|
5 |
+
*/.post-type-vp_lists.post-php,.post-type-vp_lists.post-new-php{background-color:#edeff0}.post-type-vp_lists.post-php #wpcontent,.post-type-vp_lists.post-new-php #wpcontent{padding-left:0}.post-type-vp_lists.post-php .wrap,.post-type-vp_lists.post-new-php .wrap{margin:0}.post-type-vp_lists.post-php #poststuff,.post-type-vp_lists.post-new-php #poststuff{padding-top:0}.post-type-vp_lists.post-php #wpfooter,.post-type-vp_lists.post-new-php #wpfooter{display:none}.post-type-vp_lists.post-php #wpbody-content,.post-type-vp_lists.post-new-php #wpbody-content{padding-bottom:0}.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:fixed;top:0;right:300px;bottom:0;width:300px;overflow:auto;-webkit-overflow-scrolling:touch}html.wp-toolbar .post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,html.wp-toolbar .post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{top:32px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:relative;top:auto;right:auto;bottom:auto;width:100%;margin-right:0}}.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{position:absolute;top:0;right:0;bottom:0;left:0;width:calc(100% - 300px);min-height:calc(100vh - 32px);overflow:auto;-webkit-overflow-scrolling:touch}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{right:0;bottom:auto;width:100%}}.post-type-vp_lists.post-php .columns-2 #side-sortables,.post-type-vp_lists.post-new-php .columns-2 #side-sortables{width:auto}.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin:0;margin-right:300px;margin-bottom:1px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin-right:0}}.post-type-vp_lists.post-php #poststuff .postbox,.post-type-vp_lists.post-new-php #poststuff .postbox{margin-bottom:0;border-color:#e2e4e7;border-top:0;border-right:0}.post-type-vp_lists.post-php #poststuff .postbox>h2,.post-type-vp_lists.post-new-php #poststuff .postbox>h2{padding:15px;border-bottom:none}.post-type-vp_lists.post-php #poststuff .postbox>.handlediv,.post-type-vp_lists.post-new-php #poststuff .postbox>.handlediv{height:50px}.post-type-vp_lists.post-php #poststuff .postbox>.inside,.post-type-vp_lists.post-new-php #poststuff .postbox>.inside{padding:15px;padding-top:0}.post-type-vp_lists.post-php.rtl #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php.rtl #post-body.columns-2 #postbox-container-1{right:auto;left:300px}.vp-control{display:-webkit-box;display:flex;flex-wrap:wrap;-webkit-box-align:center;align-items:center;margin-bottom:19px}.vp-control>label{width:100%;margin-bottom:5px}.vp-control>.vp-control-description{width:100%;margin:2px 0 5px;font-size:13px;font-style:italic;color:#666}.vp-control.vp-control-checkbox,.vp-control.vp-control-toggle{flex-wrap:nowrap}.vp-control.vp-control-checkbox>label,.vp-control.vp-control-toggle>label{margin-bottom:0}.vp-control.vp-control-textarea textarea{width:100%}.vp-image-picker{display:none}.vp-image-picker,.vp-image-picker *{box-sizing:border-box}.vp-image-picker+ul.thumbnails.image_picker_selector li{margin:0 10px 10px 0}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:0;cursor:pointer;border:none}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail img{display:block;border:2px solid transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected{background-color:transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected img{border-color:#0073aa}.vp-image-picker+ul.thumbnails.image_picker_selector .group_title{padding-top:5px;padding-left:5px;font-weight:500}.vp-control-range [type="number"]{width:50px;margin-left:10px}.vp-control-range [type="range"]{-webkit-box-flex:1;flex:1;width:100%;padding:0;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vp-control-range [type="range"]::-webkit-slider-thumb{box-sizing:border-box;width:18px;height:18px;margin-top:-7px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%;-webkit-appearance:none;appearance:none}.vp-control-range [type="range"]::-moz-range-thumb{box-sizing:border-box;width:18px;height:18px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%}.vp-control-range [type="range"]::-ms-thumb{box-sizing:border-box;width:14px;height:14px;margin-top:0;cursor:pointer;background:#555d66;background-clip:padding-box;border:2px solid transparent;border-radius:50%}.vp-control-range [type="range"]:focus{outline:none}.vp-control-range [type="range"]:focus::-webkit-slider-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-moz-range-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-ms-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]::-webkit-slider-runnable-track{height:3px;margin-top:-4px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-moz-range-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-ms-track{height:3px;margin-top:-4px;color:transparent;cursor:pointer;background:#e2e4e7;border-color:transparent;border-radius:1.5px}.vp-control-toggle,.vp-control-toggle *{box-sizing:border-box}.vp-control-toggle .vp-toggle{position:relative}.vp-control-toggle .vp-toggle .vp-toggle__track{content:"";display:inline-block;box-sizing:border-box;width:36px;height:18px;vertical-align:top;background-color:#fff;border:2px solid #6c7781;border-radius:9px;-webkit-transition:background .2s ease;transition:background .2s ease}.vp-control-toggle .vp-toggle .vp-toggle__track::after{content:"";position:absolute;display:block;top:50%;right:5px;width:3px;height:3px;margin-top:-3px;border:1.5px solid #6c7781;border-radius:3px}.vp-control-toggle .vp-toggle:hover .vp-toggle__track{background-color:#e2e4e7}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track{background-color:#33b3db;border:2px solid #33b3db}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track::after{top:50%;right:auto;left:8px;width:0;height:5px;margin-top:-3px;border:0;border-right:2px solid #fff;border-radius:0}.vp-control-toggle .vp-toggle .vp-toggle__thumb{position:absolute;display:block;top:4px;left:4px;width:10px;height:10px;background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;-webkit-transition:-webkit-transform .1s ease;transition:-webkit-transform .1s ease;transition:transform .1s ease;transition:transform .1s ease, -webkit-transform .1s ease}.vp-control-toggle .vp-toggle [type="checkbox"]:focus ~ .vp-toggle__track{box-shadow:0 0 0 2px #fff, 0 0 0 3px #6c7781}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__thumb{background-color:#fff;border-width:0;-webkit-transform:translateX(18px);transform:translateX(18px)}.vp-control-toggle .vp-toggle [type="checkbox"]{position:absolute;top:0;left:0;width:100%;height:100%;padding:0;margin:0;opacity:0;z-index:1}.vp-control-image-dropdown{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;width:100%;padding:5px 7px;cursor:pointer;background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-control-image-dropdown,.vp-control-image-dropdown *{box-sizing:border-box}.vp-control-image-dropdown::before{content:"";position:absolute;display:block;top:50%;right:6px;width:0;height:0;margin-top:-2px;border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px}.vp-control-image-dropdown.active::before{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.vp-control-image-dropdown .vp-control-image-dropdown__preview{display:block;-webkit-box-flex:0;flex:0 0 auto;width:32px}.vp-control-image-dropdown .vp-control-image-dropdown__preview img{display:block;width:100%;height:auto}.vp-control-image-dropdown .vp-control-image-dropdown__title{-webkit-box-flex:1;flex:1;padding-left:10px}.vp-control-image-dropdown .vp-control-image-dropdown__content{position:absolute;display:none;top:100%;left:0;width:100%;max-width:285px;margin-top:7px;margin-left:-1px;cursor:default;background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,0.04);z-index:1}.vp-control-image-dropdown .vp-control-image-dropdown__content>div{width:100%;max-height:250px;padding:4px;overflow:auto}.vp-control-image-dropdown .vp-control-image-dropdown__content::before{content:"";position:absolute;display:block;top:-5px;left:10px;width:0;height:0;border-right:5px solid transparent;border-bottom:5px solid #e5e5e5;border-left:5px solid transparent}.vp-control-image-dropdown .vp-control-image-dropdown__content::after{content:"";position:absolute;display:block;top:-7px;right:0;left:0;height:7px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector .group>ul{display:-webkit-box;display:flex;flex-wrap:wrap}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li{display:block;-webkit-box-flex:0;flex:0 0 25%;float:none;max-width:25%;margin:0}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group_title{-webkit-box-flex:0;flex:0 0 100%;max-width:100%}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:3px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li img{width:100%;height:auto}.vp-control-image-dropdown.active .vp-control-image-dropdown__content{display:block}.vp_list_preview{position:relative;padding:0 12px;margin-right:-12px;margin-left:-12px}.vp_list_preview iframe{width:100%;min-height:120px;-webkit-transition:height .3s;transition:height .3s}.vp_list_preview_preloader{position:absolute;top:-6px;right:-4px;bottom:-16px;left:-4px;visibility:hidden;background-color:#262829;opacity:0;-webkit-transition:.15s opacity, .15s visibility;transition:.15s opacity, .15s visibility}.vp_list_preview_preloader::before{content:"";position:relative;display:block;top:50%;left:50%;width:30px;height:30px;margin-top:-17px;margin-left:-17px;text-indent:-9999em;border:2px solid rgba(255,255,255,0.3);border-left:2px solid #fff;border-radius:50%;-webkit-animation:vp-preloader-spinner .4s infinite linear;animation:vp-preloader-spinner .4s infinite linear}.vp_list_preview_preloader.vp_list_preview_preloader_active{visibility:visible;opacity:1}@-webkit-keyframes vp-preloader-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes vp-preloader-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.vp-content-source{display:-webkit-box;display:flex;flex-wrap:wrap;padding-right:9px;padding-left:9px;margin-right:-15px;margin-left:-15px}.vp-content-source .vp-content-source__item{position:relative;width:70px;height:50px;padding:12px;margin:0 5px;color:#6c7781;text-align:center;cursor:pointer;border:1px solid transparent;border-radius:3px}.vp-content-source .vp-content-source__item.active,.vp-content-source .vp-content-source__item:hover{color:#555;background-color:#ecf0f4}.vp-content-source .vp-content-source__item.active{color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-content-source .vp-content-source__item .vp-content-source__item-icon>span{width:24px;height:24px;margin-top:2px;font-size:24px}.vp-content-source .vp-content-source__item .vp-content-source__item-title{position:absolute;top:58%;right:8px;left:8px;font-weight:500}.vp-content-source .vp-content-source__item-content{-webkit-box-flex:1;flex:1;min-width:100%}.vp-content-source .vp-content-source__item-content>div{position:relative;display:none;padding:0 15px;padding-bottom:1px;margin-top:12px;margin-right:-9px;margin-bottom:-14px;margin-left:-9px;overflow:hidden;background-color:#f9f9fa;border-top:1px solid #eee}.vp-content-source .vp-content-source__item-content>div:empty{display:none !important}.vp-content-source .vp-content-source__item-content>div.active{display:block}.vp-select2{width:100%}.vp-select2+.select2{width:100%}.post-attributes-label+.vp-select2+.select2{margin-top:5px}.vp-select2+.select2 ul,.vp-select2+.select2 li{margin-bottom:0}.vp-select2+.select2 .select2-selection{border:1px solid #ddd;border-radius:0;box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-select2+.select2.select2-container--open .select2-selection{outline:none}.vp-select2+.select2 .select2-selection--multiple{min-height:27px}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice{padding:3px 8px;margin-top:3px;color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice__remove{float:right;margin-right:0;margin-left:3px;color:inherit;opacity:.5}.select2-vp-container ul,.select2-vp-container li{margin-bottom:0}.select2-vp-container .select2-dropdown{border-color:#ddd}.select2-vp-container .select2-search--dropdown .select2-search__field{padding:3px 4px;border:1px solid #ddd;outline:none;box-shadow:none}.select2-vp-container .select2-results__option[aria-selected="true"]{background-color:#efeeee}.select2-vp-container .select2-results__option--highlighted[aria-selected]{background-color:#33b3db}.vp-select2-ajax__result{display:-webkit-box;display:flex;-webkit-box-flex:0;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap}.vp-select2-ajax__result .vp-select2-ajax__result-img{position:relative;-webkit-box-flex:0;flex:0 0 35px;background-color:rgba(0,0,0,0.1);background-position:center center;background-size:cover;border-radius:3px}.vp-select2-ajax__result .vp-select2-ajax__result-img::after{content:"";display:block;width:100%;padding-top:100%}.vp-select2-ajax__result .vp-select2-ajax__result-data{padding-left:10px}.vp-select2-ajax__result .vp-select2-ajax__result-title{font-size:16px;font-weight:500;line-height:1}.vp-select2-ajax__result .vp-select2-ajax__result-post-type{font-size:12px;opacity:.5}.vp-control-gallery{position:relative;border-bottom:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data{position:absolute;box-sizing:border-box;top:-15px;right:-365px;bottom:0;width:350px;padding:15px 13px;overflow:auto;background-color:#fff;border-left:1px solid #eaeaea;-webkit-transition:.15s right;transition:.15s right}.vp-control-gallery .vp-control-gallery-additional-data>div{-webkit-transition:.3s margin-top;transition:.3s margin-top}.vp-control-gallery .vp-control-gallery-additional-data>div>.vp-control:last-of-type{margin-bottom:0}.vp-control-gallery .vp-control-gallery-additional-data.active{right:-15px}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:335px}@media (max-width: 910px){.vp-control-gallery .vp-control-gallery-additional-data{position:relative;display:none;right:0;width:120%;height:auto;margin-bottom:30px;border:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data.active{display:block}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:-15px}}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview{display:-webkit-box;display:flex;padding:15px 13px;margin:-15px -13px;margin-bottom:15px;border-bottom:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image{margin-right:15px}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image img{display:block;width:70px;border-radius:3px;box-shadow:0 0 0 1px #fff, 0 0 0 2px #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-size{color:#8f9498}.vp-control-gallery .vp-control-gallery-items{display:-webkit-box;display:flex;flex-wrap:wrap;align-content:flex-start;width:120%;min-height:325px;padding:7px;margin:-12px;margin-bottom:0;overflow:auto;-webkit-transition:.15s margin-right;transition:.15s margin-right}.vp-control-gallery .vp-control-gallery-items::after{content:"";display:block;width:100%}.vp-control-gallery .vp-control-gallery-items>div{position:relative;display:block;width:calc(12.5% - 10px);margin:5px;cursor:move;cursor:-webkit-grab;cursor:grab;border-radius:3px}@media (max-width: 1350px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(14.22% - 10px)}}@media (max-width: 1250px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(16.66% - 10px)}}@media (max-width: 1100px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(25% - 10px)}}.vp-control-gallery .vp-control-gallery-items>div::after{content:"";display:block;padding-top:100%}.vp-control-gallery .vp-control-gallery-items>div.sortable-ghost{opacity:.4}.vp-control-gallery .vp-control-gallery-items>div img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove{position:absolute;top:-5px;right:-5px;width:20px;height:20px;color:#fff;cursor:pointer;visibility:hidden;background-color:#dc3232;border-radius:50%;opacity:0;-webkit-transition:.15s visibility, .15s opacity;transition:.15s visibility, .15s opacity}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove span{width:20px;height:20px;font-size:10px;line-height:20px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img:hover .vp-control-gallery-items-remove{visibility:visible;opacity:1}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img.active{box-shadow:0 0 0 1px #fff, 0 0 0 4px #33b3db}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;color:#6c7781;text-align:center;cursor:pointer;background-color:#fff;border:1px solid #ccd3da;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add>span{position:absolute;top:50%;left:50%;width:24px;height:24px;margin-top:-12px;margin-left:-12px;line-height:24px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add:hover{color:#555;background-color:#f7f7f7}.post-type-vp_lists .CodeMirror{width:100%;text-align:left;border:1px solid #ddd}.post-type-vp_lists .CodeMirror .CodeMirror-matchingbracket{color:inherit;background:rgba(255,150,0,0.3)}.post-type-vp_lists [class*="CodeMirror-lint-message"],.post-type-vp_lists .CodeMirror-lint-marker-multiple,.post-type-vp_lists [class*="CodeMirror-lint-marker"]{background-image:none}.post-type-vp_lists .CodeMirror-lint-marker-error,.post-type-vp_lists .CodeMirror-lint-marker-warning{cursor:help}.post-type-vp_lists .CodeMirror-lint-marker-multiple{position:absolute;top:0}.post-type-vp_lists [class*="CodeMirror-lint-marker"]::before{position:relative;top:-2px;font:400 18px/1 dashicons}.post-type-vp_lists [class*="CodeMirror-lint-message"]::before{position:absolute;left:16px;font:400 16px/1 dashicons}.post-type-vp_lists .CodeMirror-lint-message-error,.post-type-vp_lists .CodeMirror-lint-message-warning{padding:3px 12px 3px 28px;margin:5px 0 2px;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}.post-type-vp_lists .CodeMirror-lint-message-warning{background-color:#fff8e5;border-left:4px solid #ffb900}.post-type-vp_lists .CodeMirror-lint-message-warning::before,.post-type-vp_lists .CodeMirror-lint-marker-warning::before{content:"\f534";color:#f6a306}.post-type-vp_lists .CodeMirror-lint-message-error{background-color:#fbeaea;border-left:4px solid #dc3232}.post-type-vp_lists .CodeMirror-lint-message-error::before,.post-type-vp_lists .CodeMirror-lint-marker-error::before{content:"\f153";color:#dc3232}.post-type-vp_lists .CodeMirror-lint-tooltip{background:0 0;border:none;border-radius:0;direction:ltr}.post-type-vp_lists .CodeMirror-resizer{display:none;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;width:100%;height:20px;margin-top:-2px;font-size:13px;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fbfbfb}.post-type-vp_lists .CodeMirror-resizer::before{content:"\2261";position:absolute;left:50%;color:#999}.post-type-vp_lists .CodeMirror-resizer:hover{background:#f7f7f7}.post-type-vp_lists .CodeMirror-resizer:hover::before{color:#000}.post-type-vp_lists .CodeMirror ~ .CodeMirror-resizer{display:block}.vp-dom-tree-help code{display:inline-block;padding:2px 6px;line-height:1.2;color:#595d67;cursor:pointer;background-color:#dcdfe6;border-radius:3px;-webkit-transition:.15s background-color, .15s color;transition:.15s background-color, .15s color}.vp-dom-tree-help code:hover{color:#2a2c30;background-color:#bec4d1}.vp-dom-tree{padding:15px;padding-top:1px;padding-bottom:0;padding-left:0;font-family:monospace;color:#67666d;background-color:#f9f9fa;border:1px solid #ddd}.vp-dom-tree .spinner{float:none;margin-top:15px;margin-bottom:15px}.vp-dom-tree ul{position:relative;padding-left:15px;list-style:none}.vp-dom-tree .vp-dom-tree-node>div{position:relative;display:inline-block;line-height:1.6}.vp-dom-tree .vp-dom-tree-node-class{display:inline-block;padding:2px 6px;line-height:1.2;color:#595d67;cursor:pointer;background-color:#dcdfe6;border-radius:3px;-webkit-transition:.15s background-color, .15s color;transition:.15s background-color, .15s color}.vp-dom-tree .vp-dom-tree-node-class:hover{color:#2a2c30;background-color:#bec4d1}.vp-dom-tree .vp-dom-tree-node-class+.vp-dom-tree-node-class{margin-left:5px}.vp-dom-tree .vp-dom-tree-node-collapse{position:relative;display:inline-block;top:-1px;margin-right:5px;cursor:pointer;border-top:6px solid;border-right:4px solid transparent;border-left:4px solid transparent}.vp-dom-tree .vp-dom-tree-node-collapse::after{content:"";position:absolute;display:block;top:-12px;right:-10px;bottom:-7px;left:-10px}.vp-dom-tree .is-collapsed .vp-dom-tree-node-collapse{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vp-dom-tree .is-collapsed ~ .vp-dom-tree-child{display:none}.vp-dom-tree .vp-dom-tree-child{position:relative}.vp-dom-tree .vp-dom-tree-child::before{content:"";position:absolute;display:block;top:-3px;right:0;bottom:-3px;left:8px;background-color:#f0f0f1;border-radius:4px;opacity:0;-webkit-transition:.2s opacity;transition:.2s opacity}.vp-dom-tree .vp-dom-tree-node:hover ~ .vp-dom-tree-child::before{opacity:1}@media (max-width: 850px){.vp-steps__right,.vp-steps__step{float:none;width:100%}}.post-type-vp_lists #slugdiv,.post-type-vp_lists #postcustom{display:none}
|
assets/admin/images/icon-gray.svg
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
|
2 |
-
<defs>
|
3 |
-
<style>
|
4 |
-
.cls-1 {
|
5 |
-
fill: #bbbbbb;
|
6 |
-
}
|
7 |
-
</style>
|
8 |
-
</defs>
|
9 |
-
<rect id="BR" class="cls-1" y="6" width="7" height="9"/>
|
10 |
-
<rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
|
11 |
-
<rect id="TR" class="cls-1" width="7" height="5"/>
|
12 |
-
<rect id="TL" class="cls-1" x="8" width="7" height="9"/>
|
13 |
-
</svg>
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
|
2 |
+
<defs>
|
3 |
+
<style>
|
4 |
+
.cls-1 {
|
5 |
+
fill: #bbbbbb;
|
6 |
+
}
|
7 |
+
</style>
|
8 |
+
</defs>
|
9 |
+
<rect id="BR" class="cls-1" y="6" width="7" height="9"/>
|
10 |
+
<rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
|
11 |
+
<rect id="TR" class="cls-1" width="7" height="5"/>
|
12 |
+
<rect id="TL" class="cls-1" x="8" width="7" height="9"/>
|
13 |
+
</svg>
|
assets/admin/images/icon-mce.svg
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
|
2 |
-
<defs>
|
3 |
-
<style>
|
4 |
-
.cls-1 {
|
5 |
-
fill: #555d66;
|
6 |
-
}
|
7 |
-
</style>
|
8 |
-
</defs>
|
9 |
-
<rect id="BR" class="cls-1" y="6" width="7" height="9"/>
|
10 |
-
<rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
|
11 |
-
<rect id="TR" class="cls-1" width="7" height="5"/>
|
12 |
-
<rect id="TL" class="cls-1" x="8" width="7" height="9"/>
|
13 |
-
</svg>
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
|
2 |
+
<defs>
|
3 |
+
<style>
|
4 |
+
.cls-1 {
|
5 |
+
fill: #555d66;
|
6 |
+
}
|
7 |
+
</style>
|
8 |
+
</defs>
|
9 |
+
<rect id="BR" class="cls-1" y="6" width="7" height="9"/>
|
10 |
+
<rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
|
11 |
+
<rect id="TR" class="cls-1" width="7" height="5"/>
|
12 |
+
<rect id="TL" class="cls-1" x="8" width="7" height="9"/>
|
13 |
+
</svg>
|
assets/admin/js/elementor.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Additional js for Elementor
|
3 |
*
|
4 |
* Name : Visual Portfolio
|
5 |
-
* Version : 1.
|
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 : 1.16.0
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
import { throttle } from 'throttle-debounce';
|
assets/admin/js/gutenberg-block.min.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var e=function(){function t(){}function n(t,n){for(var e=n.length,r=0;r<e;++r)i(t,n[r])}t.prototype=Object.create(null);var e={}.hasOwnProperty;var r=/\s+/;function i(t,i){if(i){var o=typeof i;"string"===o?function(t,n){for(var e=n.split(r),i=e.length,o=0;o<i;++o)t[e[o]]=!0}(t,i):Array.isArray(i)?n(t,i):"object"===o?function(t,n){for(var r in n)e.call(n,r)&&(t[r]=!!n[r])}(t,i):"number"===o&&function(t,n){t[n]=!0}(t,i)}}return function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=new t;n(o,r);var u=[];for(var c in o)o[c]&&u.push(c);return u.join(" ")}}();t.exports?(e.default=e,t.exports=e):void 0===(r=function(){return e}.apply(n,[]))||(t.exports=r)}()},function(t,n,e){"use strict";var r=e(125),i=e.n(r),o=e(26),u=e.n(o);function c(){return(c=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function a(t,n){if(null==t)return{};var e,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e=o[r],n.indexOf(e)>=0||(i[e]=t[e]);return i}var f=function(t,n){return t(n={exports:{}},n.exports),n.exports}((function(t){!function(n){if("undefined"!=typeof window){var e,r=0,i=!1,o=!1,u="message".length,c="[iFrameSizer]",a=c.length,f=null,s=window.requestAnimationFrame,l={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},h={},p=null,v={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){_("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},d={};window.jQuery&&((e=window.jQuery).fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(t){return this.filter("iframe").each((function(n,e){C(e,t)})).end()}):S("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof n&&n.amd?n([],V):t.exports=V(),window.iFrameResize=window.iFrameResize||V()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function y(t,n,e){t.addEventListener(n,e,!1)}function m(t,n,e){t.removeEventListener(n,e,!1)}function w(t){return c+"["+function(t){var n="Host page: "+t;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+t:"Nested host page: "+t),n}(t)+"]"}function b(t){return h[t]?h[t].log:i}function x(t,n){E("log",t,n,b(t))}function S(t,n){E("info",t,n,b(t))}function _(t,n){E("warn",t,n,!0)}function E(t,n,e,r){!0===r&&"object"==typeof window.console&&console[t](w(n),e)}function O(t){function n(){i("Height"),i("Width"),N((function(){R(W),A(D),g("onResized",W)}),W,"init")}function e(t){return"border-box"!==t.boxSizing?0:(t.paddingTop?parseInt(t.paddingTop,10):0)+(t.paddingBottom?parseInt(t.paddingBottom,10):0)}function r(t){return"border-box"!==t.boxSizing?0:(t.borderTopWidth?parseInt(t.borderTopWidth,10):0)+(t.borderBottomWidth?parseInt(t.borderBottomWidth,10):0)}function i(t){var n=Number(h[D]["max"+t]),e=Number(h[D]["min"+t]),r=t.toLowerCase(),i=Number(W[r]);x(D,"Checking "+r+" is in range "+e+"-"+n),i<e&&(i=e,x(D,"Set "+r+" to min value")),i>n&&(i=n,x(D,"Set "+r+" to max value")),W[r]=""+i}function o(t){return z.substr(z.indexOf(":")+u+t)}function s(t,n){var e,r,i;e=function(){var e,r;k("Send Page Info","pageInfo:"+(e=document.body.getBoundingClientRect(),r=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:r.height,iframeWidth:r.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(r.top-e.top,10),offsetLeft:parseInt(r.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),t,n)},r=32,d[i=n]||(d[i]=setTimeout((function(){d[i]=null,e()}),r))}function l(t){var n=t.getBoundingClientRect();return I(D),{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function p(t){var n=t?l(W.iframe):{x:0,y:0},e={x:Number(W.width)+n.x,y:Number(W.height)+n.y};x(D,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(t?"Offset":"")](e.x,e.y):_(D,"Unable to scroll to requested position, window.parentIFrame not found"):(f=e,v(),x(D,"--"))}function v(){!1!==g("onScroll",f)?A(D):j()}function g(t,n){return F(D,t,n)}var w,b,E,O,P,C,z=t.data,W={},D=null;"[iFrameResizerChild]Ready"===z?function(){for(var t in h)k("iFrame requested init",L(t),document.getElementById(t),t)}():c===(""+z).substr(0,a)&&z.substr(a).split(":")[0]in h?(E=z.substr(a).split(":"),O=E[1]?parseInt(E[1],10):0,P=h[E[0]]&&h[E[0]].iframe,C=getComputedStyle(P),W={iframe:P,id:E[0],height:O+e(C)+r(C),width:E[2],type:E[3]},D=W.id,h[D]&&(h[D].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&x(D,"Ignoring init message from meta parent page"),!b&&function(t){var n=!0;return h[t]||(n=!1,_(W.type+" No settings for "+t+". Message was: "+z)),n}(D)&&(x(D,"Received: "+z),w=!0,null===W.iframe&&(_(D,"IFrame ("+W.id+") not found"),w=!1),w&&function(){var n,e=t.origin,r=h[D]&&h[D].checkOrigin;if(r&&""+e!="null"&&!(r.constructor===Array?function(){var t=0,n=!1;for(x(D,"Checking connection is from allowed list of origins: "+r);t<r.length;t++)if(r[t]===e){n=!0;break}return n}():(n=h[D]&&h[D].remoteHost,x(D,"Checking connection is from: "+n),e===n)))throw new Error("Unexpected message received from: "+e+" for "+W.iframe.id+". Message was: "+t.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(h[D]&&h[D].firstRun&&h[D]&&(h[D].firstRun=!1),W.type){case"close":M(W.iframe);break;case"message":c=o(6),x(D,"onMessage passed: {iframe: "+W.iframe.id+", message: "+c+"}"),g("onMessage",{iframe:W.iframe,message:JSON.parse(c)}),x(D,"--");break;case"autoResize":h[D].autoResize=JSON.parse(o(9));break;case"scrollTo":p(!1);break;case"scrollToOffset":p(!0);break;case"pageInfo":s(h[D]&&h[D].iframe,D),function(){function t(t,r){function i(){h[e]?s(h[e].iframe,e):n()}["scroll","resize"].forEach((function(n){x(e,t+n+" listener for sendPageInfo"),r(window,n,i)}))}function n(){t("Remove ",m)}var e=D;t("Add ",y),h[e]&&(h[e].stopPageInfo=n)}();break;case"pageInfoStop":h[D]&&h[D].stopPageInfo&&(h[D].stopPageInfo(),delete h[D].stopPageInfo);break;case"inPageLink":t=o(9),r=t.split("#")[1]||"",i=decodeURIComponent(r),(u=document.getElementById(i)||document.getElementsByName(i)[0])?(e=l(u),x(D,"Moving to in page link (#"+r+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},v(),x(D,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(r):x(D,"In page link #"+r+" not found and window.parentIFrame not found"):x(D,"In page link #"+r+" not found");break;case"reset":T(W);break;case"init":n(),g("onInit",W.iframe);break;default:n()}var t,e,r,i,u,c}())):S(D,"Ignored: "+z)}function F(t,n,e){var r=null,i=null;if(h[t]){if("function"!=typeof(r=h[t][n]))throw new TypeError(n+" on iFrame["+t+"] is not a function");i=r(e)}return i}function P(t){var n=t.id;delete h[n]}function M(t){var n=t.id;if(!1!==F(n,"onClose",n)){x(n,"Removing iFrame: "+n);try{t.parentNode&&t.parentNode.removeChild(t)}catch(t){_(t)}F(n,"onClosed",n),x(n,"--"),P(t)}else x(n,"Close iframe cancelled by onClose event")}function I(t){null===f&&x(t,"Get page position: "+(f={x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop}).x+","+f.y)}function A(t){null!==f&&(window.scrollTo(f.x,f.y),x(t,"Set page position: "+f.x+","+f.y),j())}function j(){f=null}function T(t){x(t.id,"Size reset requested by "+("init"===t.type?"host page":"iFrame")),I(t.id),N((function(){R(t),k("reset","reset",t.iframe,t.id)}),t,"reset")}function R(t){function n(n){o||"0"!==t[n]||(o=!0,x(r,"Hidden iFrame detected, creating visibility listener"),function(){function t(){Object.keys(h).forEach((function(t){!function(t){function n(n){return"0px"===(h[t]&&h[t].iframe.style[n])}h[t]&&null!==h[t].iframe.offsetParent&&(n("height")||n("width"))&&k("Visibility change","resize",h[t].iframe,t)}(t)}))}function n(n){x("window","Mutation observed: "+n[0].target+" "+n[0].type),z(t,16)}var e=g();e&&(r=document.querySelector("body"),new e(n).observe(r,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}));var r}())}function e(e){!function(n){t.id?(t.iframe.style[n]=t[n]+"px",x(t.id,"IFrame ("+r+") "+n+" set to "+t[n]+"px")):x("undefined","messageData id not set")}(e),n(e)}var r=t.iframe.id;h[r]&&(h[r].sizeHeight&&e("height"),h[r].sizeWidth&&e("width"))}function N(t,n,e){e!==n.type&&s&&!window.jasmine?(x(n.id,"Requesting animation frame"),s(t)):t()}function k(t,n,e,r,i){var o,u=!1;r=r||e.id,h[r]&&(e&&"contentWindow"in e&&null!==e.contentWindow?(o=h[r]&&h[r].targetOrigin,x(r,"["+t+"] Sending msg to iframe["+r+"] ("+n+") targetOrigin: "+o),e.contentWindow.postMessage(c+n,o)):_(r,"["+t+"] IFrame("+r+") not found"),i&&h[r]&&h[r].warningTimeout&&(h[r].msgTimeout=setTimeout((function(){!h[r]||h[r].loaded||u||(u=!0,_(r,"IFrame has not responded within "+h[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),h[r].warningTimeout)))}function L(t){return t+":"+h[t].bodyMarginV1+":"+h[t].sizeWidth+":"+h[t].log+":"+h[t].interval+":"+h[t].enablePublicMethods+":"+h[t].autoResize+":"+h[t].bodyMargin+":"+h[t].heightCalculationMethod+":"+h[t].bodyBackground+":"+h[t].bodyPadding+":"+h[t].tolerance+":"+h[t].inPageLinks+":"+h[t].resizeFrom+":"+h[t].widthCalculationMethod}function C(t,e){function o(t){var n=t.split("Callback");if(2===n.length){var e="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[e]=this[t],delete this[t],_(a,"Deprecated: '"+t+"' has been renamed '"+e+"'. The old method will be removed in the next major version.")}}var u,c,a=function(n){var o;return""===n&&(t.id=(o=e&&e.id||v.id+r++,null!==document.getElementById(o)&&(o+=r++),n=o),i=(e||{}).log,x(n,"Added missing iframe ID: "+n+" ("+t.src+")")),n}(t.id);a in h&&"iFrameResizer"in t?_(a,"Ignored iFrame, already setup."):(!function(n){var e;n=n||{},h[a]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(t){if("object"!=typeof t)throw new TypeError("Options is not an object")}(n),Object.keys(n).forEach(o,n),function(t){for(var n in v)Object.prototype.hasOwnProperty.call(v,n)&&(h[a][n]=Object.prototype.hasOwnProperty.call(t,n)?t[n]:v[n])}(n),h[a]&&(h[a].targetOrigin=!0===h[a].checkOrigin?""===(e=h[a].remoteHost)||"file://"===e?"*":e:"*")}(e),function(){switch(x(a,"IFrame scrolling "+(h[a]&&h[a].scrolling?"enabled":"disabled")+" for "+a),t.style.overflow=!1===(h[a]&&h[a].scrolling)?"hidden":"auto",h[a]&&h[a].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=h[a]?h[a].scrolling:"no"}}(),function(){function n(n){1/0!==h[a][n]&&0!==h[a][n]&&(t.style[n]=h[a][n]+"px",x(a,"Set "+n+" = "+h[a][n]+"px"))}function e(t){if(h[a]["min"+t]>h[a]["max"+t])throw new Error("Value for min"+t+" can not be greater than max"+t)}e("Height"),e("Width"),n("maxHeight"),n("minHeight"),n("maxWidth"),n("minWidth")}(),"number"!=typeof(h[a]&&h[a].bodyMargin)&&"0"!==(h[a]&&h[a].bodyMargin)||(h[a].bodyMarginV1=h[a].bodyMargin,h[a].bodyMargin=h[a].bodyMargin+"px"),u=L(a),(c=g())&&function(n){t.parentNode&&new n((function(n){n.forEach((function(n){Array.prototype.slice.call(n.removedNodes).forEach((function(n){n===t&&M(t)}))}))})).observe(t.parentNode,{childList:!0})}(c),y(t,"load",(function(){var e,r;k("iFrame.onload",u,t,n,!0),e=h[a]&&h[a].firstRun,r=h[a]&&h[a].heightCalculationMethod in l,!e&&r&&T({iframe:t,height:0,width:0,type:"init"})})),k("init",u,t,n,!0),h[a]&&(h[a].iframe.iFrameResizer={close:M.bind(null,h[a].iframe),removeListeners:P.bind(null,h[a].iframe),resize:k.bind(null,"Window resize","resize",h[a].iframe),moveToAnchor:function(t){k("Move to anchor","moveToAnchor:"+t,h[a].iframe,a)},sendMessage:function(t){k("Send Message","message:"+(t=JSON.stringify(t)),h[a].iframe,a)}}))}function z(t,n){null===p&&(p=setTimeout((function(){p=null,t()}),n))}function W(){"hidden"!==document.visibilityState&&(x("document","Trigger event: Visiblity change"),z((function(){D("Tab Visable","resize")}),16))}function D(t,n){Object.keys(h).forEach((function(e){(function(t){return h[t]&&"parent"===h[t].resizeFrom&&h[t].autoResize&&!h[t].firstRun})(e)&&k(t,n,document.getElementById(e),e)}))}function B(){y(window,"message",O),y(window,"resize",(function(){var t;x("window","Trigger event: "+(t="resize")),z((function(){D("Window "+t,"resize")}),16)})),y(document,"visibilitychange",W),y(document,"-webkit-visibilitychange",W)}function V(){function t(t,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),C(n,t),e.push(n))}var e;return function(){var t,n=["moz","webkit","o","ms"];for(t=0;t<n.length&&!s;t+=1)s=window[n[t]+"RequestAnimationFrame"];s||x("setup","RequestAnimationFrame not supported")}(),B(),function(r,i){switch(e=[],function(t){t&&t.enablePublicMethods&&_("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(r),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),t.bind(n,r));break;case"object":t(r,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return e}}}()})),s=function(){},l=s,h=function(t){var n=t.title,e=t.forwardRef,r=a(t,["title","forwardRef"]),i=function(t){t.autoResize,t.bodyBackground,t.bodyMargin,t.bodyPadding,t.checkOrigin,t.inPageLinks,t.heightCalculationMethod,t.interval,t.log,t.maxHeight,t.maxWidth,t.minHeight,t.minWidth,t.resizeFrom,t.scrolling,t.sizeHeight,t.sizeWidth,t.warningTimeout,t.tolerance,t.widthCalculationMethod,t.onClosed,t.onInit,t.onMessage,t.onResized;return a(t,["autoResize","bodyBackground","bodyMargin","bodyPadding","checkOrigin","inPageLinks","heightCalculationMethod","interval","log","maxHeight","maxWidth","minHeight","minWidth","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClosed","onInit","onMessage","onResized"])}(r),s=Object(o.useRef)(null),h=function(){return l(!s.current,"[iframeSizerReact]["+s.current.id+"] Close event ignored, to remove the iframe update your React component"),!s.current};return Object(o.useEffect)((function(){var t=s.current;return f(c({},r,{onClose:h}),t),function(){return t.iframeResizer&&t.iframeResizer.removeListeners()}}),[]),Object(o.useImperativeHandle)(e,(function(){return{resize:function(){return s.current.iFrameResizer.resize()},moveToAnchor:function(t){return s.current.iFrameResizer.moveToAnchor(t)},sendMessage:function(t,n){s.current.iFrameResizer.sendMessage(t,n)}}})),u.a.createElement("iframe",c({title:n},i,{ref:s}))};h.defaultProps={title:"iframe"},h.propTypes={title:i.a.string},n.a=h},function(t,n,e){t.exports=e(316)()},function(t,n,e){"use strict";function r(t,n,e,r){var i,o=!1,u=0;function c(){i&&clearTimeout(i)}function a(){var a=this,f=Date.now()-u,s=arguments;function l(){u=Date.now(),e.apply(a,s)}o||(r&&!i&&l(),c(),void 0===r&&f>t?l():!0!==n&&(i=setTimeout(r?function(){i=void 0}:l,void 0===r?t-f:t)))}return"boolean"!=typeof n&&(r=e,e=n,n=void 0),a.cancel=function(){c(),o=!0},a}e.d(n,"a",(function(){return r}))},function(t,n,e){t.exports=e(128)},function(t,n,e){"use strict";e.r(n),function(t){var n=e(126),r=e(123),i=e.n(r),o=e(124),u=e(89);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,n){return!n||"object"!==c(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}t._babelPolyfill||e(130);var h=window.jQuery,p=h(window),v=window.VPAdminGutenbergVariables,d=wp.i18n.__,g=wp.element,y=g.Component,m=g.Fragment,w=g.RawHTML,b=wp.blocks.registerBlockType,x=wp.components,S=x.Placeholder,_=x.Spinner,E=x.PanelBody,O=x.SelectControl,F=wp.blockEditor.InspectorControls,P=wp.apiFetch,M=wp.data,I=M.registerStore,A=M.withSelect;function j(){var t=h(".editor-styles-wrapper").width();t&&h(".visual-portfolio-gutenberg-preview iframe").each((function(){var n=h(this),e=n.closest(".visual-portfolio-gutenberg-preview-inner"),r=n.closest(".visual-portfolio-gutenberg-preview").width();e.css({width:t}),this.iFrameResizer&&(this.iFrameResizer.sendMessage({name:"resize",width:r}),this.iFrameResizer.resize())}))}p.on("resize",Object(n.a)(300,j));var T={apiFetch:function(t){return{type:"API_FETCH",request:t}},setPortfolioLayouts:function(t,n){return{type:"SET_PORTFOLIO_LAYOUTS",query:t,layouts:n}}};I("nk/visual-portfolio",{reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{layouts:{}},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"SET_PORTFOLIO_LAYOUTS":return!t.layouts[n.query]&&n.layouts&&(t.layouts[n.query]=n.layouts),t}return t},actions:T,selectors:{getPortfolioLayouts:function(t,n){return t.layouts[n]}},controls:{API_FETCH:function(t){var n=t.request;return P(n).catch((function(t){return!(!t||!t.error||"no_layouts_found"!==t.error_code)&&{response:[],error:!1,success:!0}})).then((function(t){return!!(t&&t.success&&t.response)&&t.response}))}},resolvers:{getPortfolioLayouts:regeneratorRuntime.mark((function t(n){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T.apiFetch({path:n});case 2:return e=t.sent,t.abrupt("return",T.setPortfolioLayouts(n,e));case 4:case"end":return t.stop()}}),t)}))}});var R=function(t){function n(){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),f(this,s(n).apply(this,arguments))}var e,r,c;return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(n,t),e=n,(r=[{key:"shouldComponentUpdate",value:function(t){return this.props.attributes.id!==t.attributes.id||this.props.portfolioLayouts!==t.portfolioLayouts||this.props.className!==t.className}},{key:"render",value:function(){var t=this.props,n=t.portfolioLayouts,e=t.attributes,r=t.setAttributes,c=this.props.className,a=e.id,f=e.ghostkitClassname,s=!1,l=!1;f&&(c=i()(c,f)),n?(s=[{label:d("--- Select layout ---"),value:""}],Object.keys(n).map((function(t){var e=n[t];s.push({label:"#".concat(e.id," - ").concat(e.title),value:e.id}),a&&parseInt(a,10)===e.id&&(l=e.edit_url)}))):a&&(s=[{label:"#".concat(a),value:a}]);var h=v.preview_url+(v.preview_url.split("?")[1]?"&":"?")+"vp_preview_frame=true&vp_preview_type=gutenberg&vp_preview_frame_id=".concat(a),p=wp.element.createElement(m,null,Array.isArray(s)?"":wp.element.createElement(_,null),Array.isArray(s)&&s.length?wp.element.createElement(m,null,wp.element.createElement(O,{value:a,onChange:function(t){return r({id:t})},options:s})):"",Array.isArray(s)&&!s.length?d("No portfolio layouts found."):"");return wp.element.createElement(m,null,wp.element.createElement(F,null,wp.element.createElement(E,null,p),Array.isArray(s)&&s.length&&l?wp.element.createElement(E,null,wp.element.createElement("a",{href:l,target:"_blank",rel:"noopener noreferrer"},d("Edit Layout"))):""),wp.element.createElement("div",{className:c},a?wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview"},wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview-inner"},wp.element.createElement(o.a,{src:h,onInit:function(){j()}}))):wp.element.createElement(S,{className:"visual-portfolio-gutenberg-placeholder",icon:wp.element.createElement(u.a,null),label:d("Visual Portfolio")},p)))}}])&&a(e.prototype,r),c&&a(e,c),n}(y);b("nk/visual-portfolio",{title:"Visual Portfolio",icon:u.a,category:"common",keywords:["visual portfolio","vp","portfolio"],ghostkit:{supports:{spacings:!0,display:!0,scrollReveal:!0}},supports:{anchor:!0,className:!0,html:!1,align:["wide","full"]},attributes:{id:{type:"string"}},edit:A((function(t){return{portfolioLayouts:t("nk/visual-portfolio").getPortfolioLayouts("/visual-portfolio/v1/get_layouts/")}}))(R),save:function(t){var n=t.attributes,e=n.id,r=n.className,i="[visual_portfolio";return e&&(i+=' id="'.concat(e,'"')),r&&(i+=' class="'.concat(r,'"')),i+="]",wp.element.createElement(w,null,i)},transforms:{from:[{type:"shortcode",tag:"visual_portfolio",attributes:{id:{type:"string",shortcode:function(t){return t.named.id}},className:{type:"string",shortcode:function(t){return t.named.class}}}}]}})}.call(this,e(129))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";e(131);var r,i=(r=e(303))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,e){"use strict";e(132),e(275),e(277),e(280),e(282),e(284),e(286),e(288),e(290),e(292),e(294),e(296),e(298),e(302)},function(t,n,e){e(133),e(136),e(137),e(138),e(139),e(140),e(141),e(142),e(143),e(144),e(145),e(146),e(147),e(148),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(210),e(211),e(212),e(214),e(215),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(225),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(81),e(238),e(110),e(239),e(111),e(240),e(241),e(242),e(243),e(112),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(254),e(255),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),t.exports=e(7)},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(8),u=e(0),c=e(11),a=e(28).KEY,f=e(2),s=e(49),l=e(39),h=e(30),p=e(5),v=e(62),d=e(91),g=e(135),y=e(52),m=e(3),w=e(4),b=e(10),x=e(15),S=e(27),_=e(29),E=e(34),O=e(94),F=e(20),P=e(51),M=e(9),I=e(32),A=F.f,j=M.f,T=O.f,R=r.Symbol,N=r.JSON,k=N&&N.stringify,L=p("_hidden"),C=p("toPrimitive"),z={}.propertyIsEnumerable,W=s("symbol-registry"),D=s("symbols"),B=s("op-symbols"),V=Object.prototype,U="function"==typeof R&&!!P.f,H=r.QObject,G=!H||!H.prototype||!H.prototype.findChild,q=o&&f((function(){return 7!=E(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=A(V,n);r&&delete V[n],j(t,n,e),r&&t!==V&&j(V,n,r)}:j,Y=function(t){var n=D[t]=E(R.prototype);return n._k=t,n},J=U&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},X=function(t,n,e){return t===V&&X(B,n,e),m(t),n=S(n,!0),m(e),i(D,n)?(e.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),e=E(e,{enumerable:_(0,!1)})):(i(t,L)||j(t,L,_(1,{})),t[L][n]=!0),q(t,n,e)):j(t,n,e)},K=function(t,n){m(t);for(var e,r=g(n=x(n)),i=0,o=r.length;o>i;)X(t,e=r[i++],n[e]);return t},$=function(t){var n=z.call(this,t=S(t,!0));return!(this===V&&i(D,t)&&!i(B,t))&&(!(n||!i(this,t)||!i(D,t)||i(this,L)&&this[L][t])||n)},Q=function(t,n){if(t=x(t),n=S(n,!0),t!==V||!i(D,n)||i(B,n)){var e=A(t,n);return!e||!i(D,n)||i(t,L)&&t[L][n]||(e.enumerable=!0),e}},Z=function(t){for(var n,e=T(x(t)),r=[],o=0;e.length>o;)i(D,n=e[o++])||n==L||n==a||r.push(n);return r},tt=function(t){for(var n,e=t===V,r=T(e?B:x(t)),o=[],u=0;r.length>u;)!i(D,n=r[u++])||e&&!i(V,n)||o.push(D[n]);return o};U||(c((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===V&&n.call(B,e),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),q(this,t,_(1,e))};return o&&G&&q(V,t,{configurable:!0,set:n}),Y(t)}).prototype,"toString",(function(){return this._k})),F.f=Q,M.f=X,e(35).f=O.f=Z,e(46).f=$,P.f=tt,o&&!e(31)&&c(V,"propertyIsEnumerable",$,!0),v.f=function(t){return Y(p(t))}),u(u.G+u.W+u.F*!U,{Symbol:R});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)p(nt[et++]);for(var rt=I(p.store),it=0;rt.length>it;)d(rt[it++]);u(u.S+u.F*!U,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=R(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){G=!0},useSimple:function(){G=!1}}),u(u.S+u.F*!U,"Object",{create:function(t,n){return void 0===n?E(t):K(E(t),n)},defineProperty:X,defineProperties:K,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var ot=f((function(){P.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return P.f(b(t))}}),N&&u(u.S+u.F*(!U||f((function(){var t=R();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(w(n)||void 0!==t)&&!J(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!J(n))return n}),r[1]=n,k.apply(N,r)}}),R.prototype[C]||e(14)(R.prototype,C,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=e(49)("native-function-to-string",Function.toString)},function(t,n,e){var r=e(32),i=e(51),o=e(46);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,c=e(t),a=o.f,f=0;c.length>f;)a.call(t,u=c[f++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(34)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperty:e(9).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperties:e(93)})},function(t,n,e){var r=e(15),i=e(20).f;e(21)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(r(t),n)}}))},function(t,n,e){var r=e(10),i=e(36);e(21)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,n,e){var r=e(10),i=e(32);e(21)("keys",(function(){return function(t){return i(r(t))}}))},function(t,n,e){e(21)("getOwnPropertyNames",(function(){return e(94).f}))},function(t,n,e){var r=e(4),i=e(28).onFreeze;e(21)("freeze",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(28).onFreeze;e(21)("seal",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(28).onFreeze;e(21)("preventExtensions",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4);e(21)("isFrozen",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(21)("isSealed",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(21)("isExtensible",(function(t){return function(n){return!!r(n)&&(!t||t(n))}}))},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(95)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(96)})},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(66).set})},function(t,n,e){"use strict";var r=e(47),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(11)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(97)})},function(t,n,e){var r=e(9).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(8)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(36),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(9).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(99);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(100);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(23),u=e(68),c=e(27),a=e(2),f=e(35).f,s=e(20).f,l=e(9).f,h=e(40).trim,p=r.Number,v=p,d=p.prototype,g="Number"==o(e(34)(d)),y="trim"in String.prototype,m=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=y?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,a=n.slice(2),f=0,s=a.length;f<s;f++)if((u=a.charCodeAt(f))<48||u>i)return NaN;return parseInt(a,r)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof p&&(g?a((function(){d.valueOf.call(e)})):"Number"!=o(e))?u(new v(m(n)),e,p):m(n)};for(var w,b=e(8)?f(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)i(v,w=b[x])&&!i(p,w)&&l(p,w,s(v,w));p.prototype=d,d.constructor=p,e(11)(r,"Number",p)}},function(t,n,e){"use strict";var r=e(0),i=e(19),o=e(101),u=e(69),c=1..toFixed,a=Math.floor,f=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*f[e],f[e]=r%1e7,r=a(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=f[n],f[n]=a(e/t),e=e%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==f[t]){var e=String(f[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},v=function(t,n,e){return 0===n?e:n%2==1?v(t,n-1,e*t):v(t*t,n/2,e)};r(r.P+r.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(2)((function(){c.call({})}))),"Number",{toFixed:function(t){var n,e,r,c,a=o(this,s),f=i(t),d="",g="0";if(f<0||f>20)throw RangeError(s);if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return String(a);if(a<0&&(d="-",a=-a),a>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(a*v(2,69,1))-69)<0?a*v(2,-n,1):a/v(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=f;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<<r),l(1,1),h(2),g=p()}else l(0,e),l(1<<-n,0),g=p()+u.call("0",f);return g=f>0?d+((c=g.length)<=f?"0."+u.call("0",f-c)+g:g.slice(0,c-f)+"."+g.slice(c-f)):d+g}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(101),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(1).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(102)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(102),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(100);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(99);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(103),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){var r=e(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(70);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(71);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(178)})},function(t,n,e){var r=e(70),i=Math.pow,o=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),a=i(2,-126);t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),f=r(t);return i<a?f*(i/a/u+1/o-1/o)*a*u:(e=(n=(1+u/o)*i)-(n-i))>c||e!=e?f*(1/0):f*e}},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,c=arguments.length,a=0;u<c;)a<(e=i(arguments[u++]))?(o=o*(r=a/e)*r+1,a=e):o+=e>0?(r=e/a)*r:e;return a===1/0?1/0:a*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(2)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(103)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(70)})},function(t,n,e){var r=e(0),i=e(71),o=Math.exp;r(r.S+r.F*e(2)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(71),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(33),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(15),o=e(6);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],c=0;e>c;)u.push(String(n[c++])),c<r&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,e){"use strict";e(40)("trim",(function(t){return function(){return t(this,3)}}))},function(t,n,e){"use strict";var r=e(72)(!0);e(73)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(0),i=e(72)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(74),u="".endsWith;r(r.P+r.F*e(76)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),c=void 0===e?r:Math.min(i(e),r),a=String(t);return u?u.call(n,a,c):n.slice(c-a.length,c)===a}})},function(t,n,e){"use strict";var r=e(0),i=e(74);r(r.P+r.F*e(76)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(69)})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(74),u="".startsWith;r(r.P+r.F*e(76)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(12)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,e){"use strict";e(12)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,e){"use strict";e(12)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,e){"use strict";e(12)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,e){"use strict";e(12)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,e){"use strict";e(12)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,e){"use strict";e(12)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,e){"use strict";e(12)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,e){"use strict";e(12)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,e){"use strict";e(12)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,e){"use strict";e(12)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,e){"use strict";e(12)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){"use strict";e(12)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(27);r(r.P+r.F*e(2)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(213);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(11)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(14)(i,r,e(216))},function(t,n,e){"use strict";var r=e(3),i=e(27);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(52)})},function(t,n,e){"use strict";var r=e(17),i=e(0),o=e(10),u=e(105),c=e(77),a=e(6),f=e(78),s=e(79);i(i.S+i.F*!e(53)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,h=o(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d,y=0,m=s(h);if(g&&(d=r(d,v>2?arguments[2]:void 0,2)),null==m||p==Array&&c(m))for(e=new p(n=a(h.length));n>y;y++)f(e,y,g?d(h[y],y):h[y]);else for(l=m.call(h),e=new p;!(i=l.next()).done;y++)f(e,y,g?u(l,d,[i.value,y],!0):i.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),i=e(78);r(r.S+r.F*e(2)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=[].join;r(r.P+r.F*(e(45)!=Object||!e(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(65),o=e(23),u=e(33),c=e(6),a=[].slice;r(r.P+r.F*e(2)((function(){i&&a.call(i)})),"Array",{slice:function(t,n){var e=c(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return a.call(this,t,n);for(var i=u(t,e),f=u(n,e),s=c(f-i),l=new Array(s),h=0;h<s;h++)l[h]="String"==r?this.charAt(i+h):this[i+h];return l}})},function(t,n,e){"use strict";var r=e(0),i=e(18),o=e(10),u=e(2),c=[].sort,a=[1,2,3];r(r.P+r.F*(u((function(){a.sort(void 0)}))||!u((function(){a.sort(null)}))||!e(16)(c)),"Array",{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(0),o=e(16)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,n,e){var r=e(4),i=e(52),o=e(5)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,e){"use strict";var r=e(0),i=e(22)(1);r(r.P+r.F*!e(16)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(2);r(r.P+r.F*!e(16)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(3);r(r.P+r.F*!e(16)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(4);r(r.P+r.F*!e(16)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(107);r(r.P+r.F*!e(16)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,n,e){"use strict";var r=e(0),i=e(107);r(r.P+r.F*!e(16)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,n,e){"use strict";var r=e(0),i=e(50)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!e(16)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=e(19),u=e(6),c=[].lastIndexOf,a=!!c&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(a||!e(16)(c)),"Array",{lastIndexOf:function(t){if(a)return c.apply(this,arguments)||0;var n=i(this),e=u(n.length),r=e-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(108)}),e(37)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(80)}),e(37)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(22)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(37)("find")},function(t,n,e){"use strict";var r=e(0),i=e(22)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(37)(o)},function(t,n,e){e(42)("Array")},function(t,n,e){var r=e(1),i=e(68),o=e(9).f,u=e(35).f,c=e(75),a=e(54),f=r.RegExp,s=f,l=f.prototype,h=/a/g,p=/a/g,v=new f(h)!==h;if(e(8)&&(!v||e(2)((function(){return p[e(5)("match")]=!1,f(h)!=h||f(p)==p||"/a/i"!=f(h,"i")})))){f=function(t,n){var e=this instanceof f,r=c(t),o=void 0===n;return!e&&r&&t.constructor===f&&o?t:i(v?new s(r&&!o?t.source:t,n):s((r=t instanceof f)?t.source:t,r&&o?a.call(t):n),e?this:l,f)};for(var d=function(t){t in f||o(f,t,{configurable:!0,get:function(){return s[t]},set:function(n){s[t]=n}})},g=u(s),y=0;g.length>y;)d(g[y++]);l.constructor=f,f.prototype=l,e(11)(r,"RegExp",f)}e(42)("RegExp")},function(t,n,e){"use strict";e(111);var r=e(3),i=e(54),o=e(8),u=/./.toString,c=function(t){e(11)(RegExp.prototype,"toString",t,!0)};e(2)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?c((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&c((function(){return u.call(this)}))},function(t,n,e){"use strict";var r=e(3),i=e(6),o=e(83),u=e(55);e(56)("match",1,(function(t,n,e,c){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=c(e,t,this);if(n.done)return n.value;var a=r(t),f=String(this);if(!a.global)return u(a,f);var s=a.unicode;a.lastIndex=0;for(var l,h=[],p=0;null!==(l=u(a,f));){var v=String(l[0]);h[p]=v,""===v&&(a.lastIndex=o(f,i(a.lastIndex),s)),p++}return 0===p?null:h}]}))},function(t,n,e){"use strict";var r=e(3),i=e(10),o=e(6),u=e(19),c=e(83),a=e(55),f=Math.max,s=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;e(56)("replace",2,(function(t,n,e,v){return[function(r,i){var o=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=v(e,t,this,n);if(i.done)return i.value;var l=r(t),h=String(this),p="function"==typeof n;p||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var w=a(l,h);if(null===w)break;if(m.push(w),!g)break;""===String(w[0])&&(l.lastIndex=c(h,o(l.lastIndex),y))}for(var b,x="",S=0,_=0;_<m.length;_++){w=m[_];for(var E=String(w[0]),O=f(s(u(w.index),h.length),0),F=[],P=1;P<w.length;P++)F.push(void 0===(b=w[P])?b:String(b));var M=w.groups;if(p){var I=[E].concat(F,O,h);void 0!==M&&I.push(M);var A=String(n.apply(void 0,I))}else A=d(E,h,O,F,M,n);O>=S&&(x+=h.slice(S,O)+A,S=O+E.length)}return x+h.slice(S)}];function d(t,n,r,o,u,c){var a=r+t.length,f=o.length,s=p;return void 0!==u&&(u=i(u),s=h),e.call(c,s,(function(e,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":c=u[i.slice(1,-1)];break;default:var s=+i;if(0===s)return e;if(s>f){var h=l(s/10);return 0===h?e:h<=f?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):e}c=o[s-1]}return void 0===c?"":c}))}}))},function(t,n,e){"use strict";var r=e(3),i=e(96),o=e(55);e(56)("search",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var c=r(t),a=String(this),f=c.lastIndex;i(f,0)||(c.lastIndex=0);var s=o(c,a);return i(c.lastIndex,f)||(c.lastIndex=f),null===s?-1:s.index}]}))},function(t,n,e){"use strict";var r=e(75),i=e(3),o=e(48),u=e(83),c=e(6),a=e(55),f=e(82),s=e(2),l=Math.min,h=[].push,p=!s((function(){RegExp(4294967295,"y")}));e(56)("split",2,(function(t,n,e,s){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,u,c,a=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,p=void 0===n?4294967295:n>>>0,v=new RegExp(t.source,s+"g");(o=f.call(v,i))&&!((u=v.lastIndex)>l&&(a.push(i.slice(l,o.index)),o.length>1&&o.index<i.length&&h.apply(a,o.slice(1)),c=o[0].length,l=u,a.length>=p));)v.lastIndex===o.index&&v.lastIndex++;return l===i.length?!c&&v.test("")||a.push(""):a.push(i.slice(l)),a.length>p?a.slice(0,p):a}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):v.call(String(i),e,r)},function(t,n){var r=s(v,t,this,n,v!==e);if(r.done)return r.value;var f=i(t),h=String(this),d=o(f,RegExp),g=f.unicode,y=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(p?"y":"g"),m=new d(p?f:"^(?:"+f.source+")",y),w=void 0===n?4294967295:n>>>0;if(0===w)return[];if(0===h.length)return null===a(m,h)?[h]:[];for(var b=0,x=0,S=[];x<h.length;){m.lastIndex=p?x:0;var _,E=a(m,p?h:h.slice(x));if(null===E||(_=l(c(m.lastIndex+(p?0:x)),h.length))===b)x=u(h,x,g);else{if(S.push(h.slice(b,x)),S.length===w)return S;for(var O=1;O<=E.length-1;O++)if(S.push(E[O]),S.length===w)return S;x=b=_}}return S.push(h.slice(b)),S}]}))},function(t,n,e){var r=e(1),i=e(84).set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,c=r.Promise,a="process"==e(23)(u);t.exports=function(){var t,n,e,f=function(){var r,i;for(a&&(r=u.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(a)e=function(){u.nextTick(f)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var s=c.resolve(void 0);e=function(){s.then(f)}}else e=function(){i.call(r,f)};else{var l=!0,h=document.createTextNode("");new o(f).observe(h,{characterData:!0}),e=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),t||(t=i,e()),n=i}}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){"use strict";var r=e(115),i=e(38);t.exports=e(59)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(115),i=e(38);t.exports=e(59)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(1),o=e(22)(0),u=e(11),c=e(28),a=e(95),f=e(116),s=e(4),l=e(38),h=e(38),p=!i.ActiveXObject&&"ActiveXObject"in i,v=c.getWeak,d=Object.isExtensible,g=f.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(s(t)){var n=v(t);return!0===n?g(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return f.def(l(this,"WeakMap"),t,n)}},w=t.exports=e(59)("WeakMap",y,m,f,!0,!0);h&&p&&(a((r=f.getConstructor(y,"WeakMap")).prototype,m),c.NEED=!0,o(["delete","has","get","set"],(function(t){var n=w.prototype,e=n[t];u(n,t,(function(n,i){if(s(n)&&!d(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)}))})))},function(t,n,e){"use strict";var r=e(116),i=e(38);e(59)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(60),o=e(85),u=e(3),c=e(33),a=e(6),f=e(4),s=e(1).ArrayBuffer,l=e(48),h=o.ArrayBuffer,p=o.DataView,v=i.ABV&&s.isView,d=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(s!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||f(t)&&g in t}}),r(r.P+r.U+r.F*e(2)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(u(this),t);for(var e=u(this).byteLength,r=c(t,e),i=c(void 0===n?e:n,e),o=new(l(this,h))(a(i-r)),f=new p(this),s=new p(o),v=0;r<i;)s.setUint8(v++,f.getUint8(r++));return o}}),e(42)("ArrayBuffer")},function(t,n,e){var r=e(0);r(r.G+r.W+r.F*!e(60).ABV,{DataView:e(85).DataView})},function(t,n,e){e(25)("Int8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}),!0)},function(t,n,e){e(25)("Int16",2,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint16",2,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Int32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Float32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Float64",8,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){var r=e(0),i=e(18),o=e(3),u=(e(1).Reflect||{}).apply,c=Function.apply;r(r.S+r.F*!e(2)((function(){u((function(){}))})),"Reflect",{apply:function(t,n,e){var r=i(t),a=o(e);return u?u(r,n,a):c.call(r,n,a)}})},function(t,n,e){var r=e(0),i=e(34),o=e(18),u=e(3),c=e(4),a=e(2),f=e(97),s=(e(1).Reflect||{}).construct,l=a((function(){function t(){}return!(s((function(){}),[],t)instanceof t)})),h=!a((function(){s((function(){}))}));r(r.S+r.F*(l||h),"Reflect",{construct:function(t,n){o(t),u(n);var e=arguments.length<3?t:o(arguments[2]);if(h&&!l)return s(t,n,e);if(t==e){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(f.apply(t,r))}var a=e.prototype,p=i(c(a)?a:Object.prototype),v=Function.apply.call(t,p,n);return c(v)?v:p}})},function(t,n,e){var r=e(9),i=e(0),o=e(3),u=e(27);i(i.S+i.F*e(2)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,n,e){o(t),n=u(n,!0),o(e);try{return r.f(t,n,e),!0}catch(t){return!1}}})},function(t,n,e){var r=e(0),i=e(20).f,o=e(3);r(r.S,"Reflect",{deleteProperty:function(t,n){var e=i(o(t),n);return!(e&&!e.configurable)&&delete t[n]}})},function(t,n,e){"use strict";var r=e(0),i=e(3),o=function(t){this._t=i(t),this._i=0;var n,e=this._k=[];for(n in t)e.push(n)};e(104)(o,"Object",(function(){var t,n=this._k;do{if(this._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){var r=e(20),i=e(36),o=e(13),u=e(0),c=e(4),a=e(3);u(u.S,"Reflect",{get:function t(n,e){var u,f,s=arguments.length<3?n:arguments[2];return a(n)===s?n[e]:(u=r.f(n,e))?o(u,"value")?u.value:void 0!==u.get?u.get.call(s):void 0:c(f=i(n))?t(f,e,s):void 0}})},function(t,n,e){var r=e(20),i=e(0),o=e(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(36),o=e(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(118)})},function(t,n,e){var r=e(0),i=e(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(9),i=e(20),o=e(36),u=e(13),c=e(0),a=e(29),f=e(3),s=e(4);c(c.S,"Reflect",{set:function t(n,e,c){var l,h,p=arguments.length<4?n:arguments[3],v=i.f(f(n),e);if(!v){if(s(h=o(n)))return t(h,e,c,p);v=a(0)}if(u(v,"value")){if(!1===v.writable||!s(p))return!1;if(l=i.f(p,e)){if(l.get||l.set||!1===l.writable)return!1;l.value=c,r.f(p,e,l)}else r.f(p,e,a(0,c));return!0}return void 0!==v.set&&(v.set.call(p,c),!0)}})},function(t,n,e){var r=e(0),i=e(66);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){e(276),t.exports=e(7).Array.includes},function(t,n,e){"use strict";var r=e(0),i=e(50)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(37)("includes")},function(t,n,e){e(278),t.exports=e(7).Array.flatMap},function(t,n,e){"use strict";var r=e(0),i=e(279),o=e(10),u=e(6),c=e(18),a=e(106);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return c(t),n=u(r.length),e=a(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(37)("flatMap")},function(t,n,e){"use strict";var r=e(52),i=e(4),o=e(6),u=e(17),c=e(5)("isConcatSpreadable");t.exports=function t(n,e,a,f,s,l,h,p){for(var v,d,g=s,y=0,m=!!h&&u(h,p,3);y<f;){if(y in a){if(v=m?m(a[y],y,e):a[y],d=!1,i(v)&&(d=void 0!==(d=v[c])?!!d:r(v)),d&&l>0)g=t(n,e,v,o(v.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();n[g]=v}g++}y++}return g}},function(t,n,e){e(281),t.exports=e(7).String.padStart},function(t,n,e){"use strict";var r=e(0),i=e(119),o=e(58),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){e(283),t.exports=e(7).String.padEnd},function(t,n,e){"use strict";var r=e(0),i=e(119),o=e(58),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){e(285),t.exports=e(7).String.trimLeft},function(t,n,e){"use strict";e(40)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,e){e(287),t.exports=e(7).String.trimRight},function(t,n,e){"use strict";e(40)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,e){e(289),t.exports=e(62).f("asyncIterator")},function(t,n,e){e(91)("asyncIterator")},function(t,n,e){e(291),t.exports=e(7).Object.getOwnPropertyDescriptors},function(t,n,e){var r=e(0),i=e(118),o=e(15),u=e(20),c=e(78);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),a=u.f,f=i(r),s={},l=0;f.length>l;)void 0!==(e=a(r,n=f[l++]))&&c(s,n,e);return s}})},function(t,n,e){e(293),t.exports=e(7).Object.values},function(t,n,e){var r=e(0),i=e(120)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){e(295),t.exports=e(7).Object.entries},function(t,n,e){var r=e(0),i=e(120)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";e(112),e(297),t.exports=e(7).Promise.finally},function(t,n,e){"use strict";var r=e(0),i=e(7),o=e(1),u=e(48),c=e(114);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return c(n,t()).then((function(){return e}))}:t,e?function(e){return c(n,t()).then((function(){throw e}))}:t)}})},function(t,n,e){e(299),e(300),e(301),t.exports=e(7)},function(t,n,e){var r=e(1),i=e(0),o=e(58),u=[].slice,c=/MSIE .\./.test(o),a=function(t){return function(n,e){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*c,{setTimeout:a(r.setTimeout),setInterval:a(r.setInterval)})},function(t,n,e){var r=e(0),i=e(84);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(81),i=e(32),o=e(11),u=e(1),c=e(14),a=e(41),f=e(5),s=f("iterator"),l=f("toStringTag"),h=a.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=i(p),d=0;d<v.length;d++){var g,y=v[d],m=p[y],w=u[y],b=w&&w.prototype;if(b&&(b[s]||c(b,s,h),b[l]||c(b,l,y),a[y]=h,m))for(g in r)b[g]||o(b,g,r[g],!0)}},function(t,n,e){var r=function(t){"use strict";var n,e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function a(t,n,e,r){var i=n&&n.prototype instanceof d?n:d,o=Object.create(i.prototype),u=new P(r||[]);return o._invoke=function(t,n,e){var r=s;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return I()}for(e.method=i,e.arg=o;;){var u=e.delegate;if(u){var c=E(u,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===s)throw r=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var a=f(t,n,e);if("normal"===a.type){if(r=e.done?p:l,a.arg===v)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(r=p,e.method="throw",e.arg=a.arg)}}}(t,e,u),o}function f(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var s="suspendedStart",l="suspendedYield",h="executing",p="completed",v={};function d(){}function g(){}function y(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(M([])));b&&b!==e&&r.call(b,o)&&(m=b);var x=y.prototype=d.prototype=Object.create(m);function S(t){["next","throw","return"].forEach((function(n){t[n]=function(t){return this._invoke(n,t)}}))}function _(t){var n;this._invoke=function(e,i){function o(){return new Promise((function(n,o){!function n(e,i,o,u){var c=f(t[e],t,i);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then((function(t){n("next",t,o,u)}),(function(t){n("throw",t,o,u)})):Promise.resolve(s).then((function(t){a.value=t,o(a)}),(function(t){return n("throw",t,o,u)}))}u(c.arg)}(e,i,n,o)}))}return n=n?n.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=f(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function F(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function e(){for(;++i<t.length;)if(r.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=n,e.done=!0,e};return u.next=u}}return{next:I}}function I(){return{value:n,done:!0}}return g.prototype=x.constructor=y,y.constructor=g,y[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===g||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(_.prototype),_.prototype[u]=function(){return this},t.AsyncIterator=_,t.async=function(n,e,r,i){var o=new _(a(n,e,r,i));return t.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},S(x),x[c]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(r,i){return c.type="throw",c.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],c=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var a=r.call(u,"catchLoc"),f=r.call(u,"finallyLoc");if(a&&f){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(a){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),v},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),F(e),v}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;F(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,n,e){e(304),t.exports=e(121).global},function(t,n,e){var r=e(305);r(r.G,{global:e(86)})},function(t,n,e){var r=e(86),i=e(121),o=e(306),u=e(308),c=e(315),a=function(t,n,e){var f,s,l,h=t&a.F,p=t&a.G,v=t&a.S,d=t&a.P,g=t&a.B,y=t&a.W,m=p?i:i[n]||(i[n]={}),w=m.prototype,b=p?r:v?r[n]:(r[n]||{}).prototype;for(f in p&&(e=n),e)(s=!h&&b&&void 0!==b[f])&&c(m,f)||(l=s?b[f]:e[f],m[f]=p&&"function"!=typeof b[f]?e[f]:g&&s?o(l,r):y&&b[f]==l?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((m.virtual||(m.virtual={}))[f]=l,t&a.R&&w&&!w[f]&&u(w,f,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n,e){var r=e(307);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(309),i=e(314);t.exports=e(88)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(310),i=e(311),o=e(313),u=Object.defineProperty;n.f=e(88)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(87);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(88)&&!e(122)((function(){return 7!=Object.defineProperty(e(312)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(87),i=e(86).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(87);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){"use strict";var r=e(317);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,n,e,i,o,u){if(u!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return t}t.isRequired=t;var e={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:i};return e.PropTypes=e,e}},function(t,n,e){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}]);
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var e=function(){function t(){}function n(t,n){for(var e=n.length,r=0;r<e;++r)i(t,n[r])}t.prototype=Object.create(null);var e={}.hasOwnProperty;var r=/\s+/;function i(t,i){if(i){var o=typeof i;"string"===o?function(t,n){for(var e=n.split(r),i=e.length,o=0;o<i;++o)t[e[o]]=!0}(t,i):Array.isArray(i)?n(t,i):"object"===o?function(t,n){for(var r in n)e.call(n,r)&&(t[r]=!!n[r])}(t,i):"number"===o&&function(t,n){t[n]=!0}(t,i)}}return function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=new t;n(o,r);var u=[];for(var c in o)o[c]&&u.push(c);return u.join(" ")}}();t.exports?(e.default=e,t.exports=e):void 0===(r=function(){return e}.apply(n,[]))||(t.exports=r)}()},function(t,n,e){"use strict";var r=e(125),i=e.n(r),o=e(26),u=e.n(o);function c(){return(c=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function a(t,n){if(null==t)return{};var e,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e=o[r],n.indexOf(e)>=0||(i[e]=t[e]);return i}var f=function(t,n){return t(n={exports:{}},n.exports),n.exports}((function(t){!function(n){if("undefined"!=typeof window){var e,r=0,i=!1,o=!1,u="message".length,c="[iFrameSizer]",a=c.length,f=null,s=window.requestAnimationFrame,l={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},h={},p=null,v={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){_("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},d={};window.jQuery&&((e=window.jQuery).fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(t){return this.filter("iframe").each((function(n,e){C(e,t)})).end()}):S("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof n&&n.amd?n([],V):t.exports=V(),window.iFrameResize=window.iFrameResize||V()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function y(t,n,e){t.addEventListener(n,e,!1)}function m(t,n,e){t.removeEventListener(n,e,!1)}function w(t){return c+"["+function(t){var n="Host page: "+t;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+t:"Nested host page: "+t),n}(t)+"]"}function b(t){return h[t]?h[t].log:i}function x(t,n){E("log",t,n,b(t))}function S(t,n){E("info",t,n,b(t))}function _(t,n){E("warn",t,n,!0)}function E(t,n,e,r){!0===r&&"object"==typeof window.console&&console[t](w(n),e)}function O(t){function n(){i("Height"),i("Width"),N((function(){R(W),A(D),g("onResized",W)}),W,"init")}function e(t){return"border-box"!==t.boxSizing?0:(t.paddingTop?parseInt(t.paddingTop,10):0)+(t.paddingBottom?parseInt(t.paddingBottom,10):0)}function r(t){return"border-box"!==t.boxSizing?0:(t.borderTopWidth?parseInt(t.borderTopWidth,10):0)+(t.borderBottomWidth?parseInt(t.borderBottomWidth,10):0)}function i(t){var n=Number(h[D]["max"+t]),e=Number(h[D]["min"+t]),r=t.toLowerCase(),i=Number(W[r]);x(D,"Checking "+r+" is in range "+e+"-"+n),i<e&&(i=e,x(D,"Set "+r+" to min value")),i>n&&(i=n,x(D,"Set "+r+" to max value")),W[r]=""+i}function o(t){return z.substr(z.indexOf(":")+u+t)}function s(t,n){var e,r,i;e=function(){var e,r;k("Send Page Info","pageInfo:"+(e=document.body.getBoundingClientRect(),r=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:r.height,iframeWidth:r.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(r.top-e.top,10),offsetLeft:parseInt(r.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),t,n)},r=32,d[i=n]||(d[i]=setTimeout((function(){d[i]=null,e()}),r))}function l(t){var n=t.getBoundingClientRect();return I(D),{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function p(t){var n=t?l(W.iframe):{x:0,y:0},e={x:Number(W.width)+n.x,y:Number(W.height)+n.y};x(D,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(t?"Offset":"")](e.x,e.y):_(D,"Unable to scroll to requested position, window.parentIFrame not found"):(f=e,v(),x(D,"--"))}function v(){!1!==g("onScroll",f)?A(D):j()}function g(t,n){return F(D,t,n)}var w,b,E,O,P,C,z=t.data,W={},D=null;"[iFrameResizerChild]Ready"===z?function(){for(var t in h)k("iFrame requested init",L(t),document.getElementById(t),t)}():c===(""+z).substr(0,a)&&z.substr(a).split(":")[0]in h?(E=z.substr(a).split(":"),O=E[1]?parseInt(E[1],10):0,P=h[E[0]]&&h[E[0]].iframe,C=getComputedStyle(P),W={iframe:P,id:E[0],height:O+e(C)+r(C),width:E[2],type:E[3]},D=W.id,h[D]&&(h[D].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&x(D,"Ignoring init message from meta parent page"),!b&&function(t){var n=!0;return h[t]||(n=!1,_(W.type+" No settings for "+t+". Message was: "+z)),n}(D)&&(x(D,"Received: "+z),w=!0,null===W.iframe&&(_(D,"IFrame ("+W.id+") not found"),w=!1),w&&function(){var n,e=t.origin,r=h[D]&&h[D].checkOrigin;if(r&&""+e!="null"&&!(r.constructor===Array?function(){var t=0,n=!1;for(x(D,"Checking connection is from allowed list of origins: "+r);t<r.length;t++)if(r[t]===e){n=!0;break}return n}():(n=h[D]&&h[D].remoteHost,x(D,"Checking connection is from: "+n),e===n)))throw new Error("Unexpected message received from: "+e+" for "+W.iframe.id+". Message was: "+t.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(h[D]&&h[D].firstRun&&h[D]&&(h[D].firstRun=!1),W.type){case"close":M(W.iframe);break;case"message":c=o(6),x(D,"onMessage passed: {iframe: "+W.iframe.id+", message: "+c+"}"),g("onMessage",{iframe:W.iframe,message:JSON.parse(c)}),x(D,"--");break;case"autoResize":h[D].autoResize=JSON.parse(o(9));break;case"scrollTo":p(!1);break;case"scrollToOffset":p(!0);break;case"pageInfo":s(h[D]&&h[D].iframe,D),function(){function t(t,r){function i(){h[e]?s(h[e].iframe,e):n()}["scroll","resize"].forEach((function(n){x(e,t+n+" listener for sendPageInfo"),r(window,n,i)}))}function n(){t("Remove ",m)}var e=D;t("Add ",y),h[e]&&(h[e].stopPageInfo=n)}();break;case"pageInfoStop":h[D]&&h[D].stopPageInfo&&(h[D].stopPageInfo(),delete h[D].stopPageInfo);break;case"inPageLink":t=o(9),r=t.split("#")[1]||"",i=decodeURIComponent(r),(u=document.getElementById(i)||document.getElementsByName(i)[0])?(e=l(u),x(D,"Moving to in page link (#"+r+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},v(),x(D,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(r):x(D,"In page link #"+r+" not found and window.parentIFrame not found"):x(D,"In page link #"+r+" not found");break;case"reset":T(W);break;case"init":n(),g("onInit",W.iframe);break;default:n()}var t,e,r,i,u,c}())):S(D,"Ignored: "+z)}function F(t,n,e){var r=null,i=null;if(h[t]){if("function"!=typeof(r=h[t][n]))throw new TypeError(n+" on iFrame["+t+"] is not a function");i=r(e)}return i}function P(t){var n=t.id;delete h[n]}function M(t){var n=t.id;if(!1!==F(n,"onClose",n)){x(n,"Removing iFrame: "+n);try{t.parentNode&&t.parentNode.removeChild(t)}catch(t){_(t)}F(n,"onClosed",n),x(n,"--"),P(t)}else x(n,"Close iframe cancelled by onClose event")}function I(t){null===f&&x(t,"Get page position: "+(f={x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop}).x+","+f.y)}function A(t){null!==f&&(window.scrollTo(f.x,f.y),x(t,"Set page position: "+f.x+","+f.y),j())}function j(){f=null}function T(t){x(t.id,"Size reset requested by "+("init"===t.type?"host page":"iFrame")),I(t.id),N((function(){R(t),k("reset","reset",t.iframe,t.id)}),t,"reset")}function R(t){function n(n){o||"0"!==t[n]||(o=!0,x(r,"Hidden iFrame detected, creating visibility listener"),function(){function t(){Object.keys(h).forEach((function(t){!function(t){function n(n){return"0px"===(h[t]&&h[t].iframe.style[n])}h[t]&&null!==h[t].iframe.offsetParent&&(n("height")||n("width"))&&k("Visibility change","resize",h[t].iframe,t)}(t)}))}function n(n){x("window","Mutation observed: "+n[0].target+" "+n[0].type),z(t,16)}var e=g();e&&(r=document.querySelector("body"),new e(n).observe(r,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}));var r}())}function e(e){!function(n){t.id?(t.iframe.style[n]=t[n]+"px",x(t.id,"IFrame ("+r+") "+n+" set to "+t[n]+"px")):x("undefined","messageData id not set")}(e),n(e)}var r=t.iframe.id;h[r]&&(h[r].sizeHeight&&e("height"),h[r].sizeWidth&&e("width"))}function N(t,n,e){e!==n.type&&s&&!window.jasmine?(x(n.id,"Requesting animation frame"),s(t)):t()}function k(t,n,e,r,i){var o,u=!1;r=r||e.id,h[r]&&(e&&"contentWindow"in e&&null!==e.contentWindow?(o=h[r]&&h[r].targetOrigin,x(r,"["+t+"] Sending msg to iframe["+r+"] ("+n+") targetOrigin: "+o),e.contentWindow.postMessage(c+n,o)):_(r,"["+t+"] IFrame("+r+") not found"),i&&h[r]&&h[r].warningTimeout&&(h[r].msgTimeout=setTimeout((function(){!h[r]||h[r].loaded||u||(u=!0,_(r,"IFrame has not responded within "+h[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),h[r].warningTimeout)))}function L(t){return t+":"+h[t].bodyMarginV1+":"+h[t].sizeWidth+":"+h[t].log+":"+h[t].interval+":"+h[t].enablePublicMethods+":"+h[t].autoResize+":"+h[t].bodyMargin+":"+h[t].heightCalculationMethod+":"+h[t].bodyBackground+":"+h[t].bodyPadding+":"+h[t].tolerance+":"+h[t].inPageLinks+":"+h[t].resizeFrom+":"+h[t].widthCalculationMethod}function C(t,e){function o(t){var n=t.split("Callback");if(2===n.length){var e="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[e]=this[t],delete this[t],_(a,"Deprecated: '"+t+"' has been renamed '"+e+"'. The old method will be removed in the next major version.")}}var u,c,a=function(n){var o;return""===n&&(t.id=(o=e&&e.id||v.id+r++,null!==document.getElementById(o)&&(o+=r++),n=o),i=(e||{}).log,x(n,"Added missing iframe ID: "+n+" ("+t.src+")")),n}(t.id);a in h&&"iFrameResizer"in t?_(a,"Ignored iFrame, already setup."):(!function(n){var e;n=n||{},h[a]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(t){if("object"!=typeof t)throw new TypeError("Options is not an object")}(n),Object.keys(n).forEach(o,n),function(t){for(var n in v)Object.prototype.hasOwnProperty.call(v,n)&&(h[a][n]=Object.prototype.hasOwnProperty.call(t,n)?t[n]:v[n])}(n),h[a]&&(h[a].targetOrigin=!0===h[a].checkOrigin?""===(e=h[a].remoteHost)||"file://"===e?"*":e:"*")}(e),function(){switch(x(a,"IFrame scrolling "+(h[a]&&h[a].scrolling?"enabled":"disabled")+" for "+a),t.style.overflow=!1===(h[a]&&h[a].scrolling)?"hidden":"auto",h[a]&&h[a].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=h[a]?h[a].scrolling:"no"}}(),function(){function n(n){1/0!==h[a][n]&&0!==h[a][n]&&(t.style[n]=h[a][n]+"px",x(a,"Set "+n+" = "+h[a][n]+"px"))}function e(t){if(h[a]["min"+t]>h[a]["max"+t])throw new Error("Value for min"+t+" can not be greater than max"+t)}e("Height"),e("Width"),n("maxHeight"),n("minHeight"),n("maxWidth"),n("minWidth")}(),"number"!=typeof(h[a]&&h[a].bodyMargin)&&"0"!==(h[a]&&h[a].bodyMargin)||(h[a].bodyMarginV1=h[a].bodyMargin,h[a].bodyMargin=h[a].bodyMargin+"px"),u=L(a),(c=g())&&function(n){t.parentNode&&new n((function(n){n.forEach((function(n){Array.prototype.slice.call(n.removedNodes).forEach((function(n){n===t&&M(t)}))}))})).observe(t.parentNode,{childList:!0})}(c),y(t,"load",(function(){var e,r;k("iFrame.onload",u,t,n,!0),e=h[a]&&h[a].firstRun,r=h[a]&&h[a].heightCalculationMethod in l,!e&&r&&T({iframe:t,height:0,width:0,type:"init"})})),k("init",u,t,n,!0),h[a]&&(h[a].iframe.iFrameResizer={close:M.bind(null,h[a].iframe),removeListeners:P.bind(null,h[a].iframe),resize:k.bind(null,"Window resize","resize",h[a].iframe),moveToAnchor:function(t){k("Move to anchor","moveToAnchor:"+t,h[a].iframe,a)},sendMessage:function(t){k("Send Message","message:"+(t=JSON.stringify(t)),h[a].iframe,a)}}))}function z(t,n){null===p&&(p=setTimeout((function(){p=null,t()}),n))}function W(){"hidden"!==document.visibilityState&&(x("document","Trigger event: Visiblity change"),z((function(){D("Tab Visable","resize")}),16))}function D(t,n){Object.keys(h).forEach((function(e){(function(t){return h[t]&&"parent"===h[t].resizeFrom&&h[t].autoResize&&!h[t].firstRun})(e)&&k(t,n,document.getElementById(e),e)}))}function B(){y(window,"message",O),y(window,"resize",(function(){var t;x("window","Trigger event: "+(t="resize")),z((function(){D("Window "+t,"resize")}),16)})),y(document,"visibilitychange",W),y(document,"-webkit-visibilitychange",W)}function V(){function t(t,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),C(n,t),e.push(n))}var e;return function(){var t,n=["moz","webkit","o","ms"];for(t=0;t<n.length&&!s;t+=1)s=window[n[t]+"RequestAnimationFrame"];s||x("setup","RequestAnimationFrame not supported")}(),B(),function(r,i){switch(e=[],function(t){t&&t.enablePublicMethods&&_("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(r),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),t.bind(n,r));break;case"object":t(r,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return e}}}()})),s=function(){},l=s,h=function(t){var n=t.title,e=t.forwardRef,r=a(t,["title","forwardRef"]),i=function(t){t.autoResize,t.bodyBackground,t.bodyMargin,t.bodyPadding,t.checkOrigin,t.inPageLinks,t.heightCalculationMethod,t.interval,t.log,t.maxHeight,t.maxWidth,t.minHeight,t.minWidth,t.resizeFrom,t.scrolling,t.sizeHeight,t.sizeWidth,t.warningTimeout,t.tolerance,t.widthCalculationMethod,t.onClosed,t.onInit,t.onMessage,t.onResized;return a(t,["autoResize","bodyBackground","bodyMargin","bodyPadding","checkOrigin","inPageLinks","heightCalculationMethod","interval","log","maxHeight","maxWidth","minHeight","minWidth","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClosed","onInit","onMessage","onResized"])}(r),s=Object(o.useRef)(null),h=function(){return l(!s.current,"[iframeSizerReact]["+s.current.id+"] Close event ignored, to remove the iframe update your React component"),!s.current};return Object(o.useEffect)((function(){var t=s.current;return f(c({},r,{onClose:h}),t),function(){return t.iframeResizer&&t.iframeResizer.removeListeners()}}),[]),Object(o.useImperativeHandle)(e,(function(){return{resize:function(){return s.current.iFrameResizer.resize()},moveToAnchor:function(t){return s.current.iFrameResizer.moveToAnchor(t)},sendMessage:function(t,n){s.current.iFrameResizer.sendMessage(t,n)}}})),u.a.createElement("iframe",c({title:n},i,{ref:s}))};h.defaultProps={title:"iframe"},h.propTypes={title:i.a.string},n.a=h},function(t,n,e){t.exports=e(316)()},function(t,n,e){"use strict";function r(t,n,e,r){var i,o=!1,u=0;function c(){i&&clearTimeout(i)}function a(){var a=this,f=Date.now()-u,s=arguments;function l(){u=Date.now(),e.apply(a,s)}o||(r&&!i&&l(),c(),void 0===r&&f>t?l():!0!==n&&(i=setTimeout(r?function(){i=void 0}:l,void 0===r?t-f:t)))}return"boolean"!=typeof n&&(r=e,e=n,n=void 0),a.cancel=function(){c(),o=!0},a}e.d(n,"a",(function(){return r}))},function(t,n,e){t.exports=e(128)},function(t,n,e){"use strict";e.r(n),function(t){var n=e(126),r=e(123),i=e.n(r),o=e(124),u=e(89);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,n){return!n||"object"!==c(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}t._babelPolyfill||e(130);var h=window.jQuery,p=h(window),v=window.VPAdminGutenbergVariables,d=wp.i18n.__,g=wp.element,y=g.Component,m=g.Fragment,w=g.RawHTML,b=wp.blocks.registerBlockType,x=wp.components,S=x.Placeholder,_=x.Spinner,E=x.PanelBody,O=x.SelectControl,F=wp.blockEditor.InspectorControls,P=wp.apiFetch,M=wp.data,I=M.registerStore,A=M.withSelect;function j(){var t=h(".editor-styles-wrapper").width();t&&h(".visual-portfolio-gutenberg-preview iframe").each((function(){var n=h(this),e=n.closest(".visual-portfolio-gutenberg-preview-inner"),r=n.closest(".visual-portfolio-gutenberg-preview").width();e.css({width:t}),this.iFrameResizer&&(this.iFrameResizer.sendMessage({name:"resize",width:r}),this.iFrameResizer.resize())}))}p.on("resize",Object(n.a)(300,j));var T={apiFetch:function(t){return{type:"API_FETCH",request:t}},setPortfolioLayouts:function(t,n){return{type:"SET_PORTFOLIO_LAYOUTS",query:t,layouts:n}}};I("nk/visual-portfolio",{reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{layouts:{}},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"SET_PORTFOLIO_LAYOUTS":return!t.layouts[n.query]&&n.layouts&&(t.layouts[n.query]=n.layouts),t}return t},actions:T,selectors:{getPortfolioLayouts:function(t,n){return t.layouts[n]}},controls:{API_FETCH:function(t){var n=t.request;return P(n).catch((function(t){return!(!t||!t.error||"no_layouts_found"!==t.error_code)&&{response:[],error:!1,success:!0}})).then((function(t){return!!(t&&t.success&&t.response)&&t.response}))}},resolvers:{getPortfolioLayouts:regeneratorRuntime.mark((function t(n){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T.apiFetch({path:n});case 2:return e=t.sent,t.abrupt("return",T.setPortfolioLayouts(n,e));case 4:case"end":return t.stop()}}),t)}))}});var R=function(t){function n(){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),f(this,s(n).apply(this,arguments))}var e,r,c;return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(n,t),e=n,(r=[{key:"shouldComponentUpdate",value:function(t){return this.props.attributes.id!==t.attributes.id||this.props.portfolioLayouts!==t.portfolioLayouts||this.props.className!==t.className}},{key:"render",value:function(){var t=this.props,n=t.portfolioLayouts,e=t.attributes,r=t.setAttributes,c=this.props.className,a=e.id,f=e.ghostkitClassname,s=!1,l=!1;f&&(c=i()(c,f)),n?(s=[{label:d("--- Select layout ---"),value:""}],Object.keys(n).map((function(t){var e=n[t];s.push({label:"#".concat(e.id," - ").concat(e.title),value:e.id}),a&&parseInt(a,10)===e.id&&(l=e.edit_url)}))):a&&(s=[{label:"#".concat(a),value:a}]);var h=v.preview_url+(v.preview_url.split("?")[1]?"&":"?")+"vp_preview_frame=true&vp_preview_type=gutenberg&vp_preview_frame_id=".concat(a),p=wp.element.createElement(m,null,Array.isArray(s)?"":wp.element.createElement(_,null),Array.isArray(s)&&s.length?wp.element.createElement(m,null,wp.element.createElement(O,{value:a,onChange:function(t){return r({id:t})},options:s})):"",Array.isArray(s)&&!s.length?d("No portfolio layouts found."):"");return wp.element.createElement(m,null,wp.element.createElement(F,null,wp.element.createElement(E,null,p),Array.isArray(s)&&s.length&&l?wp.element.createElement(E,null,wp.element.createElement("a",{href:l,target:"_blank",rel:"noopener noreferrer"},d("Edit Layout"))):""),wp.element.createElement("div",{className:c},a?wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview"},wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview-inner"},wp.element.createElement(o.a,{src:h,onInit:function(){j()},allowtransparency:"true"}))):wp.element.createElement(S,{className:"visual-portfolio-gutenberg-placeholder",icon:wp.element.createElement(u.a,null),label:d("Visual Portfolio")},p)))}}])&&a(e.prototype,r),c&&a(e,c),n}(y);b("nk/visual-portfolio",{title:"Visual Portfolio",icon:u.a,category:"common",keywords:["visual portfolio","vp","portfolio"],ghostkit:{supports:{spacings:!0,display:!0,scrollReveal:!0}},supports:{anchor:!0,className:!0,html:!1,align:["wide","full"]},attributes:{id:{type:"string"}},edit:A((function(t){return{portfolioLayouts:t("nk/visual-portfolio").getPortfolioLayouts("/visual-portfolio/v1/get_layouts/")}}))(R),save:function(t){var n=t.attributes,e=n.id,r=n.className,i="[visual_portfolio";return e&&(i+=' id="'.concat(e,'"')),r&&(i+=' class="'.concat(r,'"')),i+="]",wp.element.createElement(w,null,i)},transforms:{from:[{type:"shortcode",tag:"visual_portfolio",attributes:{id:{type:"string",shortcode:function(t){return t.named.id}},className:{type:"string",shortcode:function(t){return t.named.class}}}}]}})}.call(this,e(129))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";e(131);var r,i=(r=e(303))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,e){"use strict";e(132),e(275),e(277),e(280),e(282),e(284),e(286),e(288),e(290),e(292),e(294),e(296),e(298),e(302)},function(t,n,e){e(133),e(136),e(137),e(138),e(139),e(140),e(141),e(142),e(143),e(144),e(145),e(146),e(147),e(148),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(210),e(211),e(212),e(214),e(215),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(225),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(81),e(238),e(110),e(239),e(111),e(240),e(241),e(242),e(243),e(112),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(254),e(255),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),t.exports=e(7)},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(8),u=e(0),c=e(11),a=e(28).KEY,f=e(2),s=e(49),l=e(39),h=e(30),p=e(5),v=e(62),d=e(91),g=e(135),y=e(52),m=e(3),w=e(4),b=e(10),x=e(15),S=e(27),_=e(29),E=e(34),O=e(94),F=e(20),P=e(51),M=e(9),I=e(32),A=F.f,j=M.f,T=O.f,R=r.Symbol,N=r.JSON,k=N&&N.stringify,L=p("_hidden"),C=p("toPrimitive"),z={}.propertyIsEnumerable,W=s("symbol-registry"),D=s("symbols"),B=s("op-symbols"),V=Object.prototype,U="function"==typeof R&&!!P.f,H=r.QObject,G=!H||!H.prototype||!H.prototype.findChild,q=o&&f((function(){return 7!=E(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=A(V,n);r&&delete V[n],j(t,n,e),r&&t!==V&&j(V,n,r)}:j,Y=function(t){var n=D[t]=E(R.prototype);return n._k=t,n},J=U&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},X=function(t,n,e){return t===V&&X(B,n,e),m(t),n=S(n,!0),m(e),i(D,n)?(e.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),e=E(e,{enumerable:_(0,!1)})):(i(t,L)||j(t,L,_(1,{})),t[L][n]=!0),q(t,n,e)):j(t,n,e)},K=function(t,n){m(t);for(var e,r=g(n=x(n)),i=0,o=r.length;o>i;)X(t,e=r[i++],n[e]);return t},$=function(t){var n=z.call(this,t=S(t,!0));return!(this===V&&i(D,t)&&!i(B,t))&&(!(n||!i(this,t)||!i(D,t)||i(this,L)&&this[L][t])||n)},Q=function(t,n){if(t=x(t),n=S(n,!0),t!==V||!i(D,n)||i(B,n)){var e=A(t,n);return!e||!i(D,n)||i(t,L)&&t[L][n]||(e.enumerable=!0),e}},Z=function(t){for(var n,e=T(x(t)),r=[],o=0;e.length>o;)i(D,n=e[o++])||n==L||n==a||r.push(n);return r},tt=function(t){for(var n,e=t===V,r=T(e?B:x(t)),o=[],u=0;r.length>u;)!i(D,n=r[u++])||e&&!i(V,n)||o.push(D[n]);return o};U||(c((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===V&&n.call(B,e),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),q(this,t,_(1,e))};return o&&G&&q(V,t,{configurable:!0,set:n}),Y(t)}).prototype,"toString",(function(){return this._k})),F.f=Q,M.f=X,e(35).f=O.f=Z,e(46).f=$,P.f=tt,o&&!e(31)&&c(V,"propertyIsEnumerable",$,!0),v.f=function(t){return Y(p(t))}),u(u.G+u.W+u.F*!U,{Symbol:R});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)p(nt[et++]);for(var rt=I(p.store),it=0;rt.length>it;)d(rt[it++]);u(u.S+u.F*!U,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=R(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){G=!0},useSimple:function(){G=!1}}),u(u.S+u.F*!U,"Object",{create:function(t,n){return void 0===n?E(t):K(E(t),n)},defineProperty:X,defineProperties:K,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var ot=f((function(){P.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return P.f(b(t))}}),N&&u(u.S+u.F*(!U||f((function(){var t=R();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(w(n)||void 0!==t)&&!J(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!J(n))return n}),r[1]=n,k.apply(N,r)}}),R.prototype[C]||e(14)(R.prototype,C,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=e(49)("native-function-to-string",Function.toString)},function(t,n,e){var r=e(32),i=e(51),o=e(46);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,c=e(t),a=o.f,f=0;c.length>f;)a.call(t,u=c[f++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(34)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperty:e(9).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperties:e(93)})},function(t,n,e){var r=e(15),i=e(20).f;e(21)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(r(t),n)}}))},function(t,n,e){var r=e(10),i=e(36);e(21)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,n,e){var r=e(10),i=e(32);e(21)("keys",(function(){return function(t){return i(r(t))}}))},function(t,n,e){e(21)("getOwnPropertyNames",(function(){return e(94).f}))},function(t,n,e){var r=e(4),i=e(28).onFreeze;e(21)("freeze",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(28).onFreeze;e(21)("seal",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(28).onFreeze;e(21)("preventExtensions",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4);e(21)("isFrozen",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(21)("isSealed",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(21)("isExtensible",(function(t){return function(n){return!!r(n)&&(!t||t(n))}}))},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(95)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(96)})},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(66).set})},function(t,n,e){"use strict";var r=e(47),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(11)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(97)})},function(t,n,e){var r=e(9).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(8)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(36),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(9).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(99);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(100);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(23),u=e(68),c=e(27),a=e(2),f=e(35).f,s=e(20).f,l=e(9).f,h=e(40).trim,p=r.Number,v=p,d=p.prototype,g="Number"==o(e(34)(d)),y="trim"in String.prototype,m=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=y?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,a=n.slice(2),f=0,s=a.length;f<s;f++)if((u=a.charCodeAt(f))<48||u>i)return NaN;return parseInt(a,r)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof p&&(g?a((function(){d.valueOf.call(e)})):"Number"!=o(e))?u(new v(m(n)),e,p):m(n)};for(var w,b=e(8)?f(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)i(v,w=b[x])&&!i(p,w)&&l(p,w,s(v,w));p.prototype=d,d.constructor=p,e(11)(r,"Number",p)}},function(t,n,e){"use strict";var r=e(0),i=e(19),o=e(101),u=e(69),c=1..toFixed,a=Math.floor,f=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*f[e],f[e]=r%1e7,r=a(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=f[n],f[n]=a(e/t),e=e%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==f[t]){var e=String(f[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},v=function(t,n,e){return 0===n?e:n%2==1?v(t,n-1,e*t):v(t*t,n/2,e)};r(r.P+r.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(2)((function(){c.call({})}))),"Number",{toFixed:function(t){var n,e,r,c,a=o(this,s),f=i(t),d="",g="0";if(f<0||f>20)throw RangeError(s);if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return String(a);if(a<0&&(d="-",a=-a),a>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(a*v(2,69,1))-69)<0?a*v(2,-n,1):a/v(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=f;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<<r),l(1,1),h(2),g=p()}else l(0,e),l(1<<-n,0),g=p()+u.call("0",f);return g=f>0?d+((c=g.length)<=f?"0."+u.call("0",f-c)+g:g.slice(0,c-f)+"."+g.slice(c-f)):d+g}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(101),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(1).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(102)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(102),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(100);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(99);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(103),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){var r=e(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(70);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(71);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(178)})},function(t,n,e){var r=e(70),i=Math.pow,o=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),a=i(2,-126);t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),f=r(t);return i<a?f*(i/a/u+1/o-1/o)*a*u:(e=(n=(1+u/o)*i)-(n-i))>c||e!=e?f*(1/0):f*e}},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,c=arguments.length,a=0;u<c;)a<(e=i(arguments[u++]))?(o=o*(r=a/e)*r+1,a=e):o+=e>0?(r=e/a)*r:e;return a===1/0?1/0:a*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(2)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(103)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(70)})},function(t,n,e){var r=e(0),i=e(71),o=Math.exp;r(r.S+r.F*e(2)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(71),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(33),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(15),o=e(6);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],c=0;e>c;)u.push(String(n[c++])),c<r&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,e){"use strict";e(40)("trim",(function(t){return function(){return t(this,3)}}))},function(t,n,e){"use strict";var r=e(72)(!0);e(73)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(0),i=e(72)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(74),u="".endsWith;r(r.P+r.F*e(76)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),c=void 0===e?r:Math.min(i(e),r),a=String(t);return u?u.call(n,a,c):n.slice(c-a.length,c)===a}})},function(t,n,e){"use strict";var r=e(0),i=e(74);r(r.P+r.F*e(76)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(69)})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(74),u="".startsWith;r(r.P+r.F*e(76)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(12)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,e){"use strict";e(12)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,e){"use strict";e(12)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,e){"use strict";e(12)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,e){"use strict";e(12)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,e){"use strict";e(12)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,e){"use strict";e(12)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,e){"use strict";e(12)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,e){"use strict";e(12)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,e){"use strict";e(12)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,e){"use strict";e(12)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,e){"use strict";e(12)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){"use strict";e(12)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(27);r(r.P+r.F*e(2)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(213);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(11)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(14)(i,r,e(216))},function(t,n,e){"use strict";var r=e(3),i=e(27);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(52)})},function(t,n,e){"use strict";var r=e(17),i=e(0),o=e(10),u=e(105),c=e(77),a=e(6),f=e(78),s=e(79);i(i.S+i.F*!e(53)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,h=o(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d,y=0,m=s(h);if(g&&(d=r(d,v>2?arguments[2]:void 0,2)),null==m||p==Array&&c(m))for(e=new p(n=a(h.length));n>y;y++)f(e,y,g?d(h[y],y):h[y]);else for(l=m.call(h),e=new p;!(i=l.next()).done;y++)f(e,y,g?u(l,d,[i.value,y],!0):i.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),i=e(78);r(r.S+r.F*e(2)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=[].join;r(r.P+r.F*(e(45)!=Object||!e(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(65),o=e(23),u=e(33),c=e(6),a=[].slice;r(r.P+r.F*e(2)((function(){i&&a.call(i)})),"Array",{slice:function(t,n){var e=c(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return a.call(this,t,n);for(var i=u(t,e),f=u(n,e),s=c(f-i),l=new Array(s),h=0;h<s;h++)l[h]="String"==r?this.charAt(i+h):this[i+h];return l}})},function(t,n,e){"use strict";var r=e(0),i=e(18),o=e(10),u=e(2),c=[].sort,a=[1,2,3];r(r.P+r.F*(u((function(){a.sort(void 0)}))||!u((function(){a.sort(null)}))||!e(16)(c)),"Array",{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(0),o=e(16)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,n,e){var r=e(4),i=e(52),o=e(5)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,e){"use strict";var r=e(0),i=e(22)(1);r(r.P+r.F*!e(16)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(2);r(r.P+r.F*!e(16)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(3);r(r.P+r.F*!e(16)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(22)(4);r(r.P+r.F*!e(16)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(107);r(r.P+r.F*!e(16)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,n,e){"use strict";var r=e(0),i=e(107);r(r.P+r.F*!e(16)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,n,e){"use strict";var r=e(0),i=e(50)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!e(16)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=e(19),u=e(6),c=[].lastIndexOf,a=!!c&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(a||!e(16)(c)),"Array",{lastIndexOf:function(t){if(a)return c.apply(this,arguments)||0;var n=i(this),e=u(n.length),r=e-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(108)}),e(37)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(80)}),e(37)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(22)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(37)("find")},function(t,n,e){"use strict";var r=e(0),i=e(22)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(37)(o)},function(t,n,e){e(42)("Array")},function(t,n,e){var r=e(1),i=e(68),o=e(9).f,u=e(35).f,c=e(75),a=e(54),f=r.RegExp,s=f,l=f.prototype,h=/a/g,p=/a/g,v=new f(h)!==h;if(e(8)&&(!v||e(2)((function(){return p[e(5)("match")]=!1,f(h)!=h||f(p)==p||"/a/i"!=f(h,"i")})))){f=function(t,n){var e=this instanceof f,r=c(t),o=void 0===n;return!e&&r&&t.constructor===f&&o?t:i(v?new s(r&&!o?t.source:t,n):s((r=t instanceof f)?t.source:t,r&&o?a.call(t):n),e?this:l,f)};for(var d=function(t){t in f||o(f,t,{configurable:!0,get:function(){return s[t]},set:function(n){s[t]=n}})},g=u(s),y=0;g.length>y;)d(g[y++]);l.constructor=f,f.prototype=l,e(11)(r,"RegExp",f)}e(42)("RegExp")},function(t,n,e){"use strict";e(111);var r=e(3),i=e(54),o=e(8),u=/./.toString,c=function(t){e(11)(RegExp.prototype,"toString",t,!0)};e(2)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?c((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&c((function(){return u.call(this)}))},function(t,n,e){"use strict";var r=e(3),i=e(6),o=e(83),u=e(55);e(56)("match",1,(function(t,n,e,c){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=c(e,t,this);if(n.done)return n.value;var a=r(t),f=String(this);if(!a.global)return u(a,f);var s=a.unicode;a.lastIndex=0;for(var l,h=[],p=0;null!==(l=u(a,f));){var v=String(l[0]);h[p]=v,""===v&&(a.lastIndex=o(f,i(a.lastIndex),s)),p++}return 0===p?null:h}]}))},function(t,n,e){"use strict";var r=e(3),i=e(10),o=e(6),u=e(19),c=e(83),a=e(55),f=Math.max,s=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;e(56)("replace",2,(function(t,n,e,v){return[function(r,i){var o=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=v(e,t,this,n);if(i.done)return i.value;var l=r(t),h=String(this),p="function"==typeof n;p||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var w=a(l,h);if(null===w)break;if(m.push(w),!g)break;""===String(w[0])&&(l.lastIndex=c(h,o(l.lastIndex),y))}for(var b,x="",S=0,_=0;_<m.length;_++){w=m[_];for(var E=String(w[0]),O=f(s(u(w.index),h.length),0),F=[],P=1;P<w.length;P++)F.push(void 0===(b=w[P])?b:String(b));var M=w.groups;if(p){var I=[E].concat(F,O,h);void 0!==M&&I.push(M);var A=String(n.apply(void 0,I))}else A=d(E,h,O,F,M,n);O>=S&&(x+=h.slice(S,O)+A,S=O+E.length)}return x+h.slice(S)}];function d(t,n,r,o,u,c){var a=r+t.length,f=o.length,s=p;return void 0!==u&&(u=i(u),s=h),e.call(c,s,(function(e,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":c=u[i.slice(1,-1)];break;default:var s=+i;if(0===s)return e;if(s>f){var h=l(s/10);return 0===h?e:h<=f?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):e}c=o[s-1]}return void 0===c?"":c}))}}))},function(t,n,e){"use strict";var r=e(3),i=e(96),o=e(55);e(56)("search",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var c=r(t),a=String(this),f=c.lastIndex;i(f,0)||(c.lastIndex=0);var s=o(c,a);return i(c.lastIndex,f)||(c.lastIndex=f),null===s?-1:s.index}]}))},function(t,n,e){"use strict";var r=e(75),i=e(3),o=e(48),u=e(83),c=e(6),a=e(55),f=e(82),s=e(2),l=Math.min,h=[].push,p=!s((function(){RegExp(4294967295,"y")}));e(56)("split",2,(function(t,n,e,s){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,u,c,a=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,p=void 0===n?4294967295:n>>>0,v=new RegExp(t.source,s+"g");(o=f.call(v,i))&&!((u=v.lastIndex)>l&&(a.push(i.slice(l,o.index)),o.length>1&&o.index<i.length&&h.apply(a,o.slice(1)),c=o[0].length,l=u,a.length>=p));)v.lastIndex===o.index&&v.lastIndex++;return l===i.length?!c&&v.test("")||a.push(""):a.push(i.slice(l)),a.length>p?a.slice(0,p):a}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):v.call(String(i),e,r)},function(t,n){var r=s(v,t,this,n,v!==e);if(r.done)return r.value;var f=i(t),h=String(this),d=o(f,RegExp),g=f.unicode,y=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(p?"y":"g"),m=new d(p?f:"^(?:"+f.source+")",y),w=void 0===n?4294967295:n>>>0;if(0===w)return[];if(0===h.length)return null===a(m,h)?[h]:[];for(var b=0,x=0,S=[];x<h.length;){m.lastIndex=p?x:0;var _,E=a(m,p?h:h.slice(x));if(null===E||(_=l(c(m.lastIndex+(p?0:x)),h.length))===b)x=u(h,x,g);else{if(S.push(h.slice(b,x)),S.length===w)return S;for(var O=1;O<=E.length-1;O++)if(S.push(E[O]),S.length===w)return S;x=b=_}}return S.push(h.slice(b)),S}]}))},function(t,n,e){var r=e(1),i=e(84).set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,c=r.Promise,a="process"==e(23)(u);t.exports=function(){var t,n,e,f=function(){var r,i;for(a&&(r=u.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(a)e=function(){u.nextTick(f)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var s=c.resolve(void 0);e=function(){s.then(f)}}else e=function(){i.call(r,f)};else{var l=!0,h=document.createTextNode("");new o(f).observe(h,{characterData:!0}),e=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),t||(t=i,e()),n=i}}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){"use strict";var r=e(115),i=e(38);t.exports=e(59)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(115),i=e(38);t.exports=e(59)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(1),o=e(22)(0),u=e(11),c=e(28),a=e(95),f=e(116),s=e(4),l=e(38),h=e(38),p=!i.ActiveXObject&&"ActiveXObject"in i,v=c.getWeak,d=Object.isExtensible,g=f.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(s(t)){var n=v(t);return!0===n?g(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return f.def(l(this,"WeakMap"),t,n)}},w=t.exports=e(59)("WeakMap",y,m,f,!0,!0);h&&p&&(a((r=f.getConstructor(y,"WeakMap")).prototype,m),c.NEED=!0,o(["delete","has","get","set"],(function(t){var n=w.prototype,e=n[t];u(n,t,(function(n,i){if(s(n)&&!d(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)}))})))},function(t,n,e){"use strict";var r=e(116),i=e(38);e(59)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(60),o=e(85),u=e(3),c=e(33),a=e(6),f=e(4),s=e(1).ArrayBuffer,l=e(48),h=o.ArrayBuffer,p=o.DataView,v=i.ABV&&s.isView,d=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(s!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||f(t)&&g in t}}),r(r.P+r.U+r.F*e(2)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(u(this),t);for(var e=u(this).byteLength,r=c(t,e),i=c(void 0===n?e:n,e),o=new(l(this,h))(a(i-r)),f=new p(this),s=new p(o),v=0;r<i;)s.setUint8(v++,f.getUint8(r++));return o}}),e(42)("ArrayBuffer")},function(t,n,e){var r=e(0);r(r.G+r.W+r.F*!e(60).ABV,{DataView:e(85).DataView})},function(t,n,e){e(25)("Int8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}),!0)},function(t,n,e){e(25)("Int16",2,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint16",2,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Int32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Uint32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Float32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(25)("Float64",8,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){var r=e(0),i=e(18),o=e(3),u=(e(1).Reflect||{}).apply,c=Function.apply;r(r.S+r.F*!e(2)((function(){u((function(){}))})),"Reflect",{apply:function(t,n,e){var r=i(t),a=o(e);return u?u(r,n,a):c.call(r,n,a)}})},function(t,n,e){var r=e(0),i=e(34),o=e(18),u=e(3),c=e(4),a=e(2),f=e(97),s=(e(1).Reflect||{}).construct,l=a((function(){function t(){}return!(s((function(){}),[],t)instanceof t)})),h=!a((function(){s((function(){}))}));r(r.S+r.F*(l||h),"Reflect",{construct:function(t,n){o(t),u(n);var e=arguments.length<3?t:o(arguments[2]);if(h&&!l)return s(t,n,e);if(t==e){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(f.apply(t,r))}var a=e.prototype,p=i(c(a)?a:Object.prototype),v=Function.apply.call(t,p,n);return c(v)?v:p}})},function(t,n,e){var r=e(9),i=e(0),o=e(3),u=e(27);i(i.S+i.F*e(2)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,n,e){o(t),n=u(n,!0),o(e);try{return r.f(t,n,e),!0}catch(t){return!1}}})},function(t,n,e){var r=e(0),i=e(20).f,o=e(3);r(r.S,"Reflect",{deleteProperty:function(t,n){var e=i(o(t),n);return!(e&&!e.configurable)&&delete t[n]}})},function(t,n,e){"use strict";var r=e(0),i=e(3),o=function(t){this._t=i(t),this._i=0;var n,e=this._k=[];for(n in t)e.push(n)};e(104)(o,"Object",(function(){var t,n=this._k;do{if(this._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){var r=e(20),i=e(36),o=e(13),u=e(0),c=e(4),a=e(3);u(u.S,"Reflect",{get:function t(n,e){var u,f,s=arguments.length<3?n:arguments[2];return a(n)===s?n[e]:(u=r.f(n,e))?o(u,"value")?u.value:void 0!==u.get?u.get.call(s):void 0:c(f=i(n))?t(f,e,s):void 0}})},function(t,n,e){var r=e(20),i=e(0),o=e(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(36),o=e(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(118)})},function(t,n,e){var r=e(0),i=e(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(9),i=e(20),o=e(36),u=e(13),c=e(0),a=e(29),f=e(3),s=e(4);c(c.S,"Reflect",{set:function t(n,e,c){var l,h,p=arguments.length<4?n:arguments[3],v=i.f(f(n),e);if(!v){if(s(h=o(n)))return t(h,e,c,p);v=a(0)}if(u(v,"value")){if(!1===v.writable||!s(p))return!1;if(l=i.f(p,e)){if(l.get||l.set||!1===l.writable)return!1;l.value=c,r.f(p,e,l)}else r.f(p,e,a(0,c));return!0}return void 0!==v.set&&(v.set.call(p,c),!0)}})},function(t,n,e){var r=e(0),i=e(66);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){e(276),t.exports=e(7).Array.includes},function(t,n,e){"use strict";var r=e(0),i=e(50)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(37)("includes")},function(t,n,e){e(278),t.exports=e(7).Array.flatMap},function(t,n,e){"use strict";var r=e(0),i=e(279),o=e(10),u=e(6),c=e(18),a=e(106);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return c(t),n=u(r.length),e=a(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(37)("flatMap")},function(t,n,e){"use strict";var r=e(52),i=e(4),o=e(6),u=e(17),c=e(5)("isConcatSpreadable");t.exports=function t(n,e,a,f,s,l,h,p){for(var v,d,g=s,y=0,m=!!h&&u(h,p,3);y<f;){if(y in a){if(v=m?m(a[y],y,e):a[y],d=!1,i(v)&&(d=void 0!==(d=v[c])?!!d:r(v)),d&&l>0)g=t(n,e,v,o(v.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();n[g]=v}g++}y++}return g}},function(t,n,e){e(281),t.exports=e(7).String.padStart},function(t,n,e){"use strict";var r=e(0),i=e(119),o=e(58),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){e(283),t.exports=e(7).String.padEnd},function(t,n,e){"use strict";var r=e(0),i=e(119),o=e(58),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){e(285),t.exports=e(7).String.trimLeft},function(t,n,e){"use strict";e(40)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,e){e(287),t.exports=e(7).String.trimRight},function(t,n,e){"use strict";e(40)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,e){e(289),t.exports=e(62).f("asyncIterator")},function(t,n,e){e(91)("asyncIterator")},function(t,n,e){e(291),t.exports=e(7).Object.getOwnPropertyDescriptors},function(t,n,e){var r=e(0),i=e(118),o=e(15),u=e(20),c=e(78);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),a=u.f,f=i(r),s={},l=0;f.length>l;)void 0!==(e=a(r,n=f[l++]))&&c(s,n,e);return s}})},function(t,n,e){e(293),t.exports=e(7).Object.values},function(t,n,e){var r=e(0),i=e(120)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){e(295),t.exports=e(7).Object.entries},function(t,n,e){var r=e(0),i=e(120)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";e(112),e(297),t.exports=e(7).Promise.finally},function(t,n,e){"use strict";var r=e(0),i=e(7),o=e(1),u=e(48),c=e(114);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return c(n,t()).then((function(){return e}))}:t,e?function(e){return c(n,t()).then((function(){throw e}))}:t)}})},function(t,n,e){e(299),e(300),e(301),t.exports=e(7)},function(t,n,e){var r=e(1),i=e(0),o=e(58),u=[].slice,c=/MSIE .\./.test(o),a=function(t){return function(n,e){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*c,{setTimeout:a(r.setTimeout),setInterval:a(r.setInterval)})},function(t,n,e){var r=e(0),i=e(84);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(81),i=e(32),o=e(11),u=e(1),c=e(14),a=e(41),f=e(5),s=f("iterator"),l=f("toStringTag"),h=a.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=i(p),d=0;d<v.length;d++){var g,y=v[d],m=p[y],w=u[y],b=w&&w.prototype;if(b&&(b[s]||c(b,s,h),b[l]||c(b,l,y),a[y]=h,m))for(g in r)b[g]||o(b,g,r[g],!0)}},function(t,n,e){var r=function(t){"use strict";var n,e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function a(t,n,e,r){var i=n&&n.prototype instanceof d?n:d,o=Object.create(i.prototype),u=new P(r||[]);return o._invoke=function(t,n,e){var r=s;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return I()}for(e.method=i,e.arg=o;;){var u=e.delegate;if(u){var c=E(u,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===s)throw r=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var a=f(t,n,e);if("normal"===a.type){if(r=e.done?p:l,a.arg===v)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(r=p,e.method="throw",e.arg=a.arg)}}}(t,e,u),o}function f(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var s="suspendedStart",l="suspendedYield",h="executing",p="completed",v={};function d(){}function g(){}function y(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(M([])));b&&b!==e&&r.call(b,o)&&(m=b);var x=y.prototype=d.prototype=Object.create(m);function S(t){["next","throw","return"].forEach((function(n){t[n]=function(t){return this._invoke(n,t)}}))}function _(t){var n;this._invoke=function(e,i){function o(){return new Promise((function(n,o){!function n(e,i,o,u){var c=f(t[e],t,i);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then((function(t){n("next",t,o,u)}),(function(t){n("throw",t,o,u)})):Promise.resolve(s).then((function(t){a.value=t,o(a)}),(function(t){return n("throw",t,o,u)}))}u(c.arg)}(e,i,n,o)}))}return n=n?n.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=f(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function F(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function e(){for(;++i<t.length;)if(r.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=n,e.done=!0,e};return u.next=u}}return{next:I}}function I(){return{value:n,done:!0}}return g.prototype=x.constructor=y,y.constructor=g,y[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===g||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(_.prototype),_.prototype[u]=function(){return this},t.AsyncIterator=_,t.async=function(n,e,r,i){var o=new _(a(n,e,r,i));return t.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},S(x),x[c]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(r,i){return c.type="throw",c.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],c=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var a=r.call(u,"catchLoc"),f=r.call(u,"finallyLoc");if(a&&f){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(a){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),v},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),F(e),v}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;F(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,n,e){e(304),t.exports=e(121).global},function(t,n,e){var r=e(305);r(r.G,{global:e(86)})},function(t,n,e){var r=e(86),i=e(121),o=e(306),u=e(308),c=e(315),a=function(t,n,e){var f,s,l,h=t&a.F,p=t&a.G,v=t&a.S,d=t&a.P,g=t&a.B,y=t&a.W,m=p?i:i[n]||(i[n]={}),w=m.prototype,b=p?r:v?r[n]:(r[n]||{}).prototype;for(f in p&&(e=n),e)(s=!h&&b&&void 0!==b[f])&&c(m,f)||(l=s?b[f]:e[f],m[f]=p&&"function"!=typeof b[f]?e[f]:g&&s?o(l,r):y&&b[f]==l?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((m.virtual||(m.virtual={}))[f]=l,t&a.R&&w&&!w[f]&&u(w,f,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n,e){var r=e(307);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(309),i=e(314);t.exports=e(88)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(310),i=e(311),o=e(313),u=Object.defineProperty;n.f=e(88)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(87);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(88)&&!e(122)((function(){return 7!=Object.defineProperty(e(312)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(87),i=e(86).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(87);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){"use strict";var r=e(317);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,n,e,i,o,u){if(u!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return t}t.isRequired=t;var e={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:i};return e.PropTypes=e,e}},function(t,n,e){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}]);
|
assets/admin/js/layouts-editor.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
-
* Version : 1.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
import { debounce } from 'throttle-debounce';
|
@@ -65,6 +65,8 @@ if ( $.fn.imagepicker ) {
|
|
65 |
|
66 |
// frame load
|
67 |
const $frame = $( '.vp_list_preview iframe' );
|
|
|
|
|
68 |
let $framePortfolio = false;
|
69 |
let frameJQuery = false;
|
70 |
const $previewForm = $( '<form target="vp_list_preview_iframe" method="post" style="display: none">' )
|
@@ -78,6 +80,15 @@ if ( $.fn.iFrameResize ) {
|
|
78 |
} );
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
// generate controls styles.
|
82 |
function generateControlsStyles() {
|
83 |
let styles = '';
|
@@ -128,7 +139,7 @@ function generateControlsStyles() {
|
|
128 |
|
129 |
// generate dom tree.
|
130 |
function getNodeTree( node ) {
|
131 |
-
if ( node.hasChildNodes() ) {
|
132 |
const children = [];
|
133 |
|
134 |
for ( let j = 0; j < node.childNodes.length; j++ ) {
|
@@ -245,8 +256,14 @@ $body.on( 'click', '.vp-dom-tree-node-collapse', function() {
|
|
245 |
|
246 |
// portfolio options changed
|
247 |
function reloadFrame() {
|
|
|
248 |
frameJQuery = false;
|
249 |
$framePortfolio = false;
|
|
|
|
|
|
|
|
|
|
|
250 |
$previewForm.submit();
|
251 |
}
|
252 |
reloadFrame = debounce( 400, reloadFrame );
|
@@ -270,6 +287,7 @@ $editForm.on( 'change input vp-fake-change vp-fake-input', '[name*="vp_"]', func
|
|
270 |
name: $this.attr( 'name' ),
|
271 |
value: $this.is( '[type=checkbox], [type=radio]' ) ? $this.is( ':checked' ) : $this.val(),
|
272 |
reload: e.type === 'change' || e.type === 'vp-fake-change',
|
|
|
273 |
jQuery: frameJQuery,
|
274 |
$portfolio: $framePortfolio,
|
275 |
};
|
@@ -287,6 +305,11 @@ $editForm.on( 'change input vp-fake-change vp-fake-input', '[name*="vp_"]', func
|
|
287 |
if ( ! data.reload ) {
|
288 |
// generate custom styles.
|
289 |
generateControlsStyles();
|
|
|
|
|
|
|
|
|
|
|
290 |
}
|
291 |
|
292 |
// reload frame
|
@@ -296,6 +319,7 @@ $editForm.on( 'change input vp-fake-change vp-fake-input', '[name*="vp_"]', func
|
|
296 |
} );
|
297 |
|
298 |
$frame.on( 'load', function() {
|
|
|
299 |
frameJQuery = this.contentWindow.jQuery;
|
300 |
$framePortfolio = frameJQuery( '.vp-portfolio' );
|
301 |
|
@@ -304,6 +328,9 @@ $frame.on( 'load', function() {
|
|
304 |
|
305 |
// add dom tree.
|
306 |
addDomTree();
|
|
|
|
|
|
|
307 |
} );
|
308 |
|
309 |
// live reload
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 1.16.0
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
import { debounce } from 'throttle-debounce';
|
65 |
|
66 |
// frame load
|
67 |
const $frame = $( '.vp_list_preview iframe' );
|
68 |
+
const $framePreloader = $( '.vp_list_preview_preloader' );
|
69 |
+
let frameWindow = false;
|
70 |
let $framePortfolio = false;
|
71 |
let frameJQuery = false;
|
72 |
const $previewForm = $( '<form target="vp_list_preview_iframe" method="post" style="display: none">' )
|
80 |
} );
|
81 |
}
|
82 |
|
83 |
+
// add preloader animation.
|
84 |
+
function togglePreloader( add = true ) {
|
85 |
+
if ( add ) {
|
86 |
+
$framePreloader.addClass( 'vp_list_preview_preloader_active' );
|
87 |
+
} else {
|
88 |
+
$framePreloader.removeClass( 'vp_list_preview_preloader_active' );
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
// generate controls styles.
|
93 |
function generateControlsStyles() {
|
94 |
let styles = '';
|
139 |
|
140 |
// generate dom tree.
|
141 |
function getNodeTree( node ) {
|
142 |
+
if ( node && node.hasChildNodes() ) {
|
143 |
const children = [];
|
144 |
|
145 |
for ( let j = 0; j < node.childNodes.length; j++ ) {
|
256 |
|
257 |
// portfolio options changed
|
258 |
function reloadFrame() {
|
259 |
+
frameWindow = false;
|
260 |
frameJQuery = false;
|
261 |
$framePortfolio = false;
|
262 |
+
|
263 |
+
// show preloader.
|
264 |
+
togglePreloader();
|
265 |
+
|
266 |
+
// submit form with new data.
|
267 |
$previewForm.submit();
|
268 |
}
|
269 |
reloadFrame = debounce( 400, reloadFrame );
|
287 |
name: $this.attr( 'name' ),
|
288 |
value: $this.is( '[type=checkbox], [type=radio]' ) ? $this.is( ':checked' ) : $this.val(),
|
289 |
reload: e.type === 'change' || e.type === 'vp-fake-change',
|
290 |
+
window: frameWindow,
|
291 |
jQuery: frameJQuery,
|
292 |
$portfolio: $framePortfolio,
|
293 |
};
|
305 |
if ( ! data.reload ) {
|
306 |
// generate custom styles.
|
307 |
generateControlsStyles();
|
308 |
+
|
309 |
+
// update ajax dynamic data.
|
310 |
+
if ( frameWindow && frameWindow.vp_preview_post_data ) {
|
311 |
+
frameWindow.vp_preview_post_data[ data.name ] = data.value;
|
312 |
+
}
|
313 |
}
|
314 |
|
315 |
// reload frame
|
319 |
} );
|
320 |
|
321 |
$frame.on( 'load', function() {
|
322 |
+
frameWindow = this.contentWindow;
|
323 |
frameJQuery = this.contentWindow.jQuery;
|
324 |
$framePortfolio = frameJQuery( '.vp-portfolio' );
|
325 |
|
328 |
|
329 |
// add dom tree.
|
330 |
addDomTree();
|
331 |
+
|
332 |
+
// hide preloader.
|
333 |
+
togglePreloader( false );
|
334 |
} );
|
335 |
|
336 |
// live reload
|
assets/admin/js/layouts-editor.min.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
* Name : Visual Portfolio
|
4 |
* Version : @@plugin_version
|
5 |
* Author : nK https://nkdev.info
|
6 |
-
*/(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r=jQuery,l=window,s=l.ajaxurl,c=l.VPAdminVariables,d=l.CodeMirror,p=l.emmetCodeMirror,v=r("body"),u=r(window),f=r('form[name="post"]'),m=r("#postID, #post_ID").eq(0).val(),g=r(".vp-content-source"),h=g.find('[name="vp_content_source"]');g.on("click",".vp-content-source__item",(function(){var t=r(this).attr("data-content");g.find('[data-content="'.concat(t,'"]')).addClass("active").siblings().removeClass("active"),h.val(t).change()})),g.children('[data-content="'.concat(h.val(),'"]')).click(),r.fn.conditionize&&f.conditionize(),r(".vp-control-range").each((function(){var t=r(this).find("input"),e=t.filter('[type="hidden"]');t.on("change input",(function(a){t.val(r(this).val()),e.trigger("vp-fake-".concat(a.type))}))})),r.fn.wpColorPicker&&r(".vp-color-picker").each((function(){r(this).data("change",Object(n.a)(300,(function(t){r(t.target).change()}))).wpColorPicker()})),r.fn.imagepicker&&r(".vp-image-picker").imagepicker();var _=r(".vp_list_preview iframe"),y=!1,b=!1,w=r('<form target="vp_list_preview_iframe" method="post" style="display: none">').attr("action",_.attr("src")).insertAfter(f);function C(){var t="",e=r('[name="vp_controls_styles"]'),a=".vp-id-".concat(m),n=e.val();r('.vp-control-style [type="hidden"]').each((function(){var e=r(this),n=e.closest(".vp-control");if("none"!==n.css("display")){var i=e.attr("data-style-mask")||"$",o=n.find(e.attr("data-style-from")),l=o.val(),s=!1;if(n.hasClass("vp-control-toggle")&&o.length>1&&(o=o.filter('[type="checkbox"]')),o.is('[type="checkbox"]')&&(s=!(l=o.is(":checked"))),!s){var c=i.replace("$",l),d=a+" "+e.attr("data-style-element"),p=e.attr("data-style-property");t&&(t+=" "),t+="".concat(d," { ").concat(p,": ").concat(c,"; }")}}})),n!==t&&e.val(t).trigger("vp-fake-change")}function k(){if(y){var t=function t(e){if(e.hasChildNodes()){for(var a=[],n=0;n<e.childNodes.length;n++)a.push(t(e.childNodes[n]));return{classList:e.classList,nodeName:e.nodeName,children:a}}return!1}(y[0]);r(".vp-dom-tree").html(function t(e,a){if(!e)return"";var n="";if(e.children.length){var i="",o="",r=!1,l=!1;e.classList&&e.classList.length&&(o=' class="',e.classList.forEach((function(t){a.skipClass&&a.skipClass.test(t)||(o+='<span class="vp-dom-tree-node-class">'.concat(t,"</span>")),a.skipNodeByClass&&a.skipNodeByClass.test(t)&&(r=!0),a.collapseByClass&&a.collapseByClass.test(t)&&(l=!0)})),o+='"'),r||(i+="<ul>",i+='<li class="vp-dom-tree-node '.concat(l?"is-collapsed":"",'"><div><span class="vp-dom-tree-node-collapse"></span><').concat(e.nodeName.toLowerCase()).concat(o),i+="></div></li>",e.children.forEach((function(e){e&&(i+='<li class="vp-dom-tree-child">'.concat(t(e,a),"</li>"))})),n+=i+="</ul>")}return n}(t,{skipNodeByClass:/vp-portfolio__item-popup/,collapseByClass:/^(vp-portfolio__preloader-wrap|vp-portfolio__filter-wrap|vp-portfolio__sort-wrap|vp-portfolio__items-wrap|vp-portfolio__pagination-wrap)$/,skipClass:/vp-uid-/}))}}function x(){b=!1,y=!1,w.submit()}r.fn.iFrameResize&&_.iFrameResize({interval:10}),void 0!==window.ClipboardJS&&new window.ClipboardJS(".vp-dom-tree-node-class, .vp-dom-tree-help code",{target:function(t){return t},text:function(t){return".".concat(t.innerText.replace(/^\./,""))}}).on("success",(function(t){void 0!==window.Tooltip&&(t.trigger.tooltipClipboard||(t.trigger.tooltipClipboard=new window.Tooltip(t.trigger,{placement:"top",title:"Copied to Clipboard!",trigger:"manual",container:v[0]})),t.trigger.tooltipClipboard.show(),r(t.trigger).one("mouseleave",(function(){t.trigger.tooltipClipboard.hide()})))})),v.on("click",".vp-dom-tree-node-collapse",(function(){r(this).closest("li").toggleClass("is-collapsed")})),x=Object(n.a)(400,x),f.on("change input vp-fake-change vp-fake-input",'[name*="vp_"]',(function(t){var e=r(this);if(!e.closest(".vp-no-reload").length)if(r('[name="'.concat(e.attr("name"),'__style[]"]')).length)C();else{var a={name:e.attr("name"),value:e.is("[type=checkbox], [type=radio]")?e.is(":checked"):e.val(),reload:"change"===t.type||"vp-fake-change"===t.type,jQuery:b,$portfolio:y},n=w.find('[name="'.concat(a.name,'"]'));n.length||(n=r('<input type="hidden" name="'.concat(a.name,'" />')).appendTo(w)),n.attr("value",a.value),u.trigger("vp-preview-change",a),a.reload||C(),!a.reload&&y||x()}})),_.on("load",(function(){b=this.contentWindow.jQuery,y=b(".vp-portfolio"),C(),k()})),u.on("vp-preview-change",(function(t,e){if(e.$portfolio)switch(e.name){case"vp_tiles_type":case"vp_masonry_columns":case"vp_grid_columns":case"vp_justified_row_height":case"vp_justified_row_height_tolerance":case"vp_slider_effect":case"vp_slider_speed":case"vp_slider_autoplay":case"vp_slider_autoplay_hover_pause":case"vp_slider_centered_slides":case"vp_slider_loop":case"vp_slider_free_mode":case"vp_slider_free_mode_sticky":case"vp_slider_arrows":case"vp_slider_arrows_icon_prev":case"vp_slider_arrows_icon_next":case"vp_slider_bullets":case"vp_slider_bullets_dynamic":case"vp_items_gap":var a=e.name;a=(a=a.substring(3)).replace(/_/g,"-"),e.$portfolio.attr("data-vp-".concat(a),e.value),e.$portfolio.vpf("init"),e.reload=!1;break;case"vp_filter_align":e.$portfolio.find(".vp-filter").removeClass("vp-filter__align-center vp-filter__align-left vp-filter__align-right").addClass("vp-filter__align-".concat(e.value)),e.reload=!1;break;case"vp_sort_align":e.$portfolio.find(".vp-sort").removeClass("vp-sort__align-center vp-sort__align-left vp-sort__align-right").addClass("vp-sort__align-".concat(e.value)),e.reload=!1;break;case"vp_pagination_align":e.$portfolio.find(".vp-pagination").removeClass("vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right").addClass("vp-pagination__align-".concat(e.value)),e.reload=!1;break;case"vp_controls_styles":var n=e.$portfolio.closest("html"),i="vp-controls-styles-".concat(m,"-inline-css"),o=n.find("#".concat(i));o.length||(o=e.jQuery('<style id="'.concat(i,'">')),n.find("body").prepend(o)),o.html(e.value),e.reload=!1;break;case"vp_custom_css":var r=e.$portfolio.closest("html"),l="vp-custom-css-".concat(m,"-inline-css"),s=r.find("#".concat(l));s.length||(s=e.jQuery('<style id="'.concat(l,'">')),r.find("body").prepend(s)),s.html(e.value),e.reload=!1;break;case"vp_list_name":case"vp_stretch":e.reload=!1}})),v.on("click",".vp-control-image-dropdown",(function(t){r(t.target).closest(".vp-control-image-dropdown__content").length||r(this).toggleClass("active")})),v.on("mousedown",(function(t){var e=r(t.target).closest(".vp-control-image-dropdown");r(".vp-control-image-dropdown.active").each((function(){this!==e[0]&&r(this).removeClass("active")}))})),v.on("change",".vp-control-image-dropdown .vp-image-picker",(function(){var t=r(this),e=t.data("picker");if(e){var a=e.select.find('option[value="'.concat(e.select.val(),'"]')),n=a.parent("optgroup"),i=t.closest(".vp-control-image-dropdown"),o=a.attr("data-img-src");i.length&&(i.children(".vp-control-image-dropdown__preview").html('<img src="'.concat(o,'" alt="">')),n.length&&i.children(".vp-control-image-dropdown__title").html(n.attr("label")))}}));var j=r('[name="vp_list_name"]'),S=r('[name="post_title"]');j.length&&S.length&&(j.on("input",(function(){S.val()!==j.val()&&S.val(j.val()).change()})),S.on("input",(function(){j.val(S.val())}))),r.fn.select2&&r(".vp-select2").each((function(){var t=r(this),e={width:"100%",minimumResultsForSearch:t.hasClass("vp-select2-nosearch")?-1:1,tags:t.hasClass("vp-select2-tags")},a=!!t.attr("data-post-type")&&r(t.attr("data-post-type"));t.closest(".vp-select2-posts-ajax").length&&(e=r.extend({minimumInputLength:1,ajax:{url:s,dataType:"json",delay:250,data:function(t){return{action:"vp_find_posts",q:t.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(t){return{results:!(!t||!t.length)&&t}},cache:!0},escapeMarkup:function(t){return t},templateResult:function(t){if(t.loading)return t.text;var e="";t.title&&(e=t.title);var a="";t.post_type&&(a=t.post_type);var n="";return t.img&&(n="style=\"background-image: url('".concat(t.img,"');\"")),"".concat('<div class="vp-select2-ajax__result"><div class="vp-select2-ajax__result-img" ').concat(n,"></div>")+'<div class="vp-select2-ajax__result-data">'+'<div class="vp-select2-ajax__result-title">'.concat(e,"</div>")+'<div class="vp-select2-ajax__result-post-type">'.concat(a,"</div>")+"</div></div>"},templateSelection:function(t){return t.title||t.text}},e)),t.closest(".vp-select2-taxonomies-ajax").length&&(e=r.extend({minimumInputLength:1,ajax:{url:s,dataType:"json",delay:250,data:function(t){return{action:"vp_find_taxonomies",q:t.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(t){var e=[];return t&&Object.keys(t).forEach((function(a){e.push({text:a,children:t[a]})})),{results:e}},cache:!0}},e)),t.select2(e).data("select2").$dropdown.addClass("select2-vp-container")}));var O=r(".vp-control-gallery"),L=0;function T(t,e){var a=t.find('[data-image-id="'+e+'"]'),n={id:e};return a.find("[data-additional]").each((function(){var t=r(this),e=t.attr("data-additional");if(n[e]=t.html(),"true"===t.attr("data-to-json"))try{n[e]=JSON.parse(n[e])}catch(t){n[e]=""}})),n}function E(t){var e=[];t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each((function(){e.push(T(t,r(this).attr("data-image-id")))}));var a=JSON.stringify(e),n=t.children("textarea");a!==n.val()&&n.val(a).change()}function M(){O.find(".vp-control-gallery-additional-data.active").each((function(){var t=r(this),e=t.children(),a=t.height(),n=e.height();if(n>=a)e.css({marginTop:""});else{var i=a-n,o=t.offset().top-32;o>=0?e.css({marginTop:""}):e.css({marginTop:Math.min(i,Math.abs(o))})}}))}function z(t,e){var a=t.children("textarea").attr("name"),i=t.children(".vp-control-gallery-additional-data"),l=i.find(".vp-control-gallery-additional-data-preview"),s=t.children(".vp-control-gallery-items").find('.vp-control-gallery-items-img[data-image-id="'+e+'"]'),c=T(t,e),d=function(t,e){var a=t.find('[data-image-id="'+e+'"]'),n={};return a.find("[data-meta]").each((function(){n[r(this).attr("data-meta")]=r(this).html()})),n}(t,e);c&&Object.keys(c).forEach((function(e){var n=i.find('[name="'+a+"_additional_"+e+'"], [name="'+a+"_additional_"+e+'[]"]').val(c[e]||"");if(n.hasClass("vp-select2")){if(n.hasClass("vp-select2-tags")){var l=[],s=[];t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each((function(){var a=T(t,r(this).attr("data-image-id"));a&&void 0!==a[e]&&a[e]&&(l=o(new Set([].concat(o(l),o(a[e])))))})),l.forEach((function(t){s.push(new window.Option(t,t,!1,!1))})),n.html(s.length?s:""),n.val(void 0!==c[e]&&c[e]?c[e]:"")}n.trigger("change")}})),l.find(".vp-control-gallery-additional-data-preview-image img").attr("src",s.children("img").attr("src")||""),l.find(".vp-control-gallery-additional-data-preview-name").html(d.filename),l.find(".vp-control-gallery-additional-data-preview-size").html(d.width+"x"+d.height+" ("+d.filesizeHumanReadable+")"),l.find(".vp-control-gallery-additional-data-preview-edit a").attr("href",d.editLink.replace("&","&")),s.siblings().removeClass("active"),s.addClass("active"),i.addClass("active"),L=O.find(".vp-control-gallery-additional-data.active").length,Object(n.a)(150,M)()}if(O.length&&(r(".postbox-container").on("scroll",Object(n.a)(150,M)),u.on("scroll resize",Object(n.a)(150,M))),r.fn.sortable&&(O.each((function(){var t=r(this),e=t.children(".vp-control-gallery-items-default");t.children(".vp-control-gallery-items").sortable({animation:150,draggable:".vp-control-gallery-items-img",onUpdate:function(){E(t)}}),t.on("click",".vp-control-gallery-items-remove",(function(e){e.preventDefault(),r(this).parent().remove(),E(t)})),t.on("click",".vp-control-gallery-items-add",(function(a){a.preventDefault();var n=t.data("wp-frame");n?n.open():wp.media?(n=wp.media({title:"Select or Upload Images",button:{text:"Add images"},multiple:!0,library:{type:"image"}}),t.data("wp-frame",n),n.on("select",(function(){var a=n.state().get("selection").models;a&&a.length&&(a.forEach((function(a){var n=a.attributes.url;a.attributes.sizes&&a.attributes.sizes.thumbnail&&(n=a.attributes.sizes.thumbnail.url);var i=e.children().clone();i.attr("data-image-id",a.id),i.children("img").attr("src",n),i.find('[data-meta="width"]').html(a.attributes.width),i.find('[data-meta="height"]').html(a.attributes.height),i.find('[data-meta="filename"]').html(a.attributes.filename),i.find('[data-meta="editLink"]').html(a.attributes.editLink),i.find('[data-meta="filesizeHumanReadable"]').html(a.attributes.filesizeHumanReadable),a.attributes.title&&i.find('[data-additional="title"]').html(a.attributes.title),a.attributes.description&&i.find('[data-additional="description"]').html(a.attributes.description),t.find(".vp-control-gallery-items-add").before(i)})),E(t))})),n.open()):console.error("Can't access wp.media object.")})),t.on("click",".vp-control-gallery-items-img",(function(e){e.preventDefault(),z(t,r(this).attr("data-image-id"))})),t.on("change input",".vp-control-gallery-additional-data [name]",Object(n.a)(200,(function(){var e=t.children(".vp-control-gallery-additional-data"),a=t.children("textarea").attr("name"),n=t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").attr("data-image-id");if(n){var o=t.children(".vp-control-gallery-items").find('[data-image-id="'+n+'"]');e.find('[name*="'+a+'_additional_"]').each((function(){var t=r(this).attr("name").replace(a+"_additional_","").replace("[]",""),e=r(this).val()||"";"object"===i(e)&&(e=JSON.stringify(e)),o.find('[data-additional="'+t+'"]').html(e||"")})),E(t)}})))})),O.length)){var A=O.children(".vp-control-gallery-additional-data");r(document).on("mousedown",(function(t){if(L){var e=t.target;r(e).closest(".vp-control-gallery-additional-data, .vp-control-gallery-items-img, .select2-vp-container").length||(A.removeClass("active"),O.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").removeClass("active"),L=O.find(".vp-control-gallery-additional-data.active").length)}}))}var $=r('[name="vp_custom_css"]'),N=!1,P=!0;function R(t,e){if(P&&(e=!1,P=!1),c&&c.css_editor_error_notice){var a=!1;if(1===t.length?a=c.css_editor_error_notice.singular.replace("%d","1"):t.length>1&&(a=c.css_editor_error_notice.plural.replace("%d",String(t.length))),a){var n=$.prev("#vp_custom_css_notice");if(n.length||e||(n=r('<div class="notice notice-error inline" id="vp_custom_css_notice"></div>'),$.before(n)),!n.length)return;var i='<p class="notification-message">'.concat(a,"</p>")+'<p><input id="vp_custom_css_notice_prevent" type="checkbox">'+'<label for="vp_custom_css_notice_prevent">'.concat(c.css_editor_error_checkbox,"</label>")+"</p>";n.html(i)}else $.prev("#vp_custom_css_notice").remove()}}if(void 0!==d&&$.length){var B=function(t){H.css("height",Math.max(200,U+t.originalEvent.y-Q)),J.setSize(null,Math.max(200,U+t.y-Q)+"px")},D=function t(){v.off("mousemove",B),v.off("mouseup",t)};if(c&&c.classnames){var I=d.hint.css;d.hint.css=function(t){var e=t.getCursor(),a=I(t)||{from:e,to:t.getCursor(),list:[]},n=t.getTokenAt(e);return"top"===n.state.state&&0===n.string.indexOf(".")&&(a={from:d.Pos(e.line,n.start),to:d.Pos(e.line,n.end),list:[]},c.classnames.forEach((function(t){-1!==t.indexOf(n.string)&&a.list.push(t)}))),a}}var J=d.fromTextArea($[0],{mode:"css",theme:"eclipse",indentUnit:4,autoCloseTags:!0,autoCloseBrackets:!0,matchBrackets:!0,foldGutter:!0,lint:{options:{errors:!0,"box-model":!0,"display-property-grouping":!0,"duplicate-properties":!0,"known-properties":!0,"outline-none":!0},onUpdateLinting:function(t,e,a){var n=[];t.forEach((function(t){"error"===t.severity&&n.push(t)})),a.vcLintErrors=n,N||R(a.vcLintErrors,!0)}},lineNumbers:!0,lineWrapping:!0,scrollPastEnd:!0,emmet_active:!0,emmet:!0,styleActiveLine:!0,continueComments:!0,scrollbarStyle:"simple",extraKeys:{"Ctrl-Space":"autocomplete","Ctrl-/":"toggleComment","Cmd-/":"toggleComment","Alt-F":"findPersistent"},gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"]});p(J),$.data("CodeMirrorInstance",J),J.on("change",(function(){J.save(),$.change()})),J.on("keyup",(function(t,e){var a=/^[a-zA-Z]$/.test(e.key);if(!t.state.completionActive||!a){var n=t.getTokenAt(t.getCursor());if("string"!==n.type&&"comment"!==n.type){var i=t.doc.getLine(t.doc.getCursor().line).substr(0,t.doc.getCursor().ch);(a||":"===e.key||" "===e.key&&/:\s+$/.test(i))&&t.showHint({completeSingle:!1})}}}));var Q,U,F=r(".CodeMirror-resizer").after($),H=F.prev(".CodeMirror");F.on("mousedown",(function(t){Q=t.originalEvent.y,U=H.height(),v.on("mousemove",B),v.on("mouseup",D)}))}var q=!1;v.on("click","#publish:not(.disabled)",(function(t){if(q=!0,!N){var e=r(this),a=$.length&&$.data("CodeMirrorInstance");a&&a.vcLintErrors&&a.vcLintErrors.length&&(t.preventDefault(),e.addClass("disabled button-disabled button-primary-disabled"),setTimeout((function(){e.removeClass("disabled button-disabled button-primary-disabled")}),1500),R(a.vcLintErrors,!1),r("html,body").animate({scrollTop:r("#vp_custom_css").offset().top-100},300),a.focus(),a.setCursor(a.vcLintErrors[0].from.line))}}));var V=f.serialize();r(window).on("beforeunload",(function(){if(!q)return V!==f.serialize()||void 0;q=!1})),v.on("change","#vp_custom_css_notice_prevent",(function(){N=!0,r(this).closest(".notice").slideUp()}))}});
|
3 |
* Name : Visual Portfolio
|
4 |
* Version : @@plugin_version
|
5 |
* Author : nK https://nkdev.info
|
6 |
+
*/(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r=jQuery,l=window,s=l.ajaxurl,c=l.VPAdminVariables,d=l.CodeMirror,p=l.emmetCodeMirror,v=r("body"),u=r(window),f=r('form[name="post"]'),m=r("#postID, #post_ID").eq(0).val(),g=r(".vp-content-source"),h=g.find('[name="vp_content_source"]');g.on("click",".vp-content-source__item",(function(){var t=r(this).attr("data-content");g.find('[data-content="'.concat(t,'"]')).addClass("active").siblings().removeClass("active"),h.val(t).change()})),g.children('[data-content="'.concat(h.val(),'"]')).click(),r.fn.conditionize&&f.conditionize(),r(".vp-control-range").each((function(){var t=r(this).find("input"),e=t.filter('[type="hidden"]');t.on("change input",(function(a){t.val(r(this).val()),e.trigger("vp-fake-".concat(a.type))}))})),r.fn.wpColorPicker&&r(".vp-color-picker").each((function(){r(this).data("change",Object(n.a)(300,(function(t){r(t.target).change()}))).wpColorPicker()})),r.fn.imagepicker&&r(".vp-image-picker").imagepicker();var _=r(".vp_list_preview iframe"),y=r(".vp_list_preview_preloader"),b=!1,w=!1,C=!1,k=r('<form target="vp_list_preview_iframe" method="post" style="display: none">').attr("action",_.attr("src")).insertAfter(f);function x(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?y.addClass("vp_list_preview_preloader_active"):y.removeClass("vp_list_preview_preloader_active")}function j(){var t="",e=r('[name="vp_controls_styles"]'),a=".vp-id-".concat(m),n=e.val();r('.vp-control-style [type="hidden"]').each((function(){var e=r(this),n=e.closest(".vp-control");if("none"!==n.css("display")){var i=e.attr("data-style-mask")||"$",o=n.find(e.attr("data-style-from")),l=o.val(),s=!1;if(n.hasClass("vp-control-toggle")&&o.length>1&&(o=o.filter('[type="checkbox"]')),o.is('[type="checkbox"]')&&(s=!(l=o.is(":checked"))),!s){var c=i.replace("$",l),d=a+" "+e.attr("data-style-element"),p=e.attr("data-style-property");t&&(t+=" "),t+="".concat(d," { ").concat(p,": ").concat(c,"; }")}}})),n!==t&&e.val(t).trigger("vp-fake-change")}function S(){if(w){var t=function t(e){if(e&&e.hasChildNodes()){for(var a=[],n=0;n<e.childNodes.length;n++)a.push(t(e.childNodes[n]));return{classList:e.classList,nodeName:e.nodeName,children:a}}return!1}(w[0]);r(".vp-dom-tree").html(function t(e,a){if(!e)return"";var n="";if(e.children.length){var i="",o="",r=!1,l=!1;e.classList&&e.classList.length&&(o=' class="',e.classList.forEach((function(t){a.skipClass&&a.skipClass.test(t)||(o+='<span class="vp-dom-tree-node-class">'.concat(t,"</span>")),a.skipNodeByClass&&a.skipNodeByClass.test(t)&&(r=!0),a.collapseByClass&&a.collapseByClass.test(t)&&(l=!0)})),o+='"'),r||(i+="<ul>",i+='<li class="vp-dom-tree-node '.concat(l?"is-collapsed":"",'"><div><span class="vp-dom-tree-node-collapse"></span><').concat(e.nodeName.toLowerCase()).concat(o),i+="></div></li>",e.children.forEach((function(e){e&&(i+='<li class="vp-dom-tree-child">'.concat(t(e,a),"</li>"))})),n+=i+="</ul>")}return n}(t,{skipNodeByClass:/vp-portfolio__item-popup/,collapseByClass:/^(vp-portfolio__preloader-wrap|vp-portfolio__filter-wrap|vp-portfolio__sort-wrap|vp-portfolio__items-wrap|vp-portfolio__pagination-wrap)$/,skipClass:/vp-uid-/}))}}function O(){b=!1,C=!1,w=!1,x(),k.submit()}r.fn.iFrameResize&&_.iFrameResize({interval:10}),void 0!==window.ClipboardJS&&new window.ClipboardJS(".vp-dom-tree-node-class, .vp-dom-tree-help code",{target:function(t){return t},text:function(t){return".".concat(t.innerText.replace(/^\./,""))}}).on("success",(function(t){void 0!==window.Tooltip&&(t.trigger.tooltipClipboard||(t.trigger.tooltipClipboard=new window.Tooltip(t.trigger,{placement:"top",title:"Copied to Clipboard!",trigger:"manual",container:v[0]})),t.trigger.tooltipClipboard.show(),r(t.trigger).one("mouseleave",(function(){t.trigger.tooltipClipboard.hide()})))})),v.on("click",".vp-dom-tree-node-collapse",(function(){r(this).closest("li").toggleClass("is-collapsed")})),O=Object(n.a)(400,O),f.on("change input vp-fake-change vp-fake-input",'[name*="vp_"]',(function(t){var e=r(this);if(!e.closest(".vp-no-reload").length)if(r('[name="'.concat(e.attr("name"),'__style[]"]')).length)j();else{var a={name:e.attr("name"),value:e.is("[type=checkbox], [type=radio]")?e.is(":checked"):e.val(),reload:"change"===t.type||"vp-fake-change"===t.type,window:b,jQuery:C,$portfolio:w},n=k.find('[name="'.concat(a.name,'"]'));n.length||(n=r('<input type="hidden" name="'.concat(a.name,'" />')).appendTo(k)),n.attr("value",a.value),u.trigger("vp-preview-change",a),a.reload||(j(),b&&b.vp_preview_post_data&&(b.vp_preview_post_data[a.name]=a.value)),!a.reload&&w||O()}})),_.on("load",(function(){b=this.contentWindow,C=this.contentWindow.jQuery,w=C(".vp-portfolio"),j(),S(),x(!1)})),u.on("vp-preview-change",(function(t,e){if(e.$portfolio)switch(e.name){case"vp_tiles_type":case"vp_masonry_columns":case"vp_grid_columns":case"vp_justified_row_height":case"vp_justified_row_height_tolerance":case"vp_slider_effect":case"vp_slider_speed":case"vp_slider_autoplay":case"vp_slider_autoplay_hover_pause":case"vp_slider_centered_slides":case"vp_slider_loop":case"vp_slider_free_mode":case"vp_slider_free_mode_sticky":case"vp_slider_arrows":case"vp_slider_arrows_icon_prev":case"vp_slider_arrows_icon_next":case"vp_slider_bullets":case"vp_slider_bullets_dynamic":case"vp_items_gap":var a=e.name;a=(a=a.substring(3)).replace(/_/g,"-"),e.$portfolio.attr("data-vp-".concat(a),e.value),e.$portfolio.vpf("init"),e.reload=!1;break;case"vp_filter_align":e.$portfolio.find(".vp-filter").removeClass("vp-filter__align-center vp-filter__align-left vp-filter__align-right").addClass("vp-filter__align-".concat(e.value)),e.reload=!1;break;case"vp_sort_align":e.$portfolio.find(".vp-sort").removeClass("vp-sort__align-center vp-sort__align-left vp-sort__align-right").addClass("vp-sort__align-".concat(e.value)),e.reload=!1;break;case"vp_pagination_align":e.$portfolio.find(".vp-pagination").removeClass("vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right").addClass("vp-pagination__align-".concat(e.value)),e.reload=!1;break;case"vp_controls_styles":var n=e.$portfolio.closest("html"),i="vp-controls-styles-".concat(m,"-inline-css"),o=n.find("#".concat(i));o.length||(o=e.jQuery('<style id="'.concat(i,'">')),n.find("body").prepend(o)),o.html(e.value),e.reload=!1;break;case"vp_custom_css":var r=e.$portfolio.closest("html"),l="vp-custom-css-".concat(m,"-inline-css"),s=r.find("#".concat(l));s.length||(s=e.jQuery('<style id="'.concat(l,'">')),r.find("body").prepend(s)),s.html(e.value),e.reload=!1;break;case"vp_list_name":case"vp_stretch":e.reload=!1}})),v.on("click",".vp-control-image-dropdown",(function(t){r(t.target).closest(".vp-control-image-dropdown__content").length||r(this).toggleClass("active")})),v.on("mousedown",(function(t){var e=r(t.target).closest(".vp-control-image-dropdown");r(".vp-control-image-dropdown.active").each((function(){this!==e[0]&&r(this).removeClass("active")}))})),v.on("change",".vp-control-image-dropdown .vp-image-picker",(function(){var t=r(this),e=t.data("picker");if(e){var a=e.select.find('option[value="'.concat(e.select.val(),'"]')),n=a.parent("optgroup"),i=t.closest(".vp-control-image-dropdown"),o=a.attr("data-img-src");i.length&&(i.children(".vp-control-image-dropdown__preview").html('<img src="'.concat(o,'" alt="">')),n.length&&i.children(".vp-control-image-dropdown__title").html(n.attr("label")))}}));var L=r('[name="vp_list_name"]'),T=r('[name="post_title"]');L.length&&T.length&&(L.on("input",(function(){T.val()!==L.val()&&T.val(L.val()).change()})),T.on("input",(function(){L.val(T.val())}))),r.fn.select2&&r(".vp-select2").each((function(){var t=r(this),e={width:"100%",minimumResultsForSearch:t.hasClass("vp-select2-nosearch")?-1:1,tags:t.hasClass("vp-select2-tags")},a=!!t.attr("data-post-type")&&r(t.attr("data-post-type"));t.closest(".vp-select2-posts-ajax").length&&(e=r.extend({minimumInputLength:1,ajax:{url:s,dataType:"json",delay:250,data:function(t){return{action:"vp_find_posts",q:t.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(t){return{results:!(!t||!t.length)&&t}},cache:!0},escapeMarkup:function(t){return t},templateResult:function(t){if(t.loading)return t.text;var e="";t.title&&(e=t.title);var a="";t.post_type&&(a=t.post_type);var n="";return t.img&&(n="style=\"background-image: url('".concat(t.img,"');\"")),"".concat('<div class="vp-select2-ajax__result"><div class="vp-select2-ajax__result-img" ').concat(n,"></div>")+'<div class="vp-select2-ajax__result-data">'+'<div class="vp-select2-ajax__result-title">'.concat(e,"</div>")+'<div class="vp-select2-ajax__result-post-type">'.concat(a,"</div>")+"</div></div>"},templateSelection:function(t){return t.title||t.text}},e)),t.closest(".vp-select2-taxonomies-ajax").length&&(e=r.extend({minimumInputLength:1,ajax:{url:s,dataType:"json",delay:250,data:function(t){return{action:"vp_find_taxonomies",q:t.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(t){var e=[];return t&&Object.keys(t).forEach((function(a){e.push({text:a,children:t[a]})})),{results:e}},cache:!0}},e)),t.select2(e).data("select2").$dropdown.addClass("select2-vp-container")}));var E=r(".vp-control-gallery"),M=0;function z(t,e){var a=t.find('[data-image-id="'+e+'"]'),n={id:e};return a.find("[data-additional]").each((function(){var t=r(this),e=t.attr("data-additional");if(n[e]=t.html(),"true"===t.attr("data-to-json"))try{n[e]=JSON.parse(n[e])}catch(t){n[e]=""}})),n}function A(t){var e=[];t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each((function(){e.push(z(t,r(this).attr("data-image-id")))}));var a=JSON.stringify(e),n=t.children("textarea");a!==n.val()&&n.val(a).change()}function $(){E.find(".vp-control-gallery-additional-data.active").each((function(){var t=r(this),e=t.children(),a=t.height(),n=e.height();if(n>=a)e.css({marginTop:""});else{var i=a-n,o=t.offset().top-32;o>=0?e.css({marginTop:""}):e.css({marginTop:Math.min(i,Math.abs(o))})}}))}function N(t,e){var a=t.children("textarea").attr("name"),i=t.children(".vp-control-gallery-additional-data"),l=i.find(".vp-control-gallery-additional-data-preview"),s=t.children(".vp-control-gallery-items").find('.vp-control-gallery-items-img[data-image-id="'+e+'"]'),c=z(t,e),d=function(t,e){var a=t.find('[data-image-id="'+e+'"]'),n={};return a.find("[data-meta]").each((function(){n[r(this).attr("data-meta")]=r(this).html()})),n}(t,e);c&&Object.keys(c).forEach((function(e){var n=i.find('[name="'+a+"_additional_"+e+'"], [name="'+a+"_additional_"+e+'[]"]').val(c[e]||"");if(n.hasClass("vp-select2")){if(n.hasClass("vp-select2-tags")){var l=[],s=[];t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each((function(){var a=z(t,r(this).attr("data-image-id"));a&&void 0!==a[e]&&a[e]&&(l=o(new Set([].concat(o(l),o(a[e])))))})),l.forEach((function(t){s.push(new window.Option(t,t,!1,!1))})),n.html(s.length?s:""),n.val(void 0!==c[e]&&c[e]?c[e]:"")}n.trigger("change")}})),l.find(".vp-control-gallery-additional-data-preview-image img").attr("src",s.children("img").attr("src")||""),l.find(".vp-control-gallery-additional-data-preview-name").html(d.filename),l.find(".vp-control-gallery-additional-data-preview-size").html(d.width+"x"+d.height+" ("+d.filesizeHumanReadable+")"),l.find(".vp-control-gallery-additional-data-preview-edit a").attr("href",d.editLink.replace("&","&")),s.siblings().removeClass("active"),s.addClass("active"),i.addClass("active"),M=E.find(".vp-control-gallery-additional-data.active").length,Object(n.a)(150,$)()}if(E.length&&(r(".postbox-container").on("scroll",Object(n.a)(150,$)),u.on("scroll resize",Object(n.a)(150,$))),r.fn.sortable&&(E.each((function(){var t=r(this),e=t.children(".vp-control-gallery-items-default");t.children(".vp-control-gallery-items").sortable({animation:150,draggable:".vp-control-gallery-items-img",onUpdate:function(){A(t)}}),t.on("click",".vp-control-gallery-items-remove",(function(e){e.preventDefault(),r(this).parent().remove(),A(t)})),t.on("click",".vp-control-gallery-items-add",(function(a){a.preventDefault();var n=t.data("wp-frame");n?n.open():wp.media?(n=wp.media({title:"Select or Upload Images",button:{text:"Add images"},multiple:!0,library:{type:"image"}}),t.data("wp-frame",n),n.on("select",(function(){var a=n.state().get("selection").models;a&&a.length&&(a.forEach((function(a){var n=a.attributes.url;a.attributes.sizes&&a.attributes.sizes.thumbnail&&(n=a.attributes.sizes.thumbnail.url);var i=e.children().clone();i.attr("data-image-id",a.id),i.children("img").attr("src",n),i.find('[data-meta="width"]').html(a.attributes.width),i.find('[data-meta="height"]').html(a.attributes.height),i.find('[data-meta="filename"]').html(a.attributes.filename),i.find('[data-meta="editLink"]').html(a.attributes.editLink),i.find('[data-meta="filesizeHumanReadable"]').html(a.attributes.filesizeHumanReadable),a.attributes.title&&i.find('[data-additional="title"]').html(a.attributes.title),a.attributes.description&&i.find('[data-additional="description"]').html(a.attributes.description),t.find(".vp-control-gallery-items-add").before(i)})),A(t))})),n.open()):console.error("Can't access wp.media object.")})),t.on("click",".vp-control-gallery-items-img",(function(e){e.preventDefault(),N(t,r(this).attr("data-image-id"))})),t.on("change input",".vp-control-gallery-additional-data [name]",Object(n.a)(200,(function(){var e=t.children(".vp-control-gallery-additional-data"),a=t.children("textarea").attr("name"),n=t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").attr("data-image-id");if(n){var o=t.children(".vp-control-gallery-items").find('[data-image-id="'+n+'"]');e.find('[name*="'+a+'_additional_"]').each((function(){var t=r(this).attr("name").replace(a+"_additional_","").replace("[]",""),e=r(this).val()||"";"object"===i(e)&&(e=JSON.stringify(e)),o.find('[data-additional="'+t+'"]').html(e||"")})),A(t)}})))})),E.length)){var P=E.children(".vp-control-gallery-additional-data");r(document).on("mousedown",(function(t){if(M){var e=t.target;r(e).closest(".vp-control-gallery-additional-data, .vp-control-gallery-items-img, .select2-vp-container").length||(P.removeClass("active"),E.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").removeClass("active"),M=E.find(".vp-control-gallery-additional-data.active").length)}}))}var R=r('[name="vp_custom_css"]'),B=!1,D=!0;function I(t,e){if(D&&(e=!1,D=!1),c&&c.css_editor_error_notice){var a=!1;if(1===t.length?a=c.css_editor_error_notice.singular.replace("%d","1"):t.length>1&&(a=c.css_editor_error_notice.plural.replace("%d",String(t.length))),a){var n=R.prev("#vp_custom_css_notice");if(n.length||e||(n=r('<div class="notice notice-error inline" id="vp_custom_css_notice"></div>'),R.before(n)),!n.length)return;var i='<p class="notification-message">'.concat(a,"</p>")+'<p><input id="vp_custom_css_notice_prevent" type="checkbox">'+'<label for="vp_custom_css_notice_prevent">'.concat(c.css_editor_error_checkbox,"</label>")+"</p>";n.html(i)}else R.prev("#vp_custom_css_notice").remove()}}if(void 0!==d&&R.length){var J=function(t){V.css("height",Math.max(200,q+t.originalEvent.y-H)),F.setSize(null,Math.max(200,q+t.y-H)+"px")},Q=function t(){v.off("mousemove",J),v.off("mouseup",t)};if(c&&c.classnames){var U=d.hint.css;d.hint.css=function(t){var e=t.getCursor(),a=U(t)||{from:e,to:t.getCursor(),list:[]},n=t.getTokenAt(e);return"top"===n.state.state&&0===n.string.indexOf(".")&&(a={from:d.Pos(e.line,n.start),to:d.Pos(e.line,n.end),list:[]},c.classnames.forEach((function(t){-1!==t.indexOf(n.string)&&a.list.push(t)}))),a}}var F=d.fromTextArea(R[0],{mode:"css",theme:"eclipse",indentUnit:4,autoCloseTags:!0,autoCloseBrackets:!0,matchBrackets:!0,foldGutter:!0,lint:{options:{errors:!0,"box-model":!0,"display-property-grouping":!0,"duplicate-properties":!0,"known-properties":!0,"outline-none":!0},onUpdateLinting:function(t,e,a){var n=[];t.forEach((function(t){"error"===t.severity&&n.push(t)})),a.vcLintErrors=n,B||I(a.vcLintErrors,!0)}},lineNumbers:!0,lineWrapping:!0,scrollPastEnd:!0,emmet_active:!0,emmet:!0,styleActiveLine:!0,continueComments:!0,scrollbarStyle:"simple",extraKeys:{"Ctrl-Space":"autocomplete","Ctrl-/":"toggleComment","Cmd-/":"toggleComment","Alt-F":"findPersistent"},gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"]});p(F),R.data("CodeMirrorInstance",F),F.on("change",(function(){F.save(),R.change()})),F.on("keyup",(function(t,e){var a=/^[a-zA-Z]$/.test(e.key);if(!t.state.completionActive||!a){var n=t.getTokenAt(t.getCursor());if("string"!==n.type&&"comment"!==n.type){var i=t.doc.getLine(t.doc.getCursor().line).substr(0,t.doc.getCursor().ch);(a||":"===e.key||" "===e.key&&/:\s+$/.test(i))&&t.showHint({completeSingle:!1})}}}));var H,q,W=r(".CodeMirror-resizer").after(R),V=W.prev(".CodeMirror");W.on("mousedown",(function(t){H=t.originalEvent.y,q=V.height(),v.on("mousemove",J),v.on("mouseup",Q)}))}var G=!1;v.on("click","#publish:not(.disabled)",(function(t){if(G=!0,!B){var e=r(this),a=R.length&&R.data("CodeMirrorInstance");a&&a.vcLintErrors&&a.vcLintErrors.length&&(t.preventDefault(),e.addClass("disabled button-disabled button-primary-disabled"),setTimeout((function(){e.removeClass("disabled button-disabled button-primary-disabled")}),1500),I(a.vcLintErrors,!1),r("html,body").animate({scrollTop:r("#vp_custom_css").offset().top-100},300),a.focus(),a.setCursor(a.vcLintErrors[0].from.line))}}));var K=f.serialize();r(window).on("beforeunload",(function(){if(!G)return K!==f.serialize()||void 0;G=!1})),v.on("change","#vp_custom_css_notice_prevent",(function(){B=!0,r(this).closest(".notice").slideUp()}))}});
|
assets/admin/js/mce-dropdown.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
-
* Version : 1.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const {
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 1.16.0
|
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.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
import { debounce } from 'throttle-debounce';
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 1.16.0
|
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.
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
const {
|
2 |
* Additional js for frontend VC
|
3 |
*
|
4 |
* Name : Visual Portfolio
|
5 |
+
* Version : 1.16.0
|
6 |
* Author : nK https://nkdev.info
|
7 |
*/
|
8 |
const {
|
assets/css/main.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.vp-portfolio{position:relative;min-height:114px}.vp-portfolio,.vp-portfolio *{box-sizing:border-box}.vp-portfolio__items{-webkit-transition:.3s height ease-in-out, .3s transform ease-in-out;transition:.3s height ease-in-out, .3s transform ease-in-out;will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap{visibility:hidden;opacity:0;-webkit-transition:.3s opacity, .3s visibility;transition:.3s opacity, .3s visibility;will-change:opacity, visibility}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-
|
1 |
+
.vp-portfolio{position:relative;min-height:114px}.vp-portfolio,.vp-portfolio *{box-sizing:border-box}.vp-portfolio__items{-webkit-transition:.3s height ease-in-out, .3s transform ease-in-out;transition:.3s height ease-in-out, .3s transform ease-in-out;will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap{visibility:hidden;opacity:0;-webkit-transition:.3s opacity, .3s visibility;transition:.3s opacity, .3s visibility;will-change:opacity, visibility}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__filter-sort-wrap{display:-webkit-box;display:flex;flex-wrap:wrap}.vp-portfolio__filter-sort-wrap .vp-portfolio__sort-wrap{margin-left:auto}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:.3s opacity, .3s visibility;transition:.3s opacity, .3s visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__filter-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__sort-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__pagination-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__filter-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__sort-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__pagination-wrap{opacity:.5}.vp-portfolio__item-popup{display:none}img.visual-portfolio-lazyload{opacity:1;-webkit-transition:.3s opacity;transition:.3s opacity;will-change:opacity}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(-70deg, rgba(255,255,255,0) 42%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 58%);background-color:rgba(132,136,177,0.05);background-position:0% 50%;background-size:500% 100%;-webkit-transition:.3s .3s opacity, .3s .3s visibility;transition:.3s .3s opacity, .3s .3s visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder 3s linear infinite;animation:vp-lazyload-placeholder 3s linear infinite}.vp-portfolio__item-img-lazyloading img.visual-portfolio-lazyload,.vp-portfolio__thumbnail-img-lazyloading img.visual-portfolio-lazyload{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/layout-grid.js
CHANGED
@@ -7,6 +7,106 @@ const {
|
|
7 |
screenSizes,
|
8 |
} = window.VPData;
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
// Init Options.
|
11 |
$( document ).on( 'initOptions.vpf', ( event, self ) => {
|
12 |
if ( 'vpf' !== event.namespace ) {
|
7 |
screenSizes,
|
8 |
} = window.VPData;
|
9 |
|
10 |
+
// fix grid items position for Grid layout and FireFox.
|
11 |
+
// https://wordpress.org/support/topic/gallery-difference-between-firefox-and-all-other-browsers/
|
12 |
+
if ( typeof window.Isotope !== 'undefined' && typeof window.Isotope.LayoutMode !== 'undefined' ) {
|
13 |
+
const GridMode = window.Isotope.LayoutMode.modes.fitRows;
|
14 |
+
|
15 |
+
if ( GridMode ) {
|
16 |
+
GridMode.prototype._resetLayout = function() {
|
17 |
+
this.x = 0;
|
18 |
+
this.y = 0;
|
19 |
+
this.maxY = 0;
|
20 |
+
this.horizontalColIndex = 0;
|
21 |
+
|
22 |
+
this._getMeasurement( 'columnWidth', 'outerWidth' );
|
23 |
+
this._getMeasurement( 'gutter', 'outerWidth' );
|
24 |
+
this.measureColumns();
|
25 |
+
};
|
26 |
+
|
27 |
+
GridMode.prototype.measureColumns = function() {
|
28 |
+
this.getContainerWidth();
|
29 |
+
|
30 |
+
// if columnWidth is 0, default to outerWidth of first item
|
31 |
+
if ( ! this.columnWidth ) {
|
32 |
+
const firstItem = this.items[ 0 ];
|
33 |
+
const firstItemElem = firstItem && firstItem.element;
|
34 |
+
|
35 |
+
// columnWidth fall back to item of first element
|
36 |
+
this.columnWidth = ( firstItemElem && window.getSize( firstItemElem ).outerWidth ) ||
|
37 |
+
// if first elem has no width, default to size of container
|
38 |
+
this.containerWidth;
|
39 |
+
}
|
40 |
+
|
41 |
+
const columnWidth = this.columnWidth += this.gutter;
|
42 |
+
|
43 |
+
// calculate columns
|
44 |
+
const containerWidth = this.containerWidth + this.gutter;
|
45 |
+
let cols = containerWidth / columnWidth;
|
46 |
+
|
47 |
+
// fix rounding errors, typically with gutters
|
48 |
+
const excess = columnWidth - ( containerWidth % columnWidth );
|
49 |
+
|
50 |
+
// if overshoot is less than a pixel, round up, otherwise floor it
|
51 |
+
const mathMethod = excess && excess < 1 ? 'round' : 'floor';
|
52 |
+
|
53 |
+
cols = Math[ mathMethod ]( cols );
|
54 |
+
this.cols = Math.max( cols, 1 );
|
55 |
+
};
|
56 |
+
|
57 |
+
GridMode.prototype.getContainerWidth = function() {
|
58 |
+
// container is parent if fit width
|
59 |
+
const isFitWidth = this._getOption( 'fitWidth' );
|
60 |
+
const container = isFitWidth ? this.element.parentNode : this.element;
|
61 |
+
|
62 |
+
// check that this.size and size are there
|
63 |
+
// IE8 triggers resize on body size change, so they might not be
|
64 |
+
const size = window.getSize( container );
|
65 |
+
this.containerWidth = size && size.innerWidth;
|
66 |
+
};
|
67 |
+
|
68 |
+
GridMode.prototype._getItemLayoutPosition = function( item ) {
|
69 |
+
item.getSize();
|
70 |
+
|
71 |
+
// how many columns does this brick span
|
72 |
+
const remainder = item.size.outerWidth % this.columnWidth;
|
73 |
+
const mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
|
74 |
+
|
75 |
+
// round if off by 1 pixel, otherwise use ceil
|
76 |
+
let colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
|
77 |
+
colSpan = Math.min( colSpan, this.cols );
|
78 |
+
|
79 |
+
let col = this.horizontalColIndex % this.cols;
|
80 |
+
const isOver = colSpan > 1 && col + colSpan > this.cols;
|
81 |
+
|
82 |
+
// shift to next row if item can't fit on current row
|
83 |
+
col = isOver ? 0 : col;
|
84 |
+
|
85 |
+
// don't let zero-size items take up space
|
86 |
+
const hasSize = item.size.outerWidth && item.size.outerHeight;
|
87 |
+
this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
|
88 |
+
|
89 |
+
const itemWidth = item.size.outerWidth + this.gutter;
|
90 |
+
|
91 |
+
// if this element cannot fit in the current row
|
92 |
+
if ( this.x !== 0 && this.horizontalColIndex === 1 ) {
|
93 |
+
this.x = 0;
|
94 |
+
this.y = this.maxY;
|
95 |
+
}
|
96 |
+
|
97 |
+
const position = {
|
98 |
+
x: this.x,
|
99 |
+
y: this.y,
|
100 |
+
};
|
101 |
+
|
102 |
+
this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );
|
103 |
+
this.x += itemWidth;
|
104 |
+
|
105 |
+
return position;
|
106 |
+
};
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
// Init Options.
|
111 |
$( document ).on( 'initOptions.vpf', ( event, self ) => {
|
112 |
if ( 'vpf' !== event.namespace ) {
|
assets/js/layout-grid.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var
|
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=6)}({6:function(t,e,i){t.exports=i(7)},7:function(t,e){var i=window.jQuery,o=window.VPData.screenSizes;if(void 0!==window.Isotope&&void 0!==window.Isotope.LayoutMode){var n=window.Isotope.LayoutMode.modes.fitRows;n&&(n.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this.horizontalColIndex=0,this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns()},n.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],e=t&&t.element;this.columnWidth=e&&window.getSize(e).outerWidth||this.containerWidth}var i=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,n=o/i,r=i-o%i;n=Math[r&&r<1?"round":"floor"](n),this.cols=Math.max(n,1)},n.prototype.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,e=window.getSize(t);this.containerWidth=e&&e.innerWidth},n.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);var o=this.horizontalColIndex%this.cols;o=i>1&&o+i>this.cols?0:o;var n=t.size.outerWidth&&t.size.outerHeight;this.horizontalColIndex=n?o+i:this.horizontalColIndex;var r=t.size.outerWidth+this.gutter;0!==this.x&&1===this.horizontalColIndex&&(this.x=0,this.y=this.maxY);var s={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=r,s})}i(document).on("initOptions.vpf",(function(t,e){"vpf"===t.namespace&&(e.defaults.gridColumns=3,e.options.gridColumns||(e.options.gridColumns=e.defaults.gridColumns))})),i(document).on("initLayout.vpf",(function(t,e){if("vpf"===t.namespace&&"grid"===e.options.layout){e.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/e.options.gridColumns,"%")});for(var i=e.options.gridColumns-1,n=Math.min(o.length-1,i);n>=0;n--)i>0&&void 0!==o[n]&&e.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/i,"%")},"screen and (max-width: ".concat(o[n],"px)")),i-=1}}))}});
|
assets/js/main.js
CHANGED
@@ -139,6 +139,8 @@ class VP {
|
|
139 |
return;
|
140 |
}
|
141 |
|
|
|
|
|
142 |
self.$items_wrap = $item.find( '.vp-portfolio__items' );
|
143 |
self.$slider_thumbnails_wrap = $item.find( '.vp-portfolio__thumbnails' );
|
144 |
self.$pagination = $item.find( '.vp-portfolio__pagination-wrap' );
|
@@ -456,7 +458,7 @@ class VP {
|
|
456 |
'margin-right': mr - right,
|
457 |
} );
|
458 |
}
|
459 |
-
if ( self.$item.hasClass( 'vp-portfolio__stretch' ) ) {
|
460 |
$wnd.on( `load${ evp } resize${ evp } orientationchange${ evp }`, () => {
|
461 |
stretch();
|
462 |
} );
|
@@ -519,7 +521,10 @@ class VP {
|
|
519 |
|
520 |
if ( rect.bottom > 0 && ( rect.bottom - bottomPosToLoad ) <= window.innerHeight ) {
|
521 |
self.loadNewItems( self.options.nextPageUrl, false, () => {
|
522 |
-
|
|
|
|
|
|
|
523 |
} );
|
524 |
}
|
525 |
}
|
@@ -738,89 +743,112 @@ class VP {
|
|
738 |
loadNewItems( url, removeExisting, cb ) {
|
739 |
const self = this;
|
740 |
|
741 |
-
if ( self.loading || ! url ) {
|
742 |
return;
|
743 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
self.loading = true;
|
745 |
|
746 |
self.$item.addClass( 'vp-portfolio__loading' );
|
747 |
|
748 |
-
self.emitEvent( 'startLoadingNewItems', [ url ] );
|
749 |
|
750 |
-
|
751 |
-
|
752 |
-
data = data.replace( '<body', '<body><div id="vp-infinite-load-body"' ).replace( '</body>', '</div></body>' );
|
753 |
-
const $body = $( data ).filter( '#vp-infinite-load-body' );
|
754 |
-
|
755 |
-
// find current block on new page
|
756 |
-
const $newVP = $body.find( `.vp-portfolio.vp-uid-${ self.uid }` );
|
757 |
-
|
758 |
-
// insert new items
|
759 |
-
if ( $newVP.length ) {
|
760 |
-
const newItems = $newVP.find( '.vp-portfolio__items' ).html();
|
761 |
-
|
762 |
-
// update filter
|
763 |
-
if ( self.$filter.length ) {
|
764 |
-
self.$filter.each( function() {
|
765 |
-
const $filter = $( this );
|
766 |
-
let newFilterContent = '';
|
767 |
-
|
768 |
-
if ( $filter.parent().hasClass( 'vp-single-filter' ) ) {
|
769 |
-
newFilterContent = $body.find( `[class="${ $filter.parent().attr( 'class' ).replace( ' vp-single-filter__ready', '' ) }"] .vp-portfolio__filter-wrap` ).html();
|
770 |
-
} else {
|
771 |
-
newFilterContent = $newVP.find( '.vp-portfolio__filter-wrap' ).html();
|
772 |
-
}
|
773 |
-
|
774 |
-
$filter.html( newFilterContent );
|
775 |
-
} );
|
776 |
-
}
|
777 |
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
|
|
|
|
|
|
783 |
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
newFilterContent = $newVP.find( '.vp-portfolio__sort-wrap' ).html();
|
788 |
-
}
|
789 |
|
790 |
-
|
791 |
-
|
792 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
|
|
|
|
|
|
|
|
|
|
798 |
|
799 |
-
|
|
|
|
|
|
|
|
|
800 |
|
801 |
-
|
|
|
802 |
}
|
803 |
|
804 |
-
// update
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
|
809 |
-
self
|
810 |
|
811 |
-
self.
|
|
|
812 |
|
813 |
-
|
|
|
|
|
|
|
814 |
|
815 |
-
|
816 |
|
817 |
-
|
818 |
-
self.initCustomColors();
|
819 |
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
|
|
|
|
|
|
|
|
|
|
824 |
}
|
825 |
}
|
826 |
|
139 |
return;
|
140 |
}
|
141 |
|
142 |
+
self.href = window.location.href;
|
143 |
+
|
144 |
self.$items_wrap = $item.find( '.vp-portfolio__items' );
|
145 |
self.$slider_thumbnails_wrap = $item.find( '.vp-portfolio__thumbnails' );
|
146 |
self.$pagination = $item.find( '.vp-portfolio__pagination-wrap' );
|
458 |
'margin-right': mr - right,
|
459 |
} );
|
460 |
}
|
461 |
+
if ( self.$item.hasClass( 'vp-portfolio__stretch' ) && ! self.isPreview() ) {
|
462 |
$wnd.on( `load${ evp } resize${ evp } orientationchange${ evp }`, () => {
|
463 |
stretch();
|
464 |
} );
|
521 |
|
522 |
if ( rect.bottom > 0 && ( rect.bottom - bottomPosToLoad ) <= window.innerHeight ) {
|
523 |
self.loadNewItems( self.options.nextPageUrl, false, () => {
|
524 |
+
clearTimeout( scrollTimeout );
|
525 |
+
scrollTimeout = setTimeout( () => {
|
526 |
+
checkVisibilityAndLoad();
|
527 |
+
}, 300 );
|
528 |
} );
|
529 |
}
|
530 |
}
|
743 |
loadNewItems( url, removeExisting, cb ) {
|
744 |
const self = this;
|
745 |
|
746 |
+
if ( self.loading || ! url || self.href === url ) {
|
747 |
return;
|
748 |
}
|
749 |
+
|
750 |
+
const ajaxData = {
|
751 |
+
method: 'POST',
|
752 |
+
url,
|
753 |
+
complete( { responseText } ) {
|
754 |
+
self.href = url;
|
755 |
+
self.replaceItems( responseText, removeExisting, cb );
|
756 |
+
},
|
757 |
+
};
|
758 |
+
|
759 |
self.loading = true;
|
760 |
|
761 |
self.$item.addClass( 'vp-portfolio__loading' );
|
762 |
|
763 |
+
self.emitEvent( 'startLoadingNewItems', [ url, ajaxData ] );
|
764 |
|
765 |
+
$.ajax( ajaxData );
|
766 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
|
768 |
+
/**
|
769 |
+
* Replace items to the new loaded using AJAX
|
770 |
+
*
|
771 |
+
* @param {string} content - new page content.
|
772 |
+
* @param {bool} removeExisting - remove existing elements.
|
773 |
+
*/
|
774 |
+
replaceItems( content, removeExisting ) {
|
775 |
+
const self = this;
|
776 |
|
777 |
+
if ( ! content ) {
|
778 |
+
return;
|
779 |
+
}
|
|
|
|
|
780 |
|
781 |
+
// load to invisible container, then append to posts container
|
782 |
+
content = content.replace( '<body', '<body><div id="vp-infinite-load-body"' ).replace( '</body>', '</div></body>' );
|
783 |
+
const $body = $( content ).filter( '#vp-infinite-load-body' );
|
784 |
+
|
785 |
+
// find current block on new page
|
786 |
+
const $newVP = $body.find( `.vp-portfolio.vp-uid-${ self.uid }` );
|
787 |
+
|
788 |
+
// insert new items
|
789 |
+
if ( $newVP.length ) {
|
790 |
+
const newItems = $newVP.find( '.vp-portfolio__items' ).html();
|
791 |
+
|
792 |
+
// update filter
|
793 |
+
if ( self.$filter.length ) {
|
794 |
+
self.$filter.each( function() {
|
795 |
+
const $filter = $( this );
|
796 |
+
let newFilterContent = '';
|
797 |
+
|
798 |
+
if ( $filter.parent().hasClass( 'vp-single-filter' ) ) {
|
799 |
+
newFilterContent = $body.find( `[class="${ $filter.parent().attr( 'class' ).replace( ' vp-single-filter__ready', '' ) }"] .vp-portfolio__filter-wrap` ).html();
|
800 |
+
} else {
|
801 |
+
newFilterContent = $newVP.find( '.vp-portfolio__filter-wrap' ).html();
|
802 |
+
}
|
803 |
|
804 |
+
$filter.html( newFilterContent );
|
805 |
+
} );
|
806 |
+
}
|
807 |
+
|
808 |
+
// update sort
|
809 |
+
if ( self.$sort.length ) {
|
810 |
+
self.$sort.each( function() {
|
811 |
+
const $sort = $( this );
|
812 |
+
let newFilterContent = '';
|
813 |
|
814 |
+
if ( $sort.parent().hasClass( 'vp-single-sort' ) ) {
|
815 |
+
newFilterContent = $body.find( `[class="${ $sort.parent().attr( 'class' ).replace( ' vp-single-sort__ready', '' ) }"] .vp-portfolio__sort-wrap` ).html();
|
816 |
+
} else {
|
817 |
+
newFilterContent = $newVP.find( '.vp-portfolio__sort-wrap' ).html();
|
818 |
+
}
|
819 |
|
820 |
+
$sort.html( newFilterContent );
|
821 |
+
} );
|
822 |
}
|
823 |
|
824 |
+
// update pagination
|
825 |
+
if ( self.$pagination.length ) {
|
826 |
+
self.$pagination.html( $newVP.find( '.vp-portfolio__pagination-wrap' ).html() );
|
827 |
+
}
|
828 |
|
829 |
+
self.addItems( $( newItems ), removeExisting, $newVP );
|
830 |
|
831 |
+
self.emitEvent( 'loadedNewItems', [ $newVP, $newVP, content ] );
|
832 |
+
}
|
833 |
|
834 |
+
// update next page data
|
835 |
+
const nextPageUrl = $newVP.attr( 'data-vp-next-page-url' );
|
836 |
+
self.options.nextPageUrl = nextPageUrl;
|
837 |
+
self.$item.attr( 'data-vp-next-page-url', nextPageUrl );
|
838 |
|
839 |
+
self.$item.removeClass( 'vp-portfolio__loading' );
|
840 |
|
841 |
+
self.loading = false;
|
|
|
842 |
|
843 |
+
self.emitEvent( 'endLoadingNewItems' );
|
844 |
+
|
845 |
+
self.prepareLazyLoad();
|
846 |
+
|
847 |
+
// images loaded
|
848 |
+
self.imagesLoaded();
|
849 |
+
|
850 |
+
// init custom colors
|
851 |
+
self.initCustomColors();
|
852 |
}
|
853 |
}
|
854 |
|
assets/js/main.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=18)}({0:function(t,e,i){"use strict";function o(t,e,i,o){var n,a=!1,s=0;function r(){n&&clearTimeout(n)}function l(){var l=this,c=Date.now()-s,d=arguments;function f(){s=Date.now(),i.apply(l,d)}a||(o&&!n&&f(),r(),void 0===o&&c>t?f():!0!==e&&(n=setTimeout(o?function(){n=void 0}:f,void 0===o?t-c:t)))}return"boolean"!=typeof e&&(o=i,i=e,e=void 0),l.cancel=function(){r(),a=!0},l}function n(t,e,i){return void 0===i?o(t,e,!1):o(t,i,!1!==e)}i.d(e,"b",(function(){return o})),i.d(e,"a",(function(){return n}))},1:function(t,e,i){var o=i(20),n=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||function(t){var e=+new Date,i=Math.max(0,16-(e-a)),o=setTimeout(t,i);return a=e,o},a=+new Date;var s=o.cancelAnimationFrame||o.webkitCancelAnimationFrame||o.mozCancelAnimationFrame||clearTimeout;Function.prototype.bind&&(n=n.bind(o),s=s.bind(o)),(t.exports=n).cancel=s},18:function(t,e,i){t.exports=i(19)},19:function(t,e,i){"use strict";i.r(e);var o=i(0),n=i(1),a=i.n(n);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var c=jQuery,d=window,f=d.VPData,v=d.objectFitImages,p=f.__,u=c(window);function m(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}void 0!==v&&(v(".vp-portfolio img:not(.visual-portfolio-lazyload)"),c(document).on("lazybeforeunveil",(function(t){var e=c(t.target);e.hasClass("visual-portfolio-lazyload")&&e.one("load",(function(){v(e[0])}))})));var h={},y=!1,g=!1;function _(){if(clearTimeout(g),y){var t=c(".vp-portfolio__ready");if(t.length){var e=!1;t.each((function(){var t=this.vpf;if(t){var i=h[t.uid]||"none";h[t.uid]=null===this.offsetParent?"hidden":"visible","hidden"===i&&"visible"===h[t.uid]&&(e=!0)}})),e&&m()}else y=!1;g=setTimeout(_,500)}}c(document).on("inited.vpf",(function(t){"vpf"===t.namespace&&(y=!0,_())}));var w=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);this.$item=e;for(var o=e[0].className.split(/\s+/),n=0;n<o.length;n++)o[n]&&/^vp-uid-/.test(o[n])&&(this.uid=o[n].replace(/^vp-uid-/,"")),o[n]&&/^vp-id-/.test(o[n])&&(this.id=o[n].replace(/^vp-id-/,""));this.uid?(this.$items_wrap=e.find(".vp-portfolio__items"),this.$slider_thumbnails_wrap=e.find(".vp-portfolio__thumbnails"),this.$pagination=e.find(".vp-portfolio__pagination-wrap"),this.$filter=e.find(".vp-portfolio__filter-wrap"),this.$sort=e.find(".vp-portfolio__sort-wrap"),this.id&&(this.$filter=this.$filter.add(".vp-single-filter.vp-id-".concat(this.id," .vp-portfolio__filter-wrap"))),this.id&&(this.$sort=this.$sort.add(".vp-single-sort.vp-id-".concat(this.id," .vp-portfolio__sort-wrap"))),this.userOptions=i,this.firstRun=!0,this.init()):console.error(p.couldnt_retrieve_vp)}var e,i,o;return e=t,(i=[{key:"emitEvent",value:function(t,e){e=e?[this].concat(e):[this],this.$item.trigger("".concat(t,".vpf"),e),this.$item.trigger("".concat(t,".vpf-uid-").concat(this.uid),e)}},{key:"init",value:function(){this.firstRun||this.destroy(),this.destroyed=!1,this.removeNoscriptTags(this.$items_wrap),this.initOptions(),this.initEvents(),this.prepareLazyLoad(),this.initLayout(),this.initCustomColors(),this.emitEvent("init"),this.$item.addClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).addClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).addClass("vp-single-sort__ready")),this.resized(),this.imagesLoaded(),this.emitEvent("inited"),this.firstRun=!1}},{key:"isPreview",value:function(){return!!this.$item.closest("#vp_preview").length}},{key:"resized",value:function(){m(),this.emitEvent("resized")}},{key:"imagesLoaded",value:function(){var t=this;this.$items_wrap.imagesLoaded&&this.$items_wrap.imagesLoaded((function(){t.emitEvent("imagesLoaded")}))}},{key:"destroy",value:function(){this.$item.removeClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).removeClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).removeClass("vp-single-sort__ready")),this.destroyEvents(),this.removeStyle(),this.renderStyle(),this.emitEvent("destroy"),this.destroyed=!0}},{key:"addStyle",value:function(t,e,i){i=i||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]&&(this.stylesList[o]={}),void 0===this.stylesList[o][i]&&(this.stylesList[o][i]={}),void 0===this.stylesList[o][i][t]&&(this.stylesList[o][i][t]={}),this.stylesList[o][i][t]=c.extend(this.stylesList[o][i][t],e),this.emitEvent("addStyle",[t,e,i,this.stylesList])}},{key:"removeStyle",value:function(t,e,i){i=i||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]||t||(this.stylesList[o]={}),void 0!==this.stylesList[o]&&void 0!==this.stylesList[o][i]&&void 0!==this.stylesList[o][i][t]&&t&&delete this.stylesList[o][i][t],this.emitEvent("removeStyle",[t,e,this.stylesList])}},{key:"renderStyle",value:function(){var t=this,e=t.uid,i="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[e]&&Object.keys(t.stylesList[e]).forEach((function(o){o&&(i+="@media ".concat(o," {")),Object.keys(t.stylesList[e][o]).forEach((function(n){i+=".vp-uid-".concat(e," ").concat(n," {"),Object.keys(t.stylesList[e][o][n]).forEach((function(a){i+="".concat(a,":").concat(t.stylesList[e][o][n][a],";")})),i+="}"})),o&&(i+="}")}));var o=c("#vp-style-".concat(e));o.length||(o=c("<style>").attr("id","vp-style-".concat(e)).appendTo("head")),o.html(i),t.emitEvent("renderStyle",[i,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var e=this;e.defaults={layout:"tile",itemsGap:0,pagination:"load-more"},t&&(e.userOptions=t);var i=e.$item[0].dataset,o={};Object.keys(i).forEach((function(t){t&&"vp"===t.substring(0,2)&&(o[e.firstToLowerCase(t.substring(2))]=i[t])})),e.options=c.extend({},e.defaults,o,e.userOptions),e.emitEvent("initOptions")}},{key:"initEvents",value:function(){var t,e=this,i=".vpf-uid-".concat(e.uid);function o(){var t=e.$item[0].getBoundingClientRect(),i=t.left,o=window.innerWidth-t.right,n=parseFloat(e.$item.css("margin-left")||0),a=parseFloat(e.$item.css("margin-right")||0);e.$item.css({"margin-left":n-i,"margin-right":a-o})}e.$item.hasClass("vp-portfolio__stretch")&&(u.on("load".concat(i," resize").concat(i," orientationchange").concat(i),(function(){o()})),o()),e.$filter.on("click".concat(i),".vp-filter .vp-filter__item a",(function(t){t.preventDefault();var i=c(this);e.loading||i.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),e.loadNewItems(i.attr("href"),!0)})),e.$sort.on("click".concat(i),".vp-sort .vp-sort__item a",(function(t){t.preventDefault();var i=c(this);e.loading||i.closest(".vp-sort__item").addClass("vp-sort__item-active").siblings().removeClass("vp-sort__item-active"),e.loadNewItems(i.attr("href"),!0)})),e.$filter.add(e.$sort).on("change".concat(i),".vp-filter select, .vp-sort select",(function(){var t=c(this),i=t.val(),o=t.find('[value="'.concat(i,'"]'));o.length&&e.loadNewItems(o.attr("data-vp-url"),!0)})),e.$item.on("click".concat(i),".vp-pagination .vp-pagination__item a",(function(t){t.preventDefault();var i=c(this);i.hasClass("vp-pagination__no-more")&&"paged"!==e.options.pagination||e.loadNewItems(i.attr("href"),"paged"===e.options.pagination)})),e.$item.on("click".concat(i),".vp-portfolio__items .vp-portfolio__item-meta-category a",(function(t){t.preventDefault(),t.stopPropagation(),e.loadNewItems(c(this).attr("href"),!0)}));var n=250;function a(){var t=e.$item[0].getBoundingClientRect();t.bottom>0&&t.bottom-n<=window.innerHeight&&e.loadNewItems(e.options.nextPageUrl,!1,(function(){a()}))}"infinite"===e.options.pagination&&(u.on("load".concat(i," scroll").concat(i," resize").concat(i," orientationchange").concat(i),(function(){clearTimeout(t),t=setTimeout((function(){a()}),60)})),a()),e.$item.on("transitionend".concat(i),".vp-portfolio__items",(function(t){t.currentTarget===t.target&&e.resized()})),e.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=".vpf-uid-".concat(this.uid);this.$item.off(t),this.$filter.off(t),this.$sort.off(t),u.off(t),this.emitEvent("destroyEvents")}},{key:"prepareLazyLoad",value:function(){var t=window.lazySizes&&window.lazySizes.cfg?window.lazySizes.cfg:window.lazySizesConfig;if(t){var e={"data-vpf-src":t.srcAttr,"data-vpf-sizes":t.sizesAttr,"data-vpf-srcset":t.srcsetAttr};this.$items_wrap.add(this.$slider_thumbnails_wrap).find(".visual-portfolio-lazyload:not(.".concat(t.lazyClass,")")).each((function(){var i=c(this);Object.keys(e).forEach((function(t){e[t]&&t!==e[t]&&i.attr(t)&&(i.attr(e[t],i.attr(t)),i.removeAttr(t))})),i.addClass(t.lazyClass)}))}}},{key:"removeNoscriptTags",value:function(t){t.find("noscript").remove()}},{key:"initLayout",value:function(){this.emitEvent("initLayout"),this.renderStyle()}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each((function(){var e=c(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'.concat(e,'"]'),{"background-color":"".concat(e," !important")})})),t.$item.find("[data-vp-text-color]").each((function(){var e=c(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'.concat(e,'"]'),{color:"".concat(e," !important")})})),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"parseVideo",value:function(t){var e,i=!(!(e=t.match(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/))||11!==e[1].length)&&e[1],o=function(t){var e=t.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/);return!(!e||!e[3])&&e[3]}(t),n=t;return i?{vendor:"youtube",id:i,url:t,embedUrl:n="https://www.youtube.com/embed/".concat(i),embed:'<iframe width="1920" height="1080" src="'.concat(n,'" frameborder="0" allowfullscreen></iframe>')}:o?{vendor:"vimeo",id:o,url:t,embedUrl:n="//player.vimeo.com/video/".concat(o),embed:'<iframe width="1920" height="1080" src="'.concat(n,'" frameborder="0" allowfullscreen></iframe>')}:{vendor:"unknown",id:t,url:t,embedUrl:n,embed:'<iframe width="1920" height="1080" src="'.concat(t,'" frameborder="0" allowfullscreen></iframe>')}}},{key:"addItems",value:function(t,e,i){this.removeNoscriptTags(t),this.emitEvent("addItems",[t,e,i])}},{key:"removeItems",value:function(t){this.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,e,i){var o=this;!o.loading&&t&&(o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t]),c.get(t,{},(function(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var n=c(t).filter("#vp-infinite-load-body"),a=n.find(".vp-portfolio.vp-uid-".concat(o.uid));if(a.length){var s=a.find(".vp-portfolio__items").html();o.$filter.length&&o.$filter.each((function(){var t=c(this),e="";e=t.parent().hasClass("vp-single-filter")?n.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-filter__ready",""),'"] .vp-portfolio__filter-wrap')).html():a.find(".vp-portfolio__filter-wrap").html(),t.html(e)})),o.$sort.length&&o.$sort.each((function(){var t=c(this),e="";e=t.parent().hasClass("vp-single-sort")?n.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-sort__ready",""),'"] .vp-portfolio__sort-wrap')).html():a.find(".vp-portfolio__sort-wrap").html(),t.html(e)})),o.$pagination.length&&o.$pagination.html(a.find(".vp-portfolio__pagination-wrap").html()),o.addItems(c(s),e,a),o.emitEvent("loadedNewItems",[a,a,t])}var r=a.attr("data-vp-next-page-url");o.options.nextPageUrl=r,o.$item.attr("data-vp-next-page-url",r),o.$item.removeClass("vp-portfolio__loading"),o.loading=!1,o.emitEvent("endLoadingNewItems"),o.prepareLazyLoad(),o.initCustomColors(),i&&i()})))}}])&&l(e.prototype,i),o&&l(e,o),t}();c(document).on("lazybeforeunveil",(function(t){var e=c(t.target);e.hasClass("visual-portfolio-lazyload")&&(e.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),e.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(document).on("lazyloaded",(function(t){var e=c(t.target);e.hasClass("visual-portfolio-lazyload")&&(e.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),e.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(".elementor").length&&c(document).on("init.vpf addItems.vpf",(function(t,e){"vpf"===t.namespace&&e.$item.find(".vp-portfolio__item a").each((function(){/\.(png|jpe?g|gif|svg)(\?.*)?$/i.test(this.href)&&c(this).attr("data-elementor-open-lightbox","no")}))})),c(document).trigger("extendClass.vpf",[w]);var b=function(t){var e,i=Array.prototype.slice.call(arguments,1);return this.each((function(){if(void 0===e)if("object"===r(t)||void 0===t)this.vpf||(this.vpf=new w(c(this),t));else if(this.vpf){var o;e=(o=this.vpf)[t].apply(o,s(i))}})),void 0!==e?e:this};b.constructor=w;var $=jQuery.fn.vpf;jQuery.fn.vpf=b,jQuery.fn.vpf.noConflict=function(){return jQuery.fn.vpf=$,this},c(".vp-portfolio").vpf(),c((function(){c(".vp-portfolio").vpf()}));var L=Object(o.b)(200,(function(){a()((function(){c(".vp-portfolio:not(.vp-portfolio__ready)").vpf()}))}));window.MutationObserver?new window.MutationObserver(L).observe(document.documentElement,{childList:!0,subtree:!0}):c(document).on("DOMContentLoaded DOMNodeInserted load",(function(){L()}))},20:function(t,e,i){(function(e){var i;i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=i}).call(this,i(21))},21:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i}});
|
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=18)}({0:function(t,e,i){"use strict";function o(t,e,i,o){var n,s=!1,a=0;function r(){n&&clearTimeout(n)}function l(){var l=this,c=Date.now()-a,d=arguments;function f(){a=Date.now(),i.apply(l,d)}s||(o&&!n&&f(),r(),void 0===o&&c>t?f():!0!==e&&(n=setTimeout(o?function(){n=void 0}:f,void 0===o?t-c:t)))}return"boolean"!=typeof e&&(o=i,i=e,e=void 0),l.cancel=function(){r(),s=!0},l}function n(t,e,i){return void 0===i?o(t,e,!1):o(t,i,!1!==e)}i.d(e,"b",(function(){return o})),i.d(e,"a",(function(){return n}))},1:function(t,e,i){var o=i(20),n=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||function(t){var e=+new Date,i=Math.max(0,16-(e-s)),o=setTimeout(t,i);return s=e,o},s=+new Date;var a=o.cancelAnimationFrame||o.webkitCancelAnimationFrame||o.mozCancelAnimationFrame||clearTimeout;Function.prototype.bind&&(n=n.bind(o),a=a.bind(o)),(t.exports=n).cancel=a},18:function(t,e,i){t.exports=i(19)},19:function(t,e,i){"use strict";i.r(e);var o=i(0),n=i(1),s=i.n(n);function a(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var c=jQuery,d=window,f=d.VPData,v=d.objectFitImages,p=f.__,u=c(window);function h(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}void 0!==v&&(v(".vp-portfolio img:not(.visual-portfolio-lazyload)"),c(document).on("lazybeforeunveil",(function(t){var e=c(t.target);e.hasClass("visual-portfolio-lazyload")&&e.one("load",(function(){v(e[0])}))})));var m={},y=!1,g=!1;function _(){if(clearTimeout(g),y){var t=c(".vp-portfolio__ready");if(t.length){var e=!1;t.each((function(){var t=this.vpf;if(t){var i=m[t.uid]||"none";m[t.uid]=null===this.offsetParent?"hidden":"visible","hidden"===i&&"visible"===m[t.uid]&&(e=!0)}})),e&&h()}else y=!1;g=setTimeout(_,500)}}c(document).on("inited.vpf",(function(t){"vpf"===t.namespace&&(y=!0,_())}));var w=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);this.$item=e;for(var o=e[0].className.split(/\s+/),n=0;n<o.length;n++)o[n]&&/^vp-uid-/.test(o[n])&&(this.uid=o[n].replace(/^vp-uid-/,"")),o[n]&&/^vp-id-/.test(o[n])&&(this.id=o[n].replace(/^vp-id-/,""));this.uid?(this.href=window.location.href,this.$items_wrap=e.find(".vp-portfolio__items"),this.$slider_thumbnails_wrap=e.find(".vp-portfolio__thumbnails"),this.$pagination=e.find(".vp-portfolio__pagination-wrap"),this.$filter=e.find(".vp-portfolio__filter-wrap"),this.$sort=e.find(".vp-portfolio__sort-wrap"),this.id&&(this.$filter=this.$filter.add(".vp-single-filter.vp-id-".concat(this.id," .vp-portfolio__filter-wrap"))),this.id&&(this.$sort=this.$sort.add(".vp-single-sort.vp-id-".concat(this.id," .vp-portfolio__sort-wrap"))),this.userOptions=i,this.firstRun=!0,this.init()):console.error(p.couldnt_retrieve_vp)}var e,i,o;return e=t,(i=[{key:"emitEvent",value:function(t,e){e=e?[this].concat(e):[this],this.$item.trigger("".concat(t,".vpf"),e),this.$item.trigger("".concat(t,".vpf-uid-").concat(this.uid),e)}},{key:"init",value:function(){this.firstRun||this.destroy(),this.destroyed=!1,this.removeNoscriptTags(this.$items_wrap),this.initOptions(),this.initEvents(),this.prepareLazyLoad(),this.initLayout(),this.initCustomColors(),this.emitEvent("init"),this.$item.addClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).addClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).addClass("vp-single-sort__ready")),this.resized(),this.imagesLoaded(),this.emitEvent("inited"),this.firstRun=!1}},{key:"isPreview",value:function(){return!!this.$item.closest("#vp_preview").length}},{key:"resized",value:function(){h(),this.emitEvent("resized")}},{key:"imagesLoaded",value:function(){var t=this;this.$items_wrap.imagesLoaded&&this.$items_wrap.imagesLoaded((function(){t.emitEvent("imagesLoaded")}))}},{key:"destroy",value:function(){this.$item.removeClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).removeClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).removeClass("vp-single-sort__ready")),this.destroyEvents(),this.removeStyle(),this.renderStyle(),this.emitEvent("destroy"),this.destroyed=!0}},{key:"addStyle",value:function(t,e,i){i=i||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]&&(this.stylesList[o]={}),void 0===this.stylesList[o][i]&&(this.stylesList[o][i]={}),void 0===this.stylesList[o][i][t]&&(this.stylesList[o][i][t]={}),this.stylesList[o][i][t]=c.extend(this.stylesList[o][i][t],e),this.emitEvent("addStyle",[t,e,i,this.stylesList])}},{key:"removeStyle",value:function(t,e,i){i=i||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]||t||(this.stylesList[o]={}),void 0!==this.stylesList[o]&&void 0!==this.stylesList[o][i]&&void 0!==this.stylesList[o][i][t]&&t&&delete this.stylesList[o][i][t],this.emitEvent("removeStyle",[t,e,this.stylesList])}},{key:"renderStyle",value:function(){var t=this,e=t.uid,i="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[e]&&Object.keys(t.stylesList[e]).forEach((function(o){o&&(i+="@media ".concat(o," {")),Object.keys(t.stylesList[e][o]).forEach((function(n){i+=".vp-uid-".concat(e," ").concat(n," {"),Object.keys(t.stylesList[e][o][n]).forEach((function(s){i+="".concat(s,":").concat(t.stylesList[e][o][n][s],";")})),i+="}"})),o&&(i+="}")}));var o=c("#vp-style-".concat(e));o.length||(o=c("<style>").attr("id","vp-style-".concat(e)).appendTo("head")),o.html(i),t.emitEvent("renderStyle",[i,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var e=this;e.defaults={layout:"tile",itemsGap:0,pagination:"load-more"},t&&(e.userOptions=t);var i=e.$item[0].dataset,o={};Object.keys(i).forEach((function(t){t&&"vp"===t.substring(0,2)&&(o[e.firstToLowerCase(t.substring(2))]=i[t])})),e.options=c.extend({},e.defaults,o,e.userOptions),e.emitEvent("initOptions")}},{key:"initEvents",value:function(){var t,e=this,i=".vpf-uid-".concat(e.uid);function o(){var t=e.$item[0].getBoundingClientRect(),i=t.left,o=window.innerWidth-t.right,n=parseFloat(e.$item.css("margin-left")||0),s=parseFloat(e.$item.css("margin-right")||0);e.$item.css({"margin-left":n-i,"margin-right":s-o})}e.$item.hasClass("vp-portfolio__stretch")&&!e.isPreview()&&(u.on("load".concat(i," resize").concat(i," orientationchange").concat(i),(function(){o()})),o()),e.$filter.on("click".concat(i),".vp-filter .vp-filter__item a",(function(t){t.preventDefault();var i=c(this);e.loading||i.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),e.loadNewItems(i.attr("href"),!0)})),e.$sort.on("click".concat(i),".vp-sort .vp-sort__item a",(function(t){t.preventDefault();var i=c(this);e.loading||i.closest(".vp-sort__item").addClass("vp-sort__item-active").siblings().removeClass("vp-sort__item-active"),e.loadNewItems(i.attr("href"),!0)})),e.$filter.add(e.$sort).on("change".concat(i),".vp-filter select, .vp-sort select",(function(){var t=c(this),i=t.val(),o=t.find('[value="'.concat(i,'"]'));o.length&&e.loadNewItems(o.attr("data-vp-url"),!0)})),e.$item.on("click".concat(i),".vp-pagination .vp-pagination__item a",(function(t){t.preventDefault();var i=c(this);i.hasClass("vp-pagination__no-more")&&"paged"!==e.options.pagination||e.loadNewItems(i.attr("href"),"paged"===e.options.pagination)})),e.$item.on("click".concat(i),".vp-portfolio__items .vp-portfolio__item-meta-category a",(function(t){t.preventDefault(),t.stopPropagation(),e.loadNewItems(c(this).attr("href"),!0)}));var n=250;function s(){var i=e.$item[0].getBoundingClientRect();i.bottom>0&&i.bottom-n<=window.innerHeight&&e.loadNewItems(e.options.nextPageUrl,!1,(function(){clearTimeout(t),t=setTimeout((function(){s()}),300)}))}"infinite"===e.options.pagination&&(u.on("load".concat(i," scroll").concat(i," resize").concat(i," orientationchange").concat(i),(function(){clearTimeout(t),t=setTimeout((function(){s()}),60)})),s()),e.$item.on("transitionend".concat(i),".vp-portfolio__items",(function(t){t.currentTarget===t.target&&e.resized()})),e.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=".vpf-uid-".concat(this.uid);this.$item.off(t),this.$filter.off(t),this.$sort.off(t),u.off(t),this.emitEvent("destroyEvents")}},{key:"prepareLazyLoad",value:function(){var t=window.lazySizes&&window.lazySizes.cfg?window.lazySizes.cfg:window.lazySizesConfig;if(t){var e={"data-vpf-src":t.srcAttr,"data-vpf-sizes":t.sizesAttr,"data-vpf-srcset":t.srcsetAttr};this.$items_wrap.add(this.$slider_thumbnails_wrap).find(".visual-portfolio-lazyload:not(.".concat(t.lazyClass,")")).each((function(){var i=c(this);Object.keys(e).forEach((function(t){e[t]&&t!==e[t]&&i.attr(t)&&(i.attr(e[t],i.attr(t)),i.removeAttr(t))})),i.addClass(t.lazyClass)}))}}},{key:"removeNoscriptTags",value:function(t){t.find("noscript").remove()}},{key:"initLayout",value:function(){this.emitEvent("initLayout"),this.renderStyle()}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each((function(){var e=c(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'.concat(e,'"]'),{"background-color":"".concat(e," !important")})})),t.$item.find("[data-vp-text-color]").each((function(){var e=c(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'.concat(e,'"]'),{color:"".concat(e," !important")})})),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"parseVideo",value:function(t){var e,i=!(!(e=t.match(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/))||11!==e[1].length)&&e[1],o=function(t){var e=t.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/);return!(!e||!e[3])&&e[3]}(t),n=t;return i?{vendor:"youtube",id:i,url:t,embedUrl:n="https://www.youtube.com/embed/".concat(i),embed:'<iframe width="1920" height="1080" src="'.concat(n,'" frameborder="0" allowfullscreen></iframe>')}:o?{vendor:"vimeo",id:o,url:t,embedUrl:n="//player.vimeo.com/video/".concat(o),embed:'<iframe width="1920" height="1080" src="'.concat(n,'" frameborder="0" allowfullscreen></iframe>')}:{vendor:"unknown",id:t,url:t,embedUrl:n,embed:'<iframe width="1920" height="1080" src="'.concat(t,'" frameborder="0" allowfullscreen></iframe>')}}},{key:"addItems",value:function(t,e,i){this.removeNoscriptTags(t),this.emitEvent("addItems",[t,e,i])}},{key:"removeItems",value:function(t){this.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,e,i){var o=this;if(!o.loading&&t&&o.href!==t){var n={method:"POST",url:t,complete:function(n){var s=n.responseText;o.href=t,o.replaceItems(s,e,i)}};o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t,n]),c.ajax(n)}}},{key:"replaceItems",value:function(t,e){if(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var i=c(t).filter("#vp-infinite-load-body"),o=i.find(".vp-portfolio.vp-uid-".concat(this.uid));if(o.length){var n=o.find(".vp-portfolio__items").html();this.$filter.length&&this.$filter.each((function(){var t=c(this),e="";e=t.parent().hasClass("vp-single-filter")?i.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-filter__ready",""),'"] .vp-portfolio__filter-wrap')).html():o.find(".vp-portfolio__filter-wrap").html(),t.html(e)})),this.$sort.length&&this.$sort.each((function(){var t=c(this),e="";e=t.parent().hasClass("vp-single-sort")?i.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-sort__ready",""),'"] .vp-portfolio__sort-wrap')).html():o.find(".vp-portfolio__sort-wrap").html(),t.html(e)})),this.$pagination.length&&this.$pagination.html(o.find(".vp-portfolio__pagination-wrap").html()),this.addItems(c(n),e,o),this.emitEvent("loadedNewItems",[o,o,t])}var s=o.attr("data-vp-next-page-url");this.options.nextPageUrl=s,this.$item.attr("data-vp-next-page-url",s),this.$item.removeClass("vp-portfolio__loading"),this.loading=!1,this.emitEvent("endLoadingNewItems"),this.prepareLazyLoad(),this.imagesLoaded(),this.initCustomColors()}}}])&&l(e.prototype,i),o&&l(e,o),t}();c(document).on("lazybeforeunveil",(function(t){var e=c(t.target);e.hasClass("visual-portfolio-lazyload")&&(e.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),e.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(document).on("lazyloaded",(function(t){var e=c(t.target);e.hasClass("visual-portfolio-lazyload")&&(e.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),e.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(".elementor").length&&c(document).on("init.vpf addItems.vpf",(function(t,e){"vpf"===t.namespace&&e.$item.find(".vp-portfolio__item a").each((function(){/\.(png|jpe?g|gif|svg)(\?.*)?$/i.test(this.href)&&c(this).attr("data-elementor-open-lightbox","no")}))})),c(document).trigger("extendClass.vpf",[w]);var b=function(t){var e,i=Array.prototype.slice.call(arguments,1);return this.each((function(){if(void 0===e)if("object"===r(t)||void 0===t)this.vpf||(this.vpf=new w(c(this),t));else if(this.vpf){var o;e=(o=this.vpf)[t].apply(o,a(i))}})),void 0!==e?e:this};b.constructor=w;var $=jQuery.fn.vpf;jQuery.fn.vpf=b,jQuery.fn.vpf.noConflict=function(){return jQuery.fn.vpf=$,this},c(".vp-portfolio").vpf(),c((function(){c(".vp-portfolio").vpf()}));var L=Object(o.b)(200,(function(){s()((function(){c(".vp-portfolio:not(.vp-portfolio__ready)").vpf()}))}));window.MutationObserver?new window.MutationObserver(L).observe(document.documentElement,{childList:!0,subtree:!0}):c(document).on("DOMContentLoaded DOMNodeInserted load",(function(){L()}))},20:function(t,e,i){(function(e){var i;i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=i}).call(this,i(21))},21:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i}});
|
assets/js/script-preview.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
-
* Version : 1.
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const $ = window.jQuery;
|
@@ -8,11 +8,22 @@ const $body = $( 'body' );
|
|
8 |
const $preview = $( '#vp_preview' );
|
9 |
const $portfolio = $preview.find( '.vp-portfolio' );
|
10 |
|
|
|
11 |
$portfolio.on( 'click', '.vp-portfolio__item, .vp-portfolio__item a', ( e ) => {
|
12 |
e.preventDefault();
|
13 |
e.stopPropagation();
|
14 |
} );
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
window.iFrameResizer = {
|
17 |
log: false,
|
18 |
heightCalculationMethod() {
|
1 |
/*!
|
2 |
* Name : Visual Portfolio
|
3 |
+
* Version : 1.16.0
|
4 |
* Author : nK https://nkdev.info
|
5 |
*/
|
6 |
const $ = window.jQuery;
|
8 |
const $preview = $( '#vp_preview' );
|
9 |
const $portfolio = $preview.find( '.vp-portfolio' );
|
10 |
|
11 |
+
// prevent click on items links.
|
12 |
$portfolio.on( 'click', '.vp-portfolio__item, .vp-portfolio__item a', ( e ) => {
|
13 |
e.preventDefault();
|
14 |
e.stopPropagation();
|
15 |
} );
|
16 |
|
17 |
+
// add dynamic data to AJAX calls.
|
18 |
+
$( document ).on( 'startLoadingNewItems.vpf', function( event, vpObject, url, ajaxData ) {
|
19 |
+
if ( 'vpf' !== event.namespace ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
ajaxData.data = Object.assign( ajaxData.data || {}, window.vp_preview_post_data );
|
24 |
+
} );
|
25 |
+
|
26 |
+
// configure iFrame resizer script.
|
27 |
window.iFrameResizer = {
|
28 |
log: false,
|
29 |
heightCalculationMethod() {
|
assets/js/script-preview.min.js
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
* Version : @@plugin_version
|
5 |
* Author : nK https://nkdev.info
|
6 |
*/
|
7 |
-
var n=window.jQuery,o=n("body"),r=n("#vp_preview");r.find(".vp-portfolio").on("click",".vp-portfolio__item, .vp-portfolio__item a",(function(e){e.preventDefault(),e.stopPropagation()})),window.iFrameResizer={log:!1,heightCalculationMethod:function(){return r.outerHeight(!0)},onMessage:function(e){e&&e.name&&"resize"===e.name&&o.css("max-width",e.width+Math.random())}}}});
|
4 |
* Version : @@plugin_version
|
5 |
* Author : nK https://nkdev.info
|
6 |
*/
|
7 |
+
var n=window.jQuery,o=n("body"),r=n("#vp_preview");r.find(".vp-portfolio").on("click",".vp-portfolio__item, .vp-portfolio__item a",(function(e){e.preventDefault(),e.stopPropagation()})),n(document).on("startLoadingNewItems.vpf",(function(e,t,n,o){"vpf"===e.namespace&&(o.data=Object.assign(o.data||{},window.vp_preview_post_data))})),window.iFrameResizer={log:!1,heightCalculationMethod:function(){return r.outerHeight(!0)},onMessage:function(e){e&&e.name&&"resize"===e.name&&o.css("max-width",e.width+Math.random())}}}});
|
assets/vendor/conditionize/conditionize.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["conditionize.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_typeof","Symbol","iterator","obj","constructor","_createClass","Constructor","protoProps","staticProps","defineProperties","target","props","length","descriptor","writable","key","_throttleDebounce","_global","$","window","jQuery","instanceID","Parser","e","this","table","parse","r","t","a","h","unshift","shift","push","Error","f","precedence","associativity","sortRelational","sortEquality","relations","==","eval","b","sort","!=","===","!==","*=","indexOf","<=",">=","<",">","&&","||","Conditionize","value","self","options","customToggle","$container","find","selector","hide","on","runCheck","onInit","$items","each","$this","conditionString","attr","conditionAttr","toString","conditionResult","checkCondition","onCheck","str","tokens","match","token","parserRelations","keys","forEach","k","stack","index","pop","compare","isNumeric","error","operator","arr","Array","condition","isValidSelector","$listenTo","result","is","val","onDestroy","off","show","container","userOptions","instance","TypeError","_classCallCheck","defaults","checkDebounce","assign","debounce","init","plugin","items","HTMLElement","nodeType","nodeName","args","slice","arguments","len","ret","apply","jQueryPlugin","res","oldJqPlugin","fn","conditionize","noConflict","throttle","delay","noTrailing","callback","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","elapsed","Date","now","exec","undefined","setTimeout","cancel","atBegin","global","win","g","Function"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAX,EAAAkB,EAAA,SAAAf,GACA,IAAAQ,EAAAR,GAAAA,EAAAgB,WACA,WAAA,OAAAhB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAQ,EAAAC,GAAA,OAAAR,OAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGArB,EAAAwB,EAAA,GAGAxB,EAAAA,EAAAyB,EAAA,GA9DA,CAiEA,CAEA,SAAAtB,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAD,EAAAF,GAEA,aAGA,IAAA0B,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAL,UAAA,gBAAAO,GAEAE,EAAA,SAAAC,EAAAC,EAAAC,GAAA,OAAAD,GAAAE,EAAAH,EAAAV,UAAAW,GAAAC,GAAAC,EAAAH,EAAAE,GAAAF,GAAA,SAAAG,EAAAC,EAAAC,GAAA,IAAA,IAAAjC,EAAA,EAAAA,EAAAiC,EAAAC,OAAAlC,IAAA,CAAA,IAAAmC,EAAAF,EAAAjC,GAAAmC,EAAAvB,WAAAuB,EAAAvB,aAAA,EAAAuB,EAAAxB,cAAA,EAAA,UAAAwB,IAAAA,EAAAC,UAAA,GAAA3B,OAAAC,eAAAsB,EAAAG,EAAAE,IAAAF,IAEA,IAAAG,EAAA1C,EAAA,GAEA2C,EAAA3C,EAAA,GAIA,IAAA4C,EAAAD,EAAAE,OAAAC,OACAC,EAAA,EAIA,SAAAC,EAAAC,GACAC,KAAAC,MAAAF,EACAD,EAAA1B,UAAA8B,MAAA,SAAAH,GACA,IAAA,IAAAI,EAAAJ,EAAAX,OAAAgB,EAAAJ,KAAAC,MAAA1B,EAAA,GAAA8B,EAAA,GAAAC,EAAA,EAAAA,EAAAH,GAAA,CACA,OAAAjD,EAAA6C,EAAAO,MAAA,IAAA,IACAD,EAAAE,QAAArD,GAAA,MAAA,IAAA,IACA,KAAAmD,EAAAjB,QAAA,CACA,GAAA,OAAAlC,EAAAmD,EAAAG,SAAA,MAAAjC,EAAAkC,KAAAvD,GACA,GAAA,MAAAA,EAAA,MAAA,IAAAwD,MAAA,2BAAA,MAAA,QACA,GAAAN,EAAA/B,eAAAnB,GAAA,CACA,KAAAmD,EAAAjB,QAAA,CACA,IAAAuB,EAAAN,EAAA,GAAA,GAAA,MAAAM,EAAA,MAAA,IAAA3C,EAAAoC,EAAAlD,GACAQ,EAAAM,EAAA4C,WACAtD,EAAA8C,EAAAO,GAAAC,WAAA,GAAAtD,EAAAI,GAAAA,IAAAJ,GAAA,UAAAU,EAAA6C,cAAA,MAAAtC,EAAAkC,KAAAJ,EAAAG,SACAH,EAAAE,QAAArD,QACAqB,EAAAkC,KAAAvD,IACA,KAAAmD,EAAAjB,QAAA,CACA,IAAAlC,EAAA,GAAA,OAAAA,EAAAmD,EAAAG,SAAA,MAAA,IAAAE,MAAA,2BAAAnC,EAAAkC,KAAAvD,GACA,OAAAqB,GAIA,IAAAuC,EAAA,CACAF,WAAA,EACAC,cAAA,QAEAE,EAAA,CACAH,WAAA,EACAC,cAAA,QAIAG,EAAA,CACAC,KAAA,CACAC,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAAL,GAEAM,KAAA,CACAH,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAAL,GAEAO,MAAA,CACAJ,KAAA,SAAAb,EAAAc,GACA,OAAAd,IAAAc,GAGAC,KAAAL,GAEAQ,MAAA,CACAL,KAAA,SAAAb,EAAAc,GACA,OAAAd,IAAAc,GAGAC,KAAAL,GAEAS,KAAA,CACAN,KAAA,SAAAb,EAAAc,GACA,OAAA,IAAAd,EAAAoB,QAAAN,IAGAC,KAAAL,GAEAW,KAAA,CACAR,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAAN,GAEAa,KAAA,CACAT,KAAA,SAAAb,EAAAc,GACA,OAAAA,GAAAd,GAGAe,KAAAN,GAEAc,IAAA,CACAV,KAAA,SAAAb,EAAAc,GACA,OAAAd,EAAAc,GAGAC,KAAAN,GAEAe,IAAA,CACAX,KAAA,SAAAb,EAAAc,GACA,OAAAA,EAAAd,GAGAe,KAAAN,GAEAgB,KAAA,CACAZ,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAA,CACAR,WAAA,EACAC,cAAA,UAGAkB,KAAA,CACAb,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAA,CACAR,WAAA,EACAC,cAAA,WAOAmB,GA+BAnD,EAAAmD,EAAA,CAAA,CACAzC,IAAA,OACA0C,MAAA,WACA,IAAAC,EAAAlC,KAGAkC,EAAAC,QAAAC,aACAF,EAAAC,QAAAC,aAAAhF,KAAA8E,EAAAA,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,WAAA,GAEAL,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,UAAAC,OAIAN,EAAAG,WAAAI,GAAA,sBAAA,0BAAA,WACAP,EAAAQ,SAAAR,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,aAGAL,EAAAQ,SAAAR,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,WAGAL,EAAAC,QAAAQ,QACAT,EAAAC,QAAAQ,OAAAvF,KAAA8E,KAGA,CACA3C,IAAA,WACA0C,MAAA,SAAAW,GACA,IAAAV,EAAAlC,KAEA4C,EAAAC,KAAA,WACA,IAAAC,EAAApD,EAAAM,MACA+C,EAAAD,EAAAE,KAAAd,EAAAC,QAAAc,eAAAC,WACAC,EAAAjB,EAAAkB,eAAAL,GAEAb,EAAAC,QAAAC,aACAF,EAAAC,QAAAC,aAAAhF,KAAA8E,EAAAY,EAAAK,GAEAL,EAAAK,EAAA,OAAA,UAGAjB,EAAAC,QAAAkB,SACAnB,EAAAC,QAAAkB,QAAAP,EAAAK,OAOA,CACA5D,IAAA,iBACA0C,MAAA,SAAAqB,GACA,IACAC,EAAAD,EAAAE,MAAA,WACAC,OAAA,EACAC,EAAA,GAEA/F,OAAAgG,KAAA3C,GAAA4C,QAAA,SAAAC,GACAH,EAAAG,GAAA7C,EAAA6C,GAAAzC,OAKAmC,EAFA,IAAAzD,EAAA4D,GAEAxD,MAAAqD,GAKA,IAHA,IAAAO,EAAA,GACAC,EAAA,EAEAA,EAAAR,EAAAnE,QAGA,IAFAqE,EAAAF,EAAAQ,QAEA/C,EAAA,CACA,IAAAG,EAAA2C,EAAAE,MACA3D,EAAAyD,EAAAE,MACAF,EAAArD,KAAA,CAAAJ,EAAAoD,EAAAtC,SAEA2C,EAAArD,KAAAgD,GAIA,OA5BAzD,KA4BAiE,QAAAH,EAAA1E,QAAA0E,EAAA,MAKA,CACAvE,IAAA,kBACA0C,MAAA,SAAAM,GACA,GAAA,iBAAAA,GAAA7C,EAAAwE,UAAA3B,IAAA,UAAAA,GAAA,SAAAA,GAAA,GAAAA,GACA,GAAAA,EAEA,OAAA,EAEA,IACA7C,EAAA6C,GACA,MAAA4B,GACA,OAAA,EAEA,OAAA,IAKA,CACA5E,IAAA,YACA0C,MAAA,SAAA5B,EAAA+D,EAAAjD,GACA,OAAAiD,KAAApD,IACA,UAAAX,EACAA,GAAA,EACA,SAAAA,IACAA,GAAA,GAGA,UAAAc,EACAA,GAAA,EACA,SAAAA,IACAA,GAAA,GAGAH,EAAAoD,GAAAlD,KAAAb,EAAAc,MAOA,CACA5B,IAAA,UACA0C,MAAA,SAAAoC,GACA,IAAAnC,EAAAlC,KAEA,GAAAqE,aAAAC,MACA,OAAA,IAAAD,EAAAjF,QACAiF,EAAA,GAAAnC,EAAA+B,QAAAI,EAAA,IACAA,EAAA,aAAAC,QACAD,EAAA,GAAAnC,EAAA+B,QAAAI,EAAA,KAGAnC,EAAAqC,UAAAF,EAAA,GAAAA,EAAA,GAAAA,EAAA,KACA,IAAAA,EAAAjF,QACA8C,EAAA+B,QAAAI,EAAA,IAGA,GAAAnC,EAAAsC,gBAAAH,GAAA,CACA,IAAAI,EAAA/E,EAAA2E,GACAK,GAAA,EAQA,OANAD,EAAAE,GAAA,iCACAD,EAAAD,EAAAE,GAAA,YACAF,EAAAE,GAAA,6BACAD,EAAAD,EAAAG,OAGAF,EAEA,OAAAL,IAEA,CACA9E,IAAA,UACA0C,MAAA,WACA,IAAAC,EAAAlC,KAGAkC,EAAAC,QAAA0C,WACA3C,EAAAC,QAAA0C,UAAAzH,KAAA8E,GAIAA,EAAAG,WAAAyC,IAAA,uBAGA5C,EAAAC,QAAAC,aACAF,EAAAC,QAAAC,aAAAhF,KAAA8E,EAAAA,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,WAAA,GAEAL,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,UAAAwC,cAIA7C,EAAAG,WAAAL,iBAIAA,GAnNA,SAAAA,EAAAgD,EAAAC,IAhIA,SAAAC,EAAApG,GAAA,KAAAoG,aAAApG,GAAA,MAAA,IAAAqG,UAAA,qCAiIAC,CAAApF,KAAAgC,GAEA,IAAAE,EAAAlC,KAEAkC,EAAArC,WAAAA,IAEAqC,EAAAG,WAAA3C,EAAAsF,GAEA9C,EAAAmD,SAAA,CACA9C,SAAA,cACAU,cAAA,YACAqC,cAAA,IAGAlD,aAAA,KAGAO,OAAA,KACAkC,UAAA,KACAxB,QAAA,MAGAnB,EAAAC,QAAAxE,OAAA4H,OAAA,GAAArD,EAAAmD,SAAAJ,GAEA/C,EAAAQ,UAAA,EAAAlD,EAAAgG,UAAAtD,EAAAC,QAAAmD,cAAApD,EAAAQ,UAEAR,EAAAuD,OA8LA,SAAAC,EAAAC,EAAA,IAGA,YAAA,oBAAAC,YAAA,YAAApH,EAAAoH,cAAAD,aAAAC,YAAAD,GAAA,iBAAA,IAAAA,EAAA,YAAAnH,EAAAmH,KAAA,OAAAA,GAAA,IAAAA,EAAAE,UAAA,iBAAAF,EAAAG,YACAH,EAAA,CAAAA,IASA,IANA,IAAAxD,EAPA,EAQA4D,EAAAzB,MAAAlG,UAAA4H,MAAA5I,KAAA6I,UAAA,GACAC,EAAAP,EAAAvG,OACAyE,EAAA,EACAsC,OAAA,EAEAtC,EAAAqC,EAAArC,IAUA,GATA,iBAAA,IAAA1B,EAAA,YAAA3D,EAAA2D,UAAA,IAAAA,EACAwD,EAAA9B,GAAA7B,eAEA2D,EAAA9B,GAAA7B,aAAA,IAAAA,EAAA2D,EAAA9B,GAAA1B,IAEAwD,EAAA9B,GAAA7B,eAEAmE,EAAAR,EAAA9B,GAAA7B,aAAAG,GAAAiE,MAAAT,EAAA9B,GAAA7B,aAAA+D,SAEA,IAAAI,EACA,OAAAA,EAIA,OAAAR,EAEAD,EAAA9G,YAAAoD,EAEAvC,EAAAE,OAAAqC,aAAAA,EAEA,SAAAqE,IACA,IAAAN,EAAAE,WAAA,GACA3B,MAAAlG,UAAAmC,QAAAnD,KAAA2I,EAAA/F,MACA,IAAAsG,EAAAZ,EAAAU,MAAA3G,EAAAE,OAAAoG,GACA,MAAA,iBAAA,IAAAO,EAAA,YAAA9H,EAAA8H,IAAAA,EAAAtG,KAEAqG,EAAAzH,YAAA8G,EAAA9G,YAGA,IAAA2H,EAAA7G,EAAA8G,GAAAC,aACA/G,EAAA8G,GAAAC,aAAAJ,EACA3G,EAAA8G,GAAAC,aAAAC,WAAA,WAEA,OADAhH,EAAA8G,GAAAC,aAAAF,EACAvG,OAKA,SAAA/C,EAAAD,EAAAF,GAEA,aAwBA,SAAA6J,EAAAC,EAAAC,EAAAC,EAAAC,GAMA,IAAAC,EACAC,GAAA,EAEAC,EAAA,EAEA,SAAAC,IACAH,GACAI,aAAAJ,GAsBA,SAAAK,IACA,IAAAnF,EAAAlC,KACAsH,EAAAC,KAAAC,MAAAN,EACAnB,EAAAE,UAOA,SAAAwB,IACAP,EAAAK,KAAAC,MACAV,EAAAV,MAAAlE,EAAA6D,GAPAkB,IAkBAF,IAAAC,GAKAS,IAGAN,SAEAO,IAAAX,GAAAH,EAAAU,EAKAG,KACA,IAAAZ,IAYAG,EAAAW,WAAAZ,EAhCA,WACAC,OAAAU,GA+BAD,OAAAC,IAAAX,EAAAH,EAAAU,EAAAV,KAMA,MApEA,kBAAAC,IACAE,EAAAD,EACAA,EAAAD,EACAA,OAAAa,GA+DAL,EAAAO,OAxEA,WACAT,IACAF,GAAA,GAwEAI,EAjHA1J,OAAAC,eAAAZ,EAAA,aAAA,CACAiF,OAAA,IAuIAjF,EAAA2J,SAAAA,EACA3J,EAAAwI,SALA,SAAAoB,EAAAiB,EAAAf,GACA,YAAAY,IAAAZ,EAAAH,EAAAC,EAAAiB,GAAA,GAAAlB,EAAAC,EAAAE,GAAA,IAAAe,KAQA,SAAA5K,EAAAD,EAAAF,GAEA,cACA,SAAAgL,GAEA,IAAAC,EAGAA,EADA,oBAAApI,OACAA,YACA,IAAAmI,EACAA,EACA,oBAAA5F,KACAA,KAEA,GAGAjF,EAAAD,QAAA+K,IACA3K,KAAAJ,EAAAF,EAAA,KAIA,SAAAG,EAAAD,EAAAF,GAEA,aAGA,IAEAkL,EAFAxJ,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAL,UAAA,gBAAAO,GAKAqJ,EAAA,WACA,OAAAhI,KADA,GAIA,IAEAgI,EAAAA,GAAAC,SAAA,cAAAA,KAAA,EAAA/G,MAAA,QACA,MAAAnB,GAEA,YAAA,oBAAAJ,OAAA,YAAAnB,EAAAmB,WAAAqI,EAAArI,QAOA1C,EAAAD,QAAAgL","file":"conditionize.min.js","sourcesContent":["/*!\n * Name : Conditionize - jQuery conditions for forms\n * Version : 1.0.2\n * Author : nK <https://nkdev.info>\n * GitHub : https://github.com/nk-o/conditionize\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _throttleDebounce = __webpack_require__(2);\n\nvar _global = __webpack_require__(3);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar $ = _global.window.jQuery;\nvar instanceID = 0;\n\n// https://gist.github.com/aaditmshah/6683499\n/* eslint-disable */\nfunction Parser(e) {\n this.table = e;\n}Parser.prototype.parse = function (e) {\n for (var r = e.length, t = this.table, s = [], a = [], h = 0; r > h;) {\n var i = e[h++];switch (i) {case \"(\":\n a.unshift(i);break;case \")\":\n for (; a.length;) {\n var i = a.shift();if (\"(\" === i) break;s.push(i);\n }if (\"(\" !== i) throw new Error(\"Mismatched parentheses.\");break;default:\n if (t.hasOwnProperty(i)) {\n for (; a.length;) {\n var f = a[0];if (\"(\" === f) break;var n = t[i],\n o = n.precedence,\n c = t[f].precedence;if (o > c || o === c && \"right\" === n.associativity) break;s.push(a.shift());\n }a.unshift(i);\n } else s.push(i);}\n }for (; a.length;) {\n var i = a.shift();if (\"(\" === i) throw new Error(\"Mismatched parentheses.\");s.push(i);\n }return s;\n};\n/* eslint-enable */\n\nvar sortRelational = {\n precedence: 3,\n associativity: 'left'\n};\nvar sortEquality = {\n precedence: 2,\n associativity: 'left'\n};\n\n// available relations\nvar relations = {\n '==': {\n eval: function _eval(a, b) {\n return a == b; // eslint-disable-line\n },\n\n sort: sortEquality\n },\n '!=': {\n eval: function _eval(a, b) {\n return a != b; // eslint-disable-line\n },\n\n sort: sortEquality\n },\n '===': {\n eval: function _eval(a, b) {\n return a === b;\n },\n\n sort: sortEquality\n },\n '!==': {\n eval: function _eval(a, b) {\n return a !== b;\n },\n\n sort: sortEquality\n },\n '*=': {\n eval: function _eval(a, b) {\n return a.indexOf(b) !== -1;\n },\n\n sort: sortEquality\n },\n '<=': {\n eval: function _eval(a, b) {\n return a <= b;\n },\n\n sort: sortRelational\n },\n '>=': {\n eval: function _eval(a, b) {\n return a >= b;\n },\n\n sort: sortRelational\n },\n '<': {\n eval: function _eval(a, b) {\n return a < b;\n },\n\n sort: sortRelational\n },\n '>': {\n eval: function _eval(a, b) {\n return a > b;\n },\n\n sort: sortRelational\n },\n '&&': {\n eval: function _eval(a, b) {\n return a && b;\n },\n\n sort: {\n precedence: 1,\n associativity: 'right'\n }\n },\n '||': {\n eval: function _eval(a, b) {\n return a || b;\n },\n\n sort: {\n precedence: 0,\n associativity: 'right'\n }\n }\n};\n\n// Conditionize class\n\nvar Conditionize = function () {\n function Conditionize(container, userOptions) {\n _classCallCheck(this, Conditionize);\n\n var self = this;\n\n self.instanceID = instanceID++;\n\n self.$container = $(container);\n\n self.defaults = {\n selector: '[data-cond]',\n conditionAttr: 'data-cond',\n checkDebounce: 150,\n\n // custom toggle function\n customToggle: null, // function( $item, show ) { $item[ show ? 'show' : 'hide' ](); }\n\n // events\n onInit: null, // function() {}\n onDestroy: null, // function() {}\n onCheck: null // function( $item, show ) {}\n };\n\n self.options = Object.assign({}, self.defaults, userOptions);\n\n self.runCheck = (0, _throttleDebounce.debounce)(self.options.checkDebounce, self.runCheck);\n\n self.init();\n }\n\n _createClass(Conditionize, [{\n key: 'init',\n value: function init() {\n var self = this;\n\n // hide all controls by default\n if (self.options.customToggle) {\n self.options.customToggle.call(self, self.$container.find(self.options.selector), false);\n } else {\n self.$container.find(self.options.selector).hide();\n }\n\n // event listener\n self.$container.on('change.conditionize', 'input, select, textarea', function () {\n self.runCheck(self.$container.find(self.options.selector));\n });\n\n self.runCheck(self.$container.find(self.options.selector));\n\n // call onInit event\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n }\n }, {\n key: 'runCheck',\n value: function runCheck($items) {\n var self = this;\n\n $items.each(function () {\n var $this = $(this);\n var conditionString = $this.attr(self.options.conditionAttr).toString();\n var conditionResult = self.checkCondition(conditionString);\n\n if (self.options.customToggle) {\n self.options.customToggle.call(self, $this, conditionResult);\n } else {\n $this[conditionResult ? 'show' : 'hide']();\n }\n\n if (self.options.onCheck) {\n self.options.onCheck($this, conditionResult);\n }\n });\n }\n\n // parse condition\n\n }, {\n key: 'checkCondition',\n value: function checkCondition(str) {\n var self = this;\n var tokens = str.match(/[^\\s]+/g);\n var token = void 0;\n var parserRelations = {};\n\n Object.keys(relations).forEach(function (k) {\n parserRelations[k] = relations[k].sort;\n });\n\n var parser = new Parser(parserRelations);\n\n tokens = parser.parse(tokens);\n\n var stack = [];\n var index = 0;\n\n while (index < tokens.length) {\n token = tokens[index++];\n\n if (token in relations) {\n var b = stack.pop();\n var a = stack.pop();\n stack.push([a, token, b]);\n } else {\n stack.push(token);\n }\n }\n\n return self.compare(stack.length && stack[0]);\n }\n\n // check if is valid jquery selector\n\n }, {\n key: 'isValidSelector',\n value: function isValidSelector(selector) {\n if (typeof selector !== 'string' || $.isNumeric(selector) || selector === 'false' || selector === 'true' || selector == false // eslint-disable-line\n || selector == true // eslint-disable-line\n ) {\n return false;\n }\n try {\n $(selector);\n } catch (error) {\n return false;\n }\n return true;\n }\n\n // eval\n\n }, {\n key: 'condition',\n value: function condition(a, operator, b) {\n if (operator in relations) {\n if (a === 'false') {\n a = false;\n } else if (a === 'true') {\n a = true;\n }\n\n if (b === 'false') {\n b = false;\n } else if (b === 'true') {\n b = true;\n }\n\n return relations[operator].eval(a, b);\n }\n return false;\n }\n\n // compare items\n\n }, {\n key: 'compare',\n value: function compare(arr) {\n var self = this;\n\n if (arr instanceof Array) {\n if (arr.length === 3) {\n arr[0] = self.compare(arr[0]);\n if (arr[2] instanceof Array) {\n arr[2] = self.compare(arr[2]);\n }\n\n return self.condition(arr[0], arr[1], arr[2]);\n } else if (arr.length === 1) {\n return self.compare(arr[0]);\n }\n return false;\n } else if (self.isValidSelector(arr)) {\n var $listenTo = $(arr);\n var result = false;\n\n if ($listenTo.is('[type=radio], [type=checkbox]')) {\n result = $listenTo.is(':checked');\n } else if ($listenTo.is('textarea, select, input')) {\n result = $listenTo.val();\n }\n\n return result;\n }\n return arr;\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var self = this;\n\n // call onDestroy event\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n }\n\n // disable event.\n self.$container.off('change.conditionize');\n\n // show all controls\n if (self.options.customToggle) {\n self.options.customToggle.call(self, self.$container.find(self.options.selector), true);\n } else {\n self.$container.find(self.options.selector).show();\n }\n\n // delete Conditionize instance from container\n delete self.$container.Conditionize;\n }\n }]);\n\n return Conditionize;\n}();\n\n// global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && (typeof items === 'undefined' ? 'undefined' : _typeof(items)) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret = void 0;\n\n for (k; k < len; k++) {\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' || typeof options === 'undefined') {\n if (!items[k].Conditionize) {\n // eslint-disable-next-line new-cap\n items[k].Conditionize = new Conditionize(items[k], options);\n }\n } else if (items[k].Conditionize) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].Conditionize[options].apply(items[k].Conditionize, args);\n }\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\nplugin.constructor = Conditionize;\n\n_global.window.Conditionize = Conditionize;\n\nvar jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = plugin.apply(_global.window, args);\n return (typeof res === 'undefined' ? 'undefined' : _typeof(res)) !== 'object' ? res : this;\n};\njQueryPlugin.constructor = plugin.constructor;\n\n// no conflict\nvar oldJqPlugin = $.fn.conditionize;\n$.fn.conditionize = jQueryPlugin;\n$.fn.conditionize.noConflict = function () {\n $.fn.conditionize = oldJqPlugin;\n return this;\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nfunction throttle(delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n\n/* eslint-disable no-undefined */\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @return {Function} A new, debounced function.\n */\n\nfunction debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\nexports.throttle = throttle;\nexports.debounce = debounce;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar g;\n\n// This works in non-strict mode\ng = function () {\n\treturn this;\n}();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n/***/ })\n/******/ ]);"]}
|
1 |
+
{"version":3,"sources":["conditionize.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_typeof","Symbol","iterator","obj","constructor","_createClass","Constructor","protoProps","staticProps","defineProperties","target","props","length","descriptor","writable","key","_throttleDebounce","_global","$","window","jQuery","instanceID","Parser","e","this","table","parse","r","t","a","h","unshift","shift","push","Error","f","precedence","associativity","sortRelational","sortEquality","relations","==","eval","b","sort","!=","===","!==","*=","indexOf","<=",">=","<",">","&&","||","Conditionize","value","self","options","customToggle","$container","find","selector","hide","on","runCheck","onInit","$items","each","$this","conditionString","attr","conditionAttr","toString","conditionResult","checkCondition","onCheck","str","tokens","match","token","parserRelations","keys","forEach","k","stack","index","pop","compare","isNumeric","error","operator","arr","Array","condition","isValidSelector","$listenTo","result","is","val","onDestroy","off","show","container","userOptions","instance","TypeError","_classCallCheck","defaults","checkDebounce","assign","debounce","init","plugin","items","HTMLElement","nodeType","nodeName","args","slice","arguments","len","ret","apply","jQueryPlugin","res","oldJqPlugin","fn","conditionize","noConflict","throttle","delay","noTrailing","callback","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","elapsed","Date","now","exec","undefined","setTimeout","cancel","atBegin","global","win","g","Function"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAX,EAAAkB,EAAA,SAAAf,GACA,IAAAQ,EAAAR,GAAAA,EAAAgB,WACA,WAAA,OAAAhB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAQ,EAAAC,GAAA,OAAAR,OAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGArB,EAAAwB,EAAA,GAGAxB,EAAAA,EAAAyB,EAAA,GA9DA,CAiEA,CAEA,SAAAtB,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAD,EAAAF,GAEA,aAGA,IAAA0B,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAL,UAAA,gBAAAO,GAEAE,EAAA,SAAAC,EAAAC,EAAAC,GAAA,OAAAD,GAAAE,EAAAH,EAAAV,UAAAW,GAAAC,GAAAC,EAAAH,EAAAE,GAAAF,GAAA,SAAAG,EAAAC,EAAAC,GAAA,IAAA,IAAAjC,EAAA,EAAAA,EAAAiC,EAAAC,OAAAlC,IAAA,CAAA,IAAAmC,EAAAF,EAAAjC,GAAAmC,EAAAvB,WAAAuB,EAAAvB,aAAA,EAAAuB,EAAAxB,cAAA,EAAA,UAAAwB,IAAAA,EAAAC,UAAA,GAAA3B,OAAAC,eAAAsB,EAAAG,EAAAE,IAAAF,IAEA,IAAAG,EAAA1C,EAAA,GAEA2C,EAAA3C,EAAA,GAIA,IAAA4C,EAAAD,EAAAE,OAAAC,OACAC,EAAA,EAIA,SAAAC,EAAAC,GACAC,KAAAC,MAAAF,EACAD,EAAA1B,UAAA8B,MAAA,SAAAH,GACA,IAAA,IAAAI,EAAAJ,EAAAX,OAAAgB,EAAAJ,KAAAC,MAAA1B,EAAA,GAAA8B,EAAA,GAAAC,EAAA,EAAAA,EAAAH,GAAA,CACA,OAAAjD,EAAA6C,EAAAO,MAAA,IAAA,IACAD,EAAAE,QAAArD,GAAA,MAAA,IAAA,IACA,KAAAmD,EAAAjB,QAAA,CACA,GAAA,OAAAlC,EAAAmD,EAAAG,SAAA,MAAAjC,EAAAkC,KAAAvD,GACA,GAAA,MAAAA,EAAA,MAAA,IAAAwD,MAAA,2BAAA,MAAA,QACA,GAAAN,EAAA/B,eAAAnB,GAAA,CACA,KAAAmD,EAAAjB,QAAA,CACA,IAAAuB,EAAAN,EAAA,GAAA,GAAA,MAAAM,EAAA,MAAA,IAAA3C,EAAAoC,EAAAlD,GACAQ,EAAAM,EAAA4C,WACAtD,EAAA8C,EAAAO,GAAAC,WAAA,GAAAtD,EAAAI,GAAAA,IAAAJ,GAAA,UAAAU,EAAA6C,cAAA,MAAAtC,EAAAkC,KAAAJ,EAAAG,SACAH,EAAAE,QAAArD,QACAqB,EAAAkC,KAAAvD,IACA,KAAAmD,EAAAjB,QAAA,CACA,IAAAlC,EAAA,GAAA,OAAAA,EAAAmD,EAAAG,SAAA,MAAA,IAAAE,MAAA,2BAAAnC,EAAAkC,KAAAvD,GACA,OAAAqB,GAIA,IAAAuC,EAAA,CACAF,WAAA,EACAC,cAAA,QAEAE,EAAA,CACAH,WAAA,EACAC,cAAA,QAIAG,EAAA,CACAC,KAAA,CACAC,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAAL,GAEAM,KAAA,CACAH,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAAL,GAEAO,MAAA,CACAJ,KAAA,SAAAb,EAAAc,GACA,OAAAd,IAAAc,GAGAC,KAAAL,GAEAQ,MAAA,CACAL,KAAA,SAAAb,EAAAc,GACA,OAAAd,IAAAc,GAGAC,KAAAL,GAEAS,KAAA,CACAN,KAAA,SAAAb,EAAAc,GACA,OAAA,IAAAd,EAAAoB,QAAAN,IAGAC,KAAAL,GAEAW,KAAA,CACAR,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAAN,GAEAa,KAAA,CACAT,KAAA,SAAAb,EAAAc,GACA,OAAAA,GAAAd,GAGAe,KAAAN,GAEAc,IAAA,CACAV,KAAA,SAAAb,EAAAc,GACA,OAAAd,EAAAc,GAGAC,KAAAN,GAEAe,IAAA,CACAX,KAAA,SAAAb,EAAAc,GACA,OAAAA,EAAAd,GAGAe,KAAAN,GAEAgB,KAAA,CACAZ,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAA,CACAR,WAAA,EACAC,cAAA,UAGAkB,KAAA,CACAb,KAAA,SAAAb,EAAAc,GACA,OAAAd,GAAAc,GAGAC,KAAA,CACAR,WAAA,EACAC,cAAA,WAOAmB,GA+BAnD,EAAAmD,EAAA,CAAA,CACAzC,IAAA,OACA0C,MAAA,WACA,IAAAC,EAAAlC,KAGAkC,EAAAC,QAAAC,aACAF,EAAAC,QAAAC,aAAAhF,KAAA8E,EAAAA,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,WAAA,GAEAL,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,UAAAC,OAIAN,EAAAG,WAAAI,GAAA,sBAAA,0BAAA,WACAP,EAAAQ,SAAAR,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,aAGAL,EAAAQ,SAAAR,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,WAGAL,EAAAC,QAAAQ,QACAT,EAAAC,QAAAQ,OAAAvF,KAAA8E,KAGA,CACA3C,IAAA,WACA0C,MAAA,SAAAW,GACA,IAAAV,EAAAlC,KAEA4C,EAAAC,KAAA,WACA,IAAAC,EAAApD,EAAAM,MACA+C,EAAAD,EAAAE,KAAAd,EAAAC,QAAAc,eAAAC,WACAC,EAAAjB,EAAAkB,eAAAL,GAEAb,EAAAC,QAAAC,aACAF,EAAAC,QAAAC,aAAAhF,KAAA8E,EAAAY,EAAAK,GAEAL,EAAAK,EAAA,OAAA,UAGAjB,EAAAC,QAAAkB,SACAnB,EAAAC,QAAAkB,QAAAP,EAAAK,OAOA,CACA5D,IAAA,iBACA0C,MAAA,SAAAqB,GACA,IACAC,EAAAD,EAAAE,MAAA,WACAC,OAAA,EACAC,EAAA,GAEA/F,OAAAgG,KAAA3C,GAAA4C,QAAA,SAAAC,GACAH,EAAAG,GAAA7C,EAAA6C,GAAAzC,OAKAmC,EAFA,IAAAzD,EAAA4D,GAEAxD,MAAAqD,GAKA,IAHA,IAAAO,EAAA,GACAC,EAAA,EAEAA,EAAAR,EAAAnE,QAGA,IAFAqE,EAAAF,EAAAQ,QAEA/C,EAAA,CACA,IAAAG,EAAA2C,EAAAE,MACA3D,EAAAyD,EAAAE,MACAF,EAAArD,KAAA,CAAAJ,EAAAoD,EAAAtC,SAEA2C,EAAArD,KAAAgD,GAIA,OA5BAzD,KA4BAiE,QAAAH,EAAA1E,QAAA0E,EAAA,MAKA,CACAvE,IAAA,kBACA0C,MAAA,SAAAM,GACA,GAAA,iBAAAA,GAAA7C,EAAAwE,UAAA3B,IAAA,UAAAA,GAAA,SAAAA,GAAA,GAAAA,GACA,GAAAA,EAEA,OAAA,EAEA,IACA7C,EAAA6C,GACA,MAAA4B,GACA,OAAA,EAEA,OAAA,IAKA,CACA5E,IAAA,YACA0C,MAAA,SAAA5B,EAAA+D,EAAAjD,GACA,OAAAiD,KAAApD,IACA,UAAAX,EACAA,GAAA,EACA,SAAAA,IACAA,GAAA,GAGA,UAAAc,EACAA,GAAA,EACA,SAAAA,IACAA,GAAA,GAGAH,EAAAoD,GAAAlD,KAAAb,EAAAc,MAOA,CACA5B,IAAA,UACA0C,MAAA,SAAAoC,GACA,IAAAnC,EAAAlC,KAEA,GAAAqE,aAAAC,MACA,OAAA,IAAAD,EAAAjF,QACAiF,EAAA,GAAAnC,EAAA+B,QAAAI,EAAA,IACAA,EAAA,aAAAC,QACAD,EAAA,GAAAnC,EAAA+B,QAAAI,EAAA,KAGAnC,EAAAqC,UAAAF,EAAA,GAAAA,EAAA,GAAAA,EAAA,KACA,IAAAA,EAAAjF,QACA8C,EAAA+B,QAAAI,EAAA,IAGA,GAAAnC,EAAAsC,gBAAAH,GAAA,CACA,IAAAI,EAAA/E,EAAA2E,GACAK,GAAA,EAQA,OANAD,EAAAE,GAAA,iCACAD,EAAAD,EAAAE,GAAA,YACAF,EAAAE,GAAA,6BACAD,EAAAD,EAAAG,OAGAF,EAEA,OAAAL,IAEA,CACA9E,IAAA,UACA0C,MAAA,WACA,IAAAC,EAAAlC,KAGAkC,EAAAC,QAAA0C,WACA3C,EAAAC,QAAA0C,UAAAzH,KAAA8E,GAIAA,EAAAG,WAAAyC,IAAA,uBAGA5C,EAAAC,QAAAC,aACAF,EAAAC,QAAAC,aAAAhF,KAAA8E,EAAAA,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,WAAA,GAEAL,EAAAG,WAAAC,KAAAJ,EAAAC,QAAAI,UAAAwC,cAIA7C,EAAAG,WAAAL,iBAIAA,GAnNA,SAAAA,EAAAgD,EAAAC,IAhIA,SAAAC,EAAApG,GAAA,KAAAoG,aAAApG,GAAA,MAAA,IAAAqG,UAAA,qCAiIAC,CAAApF,KAAAgC,GAEA,IAAAE,EAAAlC,KAEAkC,EAAArC,WAAAA,IAEAqC,EAAAG,WAAA3C,EAAAsF,GAEA9C,EAAAmD,SAAA,CACA9C,SAAA,cACAU,cAAA,YACAqC,cAAA,IAGAlD,aAAA,KAGAO,OAAA,KACAkC,UAAA,KACAxB,QAAA,MAGAnB,EAAAC,QAAAxE,OAAA4H,OAAA,GAAArD,EAAAmD,SAAAJ,GAEA/C,EAAAQ,UAAA,EAAAlD,EAAAgG,UAAAtD,EAAAC,QAAAmD,cAAApD,EAAAQ,UAEAR,EAAAuD,OA8LA,SAAAC,EAAAC,EAAA,IAGA,YAAA,oBAAAC,YAAA,YAAApH,EAAAoH,cAAAD,aAAAC,YAAAD,GAAA,iBAAA,IAAAA,EAAA,YAAAnH,EAAAmH,KAAA,OAAAA,GAAA,IAAAA,EAAAE,UAAA,iBAAAF,EAAAG,YACAH,EAAA,CAAAA,IASA,IANA,IAAAxD,EAPA,EAQA4D,EAAAzB,MAAAlG,UAAA4H,MAAA5I,KAAA6I,UAAA,GACAC,EAAAP,EAAAvG,OACAyE,EAAA,EACAsC,OAAA,EAEAtC,EAAAqC,EAAArC,IAUA,GATA,iBAAA,IAAA1B,EAAA,YAAA3D,EAAA2D,UAAA,IAAAA,EACAwD,EAAA9B,GAAA7B,eAEA2D,EAAA9B,GAAA7B,aAAA,IAAAA,EAAA2D,EAAA9B,GAAA1B,IAEAwD,EAAA9B,GAAA7B,eAEAmE,EAAAR,EAAA9B,GAAA7B,aAAAG,GAAAiE,MAAAT,EAAA9B,GAAA7B,aAAA+D,SAEA,IAAAI,EACA,OAAAA,EAIA,OAAAR,EAEAD,EAAA9G,YAAAoD,EAEAvC,EAAAE,OAAAqC,aAAAA,EAEA,SAAAqE,IACA,IAAAN,EAAAE,WAAA,GACA3B,MAAAlG,UAAAmC,QAAAnD,KAAA2I,EAAA/F,MACA,IAAAsG,EAAAZ,EAAAU,MAAA3G,EAAAE,OAAAoG,GACA,MAAA,iBAAA,IAAAO,EAAA,YAAA9H,EAAA8H,IAAAA,EAAAtG,KAEAqG,EAAAzH,YAAA8G,EAAA9G,YAGA,IAAA2H,EAAA7G,EAAA8G,GAAAC,aACA/G,EAAA8G,GAAAC,aAAAJ,EACA3G,EAAA8G,GAAAC,aAAAC,WAAA,WAEA,OADAhH,EAAA8G,GAAAC,aAAAF,EACAvG,OAKA,SAAA/C,EAAAD,EAAAF,GAEA,aAwBA,SAAA6J,EAAAC,EAAAC,EAAAC,EAAAC,GAMA,IAAAC,EACAC,GAAA,EAEAC,EAAA,EAEA,SAAAC,IACAH,GACAI,aAAAJ,GAsBA,SAAAK,IACA,IAAAnF,EAAAlC,KACAsH,EAAAC,KAAAC,MAAAN,EACAnB,EAAAE,UAOA,SAAAwB,IACAP,EAAAK,KAAAC,MACAV,EAAAV,MAAAlE,EAAA6D,GAPAkB,IAkBAF,IAAAC,GAKAS,IAGAN,SAEAO,IAAAX,GAAAH,EAAAU,EAKAG,KACA,IAAAZ,IAYAG,EAAAW,WAAAZ,EAhCA,WACAC,OAAAU,GA+BAD,OAAAC,IAAAX,EAAAH,EAAAU,EAAAV,KAMA,MApEA,kBAAAC,IACAE,EAAAD,EACAA,EAAAD,EACAA,OAAAa,GA+DAL,EAAAO,OAxEA,WACAT,IACAF,GAAA,GAwEAI,EAjHA1J,OAAAC,eAAAZ,EAAA,aAAA,CACAiF,OAAA,IAuIAjF,EAAA2J,SAAAA,EACA3J,EAAAwI,SALA,SAAAoB,EAAAiB,EAAAf,GACA,YAAAY,IAAAZ,EAAAH,EAAAC,EAAAiB,GAAA,GAAAlB,EAAAC,EAAAE,GAAA,IAAAe,KAQA,SAAA5K,EAAAD,EAAAF,GAEA,cACA,SAAAgL,GAEA,IAAAC,EAGAA,EADA,oBAAApI,OACAA,YACA,IAAAmI,EACAA,EACA,oBAAA5F,KACAA,KAEA,GAGAjF,EAAAD,QAAA+K,IACA3K,KAAAJ,EAAAF,EAAA,KAIA,SAAAG,EAAAD,EAAAF,GAEA,aAGA,IAEAkL,EAFAxJ,EAAA,mBAAAC,QAAA,iBAAAA,OAAAC,SAAA,SAAAC,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAF,QAAAE,EAAAC,cAAAH,QAAAE,IAAAF,OAAAL,UAAA,gBAAAO,GAKAqJ,EAAA,WACA,OAAAhI,KADA,GAIA,IAEAgI,EAAAA,GAAAC,SAAA,cAAAA,KAAA,EAAA/G,MAAA,QACA,MAAAnB,GAEA,YAAA,oBAAAJ,OAAA,YAAAnB,EAAAmB,WAAAqI,EAAArI,QAOA1C,EAAAD,QAAAgL","file":"conditionize.min.js","sourcesContent":["/*!\n * Name : Conditionize - jQuery conditions for forms\n * Version : 1.0.2\n * Author : nK <https://nkdev.info>\n * GitHub : https://github.com/nk-o/conditionize\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _throttleDebounce = __webpack_require__(2);\n\nvar _global = __webpack_require__(3);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar $ = _global.window.jQuery;\nvar instanceID = 0;\n\n// https://gist.github.com/aaditmshah/6683499\n/* eslint-disable */\nfunction Parser(e) {\n this.table = e;\n}Parser.prototype.parse = function (e) {\n for (var r = e.length, t = this.table, s = [], a = [], h = 0; r > h;) {\n var i = e[h++];switch (i) {case \"(\":\n a.unshift(i);break;case \")\":\n for (; a.length;) {\n var i = a.shift();if (\"(\" === i) break;s.push(i);\n }if (\"(\" !== i) throw new Error(\"Mismatched parentheses.\");break;default:\n if (t.hasOwnProperty(i)) {\n for (; a.length;) {\n var f = a[0];if (\"(\" === f) break;var n = t[i],\n o = n.precedence,\n c = t[f].precedence;if (o > c || o === c && \"right\" === n.associativity) break;s.push(a.shift());\n }a.unshift(i);\n } else s.push(i);}\n }for (; a.length;) {\n var i = a.shift();if (\"(\" === i) throw new Error(\"Mismatched parentheses.\");s.push(i);\n }return s;\n};\n/* eslint-enable */\n\nvar sortRelational = {\n precedence: 3,\n associativity: 'left'\n};\nvar sortEquality = {\n precedence: 2,\n associativity: 'left'\n};\n\n// available relations\nvar relations = {\n '==': {\n eval: function _eval(a, b) {\n return a == b; // eslint-disable-line\n },\n\n sort: sortEquality\n },\n '!=': {\n eval: function _eval(a, b) {\n return a != b; // eslint-disable-line\n },\n\n sort: sortEquality\n },\n '===': {\n eval: function _eval(a, b) {\n return a === b;\n },\n\n sort: sortEquality\n },\n '!==': {\n eval: function _eval(a, b) {\n return a !== b;\n },\n\n sort: sortEquality\n },\n '*=': {\n eval: function _eval(a, b) {\n return a.indexOf(b) !== -1;\n },\n\n sort: sortEquality\n },\n '<=': {\n eval: function _eval(a, b) {\n return a <= b;\n },\n\n sort: sortRelational\n },\n '>=': {\n eval: function _eval(a, b) {\n return a >= b;\n },\n\n sort: sortRelational\n },\n '<': {\n eval: function _eval(a, b) {\n return a < b;\n },\n\n sort: sortRelational\n },\n '>': {\n eval: function _eval(a, b) {\n return a > b;\n },\n\n sort: sortRelational\n },\n '&&': {\n eval: function _eval(a, b) {\n return a && b;\n },\n\n sort: {\n precedence: 1,\n associativity: 'right'\n }\n },\n '||': {\n eval: function _eval(a, b) {\n return a || b;\n },\n\n sort: {\n precedence: 0,\n associativity: 'right'\n }\n }\n};\n\n// Conditionize class\n\nvar Conditionize = function () {\n function Conditionize(container, userOptions) {\n _classCallCheck(this, Conditionize);\n\n var self = this;\n\n self.instanceID = instanceID++;\n\n self.$container = $(container);\n\n self.defaults = {\n selector: '[data-cond]',\n conditionAttr: 'data-cond',\n checkDebounce: 150,\n\n // custom toggle function\n customToggle: null, // function( $item, show ) { $item[ show ? 'show' : 'hide' ](); }\n\n // events\n onInit: null, // function() {}\n onDestroy: null, // function() {}\n onCheck: null // function( $item, show ) {}\n };\n\n self.options = Object.assign({}, self.defaults, userOptions);\n\n self.runCheck = (0, _throttleDebounce.debounce)(self.options.checkDebounce, self.runCheck);\n\n self.init();\n }\n\n _createClass(Conditionize, [{\n key: 'init',\n value: function init() {\n var self = this;\n\n // hide all controls by default\n if (self.options.customToggle) {\n self.options.customToggle.call(self, self.$container.find(self.options.selector), false);\n } else {\n self.$container.find(self.options.selector).hide();\n }\n\n // event listener\n self.$container.on('change.conditionize', 'input, select, textarea', function () {\n self.runCheck(self.$container.find(self.options.selector));\n });\n\n self.runCheck(self.$container.find(self.options.selector));\n\n // call onInit event\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n }\n }, {\n key: 'runCheck',\n value: function runCheck($items) {\n var self = this;\n\n $items.each(function () {\n var $this = $(this);\n var conditionString = $this.attr(self.options.conditionAttr).toString();\n var conditionResult = self.checkCondition(conditionString);\n\n if (self.options.customToggle) {\n self.options.customToggle.call(self, $this, conditionResult);\n } else {\n $this[conditionResult ? 'show' : 'hide']();\n }\n\n if (self.options.onCheck) {\n self.options.onCheck($this, conditionResult);\n }\n });\n }\n\n // parse condition\n\n }, {\n key: 'checkCondition',\n value: function checkCondition(str) {\n var self = this;\n var tokens = str.match(/[^\\s]+/g);\n var token = void 0;\n var parserRelations = {};\n\n Object.keys(relations).forEach(function (k) {\n parserRelations[k] = relations[k].sort;\n });\n\n var parser = new Parser(parserRelations);\n\n tokens = parser.parse(tokens);\n\n var stack = [];\n var index = 0;\n\n while (index < tokens.length) {\n token = tokens[index++];\n\n if (token in relations) {\n var b = stack.pop();\n var a = stack.pop();\n stack.push([a, token, b]);\n } else {\n stack.push(token);\n }\n }\n\n return self.compare(stack.length && stack[0]);\n }\n\n // check if is valid jquery selector\n\n }, {\n key: 'isValidSelector',\n value: function isValidSelector(selector) {\n if (typeof selector !== 'string' || $.isNumeric(selector) || selector === 'false' || selector === 'true' || selector == false // eslint-disable-line\n || selector == true // eslint-disable-line\n ) {\n return false;\n }\n try {\n $(selector);\n } catch (error) {\n return false;\n }\n return true;\n }\n\n // eval\n\n }, {\n key: 'condition',\n value: function condition(a, operator, b) {\n if (operator in relations) {\n if (a === 'false') {\n a = false;\n } else if (a === 'true') {\n a = true;\n }\n\n if (b === 'false') {\n b = false;\n } else if (b === 'true') {\n b = true;\n }\n\n return relations[operator].eval(a, b);\n }\n return false;\n }\n\n // compare items\n\n }, {\n key: 'compare',\n value: function compare(arr) {\n var self = this;\n\n if (arr instanceof Array) {\n if (arr.length === 3) {\n arr[0] = self.compare(arr[0]);\n if (arr[2] instanceof Array) {\n arr[2] = self.compare(arr[2]);\n }\n\n return self.condition(arr[0], arr[1], arr[2]);\n } else if (arr.length === 1) {\n return self.compare(arr[0]);\n }\n return false;\n } else if (self.isValidSelector(arr)) {\n var $listenTo = $(arr);\n var result = false;\n\n if ($listenTo.is('[type=radio], [type=checkbox]')) {\n result = $listenTo.is(':checked');\n } else if ($listenTo.is('textarea, select, input')) {\n result = $listenTo.val();\n }\n\n return result;\n }\n return arr;\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var self = this;\n\n // call onDestroy event\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n }\n\n // disable event.\n self.$container.off('change.conditionize');\n\n // show all controls\n if (self.options.customToggle) {\n self.options.customToggle.call(self, self.$container.find(self.options.selector), true);\n } else {\n self.$container.find(self.options.selector).show();\n }\n\n // delete Conditionize instance from container\n delete self.$container.Conditionize;\n }\n }]);\n\n return Conditionize;\n}();\n\n// global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && (typeof items === 'undefined' ? 'undefined' : _typeof(items)) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret = void 0;\n\n for (k; k < len; k++) {\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' || typeof options === 'undefined') {\n if (!items[k].Conditionize) {\n // eslint-disable-next-line new-cap\n items[k].Conditionize = new Conditionize(items[k], options);\n }\n } else if (items[k].Conditionize) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].Conditionize[options].apply(items[k].Conditionize, args);\n }\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\nplugin.constructor = Conditionize;\n\n_global.window.Conditionize = Conditionize;\n\nvar jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = plugin.apply(_global.window, args);\n return (typeof res === 'undefined' ? 'undefined' : _typeof(res)) !== 'object' ? res : this;\n};\njQueryPlugin.constructor = plugin.constructor;\n\n// no conflict\nvar oldJqPlugin = $.fn.conditionize;\n$.fn.conditionize = jQueryPlugin;\n$.fn.conditionize.noConflict = function () {\n $.fn.conditionize = oldJqPlugin;\n return this;\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nfunction throttle(delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n\n/* eslint-disable no-undefined */\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @return {Function} A new, debounced function.\n */\n\nfunction debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\nexports.throttle = throttle;\nexports.debounce = debounce;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar g;\n\n// This works in non-strict mode\ng = function () {\n\treturn this;\n}();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n/***/ })\n/******/ ]);"]}
|
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.
|
6 |
* Author: nK
|
7 |
* Author URI: https://nkdev.info
|
8 |
* License: GPLv2 or later
|
@@ -23,21 +23,21 @@ class Visual_Portfolio {
|
|
23 |
/**
|
24 |
* The single class instance.
|
25 |
*
|
26 |
-
* @var $
|
27 |
*/
|
28 |
-
private static $
|
29 |
|
30 |
/**
|
31 |
* Main Instance
|
32 |
* Ensures only one instance of this class exists in memory at any one time.
|
33 |
*/
|
34 |
public static function instance() {
|
35 |
-
if ( is_null( self::$
|
36 |
-
self::$
|
37 |
-
self::$
|
38 |
-
self::$
|
39 |
}
|
40 |
-
return self::$
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -94,7 +94,7 @@ class Visual_Portfolio {
|
|
94 |
*/
|
95 |
public function init_options() {
|
96 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
97 |
-
$this->plugin_url
|
98 |
|
99 |
// load textdomain.
|
100 |
load_plugin_textdomain( 'visual-portfolio', false, basename( dirname( __FILE__ ) ) . '/languages' );
|
@@ -143,10 +143,10 @@ class Visual_Portfolio {
|
|
143 |
*/
|
144 |
public function admin_init() {
|
145 |
// get current plugin data.
|
146 |
-
$data
|
147 |
-
$this->plugin_name
|
148 |
-
$this->plugin_version
|
149 |
-
$this->plugin_slug
|
150 |
$this->plugin_name_sanitized = basename( __FILE__, '.php' );
|
151 |
}
|
152 |
|
@@ -154,13 +154,13 @@ class Visual_Portfolio {
|
|
154 |
* Add image sizes.
|
155 |
*/
|
156 |
public function add_image_sizes() {
|
157 |
-
$sm
|
158 |
-
$md
|
159 |
-
$lg
|
160 |
-
$xl
|
161 |
-
$sm_popup = Visual_Portfolio_Settings::get_option( 'sm_popup', 'vp_images', false ) ? : 500;
|
162 |
-
$md_popup = Visual_Portfolio_Settings::get_option( 'md_popup', 'vp_images', false ) ? : 800;
|
163 |
-
$xl_popup = Visual_Portfolio_Settings::get_option( 'xl_popup', 'vp_images', false ) ? : 1920;
|
164 |
|
165 |
// custom image sizes.
|
166 |
add_image_size( 'vp_sm', $sm, $sm );
|
@@ -183,7 +183,8 @@ class Visual_Portfolio {
|
|
183 |
*/
|
184 |
public function image_size_names_choose( $sizes ) {
|
185 |
return array_merge(
|
186 |
-
$sizes,
|
|
|
187 |
'vp_sm' => esc_html__( 'Small (VP)', 'visual-portfolio' ),
|
188 |
'vp_md' => esc_html__( 'Medium (VP)', 'visual-portfolio' ),
|
189 |
'vp_lg' => esc_html__( 'Large (VP)', 'visual-portfolio' ),
|
@@ -252,10 +253,10 @@ class Visual_Portfolio {
|
|
252 |
if ( file_exists( get_stylesheet_directory() . '/visual-portfolio/' . $template_name . '.css' ) ) {
|
253 |
// Child Theme (or just theme).
|
254 |
$template = trailingslashit( get_stylesheet_directory_uri() ) . 'visual-portfolio/' . $template_name . '.css';
|
255 |
-
}
|
256 |
-
// Parent Theme (
|
257 |
$template = trailingslashit( get_template_directory_uri() ) . 'visual-portfolio/' . $template_name . '.css';
|
258 |
-
}
|
259 |
// Default file in plugin folder.
|
260 |
$template = $this->plugin_url . 'templates/' . $template_name . '.css';
|
261 |
}
|
@@ -298,8 +299,8 @@ class Visual_Portfolio {
|
|
298 |
* @return array|bool|false|object
|
299 |
*/
|
300 |
public function get_oembed_data( $url, $width = null, $height = null ) {
|
301 |
-
$cache_name = 'vp_oembed_data_' . $url . ( $width ? : '' ) . ( $height ? : '' );
|
302 |
-
$cached
|
303 |
|
304 |
if ( $cached ) {
|
305 |
return $cached;
|
@@ -325,9 +326,9 @@ class Visual_Portfolio {
|
|
325 |
$args['width'] = $height * ( 1920 / 1080 );
|
326 |
}
|
327 |
|
328 |
-
$oembed
|
329 |
$provider = $oembed->get_provider( $url, $args );
|
330 |
-
$data
|
331 |
|
332 |
if ( $data ) {
|
333 |
$data = (array) $data;
|
2 |
/**
|
3 |
* Plugin Name: Visual Portfolio
|
4 |
* Description: Portfolio post type with visual editor
|
5 |
+
* Version: 1.16.0
|
6 |
* Author: nK
|
7 |
* Author URI: https://nkdev.info
|
8 |
* License: GPLv2 or later
|
23 |
/**
|
24 |
* The single class instance.
|
25 |
*
|
26 |
+
* @var $instance
|
27 |
*/
|
28 |
+
private static $instance = null;
|
29 |
|
30 |
/**
|
31 |
* Main Instance
|
32 |
* Ensures only one instance of this class exists in memory at any one time.
|
33 |
*/
|
34 |
public static function instance() {
|
35 |
+
if ( is_null( self::$instance ) ) {
|
36 |
+
self::$instance = new self();
|
37 |
+
self::$instance->init_options();
|
38 |
+
self::$instance->init_hooks();
|
39 |
}
|
40 |
+
return self::$instance;
|
41 |
}
|
42 |
|
43 |
/**
|
94 |
*/
|
95 |
public function init_options() {
|
96 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
97 |
+
$this->plugin_url = plugin_dir_url( __FILE__ );
|
98 |
|
99 |
// load textdomain.
|
100 |
load_plugin_textdomain( 'visual-portfolio', false, basename( dirname( __FILE__ ) ) . '/languages' );
|
143 |
*/
|
144 |
public function admin_init() {
|
145 |
// get current plugin data.
|
146 |
+
$data = get_plugin_data( __FILE__ );
|
147 |
+
$this->plugin_name = $data['Name'];
|
148 |
+
$this->plugin_version = $data['Version'];
|
149 |
+
$this->plugin_slug = plugin_basename( __FILE__, '.php' );
|
150 |
$this->plugin_name_sanitized = basename( __FILE__, '.php' );
|
151 |
}
|
152 |
|
154 |
* Add image sizes.
|
155 |
*/
|
156 |
public function add_image_sizes() {
|
157 |
+
$sm = Visual_Portfolio_Settings::get_option( 'sm', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'sm', 'vp_images', false ) : 500;
|
158 |
+
$md = Visual_Portfolio_Settings::get_option( 'md', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'md', 'vp_images', false ) : 800;
|
159 |
+
$lg = Visual_Portfolio_Settings::get_option( 'lg', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'lg', 'vp_images', false ) : 1280;
|
160 |
+
$xl = Visual_Portfolio_Settings::get_option( 'xl', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'xl', 'vp_images', false ) : 1920;
|
161 |
+
$sm_popup = Visual_Portfolio_Settings::get_option( 'sm_popup', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'sm_popup', 'vp_images', false ) : 500;
|
162 |
+
$md_popup = Visual_Portfolio_Settings::get_option( 'md_popup', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'md_popup', 'vp_images', false ) : 800;
|
163 |
+
$xl_popup = Visual_Portfolio_Settings::get_option( 'xl_popup', 'vp_images', false ) ? Visual_Portfolio_Settings::get_option( 'xl_popup', 'vp_images', false ) : 1920;
|
164 |
|
165 |
// custom image sizes.
|
166 |
add_image_size( 'vp_sm', $sm, $sm );
|
183 |
*/
|
184 |
public function image_size_names_choose( $sizes ) {
|
185 |
return array_merge(
|
186 |
+
$sizes,
|
187 |
+
array(
|
188 |
'vp_sm' => esc_html__( 'Small (VP)', 'visual-portfolio' ),
|
189 |
'vp_md' => esc_html__( 'Medium (VP)', 'visual-portfolio' ),
|
190 |
'vp_lg' => esc_html__( 'Large (VP)', 'visual-portfolio' ),
|
253 |
if ( file_exists( get_stylesheet_directory() . '/visual-portfolio/' . $template_name . '.css' ) ) {
|
254 |
// Child Theme (or just theme).
|
255 |
$template = trailingslashit( get_stylesheet_directory_uri() ) . 'visual-portfolio/' . $template_name . '.css';
|
256 |
+
} elseif ( file_exists( get_template_directory() . '/visual-portfolio/' . $template_name . '.css' ) ) {
|
257 |
+
// Parent Theme (when parent exists).
|
258 |
$template = trailingslashit( get_template_directory_uri() ) . 'visual-portfolio/' . $template_name . '.css';
|
259 |
+
} elseif ( file_exists( $this->plugin_path . 'templates/' . $template_name . '.css' ) ) {
|
260 |
// Default file in plugin folder.
|
261 |
$template = $this->plugin_url . 'templates/' . $template_name . '.css';
|
262 |
}
|
299 |
* @return array|bool|false|object
|
300 |
*/
|
301 |
public function get_oembed_data( $url, $width = null, $height = null ) {
|
302 |
+
$cache_name = 'vp_oembed_data_' . $url . ( $width ? $width : '' ) . ( $height ? $height : '' );
|
303 |
+
$cached = get_transient( $cache_name );
|
304 |
|
305 |
if ( $cached ) {
|
306 |
return $cached;
|
326 |
$args['width'] = $height * ( 1920 / 1080 );
|
327 |
}
|
328 |
|
329 |
+
$oembed = _wp_oembed_get_object();
|
330 |
$provider = $oembed->get_provider( $url, $args );
|
331 |
+
$data = $oembed->fetch( $provider, $url, $args );
|
332 |
|
333 |
if ( $data ) {
|
334 |
$data = (array) $data;
|
classes/class-admin.php
CHANGED
@@ -65,6 +65,8 @@ class Visual_Portfolio_Admin {
|
|
65 |
add_action( 'wp_ajax_vp_find_posts', array( $this, 'ajax_find_posts' ) );
|
66 |
add_action( 'wp_ajax_vp_find_taxonomies', array( $this, 'ajax_find_taxonomies' ) );
|
67 |
add_action( 'wp_ajax_vp_find_oembed', array( $this, 'ajax_find_oembed' ) );
|
|
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
@@ -76,7 +78,7 @@ class Visual_Portfolio_Admin {
|
|
76 |
);
|
77 |
|
78 |
if ( 'vp_lists' === get_post_type() ) {
|
79 |
-
$main_classname
|
80 |
$data_init['classnames'] = array(
|
81 |
$main_classname,
|
82 |
$main_classname . ' .vp-portfolio__items',
|
@@ -84,7 +86,8 @@ class Visual_Portfolio_Admin {
|
|
84 |
$main_classname . ' .vp-filter',
|
85 |
$main_classname . ' .vp-pagination',
|
86 |
);
|
87 |
-
|
|
|
88 |
/* translators: %d: error count */
|
89 |
'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1, 'visual-portfolio' ),
|
90 |
/* translators: %d: error count */
|
@@ -117,7 +120,7 @@ class Visual_Portfolio_Admin {
|
|
117 |
wp_enqueue_script( 'tooltip.js', visual_portfolio()->plugin_url . 'assets/vendor/popper.js/tooltip.min.js', array( 'popper.js' ), '1.14.3', true );
|
118 |
wp_enqueue_style( 'popper.js', visual_portfolio()->plugin_url . 'assets/vendor/popper.js/popper.css', '', '1.14.3' );
|
119 |
|
120 |
-
wp_enqueue_script( 'clipboard.js', visual_portfolio()->plugin_url . 'assets/vendor/clipboard.js/clipboard.min.js', '', '2.0.4' );
|
121 |
|
122 |
$codemirror_version = '5.45.0';
|
123 |
wp_enqueue_script( 'codemirror', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/codemirror.js', '', $codemirror_version, true );
|
@@ -151,13 +154,13 @@ class Visual_Portfolio_Admin {
|
|
151 |
wp_enqueue_style( 'codemirror-addon-matchesonscrollbar', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/addon/search/matchesonscrollbar.css', '', $codemirror_version );
|
152 |
wp_enqueue_style( 'codemirror-theme-eclipse', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/theme/eclipse.css', '', $codemirror_version );
|
153 |
|
154 |
-
wp_enqueue_script( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/js/layouts-editor.min.js', array( 'jquery' ), '1.
|
155 |
-
wp_enqueue_style( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/css/layouts-editor.min.css', '', '1.
|
156 |
wp_localize_script( 'visual-portfolio-layout-admin', 'VPAdminVariables', $data_init );
|
157 |
}
|
158 |
|
159 |
-
wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '1.
|
160 |
-
wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '1.
|
161 |
wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
|
162 |
}
|
163 |
|
@@ -169,7 +172,8 @@ class Visual_Portfolio_Admin {
|
|
169 |
'visual-portfolio-gutenberg',
|
170 |
plugins_url( '../assets/admin/js/gutenberg-block.min.js', __FILE__ ),
|
171 |
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
|
172 |
-
filemtime( plugin_dir_path( __FILE__ ) . '../assets/admin/js/gutenberg-block.min.js' )
|
|
|
173 |
);
|
174 |
|
175 |
wp_enqueue_style(
|
@@ -190,42 +194,42 @@ class Visual_Portfolio_Admin {
|
|
190 |
register_post_type(
|
191 |
'portfolio',
|
192 |
array(
|
193 |
-
'labels'
|
194 |
-
'name'
|
195 |
-
'singular_name'
|
196 |
-
'menu_name'
|
197 |
-
'parent_item_colon'
|
198 |
-
'all_items'
|
199 |
-
'view_item'
|
200 |
-
'add_new_item'
|
201 |
-
'add_new'
|
202 |
-
'edit_item'
|
203 |
-
'update_item'
|
204 |
-
'search_items'
|
205 |
-
'not_found'
|
206 |
-
'not_found_in_trash'
|
207 |
-
),
|
208 |
-
'public'
|
209 |
'publicly_queryable' => true,
|
210 |
-
'has_archive'
|
211 |
-
'show_ui'
|
212 |
|
213 |
// adding to custom menu manually.
|
214 |
-
'show_in_menu'
|
215 |
-
'show_in_admin_bar'
|
216 |
-
'show_in_rest'
|
217 |
-
'menu_icon'
|
218 |
-
'taxonomies'
|
219 |
'portfolio_category',
|
220 |
'portfolio_tag',
|
221 |
),
|
222 |
-
'map_meta_cap'
|
223 |
-
'capability_type'
|
224 |
-
'rewrite'
|
225 |
-
'slug'
|
226 |
'with_front' => false,
|
227 |
),
|
228 |
-
'supports'
|
229 |
'title',
|
230 |
'editor',
|
231 |
'author',
|
@@ -239,39 +243,43 @@ class Visual_Portfolio_Admin {
|
|
239 |
);
|
240 |
|
241 |
register_taxonomy(
|
242 |
-
'portfolio_category',
|
243 |
-
|
244 |
-
|
|
|
|
|
245 |
'menu_name' => esc_html__( 'Categories', 'visual-portfolio' ),
|
246 |
),
|
247 |
-
'rewrite'
|
248 |
'slug' => 'portfolio-category',
|
249 |
),
|
250 |
-
'hierarchical'
|
251 |
-
'
|
252 |
-
'
|
253 |
-
'show_in_rest'
|
254 |
'show_admin_column' => true,
|
255 |
-
'map_meta_cap'
|
256 |
-
'capability_type'
|
257 |
)
|
258 |
);
|
259 |
register_taxonomy(
|
260 |
-
'portfolio_tag',
|
261 |
-
|
262 |
-
|
|
|
|
|
263 |
'menu_name' => esc_html__( 'Tags', 'visual-portfolio' ),
|
264 |
),
|
265 |
-
'rewrite'
|
266 |
'slug' => 'portfolio-tag',
|
267 |
),
|
268 |
-
'hierarchical'
|
269 |
-
'
|
270 |
-
'
|
271 |
-
'show_in_rest'
|
272 |
'show_admin_column' => true,
|
273 |
-
'map_meta_cap'
|
274 |
-
'capability_type'
|
275 |
)
|
276 |
);
|
277 |
|
@@ -279,32 +287,32 @@ class Visual_Portfolio_Admin {
|
|
279 |
register_post_type(
|
280 |
'vp_lists',
|
281 |
array(
|
282 |
-
'labels'
|
283 |
-
'name'
|
284 |
-
'singular_name'
|
285 |
-
'menu_name'
|
286 |
-
'parent_item_colon'
|
287 |
-
'all_items'
|
288 |
-
'view_item'
|
289 |
-
'add_new_item'
|
290 |
-
'add_new'
|
291 |
-
'edit_item'
|
292 |
-
'update_item'
|
293 |
-
'search_items'
|
294 |
-
'not_found'
|
295 |
-
'not_found_in_trash'
|
296 |
-
),
|
297 |
-
'public'
|
298 |
-
'has_archive'
|
299 |
-
'show_ui'
|
300 |
|
301 |
// adding to custom menu manually.
|
302 |
-
'show_in_menu'
|
303 |
-
'show_in_rest'
|
304 |
-
'map_meta_cap'
|
305 |
'capability_type' => 'vp_list',
|
306 |
-
'rewrite'
|
307 |
-
'supports'
|
308 |
'title',
|
309 |
'revisions',
|
310 |
),
|
@@ -328,7 +336,7 @@ class Visual_Portfolio_Admin {
|
|
328 |
|
329 |
foreach ( $taxonomies as $taxonomy_slug ) {
|
330 |
// Retrieve taxonomy data.
|
331 |
-
$taxonomy_obj
|
332 |
$taxonomy_name = $taxonomy_obj->labels->name;
|
333 |
|
334 |
// Retrieve taxonomy terms.
|
@@ -394,7 +402,7 @@ class Visual_Portfolio_Admin {
|
|
394 |
public function add_video_format_metabox( $post ) {
|
395 |
wp_nonce_field( basename( __FILE__ ), 'vp_format_video_nonce' );
|
396 |
|
397 |
-
$video_url
|
398 |
$oembed_html = false;
|
399 |
|
400 |
$wpkses_iframe = array(
|
@@ -474,7 +482,7 @@ class Visual_Portfolio_Admin {
|
|
474 |
if ( ! is_blog_installed() ) {
|
475 |
return;
|
476 |
}
|
477 |
-
if ( get_option( 'visual_portfolio_updated_caps' ) === '1.
|
478 |
return;
|
479 |
}
|
480 |
|
@@ -551,7 +559,7 @@ class Visual_Portfolio_Admin {
|
|
551 |
$wp_roles->add_cap( 'administrator', $cap );
|
552 |
}
|
553 |
|
554 |
-
update_option( 'visual_portfolio_updated_caps', '1.
|
555 |
}
|
556 |
|
557 |
/**
|
@@ -562,7 +570,7 @@ class Visual_Portfolio_Admin {
|
|
562 |
public function maybe_render_blank_state( $which ) {
|
563 |
global $post_type;
|
564 |
|
565 |
-
if ( in_array( $post_type, array( 'vp_lists' ) ) && 'bottom' === $which ) {
|
566 |
$counts = (array) wp_count_posts( $post_type );
|
567 |
unset( $counts['auto-draft'] );
|
568 |
$count = array_sum( $counts );
|
@@ -700,7 +708,6 @@ class Visual_Portfolio_Admin {
|
|
700 |
$vp_query = get_posts(
|
701 |
array(
|
702 |
'post_type' => 'vp_lists',
|
703 |
-
// phpcs:ignore
|
704 |
'posts_per_page' => -1,
|
705 |
'showposts' => -1,
|
706 |
'paged' => -1,
|
@@ -766,7 +773,7 @@ class Visual_Portfolio_Admin {
|
|
766 |
array(
|
767 |
// Tiles.
|
768 |
'tiles' => array(
|
769 |
-
'title'
|
770 |
'controls' => array(
|
771 |
/**
|
772 |
* Tile type:
|
@@ -780,122 +787,123 @@ class Visual_Portfolio_Admin {
|
|
780 |
* Second item 200% width and 25% height
|
781 |
*/
|
782 |
array(
|
783 |
-
'type'
|
784 |
-
'label'
|
785 |
'placeholder' => esc_html__( 'Select tiles type', 'visual-portfolio' ),
|
786 |
-
'name'
|
787 |
-
'default'
|
788 |
-
'options'
|
789 |
array(
|
790 |
array(
|
791 |
-
'url'
|
792 |
'value' => '1|1,0.5|',
|
793 |
),
|
794 |
array(
|
795 |
-
'url'
|
796 |
'value' => '2|1,1|',
|
797 |
),
|
798 |
array(
|
799 |
-
'url'
|
800 |
'value' => '2|1,0.8|',
|
801 |
),
|
802 |
array(
|
803 |
-
'url'
|
804 |
'value' => '2|1,1.34|',
|
805 |
),
|
806 |
array(
|
807 |
-
'url'
|
808 |
'value' => '2|1,1.2|1,1.2|1,0.67|1,0.67|',
|
809 |
),
|
810 |
array(
|
811 |
-
'url'
|
812 |
'value' => '2|1,1.2|1,0.67|1,1.2|1,0.67|',
|
813 |
),
|
814 |
array(
|
815 |
-
'url'
|
816 |
'value' => '2|1,0.67|1,1|1,1|1,1|1,1|1,0.67|',
|
817 |
),
|
818 |
array(
|
819 |
-
'url'
|
820 |
'value' => '3|1,1|',
|
821 |
),
|
822 |
array(
|
823 |
-
'url'
|
824 |
'value' => '3|1,0.8|',
|
825 |
),
|
826 |
array(
|
827 |
-
'url'
|
828 |
'value' => '3|1,1.3|',
|
829 |
),
|
830 |
array(
|
831 |
-
'url'
|
832 |
'value' => '3|1,1|1,1|1,1|1,1.3|1,1.3|1,1.3|',
|
833 |
),
|
834 |
array(
|
835 |
-
'url'
|
836 |
'value' => '3|1,1|1,1|1,2|1,1|1,1|1,1|1,1|1,1|',
|
837 |
),
|
838 |
array(
|
839 |
-
'url'
|
840 |
'value' => '3|1,2|1,1|1,1|1,1|1,1|1,1|1,1|1,1|',
|
841 |
),
|
842 |
array(
|
843 |
-
'url'
|
844 |
'value' => '3|1,1|1,2|1,1|1,1|1,1|1,1|1,1|1,1|',
|
845 |
),
|
846 |
array(
|
847 |
-
'url'
|
848 |
'value' => '3|1,1|1,2|1,1|1,1|1,1|1,1|2,0.5|',
|
849 |
),
|
850 |
array(
|
851 |
-
'url'
|
852 |
'value' => '3|1,0.8|1,1.6|1,0.8|1,0.8|1,1.6|1,0.8|1,0.8|1,0.8|1,0.8|1,0.8|',
|
853 |
),
|
854 |
array(
|
855 |
-
'url'
|
856 |
'value' => '3|1,0.8|1,1.6|1,0.8|1,0.8|1,1.6|1,1.6|1,0.8|1,0.8|1,0.8|',
|
857 |
),
|
858 |
array(
|
859 |
-
'url'
|
860 |
'value' => '3|1,0.8|1,0.8|1,1.6|1,0.8|1,0.8|1,1.6|1,1.6|1,0.8|1,0.8|',
|
861 |
),
|
862 |
array(
|
863 |
-
'url'
|
864 |
'value' => '3|1,0.8|1,0.8|1,1.6|1,0.8|1,0.8|1,0.8|1,1.6|1,1.6|1,0.8|',
|
865 |
),
|
866 |
array(
|
867 |
-
'url'
|
868 |
'value' => '3|1,1|2,1|1,1|2,0.5|1,1|',
|
869 |
),
|
870 |
array(
|
871 |
-
'url'
|
872 |
'value' => '3|1,1|2,1|1,1|1,1|1,1|1,1|2,0.5|1,1|',
|
873 |
),
|
874 |
array(
|
875 |
-
'url'
|
876 |
'value' => '3|1,2|2,0.5|1,1|1,2|2,0.5|',
|
877 |
),
|
878 |
array(
|
879 |
-
'url'
|
880 |
'value' => '4|1,1|',
|
881 |
),
|
882 |
array(
|
883 |
-
'url'
|
884 |
'value' => '4|1,1|1,1.34|1,1|1,1.34|1,1.34|1,1.34|1,1|1,1|',
|
885 |
),
|
886 |
array(
|
887 |
-
'url'
|
888 |
'value' => '4|1,0.8|1,1|1,0.8|1,1|1,1|1,1|1,0.8|1,0.8|',
|
889 |
),
|
890 |
array(
|
891 |
-
'url'
|
892 |
'value' => '4|1,1|1,1|2,1|1,1|1,1|2,1|1,1|1,1|1,1|1,1|',
|
893 |
),
|
894 |
array(
|
895 |
-
'url'
|
896 |
'value' => '4|2,1|2,0.5|2,0.5|2,0.5|2,1|2,0.5|',
|
897 |
),
|
898 |
-
),
|
|
|
899 |
),
|
900 |
),
|
901 |
),
|
@@ -903,14 +911,14 @@ class Visual_Portfolio_Admin {
|
|
903 |
|
904 |
// Masonry.
|
905 |
'masonry' => array(
|
906 |
-
'title'
|
907 |
'controls' => array(
|
908 |
array(
|
909 |
-
'type'
|
910 |
-
'label'
|
911 |
-
'name'
|
912 |
-
'min'
|
913 |
-
'max'
|
914 |
'default' => 3,
|
915 |
),
|
916 |
),
|
@@ -918,14 +926,14 @@ class Visual_Portfolio_Admin {
|
|
918 |
|
919 |
// Grid.
|
920 |
'grid' => array(
|
921 |
-
'title'
|
922 |
'controls' => array(
|
923 |
array(
|
924 |
-
'type'
|
925 |
-
'label'
|
926 |
-
'name'
|
927 |
-
'min'
|
928 |
-
'max'
|
929 |
'default' => 3,
|
930 |
),
|
931 |
),
|
@@ -933,23 +941,23 @@ class Visual_Portfolio_Admin {
|
|
933 |
|
934 |
// Justified.
|
935 |
'justified' => array(
|
936 |
-
'title'
|
937 |
'controls' => array(
|
938 |
array(
|
939 |
-
'type'
|
940 |
-
'label'
|
941 |
-
'name'
|
942 |
-
'min'
|
943 |
-
'max'
|
944 |
'default' => 200,
|
945 |
),
|
946 |
array(
|
947 |
-
'type'
|
948 |
-
'label'
|
949 |
-
'name'
|
950 |
-
'min'
|
951 |
-
'max'
|
952 |
-
'step'
|
953 |
'default' => 0.25,
|
954 |
),
|
955 |
),
|
@@ -957,7 +965,7 @@ class Visual_Portfolio_Admin {
|
|
957 |
|
958 |
// Slider.
|
959 |
'slider' => array(
|
960 |
-
'title'
|
961 |
'controls' => array(
|
962 |
array(
|
963 |
'type' => 'select2',
|
@@ -971,53 +979,53 @@ class Visual_Portfolio_Admin {
|
|
971 |
),
|
972 |
),
|
973 |
array(
|
974 |
-
'type'
|
975 |
-
'label'
|
976 |
-
'name'
|
977 |
-
'min'
|
978 |
-
'max'
|
979 |
-
'step'
|
980 |
'default' => 0.3,
|
981 |
),
|
982 |
array(
|
983 |
-
'type'
|
984 |
-
'label'
|
985 |
-
'name'
|
986 |
-
'min'
|
987 |
-
'max'
|
988 |
-
'step'
|
989 |
'default' => 6,
|
990 |
),
|
991 |
array(
|
992 |
-
'type'
|
993 |
-
'label'
|
994 |
-
'name'
|
995 |
-
'default'
|
996 |
'condition' => array(
|
997 |
array(
|
998 |
-
'control'
|
999 |
'operator' => '>',
|
1000 |
-
'value'
|
1001 |
),
|
1002 |
),
|
1003 |
),
|
1004 |
array(
|
1005 |
-
'type'
|
1006 |
-
'label'
|
1007 |
-
'name'
|
1008 |
-
'default'
|
1009 |
-
'options'
|
1010 |
-
'auto'
|
1011 |
-
'static'
|
1012 |
-
'dynamic'
|
1013 |
),
|
1014 |
),
|
1015 |
array(
|
1016 |
-
'type'
|
1017 |
-
'name'
|
1018 |
-
'min'
|
1019 |
-
'max'
|
1020 |
-
'default'
|
1021 |
'condition' => array(
|
1022 |
array(
|
1023 |
'control' => 'items_height_type',
|
@@ -1027,11 +1035,11 @@ class Visual_Portfolio_Admin {
|
|
1027 |
),
|
1028 |
),
|
1029 |
array(
|
1030 |
-
'type'
|
1031 |
-
'name'
|
1032 |
-
'min'
|
1033 |
-
'max'
|
1034 |
-
'default'
|
1035 |
'condition' => array(
|
1036 |
array(
|
1037 |
'control' => 'items_height_type',
|
@@ -1056,19 +1064,19 @@ class Visual_Portfolio_Admin {
|
|
1056 |
),
|
1057 |
),
|
1058 |
array(
|
1059 |
-
'type'
|
1060 |
-
'label'
|
1061 |
-
'name'
|
1062 |
-
'default'
|
1063 |
-
'options'
|
1064 |
'auto' => esc_html__( 'Auto', 'visual-portfolio' ),
|
1065 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
1066 |
),
|
1067 |
'condition' => array(
|
1068 |
array(
|
1069 |
-
'control'
|
1070 |
'operator' => '!=',
|
1071 |
-
'value'
|
1072 |
),
|
1073 |
),
|
1074 |
),
|
@@ -1092,15 +1100,15 @@ class Visual_Portfolio_Admin {
|
|
1092 |
),
|
1093 |
),
|
1094 |
array(
|
1095 |
-
'type'
|
1096 |
-
'label'
|
1097 |
-
'name'
|
1098 |
-
'default'
|
1099 |
'condition' => array(
|
1100 |
array(
|
1101 |
-
'control'
|
1102 |
'operator' => '!=',
|
1103 |
-
'value'
|
1104 |
),
|
1105 |
),
|
1106 |
),
|
@@ -1117,10 +1125,10 @@ class Visual_Portfolio_Admin {
|
|
1117 |
'default' => false,
|
1118 |
),
|
1119 |
array(
|
1120 |
-
'type'
|
1121 |
-
'label'
|
1122 |
-
'name'
|
1123 |
-
'default'
|
1124 |
'condition' => array(
|
1125 |
array(
|
1126 |
'control' => 'free_mode',
|
@@ -1166,10 +1174,10 @@ class Visual_Portfolio_Admin {
|
|
1166 |
'default' => false,
|
1167 |
),
|
1168 |
array(
|
1169 |
-
'type'
|
1170 |
-
'label'
|
1171 |
-
'name'
|
1172 |
-
'default'
|
1173 |
'condition' => array(
|
1174 |
array(
|
1175 |
'control' => 'bullets',
|
@@ -1189,43 +1197,43 @@ class Visual_Portfolio_Admin {
|
|
1189 |
'default' => false,
|
1190 |
),
|
1191 |
array(
|
1192 |
-
'type'
|
1193 |
-
'label'
|
1194 |
-
'name'
|
1195 |
-
'default'
|
1196 |
-
'min'
|
1197 |
-
'max'
|
1198 |
'condition' => array(
|
1199 |
array(
|
1200 |
-
'control'
|
1201 |
),
|
1202 |
),
|
1203 |
),
|
1204 |
array(
|
1205 |
-
'type'
|
1206 |
-
'label'
|
1207 |
-
'name'
|
1208 |
-
'default'
|
1209 |
-
'options'
|
1210 |
-
'auto'
|
1211 |
-
'static'
|
1212 |
-
'dynamic'
|
1213 |
),
|
1214 |
'condition' => array(
|
1215 |
array(
|
1216 |
-
'control'
|
1217 |
),
|
1218 |
),
|
1219 |
),
|
1220 |
array(
|
1221 |
-
'type'
|
1222 |
-
'name'
|
1223 |
-
'min'
|
1224 |
-
'max'
|
1225 |
-
'default'
|
1226 |
'condition' => array(
|
1227 |
array(
|
1228 |
-
'control'
|
1229 |
),
|
1230 |
array(
|
1231 |
'control' => 'thumbnails_height_type',
|
@@ -1235,11 +1243,11 @@ class Visual_Portfolio_Admin {
|
|
1235 |
),
|
1236 |
),
|
1237 |
array(
|
1238 |
-
'type'
|
1239 |
-
'name'
|
1240 |
-
'min'
|
1241 |
-
'max'
|
1242 |
-
'default'
|
1243 |
'condition' => array(
|
1244 |
array(
|
1245 |
'control' => 'thumbnails',
|
@@ -1252,11 +1260,11 @@ class Visual_Portfolio_Admin {
|
|
1252 |
),
|
1253 |
),
|
1254 |
array(
|
1255 |
-
'type'
|
1256 |
-
'label'
|
1257 |
-
'name'
|
1258 |
-
'default'
|
1259 |
-
'options'
|
1260 |
'auto' => esc_html__( 'Auto', 'visual-portfolio' ),
|
1261 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
1262 |
),
|
@@ -1274,7 +1282,7 @@ class Visual_Portfolio_Admin {
|
|
1274 |
'default' => 8,
|
1275 |
'condition' => array(
|
1276 |
array(
|
1277 |
-
'control'
|
1278 |
),
|
1279 |
array(
|
1280 |
'control' => 'thumbnails_per_view_type',
|
@@ -1285,7 +1293,8 @@ class Visual_Portfolio_Admin {
|
|
1285 |
),
|
1286 |
),
|
1287 |
),
|
1288 |
-
),
|
|
|
1289 |
);
|
1290 |
|
1291 |
// Extend specific layout controls.
|
@@ -1317,7 +1326,7 @@ class Visual_Portfolio_Admin {
|
|
1317 |
}
|
1318 |
foreach ( $layout['controls'] as $field ) {
|
1319 |
$field['category'] = 'layouts';
|
1320 |
-
$field['name']
|
1321 |
|
1322 |
// condition names prefix fix.
|
1323 |
if ( isset( $field['condition'] ) ) {
|
@@ -1333,7 +1342,7 @@ class Visual_Portfolio_Admin {
|
|
1333 |
array(
|
1334 |
array(
|
1335 |
'control' => 'vp_layout',
|
1336 |
-
'value'
|
1337 |
),
|
1338 |
)
|
1339 |
);
|
@@ -1384,39 +1393,39 @@ class Visual_Portfolio_Admin {
|
|
1384 |
array(
|
1385 |
// Default.
|
1386 |
'default' => array(
|
1387 |
-
'title'
|
1388 |
'builtin_controls' => array(
|
1389 |
-
'show_title'
|
1390 |
'show_categories' => true,
|
1391 |
-
'show_date'
|
1392 |
-
'show_excerpt'
|
1393 |
-
'show_icons'
|
1394 |
-
'align'
|
1395 |
),
|
1396 |
-
'controls'
|
1397 |
array(
|
1398 |
'type' => 'select2',
|
1399 |
'label' => esc_html__( 'Display Read More Button', 'visual-portfolio' ),
|
1400 |
'name' => 'show_read_more',
|
1401 |
'default' => false,
|
1402 |
'options' => array(
|
1403 |
-
'false'
|
1404 |
-
'true'
|
1405 |
'more_tag' => esc_html__( 'Display when used "More tag" in the post', 'visual-portfolio' ),
|
1406 |
),
|
1407 |
),
|
1408 |
array(
|
1409 |
-
'type'
|
1410 |
-
'name'
|
1411 |
'placeholder' => 'Read More',
|
1412 |
-
'default'
|
1413 |
-
'hint'
|
1414 |
-
'hint_place'
|
1415 |
-
'condition'
|
1416 |
array(
|
1417 |
-
'control'
|
1418 |
'operator' => '!=',
|
1419 |
-
'value'
|
1420 |
),
|
1421 |
),
|
1422 |
),
|
@@ -1425,16 +1434,16 @@ class Visual_Portfolio_Admin {
|
|
1425 |
|
1426 |
// Fly.
|
1427 |
'fly' => array(
|
1428 |
-
'title'
|
1429 |
'builtin_controls' => array(
|
1430 |
-
'show_title'
|
1431 |
'show_categories' => true,
|
1432 |
-
'show_date'
|
1433 |
-
'show_excerpt'
|
1434 |
-
'show_icons'
|
1435 |
-
'align'
|
1436 |
),
|
1437 |
-
'controls'
|
1438 |
array(
|
1439 |
'type' => 'color',
|
1440 |
'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
|
@@ -1466,16 +1475,16 @@ class Visual_Portfolio_Admin {
|
|
1466 |
|
1467 |
// Emerge.
|
1468 |
'emerge' => array(
|
1469 |
-
'title'
|
1470 |
'builtin_controls' => array(
|
1471 |
-
'show_title'
|
1472 |
'show_categories' => true,
|
1473 |
-
'show_date'
|
1474 |
-
'show_excerpt'
|
1475 |
-
'show_icons'
|
1476 |
-
'align'
|
1477 |
),
|
1478 |
-
'controls'
|
1479 |
array(
|
1480 |
'type' => 'color',
|
1481 |
'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
|
@@ -1507,16 +1516,16 @@ class Visual_Portfolio_Admin {
|
|
1507 |
|
1508 |
// Fade.
|
1509 |
'fade' => array(
|
1510 |
-
'title'
|
1511 |
'builtin_controls' => array(
|
1512 |
-
'show_title'
|
1513 |
'show_categories' => true,
|
1514 |
-
'show_date'
|
1515 |
-
'show_excerpt'
|
1516 |
-
'show_icons'
|
1517 |
-
'align'
|
1518 |
),
|
1519 |
-
'controls'
|
1520 |
array(
|
1521 |
'type' => 'color',
|
1522 |
'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
|
@@ -1545,7 +1554,8 @@ class Visual_Portfolio_Admin {
|
|
1545 |
),
|
1546 |
),
|
1547 |
),
|
1548 |
-
),
|
|
|
1549 |
);
|
1550 |
|
1551 |
// Extend specific item style controls.
|
@@ -1595,12 +1605,12 @@ class Visual_Portfolio_Admin {
|
|
1595 |
'default' => true,
|
1596 |
);
|
1597 |
$new_fields[] = array(
|
1598 |
-
'type'
|
1599 |
-
'label'
|
1600 |
-
'name'
|
1601 |
-
'min'
|
1602 |
-
'max'
|
1603 |
-
'default'
|
1604 |
'condition' => array(
|
1605 |
array(
|
1606 |
'control' => 'show_categories',
|
@@ -1621,13 +1631,13 @@ class Visual_Portfolio_Admin {
|
|
1621 |
),
|
1622 |
);
|
1623 |
$new_fields[] = array(
|
1624 |
-
'type'
|
1625 |
-
'name'
|
1626 |
'placeholder' => 'F j, Y',
|
1627 |
-
'default'
|
1628 |
-
'hint'
|
1629 |
-
'hint_place'
|
1630 |
-
'condition'
|
1631 |
array(
|
1632 |
'control' => 'show_date',
|
1633 |
),
|
@@ -1642,12 +1652,12 @@ class Visual_Portfolio_Admin {
|
|
1642 |
'default' => false,
|
1643 |
);
|
1644 |
$new_fields[] = array(
|
1645 |
-
'type'
|
1646 |
-
'label'
|
1647 |
-
'name'
|
1648 |
-
'default'
|
1649 |
-
'min'
|
1650 |
-
'max'
|
1651 |
'condition' => array(
|
1652 |
array(
|
1653 |
'control' => 'show_excerpt',
|
@@ -1691,10 +1701,10 @@ class Visual_Portfolio_Admin {
|
|
1691 |
break;
|
1692 |
case 'align':
|
1693 |
$new_fields[] = array(
|
1694 |
-
'type'
|
1695 |
-
'label'
|
1696 |
-
'name'
|
1697 |
-
'default'
|
1698 |
'extended' => 'extended' === $val,
|
1699 |
);
|
1700 |
break;
|
@@ -1712,7 +1722,7 @@ class Visual_Portfolio_Admin {
|
|
1712 |
}
|
1713 |
foreach ( $style['controls'] as $field ) {
|
1714 |
$field['category'] = 'items-style';
|
1715 |
-
$field['name']
|
1716 |
|
1717 |
// condition names prefix fix.
|
1718 |
if ( isset( $field['condition'] ) ) {
|
@@ -1728,7 +1738,7 @@ class Visual_Portfolio_Admin {
|
|
1728 |
array(
|
1729 |
array(
|
1730 |
'control' => 'vp_items_style',
|
1731 |
-
'value'
|
1732 |
),
|
1733 |
)
|
1734 |
);
|
@@ -1756,20 +1766,20 @@ class Visual_Portfolio_Admin {
|
|
1756 |
// url.
|
1757 |
Visual_Portfolio_Controls::register(
|
1758 |
array(
|
1759 |
-
'category'
|
1760 |
-
'type'
|
1761 |
-
'label'
|
1762 |
-
'name'
|
1763 |
-
'default'
|
1764 |
-
'options'
|
1765 |
-
''
|
1766 |
'_blank' => esc_html__( 'New Tab (_blank)', 'visual-portfolio' ),
|
1767 |
-
'_top'
|
1768 |
),
|
1769 |
'condition' => array(
|
1770 |
array(
|
1771 |
'control' => 'vp_items_click_action',
|
1772 |
-
'value'
|
1773 |
),
|
1774 |
),
|
1775 |
)
|
@@ -1778,12 +1788,12 @@ class Visual_Portfolio_Admin {
|
|
1778 |
// popup.
|
1779 |
Visual_Portfolio_Controls::register(
|
1780 |
array(
|
1781 |
-
'category'
|
1782 |
-
'type'
|
1783 |
-
'label'
|
1784 |
-
'name'
|
1785 |
-
'default'
|
1786 |
-
'options'
|
1787 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
1788 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
1789 |
'caption' => esc_html__( 'Image Caption', 'visual-portfolio' ),
|
@@ -1793,19 +1803,19 @@ class Visual_Portfolio_Admin {
|
|
1793 |
'condition' => array(
|
1794 |
array(
|
1795 |
'control' => 'vp_items_click_action',
|
1796 |
-
'value'
|
1797 |
),
|
1798 |
),
|
1799 |
)
|
1800 |
);
|
1801 |
Visual_Portfolio_Controls::register(
|
1802 |
array(
|
1803 |
-
'category'
|
1804 |
-
'type'
|
1805 |
-
'label'
|
1806 |
-
'name'
|
1807 |
-
'default'
|
1808 |
-
'options'
|
1809 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
1810 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
1811 |
'caption' => esc_html__( 'Image Caption', 'visual-portfolio' ),
|
@@ -1815,7 +1825,7 @@ class Visual_Portfolio_Admin {
|
|
1815 |
'condition' => array(
|
1816 |
array(
|
1817 |
'control' => 'vp_items_click_action',
|
1818 |
-
'value'
|
1819 |
),
|
1820 |
),
|
1821 |
)
|
@@ -1828,22 +1838,23 @@ class Visual_Portfolio_Admin {
|
|
1828 |
array(
|
1829 |
// False.
|
1830 |
'false' => array(
|
1831 |
-
'title'
|
1832 |
'controls' => array(),
|
1833 |
),
|
1834 |
|
1835 |
// Default.
|
1836 |
'default' => array(
|
1837 |
-
'title'
|
1838 |
'controls' => array(),
|
1839 |
),
|
1840 |
|
1841 |
// Dropdown.
|
1842 |
'dropdown' => array(
|
1843 |
-
'title'
|
1844 |
'controls' => array(),
|
1845 |
),
|
1846 |
-
),
|
|
|
1847 |
);
|
1848 |
|
1849 |
// Extend specific filter controls.
|
@@ -1875,7 +1886,7 @@ class Visual_Portfolio_Admin {
|
|
1875 |
}
|
1876 |
foreach ( $filter['controls'] as $field ) {
|
1877 |
$field['category'] = 'filter';
|
1878 |
-
$field['name']
|
1879 |
|
1880 |
// condition names prefix fix.
|
1881 |
if ( isset( $field['condition'] ) ) {
|
@@ -1891,7 +1902,7 @@ class Visual_Portfolio_Admin {
|
|
1891 |
array(
|
1892 |
array(
|
1893 |
'control' => 'vp_filter',
|
1894 |
-
'value'
|
1895 |
),
|
1896 |
)
|
1897 |
);
|
@@ -1901,53 +1912,53 @@ class Visual_Portfolio_Admin {
|
|
1901 |
|
1902 |
Visual_Portfolio_Controls::register(
|
1903 |
array(
|
1904 |
-
'category'
|
1905 |
-
'type'
|
1906 |
-
'label'
|
1907 |
-
'name'
|
1908 |
-
'default'
|
1909 |
-
'options'
|
1910 |
'center' => esc_html__( 'Center', 'visual-portfolio' ),
|
1911 |
'left' => esc_html__( 'Left', 'visual-portfolio' ),
|
1912 |
'right' => esc_html__( 'Right', 'visual-portfolio' ),
|
1913 |
),
|
1914 |
'condition' => array(
|
1915 |
array(
|
1916 |
-
'control'
|
1917 |
'operator' => '!=',
|
1918 |
-
'value'
|
1919 |
),
|
1920 |
),
|
1921 |
)
|
1922 |
);
|
1923 |
Visual_Portfolio_Controls::register(
|
1924 |
array(
|
1925 |
-
'category'
|
1926 |
-
'type'
|
1927 |
-
'label'
|
1928 |
-
'name'
|
1929 |
-
'default'
|
1930 |
'condition' => array(
|
1931 |
array(
|
1932 |
-
'control'
|
1933 |
'operator' => '!=',
|
1934 |
-
'value'
|
1935 |
),
|
1936 |
),
|
1937 |
)
|
1938 |
);
|
1939 |
Visual_Portfolio_Controls::register(
|
1940 |
array(
|
1941 |
-
'category'
|
1942 |
-
'type'
|
1943 |
-
'label'
|
1944 |
-
'name'
|
1945 |
-
'default'
|
1946 |
'condition' => array(
|
1947 |
array(
|
1948 |
-
'control'
|
1949 |
'operator' => '!=',
|
1950 |
-
'value'
|
1951 |
),
|
1952 |
),
|
1953 |
)
|
@@ -1960,22 +1971,23 @@ class Visual_Portfolio_Admin {
|
|
1960 |
array(
|
1961 |
// False.
|
1962 |
'false' => array(
|
1963 |
-
'title'
|
1964 |
'controls' => array(),
|
1965 |
),
|
1966 |
|
1967 |
// Default.
|
1968 |
'default' => array(
|
1969 |
-
'title'
|
1970 |
'controls' => array(),
|
1971 |
),
|
1972 |
|
1973 |
// Dropdown.
|
1974 |
'dropdown' => array(
|
1975 |
-
'title'
|
1976 |
'controls' => array(),
|
1977 |
),
|
1978 |
-
),
|
|
|
1979 |
);
|
1980 |
|
1981 |
// Extend specific sort controls.
|
@@ -2007,7 +2019,7 @@ class Visual_Portfolio_Admin {
|
|
2007 |
}
|
2008 |
foreach ( $sort['controls'] as $field ) {
|
2009 |
$field['category'] = 'sort';
|
2010 |
-
$field['name']
|
2011 |
|
2012 |
// condition names prefix fix.
|
2013 |
if ( isset( $field['condition'] ) ) {
|
@@ -2023,7 +2035,7 @@ class Visual_Portfolio_Admin {
|
|
2023 |
array(
|
2024 |
array(
|
2025 |
'control' => 'vp_sort',
|
2026 |
-
'value'
|
2027 |
),
|
2028 |
)
|
2029 |
);
|
@@ -2033,21 +2045,21 @@ class Visual_Portfolio_Admin {
|
|
2033 |
|
2034 |
Visual_Portfolio_Controls::register(
|
2035 |
array(
|
2036 |
-
'category'
|
2037 |
-
'type'
|
2038 |
-
'label'
|
2039 |
-
'name'
|
2040 |
-
'default'
|
2041 |
-
'options'
|
2042 |
'center' => esc_html__( 'Center', 'visual-portfolio' ),
|
2043 |
'left' => esc_html__( 'Left', 'visual-portfolio' ),
|
2044 |
'right' => esc_html__( 'Right', 'visual-portfolio' ),
|
2045 |
),
|
2046 |
'condition' => array(
|
2047 |
array(
|
2048 |
-
'control'
|
2049 |
'operator' => '!=',
|
2050 |
-
'value'
|
2051 |
),
|
2052 |
),
|
2053 |
)
|
@@ -2060,16 +2072,17 @@ class Visual_Portfolio_Admin {
|
|
2060 |
array(
|
2061 |
// False.
|
2062 |
'false' => array(
|
2063 |
-
'title'
|
2064 |
'controls' => array(),
|
2065 |
),
|
2066 |
|
2067 |
// Default.
|
2068 |
'default' => array(
|
2069 |
-
'title'
|
2070 |
'controls' => array(),
|
2071 |
),
|
2072 |
-
),
|
|
|
2073 |
);
|
2074 |
|
2075 |
// Extend specific pagination controls.
|
@@ -2101,7 +2114,7 @@ class Visual_Portfolio_Admin {
|
|
2101 |
}
|
2102 |
foreach ( $pagin['controls'] as $field ) {
|
2103 |
$field['category'] = 'pagination';
|
2104 |
-
$field['name']
|
2105 |
|
2106 |
// condition names prefix fix.
|
2107 |
if ( isset( $field['condition'] ) ) {
|
@@ -2117,7 +2130,7 @@ class Visual_Portfolio_Admin {
|
|
2117 |
array(
|
2118 |
array(
|
2119 |
'control' => 'vp_pagination_style',
|
2120 |
-
'value'
|
2121 |
),
|
2122 |
)
|
2123 |
);
|
@@ -2137,7 +2150,7 @@ class Visual_Portfolio_Admin {
|
|
2137 |
'load-more' => esc_html__( 'Load More', 'visual-portfolio' ),
|
2138 |
'infinite' => esc_html__( 'Infinite', 'visual-portfolio' ),
|
2139 |
),
|
2140 |
-
'condition'
|
2141 |
array(
|
2142 |
'control' => 'vp_pagination_style',
|
2143 |
'operator' => '!=',
|
@@ -2168,12 +2181,12 @@ class Visual_Portfolio_Admin {
|
|
2168 |
);
|
2169 |
Visual_Portfolio_Controls::register(
|
2170 |
array(
|
2171 |
-
'category'
|
2172 |
-
'type'
|
2173 |
-
'label'
|
2174 |
-
'name'
|
2175 |
-
'default'
|
2176 |
-
'options'
|
2177 |
'center' => esc_html__( 'Center', 'visual-portfolio' ),
|
2178 |
'left' => esc_html__( 'Left', 'visual-portfolio' ),
|
2179 |
'right' => esc_html__( 'Right', 'visual-portfolio' ),
|
@@ -2194,11 +2207,11 @@ class Visual_Portfolio_Admin {
|
|
2194 |
);
|
2195 |
Visual_Portfolio_Controls::register(
|
2196 |
array(
|
2197 |
-
'category'
|
2198 |
-
'type'
|
2199 |
-
'label'
|
2200 |
-
'name'
|
2201 |
-
'condition'
|
2202 |
array(
|
2203 |
'control' => 'vp_pagination_style',
|
2204 |
'operator' => '!=',
|
@@ -2214,11 +2227,11 @@ class Visual_Portfolio_Admin {
|
|
2214 |
);
|
2215 |
Visual_Portfolio_Controls::register(
|
2216 |
array(
|
2217 |
-
'category'
|
2218 |
-
'type'
|
2219 |
-
'label'
|
2220 |
-
'name'
|
2221 |
-
'condition'
|
2222 |
array(
|
2223 |
'control' => 'vp_pagination_style',
|
2224 |
'operator' => '!=',
|
@@ -2234,14 +2247,14 @@ class Visual_Portfolio_Admin {
|
|
2234 |
);
|
2235 |
Visual_Portfolio_Controls::register(
|
2236 |
array(
|
2237 |
-
'category'
|
2238 |
-
'type'
|
2239 |
-
'name'
|
2240 |
-
'default'
|
2241 |
'placeholder' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2242 |
'hint' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2243 |
'hint_place' => 'left',
|
2244 |
-
'condition'
|
2245 |
array(
|
2246 |
'control' => 'vp_pagination_style',
|
2247 |
'operator' => '!=',
|
@@ -2257,14 +2270,14 @@ class Visual_Portfolio_Admin {
|
|
2257 |
);
|
2258 |
Visual_Portfolio_Controls::register(
|
2259 |
array(
|
2260 |
-
'category'
|
2261 |
-
'type'
|
2262 |
-
'name'
|
2263 |
-
'default'
|
2264 |
'placeholder' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2265 |
'hint' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2266 |
'hint_place' => 'left',
|
2267 |
-
'condition'
|
2268 |
array(
|
2269 |
'control' => 'vp_pagination_style',
|
2270 |
'operator' => '!=',
|
@@ -2280,14 +2293,14 @@ class Visual_Portfolio_Admin {
|
|
2280 |
);
|
2281 |
Visual_Portfolio_Controls::register(
|
2282 |
array(
|
2283 |
-
'category'
|
2284 |
-
'type'
|
2285 |
-
'name'
|
2286 |
-
'default'
|
2287 |
'placeholder' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2288 |
'hint' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2289 |
'hint_place' => 'left',
|
2290 |
-
'condition'
|
2291 |
array(
|
2292 |
'control' => 'vp_pagination_style',
|
2293 |
'operator' => '!=',
|
@@ -2303,14 +2316,14 @@ class Visual_Portfolio_Admin {
|
|
2303 |
);
|
2304 |
Visual_Portfolio_Controls::register(
|
2305 |
array(
|
2306 |
-
'category'
|
2307 |
-
'type'
|
2308 |
-
'name'
|
2309 |
-
'default'
|
2310 |
'placeholder' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2311 |
'hint' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2312 |
'hint_place' => 'left',
|
2313 |
-
'condition'
|
2314 |
array(
|
2315 |
'control' => 'vp_pagination_style',
|
2316 |
'operator' => '!=',
|
@@ -2326,14 +2339,14 @@ class Visual_Portfolio_Admin {
|
|
2326 |
);
|
2327 |
Visual_Portfolio_Controls::register(
|
2328 |
array(
|
2329 |
-
'category'
|
2330 |
-
'type'
|
2331 |
-
'name'
|
2332 |
-
'default'
|
2333 |
'placeholder' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2334 |
'hint' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2335 |
'hint_place' => 'left',
|
2336 |
-
'condition'
|
2337 |
array(
|
2338 |
'control' => 'vp_pagination_style',
|
2339 |
'operator' => '!=',
|
@@ -2349,14 +2362,14 @@ class Visual_Portfolio_Admin {
|
|
2349 |
);
|
2350 |
Visual_Portfolio_Controls::register(
|
2351 |
array(
|
2352 |
-
'category'
|
2353 |
-
'type'
|
2354 |
-
'name'
|
2355 |
-
'default'
|
2356 |
'placeholder' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2357 |
'hint' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2358 |
'hint_place' => 'left',
|
2359 |
-
'condition'
|
2360 |
array(
|
2361 |
'control' => 'vp_pagination_style',
|
2362 |
'operator' => '!=',
|
@@ -2466,12 +2479,12 @@ class Visual_Portfolio_Admin {
|
|
2466 |
*/
|
2467 |
Visual_Portfolio_Controls::register(
|
2468 |
array(
|
2469 |
-
'category'
|
2470 |
-
'type'
|
2471 |
-
'name'
|
2472 |
-
'cols'
|
2473 |
-
'rows'
|
2474 |
-
'default'
|
2475 |
)
|
2476 |
);
|
2477 |
|
@@ -2480,11 +2493,11 @@ class Visual_Portfolio_Admin {
|
|
2480 |
*/
|
2481 |
Visual_Portfolio_Controls::register(
|
2482 |
array(
|
2483 |
-
'category'
|
2484 |
-
'type'
|
2485 |
-
'name'
|
2486 |
-
'default'
|
2487 |
-
'readonly'
|
2488 |
'wrapper_class' => 'vp-controls-styles',
|
2489 |
)
|
2490 |
);
|
@@ -2506,30 +2519,30 @@ class Visual_Portfolio_Admin {
|
|
2506 |
*/
|
2507 |
Visual_Portfolio_Controls::register(
|
2508 |
array(
|
2509 |
-
'category'
|
2510 |
-
'type'
|
2511 |
-
'label'
|
2512 |
-
'name'
|
2513 |
-
'default'
|
2514 |
'value_callback' => array( $this, 'get_select2_post_types' ),
|
2515 |
-
'searchable'
|
2516 |
-
'wrapper_class'
|
2517 |
)
|
2518 |
);
|
2519 |
Visual_Portfolio_Controls::register(
|
2520 |
array(
|
2521 |
-
'category'
|
2522 |
-
'type'
|
2523 |
-
'label'
|
2524 |
-
'name'
|
2525 |
-
'default'
|
2526 |
'value_callback' => array( $this, 'get_select2_selected_posts' ),
|
2527 |
-
'searchable'
|
2528 |
-
'multiple'
|
2529 |
-
'post_type'
|
2530 |
-
'class'
|
2531 |
-
'wrapper_class'
|
2532 |
-
'condition'
|
2533 |
array(
|
2534 |
'control' => 'vp_posts_source',
|
2535 |
'value' => 'ids',
|
@@ -2539,18 +2552,18 @@ class Visual_Portfolio_Admin {
|
|
2539 |
);
|
2540 |
Visual_Portfolio_Controls::register(
|
2541 |
array(
|
2542 |
-
'category'
|
2543 |
-
'type'
|
2544 |
-
'label'
|
2545 |
-
'name'
|
2546 |
-
'default'
|
2547 |
'value_callback' => array( $this, 'get_select2_excluded_posts' ),
|
2548 |
-
'searchable'
|
2549 |
-
'multiple'
|
2550 |
-
'post_type'
|
2551 |
-
'class'
|
2552 |
-
'wrapper_class'
|
2553 |
-
'condition'
|
2554 |
array(
|
2555 |
'control' => 'vp_posts_source',
|
2556 |
'operator' => '!=',
|
@@ -2567,17 +2580,17 @@ class Visual_Portfolio_Admin {
|
|
2567 |
);
|
2568 |
Visual_Portfolio_Controls::register(
|
2569 |
array(
|
2570 |
-
'category'
|
2571 |
-
'type'
|
2572 |
-
'label'
|
2573 |
// translators: %1$s - escaped url.
|
2574 |
-
'description'
|
2575 |
-
'name'
|
2576 |
-
'default'
|
2577 |
-
'cols'
|
2578 |
-
'rows'
|
2579 |
'wrapper_class' => 'vp-col-12',
|
2580 |
-
'condition'
|
2581 |
array(
|
2582 |
'control' => 'vp_posts_source',
|
2583 |
'value' => 'custom_query',
|
@@ -2595,18 +2608,18 @@ class Visual_Portfolio_Admin {
|
|
2595 |
);
|
2596 |
Visual_Portfolio_Controls::register(
|
2597 |
array(
|
2598 |
-
'category'
|
2599 |
-
'type'
|
2600 |
-
'label'
|
2601 |
-
'name'
|
2602 |
-
'default'
|
2603 |
'value_callback' => array( $this, 'get_select2_taxonomies' ),
|
2604 |
-
'searchable'
|
2605 |
-
'multiple'
|
2606 |
-
'post_type'
|
2607 |
-
'class'
|
2608 |
-
'wrapper_class'
|
2609 |
-
'condition'
|
2610 |
array(
|
2611 |
'control' => 'vp_posts_source',
|
2612 |
'operator' => '!=',
|
@@ -2622,17 +2635,17 @@ class Visual_Portfolio_Admin {
|
|
2622 |
);
|
2623 |
Visual_Portfolio_Controls::register(
|
2624 |
array(
|
2625 |
-
'category'
|
2626 |
-
'type'
|
2627 |
-
'label'
|
2628 |
-
'name'
|
2629 |
-
'default'
|
2630 |
-
'options'
|
2631 |
'or' => esc_html__( 'OR', 'visual-portfolio' ),
|
2632 |
'and' => esc_html__( 'AND', 'visual-portfolio' ),
|
2633 |
),
|
2634 |
'wrapper_class' => 'vp-col-6',
|
2635 |
-
'condition'
|
2636 |
array(
|
2637 |
'control' => 'vp_posts_source',
|
2638 |
'operator' => '!=',
|
@@ -2648,12 +2661,12 @@ class Visual_Portfolio_Admin {
|
|
2648 |
);
|
2649 |
Visual_Portfolio_Controls::register(
|
2650 |
array(
|
2651 |
-
'category'
|
2652 |
-
'type'
|
2653 |
-
'label'
|
2654 |
-
'name'
|
2655 |
-
'default'
|
2656 |
-
'options'
|
2657 |
'post_date' => esc_html__( 'Date', 'visual-portfolio' ),
|
2658 |
'title' => esc_html__( 'Title', 'visual-portfolio' ),
|
2659 |
'id' => esc_html__( 'ID', 'visual-portfolio' ),
|
@@ -2665,12 +2678,12 @@ class Visual_Portfolio_Admin {
|
|
2665 |
);
|
2666 |
Visual_Portfolio_Controls::register(
|
2667 |
array(
|
2668 |
-
'category'
|
2669 |
-
'type'
|
2670 |
-
'label'
|
2671 |
-
'name'
|
2672 |
-
'default'
|
2673 |
-
'options'
|
2674 |
'desc' => esc_html__( 'DESC', 'visual-portfolio' ),
|
2675 |
'asc' => esc_html__( 'ASC', 'visual-portfolio' ),
|
2676 |
),
|
@@ -2679,11 +2692,11 @@ class Visual_Portfolio_Admin {
|
|
2679 |
);
|
2680 |
Visual_Portfolio_Controls::register(
|
2681 |
array(
|
2682 |
-
'category'
|
2683 |
-
'type'
|
2684 |
-
'label'
|
2685 |
-
'name'
|
2686 |
-
'default'
|
2687 |
'wrapper_class' => 'vp-col-6',
|
2688 |
)
|
2689 |
);
|
@@ -2693,10 +2706,10 @@ class Visual_Portfolio_Admin {
|
|
2693 |
*/
|
2694 |
Visual_Portfolio_Controls::register(
|
2695 |
array(
|
2696 |
-
'category'
|
2697 |
-
'type'
|
2698 |
-
'name'
|
2699 |
-
'default'
|
2700 |
/**
|
2701 |
* Array items:
|
2702 |
* id - image id.
|
@@ -2712,12 +2725,12 @@ class Visual_Portfolio_Admin {
|
|
2712 |
);
|
2713 |
Visual_Portfolio_Controls::register(
|
2714 |
array(
|
2715 |
-
'category'
|
2716 |
-
'type'
|
2717 |
-
'label'
|
2718 |
-
'name'
|
2719 |
-
'default'
|
2720 |
-
'options'
|
2721 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
2722 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
2723 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
@@ -2730,12 +2743,12 @@ class Visual_Portfolio_Admin {
|
|
2730 |
);
|
2731 |
Visual_Portfolio_Controls::register(
|
2732 |
array(
|
2733 |
-
'category'
|
2734 |
-
'type'
|
2735 |
-
'label'
|
2736 |
-
'name'
|
2737 |
-
'default'
|
2738 |
-
'options'
|
2739 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
2740 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
2741 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
@@ -2748,12 +2761,12 @@ class Visual_Portfolio_Admin {
|
|
2748 |
);
|
2749 |
Visual_Portfolio_Controls::register(
|
2750 |
array(
|
2751 |
-
'category'
|
2752 |
-
'type'
|
2753 |
-
'label'
|
2754 |
-
'name'
|
2755 |
-
'default'
|
2756 |
-
'options'
|
2757 |
'default' => esc_html__( 'Default', 'visual-portfolio' ),
|
2758 |
'date' => esc_html__( 'Uploaded', 'visual-portfolio' ),
|
2759 |
'title' => esc_html__( 'Title', 'visual-portfolio' ),
|
@@ -2764,12 +2777,12 @@ class Visual_Portfolio_Admin {
|
|
2764 |
);
|
2765 |
Visual_Portfolio_Controls::register(
|
2766 |
array(
|
2767 |
-
'category'
|
2768 |
-
'type'
|
2769 |
-
'label'
|
2770 |
-
'name'
|
2771 |
-
'default'
|
2772 |
-
'options'
|
2773 |
'asc' => esc_html__( 'ASC', 'visual-portfolio' ),
|
2774 |
'desc' => esc_html__( 'DESC', 'visual-portfolio' ),
|
2775 |
),
|
@@ -2890,12 +2903,12 @@ class Visual_Portfolio_Admin {
|
|
2890 |
|
2891 |
Visual_Portfolio_Controls::get(
|
2892 |
array(
|
2893 |
-
'type'
|
2894 |
-
'label'
|
2895 |
'description' => esc_html__( 'Place the shortcode where you want to show the portfolio list.', 'visual-portfolio' ),
|
2896 |
-
'name'
|
2897 |
-
'value'
|
2898 |
-
'readonly'
|
2899 |
)
|
2900 |
);
|
2901 |
|
@@ -2951,18 +2964,18 @@ class Visual_Portfolio_Admin {
|
|
2951 |
public function add_filter_metabox( $post ) {
|
2952 |
Visual_Portfolio_Controls::get_registered( 'filter' );
|
2953 |
|
2954 |
-
$type
|
2955 |
-
$align
|
2956 |
$show_count = Visual_Portfolio_Controls::get_registered_value( 'vp_filter_show_count' );
|
2957 |
|
2958 |
Visual_Portfolio_Controls::get(
|
2959 |
array(
|
2960 |
-
'type'
|
2961 |
-
'label'
|
2962 |
'description' => esc_html__( 'Place the shortcode where you want to show the filter.', 'visual-portfolio' ),
|
2963 |
-
'name'
|
2964 |
-
'value'
|
2965 |
-
'readonly'
|
2966 |
)
|
2967 |
);
|
2968 |
}
|
@@ -2975,17 +2988,17 @@ class Visual_Portfolio_Admin {
|
|
2975 |
public function add_sort_metabox( $post ) {
|
2976 |
Visual_Portfolio_Controls::get_registered( 'sort' );
|
2977 |
|
2978 |
-
$type
|
2979 |
$align = Visual_Portfolio_Controls::get_registered_value( 'vp_sort_align' );
|
2980 |
|
2981 |
Visual_Portfolio_Controls::get(
|
2982 |
array(
|
2983 |
-
'type'
|
2984 |
-
'label'
|
2985 |
'description' => esc_html__( 'Place the shortcode where you want to show the sort.', 'visual-portfolio' ),
|
2986 |
-
'name'
|
2987 |
-
'value'
|
2988 |
-
'readonly'
|
2989 |
)
|
2990 |
);
|
2991 |
}
|
@@ -3013,7 +3026,8 @@ class Visual_Portfolio_Admin {
|
|
3013 |
$url = add_query_arg(
|
3014 |
array(
|
3015 |
'vp_preview' => 'vp_preview',
|
3016 |
-
),
|
|
|
3017 |
);
|
3018 |
} else {
|
3019 |
$url .= '/vp_preview';
|
@@ -3021,15 +3035,17 @@ class Visual_Portfolio_Admin {
|
|
3021 |
|
3022 |
$url = add_query_arg(
|
3023 |
array(
|
3024 |
-
'vp_preview_frame'
|
3025 |
-
'vp_preview_type'
|
3026 |
'vp_preview_frame_id' => $post->ID,
|
3027 |
-
),
|
|
|
3028 |
);
|
3029 |
|
3030 |
?>
|
3031 |
<div class="vp_list_preview">
|
3032 |
<iframe name="vp_list_preview_iframe" src="<?php echo esc_url( $url ); ?>" frameborder="0" noresize="noresize" scrolling="no"></iframe>
|
|
|
3033 |
</div>
|
3034 |
<?php
|
3035 |
}
|
@@ -3071,7 +3087,7 @@ class Visual_Portfolio_Admin {
|
|
3071 |
|
3072 |
<p>
|
3073 |
<?php
|
3074 |
-
$url
|
3075 |
$allowed_protocols = array(
|
3076 |
'a' => array(
|
3077 |
'href' => array(),
|
@@ -3105,11 +3121,38 @@ class Visual_Portfolio_Admin {
|
|
3105 |
?>
|
3106 |
</div>
|
3107 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3108 |
</div>
|
3109 |
</div>
|
3110 |
<?php
|
3111 |
}
|
3112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3113 |
/**
|
3114 |
* Add Custom CSS metabox
|
3115 |
*
|
@@ -3178,7 +3221,9 @@ class Visual_Portfolio_Admin {
|
|
3178 |
array(
|
3179 |
'public' => false,
|
3180 |
'name' => 'attachment',
|
3181 |
-
),
|
|
|
|
|
3182 |
);
|
3183 |
|
3184 |
$post_types_list = array();
|
@@ -3187,7 +3232,7 @@ class Visual_Portfolio_Admin {
|
|
3187 |
$post_types_list[ $post_type ] = ucfirst( $post_type );
|
3188 |
}
|
3189 |
}
|
3190 |
-
$post_types_list['ids']
|
3191 |
$post_types_list['custom_query'] = esc_html__( 'Custom Query', 'visual-portfolio' );
|
3192 |
|
3193 |
return array(
|
@@ -3215,10 +3260,8 @@ class Visual_Portfolio_Admin {
|
|
3215 |
|
3216 |
$posts = get_posts(
|
3217 |
array(
|
3218 |
-
'post_type'
|
3219 |
-
'post__in'
|
3220 |
-
|
3221 |
-
// phpcs:ignore
|
3222 |
'posts_per_page' => -1,
|
3223 |
'showposts' => -1,
|
3224 |
'paged' => -1,
|
@@ -3231,7 +3274,7 @@ class Visual_Portfolio_Admin {
|
|
3231 |
}
|
3232 |
|
3233 |
return array(
|
3234 |
-
'value'
|
3235 |
'options' => $selected_array,
|
3236 |
);
|
3237 |
}
|
@@ -3257,7 +3300,7 @@ class Visual_Portfolio_Admin {
|
|
3257 |
$posts = get_posts(
|
3258 |
array(
|
3259 |
'post_type' => 'any',
|
3260 |
-
'post__in'
|
3261 |
)
|
3262 |
);
|
3263 |
|
@@ -3267,7 +3310,7 @@ class Visual_Portfolio_Admin {
|
|
3267 |
}
|
3268 |
|
3269 |
return array(
|
3270 |
-
'value'
|
3271 |
'options' => $excluded_array,
|
3272 |
);
|
3273 |
}
|
@@ -3281,7 +3324,7 @@ class Visual_Portfolio_Admin {
|
|
3281 |
global $post;
|
3282 |
|
3283 |
// get meta data.
|
3284 |
-
$selected_tax
|
3285 |
$selected_tax_arr = array();
|
3286 |
|
3287 |
if ( isset( $selected_tax ) && is_array( $selected_tax ) && count( $selected_tax ) ) {
|
@@ -3305,7 +3348,7 @@ class Visual_Portfolio_Admin {
|
|
3305 |
}
|
3306 |
|
3307 |
return array(
|
3308 |
-
'value'
|
3309 |
'options' => $selected_tax_arr,
|
3310 |
);
|
3311 |
}
|
@@ -3327,18 +3370,18 @@ class Visual_Portfolio_Admin {
|
|
3327 |
|
3328 |
$the_query = new WP_Query(
|
3329 |
array(
|
3330 |
-
's'
|
3331 |
'posts_per_page' => 50,
|
3332 |
-
'post_type'
|
3333 |
)
|
3334 |
);
|
3335 |
if ( $the_query->have_posts() ) {
|
3336 |
while ( $the_query->have_posts() ) {
|
3337 |
$the_query->the_post();
|
3338 |
$result[] = array(
|
3339 |
-
'id'
|
3340 |
-
'img'
|
3341 |
-
'title'
|
3342 |
'post_type' => get_post_type( get_the_ID() ),
|
3343 |
);
|
3344 |
}
|
@@ -3363,8 +3406,10 @@ class Visual_Portfolio_Admin {
|
|
3363 |
$post_type = get_post_types(
|
3364 |
array(
|
3365 |
'public' => false,
|
3366 |
-
'name'
|
3367 |
-
),
|
|
|
|
|
3368 |
);
|
3369 |
}
|
3370 |
$taxonomies_names = get_object_taxonomies( $post_type );
|
@@ -3376,9 +3421,9 @@ class Visual_Portfolio_Admin {
|
|
3376 |
|
3377 |
$terms = new WP_Term_Query(
|
3378 |
array(
|
3379 |
-
'taxonomy'
|
3380 |
'hide_empty' => false,
|
3381 |
-
'search'
|
3382 |
)
|
3383 |
);
|
3384 |
|
65 |
add_action( 'wp_ajax_vp_find_posts', array( $this, 'ajax_find_posts' ) );
|
66 |
add_action( 'wp_ajax_vp_find_taxonomies', array( $this, 'ajax_find_taxonomies' ) );
|
67 |
add_action( 'wp_ajax_vp_find_oembed', array( $this, 'ajax_find_oembed' ) );
|
68 |
+
|
69 |
+
add_action( 'vpf_get_source_social_stream_registered_controls', array( __class__, 'social_stream_information' ) );
|
70 |
}
|
71 |
|
72 |
/**
|
78 |
);
|
79 |
|
80 |
if ( 'vp_lists' === get_post_type() ) {
|
81 |
+
$main_classname = '.vp-id-' . get_the_ID();
|
82 |
$data_init['classnames'] = array(
|
83 |
$main_classname,
|
84 |
$main_classname . ' .vp-portfolio__items',
|
86 |
$main_classname . ' .vp-filter',
|
87 |
$main_classname . ' .vp-pagination',
|
88 |
);
|
89 |
+
|
90 |
+
$data_init['css_editor_error_notice'] = array(
|
91 |
/* translators: %d: error count */
|
92 |
'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1, 'visual-portfolio' ),
|
93 |
/* translators: %d: error count */
|
120 |
wp_enqueue_script( 'tooltip.js', visual_portfolio()->plugin_url . 'assets/vendor/popper.js/tooltip.min.js', array( 'popper.js' ), '1.14.3', true );
|
121 |
wp_enqueue_style( 'popper.js', visual_portfolio()->plugin_url . 'assets/vendor/popper.js/popper.css', '', '1.14.3' );
|
122 |
|
123 |
+
wp_enqueue_script( 'clipboard.js', visual_portfolio()->plugin_url . 'assets/vendor/clipboard.js/clipboard.min.js', '', '2.0.4', true );
|
124 |
|
125 |
$codemirror_version = '5.45.0';
|
126 |
wp_enqueue_script( 'codemirror', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/codemirror.js', '', $codemirror_version, true );
|
154 |
wp_enqueue_style( 'codemirror-addon-matchesonscrollbar', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/addon/search/matchesonscrollbar.css', '', $codemirror_version );
|
155 |
wp_enqueue_style( 'codemirror-theme-eclipse', visual_portfolio()->plugin_url . 'assets/vendor/codemirror/theme/eclipse.css', '', $codemirror_version );
|
156 |
|
157 |
+
wp_enqueue_script( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/js/layouts-editor.min.js', array( 'jquery' ), '1.16.0', true );
|
158 |
+
wp_enqueue_style( 'visual-portfolio-layout-admin', visual_portfolio()->plugin_url . 'assets/admin/css/layouts-editor.min.css', '', '1.16.0' );
|
159 |
wp_localize_script( 'visual-portfolio-layout-admin', 'VPAdminVariables', $data_init );
|
160 |
}
|
161 |
|
162 |
+
wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '1.16.0', true );
|
163 |
+
wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '1.16.0' );
|
164 |
wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
|
165 |
}
|
166 |
|
172 |
'visual-portfolio-gutenberg',
|
173 |
plugins_url( '../assets/admin/js/gutenberg-block.min.js', __FILE__ ),
|
174 |
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
|
175 |
+
filemtime( plugin_dir_path( __FILE__ ) . '../assets/admin/js/gutenberg-block.min.js' ),
|
176 |
+
true
|
177 |
);
|
178 |
|
179 |
wp_enqueue_style(
|
194 |
register_post_type(
|
195 |
'portfolio',
|
196 |
array(
|
197 |
+
'labels' => array(
|
198 |
+
'name' => _x( 'Portfolio Items', 'Post Type General Name', 'visual-portfolio' ),
|
199 |
+
'singular_name' => _x( 'Portfolio Item', 'Post Type Singular Name', 'visual-portfolio' ),
|
200 |
+
'menu_name' => __( 'Visual Portfolio', 'visual-portfolio' ),
|
201 |
+
'parent_item_colon' => __( 'Parent Portfolio Item', 'visual-portfolio' ),
|
202 |
+
'all_items' => __( 'Portfolio Items', 'visual-portfolio' ),
|
203 |
+
'view_item' => __( 'View Portfolio Item', 'visual-portfolio' ),
|
204 |
+
'add_new_item' => __( 'Add New Portfolio Item', 'visual-portfolio' ),
|
205 |
+
'add_new' => __( 'Add New', 'visual-portfolio' ),
|
206 |
+
'edit_item' => __( 'Edit Portfolio Item', 'visual-portfolio' ),
|
207 |
+
'update_item' => __( 'Update Portfolio Item', 'visual-portfolio' ),
|
208 |
+
'search_items' => __( 'Search Portfolio Item', 'visual-portfolio' ),
|
209 |
+
'not_found' => __( 'Not Found', 'visual-portfolio' ),
|
210 |
+
'not_found_in_trash' => __( 'Not found in Trash', 'visual-portfolio' ),
|
211 |
+
),
|
212 |
+
'public' => true,
|
213 |
'publicly_queryable' => true,
|
214 |
+
'has_archive' => false,
|
215 |
+
'show_ui' => true,
|
216 |
|
217 |
// adding to custom menu manually.
|
218 |
+
'show_in_menu' => true,
|
219 |
+
'show_in_admin_bar' => true,
|
220 |
+
'show_in_rest' => true,
|
221 |
+
'menu_icon' => 'dashicons-visual-portfolio',
|
222 |
+
'taxonomies' => array(
|
223 |
'portfolio_category',
|
224 |
'portfolio_tag',
|
225 |
),
|
226 |
+
'map_meta_cap' => true,
|
227 |
+
'capability_type' => 'portfolio',
|
228 |
+
'rewrite' => array(
|
229 |
+
'slug' => $custom_slug,
|
230 |
'with_front' => false,
|
231 |
),
|
232 |
+
'supports' => array(
|
233 |
'title',
|
234 |
'editor',
|
235 |
'author',
|
243 |
);
|
244 |
|
245 |
register_taxonomy(
|
246 |
+
'portfolio_category',
|
247 |
+
'portfolio',
|
248 |
+
array(
|
249 |
+
'label' => esc_html__( 'Portfolio Categories', 'visual-portfolio' ),
|
250 |
+
'labels' => array(
|
251 |
'menu_name' => esc_html__( 'Categories', 'visual-portfolio' ),
|
252 |
),
|
253 |
+
'rewrite' => array(
|
254 |
'slug' => 'portfolio-category',
|
255 |
),
|
256 |
+
'hierarchical' => true,
|
257 |
+
'public' => false,
|
258 |
+
'show_ui' => true,
|
259 |
+
'show_in_rest' => true,
|
260 |
'show_admin_column' => true,
|
261 |
+
'map_meta_cap' => true,
|
262 |
+
'capability_type' => 'portfolio',
|
263 |
)
|
264 |
);
|
265 |
register_taxonomy(
|
266 |
+
'portfolio_tag',
|
267 |
+
'portfolio',
|
268 |
+
array(
|
269 |
+
'label' => esc_html__( 'Portfolio Tags', 'visual-portfolio' ),
|
270 |
+
'labels' => array(
|
271 |
'menu_name' => esc_html__( 'Tags', 'visual-portfolio' ),
|
272 |
),
|
273 |
+
'rewrite' => array(
|
274 |
'slug' => 'portfolio-tag',
|
275 |
),
|
276 |
+
'hierarchical' => false,
|
277 |
+
'public' => false,
|
278 |
+
'show_ui' => true,
|
279 |
+
'show_in_rest' => true,
|
280 |
'show_admin_column' => true,
|
281 |
+
'map_meta_cap' => true,
|
282 |
+
'capability_type' => 'portfolio',
|
283 |
)
|
284 |
);
|
285 |
|
287 |
register_post_type(
|
288 |
'vp_lists',
|
289 |
array(
|
290 |
+
'labels' => array(
|
291 |
+
'name' => _x( 'Portfolio Layouts', 'Post Type General Name', 'visual-portfolio' ),
|
292 |
+
'singular_name' => _x( 'Portfolio Layout', 'Post Type Singular Name', 'visual-portfolio' ),
|
293 |
+
'menu_name' => __( 'Visual Portfolio', 'visual-portfolio' ),
|
294 |
+
'parent_item_colon' => __( 'Parent Portfolio Item', 'visual-portfolio' ),
|
295 |
+
'all_items' => __( 'Portfolio Layouts', 'visual-portfolio' ),
|
296 |
+
'view_item' => __( 'View Portfolio Layout', 'visual-portfolio' ),
|
297 |
+
'add_new_item' => __( 'Add New Portfolio Layout', 'visual-portfolio' ),
|
298 |
+
'add_new' => __( 'Add New', 'visual-portfolio' ),
|
299 |
+
'edit_item' => __( 'Edit Portfolio Layout', 'visual-portfolio' ),
|
300 |
+
'update_item' => __( 'Update Portfolio Layout', 'visual-portfolio' ),
|
301 |
+
'search_items' => __( 'Search Portfolio Layout', 'visual-portfolio' ),
|
302 |
+
'not_found' => __( 'Not Found', 'visual-portfolio' ),
|
303 |
+
'not_found_in_trash' => __( 'Not found in Trash', 'visual-portfolio' ),
|
304 |
+
),
|
305 |
+
'public' => false,
|
306 |
+
'has_archive' => false,
|
307 |
+
'show_ui' => true,
|
308 |
|
309 |
// adding to custom menu manually.
|
310 |
+
'show_in_menu' => 'edit.php?post_type=portfolio',
|
311 |
+
'show_in_rest' => true,
|
312 |
+
'map_meta_cap' => true,
|
313 |
'capability_type' => 'vp_list',
|
314 |
+
'rewrite' => true,
|
315 |
+
'supports' => array(
|
316 |
'title',
|
317 |
'revisions',
|
318 |
),
|
336 |
|
337 |
foreach ( $taxonomies as $taxonomy_slug ) {
|
338 |
// Retrieve taxonomy data.
|
339 |
+
$taxonomy_obj = get_taxonomy( $taxonomy_slug );
|
340 |
$taxonomy_name = $taxonomy_obj->labels->name;
|
341 |
|
342 |
// Retrieve taxonomy terms.
|
402 |
public function add_video_format_metabox( $post ) {
|
403 |
wp_nonce_field( basename( __FILE__ ), 'vp_format_video_nonce' );
|
404 |
|
405 |
+
$video_url = get_post_meta( $post->ID, 'video_url', true );
|
406 |
$oembed_html = false;
|
407 |
|
408 |
$wpkses_iframe = array(
|
482 |
if ( ! is_blog_installed() ) {
|
483 |
return;
|
484 |
}
|
485 |
+
if ( get_option( 'visual_portfolio_updated_caps' ) === '1.16.0' ) {
|
486 |
return;
|
487 |
}
|
488 |
|
559 |
$wp_roles->add_cap( 'administrator', $cap );
|
560 |
}
|
561 |
|
562 |
+
update_option( 'visual_portfolio_updated_caps', '1.16.0' );
|
563 |
}
|
564 |
|
565 |
/**
|
570 |
public function maybe_render_blank_state( $which ) {
|
571 |
global $post_type;
|
572 |
|
573 |
+
if ( in_array( $post_type, array( 'vp_lists' ), true ) && 'bottom' === $which ) {
|
574 |
$counts = (array) wp_count_posts( $post_type );
|
575 |
unset( $counts['auto-draft'] );
|
576 |
$count = array_sum( $counts );
|
708 |
$vp_query = get_posts(
|
709 |
array(
|
710 |
'post_type' => 'vp_lists',
|
|
|
711 |
'posts_per_page' => -1,
|
712 |
'showposts' => -1,
|
713 |
'paged' => -1,
|
773 |
array(
|
774 |
// Tiles.
|
775 |
'tiles' => array(
|
776 |
+
'title' => esc_html__( 'Tiles', 'visual-portfolio' ),
|
777 |
'controls' => array(
|
778 |
/**
|
779 |
* Tile type:
|
787 |
* Second item 200% width and 25% height
|
788 |
*/
|
789 |
array(
|
790 |
+
'type' => 'images_dropdown',
|
791 |
+
'label' => esc_html__( 'Type', 'visual-portfolio' ),
|
792 |
'placeholder' => esc_html__( 'Select tiles type', 'visual-portfolio' ),
|
793 |
+
'name' => 'type',
|
794 |
+
'default' => '3|1,1|',
|
795 |
+
'options' => array_merge(
|
796 |
array(
|
797 |
array(
|
798 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-1-1.svg',
|
799 |
'value' => '1|1,0.5|',
|
800 |
),
|
801 |
array(
|
802 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-2-1.svg',
|
803 |
'value' => '2|1,1|',
|
804 |
),
|
805 |
array(
|
806 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-2-2.svg',
|
807 |
'value' => '2|1,0.8|',
|
808 |
),
|
809 |
array(
|
810 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-2-3.svg',
|
811 |
'value' => '2|1,1.34|',
|
812 |
),
|
813 |
array(
|
814 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-2-4.svg',
|
815 |
'value' => '2|1,1.2|1,1.2|1,0.67|1,0.67|',
|
816 |
),
|
817 |
array(
|
818 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-2-5.svg',
|
819 |
'value' => '2|1,1.2|1,0.67|1,1.2|1,0.67|',
|
820 |
),
|
821 |
array(
|
822 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-2-6.svg',
|
823 |
'value' => '2|1,0.67|1,1|1,1|1,1|1,1|1,0.67|',
|
824 |
),
|
825 |
array(
|
826 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-1.svg',
|
827 |
'value' => '3|1,1|',
|
828 |
),
|
829 |
array(
|
830 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-2.svg',
|
831 |
'value' => '3|1,0.8|',
|
832 |
),
|
833 |
array(
|
834 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-3.svg',
|
835 |
'value' => '3|1,1.3|',
|
836 |
),
|
837 |
array(
|
838 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-4.svg',
|
839 |
'value' => '3|1,1|1,1|1,1|1,1.3|1,1.3|1,1.3|',
|
840 |
),
|
841 |
array(
|
842 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-5.svg',
|
843 |
'value' => '3|1,1|1,1|1,2|1,1|1,1|1,1|1,1|1,1|',
|
844 |
),
|
845 |
array(
|
846 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-6.svg',
|
847 |
'value' => '3|1,2|1,1|1,1|1,1|1,1|1,1|1,1|1,1|',
|
848 |
),
|
849 |
array(
|
850 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-7.svg',
|
851 |
'value' => '3|1,1|1,2|1,1|1,1|1,1|1,1|1,1|1,1|',
|
852 |
),
|
853 |
array(
|
854 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-8.svg',
|
855 |
'value' => '3|1,1|1,2|1,1|1,1|1,1|1,1|2,0.5|',
|
856 |
),
|
857 |
array(
|
858 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-9.svg',
|
859 |
'value' => '3|1,0.8|1,1.6|1,0.8|1,0.8|1,1.6|1,0.8|1,0.8|1,0.8|1,0.8|1,0.8|',
|
860 |
),
|
861 |
array(
|
862 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-10.svg',
|
863 |
'value' => '3|1,0.8|1,1.6|1,0.8|1,0.8|1,1.6|1,1.6|1,0.8|1,0.8|1,0.8|',
|
864 |
),
|
865 |
array(
|
866 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-11.svg',
|
867 |
'value' => '3|1,0.8|1,0.8|1,1.6|1,0.8|1,0.8|1,1.6|1,1.6|1,0.8|1,0.8|',
|
868 |
),
|
869 |
array(
|
870 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-12.svg',
|
871 |
'value' => '3|1,0.8|1,0.8|1,1.6|1,0.8|1,0.8|1,0.8|1,1.6|1,1.6|1,0.8|',
|
872 |
),
|
873 |
array(
|
874 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-13.svg',
|
875 |
'value' => '3|1,1|2,1|1,1|2,0.5|1,1|',
|
876 |
),
|
877 |
array(
|
878 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-14.svg',
|
879 |
'value' => '3|1,1|2,1|1,1|1,1|1,1|1,1|2,0.5|1,1|',
|
880 |
),
|
881 |
array(
|
882 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-3-15.svg',
|
883 |
'value' => '3|1,2|2,0.5|1,1|1,2|2,0.5|',
|
884 |
),
|
885 |
array(
|
886 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-4-1.svg',
|
887 |
'value' => '4|1,1|',
|
888 |
),
|
889 |
array(
|
890 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-4-2.svg',
|
891 |
'value' => '4|1,1|1,1.34|1,1|1,1.34|1,1.34|1,1.34|1,1|1,1|',
|
892 |
),
|
893 |
array(
|
894 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-4-3.svg',
|
895 |
'value' => '4|1,0.8|1,1|1,0.8|1,1|1,1|1,1|1,0.8|1,0.8|',
|
896 |
),
|
897 |
array(
|
898 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-4-4.svg',
|
899 |
'value' => '4|1,1|1,1|2,1|1,1|1,1|2,1|1,1|1,1|1,1|1,1|',
|
900 |
),
|
901 |
array(
|
902 |
+
'url' => visual_portfolio()->plugin_url . 'assets/admin/images/layouts/tiles-4-5.svg',
|
903 |
'value' => '4|2,1|2,0.5|2,0.5|2,0.5|2,1|2,0.5|',
|
904 |
),
|
905 |
+
),
|
906 |
+
Visual_Portfolio_Extend::tiles()
|
907 |
),
|
908 |
),
|
909 |
),
|
911 |
|
912 |
// Masonry.
|
913 |
'masonry' => array(
|
914 |
+
'title' => esc_html__( 'Masonry', 'visual-portfolio' ),
|
915 |
'controls' => array(
|
916 |
array(
|
917 |
+
'type' => 'range',
|
918 |
+
'label' => esc_html__( 'Columns', 'visual-portfolio' ),
|
919 |
+
'name' => 'columns',
|
920 |
+
'min' => 1,
|
921 |
+
'max' => 5,
|
922 |
'default' => 3,
|
923 |
),
|
924 |
),
|
926 |
|
927 |
// Grid.
|
928 |
'grid' => array(
|
929 |
+
'title' => esc_html__( 'Grid', 'visual-portfolio' ),
|
930 |
'controls' => array(
|
931 |
array(
|
932 |
+
'type' => 'range',
|
933 |
+
'label' => esc_html__( 'Columns', 'visual-portfolio' ),
|
934 |
+
'name' => 'columns',
|
935 |
+
'min' => 1,
|
936 |
+
'max' => 5,
|
937 |
'default' => 3,
|
938 |
),
|
939 |
),
|
941 |
|
942 |
// Justified.
|
943 |
'justified' => array(
|
944 |
+
'title' => esc_html__( 'Justified', 'visual-portfolio' ),
|
945 |
'controls' => array(
|
946 |
array(
|
947 |
+
'type' => 'range',
|
948 |
+
'label' => esc_html__( 'Row height', 'visual-portfolio' ),
|
949 |
+
'name' => 'row_height',
|
950 |
+
'min' => 100,
|
951 |
+
'max' => 1000,
|
952 |
'default' => 200,
|
953 |
),
|
954 |
array(
|
955 |
+
'type' => 'range',
|
956 |
+
'label' => esc_html__( 'Row Height Tolerance', 'visual-portfolio' ),
|
957 |
+
'name' => 'row_height_tolerance',
|
958 |
+
'min' => 0,
|
959 |
+
'max' => 1,
|
960 |
+
'step' => 0.05,
|
961 |
'default' => 0.25,
|
962 |
),
|
963 |
),
|
965 |
|
966 |
// Slider.
|
967 |
'slider' => array(
|
968 |
+
'title' => esc_html__( 'Slider', 'visual-portfolio' ),
|
969 |
'controls' => array(
|
970 |
array(
|
971 |
'type' => 'select2',
|
979 |
),
|
980 |
),
|
981 |
array(
|
982 |
+
'type' => 'range',
|
983 |
+
'label' => esc_html__( 'Speed (in Seconds)', 'visual-portfolio' ),
|
984 |
+
'name' => 'speed',
|
985 |
+
'min' => 0,
|
986 |
+
'max' => 5,
|
987 |
+
'step' => 0.1,
|
988 |
'default' => 0.3,
|
989 |
),
|
990 |
array(
|
991 |
+
'type' => 'range',
|
992 |
+
'label' => esc_html__( 'Autoplay (in Seconds)', 'visual-portfolio' ),
|
993 |
+
'name' => 'autoplay',
|
994 |
+
'min' => 0,
|
995 |
+
'max' => 20,
|
996 |
+
'step' => 0.2,
|
997 |
'default' => 6,
|
998 |
),
|
999 |
array(
|
1000 |
+
'type' => 'toggle',
|
1001 |
+
'label' => esc_html__( 'Pause on Mouse Over', 'visual-portfolio' ),
|
1002 |
+
'name' => 'autoplay_hover_pause',
|
1003 |
+
'default' => false,
|
1004 |
'condition' => array(
|
1005 |
array(
|
1006 |
+
'control' => 'autoplay',
|
1007 |
'operator' => '>',
|
1008 |
+
'value' => 0,
|
1009 |
),
|
1010 |
),
|
1011 |
),
|
1012 |
array(
|
1013 |
+
'type' => 'select2',
|
1014 |
+
'label' => esc_html__( 'Items Height', 'visual-portfolio' ),
|
1015 |
+
'name' => 'items_height_type',
|
1016 |
+
'default' => 'dynamic',
|
1017 |
+
'options' => array(
|
1018 |
+
'auto' => esc_html__( 'Auto', 'visual-portfolio' ),
|
1019 |
+
'static' => esc_html__( 'Static (px)', 'visual-portfolio' ),
|
1020 |
+
'dynamic' => esc_html__( 'Dynamic (%)', 'visual-portfolio' ),
|
1021 |
),
|
1022 |
),
|
1023 |
array(
|
1024 |
+
'type' => 'range',
|
1025 |
+
'name' => 'items_height_static',
|
1026 |
+
'min' => 30,
|
1027 |
+
'max' => 800,
|
1028 |
+
'default' => 300,
|
1029 |
'condition' => array(
|
1030 |
array(
|
1031 |
'control' => 'items_height_type',
|
1035 |
),
|
1036 |
),
|
1037 |
array(
|
1038 |
+
'type' => 'range',
|
1039 |
+
'name' => 'items_height_dynamic',
|
1040 |
+
'min' => 10,
|
1041 |
+
'max' => 300,
|
1042 |
+
'default' => 80,
|
1043 |
'condition' => array(
|
1044 |
array(
|
1045 |
'control' => 'items_height_type',
|
1064 |
),
|
1065 |
),
|
1066 |
array(
|
1067 |
+
'type' => 'select2',
|
1068 |
+
'label' => esc_html__( 'Slides Per View', 'visual-portfolio' ),
|
1069 |
+
'name' => 'slides_per_view_type',
|
1070 |
+
'default' => 'custom',
|
1071 |
+
'options' => array(
|
1072 |
'auto' => esc_html__( 'Auto', 'visual-portfolio' ),
|
1073 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
1074 |
),
|
1075 |
'condition' => array(
|
1076 |
array(
|
1077 |
+
'control' => 'effect',
|
1078 |
'operator' => '!=',
|
1079 |
+
'value' => 'fade',
|
1080 |
),
|
1081 |
),
|
1082 |
),
|
1100 |
),
|
1101 |
),
|
1102 |
array(
|
1103 |
+
'type' => 'toggle',
|
1104 |
+
'label' => esc_html__( 'Centered Slides', 'visual-portfolio' ),
|
1105 |
+
'name' => 'centered_slides',
|
1106 |
+
'default' => true,
|
1107 |
'condition' => array(
|
1108 |
array(
|
1109 |
+
'control' => 'effect',
|
1110 |
'operator' => '!=',
|
1111 |
+
'value' => 'fade',
|
1112 |
),
|
1113 |
),
|
1114 |
),
|
1125 |
'default' => false,
|
1126 |
),
|
1127 |
array(
|
1128 |
+
'type' => 'toggle',
|
1129 |
+
'label' => esc_html__( 'Free Scroll Sticky', 'visual-portfolio' ),
|
1130 |
+
'name' => 'free_mode_sticky',
|
1131 |
+
'default' => false,
|
1132 |
'condition' => array(
|
1133 |
array(
|
1134 |
'control' => 'free_mode',
|
1174 |
'default' => false,
|
1175 |
),
|
1176 |
array(
|
1177 |
+
'type' => 'toggle',
|
1178 |
+
'label' => esc_html__( 'Dynamic Bullets', 'visual-portfolio' ),
|
1179 |
+
'name' => 'bullets_dynamic',
|
1180 |
+
'default' => false,
|
1181 |
'condition' => array(
|
1182 |
array(
|
1183 |
'control' => 'bullets',
|
1197 |
'default' => false,
|
1198 |
),
|
1199 |
array(
|
1200 |
+
'type' => 'range',
|
1201 |
+
'label' => esc_html__( 'Thumbnails Gap', 'visual-portfolio' ),
|
1202 |
+
'name' => 'thumbnails_gap',
|
1203 |
+
'default' => 15,
|
1204 |
+
'min' => 0,
|
1205 |
+
'max' => 150,
|
1206 |
'condition' => array(
|
1207 |
array(
|
1208 |
+
'control' => 'thumbnails',
|
1209 |
),
|
1210 |
),
|
1211 |
),
|
1212 |
array(
|
1213 |
+
'type' => 'select2',
|
1214 |
+
'label' => esc_html__( 'Thumbnails Height', 'visual-portfolio' ),
|
1215 |
+
'name' => 'thumbnails_height_type',
|
1216 |
+
'default' => 'static',
|
1217 |
+
'options' => array(
|
1218 |
+
'auto' => esc_html__( 'Auto', 'visual-portfolio' ),
|
1219 |
+
'static' => esc_html__( 'Static (px)', 'visual-portfolio' ),
|
1220 |
+
'dynamic' => esc_html__( 'Dynamic (%)', 'visual-portfolio' ),
|
1221 |
),
|
1222 |
'condition' => array(
|
1223 |
array(
|
1224 |
+
'control' => 'thumbnails',
|
1225 |
),
|
1226 |
),
|
1227 |
),
|
1228 |
array(
|
1229 |
+
'type' => 'range',
|
1230 |
+
'name' => 'thumbnails_height_static',
|
1231 |
+
'min' => 10,
|
1232 |
+
'max' => 400,
|
1233 |
+
'default' => 100,
|
1234 |
'condition' => array(
|
1235 |
array(
|
1236 |
+
'control' => 'thumbnails',
|
1237 |
),
|
1238 |
array(
|
1239 |
'control' => 'thumbnails_height_type',
|
1243 |
),
|
1244 |
),
|
1245 |
array(
|
1246 |
+
'type' => 'range',
|
1247 |
+
'name' => 'thumbnails_height_dynamic',
|
1248 |
+
'min' => 10,
|
1249 |
+
'max' => 200,
|
1250 |
+
'default' => 30,
|
1251 |
'condition' => array(
|
1252 |
array(
|
1253 |
'control' => 'thumbnails',
|
1260 |
),
|
1261 |
),
|
1262 |
array(
|
1263 |
+
'type' => 'select2',
|
1264 |
+
'label' => esc_html__( 'Thumbnails Per View', 'visual-portfolio' ),
|
1265 |
+
'name' => 'thumbnails_per_view_type',
|
1266 |
+
'default' => 'custom',
|
1267 |
+
'options' => array(
|
1268 |
'auto' => esc_html__( 'Auto', 'visual-portfolio' ),
|
1269 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
1270 |
),
|
1282 |
'default' => 8,
|
1283 |
'condition' => array(
|
1284 |
array(
|
1285 |
+
'control' => 'thumbnails',
|
1286 |
),
|
1287 |
array(
|
1288 |
'control' => 'thumbnails_per_view_type',
|
1293 |
),
|
1294 |
),
|
1295 |
),
|
1296 |
+
),
|
1297 |
+
Visual_Portfolio_Extend::layouts()
|
1298 |
);
|
1299 |
|
1300 |
// Extend specific layout controls.
|
1326 |
}
|
1327 |
foreach ( $layout['controls'] as $field ) {
|
1328 |
$field['category'] = 'layouts';
|
1329 |
+
$field['name'] = 'vp_' . $name . '_' . $field['name'];
|
1330 |
|
1331 |
// condition names prefix fix.
|
1332 |
if ( isset( $field['condition'] ) ) {
|
1342 |
array(
|
1343 |
array(
|
1344 |
'control' => 'vp_layout',
|
1345 |
+
'value' => $name,
|
1346 |
),
|
1347 |
)
|
1348 |
);
|
1393 |
array(
|
1394 |
// Default.
|
1395 |
'default' => array(
|
1396 |
+
'title' => esc_html__( 'Default', 'visual-portfolio' ),
|
1397 |
'builtin_controls' => array(
|
1398 |
+
'show_title' => true,
|
1399 |
'show_categories' => true,
|
1400 |
+
'show_date' => true,
|
1401 |
+
'show_excerpt' => true,
|
1402 |
+
'show_icons' => false,
|
1403 |
+
'align' => true,
|
1404 |
),
|
1405 |
+
'controls' => array(
|
1406 |
array(
|
1407 |
'type' => 'select2',
|
1408 |
'label' => esc_html__( 'Display Read More Button', 'visual-portfolio' ),
|
1409 |
'name' => 'show_read_more',
|
1410 |
'default' => false,
|
1411 |
'options' => array(
|
1412 |
+
'false' => esc_html__( 'Hide', 'visual-portfolio' ),
|
1413 |
+
'true' => esc_html__( 'Always Display', 'visual-portfolio' ),
|
1414 |
'more_tag' => esc_html__( 'Display when used "More tag" in the post', 'visual-portfolio' ),
|
1415 |
),
|
1416 |
),
|
1417 |
array(
|
1418 |
+
'type' => 'text',
|
1419 |
+
'name' => 'read_more_label',
|
1420 |
'placeholder' => 'Read More',
|
1421 |
+
'default' => 'Read More',
|
1422 |
+
'hint' => esc_attr__( 'Read More Button Label', 'visual-portfolio' ),
|
1423 |
+
'hint_place' => 'left',
|
1424 |
+
'condition' => array(
|
1425 |
array(
|
1426 |
+
'control' => 'show_read_more',
|
1427 |
'operator' => '!=',
|
1428 |
+
'value' => 'false',
|
1429 |
),
|
1430 |
),
|
1431 |
),
|
1434 |
|
1435 |
// Fly.
|
1436 |
'fly' => array(
|
1437 |
+
'title' => esc_html__( 'Fly', 'visual-portfolio' ),
|
1438 |
'builtin_controls' => array(
|
1439 |
+
'show_title' => true,
|
1440 |
'show_categories' => true,
|
1441 |
+
'show_date' => true,
|
1442 |
+
'show_excerpt' => true,
|
1443 |
+
'show_icons' => true,
|
1444 |
+
'align' => 'extended',
|
1445 |
),
|
1446 |
+
'controls' => array(
|
1447 |
array(
|
1448 |
'type' => 'color',
|
1449 |
'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
|
1475 |
|
1476 |
// Emerge.
|
1477 |
'emerge' => array(
|
1478 |
+
'title' => esc_html__( 'Emerge', 'visual-portfolio' ),
|
1479 |
'builtin_controls' => array(
|
1480 |
+
'show_title' => true,
|
1481 |
'show_categories' => true,
|
1482 |
+
'show_date' => true,
|
1483 |
+
'show_excerpt' => true,
|
1484 |
+
'show_icons' => false,
|
1485 |
+
'align' => true,
|
1486 |
),
|
1487 |
+
'controls' => array(
|
1488 |
array(
|
1489 |
'type' => 'color',
|
1490 |
'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
|
1516 |
|
1517 |
// Fade.
|
1518 |
'fade' => array(
|
1519 |
+
'title' => esc_html__( 'Fade', 'visual-portfolio' ),
|
1520 |
'builtin_controls' => array(
|
1521 |
+
'show_title' => true,
|
1522 |
'show_categories' => true,
|
1523 |
+
'show_date' => true,
|
1524 |
+
'show_excerpt' => true,
|
1525 |
+
'show_icons' => true,
|
1526 |
+
'align' => 'extended',
|
1527 |
),
|
1528 |
+
'controls' => array(
|
1529 |
array(
|
1530 |
'type' => 'color',
|
1531 |
'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
|
1554 |
),
|
1555 |
),
|
1556 |
),
|
1557 |
+
),
|
1558 |
+
Visual_Portfolio_Extend::items_styles()
|
1559 |
);
|
1560 |
|
1561 |
// Extend specific item style controls.
|
1605 |
'default' => true,
|
1606 |
);
|
1607 |
$new_fields[] = array(
|
1608 |
+
'type' => 'range',
|
1609 |
+
'label' => esc_html__( 'Categories Count', 'visual-portfolio' ),
|
1610 |
+
'name' => 'categories_count',
|
1611 |
+
'min' => 1,
|
1612 |
+
'max' => 10,
|
1613 |
+
'default' => 1,
|
1614 |
'condition' => array(
|
1615 |
array(
|
1616 |
'control' => 'show_categories',
|
1631 |
),
|
1632 |
);
|
1633 |
$new_fields[] = array(
|
1634 |
+
'type' => 'text',
|
1635 |
+
'name' => 'date_format',
|
1636 |
'placeholder' => 'F j, Y',
|
1637 |
+
'default' => 'F j, Y',
|
1638 |
+
'hint' => esc_attr__( "Date format \r\n Example: F j, Y", 'visual-portfolio' ),
|
1639 |
+
'hint_place' => 'left',
|
1640 |
+
'condition' => array(
|
1641 |
array(
|
1642 |
'control' => 'show_date',
|
1643 |
),
|
1652 |
'default' => false,
|
1653 |
);
|
1654 |
$new_fields[] = array(
|
1655 |
+
'type' => 'range',
|
1656 |
+
'label' => esc_html__( 'Excerpt Words Count', 'visual-portfolio' ),
|
1657 |
+
'name' => 'excerpt_words_count',
|
1658 |
+
'default' => 15,
|
1659 |
+
'min' => 1,
|
1660 |
+
'max' => 200,
|
1661 |
'condition' => array(
|
1662 |
array(
|
1663 |
'control' => 'show_excerpt',
|
1701 |
break;
|
1702 |
case 'align':
|
1703 |
$new_fields[] = array(
|
1704 |
+
'type' => 'align',
|
1705 |
+
'label' => esc_html__( 'Caption Align', 'visual-portfolio' ),
|
1706 |
+
'name' => 'align',
|
1707 |
+
'default' => 'center',
|
1708 |
'extended' => 'extended' === $val,
|
1709 |
);
|
1710 |
break;
|
1722 |
}
|
1723 |
foreach ( $style['controls'] as $field ) {
|
1724 |
$field['category'] = 'items-style';
|
1725 |
+
$field['name'] = 'vp_items_style_' . $name . '__' . $field['name'];
|
1726 |
|
1727 |
// condition names prefix fix.
|
1728 |
if ( isset( $field['condition'] ) ) {
|
1738 |
array(
|
1739 |
array(
|
1740 |
'control' => 'vp_items_style',
|
1741 |
+
'value' => $name,
|
1742 |
),
|
1743 |
)
|
1744 |
);
|
1766 |
// url.
|
1767 |
Visual_Portfolio_Controls::register(
|
1768 |
array(
|
1769 |
+
'category' => 'items-click-action',
|
1770 |
+
'type' => 'select2',
|
1771 |
+
'label' => esc_html__( 'Target', 'visual-portfolio' ),
|
1772 |
+
'name' => 'vp_items_click_action_url_target',
|
1773 |
+
'default' => '',
|
1774 |
+
'options' => array(
|
1775 |
+
'' => esc_html__( 'Default', 'visual-portfolio' ),
|
1776 |
'_blank' => esc_html__( 'New Tab (_blank)', 'visual-portfolio' ),
|
1777 |
+
'_top' => esc_html__( 'Top Frame (_top)', 'visual-portfolio' ),
|
1778 |
),
|
1779 |
'condition' => array(
|
1780 |
array(
|
1781 |
'control' => 'vp_items_click_action',
|
1782 |
+
'value' => 'url',
|
1783 |
),
|
1784 |
),
|
1785 |
)
|
1788 |
// popup.
|
1789 |
Visual_Portfolio_Controls::register(
|
1790 |
array(
|
1791 |
+
'category' => 'items-click-action',
|
1792 |
+
'type' => 'select2',
|
1793 |
+
'label' => esc_html__( 'Title', 'visual-portfolio' ),
|
1794 |
+
'name' => 'vp_items_click_action_popup_title_source',
|
1795 |
+
'default' => 'title',
|
1796 |
+
'options' => array(
|
1797 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
1798 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
1799 |
'caption' => esc_html__( 'Image Caption', 'visual-portfolio' ),
|
1803 |
'condition' => array(
|
1804 |
array(
|
1805 |
'control' => 'vp_items_click_action',
|
1806 |
+
'value' => 'popup_gallery',
|
1807 |
),
|
1808 |
),
|
1809 |
)
|
1810 |
);
|
1811 |
Visual_Portfolio_Controls::register(
|
1812 |
array(
|
1813 |
+
'category' => 'items-click-action',
|
1814 |
+
'type' => 'select2',
|
1815 |
+
'label' => esc_html__( 'Description', 'visual-portfolio' ),
|
1816 |
+
'name' => 'vp_items_click_action_popup_description_source',
|
1817 |
+
'default' => 'description',
|
1818 |
+
'options' => array(
|
1819 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
1820 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
1821 |
'caption' => esc_html__( 'Image Caption', 'visual-portfolio' ),
|
1825 |
'condition' => array(
|
1826 |
array(
|
1827 |
'control' => 'vp_items_click_action',
|
1828 |
+
'value' => 'popup_gallery',
|
1829 |
),
|
1830 |
),
|
1831 |
)
|
1838 |
array(
|
1839 |
// False.
|
1840 |
'false' => array(
|
1841 |
+
'title' => esc_html__( 'Disabled', 'visual-portfolio' ),
|
1842 |
'controls' => array(),
|
1843 |
),
|
1844 |
|
1845 |
// Default.
|
1846 |
'default' => array(
|
1847 |
+
'title' => esc_html__( 'Default', 'visual-portfolio' ),
|
1848 |
'controls' => array(),
|
1849 |
),
|
1850 |
|
1851 |
// Dropdown.
|
1852 |
'dropdown' => array(
|
1853 |
+
'title' => esc_html__( 'Dropdown', 'visual-portfolio' ),
|
1854 |
'controls' => array(),
|
1855 |
),
|
1856 |
+
),
|
1857 |
+
Visual_Portfolio_Extend::filters()
|
1858 |
);
|
1859 |
|
1860 |
// Extend specific filter controls.
|
1886 |
}
|
1887 |
foreach ( $filter['controls'] as $field ) {
|
1888 |
$field['category'] = 'filter';
|
1889 |
+
$field['name'] = 'vp_filter_' . $name . '__' . $field['name'];
|
1890 |
|
1891 |
// condition names prefix fix.
|
1892 |
if ( isset( $field['condition'] ) ) {
|
1902 |
array(
|
1903 |
array(
|
1904 |
'control' => 'vp_filter',
|
1905 |
+
'value' => $name,
|
1906 |
),
|
1907 |
)
|
1908 |
);
|
1912 |
|
1913 |
Visual_Portfolio_Controls::register(
|
1914 |
array(
|
1915 |
+
'category' => 'filter',
|
1916 |
+
'type' => 'select2',
|
1917 |
+
'label' => esc_html__( 'Align', 'visual-portfolio' ),
|
1918 |
+
'name' => 'vp_filter_align',
|
1919 |
+
'default' => 'center',
|
1920 |
+
'options' => array(
|
1921 |
'center' => esc_html__( 'Center', 'visual-portfolio' ),
|
1922 |
'left' => esc_html__( 'Left', 'visual-portfolio' ),
|
1923 |
'right' => esc_html__( 'Right', 'visual-portfolio' ),
|
1924 |
),
|
1925 |
'condition' => array(
|
1926 |
array(
|
1927 |
+
'control' => 'vp_filter',
|
1928 |
'operator' => '!=',
|
1929 |
+
'value' => 'false',
|
1930 |
),
|
1931 |
),
|
1932 |
)
|
1933 |
);
|
1934 |
Visual_Portfolio_Controls::register(
|
1935 |
array(
|
1936 |
+
'category' => 'filter',
|
1937 |
+
'type' => 'toggle',
|
1938 |
+
'label' => esc_html__( 'Display Count', 'visual-portfolio' ),
|
1939 |
+
'name' => 'vp_filter_show_count',
|
1940 |
+
'default' => false,
|
1941 |
'condition' => array(
|
1942 |
array(
|
1943 |
+
'control' => 'vp_filter',
|
1944 |
'operator' => '!=',
|
1945 |
+
'value' => 'false',
|
1946 |
),
|
1947 |
),
|
1948 |
)
|
1949 |
);
|
1950 |
Visual_Portfolio_Controls::register(
|
1951 |
array(
|
1952 |
+
'category' => 'filter',
|
1953 |
+
'type' => 'text',
|
1954 |
+
'label' => esc_html__( 'All Button Text', 'visual-portfolio' ),
|
1955 |
+
'name' => 'vp_filter_text_all',
|
1956 |
+
'default' => esc_attr__( 'All', 'visual-portfolio' ),
|
1957 |
'condition' => array(
|
1958 |
array(
|
1959 |
+
'control' => 'vp_filter',
|
1960 |
'operator' => '!=',
|
1961 |
+
'value' => 'false',
|
1962 |
),
|
1963 |
),
|
1964 |
)
|
1971 |
array(
|
1972 |
// False.
|
1973 |
'false' => array(
|
1974 |
+
'title' => esc_html__( 'Disabled', 'visual-portfolio' ),
|
1975 |
'controls' => array(),
|
1976 |
),
|
1977 |
|
1978 |
// Default.
|
1979 |
'default' => array(
|
1980 |
+
'title' => esc_html__( 'Default', 'visual-portfolio' ),
|
1981 |
'controls' => array(),
|
1982 |
),
|
1983 |
|
1984 |
// Dropdown.
|
1985 |
'dropdown' => array(
|
1986 |
+
'title' => esc_html__( 'Dropdown', 'visual-portfolio' ),
|
1987 |
'controls' => array(),
|
1988 |
),
|
1989 |
+
),
|
1990 |
+
Visual_Portfolio_Extend::sort()
|
1991 |
);
|
1992 |
|
1993 |
// Extend specific sort controls.
|
2019 |
}
|
2020 |
foreach ( $sort['controls'] as $field ) {
|
2021 |
$field['category'] = 'sort';
|
2022 |
+
$field['name'] = 'vp_sort_' . $name . '__' . $field['name'];
|
2023 |
|
2024 |
// condition names prefix fix.
|
2025 |
if ( isset( $field['condition'] ) ) {
|
2035 |
array(
|
2036 |
array(
|
2037 |
'control' => 'vp_sort',
|
2038 |
+
'value' => $name,
|
2039 |
),
|
2040 |
)
|
2041 |
);
|
2045 |
|
2046 |
Visual_Portfolio_Controls::register(
|
2047 |
array(
|
2048 |
+
'category' => 'sort',
|
2049 |
+
'type' => 'select2',
|
2050 |
+
'label' => esc_html__( 'Align', 'visual-portfolio' ),
|
2051 |
+
'name' => 'vp_sort_align',
|
2052 |
+
'default' => 'center',
|
2053 |
+
'options' => array(
|
2054 |
'center' => esc_html__( 'Center', 'visual-portfolio' ),
|
2055 |
'left' => esc_html__( 'Left', 'visual-portfolio' ),
|
2056 |
'right' => esc_html__( 'Right', 'visual-portfolio' ),
|
2057 |
),
|
2058 |
'condition' => array(
|
2059 |
array(
|
2060 |
+
'control' => 'vp_sort',
|
2061 |
'operator' => '!=',
|
2062 |
+
'value' => 'false',
|
2063 |
),
|
2064 |
),
|
2065 |
)
|
2072 |
array(
|
2073 |
// False.
|
2074 |
'false' => array(
|
2075 |
+
'title' => esc_html__( 'Disabled', 'visual-portfolio' ),
|
2076 |
'controls' => array(),
|
2077 |
),
|
2078 |
|
2079 |
// Default.
|
2080 |
'default' => array(
|
2081 |
+
'title' => esc_html__( 'Default', 'visual-portfolio' ),
|
2082 |
'controls' => array(),
|
2083 |
),
|
2084 |
+
),
|
2085 |
+
Visual_Portfolio_Extend::pagination()
|
2086 |
);
|
2087 |
|
2088 |
// Extend specific pagination controls.
|
2114 |
}
|
2115 |
foreach ( $pagin['controls'] as $field ) {
|
2116 |
$field['category'] = 'pagination';
|
2117 |
+
$field['name'] = 'vp_pagination_' . $name . '__' . $field['name'];
|
2118 |
|
2119 |
// condition names prefix fix.
|
2120 |
if ( isset( $field['condition'] ) ) {
|
2130 |
array(
|
2131 |
array(
|
2132 |
'control' => 'vp_pagination_style',
|
2133 |
+
'value' => $name,
|
2134 |
),
|
2135 |
)
|
2136 |
);
|
2150 |
'load-more' => esc_html__( 'Load More', 'visual-portfolio' ),
|
2151 |
'infinite' => esc_html__( 'Infinite', 'visual-portfolio' ),
|
2152 |
),
|
2153 |
+
'condition' => array(
|
2154 |
array(
|
2155 |
'control' => 'vp_pagination_style',
|
2156 |
'operator' => '!=',
|
2181 |
);
|
2182 |
Visual_Portfolio_Controls::register(
|
2183 |
array(
|
2184 |
+
'category' => 'pagination',
|
2185 |
+
'type' => 'select2',
|
2186 |
+
'label' => esc_html__( 'Align', 'visual-portfolio' ),
|
2187 |
+
'name' => 'vp_pagination_align',
|
2188 |
+
'default' => 'center',
|
2189 |
+
'options' => array(
|
2190 |
'center' => esc_html__( 'Center', 'visual-portfolio' ),
|
2191 |
'left' => esc_html__( 'Left', 'visual-portfolio' ),
|
2192 |
'right' => esc_html__( 'Right', 'visual-portfolio' ),
|
2207 |
);
|
2208 |
Visual_Portfolio_Controls::register(
|
2209 |
array(
|
2210 |
+
'category' => 'pagination',
|
2211 |
+
'type' => 'html',
|
2212 |
+
'label' => esc_html__( 'Texts', 'visual-portfolio' ),
|
2213 |
+
'name' => 'vp_pagination_infinite_texts',
|
2214 |
+
'condition' => array(
|
2215 |
array(
|
2216 |
'control' => 'vp_pagination_style',
|
2217 |
'operator' => '!=',
|
2227 |
);
|
2228 |
Visual_Portfolio_Controls::register(
|
2229 |
array(
|
2230 |
+
'category' => 'pagination',
|
2231 |
+
'type' => 'html',
|
2232 |
+
'label' => esc_html__( 'Texts', 'visual-portfolio' ),
|
2233 |
+
'name' => 'vp_pagination_load_more_texts',
|
2234 |
+
'condition' => array(
|
2235 |
array(
|
2236 |
'control' => 'vp_pagination_style',
|
2237 |
'operator' => '!=',
|
2247 |
);
|
2248 |
Visual_Portfolio_Controls::register(
|
2249 |
array(
|
2250 |
+
'category' => 'pagination',
|
2251 |
+
'type' => 'text',
|
2252 |
+
'name' => 'vp_pagination_infinite_text_load',
|
2253 |
+
'default' => esc_attr__( 'Load More', 'visual-portfolio' ),
|
2254 |
'placeholder' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2255 |
'hint' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2256 |
'hint_place' => 'left',
|
2257 |
+
'condition' => array(
|
2258 |
array(
|
2259 |
'control' => 'vp_pagination_style',
|
2260 |
'operator' => '!=',
|
2270 |
);
|
2271 |
Visual_Portfolio_Controls::register(
|
2272 |
array(
|
2273 |
+
'category' => 'pagination',
|
2274 |
+
'type' => 'text',
|
2275 |
+
'name' => 'vp_pagination_infinite_text_loading',
|
2276 |
+
'default' => esc_attr__( 'Loading More...', 'visual-portfolio' ),
|
2277 |
'placeholder' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2278 |
'hint' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2279 |
'hint_place' => 'left',
|
2280 |
+
'condition' => array(
|
2281 |
array(
|
2282 |
'control' => 'vp_pagination_style',
|
2283 |
'operator' => '!=',
|
2293 |
);
|
2294 |
Visual_Portfolio_Controls::register(
|
2295 |
array(
|
2296 |
+
'category' => 'pagination',
|
2297 |
+
'type' => 'text',
|
2298 |
+
'name' => 'vp_pagination_infinite_text_end_list',
|
2299 |
+
'default' => esc_attr__( 'You’ve reached the end of the list', 'visual-portfolio' ),
|
2300 |
'placeholder' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2301 |
'hint' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2302 |
'hint_place' => 'left',
|
2303 |
+
'condition' => array(
|
2304 |
array(
|
2305 |
'control' => 'vp_pagination_style',
|
2306 |
'operator' => '!=',
|
2316 |
);
|
2317 |
Visual_Portfolio_Controls::register(
|
2318 |
array(
|
2319 |
+
'category' => 'pagination',
|
2320 |
+
'type' => 'text',
|
2321 |
+
'name' => 'vp_pagination_load_more_text_load',
|
2322 |
+
'default' => esc_attr__( 'Load More', 'visual-portfolio' ),
|
2323 |
'placeholder' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2324 |
'hint' => esc_attr__( 'Load more button label', 'visual-portfolio' ),
|
2325 |
'hint_place' => 'left',
|
2326 |
+
'condition' => array(
|
2327 |
array(
|
2328 |
'control' => 'vp_pagination_style',
|
2329 |
'operator' => '!=',
|
2339 |
);
|
2340 |
Visual_Portfolio_Controls::register(
|
2341 |
array(
|
2342 |
+
'category' => 'pagination',
|
2343 |
+
'type' => 'text',
|
2344 |
+
'name' => 'vp_pagination_load_more_text_loading',
|
2345 |
+
'default' => esc_attr__( 'Loading More...', 'visual-portfolio' ),
|
2346 |
'placeholder' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2347 |
'hint' => esc_attr__( 'Loading more button label', 'visual-portfolio' ),
|
2348 |
'hint_place' => 'left',
|
2349 |
+
'condition' => array(
|
2350 |
array(
|
2351 |
'control' => 'vp_pagination_style',
|
2352 |
'operator' => '!=',
|
2362 |
);
|
2363 |
Visual_Portfolio_Controls::register(
|
2364 |
array(
|
2365 |
+
'category' => 'pagination',
|
2366 |
+
'type' => 'text',
|
2367 |
+
'name' => 'vp_pagination_load_more_text_end_list',
|
2368 |
+
'default' => esc_attr__( 'You’ve reached the end of the list', 'visual-portfolio' ),
|
2369 |
'placeholder' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2370 |
'hint' => esc_attr__( 'End of the list text', 'visual-portfolio' ),
|
2371 |
'hint_place' => 'left',
|
2372 |
+
'condition' => array(
|
2373 |
array(
|
2374 |
'control' => 'vp_pagination_style',
|
2375 |
'operator' => '!=',
|
2479 |
*/
|
2480 |
Visual_Portfolio_Controls::register(
|
2481 |
array(
|
2482 |
+
'category' => 'custom_css',
|
2483 |
+
'type' => 'code_editor',
|
2484 |
+
'name' => 'vp_custom_css',
|
2485 |
+
'cols' => '30',
|
2486 |
+
'rows' => '10',
|
2487 |
+
'default' => '',
|
2488 |
)
|
2489 |
);
|
2490 |
|
2493 |
*/
|
2494 |
Visual_Portfolio_Controls::register(
|
2495 |
array(
|
2496 |
+
'category' => 'controls_styles',
|
2497 |
+
'type' => 'textarea',
|
2498 |
+
'name' => 'vp_controls_styles',
|
2499 |
+
'default' => '',
|
2500 |
+
'readonly' => true,
|
2501 |
'wrapper_class' => 'vp-controls-styles',
|
2502 |
)
|
2503 |
);
|
2519 |
*/
|
2520 |
Visual_Portfolio_Controls::register(
|
2521 |
array(
|
2522 |
+
'category' => 'content-source-posts',
|
2523 |
+
'type' => 'select2',
|
2524 |
+
'label' => esc_html__( 'Data Source', 'visual-portfolio' ),
|
2525 |
+
'name' => 'vp_posts_source',
|
2526 |
+
'default' => 'portfolio',
|
2527 |
'value_callback' => array( $this, 'get_select2_post_types' ),
|
2528 |
+
'searchable' => true,
|
2529 |
+
'wrapper_class' => 'vp-col-6',
|
2530 |
)
|
2531 |
);
|
2532 |
Visual_Portfolio_Controls::register(
|
2533 |
array(
|
2534 |
+
'category' => 'content-source-posts',
|
2535 |
+
'type' => 'select2',
|
2536 |
+
'label' => esc_html__( 'Specific Posts', 'visual-portfolio' ),
|
2537 |
+
'name' => 'vp_posts_ids',
|
2538 |
+
'default' => array(),
|
2539 |
'value_callback' => array( $this, 'get_select2_selected_posts' ),
|
2540 |
+
'searchable' => true,
|
2541 |
+
'multiple' => true,
|
2542 |
+
'post_type' => '[name=vp_posts_source]',
|
2543 |
+
'class' => 'vp-select2-posts-ajax',
|
2544 |
+
'wrapper_class' => 'vp-col-6',
|
2545 |
+
'condition' => array(
|
2546 |
array(
|
2547 |
'control' => 'vp_posts_source',
|
2548 |
'value' => 'ids',
|
2552 |
);
|
2553 |
Visual_Portfolio_Controls::register(
|
2554 |
array(
|
2555 |
+
'category' => 'content-source-posts',
|
2556 |
+
'type' => 'select2',
|
2557 |
+
'label' => esc_html__( 'Excluded Posts', 'visual-portfolio' ),
|
2558 |
+
'name' => 'vp_posts_excluded_ids',
|
2559 |
+
'default' => array(),
|
2560 |
'value_callback' => array( $this, 'get_select2_excluded_posts' ),
|
2561 |
+
'searchable' => true,
|
2562 |
+
'multiple' => true,
|
2563 |
+
'post_type' => '[name=vp_posts_source]',
|
2564 |
+
'class' => 'vp-select2-posts-ajax',
|
2565 |
+
'wrapper_class' => 'vp-col-6',
|
2566 |
+
'condition' => array(
|
2567 |
array(
|
2568 |
'control' => 'vp_posts_source',
|
2569 |
'operator' => '!=',
|
2580 |
);
|
2581 |
Visual_Portfolio_Controls::register(
|
2582 |
array(
|
2583 |
+
'category' => 'content-source-posts',
|
2584 |
+
'type' => 'textarea',
|
2585 |
+
'label' => esc_html__( 'Custom Query', 'visual-portfolio' ),
|
2586 |
// translators: %1$s - escaped url.
|
2587 |
+
'description' => sprintf( wp_kses( __( 'Build custom query according to WordPress Codex. See example here <a href="%1$s">%1$s</a>.', 'visual-portfolio' ), $allowed_protocols ), esc_url( 'https://visualportfolio.co/documentation/portfolio-layouts/content-source/post-based/#custom-query' ) ),
|
2588 |
+
'name' => 'vp_posts_custom_query',
|
2589 |
+
'default' => '',
|
2590 |
+
'cols' => 30,
|
2591 |
+
'rows' => 3,
|
2592 |
'wrapper_class' => 'vp-col-12',
|
2593 |
+
'condition' => array(
|
2594 |
array(
|
2595 |
'control' => 'vp_posts_source',
|
2596 |
'value' => 'custom_query',
|
2608 |
);
|
2609 |
Visual_Portfolio_Controls::register(
|
2610 |
array(
|
2611 |
+
'category' => 'content-source-posts',
|
2612 |
+
'type' => 'select2',
|
2613 |
+
'label' => esc_html__( 'Taxonomies', 'visual-portfolio' ),
|
2614 |
+
'name' => 'vp_posts_taxonomies',
|
2615 |
+
'default' => array(),
|
2616 |
'value_callback' => array( $this, 'get_select2_taxonomies' ),
|
2617 |
+
'searchable' => true,
|
2618 |
+
'multiple' => true,
|
2619 |
+
'post_type' => '[name=vp_posts_source]',
|
2620 |
+
'class' => 'vp-select2-taxonomies-ajax',
|
2621 |
+
'wrapper_class' => 'vp-col-6',
|
2622 |
+
'condition' => array(
|
2623 |
array(
|
2624 |
'control' => 'vp_posts_source',
|
2625 |
'operator' => '!=',
|
2635 |
);
|
2636 |
Visual_Portfolio_Controls::register(
|
2637 |
array(
|
2638 |
+
'category' => 'content-source-posts',
|
2639 |
+
'type' => 'select2',
|
2640 |
+
'label' => esc_html__( 'Taxonomies Relation', 'visual-portfolio' ),
|
2641 |
+
'name' => 'vp_posts_taxonomies_relation',
|
2642 |
+
'default' => 'or',
|
2643 |
+
'options' => array(
|
2644 |
'or' => esc_html__( 'OR', 'visual-portfolio' ),
|
2645 |
'and' => esc_html__( 'AND', 'visual-portfolio' ),
|
2646 |
),
|
2647 |
'wrapper_class' => 'vp-col-6',
|
2648 |
+
'condition' => array(
|
2649 |
array(
|
2650 |
'control' => 'vp_posts_source',
|
2651 |
'operator' => '!=',
|
2661 |
);
|
2662 |
Visual_Portfolio_Controls::register(
|
2663 |
array(
|
2664 |
+
'category' => 'content-source-posts',
|
2665 |
+
'type' => 'select2',
|
2666 |
+
'label' => esc_html__( 'Order by', 'visual-portfolio' ),
|
2667 |
+
'name' => 'vp_posts_order_by',
|
2668 |
+
'default' => 'post_date',
|
2669 |
+
'options' => array(
|
2670 |
'post_date' => esc_html__( 'Date', 'visual-portfolio' ),
|
2671 |
'title' => esc_html__( 'Title', 'visual-portfolio' ),
|
2672 |
'id' => esc_html__( 'ID', 'visual-portfolio' ),
|
2678 |
);
|
2679 |
Visual_Portfolio_Controls::register(
|
2680 |
array(
|
2681 |
+
'category' => 'content-source-posts',
|
2682 |
+
'type' => 'select2',
|
2683 |
+
'label' => esc_html__( 'Order Direction', 'visual-portfolio' ),
|
2684 |
+
'name' => 'vp_posts_order_direction',
|
2685 |
+
'default' => 'desc',
|
2686 |
+
'options' => array(
|
2687 |
'desc' => esc_html__( 'DESC', 'visual-portfolio' ),
|
2688 |
'asc' => esc_html__( 'ASC', 'visual-portfolio' ),
|
2689 |
),
|
2692 |
);
|
2693 |
Visual_Portfolio_Controls::register(
|
2694 |
array(
|
2695 |
+
'category' => 'content-source-posts',
|
2696 |
+
'type' => 'toggle',
|
2697 |
+
'label' => esc_html__( 'Avoid Duplicate Posts', 'visual-portfolio' ),
|
2698 |
+
'name' => 'vp_posts_avoid_duplicate_posts',
|
2699 |
+
'default' => false,
|
2700 |
'wrapper_class' => 'vp-col-6',
|
2701 |
)
|
2702 |
);
|
2706 |
*/
|
2707 |
Visual_Portfolio_Controls::register(
|
2708 |
array(
|
2709 |
+
'category' => 'content-source-images',
|
2710 |
+
'type' => 'gallery',
|
2711 |
+
'name' => 'vp_images',
|
2712 |
+
'default' => array(
|
2713 |
/**
|
2714 |
* Array items:
|
2715 |
* id - image id.
|
2725 |
);
|
2726 |
Visual_Portfolio_Controls::register(
|
2727 |
array(
|
2728 |
+
'category' => 'content-source-images',
|
2729 |
+
'type' => 'select2',
|
2730 |
+
'label' => esc_html__( 'Titles', 'visual-portfolio' ),
|
2731 |
+
'name' => 'vp_images_titles_source',
|
2732 |
+
'default' => 'custom',
|
2733 |
+
'options' => array(
|
2734 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
2735 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
2736 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
2743 |
);
|
2744 |
Visual_Portfolio_Controls::register(
|
2745 |
array(
|
2746 |
+
'category' => 'content-source-images',
|
2747 |
+
'type' => 'select2',
|
2748 |
+
'label' => esc_html__( 'Descriptions', 'visual-portfolio' ),
|
2749 |
+
'name' => 'vp_images_descriptions_source',
|
2750 |
+
'default' => 'custom',
|
2751 |
+
'options' => array(
|
2752 |
'none' => esc_html__( 'None', 'visual-portfolio' ),
|
2753 |
'custom' => esc_html__( 'Custom', 'visual-portfolio' ),
|
2754 |
'title' => esc_html__( 'Image Title', 'visual-portfolio' ),
|
2761 |
);
|
2762 |
Visual_Portfolio_Controls::register(
|
2763 |
array(
|
2764 |
+
'category' => 'content-source-images',
|
2765 |
+
'type' => 'select2',
|
2766 |
+
'label' => esc_html__( 'Order by', 'visual-portfolio' ),
|
2767 |
+
'name' => 'vp_images_order_by',
|
2768 |
+
'default' => 'default',
|
2769 |
+
'options' => array(
|
2770 |
'default' => esc_html__( 'Default', 'visual-portfolio' ),
|
2771 |
'date' => esc_html__( 'Uploaded', 'visual-portfolio' ),
|
2772 |
'title' => esc_html__( 'Title', 'visual-portfolio' ),
|
2777 |
);
|
2778 |
Visual_Portfolio_Controls::register(
|
2779 |
array(
|
2780 |
+
'category' => 'content-source-images',
|
2781 |
+
'type' => 'select2',
|
2782 |
+
'label' => esc_html__( 'Order Direction', 'visual-portfolio' ),
|
2783 |
+
'name' => 'vp_images_order_direction',
|
2784 |
+
'default' => 'asc',
|
2785 |
+
'options' => array(
|
2786 |
'asc' => esc_html__( 'ASC', 'visual-portfolio' ),
|
2787 |
'desc' => esc_html__( 'DESC', 'visual-portfolio' ),
|
2788 |
),
|
2903 |
|
2904 |
Visual_Portfolio_Controls::get(
|
2905 |
array(
|
2906 |
+
'type' => 'text',
|
2907 |
+
'label' => esc_html__( 'Shortcode', 'visual-portfolio' ),
|
2908 |
'description' => esc_html__( 'Place the shortcode where you want to show the portfolio list.', 'visual-portfolio' ),
|
2909 |
+
'name' => 'vp_list_shortcode',
|
2910 |
+
'value' => $post->ID ? '[visual_portfolio id="' . $post->ID . '" class=""]' : '',
|
2911 |
+
'readonly' => true,
|
2912 |
)
|
2913 |
);
|
2914 |
|
2964 |
public function add_filter_metabox( $post ) {
|
2965 |
Visual_Portfolio_Controls::get_registered( 'filter' );
|
2966 |
|
2967 |
+
$type = Visual_Portfolio_Controls::get_registered_value( 'vp_filter' ) ? Visual_Portfolio_Controls::get_registered_value( 'vp_filter' ) : 'default';
|
2968 |
+
$align = Visual_Portfolio_Controls::get_registered_value( 'vp_filter_align' );
|
2969 |
$show_count = Visual_Portfolio_Controls::get_registered_value( 'vp_filter_show_count' );
|
2970 |
|
2971 |
Visual_Portfolio_Controls::get(
|
2972 |
array(
|
2973 |
+
'type' => 'text',
|
2974 |
+
'label' => esc_html__( 'Filter Shortcode', 'visual-portfolio' ),
|
2975 |
'description' => esc_html__( 'Place the shortcode where you want to show the filter.', 'visual-portfolio' ),
|
2976 |
+
'name' => 'vp_filter_shortcode',
|
2977 |
+
'value' => $post->ID ? '[visual_portfolio_filter id="' . $post->ID . '" type="' . esc_attr( $type ) . '" align="' . esc_attr( $align ) . '" show_count="' . esc_attr( $show_count ? 'true' : 'false' ) . '" class=""]' : '',
|
2978 |
+
'readonly' => true,
|
2979 |
)
|
2980 |
);
|
2981 |
}
|
2988 |
public function add_sort_metabox( $post ) {
|
2989 |
Visual_Portfolio_Controls::get_registered( 'sort' );
|
2990 |
|
2991 |
+
$type = Visual_Portfolio_Controls::get_registered_value( 'vp_sort' ) ? Visual_Portfolio_Controls::get_registered_value( 'vp_sort' ) : 'default';
|
2992 |
$align = Visual_Portfolio_Controls::get_registered_value( 'vp_sort_align' );
|
2993 |
|
2994 |
Visual_Portfolio_Controls::get(
|
2995 |
array(
|
2996 |
+
'type' => 'text',
|
2997 |
+
'label' => esc_html__( 'Sort Shortcode', 'visual-portfolio' ),
|
2998 |
'description' => esc_html__( 'Place the shortcode where you want to show the sort.', 'visual-portfolio' ),
|
2999 |
+
'name' => 'vp_sort_shortcode',
|
3000 |
+
'value' => $post->ID ? '[visual_portfolio_sort id="' . $post->ID . '" type="' . esc_attr( $type ) . '" align="' . esc_attr( $align ) . '" class=""]' : '',
|
3001 |
+
'readonly' => true,
|
3002 |
)
|
3003 |
);
|
3004 |
}
|
3026 |
$url = add_query_arg(
|
3027 |
array(
|
3028 |
'vp_preview' => 'vp_preview',
|
3029 |
+
),
|
3030 |
+
$url
|
3031 |
);
|
3032 |
} else {
|
3033 |
$url .= '/vp_preview';
|
3035 |
|
3036 |
$url = add_query_arg(
|
3037 |
array(
|
3038 |
+
'vp_preview_frame' => 'true',
|
3039 |
+
'vp_preview_type' => 'layouts-editor',
|
3040 |
'vp_preview_frame_id' => $post->ID,
|
3041 |
+
),
|
3042 |
+
$url
|
3043 |
);
|
3044 |
|
3045 |
?>
|
3046 |
<div class="vp_list_preview">
|
3047 |
<iframe name="vp_list_preview_iframe" src="<?php echo esc_url( $url ); ?>" frameborder="0" noresize="noresize" scrolling="no"></iframe>
|
3048 |
+
<div class="vp_list_preview_preloader vp_list_preview_preloader_active"></div>
|
3049 |
</div>
|
3050 |
<?php
|
3051 |
}
|
3087 |
|
3088 |
<p>
|
3089 |
<?php
|
3090 |
+
$url = get_admin_url( null, 'edit.php?post_type=portfolio' );
|
3091 |
$allowed_protocols = array(
|
3092 |
'a' => array(
|
3093 |
'href' => array(),
|
3121 |
?>
|
3122 |
</div>
|
3123 |
</div>
|
3124 |
+
<div data-content="social-stream">
|
3125 |
+
<!-- Social -->
|
3126 |
+
|
3127 |
+
<p></p>
|
3128 |
+
<div class="vp-row">
|
3129 |
+
<?php
|
3130 |
+
do_action( 'vpf_get_source_social_stream_registered_controls' );
|
3131 |
+
?>
|
3132 |
+
</div>
|
3133 |
+
</div>
|
3134 |
</div>
|
3135 |
</div>
|
3136 |
<?php
|
3137 |
}
|
3138 |
|
3139 |
+
/**
|
3140 |
+
* Information About Social Stream Functionality.
|
3141 |
+
*/
|
3142 |
+
public static function social_stream_information() {
|
3143 |
+
$url = 'https://visualportfolio.co/pro/';
|
3144 |
+
$allowed_protocols = array(
|
3145 |
+
'a' => array(
|
3146 |
+
'href' => array(),
|
3147 |
+
'target' => array(),
|
3148 |
+
),
|
3149 |
+
);
|
3150 |
+
// translators: %1$s - escaped url.
|
3151 |
+
// translators: %2$s - non-escaped url.
|
3152 |
+
$social_stream_information = sprintf( __( 'Social Stream are only available in the pro version of the plugin: <a href="%1$s" target="_blank">%2$s</a>', 'visual-portfolio' ), esc_url( $url ), esc_html( $url ) );
|
3153 |
+
echo '<p class="vp-col-12">' . wp_kses( $social_stream_information, $allowed_protocols ) . '</p>';
|
3154 |
+
}
|
3155 |
+
|
3156 |
/**
|
3157 |
* Add Custom CSS metabox
|
3158 |
*
|
3221 |
array(
|
3222 |
'public' => false,
|
3223 |
'name' => 'attachment',
|
3224 |
+
),
|
3225 |
+
'names',
|
3226 |
+
'NOT'
|
3227 |
);
|
3228 |
|
3229 |
$post_types_list = array();
|
3232 |
$post_types_list[ $post_type ] = ucfirst( $post_type );
|
3233 |
}
|
3234 |
}
|
3235 |
+
$post_types_list['ids'] = esc_html__( 'Specific Posts', 'visual-portfolio' );
|
3236 |
$post_types_list['custom_query'] = esc_html__( 'Custom Query', 'visual-portfolio' );
|
3237 |
|
3238 |
return array(
|
3260 |
|
3261 |
$posts = get_posts(
|
3262 |
array(
|
3263 |
+
'post_type' => 'any',
|
3264 |
+
'post__in' => $selected_ids,
|
|
|
|
|
3265 |
'posts_per_page' => -1,
|
3266 |
'showposts' => -1,
|
3267 |
'paged' => -1,
|
3274 |
}
|
3275 |
|
3276 |
return array(
|
3277 |
+
'value' => array_keys( $selected_array ),
|
3278 |
'options' => $selected_array,
|
3279 |
);
|
3280 |
}
|
3300 |
$posts = get_posts(
|
3301 |
array(
|
3302 |
'post_type' => 'any',
|
3303 |
+
'post__in' => $excluded_ids,
|
3304 |
)
|
3305 |
);
|
3306 |
|
3310 |
}
|
3311 |
|
3312 |
return array(
|
3313 |
+
'value' => array_keys( $excluded_array ),
|
3314 |
'options' => $excluded_array,
|
3315 |
);
|
3316 |
}
|
3324 |
global $post;
|
3325 |
|
3326 |
// get meta data.
|
3327 |
+
$selected_tax = get_post_meta( $post->ID, 'vp_posts_taxonomies', true );
|
3328 |
$selected_tax_arr = array();
|
3329 |
|
3330 |
if ( isset( $selected_tax ) && is_array( $selected_tax ) && count( $selected_tax ) ) {
|
3348 |
}
|
3349 |
|
3350 |
return array(
|
3351 |
+
'value' => array_keys( $selected_tax_arr ),
|
3352 |
'options' => $selected_tax_arr,
|
3353 |
);
|
3354 |
}
|
3370 |
|
3371 |
$the_query = new WP_Query(
|
3372 |
array(
|
3373 |
+
's' => sanitize_text_field( wp_unslash( $_GET['q'] ) ),
|
3374 |
'posts_per_page' => 50,
|
3375 |
+
'post_type' => $post_type,
|
3376 |
)
|
3377 |
);
|
3378 |
if ( $the_query->have_posts() ) {
|
3379 |
while ( $the_query->have_posts() ) {
|
3380 |
$the_query->the_post();
|
3381 |
$result[] = array(
|
3382 |
+
'id' => get_the_ID(),
|
3383 |
+
'img' => get_the_post_thumbnail_url( null, 'thumbnail' ),
|
3384 |
+
'title' => get_the_title(),
|
3385 |
'post_type' => get_post_type( get_the_ID() ),
|
3386 |
);
|
3387 |
}
|
3406 |
$post_type = get_post_types(
|
3407 |
array(
|
3408 |
'public' => false,
|
3409 |
+
'name' => 'attachment',
|
3410 |
+
),
|
3411 |
+
'names',
|
3412 |
+
'NOT'
|
3413 |
);
|
3414 |
}
|
3415 |
$taxonomies_names = get_object_taxonomies( $post_type );
|
3421 |
|
3422 |
$terms = new WP_Term_Query(
|
3423 |
array(
|
3424 |
+
'taxonomy' => $taxonomies_names,
|
3425 |
'hide_empty' => false,
|
3426 |
+
'search' => isset( $_GET['q'] ) ? sanitize_text_field( wp_unslash( $_GET['q'] ) ) : '',
|
3427 |
)
|
3428 |
);
|
3429 |
|
classes/class-assets.php
CHANGED
@@ -78,13 +78,16 @@ class Visual_Portfolio_Assets {
|
|
78 |
return;
|
79 |
}
|
80 |
|
81 |
-
uasort(
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
85 |
|
86 |
-
|
87 |
-
|
|
|
88 |
|
89 |
foreach ( self::$stored_assets[ $type ] as $name => $data ) {
|
90 |
$val = $data['value'];
|
@@ -124,6 +127,8 @@ class Visual_Portfolio_Assets {
|
|
124 |
$options
|
125 |
);
|
126 |
|
|
|
|
|
127 |
self::store_used_assets( 'visual-portfolio', true, 'style', 9 );
|
128 |
self::store_used_assets( 'visual-portfolio-noscript', true, 'style', 9 );
|
129 |
|
@@ -236,10 +241,11 @@ class Visual_Portfolio_Assets {
|
|
236 |
// Controls styles.
|
237 |
if ( $options['vp_controls_styles'] ) {
|
238 |
$controls_css_handle = 'vp-controls-styles-' . $id;
|
|
|
239 |
$css = wp_kses( $options['vp_controls_styles'], array( '\'', '\"' ) );
|
240 |
$css = str_replace( '>', '>', $css );
|
241 |
|
242 |
-
wp_register_style( $controls_css_handle, false );
|
243 |
wp_enqueue_style( $controls_css_handle );
|
244 |
wp_add_inline_style( $controls_css_handle, $css );
|
245 |
|
@@ -249,26 +255,31 @@ class Visual_Portfolio_Assets {
|
|
249 |
// Add custom styles.
|
250 |
if ( $options['vp_custom_css'] ) {
|
251 |
$custom_css_handle = 'vp-custom-css-' . $id;
|
|
|
252 |
$css = wp_kses( $options['vp_custom_css'], array( '\'', '\"' ) );
|
253 |
$css = str_replace( '>', '>', $css );
|
254 |
|
255 |
-
wp_register_style( $custom_css_handle, false );
|
256 |
wp_enqueue_style( $custom_css_handle );
|
257 |
wp_add_inline_style( $custom_css_handle, $css );
|
258 |
|
259 |
self::store_used_assets( $custom_css_handle, true, 'style' );
|
260 |
}
|
|
|
|
|
261 |
}
|
262 |
|
263 |
/**
|
264 |
* Register scripts that will be used in the future when portfolio will be printed.
|
265 |
*/
|
266 |
public function register_scripts() {
|
267 |
-
$vp_deps
|
268 |
$vp_style_deps = array();
|
269 |
|
270 |
$popup_vendor = Visual_Portfolio_Settings::get_option( 'vendor', 'vp_popup_gallery', 'photoswipe' );
|
271 |
|
|
|
|
|
272 |
// Isotope.
|
273 |
if ( apply_filters( 'vpf_enqueue_plugin_isotope', true ) ) {
|
274 |
wp_register_script( 'isotope', visual_portfolio()->plugin_url . 'assets/vendor/isotope/isotope.pkgd.min.js', array( 'jquery' ), '3.0.6', true );
|
@@ -322,26 +333,26 @@ class Visual_Portfolio_Assets {
|
|
322 |
|
323 |
// Visual Portfolio CSS.
|
324 |
$vp_styles = array(
|
325 |
-
'visual-portfolio'
|
326 |
-
'visual-portfolio-noscript'
|
327 |
'visual-portfolio-layout-justified' => array( 'assets/css/layout-justified.min.css', array( 'visual-portfolio' ) ),
|
328 |
-
'visual-portfolio-layout-slider'
|
329 |
-
'visual-portfolio-layout-tiles'
|
330 |
-
'visual-portfolio-popup-fancybox'
|
331 |
'visual-portfolio-popup-photoswipe' => array( 'assets/css/popup-photoswipe.min.css', array( 'visual-portfolio', 'photoswipe-default-skin' ) ),
|
332 |
);
|
333 |
|
334 |
foreach ( $vp_styles as $name => $data ) {
|
335 |
-
wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.
|
336 |
}
|
337 |
|
338 |
// Visual Portfolio JS.
|
339 |
$vp_scripts = array(
|
340 |
-
'visual-portfolio'
|
341 |
'assets/js/main.min.js',
|
342 |
$vp_deps,
|
343 |
),
|
344 |
-
'visual-portfolio-plugin-isotope'
|
345 |
'assets/js/plugin-isotope.min.js',
|
346 |
array(
|
347 |
'isotope',
|
@@ -353,7 +364,7 @@ class Visual_Portfolio_Assets {
|
|
353 |
'flickr-justified-gallery',
|
354 |
),
|
355 |
),
|
356 |
-
'visual-portfolio-plugin-swiper'
|
357 |
'assets/js/plugin-swiper.min.js',
|
358 |
array(
|
359 |
'swiper',
|
@@ -365,19 +376,19 @@ class Visual_Portfolio_Assets {
|
|
365 |
'photoswipe-ui-default',
|
366 |
),
|
367 |
),
|
368 |
-
'visual-portfolio-plugin-fancybox'
|
369 |
'assets/js/plugin-fancybox.min.js',
|
370 |
array(
|
371 |
'fancybox',
|
372 |
),
|
373 |
),
|
374 |
-
'visual-portfolio-layout-gaps'
|
375 |
'assets/js/layout-gaps.min.js',
|
376 |
array(
|
377 |
'jquery',
|
378 |
),
|
379 |
),
|
380 |
-
'visual-portfolio-layout-masonry'
|
381 |
'assets/js/layout-masonry.min.js',
|
382 |
array(
|
383 |
'jquery',
|
@@ -385,7 +396,7 @@ class Visual_Portfolio_Assets {
|
|
385 |
'visual-portfolio-plugin-isotope',
|
386 |
),
|
387 |
),
|
388 |
-
'visual-portfolio-layout-grid'
|
389 |
'assets/js/layout-grid.min.js',
|
390 |
array(
|
391 |
'jquery',
|
@@ -393,7 +404,7 @@ class Visual_Portfolio_Assets {
|
|
393 |
'visual-portfolio-plugin-isotope',
|
394 |
),
|
395 |
),
|
396 |
-
'visual-portfolio-layout-tiles'
|
397 |
'assets/js/layout-tiles.min.js',
|
398 |
array(
|
399 |
'jquery',
|
@@ -401,21 +412,21 @@ class Visual_Portfolio_Assets {
|
|
401 |
'visual-portfolio-plugin-isotope',
|
402 |
),
|
403 |
),
|
404 |
-
'visual-portfolio-layout-justified'
|
405 |
'assets/js/layout-justified.min.js',
|
406 |
array(
|
407 |
'jquery',
|
408 |
'visual-portfolio-plugin-fj-gallery',
|
409 |
),
|
410 |
),
|
411 |
-
'visual-portfolio-layout-slider'
|
412 |
'assets/js/layout-slider.min.js',
|
413 |
array(
|
414 |
'jquery',
|
415 |
'visual-portfolio-plugin-swiper',
|
416 |
),
|
417 |
),
|
418 |
-
'visual-portfolio-items-style-fly'
|
419 |
'assets/js/items-style-fly.min.js',
|
420 |
array(
|
421 |
'jquery',
|
@@ -424,8 +435,10 @@ class Visual_Portfolio_Assets {
|
|
424 |
);
|
425 |
|
426 |
foreach ( $vp_scripts as $name => $data ) {
|
427 |
-
wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.
|
428 |
}
|
|
|
|
|
429 |
}
|
430 |
|
431 |
/**
|
@@ -445,7 +458,7 @@ class Visual_Portfolio_Assets {
|
|
445 |
*/
|
446 |
public function localize_global_data() {
|
447 |
$data = array(
|
448 |
-
'__'
|
449 |
'couldnt_retrieve_vp' => esc_attr__( 'Couldn\'t retrieve Visual Portfolio ID.', 'visual-portfolio' ),
|
450 |
|
451 |
'pswp_close' => esc_attr__( 'Close (Esc)', 'visual-portfolio' ),
|
@@ -488,7 +501,7 @@ class Visual_Portfolio_Assets {
|
|
488 |
),
|
489 |
|
490 |
// Screen sizes for responsive feature.
|
491 |
-
'screenSizes'
|
492 |
);
|
493 |
|
494 |
echo "<script type='text/javascript'>\n";
|
@@ -502,17 +515,17 @@ class Visual_Portfolio_Assets {
|
|
502 |
* Enqueue styles in head.
|
503 |
*/
|
504 |
public function wp_enqueue_head_assets() {
|
505 |
-
|
506 |
-
|
507 |
}
|
508 |
|
509 |
/**
|
510 |
* Enqueue scripts and styles in foot.
|
511 |
*/
|
512 |
public function wp_enqueue_foot_assets() {
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
}
|
517 |
|
518 |
/**
|
@@ -539,7 +552,7 @@ class Visual_Portfolio_Assets {
|
|
539 |
return;
|
540 |
}
|
541 |
|
542 |
-
$posts
|
543 |
$pattern = get_shortcode_regex();
|
544 |
|
545 |
$layout_ids = array();
|
@@ -550,9 +563,9 @@ class Visual_Portfolio_Assets {
|
|
550 |
isset( $post->post_content )
|
551 |
&& preg_match_all( '/' . $pattern . '/s', $post->post_content, $matches )
|
552 |
&& array_key_exists( 2, $matches )
|
553 |
-
&& in_array( 'visual_portfolio', $matches[2] )
|
554 |
) {
|
555 |
-
$keys
|
556 |
$shortcodes = array();
|
557 |
|
558 |
foreach ( $matches[0] as $key => $value ) {
|
@@ -562,8 +575,8 @@ class Visual_Portfolio_Assets {
|
|
562 |
parse_str( $get, $output );
|
563 |
|
564 |
// get all shortcode attribute keys.
|
565 |
-
|
566 |
-
$shortcodes[]
|
567 |
}
|
568 |
|
569 |
if ( $keys && $shortcodes ) {
|
@@ -581,7 +594,7 @@ class Visual_Portfolio_Assets {
|
|
581 |
|
582 |
// get all IDs from shortcodes.
|
583 |
foreach ( $shortcodes as $shortcode ) {
|
584 |
-
if ( isset( $shortcode['id'] ) && $shortcode['id'] && ! in_array( $shortcode['id'], $layout_ids ) ) {
|
585 |
$layout_ids[] = str_replace( '"', '', $shortcode['id'] );
|
586 |
}
|
587 |
}
|
@@ -592,7 +605,7 @@ class Visual_Portfolio_Assets {
|
|
592 |
foreach ( $layout_ids as $id ) {
|
593 |
$options = Visual_Portfolio_Get::get_options( $id );
|
594 |
|
595 |
-
|
596 |
}
|
597 |
}
|
598 |
}
|
78 |
return;
|
79 |
}
|
80 |
|
81 |
+
uasort(
|
82 |
+
self::$stored_assets[ $type ],
|
83 |
+
function ( $a, $b ) {
|
84 |
+
if ( $a === $b ) {
|
85 |
+
return 0;
|
86 |
+
}
|
87 |
|
88 |
+
return $a['priority'] < $b['priority'] ? -1 : 1;
|
89 |
+
}
|
90 |
+
);
|
91 |
|
92 |
foreach ( self::$stored_assets[ $type ] as $name => $data ) {
|
93 |
$val = $data['value'];
|
127 |
$options
|
128 |
);
|
129 |
|
130 |
+
do_action( 'vpf_before_assets_enqueue', $options, $id );
|
131 |
+
|
132 |
self::store_used_assets( 'visual-portfolio', true, 'style', 9 );
|
133 |
self::store_used_assets( 'visual-portfolio-noscript', true, 'style', 9 );
|
134 |
|
241 |
// Controls styles.
|
242 |
if ( $options['vp_controls_styles'] ) {
|
243 |
$controls_css_handle = 'vp-controls-styles-' . $id;
|
244 |
+
|
245 |
$css = wp_kses( $options['vp_controls_styles'], array( '\'', '\"' ) );
|
246 |
$css = str_replace( '>', '>', $css );
|
247 |
|
248 |
+
wp_register_style( $controls_css_handle, false, array(), '1.16.0' );
|
249 |
wp_enqueue_style( $controls_css_handle );
|
250 |
wp_add_inline_style( $controls_css_handle, $css );
|
251 |
|
255 |
// Add custom styles.
|
256 |
if ( $options['vp_custom_css'] ) {
|
257 |
$custom_css_handle = 'vp-custom-css-' . $id;
|
258 |
+
|
259 |
$css = wp_kses( $options['vp_custom_css'], array( '\'', '\"' ) );
|
260 |
$css = str_replace( '>', '>', $css );
|
261 |
|
262 |
+
wp_register_style( $custom_css_handle, false, array(), '1.16.0' );
|
263 |
wp_enqueue_style( $custom_css_handle );
|
264 |
wp_add_inline_style( $custom_css_handle, $css );
|
265 |
|
266 |
self::store_used_assets( $custom_css_handle, true, 'style' );
|
267 |
}
|
268 |
+
|
269 |
+
do_action( 'vpf_after_assets_enqueue', $options, $id );
|
270 |
}
|
271 |
|
272 |
/**
|
273 |
* Register scripts that will be used in the future when portfolio will be printed.
|
274 |
*/
|
275 |
public function register_scripts() {
|
276 |
+
$vp_deps = array( 'jquery', 'imagesloaded' );
|
277 |
$vp_style_deps = array();
|
278 |
|
279 |
$popup_vendor = Visual_Portfolio_Settings::get_option( 'vendor', 'vp_popup_gallery', 'photoswipe' );
|
280 |
|
281 |
+
do_action( 'vpf_before_assets_register' );
|
282 |
+
|
283 |
// Isotope.
|
284 |
if ( apply_filters( 'vpf_enqueue_plugin_isotope', true ) ) {
|
285 |
wp_register_script( 'isotope', visual_portfolio()->plugin_url . 'assets/vendor/isotope/isotope.pkgd.min.js', array( 'jquery' ), '3.0.6', true );
|
333 |
|
334 |
// Visual Portfolio CSS.
|
335 |
$vp_styles = array(
|
336 |
+
'visual-portfolio' => array( 'assets/css/main.min.css', $vp_style_deps ),
|
337 |
+
'visual-portfolio-noscript' => array( 'assets/css/noscript.min.css', array( 'visual-portfolio' ) ),
|
338 |
'visual-portfolio-layout-justified' => array( 'assets/css/layout-justified.min.css', array( 'visual-portfolio' ) ),
|
339 |
+
'visual-portfolio-layout-slider' => array( 'assets/css/layout-slider.min.css', array( 'visual-portfolio', 'swiper' ) ),
|
340 |
+
'visual-portfolio-layout-tiles' => array( 'assets/css/layout-tiles.min.css', array( 'visual-portfolio' ) ),
|
341 |
+
'visual-portfolio-popup-fancybox' => array( 'assets/css/popup-fancybox.min.css', array( 'visual-portfolio', 'fancybox' ) ),
|
342 |
'visual-portfolio-popup-photoswipe' => array( 'assets/css/popup-photoswipe.min.css', array( 'visual-portfolio', 'photoswipe-default-skin' ) ),
|
343 |
);
|
344 |
|
345 |
foreach ( $vp_styles as $name => $data ) {
|
346 |
+
wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.16.0' );
|
347 |
}
|
348 |
|
349 |
// Visual Portfolio JS.
|
350 |
$vp_scripts = array(
|
351 |
+
'visual-portfolio' => array(
|
352 |
'assets/js/main.min.js',
|
353 |
$vp_deps,
|
354 |
),
|
355 |
+
'visual-portfolio-plugin-isotope' => array(
|
356 |
'assets/js/plugin-isotope.min.js',
|
357 |
array(
|
358 |
'isotope',
|
364 |
'flickr-justified-gallery',
|
365 |
),
|
366 |
),
|
367 |
+
'visual-portfolio-plugin-swiper' => array(
|
368 |
'assets/js/plugin-swiper.min.js',
|
369 |
array(
|
370 |
'swiper',
|
376 |
'photoswipe-ui-default',
|
377 |
),
|
378 |
),
|
379 |
+
'visual-portfolio-plugin-fancybox' => array(
|
380 |
'assets/js/plugin-fancybox.min.js',
|
381 |
array(
|
382 |
'fancybox',
|
383 |
),
|
384 |
),
|
385 |
+
'visual-portfolio-layout-gaps' => array(
|
386 |
'assets/js/layout-gaps.min.js',
|
387 |
array(
|
388 |
'jquery',
|
389 |
),
|
390 |
),
|
391 |
+
'visual-portfolio-layout-masonry' => array(
|
392 |
'assets/js/layout-masonry.min.js',
|
393 |
array(
|
394 |
'jquery',
|
396 |
'visual-portfolio-plugin-isotope',
|
397 |
),
|
398 |
),
|
399 |
+
'visual-portfolio-layout-grid' => array(
|
400 |
'assets/js/layout-grid.min.js',
|
401 |
array(
|
402 |
'jquery',
|
404 |
'visual-portfolio-plugin-isotope',
|
405 |
),
|
406 |
),
|
407 |
+
'visual-portfolio-layout-tiles' => array(
|
408 |
'assets/js/layout-tiles.min.js',
|
409 |
array(
|
410 |
'jquery',
|
412 |
'visual-portfolio-plugin-isotope',
|
413 |
),
|
414 |
),
|
415 |
+
'visual-portfolio-layout-justified' => array(
|
416 |
'assets/js/layout-justified.min.js',
|
417 |
array(
|
418 |
'jquery',
|
419 |
'visual-portfolio-plugin-fj-gallery',
|
420 |
),
|
421 |
),
|
422 |
+
'visual-portfolio-layout-slider' => array(
|
423 |
'assets/js/layout-slider.min.js',
|
424 |
array(
|
425 |
'jquery',
|
426 |
'visual-portfolio-plugin-swiper',
|
427 |
),
|
428 |
),
|
429 |
+
'visual-portfolio-items-style-fly' => array(
|
430 |
'assets/js/items-style-fly.min.js',
|
431 |
array(
|
432 |
'jquery',
|
435 |
);
|
436 |
|
437 |
foreach ( $vp_scripts as $name => $data ) {
|
438 |
+
wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '1.16.0', true );
|
439 |
}
|
440 |
+
|
441 |
+
do_action( 'vpf_after_assets_register' );
|
442 |
}
|
443 |
|
444 |
/**
|
458 |
*/
|
459 |
public function localize_global_data() {
|
460 |
$data = array(
|
461 |
+
'__' => array(
|
462 |
'couldnt_retrieve_vp' => esc_attr__( 'Couldn\'t retrieve Visual Portfolio ID.', 'visual-portfolio' ),
|
463 |
|
464 |
'pswp_close' => esc_attr__( 'Close (Esc)', 'visual-portfolio' ),
|
501 |
),
|
502 |
|
503 |
// Screen sizes for responsive feature.
|
504 |
+
'screenSizes' => array( 320, 576, 768, 992, 1200 ),
|
505 |
);
|
506 |
|
507 |
echo "<script type='text/javascript'>\n";
|
515 |
* Enqueue styles in head.
|
516 |
*/
|
517 |
public function wp_enqueue_head_assets() {
|
518 |
+
self::enqueue_stored_assets( 'style' );
|
519 |
+
self::enqueue_stored_assets( 'template_style' );
|
520 |
}
|
521 |
|
522 |
/**
|
523 |
* Enqueue scripts and styles in foot.
|
524 |
*/
|
525 |
public function wp_enqueue_foot_assets() {
|
526 |
+
self::enqueue_stored_assets( 'style' );
|
527 |
+
self::enqueue_stored_assets( 'template_style' );
|
528 |
+
self::enqueue_stored_assets( 'script' );
|
529 |
}
|
530 |
|
531 |
/**
|
552 |
return;
|
553 |
}
|
554 |
|
555 |
+
$posts = $wp_query->posts;
|
556 |
$pattern = get_shortcode_regex();
|
557 |
|
558 |
$layout_ids = array();
|
563 |
isset( $post->post_content )
|
564 |
&& preg_match_all( '/' . $pattern . '/s', $post->post_content, $matches )
|
565 |
&& array_key_exists( 2, $matches )
|
566 |
+
&& in_array( 'visual_portfolio', $matches[2], true )
|
567 |
) {
|
568 |
+
$keys = array();
|
569 |
$shortcodes = array();
|
570 |
|
571 |
foreach ( $matches[0] as $key => $value ) {
|
575 |
parse_str( $get, $output );
|
576 |
|
577 |
// get all shortcode attribute keys.
|
578 |
+
$keys = array_unique( array_merge( $keys, array_keys( $output ) ) );
|
579 |
+
$shortcodes[] = $output;
|
580 |
}
|
581 |
|
582 |
if ( $keys && $shortcodes ) {
|
594 |
|
595 |
// get all IDs from shortcodes.
|
596 |
foreach ( $shortcodes as $shortcode ) {
|
597 |
+
if ( isset( $shortcode['id'] ) && $shortcode['id'] && ! in_array( $shortcode['id'], $layout_ids, true ) ) {
|
598 |
$layout_ids[] = str_replace( '"', '', $shortcode['id'] );
|
599 |
}
|
600 |
}
|
605 |
foreach ( $layout_ids as $id ) {
|
606 |
$options = Visual_Portfolio_Get::get_options( $id );
|
607 |
|
608 |
+
self::enqueue( $options, $id );
|
609 |
}
|
610 |
}
|
611 |
}
|
classes/class-controls.php
CHANGED
@@ -27,42 +27,42 @@ class Visual_Portfolio_Controls {
|
|
27 |
*/
|
28 |
private static $default_args = array(
|
29 |
// category for registered fields.
|
30 |
-
'category'
|
31 |
|
32 |
-
'type'
|
33 |
-
'label'
|
34 |
-
'description'
|
35 |
-
'name'
|
36 |
-
'value'
|
37 |
'value_callback' => '',
|
38 |
-
'placeholder'
|
39 |
-
'readonly'
|
40 |
|
41 |
// control-specific args.
|
42 |
// select.
|
43 |
-
'options'
|
44 |
-
'searchable'
|
45 |
-
'multiple'
|
46 |
-
'tags'
|
47 |
-
'post_type'
|
48 |
// range.
|
49 |
-
'min'
|
50 |
-
'max'
|
51 |
-
'step'
|
52 |
// textarea.
|
53 |
-
'cols'
|
54 |
-
'rows'
|
55 |
// color.
|
56 |
-
'alpha'
|
57 |
// align.
|
58 |
-
'extended'
|
59 |
|
60 |
// hint.
|
61 |
-
'hint'
|
62 |
-
'hint_place'
|
63 |
|
64 |
// condition.
|
65 |
-
'condition'
|
66 |
/**
|
67 |
* Array of arrays with data:
|
68 |
* 'control' - control name.
|
@@ -72,7 +72,7 @@ class Visual_Portfolio_Controls {
|
|
72 |
),
|
73 |
|
74 |
// style.
|
75 |
-
'style'
|
76 |
/**
|
77 |
* Array of arrays with data:
|
78 |
* 'element' - CSS selector string (.vp-portfolio__item, .vp-portfolio__item-overlay, etc).
|
@@ -81,8 +81,8 @@ class Visual_Portfolio_Controls {
|
|
81 |
*/
|
82 |
),
|
83 |
|
84 |
-
'class'
|
85 |
-
'wrapper_class'
|
86 |
);
|
87 |
|
88 |
/**
|
@@ -134,8 +134,8 @@ class Visual_Portfolio_Controls {
|
|
134 |
|
135 |
?>
|
136 |
<div class="<?php echo esc_attr( $class ); ?>"
|
137 |
-
|
138 |
-
|
139 |
<?php
|
140 |
if ( ! $args['wrapper_class'] ) {
|
141 |
self::print_condition( $args );
|
@@ -217,7 +217,7 @@ class Visual_Portfolio_Controls {
|
|
217 |
|
218 |
// registered data.
|
219 |
$registered_array = self::get_registered_array();
|
220 |
-
$registered_data
|
221 |
|
222 |
// find default.
|
223 |
$default = null;
|
@@ -257,9 +257,9 @@ class Visual_Portfolio_Controls {
|
|
257 |
if ( $args['condition'] && ! empty( $args['condition'] ) ) {
|
258 |
foreach ( $args['condition'] as $cond ) {
|
259 |
if ( ! empty( $cond ) && isset( $cond['control'] ) ) {
|
260 |
-
$control
|
261 |
$operator = isset( $cond['operator'] ) ? $cond['operator'] : '==';
|
262 |
-
$value
|
263 |
|
264 |
if ( ! empty( $condition_attr ) ) {
|
265 |
$condition_attr .= ' && ';
|
@@ -304,7 +304,7 @@ class Visual_Portfolio_Controls {
|
|
304 |
<?php
|
305 |
foreach ( $args['style'] as $style ) {
|
306 |
if ( $style['element'] && $style['property'] ) {
|
307 |
-
|
308 |
<input type="hidden"
|
309 |
name="<?php echo esc_attr( $args['name'] ); ?>__style[]"
|
310 |
data-style-from="[name='<?php echo esc_attr( $args['name'] ); ?>']"
|
@@ -313,7 +313,7 @@ class Visual_Portfolio_Controls {
|
|
313 |
data-style-mask="<?php echo esc_attr( isset( $style['mask'] ) ? $style['mask'] : '$' ); ?>"
|
314 |
value=""
|
315 |
>
|
316 |
-
|
317 |
}
|
318 |
}
|
319 |
?>
|
@@ -452,7 +452,7 @@ class Visual_Portfolio_Controls {
|
|
452 |
$selected = false;
|
453 |
|
454 |
if ( $args['multiple'] ) {
|
455 |
-
if ( $args['value'] && is_array( $args['value'] ) && in_array( $check_val, $args['value'] ) ) {
|
456 |
$selected = true;
|
457 |
}
|
458 |
} else {
|
@@ -579,12 +579,12 @@ class Visual_Portfolio_Controls {
|
|
579 |
* @param array $args - control args.
|
580 |
*/
|
581 |
public static function print_control_gallery( $args = array() ) {
|
582 |
-
$images
|
583 |
$additional_data = array(
|
584 |
-
'title'
|
585 |
-
'type'
|
586 |
-
'label'
|
587 |
-
'name'
|
588 |
'condition' => array(
|
589 |
array(
|
590 |
'control' => 'vp_images_titles_source',
|
@@ -594,9 +594,9 @@ class Visual_Portfolio_Controls {
|
|
594 |
),
|
595 |
),
|
596 |
'description' => array(
|
597 |
-
'type'
|
598 |
-
'label'
|
599 |
-
'name'
|
600 |
'condition' => array(
|
601 |
array(
|
602 |
'control' => 'vp_images_descriptions_source',
|
@@ -605,41 +605,41 @@ class Visual_Portfolio_Controls {
|
|
605 |
),
|
606 |
),
|
607 |
),
|
608 |
-
'categories'
|
609 |
-
'type'
|
610 |
-
'label'
|
611 |
-
'name'
|
612 |
'multiple' => true,
|
613 |
-
'tags'
|
614 |
),
|
615 |
-
'format'
|
616 |
-
'type'
|
617 |
-
'label'
|
618 |
-
'name'
|
619 |
'default' => 'standard',
|
620 |
'options' => array(
|
621 |
'standard' => esc_html__( 'Standard', 'visual-portfolio' ),
|
622 |
-
'video'
|
623 |
),
|
624 |
),
|
625 |
-
'video_url'
|
626 |
-
'type'
|
627 |
-
'label'
|
628 |
-
'placeholder'
|
629 |
-
'name'
|
630 |
-
'condition'
|
631 |
array(
|
632 |
'control' => $args['name'] . '_additional_format',
|
633 |
-
'value'
|
634 |
),
|
635 |
),
|
636 |
),
|
637 |
-
'url'
|
638 |
-
'type'
|
639 |
-
'label'
|
640 |
'description' => esc_html__( 'By default used full image url, you can use custom one', 'visual-portfolio' ),
|
641 |
-
'placeholder'
|
642 |
-
'name'
|
643 |
),
|
644 |
);
|
645 |
|
@@ -666,8 +666,9 @@ class Visual_Portfolio_Controls {
|
|
666 |
foreach ( $additional_data as $name => $data_item ) {
|
667 |
self::get(
|
668 |
array_merge(
|
669 |
-
$data_item,
|
670 |
-
|
|
|
671 |
'class' => 'vp-no-reload',
|
672 |
)
|
673 |
)
|
@@ -683,22 +684,23 @@ class Visual_Portfolio_Controls {
|
|
683 |
continue;
|
684 |
}
|
685 |
|
686 |
-
$img
|
687 |
$img_data = wp_prepare_attachment_for_js( $data['id'] );
|
688 |
|
689 |
?>
|
690 |
<div class="vp-control-gallery-items-img" data-image-id="<?php echo esc_attr( $data['id'] ); ?>">
|
691 |
<?php
|
692 |
echo wp_kses(
|
693 |
-
$img,
|
|
|
694 |
'img' => array(
|
695 |
-
'src'
|
696 |
-
'srcset'
|
697 |
-
'sizes'
|
698 |
-
'alt'
|
699 |
-
'class'
|
700 |
-
'width'
|
701 |
-
'height'
|
702 |
),
|
703 |
)
|
704 |
);
|
27 |
*/
|
28 |
private static $default_args = array(
|
29 |
// category for registered fields.
|
30 |
+
'category' => '',
|
31 |
|
32 |
+
'type' => 'text',
|
33 |
+
'label' => false,
|
34 |
+
'description' => false,
|
35 |
+
'name' => '',
|
36 |
+
'value' => '',
|
37 |
'value_callback' => '',
|
38 |
+
'placeholder' => '',
|
39 |
+
'readonly' => false,
|
40 |
|
41 |
// control-specific args.
|
42 |
// select.
|
43 |
+
'options' => array(),
|
44 |
+
'searchable' => false,
|
45 |
+
'multiple' => false,
|
46 |
+
'tags' => false,
|
47 |
+
'post_type' => '',
|
48 |
// range.
|
49 |
+
'min' => '',
|
50 |
+
'max' => '',
|
51 |
+
'step' => '1',
|
52 |
// textarea.
|
53 |
+
'cols' => '',
|
54 |
+
'rows' => '',
|
55 |
// color.
|
56 |
+
'alpha' => false,
|
57 |
// align.
|
58 |
+
'extended' => false,
|
59 |
|
60 |
// hint.
|
61 |
+
'hint' => false,
|
62 |
+
'hint_place' => 'top',
|
63 |
|
64 |
// condition.
|
65 |
+
'condition' => array(
|
66 |
/**
|
67 |
* Array of arrays with data:
|
68 |
* 'control' - control name.
|
72 |
),
|
73 |
|
74 |
// style.
|
75 |
+
'style' => array(
|
76 |
/**
|
77 |
* Array of arrays with data:
|
78 |
* 'element' - CSS selector string (.vp-portfolio__item, .vp-portfolio__item-overlay, etc).
|
81 |
*/
|
82 |
),
|
83 |
|
84 |
+
'class' => '',
|
85 |
+
'wrapper_class' => '',
|
86 |
);
|
87 |
|
88 |
/**
|
134 |
|
135 |
?>
|
136 |
<div class="<?php echo esc_attr( $class ); ?>"
|
137 |
+
data-hint="<?php echo esc_attr( $args['hint'] ? $args['hint'] : 'false' ); ?>"
|
138 |
+
data-hint-place="<?php echo esc_attr( $args['hint_place'] ? $args['hint_place'] : 'top' ); ?>"
|
139 |
<?php
|
140 |
if ( ! $args['wrapper_class'] ) {
|
141 |
self::print_condition( $args );
|
217 |
|
218 |
// registered data.
|
219 |
$registered_array = self::get_registered_array();
|
220 |
+
$registered_data = isset( $registered_array[ $name ] ) ? $registered_array[ $name ] : false;
|
221 |
|
222 |
// find default.
|
223 |
$default = null;
|
257 |
if ( $args['condition'] && ! empty( $args['condition'] ) ) {
|
258 |
foreach ( $args['condition'] as $cond ) {
|
259 |
if ( ! empty( $cond ) && isset( $cond['control'] ) ) {
|
260 |
+
$control = $cond['control'];
|
261 |
$operator = isset( $cond['operator'] ) ? $cond['operator'] : '==';
|
262 |
+
$value = isset( $cond['value'] ) ? $cond['value'] : 'true';
|
263 |
|
264 |
if ( ! empty( $condition_attr ) ) {
|
265 |
$condition_attr .= ' && ';
|
304 |
<?php
|
305 |
foreach ( $args['style'] as $style ) {
|
306 |
if ( $style['element'] && $style['property'] ) {
|
307 |
+
?>
|
308 |
<input type="hidden"
|
309 |
name="<?php echo esc_attr( $args['name'] ); ?>__style[]"
|
310 |
data-style-from="[name='<?php echo esc_attr( $args['name'] ); ?>']"
|
313 |
data-style-mask="<?php echo esc_attr( isset( $style['mask'] ) ? $style['mask'] : '$' ); ?>"
|
314 |
value=""
|
315 |
>
|
316 |
+
<?php
|
317 |
}
|
318 |
}
|
319 |
?>
|
452 |
$selected = false;
|
453 |
|
454 |
if ( $args['multiple'] ) {
|
455 |
+
if ( $args['value'] && is_array( $args['value'] ) && in_array( $check_val, $args['value'], true ) ) {
|
456 |
$selected = true;
|
457 |
}
|
458 |
} else {
|
579 |
* @param array $args - control args.
|
580 |
*/
|
581 |
public static function print_control_gallery( $args = array() ) {
|
582 |
+
$images = (array) $args['value'];
|
583 |
$additional_data = array(
|
584 |
+
'title' => array(
|
585 |
+
'type' => 'text',
|
586 |
+
'label' => esc_html__( 'Title', 'visual-portfolio' ),
|
587 |
+
'name' => $args['name'] . '_additional_title',
|
588 |
'condition' => array(
|
589 |
array(
|
590 |
'control' => 'vp_images_titles_source',
|
594 |
),
|
595 |
),
|
596 |
'description' => array(
|
597 |
+
'type' => 'textarea',
|
598 |
+
'label' => esc_html__( 'Description', 'visual-portfolio' ),
|
599 |
+
'name' => $args['name'] . '_additional_description',
|
600 |
'condition' => array(
|
601 |
array(
|
602 |
'control' => 'vp_images_descriptions_source',
|
605 |
),
|
606 |
),
|
607 |
),
|
608 |
+
'categories' => array(
|
609 |
+
'type' => 'select2',
|
610 |
+
'label' => esc_html__( 'Categories', 'visual-portfolio' ),
|
611 |
+
'name' => $args['name'] . '_additional_categories',
|
612 |
'multiple' => true,
|
613 |
+
'tags' => true,
|
614 |
),
|
615 |
+
'format' => array(
|
616 |
+
'type' => 'select2',
|
617 |
+
'label' => esc_html__( 'Format', 'visual-portfolio' ),
|
618 |
+
'name' => $args['name'] . '_additional_format',
|
619 |
'default' => 'standard',
|
620 |
'options' => array(
|
621 |
'standard' => esc_html__( 'Standard', 'visual-portfolio' ),
|
622 |
+
'video' => esc_html__( 'Video', 'visual-portfolio' ),
|
623 |
),
|
624 |
),
|
625 |
+
'video_url' => array(
|
626 |
+
'type' => 'text',
|
627 |
+
'label' => esc_html__( 'Video URL', 'visual-portfolio' ),
|
628 |
+
'placeholder' => esc_html__( 'https://...', 'visual-portfolio' ),
|
629 |
+
'name' => $args['name'] . '_additional_video_url',
|
630 |
+
'condition' => array(
|
631 |
array(
|
632 |
'control' => $args['name'] . '_additional_format',
|
633 |
+
'value' => 'video',
|
634 |
),
|
635 |
),
|
636 |
),
|
637 |
+
'url' => array(
|
638 |
+
'type' => 'text',
|
639 |
+
'label' => esc_html__( 'URL', 'visual-portfolio' ),
|
640 |
'description' => esc_html__( 'By default used full image url, you can use custom one', 'visual-portfolio' ),
|
641 |
+
'placeholder' => esc_html__( 'https://...', 'visual-portfolio' ),
|
642 |
+
'name' => $args['name'] . '_additional_url',
|
643 |
),
|
644 |
);
|
645 |
|
666 |
foreach ( $additional_data as $name => $data_item ) {
|
667 |
self::get(
|
668 |
array_merge(
|
669 |
+
$data_item,
|
670 |
+
array(
|
671 |
+
'value' => '',
|
672 |
'class' => 'vp-no-reload',
|
673 |
)
|
674 |
)
|
684 |
continue;
|
685 |
}
|
686 |
|
687 |
+
$img = wp_get_attachment_image( $data['id'], 'thumbnail' );
|
688 |
$img_data = wp_prepare_attachment_for_js( $data['id'] );
|
689 |
|
690 |
?>
|
691 |
<div class="vp-control-gallery-items-img" data-image-id="<?php echo esc_attr( $data['id'] ); ?>">
|
692 |
<?php
|
693 |
echo wp_kses(
|
694 |
+
$img,
|
695 |
+
array(
|
696 |
'img' => array(
|
697 |
+
'src' => array(),
|
698 |
+
'srcset' => array(),
|
699 |
+
'sizes' => array(),
|
700 |
+
'alt' => array(),
|
701 |
+
'class' => array(),
|
702 |
+
'width' => array(),
|
703 |
+
'height' => array(),
|
704 |
),
|
705 |
)
|
706 |
);
|
classes/class-elementor-widget.php
CHANGED
@@ -19,13 +19,24 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
19 |
* @param array $data default widget data.
|
20 |
* @param null|array $args default widget args.
|
21 |
*/
|
22 |
-
public function __construct( $data =
|
23 |
parent::__construct( $data, $args );
|
24 |
|
25 |
-
|
26 |
-
|
|
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
@@ -79,7 +90,11 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
79 |
* @return array Widget script dependencies.
|
80 |
*/
|
81 |
public function get_script_depends() {
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
|
85 |
/**
|
@@ -88,24 +103,29 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
88 |
* @return array Widget style dependencies.
|
89 |
*/
|
90 |
public function get_style_depends() {
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
* Adds different input fields to allow the user to change and customize the widget settings.
|
96 |
*/
|
|
|
97 |
protected function _register_controls() {
|
98 |
// get all visual-portfolio post types.
|
99 |
// Don't use WP_Query on the admin side https://core.trac.wordpress.org/ticket/18408 .
|
100 |
$vp_query = get_posts(
|
101 |
array(
|
102 |
'post_type' => 'vp_lists',
|
103 |
-
// phpcs:ignore
|
104 |
'posts_per_page' => -1,
|
105 |
'showposts' => -1,
|
106 |
'paged' => -1,
|
107 |
)
|
108 |
);
|
|
|
109 |
$options = array();
|
110 |
foreach ( $vp_query as $post ) {
|
111 |
$options[ $post->ID ] = '#' . $post->ID . ' - ' . $post->post_title;
|
@@ -150,13 +170,15 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
150 |
return;
|
151 |
}
|
152 |
|
153 |
-
$this->
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
|
|
|
|
160 |
|
161 |
?>
|
162 |
<div
|
@@ -165,7 +187,11 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
165 |
echo $this->get_render_attribute_string( 'wrapper' );
|
166 |
?>
|
167 |
>
|
168 |
-
|
|
|
|
|
|
|
|
|
169 |
</div>
|
170 |
<?php
|
171 |
}
|
@@ -185,5 +211,5 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
185 |
*
|
186 |
* @param array $instance instance data.
|
187 |
*/
|
188 |
-
public function render_plain_content( $instance =
|
189 |
}
|
19 |
* @param array $data default widget data.
|
20 |
* @param null|array $args default widget args.
|
21 |
*/
|
22 |
+
public function __construct( $data = array(), $args = null ) {
|
23 |
parent::__construct( $data, $args );
|
24 |
|
25 |
+
if ( $this->is_preview_mode() ) {
|
26 |
+
wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.min.js', '', '4.2.1', true );
|
27 |
+
wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '1.16.0', true );
|
28 |
|
29 |
+
wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '1.16.0' );
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Is edit mode check.
|
35 |
+
*
|
36 |
+
* @return boolean
|
37 |
+
*/
|
38 |
+
public function is_preview_mode() {
|
39 |
+
return \Elementor\Plugin::$instance->preview->is_preview_mode() || \Elementor\Plugin::$instance->editor->is_edit_mode();
|
40 |
}
|
41 |
|
42 |
/**
|
90 |
* @return array Widget script dependencies.
|
91 |
*/
|
92 |
public function get_script_depends() {
|
93 |
+
if ( $this->is_preview_mode() ) {
|
94 |
+
return array( 'visual-portfolio-elementor' );
|
95 |
+
}
|
96 |
+
|
97 |
+
return array();
|
98 |
}
|
99 |
|
100 |
/**
|
103 |
* @return array Widget style dependencies.
|
104 |
*/
|
105 |
public function get_style_depends() {
|
106 |
+
if ( $this->is_preview_mode() ) {
|
107 |
+
return array( 'visual-portfolio-elementor' );
|
108 |
+
}
|
109 |
+
|
110 |
+
return array();
|
111 |
}
|
112 |
|
113 |
/**
|
114 |
* Adds different input fields to allow the user to change and customize the widget settings.
|
115 |
*/
|
116 |
+
// phpcs:ignore
|
117 |
protected function _register_controls() {
|
118 |
// get all visual-portfolio post types.
|
119 |
// Don't use WP_Query on the admin side https://core.trac.wordpress.org/ticket/18408 .
|
120 |
$vp_query = get_posts(
|
121 |
array(
|
122 |
'post_type' => 'vp_lists',
|
|
|
123 |
'posts_per_page' => -1,
|
124 |
'showposts' => -1,
|
125 |
'paged' => -1,
|
126 |
)
|
127 |
);
|
128 |
+
|
129 |
$options = array();
|
130 |
foreach ( $vp_query as $post ) {
|
131 |
$options[ $post->ID ] = '#' . $post->ID . ' - ' . $post->post_title;
|
170 |
return;
|
171 |
}
|
172 |
|
173 |
+
if ( $this->is_preview_mode() ) {
|
174 |
+
$this->add_render_attribute(
|
175 |
+
'wrapper',
|
176 |
+
array(
|
177 |
+
'class' => 'visual-portfolio-elementor-preview',
|
178 |
+
'data-id' => $settings['id'],
|
179 |
+
)
|
180 |
+
);
|
181 |
+
}
|
182 |
|
183 |
?>
|
184 |
<div
|
187 |
echo $this->get_render_attribute_string( 'wrapper' );
|
188 |
?>
|
189 |
>
|
190 |
+
<?php if ( $this->is_preview_mode() ) : ?>
|
191 |
+
<iframe allowtransparency="true"></iframe>
|
192 |
+
<?php else : ?>
|
193 |
+
<?php echo do_shortcode( '[visual_portfolio id="' . esc_attr( $settings['id'] ) . '"]' ); ?>
|
194 |
+
<?php endif; ?>
|
195 |
</div>
|
196 |
<?php
|
197 |
}
|
211 |
*
|
212 |
* @param array $instance instance data.
|
213 |
*/
|
214 |
+
public function render_plain_content( $instance = array() ) {}
|
215 |
}
|
classes/class-extend.php
CHANGED
@@ -25,6 +25,7 @@ class Visual_Portfolio_Extend {
|
|
25 |
* @return array
|
26 |
*/
|
27 |
public static function layouts() {
|
|
|
28 |
/*
|
29 |
* Example:
|
30 |
array(
|
@@ -47,6 +48,7 @@ class Visual_Portfolio_Extend {
|
|
47 |
* @return array
|
48 |
*/
|
49 |
public static function layout_controls( $name, $controls ) {
|
|
|
50 |
/*
|
51 |
* Example:
|
52 |
array(
|
@@ -62,6 +64,7 @@ class Visual_Portfolio_Extend {
|
|
62 |
* @return array
|
63 |
*/
|
64 |
public static function tiles() {
|
|
|
65 |
/*
|
66 |
* Example:
|
67 |
array(
|
@@ -84,6 +87,7 @@ class Visual_Portfolio_Extend {
|
|
84 |
* @return array
|
85 |
*/
|
86 |
public static function items_styles() {
|
|
|
87 |
/*
|
88 |
* Example:
|
89 |
array(
|
@@ -114,6 +118,7 @@ class Visual_Portfolio_Extend {
|
|
114 |
* @return array
|
115 |
*/
|
116 |
public static function item_style_controls( $name, $controls ) {
|
|
|
117 |
/*
|
118 |
* Example:
|
119 |
array(
|
@@ -129,6 +134,7 @@ class Visual_Portfolio_Extend {
|
|
129 |
* @return array
|
130 |
*/
|
131 |
public static function filters() {
|
|
|
132 |
/*
|
133 |
* Example:
|
134 |
array(
|
@@ -151,6 +157,7 @@ class Visual_Portfolio_Extend {
|
|
151 |
* @return array
|
152 |
*/
|
153 |
public static function filter_controls( $name, $controls ) {
|
|
|
154 |
/*
|
155 |
* Example:
|
156 |
array(
|
@@ -166,6 +173,7 @@ class Visual_Portfolio_Extend {
|
|
166 |
* @return array
|
167 |
*/
|
168 |
public static function sort() {
|
|
|
169 |
/*
|
170 |
* Example:
|
171 |
array(
|
@@ -188,6 +196,7 @@ class Visual_Portfolio_Extend {
|
|
188 |
* @return array
|
189 |
*/
|
190 |
public static function sort_controls( $name, $controls ) {
|
|
|
191 |
/*
|
192 |
* Example:
|
193 |
array(
|
@@ -203,6 +212,7 @@ class Visual_Portfolio_Extend {
|
|
203 |
* @return array
|
204 |
*/
|
205 |
public static function pagination() {
|
|
|
206 |
/*
|
207 |
* Example:
|
208 |
array(
|
@@ -225,6 +235,7 @@ class Visual_Portfolio_Extend {
|
|
225 |
* @return array
|
226 |
*/
|
227 |
public static function pagination_controls( $name, $controls ) {
|
|
|
228 |
/*
|
229 |
* Example:
|
230 |
array(
|
@@ -242,6 +253,7 @@ class Visual_Portfolio_Extend {
|
|
242 |
* @return array
|
243 |
*/
|
244 |
public static function portfolio_attrs( $attrs, $options ) {
|
|
|
245 |
/*
|
246 |
* Example:
|
247 |
array(
|
@@ -270,6 +282,7 @@ class Visual_Portfolio_Extend {
|
|
270 |
* @return array
|
271 |
*/
|
272 |
public static function image_controls( $controls, $name ) {
|
|
|
273 |
/*
|
274 |
* Example:
|
275 |
array(
|
@@ -293,10 +306,11 @@ class Visual_Portfolio_Extend {
|
|
293 |
*
|
294 |
* @param array $args - query arguments.
|
295 |
* @param string $options - portfolio options.
|
|
|
296 |
* @return array
|
297 |
*/
|
298 |
-
public static function query_args( $args, $options ) {
|
299 |
-
return apply_filters( 'vpf_extend_query_args', $args, $options );
|
300 |
}
|
301 |
|
302 |
/**
|
@@ -307,6 +321,7 @@ class Visual_Portfolio_Extend {
|
|
307 |
* @return array
|
308 |
*/
|
309 |
public static function filter_items( $items, $options ) {
|
|
|
310 |
/*
|
311 |
* Example:
|
312 |
array(
|
@@ -337,6 +352,7 @@ class Visual_Portfolio_Extend {
|
|
337 |
* @return array
|
338 |
*/
|
339 |
public static function sort_items( $items, $options ) {
|
|
|
340 |
/*
|
341 |
* Example:
|
342 |
array(
|
25 |
* @return array
|
26 |
*/
|
27 |
public static function layouts() {
|
28 |
+
// phpcs:ignore
|
29 |
/*
|
30 |
* Example:
|
31 |
array(
|
48 |
* @return array
|
49 |
*/
|
50 |
public static function layout_controls( $name, $controls ) {
|
51 |
+
// phpcs:ignore
|
52 |
/*
|
53 |
* Example:
|
54 |
array(
|
64 |
* @return array
|
65 |
*/
|
66 |
public static function tiles() {
|
67 |
+
// phpcs:ignore
|
68 |
/*
|
69 |
* Example:
|
70 |
array(
|
87 |
* @return array
|
88 |
*/
|
89 |
public static function items_styles() {
|
90 |
+
// phpcs:ignore
|
91 |
/*
|
92 |
* Example:
|
93 |
array(
|
118 |
* @return array
|
119 |
*/
|
120 |
public static function item_style_controls( $name, $controls ) {
|
121 |
+
// phpcs:ignore
|
122 |
/*
|
123 |
* Example:
|
124 |
array(
|
134 |
* @return array
|
135 |
*/
|
136 |
public static function filters() {
|
137 |
+
// phpcs:ignore
|
138 |
/*
|
139 |
* Example:
|
140 |
array(
|
157 |
* @return array
|
158 |
*/
|
159 |
public static function filter_controls( $name, $controls ) {
|
160 |
+
// phpcs:ignore
|
161 |
/*
|
162 |
* Example:
|
163 |
array(
|
173 |
* @return array
|
174 |
*/
|
175 |
public static function sort() {
|
176 |
+
// phpcs:ignore
|
177 |
/*
|
178 |
* Example:
|
179 |
array(
|
196 |
* @return array
|
197 |
*/
|
198 |
public static function sort_controls( $name, $controls ) {
|
199 |
+
// phpcs:ignore
|
200 |
/*
|
201 |
* Example:
|
202 |
array(
|
212 |
* @return array
|
213 |
*/
|
214 |
public static function pagination() {
|
215 |
+
// phpcs:ignore
|
216 |
/*
|
217 |
* Example:
|
218 |
array(
|
235 |
* @return array
|
236 |
*/
|
237 |
public static function pagination_controls( $name, $controls ) {
|
238 |
+
// phpcs:ignore
|
239 |
/*
|
240 |
* Example:
|
241 |
array(
|
253 |
* @return array
|
254 |
*/
|
255 |
public static function portfolio_attrs( $attrs, $options ) {
|
256 |
+
// phpcs:ignore
|
257 |
/*
|
258 |
* Example:
|
259 |
array(
|
282 |
* @return array
|
283 |
*/
|
284 |
public static function image_controls( $controls, $name ) {
|
285 |
+
// phpcs:ignore
|
286 |
/*
|
287 |
* Example:
|
288 |
array(
|
306 |
*
|
307 |
* @param array $args - query arguments.
|
308 |
* @param string $options - portfolio options.
|
309 |
+
* @param string $id - portfolio id.
|
310 |
* @return array
|
311 |
*/
|
312 |
+
public static function query_args( $args, $options, $id ) {
|
313 |
+
return apply_filters( 'vpf_extend_query_args', $args, $options, $id );
|
314 |
}
|
315 |
|
316 |
/**
|
321 |
* @return array
|
322 |
*/
|
323 |
public static function filter_items( $items, $options ) {
|
324 |
+
// phpcs:ignore
|
325 |
/*
|
326 |
* Example:
|
327 |
array(
|
352 |
* @return array
|
353 |
*/
|
354 |
public static function sort_items( $items, $options ) {
|
355 |
+
// phpcs:ignore
|
356 |
/*
|
357 |
* Example:
|
358 |
array(
|
classes/class-get-portfolio.php
CHANGED
@@ -39,13 +39,6 @@ class Visual_Portfolio_Get {
|
|
39 |
*/
|
40 |
private static $id = 0;
|
41 |
|
42 |
-
/**
|
43 |
-
* Scripts enqueued flag
|
44 |
-
*
|
45 |
-
* @var bool
|
46 |
-
*/
|
47 |
-
private static $scripts_enqueued = false;
|
48 |
-
|
49 |
/**
|
50 |
* ID of the current printed single filter
|
51 |
*
|
@@ -86,7 +79,7 @@ class Visual_Portfolio_Get {
|
|
86 |
*
|
87 |
* @var array
|
88 |
*/
|
89 |
-
static
|
90 |
|
91 |
/**
|
92 |
* Get all available options of post.
|
@@ -161,6 +154,8 @@ class Visual_Portfolio_Get {
|
|
161 |
return '';
|
162 |
}
|
163 |
|
|
|
|
|
164 |
self::$used_layouts[] = $atts['id'];
|
165 |
|
166 |
// generate unique ID.
|
@@ -168,7 +163,6 @@ class Visual_Portfolio_Get {
|
|
168 |
$uid = hash( 'crc32b', $uid . $atts['id'] );
|
169 |
|
170 |
$options = self::get_options( $atts['id'] );
|
171 |
-
|
172 |
$class = 'vp-portfolio vp-uid-' . $uid;
|
173 |
|
174 |
// Add ID to class.
|
@@ -195,11 +189,11 @@ class Visual_Portfolio_Get {
|
|
195 |
$no_image = Visual_Portfolio_Settings::get_option( 'no_image', 'vp_general', false );
|
196 |
|
197 |
// prepare image sizes.
|
198 |
-
$img_size_popup
|
199 |
$img_size_md_popup = 'vp_md_popup';
|
200 |
$img_size_sm_popup = 'vp_sm_popup';
|
201 |
-
$img_size
|
202 |
-
$columns_count
|
203 |
|
204 |
switch ( $options['vp_layout'] ) {
|
205 |
case 'masonry':
|
@@ -238,13 +232,20 @@ class Visual_Portfolio_Get {
|
|
238 |
$old_post = $GLOBALS['post'];
|
239 |
|
240 |
$is_images = 'images' === $options['vp_content_source'];
|
241 |
-
if ( $is_images ) {
|
242 |
-
$query_opts = self::get_query_params( $options );
|
243 |
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
} else {
|
246 |
// Get query params.
|
247 |
-
$query_opts = self::get_query_params( $options );
|
248 |
|
249 |
// get Post List.
|
250 |
$portfolio_query = new WP_Query( $query_opts );
|
@@ -259,7 +260,7 @@ class Visual_Portfolio_Get {
|
|
259 |
) : false;
|
260 |
|
261 |
// No items found.
|
262 |
-
if ( $is_images && empty( $query_opts['images'] ) || isset( $portfolio_query ) && ! $portfolio_query->have_posts() ) {
|
263 |
ob_start();
|
264 |
self::notice( esc_html__( 'No items found.', 'visual-portfolio' ) );
|
265 |
$return = ob_get_contents();
|
@@ -271,13 +272,13 @@ class Visual_Portfolio_Get {
|
|
271 |
|
272 |
// prepare data-attributes.
|
273 |
$is_preview = self::is_preview();
|
274 |
-
$data_atts
|
275 |
-
'data-vp-layout'
|
276 |
-
'data-vp-items-style'
|
277 |
'data-vp-items-click-action' => $options['vp_items_click_action'],
|
278 |
-
'data-vp-items-gap'
|
279 |
-
'data-vp-pagination'
|
280 |
-
'data-vp-next-page-url'
|
281 |
);
|
282 |
|
283 |
if ( 'tiles' === $options['vp_layout'] || $is_preview ) {
|
@@ -290,7 +291,7 @@ class Visual_Portfolio_Get {
|
|
290 |
$data_atts['data-vp-grid-columns'] = $options['vp_grid_columns'];
|
291 |
}
|
292 |
if ( 'justified' === $options['vp_layout'] || $is_preview ) {
|
293 |
-
$data_atts['data-vp-justified-row-height']
|
294 |
$data_atts['data-vp-justified-row-height-tolerance'] = $options['vp_justified_row_height_tolerance'];
|
295 |
}
|
296 |
|
@@ -302,11 +303,11 @@ class Visual_Portfolio_Get {
|
|
302 |
$data_atts['data-vp-slider-items-height'] = 'auto';
|
303 |
break;
|
304 |
case 'static':
|
305 |
-
$data_atts['data-vp-slider-items-height']
|
306 |
$data_atts['data-vp-slider-items-min-height'] = $options['vp_slider_items_min_height'];
|
307 |
break;
|
308 |
case 'dynamic':
|
309 |
-
$data_atts['data-vp-slider-items-height']
|
310 |
$data_atts['data-vp-slider-items-min-height'] = $options['vp_slider_items_min_height'];
|
311 |
break;
|
312 |
// no default.
|
@@ -317,40 +318,40 @@ class Visual_Portfolio_Get {
|
|
317 |
$data_atts['data-vp-slider-slides-per-view'] = 'auto';
|
318 |
break;
|
319 |
case 'custom':
|
320 |
-
$data_atts['data-vp-slider-slides-per-view'] = $options['vp_slider_slides_per_view_custom'] ? : '3';
|
321 |
break;
|
322 |
// no default.
|
323 |
}
|
324 |
|
325 |
-
$data_atts['data-vp-slider-speed']
|
326 |
-
$data_atts['data-vp-slider-autoplay']
|
327 |
$data_atts['data-vp-slider-autoplay-hover-pause'] = $options['vp_slider_autoplay_hover_pause'] ? 'true' : 'false';
|
328 |
-
$data_atts['data-vp-slider-centered-slides']
|
329 |
-
$data_atts['data-vp-slider-loop']
|
330 |
-
$data_atts['data-vp-slider-free-mode']
|
331 |
-
$data_atts['data-vp-slider-free-mode-sticky']
|
332 |
-
$data_atts['data-vp-slider-arrows']
|
333 |
-
$data_atts['data-vp-slider-arrows-icon-prev']
|
334 |
-
$data_atts['data-vp-slider-arrows-icon-next']
|
335 |
-
$data_atts['data-vp-slider-bullets']
|
336 |
-
$data_atts['data-vp-slider-bullets-dynamic']
|
337 |
-
$data_atts['data-vp-slider-mousewheel']
|
338 |
|
339 |
$data_atts['data-vp-slider-thumbnails'] = $options['vp_slider_thumbnails'] ? 'true' : 'false';
|
340 |
|
341 |
if ( $options['vp_slider_thumbnails'] ) {
|
342 |
$data_atts['data-vp-slider-thumbnails-height'] = 'auto';
|
343 |
-
$data_atts['data-vp-slider-thumbnails-gap']
|
344 |
|
345 |
switch ( $options['vp_slider_thumbnails_height_type'] ) {
|
346 |
case 'auto':
|
347 |
$data_atts['data-vp-slider-thumbnails-height'] = 'auto';
|
348 |
break;
|
349 |
case 'static':
|
350 |
-
$data_atts['data-vp-slider-thumbnails-height'] = ( $options['vp_slider_thumbnails_height_static'] ? : '100' ) . 'px';
|
351 |
break;
|
352 |
case 'dynamic':
|
353 |
-
$data_atts['data-vp-slider-thumbnails-height'] = ( $options['vp_slider_thumbnails_height_dynamic'] ? : '30' ) . '%';
|
354 |
break;
|
355 |
// no default.
|
356 |
}
|
@@ -360,7 +361,7 @@ class Visual_Portfolio_Get {
|
|
360 |
$data_atts['data-vp-slider-thumbnails-per-view'] = 'auto';
|
361 |
break;
|
362 |
case 'custom':
|
363 |
-
$data_atts['data-vp-slider-thumbnails-per-view'] = $options['vp_slider_thumbnails_per_view_custom'] ? : '6';
|
364 |
break;
|
365 |
// no default.
|
366 |
}
|
@@ -390,12 +391,13 @@ class Visual_Portfolio_Get {
|
|
390 |
|
391 |
<?php
|
392 |
// get options for the current style.
|
393 |
-
$style_options
|
394 |
$style_options_slug = 'vp_items_style_' . $options['vp_items_style'] . '__';
|
395 |
foreach ( $options as $k => $opt ) {
|
396 |
// add option to array.
|
397 |
if ( substr( $k, 0, strlen( $style_options_slug ) ) === $style_options_slug ) {
|
398 |
$opt_name = str_replace( $style_options_slug, '', $k );
|
|
|
399 |
$style_options[ $opt_name ] = $opt;
|
400 |
}
|
401 |
|
@@ -434,7 +436,7 @@ class Visual_Portfolio_Get {
|
|
434 |
}
|
435 |
|
436 |
// Prepare thumbnails.
|
437 |
-
$slider_thumbnails
|
438 |
$slider_thumbnails_enable = 'slider' === $options['vp_layout'] && $options['vp_slider_thumbnails'];
|
439 |
?>
|
440 |
|
@@ -442,26 +444,26 @@ class Visual_Portfolio_Get {
|
|
442 |
<div class="vp-portfolio__items vp-portfolio__items-style-<?php echo esc_attr( $options['vp_items_style'] ); ?>">
|
443 |
<?php
|
444 |
$each_item_args = array(
|
445 |
-
'post_id'
|
446 |
-
'url'
|
447 |
-
'title'
|
448 |
-
'excerpt'
|
449 |
-
'comments_number'
|
450 |
-
'format'
|
451 |
-
'published'
|
452 |
-
'published_time'
|
453 |
-
'filter'
|
454 |
-
'video'
|
455 |
-
'image_id'
|
456 |
'image_allowed_html' => array(
|
457 |
'img' => array(
|
458 |
-
'src'
|
459 |
-
'srcset'
|
460 |
-
'sizes'
|
461 |
-
'alt'
|
462 |
-
'class'
|
463 |
-
'width'
|
464 |
-
'height'
|
465 |
|
466 |
// Lazyload support.
|
467 |
'data-vpf-src' => array(),
|
@@ -470,36 +472,41 @@ class Visual_Portfolio_Get {
|
|
470 |
'data-no-lazy' => array(),
|
471 |
),
|
472 |
),
|
473 |
-
'img_size_popup'
|
474 |
-
'img_size_md_popup'
|
475 |
-
'img_size_sm_popup'
|
476 |
-
'img_size'
|
477 |
-
'no_image'
|
478 |
-
'categories'
|
479 |
-
'opts'
|
480 |
-
'vp_opts'
|
481 |
);
|
482 |
|
483 |
-
if ( $is_images )
|
|
|
|
|
|
|
|
|
484 |
foreach ( $query_opts['images'] as $img ) {
|
485 |
// Get category taxonomies for data filter.
|
486 |
-
$filter_values
|
487 |
-
$categories
|
488 |
|
489 |
if ( isset( $img['categories'] ) && is_array( $img['categories'] ) ) {
|
490 |
foreach ( $img['categories'] as $cat ) {
|
491 |
$slug = self::create_slug( $cat );
|
492 |
-
if ( ! in_array( $slug, $filter_values ) ) {
|
493 |
// add in filter.
|
494 |
$filter_values[] = $slug;
|
495 |
|
496 |
// add in categories array.
|
497 |
$url = self::get_pagenum_link(
|
498 |
array(
|
499 |
-
'vp_filter' =>
|
500 |
-
'vp_page'
|
501 |
)
|
502 |
);
|
|
|
503 |
$categories[] = array(
|
504 |
'slug' => $slug,
|
505 |
'label' => $cat,
|
@@ -514,18 +521,22 @@ class Visual_Portfolio_Get {
|
|
514 |
}
|
515 |
}
|
516 |
|
517 |
-
$args =
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
|
|
|
|
|
|
|
|
529 |
);
|
530 |
|
531 |
$slider_thumbnails[] = $args['image_id'];
|
@@ -541,7 +552,7 @@ class Visual_Portfolio_Get {
|
|
541 |
|
542 |
self::each_item( $args );
|
543 |
}
|
544 |
-
}
|
545 |
while ( $portfolio_query->have_posts() ) {
|
546 |
$portfolio_query->the_post();
|
547 |
|
@@ -561,7 +572,7 @@ class Visual_Portfolio_Get {
|
|
561 |
|
562 |
$category = get_the_terms( $the_post, $cat );
|
563 |
|
564 |
-
if ( $category && ! in_array( $category, $filter_values ) ) {
|
565 |
foreach ( $category as $key => $cat_item ) {
|
566 |
// add in filter.
|
567 |
$filter_values[] = $cat_item->slug;
|
@@ -570,8 +581,8 @@ class Visual_Portfolio_Get {
|
|
570 |
$unique_name = $cat_item->taxonomy . ':' . $cat_item->slug;
|
571 |
$url = self::get_pagenum_link(
|
572 |
array(
|
573 |
-
'vp_filter' =>
|
574 |
-
'vp_page'
|
575 |
)
|
576 |
);
|
577 |
$categories[] = array(
|
@@ -588,17 +599,22 @@ class Visual_Portfolio_Get {
|
|
588 |
}
|
589 |
}
|
590 |
|
591 |
-
$args =
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
|
|
|
|
|
|
|
|
|
|
602 |
);
|
603 |
|
604 |
$args['allow_popup'] = isset( $args['image_id'] ) && $args['image_id'];
|
@@ -663,9 +679,10 @@ class Visual_Portfolio_Get {
|
|
663 |
|
664 |
<?php
|
665 |
self::pagination(
|
666 |
-
$options,
|
667 |
-
|
668 |
-
'
|
|
|
669 |
'next_page_url' => $next_page_url,
|
670 |
)
|
671 |
);
|
@@ -679,8 +696,11 @@ class Visual_Portfolio_Get {
|
|
679 |
// phpcs:ignore
|
680 |
$GLOBALS['post'] = $old_post;
|
681 |
|
|
|
|
|
682 |
$return = ob_get_contents();
|
683 |
ob_end_clean();
|
|
|
684 |
return $return;
|
685 |
}
|
686 |
|
@@ -695,9 +715,10 @@ class Visual_Portfolio_Get {
|
|
695 |
$options = self::get_options( $atts['id'] );
|
696 |
|
697 |
$options = array_merge(
|
698 |
-
$options,
|
699 |
-
|
700 |
-
'
|
|
|
701 |
'vp_filter_show_count' => 'true' === $atts['show_count'],
|
702 |
)
|
703 |
);
|
@@ -736,8 +757,9 @@ class Visual_Portfolio_Get {
|
|
736 |
$options = self::get_options( $atts['id'] );
|
737 |
|
738 |
$options = array_merge(
|
739 |
-
$options,
|
740 |
-
|
|
|
741 |
'vp_sort_align' => $atts['align'],
|
742 |
)
|
743 |
);
|
@@ -772,6 +794,7 @@ class Visual_Portfolio_Get {
|
|
772 |
* @return int
|
773 |
*/
|
774 |
private static function get_current_page_number() {
|
|
|
775 |
return max( 1, isset( $_GET['vp_page'] ) ? (int) $_GET['vp_page'] : 1 );
|
776 |
}
|
777 |
|
@@ -780,8 +803,6 @@ class Visual_Portfolio_Get {
|
|
780 |
* thanks to https://gist.github.com/hlashbrooke/6298714 .
|
781 |
*/
|
782 |
private static function get_rand_seed_session() {
|
783 |
-
// phpcs:disable WordPress.VIP.SessionVariableUsage.SessionVarsProhibited
|
784 |
-
|
785 |
// already prepared.
|
786 |
if ( self::$rand_seed_session ) {
|
787 |
return self::$rand_seed_session;
|
@@ -801,12 +822,11 @@ class Visual_Portfolio_Get {
|
|
801 |
|
802 |
// Set new vpf_random_seed if none exists.
|
803 |
if ( ! self::$rand_seed_session ) {
|
804 |
-
|
|
|
805 |
$_SESSION['vpf_random_seed'] = self::$rand_seed_session;
|
806 |
}
|
807 |
|
808 |
-
// phpcs:enable WordPress.VIP.SessionVariableUsage.SessionVarsProhibited
|
809 |
-
|
810 |
return self::$rand_seed_session;
|
811 |
}
|
812 |
|
@@ -815,10 +835,11 @@ class Visual_Portfolio_Get {
|
|
815 |
*
|
816 |
* @param array $options portfolio options.
|
817 |
* @param bool $for_filter prevent retrieving GET variable if used for filter.
|
|
|
818 |
*
|
819 |
* @return array
|
820 |
*/
|
821 |
-
private static function get_query_params( $options, $for_filter = false ) {
|
822 |
$query_opts = array();
|
823 |
|
824 |
$is_images = 'images' === $options['vp_content_source'];
|
@@ -838,7 +859,10 @@ class Visual_Portfolio_Get {
|
|
838 |
|
839 |
// Load certain taxonomies.
|
840 |
$images = array();
|
|
|
|
|
841 |
if ( ! $for_filter && isset( $_GET['vp_filter'] ) ) {
|
|
|
842 |
$category = sanitize_text_field( wp_unslash( $_GET['vp_filter'] ) );
|
843 |
|
844 |
foreach ( (array) $options['vp_images'] as $img ) {
|
@@ -858,12 +882,12 @@ class Visual_Portfolio_Get {
|
|
858 |
// prepare titles and descriptions.
|
859 |
foreach ( $images as $k => $img ) {
|
860 |
$img_meta = array(
|
861 |
-
'title'
|
862 |
'description' => '',
|
863 |
-
'caption'
|
864 |
-
'alt'
|
865 |
-
'none'
|
866 |
-
'date'
|
867 |
);
|
868 |
|
869 |
$attachment = get_post( $img['id'] );
|
@@ -872,10 +896,10 @@ class Visual_Portfolio_Get {
|
|
872 |
// get image meta if needed.
|
873 |
if ( 'none' !== $options['vp_images_titles_source'] || 'none' !== $options['vp_images_descriptions_source'] ) {
|
874 |
if ( $attachment && 'attachment' === $attachment->post_type ) {
|
875 |
-
$img_meta['title']
|
876 |
$img_meta['description'] = $attachment->post_content;
|
877 |
-
$img_meta['caption']
|
878 |
-
$img_meta['alt']
|
879 |
}
|
880 |
}
|
881 |
|
@@ -895,7 +919,7 @@ class Visual_Portfolio_Get {
|
|
895 |
}
|
896 |
|
897 |
// order.
|
898 |
-
$custom_order
|
899 |
$custom_order_direction = $options['vp_images_order_direction'];
|
900 |
|
901 |
if ( isset( $options['vp_images_order_by'] ) ) {
|
@@ -903,21 +927,23 @@ class Visual_Portfolio_Get {
|
|
903 |
}
|
904 |
|
905 |
// custom sorting.
|
|
|
906 |
if ( isset( $_GET['vp_sort'] ) ) {
|
|
|
907 |
$custom_get_order = sanitize_text_field( wp_unslash( $_GET['vp_sort'] ) );
|
908 |
|
909 |
switch ( $custom_get_order ) {
|
910 |
case 'title':
|
911 |
case 'date':
|
912 |
-
$custom_order
|
913 |
$custom_order_direction = 'asc';
|
914 |
break;
|
915 |
case 'title_desc':
|
916 |
-
$custom_order
|
917 |
$custom_order_direction = 'desc';
|
918 |
break;
|
919 |
case 'date_desc':
|
920 |
-
$custom_order
|
921 |
$custom_order_direction = 'desc';
|
922 |
break;
|
923 |
}
|
@@ -927,9 +953,9 @@ class Visual_Portfolio_Get {
|
|
927 |
switch ( $custom_order ) {
|
928 |
case 'date':
|
929 |
case 'title':
|
930 |
-
$sort_tmp
|
931 |
$new_images = array();
|
932 |
-
$sort_by
|
933 |
|
934 |
if ( 'title' === $custom_order ) {
|
935 |
$sort_by = 'title';
|
@@ -947,13 +973,17 @@ class Visual_Portfolio_Get {
|
|
947 |
$images = $new_images;
|
948 |
break;
|
949 |
case 'rand':
|
|
|
950 |
mt_srand( self::get_rand_seed_session() );
|
|
|
951 |
for ( $i = count( $images ) - 1; $i > 0; $i-- ) {
|
952 |
-
|
953 |
-
$
|
|
|
954 |
$images[ $i ] = $images[ $j ];
|
955 |
$images[ $j ] = $tmp;
|
956 |
}
|
|
|
957 |
break;
|
958 |
}
|
959 |
if ( 'desc' === $custom_order_direction ) {
|
@@ -965,11 +995,11 @@ class Visual_Portfolio_Get {
|
|
965 |
$query_opts['max_num_pages'] = ceil( count( $images ) / $count );
|
966 |
|
967 |
$start_from_item = ( $paged - 1 ) * $count;
|
968 |
-
$end_on_item
|
969 |
|
970 |
if ( $for_filter ) {
|
971 |
$start_from_item = 0;
|
972 |
-
$end_on_item
|
973 |
}
|
974 |
|
975 |
// get images for current page only.
|
@@ -981,12 +1011,12 @@ class Visual_Portfolio_Get {
|
|
981 |
}
|
982 |
} else {
|
983 |
$query_opts = array(
|
984 |
-
'showposts'
|
985 |
'posts_per_page' => $count,
|
986 |
-
'paged'
|
987 |
-
'orderby'
|
988 |
-
'order'
|
989 |
-
'post_type'
|
990 |
);
|
991 |
|
992 |
// Post based.
|
@@ -1029,7 +1059,7 @@ class Visual_Portfolio_Get {
|
|
1029 |
$query_opts['order'] = $options['vp_posts_order_direction'];
|
1030 |
|
1031 |
if ( 'ids' === $options['vp_posts_source'] ) { // IDs.
|
1032 |
-
$query_opts['post_type']
|
1033 |
$query_opts['post__not_in'] = array();
|
1034 |
|
1035 |
if ( ! empty( $options['vp_posts_ids'] ) ) {
|
@@ -1052,19 +1082,28 @@ class Visual_Portfolio_Get {
|
|
1052 |
array(
|
1053 |
'public' => false,
|
1054 |
'name' => 'attachment',
|
1055 |
-
),
|
|
|
|
|
1056 |
)
|
1057 |
)
|
1058 |
);
|
1059 |
|
|
|
1060 |
$query_opts['tax_query'] = array(
|
1061 |
'relation' => $options['vp_posts_taxonomies_relation'],
|
1062 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
1063 |
foreach ( $options['vp_posts_taxonomies'] as $taxonomy ) {
|
1064 |
$taxonomy_name = null;
|
1065 |
|
1066 |
foreach ( $terms_list as $term ) {
|
1067 |
-
if ( $term->term_id
|
1068 |
$taxonomy_name = $term->taxonomy;
|
1069 |
continue;
|
1070 |
}
|
@@ -1079,55 +1118,65 @@ class Visual_Portfolio_Get {
|
|
1079 |
}
|
1080 |
}
|
1081 |
}
|
1082 |
-
}
|
1083 |
|
1084 |
// Avoid duplicate posts.
|
1085 |
if ( $options['vp_posts_avoid_duplicate_posts'] ) {
|
1086 |
-
$not_id
|
1087 |
$query_opts['post__not_in'] = array_merge( $not_id, self::get_all_used_posts() );
|
|
|
|
|
|
|
|
|
|
|
1088 |
}
|
1089 |
-
}
|
1090 |
|
1091 |
// Custom sorting.
|
|
|
1092 |
if ( isset( $_GET['vp_sort'] ) ) {
|
1093 |
-
|
1094 |
-
$
|
|
|
1095 |
$custom_order_direction = false;
|
1096 |
|
1097 |
switch ( $custom_get_order ) {
|
1098 |
case 'title':
|
1099 |
case 'date':
|
1100 |
-
$custom_order
|
1101 |
$custom_order_direction = 'asc';
|
1102 |
break;
|
1103 |
case 'title_desc':
|
1104 |
-
$custom_order
|
1105 |
$custom_order_direction = 'desc';
|
1106 |
break;
|
1107 |
case 'date_desc':
|
1108 |
-
$custom_order
|
1109 |
$custom_order_direction = 'desc';
|
1110 |
break;
|
1111 |
}
|
1112 |
|
1113 |
if ( $custom_order && $custom_order_direction ) {
|
1114 |
$query_opts['orderby'] = $custom_order;
|
1115 |
-
$query_opts['order']
|
1116 |
}
|
1117 |
}
|
1118 |
|
1119 |
// Load certain taxonomies using custom filter.
|
|
|
1120 |
if ( ! $for_filter && isset( $_GET['vp_filter'] ) ) {
|
|
|
1121 |
$taxonomies = sanitize_text_field( wp_unslash( $_GET['vp_filter'] ) );
|
1122 |
$taxonomies = explode( ':', $taxonomies );
|
1123 |
|
1124 |
if ( $taxonomies && isset( $taxonomies[0] ) && isset( $taxonomies[1] ) ) {
|
|
|
1125 |
$query_opts['tax_query'] = array(
|
1126 |
'relation' => 'AND',
|
1127 |
array(
|
1128 |
'taxonomy' => $taxonomies[0],
|
1129 |
-
'field'
|
1130 |
-
'terms'
|
1131 |
),
|
1132 |
isset( $query_opts['tax_query'] ) ? $query_opts['tax_query'] : '',
|
1133 |
);
|
@@ -1135,7 +1184,7 @@ class Visual_Portfolio_Get {
|
|
1135 |
}
|
1136 |
}
|
1137 |
|
1138 |
-
$query_opts = Visual_Portfolio_Extend::query_args( $query_opts, $options );
|
1139 |
|
1140 |
return $query_opts;
|
1141 |
}
|
@@ -1145,12 +1194,13 @@ class Visual_Portfolio_Get {
|
|
1145 |
*
|
1146 |
* @param string $notice notice string.
|
1147 |
*/
|
1148 |
-
|
1149 |
if ( ! $notice ) {
|
1150 |
return;
|
1151 |
}
|
1152 |
visual_portfolio()->include_template(
|
1153 |
-
'notices/notices',
|
|
|
1154 |
'notice' => $notice,
|
1155 |
)
|
1156 |
);
|
@@ -1167,17 +1217,21 @@ class Visual_Portfolio_Get {
|
|
1167 |
return;
|
1168 |
}
|
1169 |
|
1170 |
-
$terms
|
1171 |
$there_is_active = false;
|
1172 |
-
$is_images
|
|
|
1173 |
|
1174 |
// Get active item.
|
1175 |
$active_item = false;
|
|
|
|
|
1176 |
if ( isset( $_GET['vp_filter'] ) ) {
|
|
|
1177 |
$active_item = sanitize_text_field( wp_unslash( $_GET['vp_filter'] ) );
|
1178 |
}
|
1179 |
|
1180 |
-
if ( $is_images ) {
|
1181 |
$query_opts = self::get_query_params( $vp_options, true );
|
1182 |
|
1183 |
// calculate categories count.
|
@@ -1194,10 +1248,10 @@ class Visual_Portfolio_Get {
|
|
1194 |
if ( isset( $img['categories'] ) && is_array( $img['categories'] ) ) {
|
1195 |
foreach ( $img['categories'] as $cat ) {
|
1196 |
$slug = self::create_slug( $cat );
|
1197 |
-
$url
|
1198 |
array(
|
1199 |
-
'vp_filter' =>
|
1200 |
-
'vp_page'
|
1201 |
)
|
1202 |
);
|
1203 |
|
@@ -1225,19 +1279,18 @@ class Visual_Portfolio_Get {
|
|
1225 |
$query_opts = self::get_query_params( $vp_options, true );
|
1226 |
|
1227 |
// Get all available categories for current $query_opts.
|
1228 |
-
// phpcs:ignore
|
1229 |
$query_opts['posts_per_page'] = -1;
|
1230 |
-
$query_opts['showposts']
|
1231 |
-
$query_opts['paged']
|
1232 |
|
1233 |
/**
|
1234 |
* TODO: make caching using set_transient function. Info here - https://wordpress.stackexchange.com/a/145960
|
1235 |
*/
|
1236 |
-
$term_ids
|
1237 |
$term_taxonomies = array();
|
1238 |
|
1239 |
// stupid hack as wp_reset_postdata() function is not working for me...
|
1240 |
-
$old_post
|
1241 |
$portfolio_query = new WP_Query( $query_opts );
|
1242 |
while ( $portfolio_query->have_posts() ) {
|
1243 |
$portfolio_query->the_post();
|
@@ -1257,10 +1310,10 @@ class Visual_Portfolio_Get {
|
|
1257 |
|
1258 |
// Prepare each terms array.
|
1259 |
foreach ( $category as $key => $cat_item ) {
|
1260 |
-
if ( ! in_array( $cat_item->term_id, $term_ids ) ) {
|
1261 |
$term_ids[] = $cat_item->term_id;
|
1262 |
}
|
1263 |
-
if ( ! in_array( $cat_item->taxonomy, $term_taxonomies ) ) {
|
1264 |
$term_taxonomies[] = $cat_item->taxonomy;
|
1265 |
}
|
1266 |
}
|
@@ -1276,20 +1329,20 @@ class Visual_Portfolio_Get {
|
|
1276 |
// we need this to support reordering plugins.
|
1277 |
$all_terms = get_terms(
|
1278 |
array(
|
1279 |
-
'taxonomy'
|
1280 |
'hide_empty' => true,
|
1281 |
)
|
1282 |
);
|
1283 |
|
1284 |
if ( isset( $all_terms ) && is_array( $all_terms ) ) {
|
1285 |
foreach ( $all_terms as $term ) {
|
1286 |
-
if ( in_array( $term->term_id, $term_ids ) ) {
|
1287 |
$unique_name = $term->taxonomy . ':' . $term->slug;
|
1288 |
|
1289 |
$url = self::get_pagenum_link(
|
1290 |
array(
|
1291 |
-
'vp_filter' =>
|
1292 |
-
'vp_page'
|
1293 |
)
|
1294 |
);
|
1295 |
|
@@ -1317,7 +1370,8 @@ class Visual_Portfolio_Get {
|
|
1317 |
// Add 'All' active item.
|
1318 |
if ( $vp_options['vp_filter_text_all'] ) {
|
1319 |
array_unshift(
|
1320 |
-
$terms,
|
|
|
1321 |
'filter' => '*',
|
1322 |
'label' => $vp_options['vp_filter_text_all'],
|
1323 |
'description' => false,
|
@@ -1328,7 +1382,7 @@ class Visual_Portfolio_Get {
|
|
1328 |
'url' => self::get_pagenum_link(
|
1329 |
array(
|
1330 |
'vp_filter' => '',
|
1331 |
-
'vp_page'
|
1332 |
)
|
1333 |
),
|
1334 |
'class' => 'vp-filter__item' . ( ! $there_is_active ? ' vp-filter__item-active' : '' ),
|
@@ -1337,12 +1391,13 @@ class Visual_Portfolio_Get {
|
|
1337 |
}
|
1338 |
|
1339 |
// get options for the current filter.
|
1340 |
-
$filter_options
|
1341 |
$filter_options_slug = 'vp_filter_' . $vp_options['vp_filter'] . '__';
|
|
|
1342 |
foreach ( $vp_options as $k => $opt ) {
|
1343 |
// add option to array.
|
1344 |
if ( substr( $k, 0, strlen( $filter_options_slug ) ) === $filter_options_slug ) {
|
1345 |
-
$opt_name
|
1346 |
$filter_options[ $opt_name ] = $opt;
|
1347 |
}
|
1348 |
|
@@ -1353,12 +1408,12 @@ class Visual_Portfolio_Get {
|
|
1353 |
}
|
1354 |
|
1355 |
$args = array(
|
1356 |
-
'class'
|
1357 |
-
'items'
|
1358 |
-
'align'
|
1359 |
'show_count' => $vp_options['vp_filter_show_count'],
|
1360 |
-
'opts'
|
1361 |
-
'vp_opts'
|
1362 |
);
|
1363 |
|
1364 |
if ( $vp_options['vp_filter_align'] ) {
|
@@ -1396,22 +1451,28 @@ class Visual_Portfolio_Get {
|
|
1396 |
|
1397 |
// Get active item.
|
1398 |
$active_item = false;
|
|
|
|
|
1399 |
if ( isset( $_GET['vp_sort'] ) ) {
|
|
|
1400 |
$active_item = sanitize_text_field( wp_unslash( $_GET['vp_sort'] ) );
|
1401 |
}
|
1402 |
|
1403 |
-
$sort_items = Visual_Portfolio_Extend::sort_items(
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
|
|
|
|
|
|
1410 |
|
1411 |
foreach ( $sort_items as $slug => $label ) {
|
1412 |
$url = self::get_pagenum_link(
|
1413 |
array(
|
1414 |
-
'vp_sort' =>
|
1415 |
'vp_page' => 1,
|
1416 |
)
|
1417 |
);
|
@@ -1430,12 +1491,13 @@ class Visual_Portfolio_Get {
|
|
1430 |
}
|
1431 |
|
1432 |
// get options for the current sort.
|
1433 |
-
$sort_options
|
1434 |
$sort_options_slug = 'vp_sort_' . $vp_options['vp_sort'] . '__';
|
|
|
1435 |
foreach ( $vp_options as $k => $opt ) {
|
1436 |
// add option to array.
|
1437 |
if ( substr( $k, 0, strlen( $sort_options_slug ) ) === $sort_options_slug ) {
|
1438 |
-
$opt_name
|
1439 |
$sort_options[ $opt_name ] = $opt;
|
1440 |
}
|
1441 |
|
@@ -1446,11 +1508,11 @@ class Visual_Portfolio_Get {
|
|
1446 |
}
|
1447 |
|
1448 |
$args = array(
|
1449 |
-
'class'
|
1450 |
-
'items'
|
1451 |
-
'align'
|
1452 |
-
'opts'
|
1453 |
-
'vp_opts'
|
1454 |
);
|
1455 |
|
1456 |
if ( $vp_options['vp_sort_align'] ) {
|
@@ -1502,21 +1564,22 @@ class Visual_Portfolio_Get {
|
|
1502 |
$is_posts = 'post-based' === $args['vp_opts']['vp_content_source'] || 'portfolio' === $args['vp_opts']['vp_content_source'];
|
1503 |
|
1504 |
// prepare image.
|
1505 |
-
$args['image']
|
1506 |
$args['image_noscript'] = Visual_Portfolio_Images::get_attachment_image( $args['image_id'], $args['img_size'], false, '', false );
|
1507 |
|
1508 |
// prepare date.
|
1509 |
if ( isset( $args['opts']['show_date'] ) ) {
|
1510 |
if ( 'human' === $args['opts']['show_date'] ) {
|
1511 |
// translators: %s - published in human format.
|
|
|
1512 |
$args['published'] = sprintf( esc_html__( '%s ago', 'visual-portfolio' ), human_time_diff( mysql2date( 'U', $args['published_time'], true ), current_time( 'timestamp' ) ) );
|
1513 |
-
}
|
1514 |
-
$args['published'] = mysql2date( $args['opts']['date_format'] ? : 'F j, Y', $args['published_time'], true );
|
1515 |
}
|
1516 |
|
1517 |
// fallback for Visual Portfolio 1.2.1 version.
|
1518 |
$args['opts']['date_human_format'] = 'human' === $args['opts']['show_date'];
|
1519 |
-
$args['published_human_format']
|
1520 |
}
|
1521 |
|
1522 |
// prepare read more button.
|
@@ -1549,30 +1612,37 @@ class Visual_Portfolio_Get {
|
|
1549 |
'url' => $args['format_video_url'],
|
1550 |
);
|
1551 |
} else {
|
1552 |
-
$img_id = $args['image_id'] ? : $args['no_image'];
|
|
|
1553 |
if ( $img_id ) {
|
1554 |
$attachment = get_post( $args['image_id'] );
|
1555 |
if ( $attachment && 'attachment' === $attachment->post_type ) {
|
1556 |
-
$img_meta
|
1557 |
$img_md_meta = wp_get_attachment_image_src( $args['image_id'], $args['img_size_md_popup'] );
|
1558 |
$img_sm_meta = wp_get_attachment_image_src( $args['image_id'], $args['img_size_sm_popup'] );
|
1559 |
-
|
1560 |
-
|
1561 |
-
'
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
|
|
|
|
|
|
|
|
1575 |
);
|
|
|
|
|
1576 |
}
|
1577 |
}
|
1578 |
}
|
@@ -1582,16 +1652,18 @@ class Visual_Portfolio_Get {
|
|
1582 |
$args['url'] = false;
|
1583 |
break;
|
1584 |
default:
|
1585 |
-
$args['url_target'] = $args['vp_opts']['vp_items_click_action_url_target'] ? : '';
|
1586 |
break;
|
1587 |
}
|
1588 |
|
1589 |
// No Image.
|
1590 |
if ( ! $args['image'] && $args['no_image'] ) {
|
1591 |
-
$args['image']
|
1592 |
$args['image_noscript'] = Visual_Portfolio_Images::get_attachment_image( $args['no_image'], $args['img_size'], false, '', false );
|
1593 |
}
|
1594 |
|
|
|
|
|
1595 |
// Posts Classes.
|
1596 |
$class_name = 'vp-portfolio__item-wrap';
|
1597 |
if ( $is_posts ) {
|
@@ -1606,8 +1678,8 @@ class Visual_Portfolio_Get {
|
|
1606 |
<<?php echo esc_attr( $tag_name ); ?> class="<?php echo esc_attr( $class_name ); ?>" data-vp-filter="<?php echo esc_attr( $args['filter'] ); ?>">
|
1607 |
<?php
|
1608 |
if ( $popup_image ) {
|
1609 |
-
$title_source
|
1610 |
-
$description_source = $args['vp_opts']['vp_items_click_action_popup_description_source'] ? : '';
|
1611 |
?>
|
1612 |
<div class="vp-portfolio__item-popup"
|
1613 |
style="display: none;"
|
@@ -1633,7 +1705,7 @@ class Visual_Portfolio_Get {
|
|
1633 |
?>
|
1634 |
</div>
|
1635 |
<?php
|
1636 |
-
}
|
1637 |
?>
|
1638 |
<div class="vp-portfolio__item-popup"
|
1639 |
style="display: none;"
|
@@ -1671,12 +1743,12 @@ class Visual_Portfolio_Get {
|
|
1671 |
}
|
1672 |
|
1673 |
// get options for the current pagination.
|
1674 |
-
$pagination_options
|
1675 |
$pagination_options_slug = 'vp_pagination_' . $vp_options['vp_pagination_style'] . '__';
|
1676 |
foreach ( $vp_options as $k => $opt ) {
|
1677 |
// add option to array.
|
1678 |
if ( substr( $k, 0, strlen( $pagination_options_slug ) ) === $pagination_options_slug ) {
|
1679 |
-
$opt_name
|
1680 |
$pagination_options[ $opt_name ] = $opt;
|
1681 |
}
|
1682 |
|
@@ -1718,12 +1790,12 @@ class Visual_Portfolio_Get {
|
|
1718 |
case 'infinite':
|
1719 |
case 'load-more':
|
1720 |
if ( 'infinite' === $vp_options['vp_pagination'] ) {
|
1721 |
-
$args['text_load']
|
1722 |
-
$args['text_loading']
|
1723 |
$args['text_end_list'] = $vp_options['vp_pagination_infinite_text_end_list'];
|
1724 |
} else {
|
1725 |
-
$args['text_load']
|
1726 |
-
$args['text_loading']
|
1727 |
$args['text_end_list'] = $vp_options['vp_pagination_load_more_text_end_list'];
|
1728 |
}
|
1729 |
|
@@ -1732,10 +1804,13 @@ class Visual_Portfolio_Get {
|
|
1732 |
default:
|
1733 |
$pagination_links = paginate_links(
|
1734 |
array(
|
1735 |
-
'base'
|
1736 |
str_replace(
|
1737 |
-
999999999,
|
1738 |
-
|
|
|
|
|
|
|
1739 |
array(
|
1740 |
'vp_page' => 999999999,
|
1741 |
)
|
@@ -1743,14 +1818,14 @@ class Visual_Portfolio_Get {
|
|
1743 |
)
|
1744 |
)
|
1745 |
),
|
1746 |
-
'format'
|
1747 |
-
'type'
|
1748 |
-
'current'
|
1749 |
-
'total'
|
1750 |
'prev_text' => '<',
|
1751 |
'next_text' => '>',
|
1752 |
-
'end_size'
|
1753 |
-
'mid_size'
|
1754 |
)
|
1755 |
);
|
1756 |
|
@@ -1762,8 +1837,8 @@ class Visual_Portfolio_Get {
|
|
1762 |
$tag_data = ! empty( $tag_data ) ? $tag_data[0] : $tag_data;
|
1763 |
|
1764 |
if ( ! empty( $tag_data ) ) {
|
1765 |
-
$atts
|
1766 |
-
$href
|
1767 |
$class = $atts && isset( $atts['class'] ) ? $atts['class'] : '';
|
1768 |
$label = isset( $tag_data['contents'] ) ? $tag_data['contents'] : false;
|
1769 |
|
@@ -1871,7 +1946,7 @@ class Visual_Portfolio_Get {
|
|
1871 |
|
1872 |
if ( class_exists( 'Cocur\Slugify\Slugify' ) ) {
|
1873 |
$slugify = new Cocur\Slugify\Slugify();
|
1874 |
-
$slug
|
1875 |
}
|
1876 |
|
1877 |
return $slug;
|
@@ -1943,7 +2018,7 @@ class Visual_Portfolio_Get {
|
|
1943 |
// If the user didn't specify if $tag is a self-closing tag we try to auto-detect it by checking against a list of known self-closing tags.
|
1944 |
$selfclosing_tags = array( 'area', 'base', 'basefont', 'br', 'hr', 'input', 'img', 'link', 'meta', 'col', 'param' );
|
1945 |
if ( is_null( $selfclosing ) ) {
|
1946 |
-
$selfclosing = in_array( $tag, $selfclosing_tags );
|
1947 |
}
|
1948 |
|
1949 |
// The regexp is different for normal and self-closing tags because I can't figure out how to make a sufficiently robust unified one.
|
@@ -1992,7 +2067,7 @@ class Visual_Portfolio_Get {
|
|
1992 |
foreach ( $attribute_data as $attr ) {
|
1993 |
if ( ! empty( $attr['value_quoted'] ) ) {
|
1994 |
$value = $attr['value_quoted'];
|
1995 |
-
}
|
1996 |
$value = $attr['value_unquoted'];
|
1997 |
} else {
|
1998 |
$value = '';
|
@@ -2007,9 +2082,9 @@ class Visual_Portfolio_Get {
|
|
2007 |
}
|
2008 |
|
2009 |
$tag = array(
|
2010 |
-
'tag_name'
|
2011 |
-
'offset'
|
2012 |
-
'contents'
|
2013 |
'attributes' => $attributes,
|
2014 |
);
|
2015 |
if ( $return_the_entire_tag ) {
|
39 |
*/
|
40 |
private static $id = 0;
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* ID of the current printed single filter
|
44 |
*
|
79 |
*
|
80 |
* @var array
|
81 |
*/
|
82 |
+
private static $used_layouts = array();
|
83 |
|
84 |
/**
|
85 |
* Get all available options of post.
|
154 |
return '';
|
155 |
}
|
156 |
|
157 |
+
do_action( 'vpf_before_get_output' );
|
158 |
+
|
159 |
self::$used_layouts[] = $atts['id'];
|
160 |
|
161 |
// generate unique ID.
|
163 |
$uid = hash( 'crc32b', $uid . $atts['id'] );
|
164 |
|
165 |
$options = self::get_options( $atts['id'] );
|
|
|
166 |
$class = 'vp-portfolio vp-uid-' . $uid;
|
167 |
|
168 |
// Add ID to class.
|
189 |
$no_image = Visual_Portfolio_Settings::get_option( 'no_image', 'vp_general', false );
|
190 |
|
191 |
// prepare image sizes.
|
192 |
+
$img_size_popup = 'vp_xl_popup';
|
193 |
$img_size_md_popup = 'vp_md_popup';
|
194 |
$img_size_sm_popup = 'vp_sm_popup';
|
195 |
+
$img_size = 'vp_xl';
|
196 |
+
$columns_count = false;
|
197 |
|
198 |
switch ( $options['vp_layout'] ) {
|
199 |
case 'masonry':
|
232 |
$old_post = $GLOBALS['post'];
|
233 |
|
234 |
$is_images = 'images' === $options['vp_content_source'];
|
|
|
|
|
235 |
|
236 |
+
$is_social = 'social-stream' === $options['vp_content_source'];
|
237 |
+
|
238 |
+
if ( $is_images || $is_social ) {
|
239 |
+
$query_opts = self::get_query_params( $options, false, $atts['id'] );
|
240 |
+
|
241 |
+
if ( isset( $query_opts['max_num_pages'] ) ) {
|
242 |
+
$max_pages = (int) ( $query_opts['max_num_pages'] < $start_page ? $start_page : $query_opts['max_num_pages'] );
|
243 |
+
} else {
|
244 |
+
$max_pages = $start_page;
|
245 |
+
}
|
246 |
} else {
|
247 |
// Get query params.
|
248 |
+
$query_opts = self::get_query_params( $options, false, $atts['id'] );
|
249 |
|
250 |
// get Post List.
|
251 |
$portfolio_query = new WP_Query( $query_opts );
|
260 |
) : false;
|
261 |
|
262 |
// No items found.
|
263 |
+
if ( ( ( $is_social || $is_images ) && empty( $query_opts['images'] ) ) || isset( $portfolio_query ) && ! $portfolio_query->have_posts() ) {
|
264 |
ob_start();
|
265 |
self::notice( esc_html__( 'No items found.', 'visual-portfolio' ) );
|
266 |
$return = ob_get_contents();
|
272 |
|
273 |
// prepare data-attributes.
|
274 |
$is_preview = self::is_preview();
|
275 |
+
$data_atts = array(
|
276 |
+
'data-vp-layout' => $options['vp_layout'],
|
277 |
+
'data-vp-items-style' => $options['vp_items_style'],
|
278 |
'data-vp-items-click-action' => $options['vp_items_click_action'],
|
279 |
+
'data-vp-items-gap' => $options['vp_items_gap'],
|
280 |
+
'data-vp-pagination' => $options['vp_pagination'],
|
281 |
+
'data-vp-next-page-url' => $next_page_url,
|
282 |
);
|
283 |
|
284 |
if ( 'tiles' === $options['vp_layout'] || $is_preview ) {
|
291 |
$data_atts['data-vp-grid-columns'] = $options['vp_grid_columns'];
|
292 |
}
|
293 |
if ( 'justified' === $options['vp_layout'] || $is_preview ) {
|
294 |
+
$data_atts['data-vp-justified-row-height'] = $options['vp_justified_row_height'];
|
295 |
$data_atts['data-vp-justified-row-height-tolerance'] = $options['vp_justified_row_height_tolerance'];
|
296 |
}
|
297 |
|
303 |
$data_atts['data-vp-slider-items-height'] = 'auto';
|
304 |
break;
|
305 |
case 'static':
|
306 |
+
$data_atts['data-vp-slider-items-height'] = ( $options['vp_slider_items_height_static'] ? $options['vp_slider_items_height_static'] : '200' ) . 'px';
|
307 |
$data_atts['data-vp-slider-items-min-height'] = $options['vp_slider_items_min_height'];
|
308 |
break;
|
309 |
case 'dynamic':
|
310 |
+
$data_atts['data-vp-slider-items-height'] = ( $options['vp_slider_items_height_dynamic'] ? $options['vp_slider_items_height_dynamic'] : '80' ) . '%';
|
311 |
$data_atts['data-vp-slider-items-min-height'] = $options['vp_slider_items_min_height'];
|
312 |
break;
|
313 |
// no default.
|
318 |
$data_atts['data-vp-slider-slides-per-view'] = 'auto';
|
319 |
break;
|
320 |
case 'custom':
|
321 |
+
$data_atts['data-vp-slider-slides-per-view'] = $options['vp_slider_slides_per_view_custom'] ? $options['vp_slider_slides_per_view_custom'] : '3';
|
322 |
break;
|
323 |
// no default.
|
324 |
}
|
325 |
|
326 |
+
$data_atts['data-vp-slider-speed'] = $options['vp_slider_speed'];
|
327 |
+
$data_atts['data-vp-slider-autoplay'] = $options['vp_slider_autoplay'];
|
328 |
$data_atts['data-vp-slider-autoplay-hover-pause'] = $options['vp_slider_autoplay_hover_pause'] ? 'true' : 'false';
|
329 |
+
$data_atts['data-vp-slider-centered-slides'] = $options['vp_slider_centered_slides'] ? 'true' : 'false';
|
330 |
+
$data_atts['data-vp-slider-loop'] = $options['vp_slider_loop'] ? 'true' : 'false';
|
331 |
+
$data_atts['data-vp-slider-free-mode'] = $options['vp_slider_free_mode'] ? 'true' : 'false';
|
332 |
+
$data_atts['data-vp-slider-free-mode-sticky'] = $options['vp_slider_free_mode_sticky'] ? 'true' : 'false';
|
333 |
+
$data_atts['data-vp-slider-arrows'] = $options['vp_slider_arrows'] ? 'true' : 'false';
|
334 |
+
$data_atts['data-vp-slider-arrows-icon-prev'] = $options['vp_slider_arrows_icon_prev'] ? $options['vp_slider_arrows_icon_prev'] : '';
|
335 |
+
$data_atts['data-vp-slider-arrows-icon-next'] = $options['vp_slider_arrows_icon_next'] ? $options['vp_slider_arrows_icon_next'] : '';
|
336 |
+
$data_atts['data-vp-slider-bullets'] = $options['vp_slider_bullets'] ? 'true' : 'false';
|
337 |
+
$data_atts['data-vp-slider-bullets-dynamic'] = $options['vp_slider_bullets_dynamic'] ? 'true' : 'false';
|
338 |
+
$data_atts['data-vp-slider-mousewheel'] = $options['vp_slider_mousewheel'] ? 'true' : 'false';
|
339 |
|
340 |
$data_atts['data-vp-slider-thumbnails'] = $options['vp_slider_thumbnails'] ? 'true' : 'false';
|
341 |
|
342 |
if ( $options['vp_slider_thumbnails'] ) {
|
343 |
$data_atts['data-vp-slider-thumbnails-height'] = 'auto';
|
344 |
+
$data_atts['data-vp-slider-thumbnails-gap'] = $options['vp_slider_thumbnails_gap'] ? $options['vp_slider_thumbnails_gap'] : '0';
|
345 |
|
346 |
switch ( $options['vp_slider_thumbnails_height_type'] ) {
|
347 |
case 'auto':
|
348 |
$data_atts['data-vp-slider-thumbnails-height'] = 'auto';
|
349 |
break;
|
350 |
case 'static':
|
351 |
+
$data_atts['data-vp-slider-thumbnails-height'] = ( $options['vp_slider_thumbnails_height_static'] ? $options['vp_slider_thumbnails_height_static'] : '100' ) . 'px';
|
352 |
break;
|
353 |
case 'dynamic':
|
354 |
+
$data_atts['data-vp-slider-thumbnails-height'] = ( $options['vp_slider_thumbnails_height_dynamic'] ? $options['vp_slider_thumbnails_height_dynamic'] : '30' ) . '%';
|
355 |
break;
|
356 |
// no default.
|
357 |
}
|
361 |
$data_atts['data-vp-slider-thumbnails-per-view'] = 'auto';
|
362 |
break;
|
363 |
case 'custom':
|
364 |
+
$data_atts['data-vp-slider-thumbnails-per-view'] = $options['vp_slider_thumbnails_per_view_custom'] ? $options['vp_slider_thumbnails_per_view_custom'] : '6';
|
365 |
break;
|
366 |
// no default.
|
367 |
}
|
391 |
|
392 |
<?php
|
393 |
// get options for the current style.
|
394 |
+
$style_options = array();
|
395 |
$style_options_slug = 'vp_items_style_' . $options['vp_items_style'] . '__';
|
396 |
foreach ( $options as $k => $opt ) {
|
397 |
// add option to array.
|
398 |
if ( substr( $k, 0, strlen( $style_options_slug ) ) === $style_options_slug ) {
|
399 |
$opt_name = str_replace( $style_options_slug, '', $k );
|
400 |
+
|
401 |
$style_options[ $opt_name ] = $opt;
|
402 |
}
|
403 |
|
436 |
}
|
437 |
|
438 |
// Prepare thumbnails.
|
439 |
+
$slider_thumbnails = array();
|
440 |
$slider_thumbnails_enable = 'slider' === $options['vp_layout'] && $options['vp_slider_thumbnails'];
|
441 |
?>
|
442 |
|
444 |
<div class="vp-portfolio__items vp-portfolio__items-style-<?php echo esc_attr( $options['vp_items_style'] ); ?>">
|
445 |
<?php
|
446 |
$each_item_args = array(
|
447 |
+
'post_id' => '',
|
448 |
+
'url' => '',
|
449 |
+
'title' => '',
|
450 |
+
'excerpt' => '',
|
451 |
+
'comments_number' => '',
|
452 |
+
'format' => '',
|
453 |
+
'published' => '',
|
454 |
+
'published_time' => '',
|
455 |
+
'filter' => '',
|
456 |
+
'video' => '',
|
457 |
+
'image_id' => '',
|
458 |
'image_allowed_html' => array(
|
459 |
'img' => array(
|
460 |
+
'src' => array(),
|
461 |
+
'srcset' => array(),
|
462 |
+
'sizes' => array(),
|
463 |
+
'alt' => array(),
|
464 |
+
'class' => array(),
|
465 |
+
'width' => array(),
|
466 |
+
'height' => array(),
|
467 |
|
468 |
// Lazyload support.
|
469 |
'data-vpf-src' => array(),
|
472 |
'data-no-lazy' => array(),
|
473 |
),
|
474 |
),
|
475 |
+
'img_size_popup' => $img_size_popup,
|
476 |
+
'img_size_md_popup' => $img_size_md_popup,
|
477 |
+
'img_size_sm_popup' => $img_size_sm_popup,
|
478 |
+
'img_size' => $img_size,
|
479 |
+
'no_image' => $no_image,
|
480 |
+
'categories' => array(),
|
481 |
+
'opts' => $style_options,
|
482 |
+
'vp_opts' => $options,
|
483 |
);
|
484 |
|
485 |
+
if ( ( $is_images || $is_social ) &&
|
486 |
+
isset( $query_opts['images'] ) &&
|
487 |
+
is_array( $query_opts['images'] ) &&
|
488 |
+
! empty( $query_opts['images'] ) ) {
|
489 |
+
|
490 |
foreach ( $query_opts['images'] as $img ) {
|
491 |
// Get category taxonomies for data filter.
|
492 |
+
$filter_values = array();
|
493 |
+
$categories = array();
|
494 |
|
495 |
if ( isset( $img['categories'] ) && is_array( $img['categories'] ) ) {
|
496 |
foreach ( $img['categories'] as $cat ) {
|
497 |
$slug = self::create_slug( $cat );
|
498 |
+
if ( ! in_array( $slug, $filter_values, true ) ) {
|
499 |
// add in filter.
|
500 |
$filter_values[] = $slug;
|
501 |
|
502 |
// add in categories array.
|
503 |
$url = self::get_pagenum_link(
|
504 |
array(
|
505 |
+
'vp_filter' => rawurlencode( $slug ),
|
506 |
+
'vp_page' => 1,
|
507 |
)
|
508 |
);
|
509 |
+
|
510 |
$categories[] = array(
|
511 |
'slug' => $slug,
|
512 |
'label' => $cat,
|
521 |
}
|
522 |
}
|
523 |
|
524 |
+
$args = apply_filters(
|
525 |
+
'vpf_image_item_args',
|
526 |
+
array_merge(
|
527 |
+
$each_item_args,
|
528 |
+
array(
|
529 |
+
'url' => isset( $img['url'] ) && $img['url'] ? $img['url'] : wp_get_attachment_image_url( $img['id'], $img_size_popup ),
|
530 |
+
'title' => isset( $img['title'] ) && $img['title'] ? $img['title'] : '',
|
531 |
+
'format' => isset( $img['format'] ) && $img['format'] ? $img['format'] : 'standard',
|
532 |
+
'published_time' => isset( $img['published_time'] ) && $img['published_time'] ? $img['published_time'] : '',
|
533 |
+
'filter' => implode( ',', $filter_values ),
|
534 |
+
'image_id' => intval( $img['id'] ),
|
535 |
+
'allow_popup' => ! isset( $img['url'] ) || ! $img['url'],
|
536 |
+
'categories' => $categories,
|
537 |
+
)
|
538 |
+
),
|
539 |
+
$img
|
540 |
);
|
541 |
|
542 |
$slider_thumbnails[] = $args['image_id'];
|
552 |
|
553 |
self::each_item( $args );
|
554 |
}
|
555 |
+
} elseif ( isset( $portfolio_query ) ) {
|
556 |
while ( $portfolio_query->have_posts() ) {
|
557 |
$portfolio_query->the_post();
|
558 |
|
572 |
|
573 |
$category = get_the_terms( $the_post, $cat );
|
574 |
|
575 |
+
if ( $category && ! in_array( $category, $filter_values, true ) ) {
|
576 |
foreach ( $category as $key => $cat_item ) {
|
577 |
// add in filter.
|
578 |
$filter_values[] = $cat_item->slug;
|
581 |
$unique_name = $cat_item->taxonomy . ':' . $cat_item->slug;
|
582 |
$url = self::get_pagenum_link(
|
583 |
array(
|
584 |
+
'vp_filter' => rawurlencode( $unique_name ),
|
585 |
+
'vp_page' => 1,
|
586 |
)
|
587 |
);
|
588 |
$categories[] = array(
|
599 |
}
|
600 |
}
|
601 |
|
602 |
+
$args = apply_filters(
|
603 |
+
'vpf_post_item_args',
|
604 |
+
array_merge(
|
605 |
+
$each_item_args,
|
606 |
+
array(
|
607 |
+
'post_id' => get_the_ID(),
|
608 |
+
'url' => get_permalink(),
|
609 |
+
'title' => get_the_title(),
|
610 |
+
'format' => get_post_format() ? get_post_format() : 'standard',
|
611 |
+
'published_time' => get_the_date( 'Y-m-d H:i:s', $the_post ),
|
612 |
+
'filter' => implode( ',', $filter_values ),
|
613 |
+
'image_id' => 'attachment' === get_post_type() ? get_the_ID() : get_post_thumbnail_id( get_the_ID() ),
|
614 |
+
'categories' => $categories,
|
615 |
+
)
|
616 |
+
),
|
617 |
+
get_the_ID()
|
618 |
);
|
619 |
|
620 |
$args['allow_popup'] = isset( $args['image_id'] ) && $args['image_id'];
|
679 |
|
680 |
<?php
|
681 |
self::pagination(
|
682 |
+
$options,
|
683 |
+
array(
|
684 |
+
'start_page' => $start_page,
|
685 |
+
'max_pages' => $max_pages,
|
686 |
'next_page_url' => $next_page_url,
|
687 |
)
|
688 |
);
|
696 |
// phpcs:ignore
|
697 |
$GLOBALS['post'] = $old_post;
|
698 |
|
699 |
+
do_action( 'vpf_after_get_output' );
|
700 |
+
|
701 |
$return = ob_get_contents();
|
702 |
ob_end_clean();
|
703 |
+
|
704 |
return $return;
|
705 |
}
|
706 |
|
715 |
$options = self::get_options( $atts['id'] );
|
716 |
|
717 |
$options = array_merge(
|
718 |
+
$options,
|
719 |
+
array(
|
720 |
+
'vp_filter' => $atts['type'],
|
721 |
+
'vp_filter_align' => $atts['align'],
|
722 |
'vp_filter_show_count' => 'true' === $atts['show_count'],
|
723 |
)
|
724 |
);
|
757 |
$options = self::get_options( $atts['id'] );
|
758 |
|
759 |
$options = array_merge(
|
760 |
+
$options,
|
761 |
+
array(
|
762 |
+
'vp_sort' => $atts['type'],
|
763 |
'vp_sort_align' => $atts['align'],
|
764 |
)
|
765 |
);
|
794 |
* @return int
|
795 |
*/
|
796 |
private static function get_current_page_number() {
|
797 |
+
// phpcs:ignore
|
798 |
return max( 1, isset( $_GET['vp_page'] ) ? (int) $_GET['vp_page'] : 1 );
|
799 |
}
|
800 |
|
803 |
* thanks to https://gist.github.com/hlashbrooke/6298714 .
|
804 |
*/
|
805 |
private static function get_rand_seed_session() {
|
|
|
|
|
806 |
// already prepared.
|
807 |
if ( self::$rand_seed_session ) {
|
808 |
return self::$rand_seed_session;
|
822 |
|
823 |
// Set new vpf_random_seed if none exists.
|
824 |
if ( ! self::$rand_seed_session ) {
|
825 |
+
// phpcs:ignore
|
826 |
+
self::$rand_seed_session = rand();
|
827 |
$_SESSION['vpf_random_seed'] = self::$rand_seed_session;
|
828 |
}
|
829 |
|
|
|
|
|
830 |
return self::$rand_seed_session;
|
831 |
}
|
832 |
|
835 |
*
|
836 |
* @param array $options portfolio options.
|
837 |
* @param bool $for_filter prevent retrieving GET variable if used for filter.
|
838 |
+
* @param int $layout_id portfolio layout id.
|
839 |
*
|
840 |
* @return array
|
841 |
*/
|
842 |
+
private static function get_query_params( $options, $for_filter = false, $layout_id = false ) {
|
843 |
$query_opts = array();
|
844 |
|
845 |
$is_images = 'images' === $options['vp_content_source'];
|
859 |
|
860 |
// Load certain taxonomies.
|
861 |
$images = array();
|
862 |
+
|
863 |
+
// phpcs:ignore
|
864 |
if ( ! $for_filter && isset( $_GET['vp_filter'] ) ) {
|
865 |
+
// phpcs:ignore
|
866 |
$category = sanitize_text_field( wp_unslash( $_GET['vp_filter'] ) );
|
867 |
|
868 |
foreach ( (array) $options['vp_images'] as $img ) {
|
882 |
// prepare titles and descriptions.
|
883 |
foreach ( $images as $k => $img ) {
|
884 |
$img_meta = array(
|
885 |
+
'title' => '',
|
886 |
'description' => '',
|
887 |
+
'caption' => '',
|
888 |
+
'alt' => '',
|
889 |
+
'none' => '',
|
890 |
+
'date' => '',
|
891 |
);
|
892 |
|
893 |
$attachment = get_post( $img['id'] );
|
896 |
// get image meta if needed.
|
897 |
if ( 'none' !== $options['vp_images_titles_source'] || 'none' !== $options['vp_images_descriptions_source'] ) {
|
898 |
if ( $attachment && 'attachment' === $attachment->post_type ) {
|
899 |
+
$img_meta['title'] = $attachment->post_title;
|
900 |
$img_meta['description'] = $attachment->post_content;
|
901 |
+
$img_meta['caption'] = wp_get_attachment_caption( $attachment->ID );
|
902 |
+
$img_meta['alt'] = get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true );
|
903 |
}
|
904 |
}
|
905 |
|
919 |
}
|
920 |
|
921 |
// order.
|
922 |
+
$custom_order = false;
|
923 |
$custom_order_direction = $options['vp_images_order_direction'];
|
924 |
|
925 |
if ( isset( $options['vp_images_order_by'] ) ) {
|
927 |
}
|
928 |
|
929 |
// custom sorting.
|
930 |
+
// phpcs:ignore
|
931 |
if ( isset( $_GET['vp_sort'] ) ) {
|
932 |
+
// phpcs:ignore
|
933 |
$custom_get_order = sanitize_text_field( wp_unslash( $_GET['vp_sort'] ) );
|
934 |
|
935 |
switch ( $custom_get_order ) {
|
936 |
case 'title':
|
937 |
case 'date':
|
938 |
+
$custom_order = $custom_get_order;
|
939 |
$custom_order_direction = 'asc';
|
940 |
break;
|
941 |
case 'title_desc':
|
942 |
+
$custom_order = 'title';
|
943 |
$custom_order_direction = 'desc';
|
944 |
break;
|
945 |
case 'date_desc':
|
946 |
+
$custom_order = 'date';
|
947 |
$custom_order_direction = 'desc';
|
948 |
break;
|
949 |
}
|
953 |
switch ( $custom_order ) {
|
954 |
case 'date':
|
955 |
case 'title':
|
956 |
+
$sort_tmp = array();
|
957 |
$new_images = array();
|
958 |
+
$sort_by = 'date';
|
959 |
|
960 |
if ( 'title' === $custom_order ) {
|
961 |
$sort_by = 'title';
|
973 |
$images = $new_images;
|
974 |
break;
|
975 |
case 'rand':
|
976 |
+
// phpcs:ignore
|
977 |
mt_srand( self::get_rand_seed_session() );
|
978 |
+
|
979 |
for ( $i = count( $images ) - 1; $i > 0; $i-- ) {
|
980 |
+
// phpcs:ignore
|
981 |
+
$j = @mt_rand( 0, $i );
|
982 |
+
$tmp = $images[ $i ];
|
983 |
$images[ $i ] = $images[ $j ];
|
984 |
$images[ $j ] = $tmp;
|
985 |
}
|
986 |
+
|
987 |
break;
|
988 |
}
|
989 |
if ( 'desc' === $custom_order_direction ) {
|
995 |
$query_opts['max_num_pages'] = ceil( count( $images ) / $count );
|
996 |
|
997 |
$start_from_item = ( $paged - 1 ) * $count;
|
998 |
+
$end_on_item = $start_from_item + $count;
|
999 |
|
1000 |
if ( $for_filter ) {
|
1001 |
$start_from_item = 0;
|
1002 |
+
$end_on_item = 99999;
|
1003 |
}
|
1004 |
|
1005 |
// get images for current page only.
|
1011 |
}
|
1012 |
} else {
|
1013 |
$query_opts = array(
|
1014 |
+
'showposts' => $count,
|
1015 |
'posts_per_page' => $count,
|
1016 |
+
'paged' => $paged,
|
1017 |
+
'orderby' => 'post_date',
|
1018 |
+
'order' => 'DESC',
|
1019 |
+
'post_type' => 'portfolio',
|
1020 |
);
|
1021 |
|
1022 |
// Post based.
|
1059 |
$query_opts['order'] = $options['vp_posts_order_direction'];
|
1060 |
|
1061 |
if ( 'ids' === $options['vp_posts_source'] ) { // IDs.
|
1062 |
+
$query_opts['post_type'] = 'any';
|
1063 |
$query_opts['post__not_in'] = array();
|
1064 |
|
1065 |
if ( ! empty( $options['vp_posts_ids'] ) ) {
|
1082 |
array(
|
1083 |
'public' => false,
|
1084 |
'name' => 'attachment',
|
1085 |
+
),
|
1086 |
+
'names',
|
1087 |
+
'NOT'
|
1088 |
)
|
1089 |
)
|
1090 |
);
|
1091 |
|
1092 |
+
// phpcs:ignore
|
1093 |
$query_opts['tax_query'] = array(
|
1094 |
'relation' => $options['vp_posts_taxonomies_relation'],
|
1095 |
);
|
1096 |
+
|
1097 |
+
// We need this empty array, because when taxonomy selected,
|
1098 |
+
// ant posts don't have this taxonomy, we will see all available posts.
|
1099 |
+
// Related topic: https://wordpress.org/support/topic/exclude-certain-category-from-filter/.
|
1100 |
+
$query_opts['tax_query'][] = array();
|
1101 |
+
|
1102 |
foreach ( $options['vp_posts_taxonomies'] as $taxonomy ) {
|
1103 |
$taxonomy_name = null;
|
1104 |
|
1105 |
foreach ( $terms_list as $term ) {
|
1106 |
+
if ( $term->term_id === (int) $taxonomy ) {
|
1107 |
$taxonomy_name = $term->taxonomy;
|
1108 |
continue;
|
1109 |
}
|
1118 |
}
|
1119 |
}
|
1120 |
}
|
1121 |
+
}
|
1122 |
|
1123 |
// Avoid duplicate posts.
|
1124 |
if ( $options['vp_posts_avoid_duplicate_posts'] ) {
|
1125 |
+
$not_id = (array) ( isset( $query_opts['post__not_in'] ) ? $query_opts['post__not_in'] : array() );
|
1126 |
$query_opts['post__not_in'] = array_merge( $not_id, self::get_all_used_posts() );
|
1127 |
+
|
1128 |
+
// Remove posts from post__in.
|
1129 |
+
if ( isset( $query_opts['post__in'] ) ) {
|
1130 |
+
$query_opts['post__in'] = array_diff( (array) $query_opts['post__in'], (array) $query_opts['post__not_in'] );
|
1131 |
+
}
|
1132 |
}
|
1133 |
+
}
|
1134 |
|
1135 |
// Custom sorting.
|
1136 |
+
// phpcs:ignore
|
1137 |
if ( isset( $_GET['vp_sort'] ) ) {
|
1138 |
+
// phpcs:ignore
|
1139 |
+
$custom_get_order = sanitize_text_field( wp_unslash( $_GET['vp_sort'] ) );
|
1140 |
+
$custom_order = false;
|
1141 |
$custom_order_direction = false;
|
1142 |
|
1143 |
switch ( $custom_get_order ) {
|
1144 |
case 'title':
|
1145 |
case 'date':
|
1146 |
+
$custom_order = 'post_' . $custom_get_order;
|
1147 |
$custom_order_direction = 'asc';
|
1148 |
break;
|
1149 |
case 'title_desc':
|
1150 |
+
$custom_order = 'post_title';
|
1151 |
$custom_order_direction = 'desc';
|
1152 |
break;
|
1153 |
case 'date_desc':
|
1154 |
+
$custom_order = 'post_date';
|
1155 |
$custom_order_direction = 'desc';
|
1156 |
break;
|
1157 |
}
|
1158 |
|
1159 |
if ( $custom_order && $custom_order_direction ) {
|
1160 |
$query_opts['orderby'] = $custom_order;
|
1161 |
+
$query_opts['order'] = $custom_order_direction;
|
1162 |
}
|
1163 |
}
|
1164 |
|
1165 |
// Load certain taxonomies using custom filter.
|
1166 |
+
// phpcs:ignore
|
1167 |
if ( ! $for_filter && isset( $_GET['vp_filter'] ) ) {
|
1168 |
+
// phpcs:ignore
|
1169 |
$taxonomies = sanitize_text_field( wp_unslash( $_GET['vp_filter'] ) );
|
1170 |
$taxonomies = explode( ':', $taxonomies );
|
1171 |
|
1172 |
if ( $taxonomies && isset( $taxonomies[0] ) && isset( $taxonomies[1] ) ) {
|
1173 |
+
// phpcs:ignore
|
1174 |
$query_opts['tax_query'] = array(
|
1175 |
'relation' => 'AND',
|
1176 |
array(
|
1177 |
'taxonomy' => $taxonomies[0],
|
1178 |
+
'field' => 'slug',
|
1179 |
+
'terms' => $taxonomies[1],
|
1180 |
),
|
1181 |
isset( $query_opts['tax_query'] ) ? $query_opts['tax_query'] : '',
|
1182 |
);
|
1184 |
}
|
1185 |
}
|
1186 |
|
1187 |
+
$query_opts = Visual_Portfolio_Extend::query_args( $query_opts, $options, $layout_id );
|
1188 |
|
1189 |
return $query_opts;
|
1190 |
}
|
1194 |
*
|
1195 |
* @param string $notice notice string.
|
1196 |
*/
|
1197 |
+
public static function notice( $notice ) {
|
1198 |
if ( ! $notice ) {
|
1199 |
return;
|
1200 |
}
|
1201 |
visual_portfolio()->include_template(
|
1202 |
+
'notices/notices',
|
1203 |
+
array(
|
1204 |
'notice' => $notice,
|
1205 |
)
|
1206 |
);
|
1217 |
return;
|
1218 |
}
|
1219 |
|
1220 |
+
$terms = array();
|
1221 |
$there_is_active = false;
|
1222 |
+
$is_images = 'images' === $vp_options['vp_content_source'];
|
1223 |
+
$is_social = 'social-stream' === $vp_options['vp_content_source'];
|
1224 |
|
1225 |
// Get active item.
|
1226 |
$active_item = false;
|
1227 |
+
|
1228 |
+
// phpcs:ignore
|
1229 |
if ( isset( $_GET['vp_filter'] ) ) {
|
1230 |
+
// phpcs:ignore
|
1231 |
$active_item = sanitize_text_field( wp_unslash( $_GET['vp_filter'] ) );
|
1232 |
}
|
1233 |
|
1234 |
+
if ( $is_images || $is_social ) {
|
1235 |
$query_opts = self::get_query_params( $vp_options, true );
|
1236 |
|
1237 |
// calculate categories count.
|
1248 |
if ( isset( $img['categories'] ) && is_array( $img['categories'] ) ) {
|
1249 |
foreach ( $img['categories'] as $cat ) {
|
1250 |
$slug = self::create_slug( $cat );
|
1251 |
+
$url = self::get_pagenum_link(
|
1252 |
array(
|
1253 |
+
'vp_filter' => rawurlencode( $slug ),
|
1254 |
+
'vp_page' => 1,
|
1255 |
)
|
1256 |
);
|
1257 |
|
1279 |
$query_opts = self::get_query_params( $vp_options, true );
|
1280 |
|
1281 |
// Get all available categories for current $query_opts.
|
|
|
1282 |
$query_opts['posts_per_page'] = -1;
|
1283 |
+
$query_opts['showposts'] = -1;
|
1284 |
+
$query_opts['paged'] = -1;
|
1285 |
|
1286 |
/**
|
1287 |
* TODO: make caching using set_transient function. Info here - https://wordpress.stackexchange.com/a/145960
|
1288 |
*/
|
1289 |
+
$term_ids = array();
|
1290 |
$term_taxonomies = array();
|
1291 |
|
1292 |
// stupid hack as wp_reset_postdata() function is not working for me...
|
1293 |
+
$old_post = $GLOBALS['post'];
|
1294 |
$portfolio_query = new WP_Query( $query_opts );
|
1295 |
while ( $portfolio_query->have_posts() ) {
|
1296 |
$portfolio_query->the_post();
|
1310 |
|
1311 |
// Prepare each terms array.
|
1312 |
foreach ( $category as $key => $cat_item ) {
|
1313 |
+
if ( ! in_array( $cat_item->term_id, $term_ids, true ) ) {
|
1314 |
$term_ids[] = $cat_item->term_id;
|
1315 |
}
|
1316 |
+
if ( ! in_array( $cat_item->taxonomy, $term_taxonomies, true ) ) {
|
1317 |
$term_taxonomies[] = $cat_item->taxonomy;
|
1318 |
}
|
1319 |
}
|
1329 |
// we need this to support reordering plugins.
|
1330 |
$all_terms = get_terms(
|
1331 |
array(
|
1332 |
+
'taxonomy' => $term_taxonomies,
|
1333 |
'hide_empty' => true,
|
1334 |
)
|
1335 |
);
|
1336 |
|
1337 |
if ( isset( $all_terms ) && is_array( $all_terms ) ) {
|
1338 |
foreach ( $all_terms as $term ) {
|
1339 |
+
if ( in_array( $term->term_id, $term_ids, true ) ) {
|
1340 |
$unique_name = $term->taxonomy . ':' . $term->slug;
|
1341 |
|
1342 |
$url = self::get_pagenum_link(
|
1343 |
array(
|
1344 |
+
'vp_filter' => rawurlencode( $unique_name ),
|
1345 |
+
'vp_page' => 1,
|
1346 |
)
|
1347 |
);
|
1348 |
|
1370 |
// Add 'All' active item.
|
1371 |
if ( $vp_options['vp_filter_text_all'] ) {
|
1372 |
array_unshift(
|
1373 |
+
$terms,
|
1374 |
+
array(
|
1375 |
'filter' => '*',
|
1376 |
'label' => $vp_options['vp_filter_text_all'],
|
1377 |
'description' => false,
|
1382 |
'url' => self::get_pagenum_link(
|
1383 |
array(
|
1384 |
'vp_filter' => '',
|
1385 |
+
'vp_page' => 1,
|
1386 |
)
|
1387 |
),
|
1388 |
'class' => 'vp-filter__item' . ( ! $there_is_active ? ' vp-filter__item-active' : '' ),
|
1391 |
}
|
1392 |
|
1393 |
// get options for the current filter.
|
1394 |
+
$filter_options = array();
|
1395 |
$filter_options_slug = 'vp_filter_' . $vp_options['vp_filter'] . '__';
|
1396 |
+
|
1397 |
foreach ( $vp_options as $k => $opt ) {
|
1398 |
// add option to array.
|
1399 |
if ( substr( $k, 0, strlen( $filter_options_slug ) ) === $filter_options_slug ) {
|
1400 |
+
$opt_name = str_replace( $filter_options_slug, '', $k );
|
1401 |
$filter_options[ $opt_name ] = $opt;
|
1402 |
}
|
1403 |
|
1408 |
}
|
1409 |
|
1410 |
$args = array(
|
1411 |
+
'class' => 'vp-filter',
|
1412 |
+
'items' => Visual_Portfolio_Extend::filter_items( $terms, $vp_options ),
|
1413 |
+
'align' => $vp_options['vp_filter_align'],
|
1414 |
'show_count' => $vp_options['vp_filter_show_count'],
|
1415 |
+
'opts' => $filter_options,
|
1416 |
+
'vp_opts' => $vp_options,
|
1417 |
);
|
1418 |
|
1419 |
if ( $vp_options['vp_filter_align'] ) {
|
1451 |
|
1452 |
// Get active item.
|
1453 |
$active_item = false;
|
1454 |
+
|
1455 |
+
// phpcs:ignore
|
1456 |
if ( isset( $_GET['vp_sort'] ) ) {
|
1457 |
+
// phpcs:ignore
|
1458 |
$active_item = sanitize_text_field( wp_unslash( $_GET['vp_sort'] ) );
|
1459 |
}
|
1460 |
|
1461 |
+
$sort_items = Visual_Portfolio_Extend::sort_items(
|
1462 |
+
array(
|
1463 |
+
'' => esc_html__( 'Default sorting', 'visual-portfolio' ),
|
1464 |
+
'date_desc' => esc_html__( 'Sort by date (newest)', 'visual-portfolio' ),
|
1465 |
+
'date' => esc_html__( 'Sort by date (oldest)', 'visual-portfolio' ),
|
1466 |
+
'title' => esc_html__( 'Sort by title (A-Z)', 'visual-portfolio' ),
|
1467 |
+
'title_desc' => esc_html__( 'Sort by title (Z-A)', 'visual-portfolio' ),
|
1468 |
+
),
|
1469 |
+
$vp_options
|
1470 |
+
);
|
1471 |
|
1472 |
foreach ( $sort_items as $slug => $label ) {
|
1473 |
$url = self::get_pagenum_link(
|
1474 |
array(
|
1475 |
+
'vp_sort' => rawurlencode( $slug ),
|
1476 |
'vp_page' => 1,
|
1477 |
)
|
1478 |
);
|
1491 |
}
|
1492 |
|
1493 |
// get options for the current sort.
|
1494 |
+
$sort_options = array();
|
1495 |
$sort_options_slug = 'vp_sort_' . $vp_options['vp_sort'] . '__';
|
1496 |
+
|
1497 |
foreach ( $vp_options as $k => $opt ) {
|
1498 |
// add option to array.
|
1499 |
if ( substr( $k, 0, strlen( $sort_options_slug ) ) === $sort_options_slug ) {
|
1500 |
+
$opt_name = str_replace( $sort_options_slug, '', $k );
|
1501 |
$sort_options[ $opt_name ] = $opt;
|
1502 |
}
|
1503 |
|
1508 |
}
|
1509 |
|
1510 |
$args = array(
|
1511 |
+
'class' => 'vp-sort',
|
1512 |
+
'items' => $terms,
|
1513 |
+
'align' => $vp_options['vp_sort_align'],
|
1514 |
+
'opts' => $sort_options,
|
1515 |
+
'vp_opts' => $vp_options,
|
1516 |
);
|
1517 |
|
1518 |
if ( $vp_options['vp_sort_align'] ) {
|
1564 |
$is_posts = 'post-based' === $args['vp_opts']['vp_content_source'] || 'portfolio' === $args['vp_opts']['vp_content_source'];
|
1565 |
|
1566 |
// prepare image.
|
1567 |
+
$args['image'] = Visual_Portfolio_Images::get_attachment_image( $args['image_id'], $args['img_size'], false, '', true );
|
1568 |
$args['image_noscript'] = Visual_Portfolio_Images::get_attachment_image( $args['image_id'], $args['img_size'], false, '', false );
|
1569 |
|
1570 |
// prepare date.
|
1571 |
if ( isset( $args['opts']['show_date'] ) ) {
|
1572 |
if ( 'human' === $args['opts']['show_date'] ) {
|
1573 |
// translators: %s - published in human format.
|
1574 |
+
// phpcs:ignore
|
1575 |
$args['published'] = sprintf( esc_html__( '%s ago', 'visual-portfolio' ), human_time_diff( mysql2date( 'U', $args['published_time'], true ), current_time( 'timestamp' ) ) );
|
1576 |
+
} elseif ( $args['opts']['show_date'] ) {
|
1577 |
+
$args['published'] = mysql2date( $args['opts']['date_format'] ? $args['opts']['date_format'] : 'F j, Y', $args['published_time'], true );
|
1578 |
}
|
1579 |
|
1580 |
// fallback for Visual Portfolio 1.2.1 version.
|
1581 |
$args['opts']['date_human_format'] = 'human' === $args['opts']['show_date'];
|
1582 |
+
$args['published_human_format'] = $args['published'];
|
1583 |
}
|
1584 |
|
1585 |
// prepare read more button.
|
1612 |
'url' => $args['format_video_url'],
|
1613 |
);
|
1614 |
} else {
|
1615 |
+
$img_id = $args['image_id'] ? $args['image_id'] : $args['no_image'];
|
1616 |
+
|
1617 |
if ( $img_id ) {
|
1618 |
$attachment = get_post( $args['image_id'] );
|
1619 |
if ( $attachment && 'attachment' === $attachment->post_type ) {
|
1620 |
+
$img_meta = wp_get_attachment_image_src( $args['image_id'], $args['img_size_popup'] );
|
1621 |
$img_md_meta = wp_get_attachment_image_src( $args['image_id'], $args['img_size_md_popup'] );
|
1622 |
$img_sm_meta = wp_get_attachment_image_src( $args['image_id'], $args['img_size_sm_popup'] );
|
1623 |
+
|
1624 |
+
$popup_image = apply_filters(
|
1625 |
+
'vpf_extend_popup_image',
|
1626 |
+
array(
|
1627 |
+
'id' => $args['image_id'],
|
1628 |
+
'title' => $attachment->post_title,
|
1629 |
+
'description' => $attachment->post_content,
|
1630 |
+
'caption' => wp_get_attachment_caption( $attachment->ID ),
|
1631 |
+
'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
|
1632 |
+
'url' => $img_meta[0],
|
1633 |
+
'srcset' => wp_get_attachment_image_srcset( $args['image_id'], $args['img_size_popup'] ),
|
1634 |
+
'width' => $img_meta[1],
|
1635 |
+
'height' => $img_meta[2],
|
1636 |
+
'md_url' => $img_md_meta[0],
|
1637 |
+
'md_width' => $img_md_meta[1],
|
1638 |
+
'md_height' => $img_md_meta[2],
|
1639 |
+
'sm_url' => $img_sm_meta[0],
|
1640 |
+
'sm_width' => $img_sm_meta[1],
|
1641 |
+
'sm_height' => $img_sm_meta[2],
|
1642 |
+
)
|
1643 |
);
|
1644 |
+
} elseif ( $args['image_id'] ) {
|
1645 |
+
$popup_image = apply_filters( 'vpf_extend_custom_popup_image', false, $args['image_id'] );
|
1646 |
}
|
1647 |
}
|
1648 |
}
|
1652 |
$args['url'] = false;
|
1653 |
break;
|
1654 |
default:
|
1655 |
+
$args['url_target'] = $args['vp_opts']['vp_items_click_action_url_target'] ? $args['vp_opts']['vp_items_click_action_url_target'] : '';
|
1656 |
break;
|
1657 |
}
|
1658 |
|
1659 |
// No Image.
|
1660 |
if ( ! $args['image'] && $args['no_image'] ) {
|
1661 |
+
$args['image'] = Visual_Portfolio_Images::get_attachment_image( $args['no_image'], $args['img_size'] );
|
1662 |
$args['image_noscript'] = Visual_Portfolio_Images::get_attachment_image( $args['no_image'], $args['img_size'], false, '', false );
|
1663 |
}
|
1664 |
|
1665 |
+
$args = apply_filters( 'vpf_each_item_args', $args );
|
1666 |
+
|
1667 |
// Posts Classes.
|
1668 |
$class_name = 'vp-portfolio__item-wrap';
|
1669 |
if ( $is_posts ) {
|
1678 |
<<?php echo esc_attr( $tag_name ); ?> class="<?php echo esc_attr( $class_name ); ?>" data-vp-filter="<?php echo esc_attr( $args['filter'] ); ?>">
|
1679 |
<?php
|
1680 |
if ( $popup_image ) {
|
1681 |
+
$title_source = $args['vp_opts']['vp_items_click_action_popup_title_source'] ? $args['vp_opts']['vp_items_click_action_popup_title_source'] : '';
|
1682 |
+
$description_source = $args['vp_opts']['vp_items_click_action_popup_description_source'] ? $args['vp_opts']['vp_items_click_action_popup_description_source'] : '';
|
1683 |
?>
|
1684 |
<div class="vp-portfolio__item-popup"
|
1685 |
style="display: none;"
|
1705 |
?>
|
1706 |
</div>
|
1707 |
<?php
|
1708 |
+
} elseif ( $popup_video ) {
|
1709 |
?>
|
1710 |
<div class="vp-portfolio__item-popup"
|
1711 |
style="display: none;"
|
1743 |
}
|
1744 |
|
1745 |
// get options for the current pagination.
|
1746 |
+
$pagination_options = array();
|
1747 |
$pagination_options_slug = 'vp_pagination_' . $vp_options['vp_pagination_style'] . '__';
|
1748 |
foreach ( $vp_options as $k => $opt ) {
|
1749 |
// add option to array.
|
1750 |
if ( substr( $k, 0, strlen( $pagination_options_slug ) ) === $pagination_options_slug ) {
|
1751 |
+
$opt_name = str_replace( $pagination_options_slug, '', $k );
|
1752 |
$pagination_options[ $opt_name ] = $opt;
|
1753 |
}
|
1754 |
|
1790 |
case 'infinite':
|
1791 |
case 'load-more':
|
1792 |
if ( 'infinite' === $vp_options['vp_pagination'] ) {
|
1793 |
+
$args['text_load'] = $vp_options['vp_pagination_infinite_text_load'];
|
1794 |
+
$args['text_loading'] = $vp_options['vp_pagination_infinite_text_loading'];
|
1795 |
$args['text_end_list'] = $vp_options['vp_pagination_infinite_text_end_list'];
|
1796 |
} else {
|
1797 |
+
$args['text_load'] = $vp_options['vp_pagination_load_more_text_load'];
|
1798 |
+
$args['text_loading'] = $vp_options['vp_pagination_load_more_text_loading'];
|
1799 |
$args['text_end_list'] = $vp_options['vp_pagination_load_more_text_end_list'];
|
1800 |
}
|
1801 |
|
1804 |
default:
|
1805 |
$pagination_links = paginate_links(
|
1806 |
array(
|
1807 |
+
'base' => esc_url_raw(
|
1808 |
str_replace(
|
1809 |
+
999999999,
|
1810 |
+
'%#%',
|
1811 |
+
remove_query_arg(
|
1812 |
+
'add-to-cart',
|
1813 |
+
self::get_pagenum_link(
|
1814 |
array(
|
1815 |
'vp_page' => 999999999,
|
1816 |
)
|
1818 |
)
|
1819 |
)
|
1820 |
),
|
1821 |
+
'format' => '',
|
1822 |
+
'type' => 'array',
|
1823 |
+
'current' => $args['start_page'],
|
1824 |
+
'total' => $args['max_pages'],
|
1825 |
'prev_text' => '<',
|
1826 |
'next_text' => '>',
|
1827 |
+
'end_size' => 1,
|
1828 |
+
'mid_size' => 2,
|
1829 |
)
|
1830 |
);
|
1831 |
|
1837 |
$tag_data = ! empty( $tag_data ) ? $tag_data[0] : $tag_data;
|
1838 |
|
1839 |
if ( ! empty( $tag_data ) ) {
|
1840 |
+
$atts = isset( $tag_data['attributes'] ) ? $tag_data['attributes'] : false;
|
1841 |
+
$href = $atts && isset( $atts['href'] ) ? $atts['href'] : false;
|
1842 |
$class = $atts && isset( $atts['class'] ) ? $atts['class'] : '';
|
1843 |
$label = isset( $tag_data['contents'] ) ? $tag_data['contents'] : false;
|
1844 |
|
1946 |
|
1947 |
if ( class_exists( 'Cocur\Slugify\Slugify' ) ) {
|
1948 |
$slugify = new Cocur\Slugify\Slugify();
|
1949 |
+
$slug = $slugify->slugify( $str, $delimiter );
|
1950 |
}
|
1951 |
|
1952 |
return $slug;
|
2018 |
// If the user didn't specify if $tag is a self-closing tag we try to auto-detect it by checking against a list of known self-closing tags.
|
2019 |
$selfclosing_tags = array( 'area', 'base', 'basefont', 'br', 'hr', 'input', 'img', 'link', 'meta', 'col', 'param' );
|
2020 |
if ( is_null( $selfclosing ) ) {
|
2021 |
+
$selfclosing = in_array( $tag, $selfclosing_tags, true );
|
2022 |
}
|
2023 |
|
2024 |
// The regexp is different for normal and self-closing tags because I can't figure out how to make a sufficiently robust unified one.
|
2067 |
foreach ( $attribute_data as $attr ) {
|
2068 |
if ( ! empty( $attr['value_quoted'] ) ) {
|
2069 |
$value = $attr['value_quoted'];
|
2070 |
+
} elseif ( ! empty( $attr['value_unquoted'] ) ) {
|
2071 |
$value = $attr['value_unquoted'];
|
2072 |
} else {
|
2073 |
$value = '';
|
2082 |
}
|
2083 |
|
2084 |
$tag = array(
|
2085 |
+
'tag_name' => $match['tag'][0],
|
2086 |
+
'offset' => $match[0][1],
|
2087 |
+
'contents' => ! empty( $match['contents'] ) ? $match['contents'][0] : '', // empty for self-closing tags.
|
2088 |
'attributes' => $attributes,
|
2089 |
);
|
2090 |
if ( $return_the_entire_tag ) {
|
classes/class-images.php
CHANGED
@@ -24,23 +24,31 @@ class Visual_Portfolio_Images {
|
|
24 |
* Visual_Portfolio_Images constructor.
|
25 |
*/
|
26 |
public static function construct() {
|
27 |
-
// Skip AMP pages.
|
28 |
-
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
|
29 |
-
return;
|
30 |
-
}
|
31 |
-
|
32 |
-
// Prepare images base64 placeholders.
|
33 |
-
// Thanks https://wordpress.org/plugins/powerkit/.
|
34 |
add_action( 'init', 'Visual_Portfolio_Images::allow_lazy_attributes' );
|
35 |
add_filter( 'kses_allowed_protocols', 'Visual_Portfolio_Images::kses_allowed_protocols', 15 );
|
36 |
-
add_filter( 'wp_update_attachment_metadata', 'Visual_Portfolio_Images::generate_attachment_placeholder', 15 );
|
37 |
-
add_filter( 'wp_generate_attachment_metadata', 'Visual_Portfolio_Images::generate_attachment_placeholder', 15 );
|
38 |
add_filter( 'wp_get_attachment_image_attributes', 'Visual_Portfolio_Images::add_image_placeholders', 15, 3 );
|
39 |
|
40 |
// ignore Jetpack lazy.
|
41 |
add_filter( 'jetpack_lazy_images_skip_image_with_attributes', 'Visual_Portfolio_Images::jetpack_lazy_images_skip_image_with_attributes', 15, 2 );
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* Allow attributes of Lazy Load for wp_kses.
|
46 |
*/
|
@@ -74,7 +82,7 @@ class Visual_Portfolio_Images {
|
|
74 |
/**
|
75 |
* Get attachment image wrapper.
|
76 |
*
|
77 |
-
* @param int
|
78 |
* @param string|array $size image size.
|
79 |
* @param bool $icon icon.
|
80 |
* @param string|array $attr image attributes.
|
@@ -83,11 +91,17 @@ class Visual_Portfolio_Images {
|
|
83 |
* @return string
|
84 |
*/
|
85 |
public static function get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = false, $attr = '', $lazyload = true ) {
|
|
|
|
|
86 |
if ( $lazyload ) {
|
87 |
self::$image_processing = true;
|
88 |
}
|
89 |
|
90 |
-
$image =
|
|
|
|
|
|
|
|
|
91 |
|
92 |
if ( $lazyload ) {
|
93 |
self::$image_processing = false;
|
@@ -105,8 +119,7 @@ class Visual_Portfolio_Images {
|
|
105 |
* @return string
|
106 |
*/
|
107 |
public static function get_image_placeholder( $width = 1, $height = 1 ) {
|
108 |
-
|
109 |
-
if ( ! extension_loaded( 'gd' ) || ! function_exists( 'imagecreate' ) ) {
|
110 |
return false;
|
111 |
}
|
112 |
|
@@ -114,32 +127,16 @@ class Visual_Portfolio_Images {
|
|
114 |
return false;
|
115 |
}
|
116 |
|
117 |
-
$ratio
|
118 |
-
$width
|
119 |
$height = $ratio['height'];
|
120 |
|
121 |
-
$
|
122 |
-
|
123 |
-
$placeholder_image = get_transient( $transient );
|
124 |
-
|
125 |
-
if ( ! $placeholder_image ) {
|
126 |
-
ob_start();
|
127 |
-
|
128 |
-
$image = imagecreate( $width, $height );
|
129 |
-
$background = imagecolorallocatealpha( $image, 0, 0, 255, 127 );
|
130 |
-
|
131 |
-
imagepng( $image, null, 9 );
|
132 |
-
imagecolordeallocate( $image, $background );
|
133 |
-
imagedestroy( $image );
|
134 |
|
135 |
-
|
|
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
set_transient( $transient, $placeholder_image );
|
140 |
-
}
|
141 |
-
|
142 |
-
return $placeholder_image;
|
143 |
}
|
144 |
|
145 |
/**
|
@@ -165,44 +162,11 @@ class Visual_Portfolio_Images {
|
|
165 |
$gcd = self::greatest_common_divisor( $width, $height );
|
166 |
|
167 |
return array(
|
168 |
-
'width'
|
169 |
'height' => $height / $gcd,
|
170 |
);
|
171 |
}
|
172 |
|
173 |
-
/**
|
174 |
-
* Attachment metadata filter.
|
175 |
-
*
|
176 |
-
* @param array $metadata - attachment meta data.
|
177 |
-
*
|
178 |
-
* @return array
|
179 |
-
*/
|
180 |
-
public static function generate_attachment_placeholder( $metadata ) {
|
181 |
-
// Generate image full size.
|
182 |
-
if ( isset( $metadata['width'] ) && isset( $metadata['height'] ) ) {
|
183 |
-
$metadata['placeholder'] = self::get_image_placeholder( $metadata['width'], $metadata['height'] );
|
184 |
-
}
|
185 |
-
|
186 |
-
// Generate image sizes.
|
187 |
-
if ( isset( $metadata['sizes'] ) ) {
|
188 |
-
foreach ( $metadata['sizes'] as $slug => & $size ) {
|
189 |
-
// Ignore lqip size.
|
190 |
-
if ( preg_match( '/powerkit-lqip/', $slug ) ) {
|
191 |
-
continue;
|
192 |
-
}
|
193 |
-
// Ignore retina size.
|
194 |
-
if ( preg_match( '/-2x$/', $slug ) ) {
|
195 |
-
continue;
|
196 |
-
}
|
197 |
-
if ( isset( $size['width'] ) && isset( $size['height'] ) ) {
|
198 |
-
$size['placeholder'] = self::get_image_placeholder( $size['width'], $size['height'] );
|
199 |
-
}
|
200 |
-
}
|
201 |
-
}
|
202 |
-
|
203 |
-
return $metadata;
|
204 |
-
}
|
205 |
-
|
206 |
/**
|
207 |
* Add placeholder for Visual Portfolio images.
|
208 |
*
|
@@ -214,6 +178,10 @@ class Visual_Portfolio_Images {
|
|
214 |
* @return array
|
215 |
*/
|
216 |
public static function add_image_placeholders( $attr, $attachment, $size ) {
|
|
|
|
|
|
|
|
|
217 |
// Is string.
|
218 |
if ( ! is_string( $size ) ) {
|
219 |
return $attr;
|
@@ -239,21 +207,24 @@ class Visual_Portfolio_Images {
|
|
239 |
}
|
240 |
|
241 |
// Default Placeholder.
|
242 |
-
$placeholder
|
|
|
|
|
243 |
|
244 |
// The right Image Placeholder.
|
245 |
$metadata = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
|
246 |
|
247 |
-
// generate
|
248 |
-
if (
|
249 |
-
$
|
250 |
-
|
|
|
|
|
|
|
251 |
}
|
252 |
|
253 |
-
if (
|
254 |
-
$placeholder = $
|
255 |
-
} elseif ( isset( $metadata['placeholder'] ) ) {
|
256 |
-
$placeholder = $metadata['placeholder'];
|
257 |
}
|
258 |
|
259 |
// Prevent WP Rocket lazy loading.
|
@@ -261,8 +232,8 @@ class Visual_Portfolio_Images {
|
|
261 |
$attr['data-no-lazy'] = '1';
|
262 |
}
|
263 |
|
264 |
-
// Prevent WP
|
265 |
-
if ( class_exists( 'WP_Smush' ) ) {
|
266 |
$attr['class'] .= ' no-lazyload';
|
267 |
}
|
268 |
|
24 |
* Visual_Portfolio_Images constructor.
|
25 |
*/
|
26 |
public static function construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
add_action( 'init', 'Visual_Portfolio_Images::allow_lazy_attributes' );
|
28 |
add_filter( 'kses_allowed_protocols', 'Visual_Portfolio_Images::kses_allowed_protocols', 15 );
|
|
|
|
|
29 |
add_filter( 'wp_get_attachment_image_attributes', 'Visual_Portfolio_Images::add_image_placeholders', 15, 3 );
|
30 |
|
31 |
// ignore Jetpack lazy.
|
32 |
add_filter( 'jetpack_lazy_images_skip_image_with_attributes', 'Visual_Portfolio_Images::jetpack_lazy_images_skip_image_with_attributes', 15, 2 );
|
33 |
}
|
34 |
|
35 |
+
/**
|
36 |
+
* Init hooks.
|
37 |
+
*/
|
38 |
+
public static function is_enabled() {
|
39 |
+
// check for AMP endpoint.
|
40 |
+
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
|
44 |
+
// disable using filter.
|
45 |
+
if ( ! apply_filters( 'vpf_images_lazyload', true ) ) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
|
52 |
/**
|
53 |
* Allow attributes of Lazy Load for wp_kses.
|
54 |
*/
|
82 |
/**
|
83 |
* Get attachment image wrapper.
|
84 |
*
|
85 |
+
* @param string|int $attachment_id attachment image id.
|
86 |
* @param string|array $size image size.
|
87 |
* @param bool $icon icon.
|
88 |
* @param string|array $attr image attributes.
|
91 |
* @return string
|
92 |
*/
|
93 |
public static function get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = false, $attr = '', $lazyload = true ) {
|
94 |
+
$lazyload = self::is_enabled() && $lazyload;
|
95 |
+
|
96 |
if ( $lazyload ) {
|
97 |
self::$image_processing = true;
|
98 |
}
|
99 |
|
100 |
+
$image = apply_filters( 'vpf_wp_get_attachment_image_extend', false, $attachment_id, $size, $attr, $lazyload );
|
101 |
+
|
102 |
+
if ( ! $image ) {
|
103 |
+
$image = wp_get_attachment_image( $attachment_id, $size, $icon, $attr );
|
104 |
+
}
|
105 |
|
106 |
if ( $lazyload ) {
|
107 |
self::$image_processing = false;
|
119 |
* @return string
|
120 |
*/
|
121 |
public static function get_image_placeholder( $width = 1, $height = 1 ) {
|
122 |
+
if ( ! self::is_enabled() ) {
|
|
|
123 |
return false;
|
124 |
}
|
125 |
|
127 |
return false;
|
128 |
}
|
129 |
|
130 |
+
$ratio = self::get_ratio( $width, $height );
|
131 |
+
$width = $ratio['width'];
|
132 |
$height = $ratio['height'];
|
133 |
|
134 |
+
$placeholder = '<svg width="' . $width . '" height="' . $height . '" viewBox="0 0 ' . $width . ' ' . $height . '" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
+
$escape_search = array( '<', '>', '#', '"' );
|
137 |
+
$escape_replace = array( '%3c', '%3e', '%23', '\'' );
|
138 |
|
139 |
+
return 'data:image/svg+xml,' . str_replace( $escape_search, $escape_replace, $placeholder );
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
/**
|
162 |
$gcd = self::greatest_common_divisor( $width, $height );
|
163 |
|
164 |
return array(
|
165 |
+
'width' => $width / $gcd,
|
166 |
'height' => $height / $gcd,
|
167 |
);
|
168 |
}
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
/**
|
171 |
* Add placeholder for Visual Portfolio images.
|
172 |
*
|
178 |
* @return array
|
179 |
*/
|
180 |
public static function add_image_placeholders( $attr, $attachment, $size ) {
|
181 |
+
if ( ! self::is_enabled() ) {
|
182 |
+
return $attr;
|
183 |
+
}
|
184 |
+
|
185 |
// Is string.
|
186 |
if ( ! is_string( $size ) ) {
|
187 |
return $attr;
|
207 |
}
|
208 |
|
209 |
// Default Placeholder.
|
210 |
+
$placeholder = false;
|
211 |
+
$placeholder_w = false;
|
212 |
+
$placeholder_h = false;
|
213 |
|
214 |
// The right Image Placeholder.
|
215 |
$metadata = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
|
216 |
|
217 |
+
// generate placeholder.
|
218 |
+
if ( isset( $metadata['sizes'][ $size ] ) && isset( $metadata['sizes'][ $size ]['width'] ) && isset( $metadata['sizes'][ $size ]['height'] ) ) {
|
219 |
+
$placeholder_w = $metadata['sizes'][ $size ]['width'];
|
220 |
+
$placeholder_h = $metadata['sizes'][ $size ]['height'];
|
221 |
+
} elseif ( isset( $metadata['width'] ) && isset( $metadata['height'] ) ) {
|
222 |
+
$placeholder_w = $metadata['width'];
|
223 |
+
$placeholder_h = $metadata['height'];
|
224 |
}
|
225 |
|
226 |
+
if ( $placeholder_w && $placeholder_h ) {
|
227 |
+
$placeholder = self::get_image_placeholder( $placeholder_w, $placeholder_h );
|
|
|
|
|
228 |
}
|
229 |
|
230 |
// Prevent WP Rocket lazy loading.
|
232 |
$attr['data-no-lazy'] = '1';
|
233 |
}
|
234 |
|
235 |
+
// Prevent WP Smush lazy loading.
|
236 |
+
if ( class_exists( 'WP_Smush' ) || class_exists( 'Smush\WP_Smush' ) ) {
|
237 |
$attr['class'] .= ' no-lazyload';
|
238 |
}
|
239 |
|
classes/class-migration.php
CHANGED
@@ -30,8 +30,8 @@ class Visual_Portfolio_Migrations {
|
|
30 |
return;
|
31 |
}
|
32 |
|
33 |
-
$new_show_caption
|
34 |
-
$new_title_source
|
35 |
$new_description_source = $new_show_caption && isset( $options['caption_description'] ) ? $options['caption_description'] : 'none';
|
36 |
|
37 |
// Get all available Layouts.
|
@@ -39,7 +39,6 @@ class Visual_Portfolio_Migrations {
|
|
39 |
$layouts_query = get_posts(
|
40 |
array(
|
41 |
'post_type' => 'vp_lists',
|
42 |
-
// phpcs:ignore
|
43 |
'posts_per_page' => -1,
|
44 |
'showposts' => -1,
|
45 |
'paged' => -1,
|
30 |
return;
|
31 |
}
|
32 |
|
33 |
+
$new_show_caption = isset( $options['show_caption'] ) ? 'on' === $options['show_caption'] : true;
|
34 |
+
$new_title_source = $new_show_caption && isset( $options['caption_title'] ) ? $options['caption_title'] : 'none';
|
35 |
$new_description_source = $new_show_caption && isset( $options['caption_description'] ) ? $options['caption_description'] : 'none';
|
36 |
|
37 |
// Get all available Layouts.
|
39 |
$layouts_query = get_posts(
|
40 |
array(
|
41 |
'post_type' => 'vp_lists',
|
|
|
42 |
'posts_per_page' => -1,
|
43 |
'showposts' => -1,
|
44 |
'paged' => -1,
|
classes/class-preview.php
CHANGED
@@ -61,19 +61,24 @@ class Visual_Portfolio_Preview {
|
|
61 |
$url = add_query_arg(
|
62 |
array(
|
63 |
'vp_preview' => 'vp_preview',
|
64 |
-
),
|
|
|
65 |
);
|
66 |
} else {
|
67 |
$url .= '/vp_preview';
|
68 |
}
|
69 |
|
70 |
wp_localize_script(
|
71 |
-
'visual-portfolio-gutenberg',
|
|
|
|
|
72 |
'preview_url' => $url,
|
73 |
)
|
74 |
);
|
75 |
wp_localize_script(
|
76 |
-
'visual-portfolio-elementor',
|
|
|
|
|
77 |
'preview_url' => $url,
|
78 |
)
|
79 |
);
|
@@ -85,7 +90,7 @@ class Visual_Portfolio_Preview {
|
|
85 |
public function is_preview_check() {
|
86 |
// phpcs:disable
|
87 |
$frame = isset( $_GET['vp_preview_frame'] ) ? esc_attr( wp_unslash( $_GET['vp_preview_frame'] ) ) : false;
|
88 |
-
$id
|
89 |
// phpcs:enable
|
90 |
|
91 |
$this->preview_enabled = 'true' === $frame && $id;
|
@@ -100,6 +105,7 @@ class Visual_Portfolio_Preview {
|
|
100 |
|
101 |
// Tell WP Super Cache & W3 Total Cache to not cache WPReadable requests.
|
102 |
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
|
|
|
103 |
define( 'DONOTCACHEPAGE', true );
|
104 |
}
|
105 |
}
|
@@ -132,7 +138,7 @@ class Visual_Portfolio_Preview {
|
|
132 |
if ( isset( $_POST[ $name ] ) ) {
|
133 |
if ( is_array( $_POST[ $name ] ) ) {
|
134 |
$val = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $name ] ) );
|
135 |
-
}
|
136 |
$val = wp_kses( wp_unslash( $_POST[ $name ] ), array( '\'', '\"' ) );
|
137 |
} else {
|
138 |
$val = sanitize_text_field( wp_unslash( $_POST[ $name ] ) );
|
@@ -186,8 +192,8 @@ class Visual_Portfolio_Preview {
|
|
186 |
* @param int $id - visual portfolio shortcode id.
|
187 |
*/
|
188 |
public function print_template( $id ) {
|
189 |
-
wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.contentWindow.min.js',
|
190 |
-
wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/script-preview.min.js', array( 'jquery' ), '', true );
|
191 |
|
192 |
$class_name = 'vp-preview-wrapper';
|
193 |
|
@@ -213,14 +219,11 @@ class Visual_Portfolio_Preview {
|
|
213 |
margin: 0 !important;
|
214 |
padding: 0 !important;
|
215 |
}
|
216 |
-
body {
|
217 |
-
background-color: #fff;
|
218 |
-
}
|
219 |
body:before {
|
220 |
content: none !important;
|
221 |
}
|
222 |
#wpadminbar {
|
223 |
-
display: none;
|
224 |
}
|
225 |
#vp_preview {
|
226 |
position: relative;
|
@@ -241,6 +244,11 @@ class Visual_Portfolio_Preview {
|
|
241 |
?>
|
242 |
</div>
|
243 |
|
|
|
|
|
|
|
|
|
|
|
244 |
<?php wp_footer(); ?>
|
245 |
</body>
|
246 |
</html>
|
61 |
$url = add_query_arg(
|
62 |
array(
|
63 |
'vp_preview' => 'vp_preview',
|
64 |
+
),
|
65 |
+
$url
|
66 |
);
|
67 |
} else {
|
68 |
$url .= '/vp_preview';
|
69 |
}
|
70 |
|
71 |
wp_localize_script(
|
72 |
+
'visual-portfolio-gutenberg',
|
73 |
+
'VPAdminGutenbergVariables',
|
74 |
+
array(
|
75 |
'preview_url' => $url,
|
76 |
)
|
77 |
);
|
78 |
wp_localize_script(
|
79 |
+
'visual-portfolio-elementor',
|
80 |
+
'VPAdminElementorVariables',
|
81 |
+
array(
|
82 |
'preview_url' => $url,
|
83 |
)
|
84 |
);
|
90 |
public function is_preview_check() {
|
91 |
// phpcs:disable
|
92 |
$frame = isset( $_GET['vp_preview_frame'] ) ? esc_attr( wp_unslash( $_GET['vp_preview_frame'] ) ) : false;
|
93 |
+
$id = isset( $_GET['vp_preview_frame_id'] ) ? esc_attr( wp_unslash( $_GET['vp_preview_frame_id'] ) ) : false;
|
94 |
// phpcs:enable
|
95 |
|
96 |
$this->preview_enabled = 'true' === $frame && $id;
|
105 |
|
106 |
// Tell WP Super Cache & W3 Total Cache to not cache WPReadable requests.
|
107 |
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
|
108 |
+
// phpcs:ignore
|
109 |
define( 'DONOTCACHEPAGE', true );
|
110 |
}
|
111 |
}
|
138 |
if ( isset( $_POST[ $name ] ) ) {
|
139 |
if ( is_array( $_POST[ $name ] ) ) {
|
140 |
$val = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $name ] ) );
|
141 |
+
} elseif ( 'vp_custom_css' === $name ) {
|
142 |
$val = wp_kses( wp_unslash( $_POST[ $name ] ), array( '\'', '\"' ) );
|
143 |
} else {
|
144 |
$val = sanitize_text_field( wp_unslash( $_POST[ $name ] ) );
|
192 |
* @param int $id - visual portfolio shortcode id.
|
193 |
*/
|
194 |
public function print_template( $id ) {
|
195 |
+
wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.contentWindow.min.js', array(), '4.2.1', true );
|
196 |
+
wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/script-preview.min.js', array( 'jquery' ), '1.16.0', true );
|
197 |
|
198 |
$class_name = 'vp-preview-wrapper';
|
199 |
|
219 |
margin: 0 !important;
|
220 |
padding: 0 !important;
|
221 |
}
|
|
|
|
|
|
|
222 |
body:before {
|
223 |
content: none !important;
|
224 |
}
|
225 |
#wpadminbar {
|
226 |
+
display: none;
|
227 |
}
|
228 |
#vp_preview {
|
229 |
position: relative;
|
244 |
?>
|
245 |
</div>
|
246 |
|
247 |
+
<script>
|
248 |
+
<?php // phpcs:ignore ?>
|
249 |
+
window.vp_preview_post_data = <?php echo isset( $_POST ) && ! empty( $_POST ) ? json_encode( $_POST ) : '{}'; ?>;
|
250 |
+
</script>
|
251 |
+
|
252 |
<?php wp_footer(); ?>
|
253 |
</body>
|
254 |
</html>
|
classes/class-rest.php
CHANGED
@@ -25,7 +25,7 @@ class Visual_Portfolio_Rest extends WP_REST_Controller {
|
|
25 |
*
|
26 |
* @var string
|
27 |
*/
|
28 |
-
protected $version
|
29 |
|
30 |
/**
|
31 |
* Visual_Portfolio_Rest constructor.
|
@@ -42,7 +42,9 @@ class Visual_Portfolio_Rest extends WP_REST_Controller {
|
|
42 |
|
43 |
// Get layouts list.
|
44 |
register_rest_route(
|
45 |
-
$namespace,
|
|
|
|
|
46 |
'methods' => WP_REST_Server::READABLE,
|
47 |
'callback' => array( $this, 'get_layouts' ),
|
48 |
)
|
@@ -57,11 +59,10 @@ class Visual_Portfolio_Rest extends WP_REST_Controller {
|
|
57 |
public function get_layouts() {
|
58 |
// get all visual-portfolio post types.
|
59 |
// Don't use WP_Query on the admin side https://core.trac.wordpress.org/ticket/18408 .
|
60 |
-
$layouts
|
61 |
$vp_query = get_posts(
|
62 |
array(
|
63 |
'post_type' => 'vp_lists',
|
64 |
-
// phpcs:ignore
|
65 |
'posts_per_page' => -1,
|
66 |
'showposts' => -1,
|
67 |
'paged' => -1,
|
@@ -91,9 +92,10 @@ class Visual_Portfolio_Rest extends WP_REST_Controller {
|
|
91 |
public function success( $response ) {
|
92 |
return new WP_REST_Response(
|
93 |
array(
|
94 |
-
'success'
|
95 |
'response' => $response,
|
96 |
-
),
|
|
|
97 |
);
|
98 |
}
|
99 |
|
@@ -107,11 +109,12 @@ class Visual_Portfolio_Rest extends WP_REST_Controller {
|
|
107 |
public function error( $code, $response ) {
|
108 |
return new WP_REST_Response(
|
109 |
array(
|
110 |
-
'error'
|
111 |
-
'success'
|
112 |
'error_code' => $code,
|
113 |
-
'response'
|
114 |
-
),
|
|
|
115 |
);
|
116 |
}
|
117 |
}
|
25 |
*
|
26 |
* @var string
|
27 |
*/
|
28 |
+
protected $version = '1';
|
29 |
|
30 |
/**
|
31 |
* Visual_Portfolio_Rest constructor.
|
42 |
|
43 |
// Get layouts list.
|
44 |
register_rest_route(
|
45 |
+
$namespace,
|
46 |
+
'/get_layouts/',
|
47 |
+
array(
|
48 |
'methods' => WP_REST_Server::READABLE,
|
49 |
'callback' => array( $this, 'get_layouts' ),
|
50 |
)
|
59 |
public function get_layouts() {
|
60 |
// get all visual-portfolio post types.
|
61 |
// Don't use WP_Query on the admin side https://core.trac.wordpress.org/ticket/18408 .
|
62 |
+
$layouts = array();
|
63 |
$vp_query = get_posts(
|
64 |
array(
|
65 |
'post_type' => 'vp_lists',
|
|
|
66 |
'posts_per_page' => -1,
|
67 |
'showposts' => -1,
|
68 |
'paged' => -1,
|
92 |
public function success( $response ) {
|
93 |
return new WP_REST_Response(
|
94 |
array(
|
95 |
+
'success' => true,
|
96 |
'response' => $response,
|
97 |
+
),
|
98 |
+
200
|
99 |
);
|
100 |
}
|
101 |
|
109 |
public function error( $code, $response ) {
|
110 |
return new WP_REST_Response(
|
111 |
array(
|
112 |
+
'error' => true,
|
113 |
+
'success' => false,
|
114 |
'error_code' => $code,
|
115 |
+
'response' => $response,
|
116 |
+
),
|
117 |
+
401
|
118 |
);
|
119 |
}
|
120 |
}
|
classes/class-settings.php
CHANGED
@@ -158,32 +158,32 @@ class Visual_Portfolio_Settings {
|
|
158 |
'type' => 'html',
|
159 |
),
|
160 |
array(
|
161 |
-
'name'
|
162 |
-
'label'
|
163 |
-
'type'
|
164 |
'placeholder' => '500',
|
165 |
-
'default'
|
166 |
),
|
167 |
array(
|
168 |
-
'name'
|
169 |
-
'label'
|
170 |
-
'type'
|
171 |
'placeholder' => '800',
|
172 |
-
'default'
|
173 |
),
|
174 |
array(
|
175 |
-
'name'
|
176 |
-
'label'
|
177 |
-
'type'
|
178 |
'placeholder' => '1280',
|
179 |
-
'default'
|
180 |
),
|
181 |
array(
|
182 |
-
'name'
|
183 |
-
'label'
|
184 |
-
'type'
|
185 |
'placeholder' => '1920',
|
186 |
-
'default'
|
187 |
),
|
188 |
array(
|
189 |
'name' => 'images_popup_title',
|
@@ -192,25 +192,25 @@ class Visual_Portfolio_Settings {
|
|
192 |
'type' => 'html',
|
193 |
),
|
194 |
array(
|
195 |
-
'name'
|
196 |
-
'label'
|
197 |
-
'type'
|
198 |
'placeholder' => '500',
|
199 |
-
'default'
|
200 |
),
|
201 |
array(
|
202 |
-
'name'
|
203 |
-
'label'
|
204 |
-
'type'
|
205 |
'placeholder' => '800',
|
206 |
-
'default'
|
207 |
),
|
208 |
array(
|
209 |
-
'name'
|
210 |
-
'label'
|
211 |
-
'type'
|
212 |
'placeholder' => '1920',
|
213 |
-
'default'
|
214 |
),
|
215 |
),
|
216 |
'vp_popup_gallery' => array(
|
158 |
'type' => 'html',
|
159 |
),
|
160 |
array(
|
161 |
+
'name' => 'sm',
|
162 |
+
'label' => esc_html__( 'Small', 'visual-portfolio' ),
|
163 |
+
'type' => 'number',
|
164 |
'placeholder' => '500',
|
165 |
+
'default' => 500,
|
166 |
),
|
167 |
array(
|
168 |
+
'name' => 'md',
|
169 |
+
'label' => esc_html__( 'Medium', 'visual-portfolio' ),
|
170 |
+
'type' => 'number',
|
171 |
'placeholder' => '800',
|
172 |
+
'default' => 800,
|
173 |
),
|
174 |
array(
|
175 |
+
'name' => 'lg',
|
176 |
+
'label' => esc_html__( 'Large', 'visual-portfolio' ),
|
177 |
+
'type' => 'number',
|
178 |
'placeholder' => '1280',
|
179 |
+
'default' => 1280,
|
180 |
),
|
181 |
array(
|
182 |
+
'name' => 'xl',
|
183 |
+
'label' => esc_html__( 'Extra Large', 'visual-portfolio' ),
|
184 |
+
'type' => 'number',
|
185 |
'placeholder' => '1920',
|
186 |
+
'default' => 1920,
|
187 |
),
|
188 |
array(
|
189 |
'name' => 'images_popup_title',
|
192 |
'type' => 'html',
|
193 |
),
|
194 |
array(
|
195 |
+
'name' => 'sm_popup',
|
196 |
+
'label' => esc_html__( 'Small', 'visual-portfolio' ),
|
197 |
+
'type' => 'number',
|
198 |
'placeholder' => '500',
|
199 |
+
'default' => 500,
|
200 |
),
|
201 |
array(
|
202 |
+
'name' => 'md_popup',
|
203 |
+
'label' => esc_html__( 'Medium', 'visual-portfolio' ),
|
204 |
+
'type' => 'number',
|
205 |
'placeholder' => '800',
|
206 |
+
'default' => 800,
|
207 |
),
|
208 |
array(
|
209 |
+
'name' => 'xl_popup',
|
210 |
+
'label' => esc_html__( 'Large', 'visual-portfolio' ),
|
211 |
+
'type' => 'number',
|
212 |
'placeholder' => '1920',
|
213 |
+
'default' => 1920,
|
214 |
),
|
215 |
),
|
216 |
'vp_popup_gallery' => array(
|
classes/class-shortcode.php
CHANGED
@@ -35,7 +35,8 @@ class Visual_Portfolio_Shortcode {
|
|
35 |
'id' => '',
|
36 |
'class' => '',
|
37 |
'vc_css' => '',
|
38 |
-
),
|
|
|
39 |
);
|
40 |
|
41 |
return Visual_Portfolio_Get::get( $atts );
|
@@ -50,12 +51,13 @@ class Visual_Portfolio_Shortcode {
|
|
50 |
public function get_shortcode_filter_out( $atts = array() ) {
|
51 |
$atts = shortcode_atts(
|
52 |
array(
|
53 |
-
'id'
|
54 |
-
'type'
|
55 |
-
'align'
|
56 |
'show_count' => false,
|
57 |
-
'class'
|
58 |
-
),
|
|
|
59 |
);
|
60 |
|
61 |
return Visual_Portfolio_Get::get_filter( $atts );
|
@@ -74,7 +76,8 @@ class Visual_Portfolio_Shortcode {
|
|
74 |
'type' => 'default',
|
75 |
'align' => 'center',
|
76 |
'class' => '',
|
77 |
-
),
|
|
|
78 |
);
|
79 |
|
80 |
return Visual_Portfolio_Get::get_sort( $atts );
|
35 |
'id' => '',
|
36 |
'class' => '',
|
37 |
'vc_css' => '',
|
38 |
+
),
|
39 |
+
$atts
|
40 |
);
|
41 |
|
42 |
return Visual_Portfolio_Get::get( $atts );
|
51 |
public function get_shortcode_filter_out( $atts = array() ) {
|
52 |
$atts = shortcode_atts(
|
53 |
array(
|
54 |
+
'id' => '',
|
55 |
+
'type' => 'default',
|
56 |
+
'align' => 'center',
|
57 |
'show_count' => false,
|
58 |
+
'class' => '',
|
59 |
+
),
|
60 |
+
$atts
|
61 |
);
|
62 |
|
63 |
return Visual_Portfolio_Get::get_filter( $atts );
|
76 |
'type' => 'default',
|
77 |
'align' => 'center',
|
78 |
'class' => '',
|
79 |
+
),
|
80 |
+
$atts
|
81 |
);
|
82 |
|
83 |
return Visual_Portfolio_Get::get_sort( $atts );
|
classes/class-tinymce.php
CHANGED
@@ -53,7 +53,6 @@ class Visual_Portfolio_TinyMCE {
|
|
53 |
$vp_query = get_posts(
|
54 |
array(
|
55 |
'post_type' => 'vp_lists',
|
56 |
-
// phpcs:ignore
|
57 |
'posts_per_page' => -1,
|
58 |
'showposts' => -1,
|
59 |
'paged' => -1,
|
@@ -71,7 +70,7 @@ class Visual_Portfolio_TinyMCE {
|
|
71 |
return;
|
72 |
}
|
73 |
|
74 |
-
wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js' );
|
75 |
wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
|
76 |
}
|
77 |
}
|
53 |
$vp_query = get_posts(
|
54 |
array(
|
55 |
'post_type' => 'vp_lists',
|
|
|
56 |
'posts_per_page' => -1,
|
57 |
'showposts' => -1,
|
58 |
'paged' => -1,
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
+
wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '1.16.0', true );
|
74 |
wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
|
75 |
}
|
76 |
}
|
classes/class-vc.php
CHANGED
@@ -35,7 +35,7 @@ class Visual_Portfolio_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' ) );
|
39 |
}
|
40 |
}
|
41 |
|
@@ -48,13 +48,13 @@ class Visual_Portfolio_VC {
|
|
48 |
// Don't use WP_Query on the admin side https://core.trac.wordpress.org/ticket/18408 .
|
49 |
$vp_query = get_posts(
|
50 |
array(
|
51 |
-
'post_type'
|
52 |
-
|
53 |
-
'
|
54 |
-
'
|
55 |
-
'paged' => -1,
|
56 |
)
|
57 |
);
|
|
|
58 |
$data_vc = array();
|
59 |
foreach ( $vp_query as $post ) {
|
60 |
$data_vc[] = array( $post->ID, '#' . $post->ID . ' - ' . $post->post_title );
|
@@ -62,11 +62,11 @@ class Visual_Portfolio_VC {
|
|
62 |
|
63 |
vc_map(
|
64 |
array(
|
65 |
-
'name'
|
66 |
-
'base'
|
67 |
'controls' => 'full',
|
68 |
'icon' => 'icon-visual-portfolio',
|
69 |
-
'params'
|
70 |
array(
|
71 |
'type' => 'dropdown',
|
72 |
'heading' => esc_html__( 'Select Layout', 'visual-portfolio' ),
|
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' ), '1.16.0', true );
|
39 |
}
|
40 |
}
|
41 |
|
48 |
// Don't use WP_Query on the admin side https://core.trac.wordpress.org/ticket/18408 .
|
49 |
$vp_query = get_posts(
|
50 |
array(
|
51 |
+
'post_type' => 'vp_lists',
|
52 |
+
'posts_per_page' => -1,
|
53 |
+
'showposts' => -1,
|
54 |
+
'paged' => -1,
|
|
|
55 |
)
|
56 |
);
|
57 |
+
|
58 |
$data_vc = array();
|
59 |
foreach ( $vp_query as $post ) {
|
60 |
$data_vc[] = array( $post->ID, '#' . $post->ID . ' - ' . $post->post_title );
|
62 |
|
63 |
vc_map(
|
64 |
array(
|
65 |
+
'name' => esc_html__( 'Visual Portfolio', 'visual-portfolio' ),
|
66 |
+
'base' => 'visual_portfolio',
|
67 |
'controls' => 'full',
|
68 |
'icon' => 'icon-visual-portfolio',
|
69 |
+
'params' => array(
|
70 |
array(
|
71 |
'type' => 'dropdown',
|
72 |
'heading' => esc_html__( 'Select Layout', 'visual-portfolio' ),
|
languages/visual-portfolio.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Visual Portfolio package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
@@ -15,824 +15,829 @@ msgstr ""
|
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
|
18 |
-
#: dist/visual-portfolio/class-visual-portfolio.php:
|
19 |
msgid "Small (VP)"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: dist/visual-portfolio/class-visual-portfolio.php:
|
23 |
msgid "Medium (VP)"
|
24 |
msgstr ""
|
25 |
|
26 |
-
#: dist/visual-portfolio/class-visual-portfolio.php:
|
27 |
msgid "Large (VP)"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: dist/visual-portfolio/class-visual-portfolio.php:
|
31 |
msgid "Extra Large (VP)"
|
32 |
msgstr ""
|
33 |
|
34 |
#. translators: %d: error count
|
35 |
#. translators: %d: error count
|
36 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
37 |
msgid "There is %d error which must be fixed before you can save."
|
38 |
msgid_plural "There are %d errors which must be fixed before you can save."
|
39 |
msgstr[0] ""
|
40 |
msgstr[1] ""
|
41 |
|
42 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
43 |
msgid "Update anyway, even though it might break your site?"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
47 |
msgctxt "Post Type General Name"
|
48 |
msgid "Portfolio Items"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
52 |
msgctxt "Post Type Singular Name"
|
53 |
msgid "Portfolio Item"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
57 |
msgid "Visual Portfolio"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
61 |
msgid "Parent Portfolio Item"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
65 |
msgid "Portfolio Items"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
69 |
msgid "View Portfolio Item"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
73 |
msgid "Add New Portfolio Item"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
77 |
msgid "Add New"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
81 |
msgid "Edit Portfolio Item"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
85 |
msgid "Update Portfolio Item"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
89 |
msgid "Search Portfolio Item"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
93 |
msgid "Not Found"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
97 |
msgid "Not found in Trash"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
101 |
msgid "Portfolio Categories"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
105 |
msgid "Categories"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
109 |
msgid "Portfolio Tags"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
113 |
msgid "Tags"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
117 |
msgctxt "Post Type General Name"
|
118 |
msgid "Portfolio Layouts"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
122 |
msgctxt "Post Type Singular Name"
|
123 |
msgid "Portfolio Layout"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
127 |
msgid "Portfolio Layouts"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
131 |
msgid "View Portfolio Layout"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
135 |
msgid "Add New Portfolio Layout"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
139 |
msgid "Edit Portfolio Layout"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
143 |
msgid "Update Portfolio Layout"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
147 |
msgid "Search Portfolio Layout"
|
148 |
msgstr ""
|
149 |
|
150 |
#. translators: %s - taxonomy name.
|
151 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
152 |
msgid "Show All %s"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
156 |
msgid "Video"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
160 |
msgid "https://"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
164 |
msgid "Portfolio Manager"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
168 |
msgid "Portfolio Author"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
172 |
msgid "Ready to add your awesome portfolio?"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
176 |
msgid "Create your first portfolio list!"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
180 |
msgid "Thumbnail"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
184 |
msgid "Shortcode"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
188 |
msgid "Documentation"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
192 |
msgid "Tiles"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
196 |
msgid "Type"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
200 |
msgid "Select tiles type"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
204 |
msgid "Masonry"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
208 |
msgid "Columns"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
212 |
msgid "Grid"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
216 |
msgid "Justified"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
220 |
msgid "Row height"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
224 |
msgid "Row Height Tolerance"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
228 |
msgid "Slider"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
232 |
msgid "Effect"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
236 |
msgid "Slide"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
240 |
msgid "Coverflow"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
244 |
msgid "Fade"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
248 |
msgid "Speed (in Seconds)"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
252 |
msgid "Autoplay (in Seconds)"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
256 |
msgid "Pause on Mouse Over"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
260 |
msgid "Items Height"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
264 |
msgid "Auto"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
268 |
msgid "Static (px)"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
272 |
msgid "Dynamic (%)"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
276 |
msgid "Items Minimal Height"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
280 |
msgid "300px, 80vh"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
284 |
msgid "Values with `vh` units will not be visible in preview."
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
288 |
msgid "Slides Per View"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
292 |
msgid "Custom"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
296 |
msgid "Centered Slides"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
300 |
msgid "Loop"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
304 |
msgid "Free Scroll"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
308 |
msgid "Free Scroll Sticky"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
312 |
msgid "Display Arrows"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
316 |
msgid "Prev Arrow Icon"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
320 |
msgid "Next Arrow Icon"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
324 |
msgid "Display Bullets"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
328 |
msgid "Dynamic Bullets"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
332 |
msgid "Mousewheel Control"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
336 |
msgid "Display Thumbnails"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
340 |
msgid "Thumbnails Gap"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
344 |
msgid "Thumbnails Height"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
348 |
msgid "Thumbnails Per View"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
352 |
msgid "Gap"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
356 |
msgid "Items Per Page"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
360 |
msgid "Stretch"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
364 |
msgid "Break container and display it wide"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
368 |
msgid "Default"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
372 |
msgid "Display Read More Button"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
376 |
msgid "Hide"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
380 |
msgid "Always Display"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
384 |
msgid "Display when used \"More tag\" in the post"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
388 |
msgid "Read More Button Label"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
392 |
msgid "Fly"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
396 |
msgid "Overlay Background Color"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
400 |
msgid "Overlay Text Color"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
404 |
msgid "Emerge"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
408 |
msgid "Display Title"
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
412 |
msgid "Display Categories"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
416 |
msgid "Categories Count"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
420 |
msgid "Display Date"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
424 |
msgid "Human Format"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
428 |
msgid ""
|
429 |
"Date format
|
430 |
" Example: F j, Y"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
434 |
msgid "Display Excerpt"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
438 |
msgid "Excerpt Words Count"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
442 |
msgid "Display Icon"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
446 |
msgid "Standard Icon"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
450 |
msgid "Video Icon"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
454 |
msgid "Caption Align"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
458 |
msgid "Disabled"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
462 |
msgid "URL"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
466 |
msgid "Popup Gallery"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
470 |
msgid "Target"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
474 |
msgid "New Tab (_blank)"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
478 |
msgid "Top Frame (_top)"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
482 |
msgid "Title"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
486 |
msgid "None"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
490 |
msgid "Image Title"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
494 |
msgid "Image Caption"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
498 |
msgid "Image Alt"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
502 |
msgid "Image Description"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
506 |
msgid "Description"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
510 |
msgid "Dropdown"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
514 |
msgid "Align"
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
518 |
msgid "Center"
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
522 |
msgid "Left"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
526 |
msgid "Right"
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
530 |
msgid "Display Count"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
534 |
msgid "All Button Text"
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
538 |
msgid "All"
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
542 |
msgid "Paged"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
546 |
msgid "Load More"
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
550 |
msgid "Infinite"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
554 |
msgid "Note: you will see the \"Load More\" pagination in the preview. \"Infinite\" pagination will be visible on the site."
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
558 |
msgid "Texts"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
562 |
msgid "Load more button label"
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
566 |
msgid "Loading More..."
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
570 |
msgid "Loading more button label"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
574 |
msgid "You’ve reached the end of the list"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
578 |
msgid "End of the list text"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
582 |
msgid "Display Numbers"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
586 |
msgid "Data Source"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
590 |
msgid "Specific Posts"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
594 |
msgid "Excluded Posts"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
598 |
msgid "Custom Query"
|
599 |
msgstr ""
|
600 |
|
601 |
#. translators: %1$s - escaped url.
|
602 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
603 |
msgid "Build custom query according to WordPress Codex. See example here <a href=\"%1$s\">%1$s</a>."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
607 |
msgid "Taxonomies"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
611 |
msgid "Taxonomies Relation"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
615 |
msgid "OR"
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
619 |
msgid "AND"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
623 |
msgid "Order by"
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
627 |
msgid "Date"
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
631 |
msgid "ID"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
635 |
msgid "Menu Order"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
639 |
msgid "Random"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
643 |
msgid "Order Direction"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
647 |
msgid "DESC"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
651 |
msgid "ASC"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
655 |
msgid "Avoid Duplicate Posts"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
659 |
msgid "Titles"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
663 |
msgid "Descriptions"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
667 |
msgid "Uploaded"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
671 |
msgid "Name & Shortcode"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
675 |
msgid "Layout"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
679 |
msgid "Items Style"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
683 |
msgid "Items Click Action"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
687 |
msgid "Filter"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
691 |
msgid "Sort"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
695 |
msgid "Pagination"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
699 |
msgid "Preview"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
703 |
msgid "Content Source"
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
707 |
msgid "Custom CSS"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
711 |
msgid "Name"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
715 |
msgid "Place the shortcode where you want to show the portfolio list."
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
719 |
msgid "Filter Shortcode"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
723 |
msgid "Place the shortcode where you want to show the filter."
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
727 |
msgid "Sort Shortcode"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
731 |
msgid "Place the shortcode where you want to show the sort."
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
735 |
msgid "Portfolio"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
739 |
msgid "Post-Based"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
743 |
msgid "Images"
|
744 |
msgstr ""
|
745 |
|
746 |
#. translators: %1$s - escaped url.
|
747 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
748 |
msgid "Portfolio items list from <a href=\"%1$s\" target=\"_blank\">%2$s</a>"
|
749 |
msgstr ""
|
750 |
|
751 |
-
|
|
|
|
|
|
|
|
|
|
|
752 |
msgid "Available classes:"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: dist/visual-portfolio/classes/class-admin.php:
|
756 |
msgid " - use this classname for each styles you added. It is the main Visual Portfolio wrapper."
|
757 |
msgstr ""
|
758 |
|
759 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
760 |
msgid "Couldn't retrieve Visual Portfolio ID."
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
764 |
msgid "Close (Esc)"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
768 |
msgid "Share"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
772 |
msgid "Toggle fullscreen"
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
776 |
msgid "Zoom in/out"
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
780 |
msgid "Previous (arrow left)"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
784 |
msgid "Next (arrow right)"
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
788 |
msgid "Share on Facebook"
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
792 |
msgid "Tweet"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
796 |
msgid "Pin it"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
800 |
msgid "Close"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
804 |
msgid "Next"
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
808 |
msgid "Previous"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
812 |
msgid "The requested content cannot be loaded. <br /> Please try again later."
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
816 |
msgid "Start slideshow"
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
820 |
msgid "Pause slideshow"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
824 |
msgid "Full screen"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
828 |
msgid "Thumbnails"
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
832 |
msgid "Download"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: dist/visual-portfolio/classes/class-assets.php:
|
836 |
msgid "Zoom"
|
837 |
msgstr ""
|
838 |
|
@@ -868,44 +873,44 @@ msgstr ""
|
|
868 |
msgid "Edit"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: dist/visual-portfolio/classes/class-elementor-widget.php:
|
872 |
msgid "General"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: dist/visual-portfolio/classes/class-elementor-widget.php:
|
876 |
msgid "Select Layout"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
880 |
msgid "No items found."
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
884 |
msgid "Default sorting"
|
885 |
msgstr ""
|
886 |
|
887 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
888 |
msgid "Sort by date (newest)"
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
892 |
msgid "Sort by date (oldest)"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
896 |
msgid "Sort by title (A-Z)"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
900 |
msgid "Sort by title (Z-A)"
|
901 |
msgstr ""
|
902 |
|
903 |
#. translators: %s - published in human format.
|
904 |
-
#: dist/visual-portfolio/classes/class-get-portfolio.php:
|
905 |
msgid "%s ago"
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: dist/visual-portfolio/classes/class-rest.php:
|
909 |
msgid "Layouts not found."
|
910 |
msgstr ""
|
911 |
|
1 |
+
# Copyright (C) 2020 Visual Portfolio
|
2 |
# This file is distributed under the same license as the Visual Portfolio package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
|
18 |
+
#: dist/visual-portfolio/class-visual-portfolio.php:188
|
19 |
msgid "Small (VP)"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: dist/visual-portfolio/class-visual-portfolio.php:189
|
23 |
msgid "Medium (VP)"
|
24 |
msgstr ""
|
25 |
|
26 |
+
#: dist/visual-portfolio/class-visual-portfolio.php:190
|
27 |
msgid "Large (VP)"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: dist/visual-portfolio/class-visual-portfolio.php:191
|
31 |
msgid "Extra Large (VP)"
|
32 |
msgstr ""
|
33 |
|
34 |
#. translators: %d: error count
|
35 |
#. translators: %d: error count
|
36 |
+
#: dist/visual-portfolio/classes/class-admin.php:92, dist/visual-portfolio/classes/class-admin.php:94
|
37 |
msgid "There is %d error which must be fixed before you can save."
|
38 |
msgid_plural "There are %d errors which must be fixed before you can save."
|
39 |
msgstr[0] ""
|
40 |
msgstr[1] ""
|
41 |
|
42 |
+
#: dist/visual-portfolio/classes/class-admin.php:96
|
43 |
msgid "Update anyway, even though it might break your site?"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: dist/visual-portfolio/classes/class-admin.php:198
|
47 |
msgctxt "Post Type General Name"
|
48 |
msgid "Portfolio Items"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: dist/visual-portfolio/classes/class-admin.php:199
|
52 |
msgctxt "Post Type Singular Name"
|
53 |
msgid "Portfolio Item"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: dist/visual-portfolio/classes/class-admin.php:200, dist/visual-portfolio/classes/class-admin.php:293, dist/visual-portfolio/classes/class-admin.php:701, dist/visual-portfolio/classes/class-elementor-widget.php:57, dist/visual-portfolio/classes/class-vc.php:65
|
57 |
msgid "Visual Portfolio"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: dist/visual-portfolio/classes/class-admin.php:201, dist/visual-portfolio/classes/class-admin.php:294
|
61 |
msgid "Parent Portfolio Item"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: dist/visual-portfolio/classes/class-admin.php:202
|
65 |
msgid "Portfolio Items"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: dist/visual-portfolio/classes/class-admin.php:203
|
69 |
msgid "View Portfolio Item"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: dist/visual-portfolio/classes/class-admin.php:204
|
73 |
msgid "Add New Portfolio Item"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: dist/visual-portfolio/classes/class-admin.php:205, dist/visual-portfolio/classes/class-admin.php:298
|
77 |
msgid "Add New"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: dist/visual-portfolio/classes/class-admin.php:206
|
81 |
msgid "Edit Portfolio Item"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: dist/visual-portfolio/classes/class-admin.php:207
|
85 |
msgid "Update Portfolio Item"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: dist/visual-portfolio/classes/class-admin.php:208
|
89 |
msgid "Search Portfolio Item"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: dist/visual-portfolio/classes/class-admin.php:209, dist/visual-portfolio/classes/class-admin.php:302
|
93 |
msgid "Not Found"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: dist/visual-portfolio/classes/class-admin.php:210, dist/visual-portfolio/classes/class-admin.php:303
|
97 |
msgid "Not found in Trash"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: dist/visual-portfolio/classes/class-admin.php:249
|
101 |
msgid "Portfolio Categories"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: dist/visual-portfolio/classes/class-admin.php:251, dist/visual-portfolio/classes/class-controls.php:610
|
105 |
msgid "Categories"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: dist/visual-portfolio/classes/class-admin.php:269
|
109 |
msgid "Portfolio Tags"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: dist/visual-portfolio/classes/class-admin.php:271
|
113 |
msgid "Tags"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: dist/visual-portfolio/classes/class-admin.php:291
|
117 |
msgctxt "Post Type General Name"
|
118 |
msgid "Portfolio Layouts"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: dist/visual-portfolio/classes/class-admin.php:292
|
122 |
msgctxt "Post Type Singular Name"
|
123 |
msgid "Portfolio Layout"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: dist/visual-portfolio/classes/class-admin.php:295
|
127 |
msgid "Portfolio Layouts"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: dist/visual-portfolio/classes/class-admin.php:296
|
131 |
msgid "View Portfolio Layout"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: dist/visual-portfolio/classes/class-admin.php:297
|
135 |
msgid "Add New Portfolio Layout"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: dist/visual-portfolio/classes/class-admin.php:299
|
139 |
msgid "Edit Portfolio Layout"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: dist/visual-portfolio/classes/class-admin.php:300
|
143 |
msgid "Update Portfolio Layout"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: dist/visual-portfolio/classes/class-admin.php:301
|
147 |
msgid "Search Portfolio Layout"
|
148 |
msgstr ""
|
149 |
|
150 |
#. translators: %s - taxonomy name.
|
151 |
+
#: dist/visual-portfolio/classes/class-admin.php:348
|
152 |
msgid "Show All %s"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: dist/visual-portfolio/classes/class-admin.php:388, dist/visual-portfolio/classes/class-controls.php:622
|
156 |
msgid "Video"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: dist/visual-portfolio/classes/class-admin.php:428
|
160 |
msgid "https://"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: dist/visual-portfolio/classes/class-admin.php:499
|
164 |
msgid "Portfolio Manager"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: dist/visual-portfolio/classes/class-admin.php:504
|
168 |
msgid "Portfolio Author"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: dist/visual-portfolio/classes/class-admin.php:587
|
172 |
msgid "Ready to add your awesome portfolio?"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: dist/visual-portfolio/classes/class-admin.php:588
|
176 |
msgid "Create your first portfolio list!"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: dist/visual-portfolio/classes/class-admin.php:627
|
180 |
msgid "Thumbnail"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: dist/visual-portfolio/classes/class-admin.php:660, dist/visual-portfolio/classes/class-admin.php:2907
|
184 |
msgid "Shortcode"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: dist/visual-portfolio/classes/class-admin.php:756, dist/visual-portfolio/classes/class-admin.php:757
|
188 |
msgid "Documentation"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: dist/visual-portfolio/classes/class-admin.php:776
|
192 |
msgid "Tiles"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: dist/visual-portfolio/classes/class-admin.php:791, dist/visual-portfolio/classes/class-admin.php:2144
|
196 |
msgid "Type"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: dist/visual-portfolio/classes/class-admin.php:792
|
200 |
msgid "Select tiles type"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: dist/visual-portfolio/classes/class-admin.php:914
|
204 |
msgid "Masonry"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: dist/visual-portfolio/classes/class-admin.php:918, dist/visual-portfolio/classes/class-admin.php:933
|
208 |
msgid "Columns"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: dist/visual-portfolio/classes/class-admin.php:929
|
212 |
msgid "Grid"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: dist/visual-portfolio/classes/class-admin.php:944
|
216 |
msgid "Justified"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: dist/visual-portfolio/classes/class-admin.php:948
|
220 |
msgid "Row height"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: dist/visual-portfolio/classes/class-admin.php:956
|
224 |
msgid "Row Height Tolerance"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: dist/visual-portfolio/classes/class-admin.php:968
|
228 |
msgid "Slider"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: dist/visual-portfolio/classes/class-admin.php:972
|
232 |
msgid "Effect"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: dist/visual-portfolio/classes/class-admin.php:976
|
236 |
msgid "Slide"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: dist/visual-portfolio/classes/class-admin.php:977
|
240 |
msgid "Coverflow"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: dist/visual-portfolio/classes/class-admin.php:978, dist/visual-portfolio/classes/class-admin.php:1519
|
244 |
msgid "Fade"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: dist/visual-portfolio/classes/class-admin.php:983
|
248 |
msgid "Speed (in Seconds)"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: dist/visual-portfolio/classes/class-admin.php:992
|
252 |
msgid "Autoplay (in Seconds)"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: dist/visual-portfolio/classes/class-admin.php:1001
|
256 |
msgid "Pause on Mouse Over"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: dist/visual-portfolio/classes/class-admin.php:1014
|
260 |
msgid "Items Height"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: dist/visual-portfolio/classes/class-admin.php:1018, dist/visual-portfolio/classes/class-admin.php:1072, dist/visual-portfolio/classes/class-admin.php:1218, dist/visual-portfolio/classes/class-admin.php:1268
|
264 |
msgid "Auto"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: dist/visual-portfolio/classes/class-admin.php:1019, dist/visual-portfolio/classes/class-admin.php:1219
|
268 |
msgid "Static (px)"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: dist/visual-portfolio/classes/class-admin.php:1020, dist/visual-portfolio/classes/class-admin.php:1220
|
272 |
msgid "Dynamic (%)"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: dist/visual-portfolio/classes/class-admin.php:1053
|
276 |
msgid "Items Minimal Height"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: dist/visual-portfolio/classes/class-admin.php:1054
|
280 |
msgid "300px, 80vh"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: dist/visual-portfolio/classes/class-admin.php:1055
|
284 |
msgid "Values with `vh` units will not be visible in preview."
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: dist/visual-portfolio/classes/class-admin.php:1068
|
288 |
msgid "Slides Per View"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: dist/visual-portfolio/classes/class-admin.php:1073, dist/visual-portfolio/classes/class-admin.php:1269, dist/visual-portfolio/classes/class-admin.php:2735, dist/visual-portfolio/classes/class-admin.php:2753
|
292 |
msgid "Custom"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: dist/visual-portfolio/classes/class-admin.php:1104
|
296 |
msgid "Centered Slides"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: dist/visual-portfolio/classes/class-admin.php:1117
|
300 |
msgid "Loop"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: dist/visual-portfolio/classes/class-admin.php:1123
|
304 |
msgid "Free Scroll"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: dist/visual-portfolio/classes/class-admin.php:1129
|
308 |
msgid "Free Scroll Sticky"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: dist/visual-portfolio/classes/class-admin.php:1140, dist/visual-portfolio/classes/class-admin.php:2390, dist/visual-portfolio/classes/class-settings.php:231
|
312 |
msgid "Display Arrows"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: dist/visual-portfolio/classes/class-admin.php:1148, dist/visual-portfolio/classes/class-admin.php:1149, dist/visual-portfolio/classes/class-admin.php:2412, dist/visual-portfolio/classes/class-admin.php:2413
|
316 |
msgid "Prev Arrow Icon"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: dist/visual-portfolio/classes/class-admin.php:1161, dist/visual-portfolio/classes/class-admin.php:1162, dist/visual-portfolio/classes/class-admin.php:2437, dist/visual-portfolio/classes/class-admin.php:2438
|
320 |
msgid "Next Arrow Icon"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: dist/visual-portfolio/classes/class-admin.php:1172
|
324 |
msgid "Display Bullets"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: dist/visual-portfolio/classes/class-admin.php:1178
|
328 |
msgid "Dynamic Bullets"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: dist/visual-portfolio/classes/class-admin.php:1189
|
332 |
msgid "Mousewheel Control"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: dist/visual-portfolio/classes/class-admin.php:1195, dist/visual-portfolio/classes/class-settings.php:271
|
336 |
msgid "Display Thumbnails"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: dist/visual-portfolio/classes/class-admin.php:1201
|
340 |
msgid "Thumbnails Gap"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: dist/visual-portfolio/classes/class-admin.php:1214
|
344 |
msgid "Thumbnails Height"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: dist/visual-portfolio/classes/class-admin.php:1264
|
348 |
msgid "Thumbnails Per View"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: dist/visual-portfolio/classes/class-admin.php:1357
|
352 |
msgid "Gap"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: dist/visual-portfolio/classes/class-admin.php:1369
|
356 |
msgid "Items Per Page"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: dist/visual-portfolio/classes/class-admin.php:1381
|
360 |
msgid "Stretch"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: dist/visual-portfolio/classes/class-admin.php:1384
|
364 |
msgid "Break container and display it wide"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: dist/visual-portfolio/classes/class-admin.php:1396, dist/visual-portfolio/classes/class-admin.php:1629, dist/visual-portfolio/classes/class-admin.php:1775, dist/visual-portfolio/classes/class-admin.php:1847, dist/visual-portfolio/classes/class-admin.php:1980, dist/visual-portfolio/classes/class-admin.php:2081, dist/visual-portfolio/classes/class-admin.php:2770
|
368 |
msgid "Default"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: dist/visual-portfolio/classes/class-admin.php:1408
|
372 |
msgid "Display Read More Button"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: dist/visual-portfolio/classes/class-admin.php:1412, dist/visual-portfolio/classes/class-admin.php:1628
|
376 |
msgid "Hide"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: dist/visual-portfolio/classes/class-admin.php:1413
|
380 |
msgid "Always Display"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: dist/visual-portfolio/classes/class-admin.php:1414
|
384 |
msgid "Display when used \"More tag\" in the post"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: dist/visual-portfolio/classes/class-admin.php:1422
|
388 |
msgid "Read More Button Label"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: dist/visual-portfolio/classes/class-admin.php:1437
|
392 |
msgid "Fly"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: dist/visual-portfolio/classes/class-admin.php:1449, dist/visual-portfolio/classes/class-admin.php:1490, dist/visual-portfolio/classes/class-admin.php:1531
|
396 |
msgid "Overlay Background Color"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: dist/visual-portfolio/classes/class-admin.php:1462, dist/visual-portfolio/classes/class-admin.php:1503, dist/visual-portfolio/classes/class-admin.php:1544
|
400 |
msgid "Overlay Text Color"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: dist/visual-portfolio/classes/class-admin.php:1478
|
404 |
msgid "Emerge"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: dist/visual-portfolio/classes/class-admin.php:1595
|
408 |
msgid "Display Title"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: dist/visual-portfolio/classes/class-admin.php:1603
|
412 |
msgid "Display Categories"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: dist/visual-portfolio/classes/class-admin.php:1609
|
416 |
msgid "Categories Count"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: dist/visual-portfolio/classes/class-admin.php:1624
|
420 |
msgid "Display Date"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: dist/visual-portfolio/classes/class-admin.php:1630
|
424 |
msgid "Human Format"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: dist/visual-portfolio/classes/class-admin.php:1638
|
428 |
msgid ""
|
429 |
"Date format
|
430 |
" Example: F j, Y"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: dist/visual-portfolio/classes/class-admin.php:1650
|
434 |
msgid "Display Excerpt"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: dist/visual-portfolio/classes/class-admin.php:1656
|
438 |
msgid "Excerpt Words Count"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: dist/visual-portfolio/classes/class-admin.php:1671
|
442 |
msgid "Display Icon"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: dist/visual-portfolio/classes/class-admin.php:1679, dist/visual-portfolio/classes/class-admin.php:1680
|
446 |
msgid "Standard Icon"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: dist/visual-portfolio/classes/class-admin.php:1692, dist/visual-portfolio/classes/class-admin.php:1693
|
450 |
msgid "Video Icon"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: dist/visual-portfolio/classes/class-admin.php:1705
|
454 |
msgid "Caption Align"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: dist/visual-portfolio/classes/class-admin.php:1759, dist/visual-portfolio/classes/class-admin.php:1841, dist/visual-portfolio/classes/class-admin.php:1974, dist/visual-portfolio/classes/class-admin.php:2075
|
458 |
msgid "Disabled"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: dist/visual-portfolio/classes/class-admin.php:1760, dist/visual-portfolio/classes/class-controls.php:639
|
462 |
msgid "URL"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: dist/visual-portfolio/classes/class-admin.php:1761, dist/visual-portfolio/classes/class-settings.php:108, dist/visual-portfolio/classes/class-settings.php:190
|
466 |
msgid "Popup Gallery"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: dist/visual-portfolio/classes/class-admin.php:1771
|
470 |
msgid "Target"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: dist/visual-portfolio/classes/class-admin.php:1776
|
474 |
msgid "New Tab (_blank)"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: dist/visual-portfolio/classes/class-admin.php:1777
|
478 |
msgid "Top Frame (_top)"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: dist/visual-portfolio/classes/class-admin.php:1793, dist/visual-portfolio/classes/class-admin.php:2671, dist/visual-portfolio/classes/class-admin.php:2772, dist/visual-portfolio/classes/class-controls.php:586
|
482 |
msgid "Title"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: dist/visual-portfolio/classes/class-admin.php:1797, dist/visual-portfolio/classes/class-admin.php:1819, dist/visual-portfolio/classes/class-admin.php:2734, dist/visual-portfolio/classes/class-admin.php:2752
|
486 |
msgid "None"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: dist/visual-portfolio/classes/class-admin.php:1798, dist/visual-portfolio/classes/class-admin.php:1820, dist/visual-portfolio/classes/class-admin.php:2736, dist/visual-portfolio/classes/class-admin.php:2754
|
490 |
msgid "Image Title"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: dist/visual-portfolio/classes/class-admin.php:1799, dist/visual-portfolio/classes/class-admin.php:1821, dist/visual-portfolio/classes/class-admin.php:2737, dist/visual-portfolio/classes/class-admin.php:2755
|
494 |
msgid "Image Caption"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: dist/visual-portfolio/classes/class-admin.php:1800, dist/visual-portfolio/classes/class-admin.php:1822, dist/visual-portfolio/classes/class-admin.php:2738, dist/visual-portfolio/classes/class-admin.php:2756
|
498 |
msgid "Image Alt"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: dist/visual-portfolio/classes/class-admin.php:1801, dist/visual-portfolio/classes/class-admin.php:1823, dist/visual-portfolio/classes/class-admin.php:2739, dist/visual-portfolio/classes/class-admin.php:2757
|
502 |
msgid "Image Description"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: dist/visual-portfolio/classes/class-admin.php:1815, dist/visual-portfolio/classes/class-controls.php:598
|
506 |
msgid "Description"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: dist/visual-portfolio/classes/class-admin.php:1853, dist/visual-portfolio/classes/class-admin.php:1986
|
510 |
msgid "Dropdown"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: dist/visual-portfolio/classes/class-admin.php:1917, dist/visual-portfolio/classes/class-admin.php:2050, dist/visual-portfolio/classes/class-admin.php:2186
|
514 |
msgid "Align"
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: dist/visual-portfolio/classes/class-admin.php:1921, dist/visual-portfolio/classes/class-admin.php:2054, dist/visual-portfolio/classes/class-admin.php:2190, dist/visual-portfolio/classes/class-controls.php:535, dist/visual-portfolio/classes/class-controls.php:544, dist/visual-portfolio/classes/class-controls.php:548, dist/visual-portfolio/classes/class-controls.php:561
|
518 |
msgid "Center"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: dist/visual-portfolio/classes/class-admin.php:1922, dist/visual-portfolio/classes/class-admin.php:2055, dist/visual-portfolio/classes/class-admin.php:2191, dist/visual-portfolio/classes/class-controls.php:538, dist/visual-portfolio/classes/class-controls.php:551, dist/visual-portfolio/classes/class-controls.php:564
|
522 |
msgid "Left"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: dist/visual-portfolio/classes/class-admin.php:1923, dist/visual-portfolio/classes/class-admin.php:2056, dist/visual-portfolio/classes/class-admin.php:2192, dist/visual-portfolio/classes/class-controls.php:541, dist/visual-portfolio/classes/class-controls.php:554, dist/visual-portfolio/classes/class-controls.php:567
|
526 |
msgid "Right"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: dist/visual-portfolio/classes/class-admin.php:1938
|
530 |
msgid "Display Count"
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: dist/visual-portfolio/classes/class-admin.php:1954
|
534 |
msgid "All Button Text"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: dist/visual-portfolio/classes/class-admin.php:1956
|
538 |
msgid "All"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: dist/visual-portfolio/classes/class-admin.php:2149
|
542 |
msgid "Paged"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: dist/visual-portfolio/classes/class-admin.php:2150, dist/visual-portfolio/classes/class-admin.php:2253, dist/visual-portfolio/classes/class-admin.php:2322
|
546 |
msgid "Load More"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: dist/visual-portfolio/classes/class-admin.php:2151
|
550 |
msgid "Infinite"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: dist/visual-portfolio/classes/class-admin.php:2166
|
554 |
msgid "Note: you will see the \"Load More\" pagination in the preview. \"Infinite\" pagination will be visible on the site."
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: dist/visual-portfolio/classes/class-admin.php:2212, dist/visual-portfolio/classes/class-admin.php:2232
|
558 |
msgid "Texts"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: dist/visual-portfolio/classes/class-admin.php:2254, dist/visual-portfolio/classes/class-admin.php:2255, dist/visual-portfolio/classes/class-admin.php:2323, dist/visual-portfolio/classes/class-admin.php:2324
|
562 |
msgid "Load more button label"
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: dist/visual-portfolio/classes/class-admin.php:2276, dist/visual-portfolio/classes/class-admin.php:2345
|
566 |
msgid "Loading More..."
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: dist/visual-portfolio/classes/class-admin.php:2277, dist/visual-portfolio/classes/class-admin.php:2278, dist/visual-portfolio/classes/class-admin.php:2346, dist/visual-portfolio/classes/class-admin.php:2347
|
570 |
msgid "Loading more button label"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: dist/visual-portfolio/classes/class-admin.php:2299, dist/visual-portfolio/classes/class-admin.php:2368
|
574 |
msgid "You’ve reached the end of the list"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: dist/visual-portfolio/classes/class-admin.php:2300, dist/visual-portfolio/classes/class-admin.php:2301, dist/visual-portfolio/classes/class-admin.php:2369, dist/visual-portfolio/classes/class-admin.php:2370
|
578 |
msgid "End of the list text"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: dist/visual-portfolio/classes/class-admin.php:2460
|
582 |
msgid "Display Numbers"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: dist/visual-portfolio/classes/class-admin.php:2524
|
586 |
msgid "Data Source"
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: dist/visual-portfolio/classes/class-admin.php:2536, dist/visual-portfolio/classes/class-admin.php:3235
|
590 |
msgid "Specific Posts"
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: dist/visual-portfolio/classes/class-admin.php:2557
|
594 |
msgid "Excluded Posts"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: dist/visual-portfolio/classes/class-admin.php:2585, dist/visual-portfolio/classes/class-admin.php:3236
|
598 |
msgid "Custom Query"
|
599 |
msgstr ""
|
600 |
|
601 |
#. translators: %1$s - escaped url.
|
602 |
+
#: dist/visual-portfolio/classes/class-admin.php:2587
|
603 |
msgid "Build custom query according to WordPress Codex. See example here <a href=\"%1$s\">%1$s</a>."
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: dist/visual-portfolio/classes/class-admin.php:2613
|
607 |
msgid "Taxonomies"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: dist/visual-portfolio/classes/class-admin.php:2640
|
611 |
msgid "Taxonomies Relation"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: dist/visual-portfolio/classes/class-admin.php:2644
|
615 |
msgid "OR"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: dist/visual-portfolio/classes/class-admin.php:2645
|
619 |
msgid "AND"
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: dist/visual-portfolio/classes/class-admin.php:2666, dist/visual-portfolio/classes/class-admin.php:2766
|
623 |
msgid "Order by"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: dist/visual-portfolio/classes/class-admin.php:2670
|
627 |
msgid "Date"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: dist/visual-portfolio/classes/class-admin.php:2672
|
631 |
msgid "ID"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: dist/visual-portfolio/classes/class-admin.php:2673
|
635 |
msgid "Menu Order"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: dist/visual-portfolio/classes/class-admin.php:2674, dist/visual-portfolio/classes/class-admin.php:2773
|
639 |
msgid "Random"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: dist/visual-portfolio/classes/class-admin.php:2683, dist/visual-portfolio/classes/class-admin.php:2782
|
643 |
msgid "Order Direction"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: dist/visual-portfolio/classes/class-admin.php:2687, dist/visual-portfolio/classes/class-admin.php:2787
|
647 |
msgid "DESC"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: dist/visual-portfolio/classes/class-admin.php:2688, dist/visual-portfolio/classes/class-admin.php:2786
|
651 |
msgid "ASC"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: dist/visual-portfolio/classes/class-admin.php:2697
|
655 |
msgid "Avoid Duplicate Posts"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: dist/visual-portfolio/classes/class-admin.php:2730
|
659 |
msgid "Titles"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: dist/visual-portfolio/classes/class-admin.php:2748
|
663 |
msgid "Descriptions"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: dist/visual-portfolio/classes/class-admin.php:2771
|
667 |
msgid "Uploaded"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: dist/visual-portfolio/classes/class-admin.php:2804
|
671 |
msgid "Name & Shortcode"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: dist/visual-portfolio/classes/class-admin.php:2812
|
675 |
msgid "Layout"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: dist/visual-portfolio/classes/class-admin.php:2820
|
679 |
msgid "Items Style"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: dist/visual-portfolio/classes/class-admin.php:2828
|
683 |
msgid "Items Click Action"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: dist/visual-portfolio/classes/class-admin.php:2836
|
687 |
msgid "Filter"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: dist/visual-portfolio/classes/class-admin.php:2844
|
691 |
msgid "Sort"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: dist/visual-portfolio/classes/class-admin.php:2852
|
695 |
msgid "Pagination"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: dist/visual-portfolio/classes/class-admin.php:2861
|
699 |
msgid "Preview"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: dist/visual-portfolio/classes/class-admin.php:2869
|
703 |
msgid "Content Source"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: dist/visual-portfolio/classes/class-admin.php:2877
|
707 |
msgid "Custom CSS"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: dist/visual-portfolio/classes/class-admin.php:2898
|
711 |
msgid "Name"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: dist/visual-portfolio/classes/class-admin.php:2908
|
715 |
msgid "Place the shortcode where you want to show the portfolio list."
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: dist/visual-portfolio/classes/class-admin.php:2974
|
719 |
msgid "Filter Shortcode"
|
720 |
msgstr ""
|
721 |
|
722 |
+
#: dist/visual-portfolio/classes/class-admin.php:2975
|
723 |
msgid "Place the shortcode where you want to show the filter."
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: dist/visual-portfolio/classes/class-admin.php:2997
|
727 |
msgid "Sort Shortcode"
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: dist/visual-portfolio/classes/class-admin.php:2998
|
731 |
msgid "Place the shortcode where you want to show the sort."
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: dist/visual-portfolio/classes/class-admin.php:3069
|
735 |
msgid "Portfolio"
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: dist/visual-portfolio/classes/class-admin.php:3075
|
739 |
msgid "Post-Based"
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: dist/visual-portfolio/classes/class-admin.php:3081, dist/visual-portfolio/classes/class-settings.php:104
|
743 |
msgid "Images"
|
744 |
msgstr ""
|
745 |
|
746 |
#. translators: %1$s - escaped url.
|
747 |
+
#: dist/visual-portfolio/classes/class-admin.php:3100
|
748 |
msgid "Portfolio items list from <a href=\"%1$s\" target=\"_blank\">%2$s</a>"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#. translators: %1$s - escaped url.
|
752 |
+
#: dist/visual-portfolio/classes/class-admin.php:3152
|
753 |
+
msgid "Social Stream are only available in the pro version of the plugin: <a href=\"%1$s\" target=\"_blank\">%2$s</a>"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
+
#: dist/visual-portfolio/classes/class-admin.php:3165
|
757 |
msgid "Available classes:"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: dist/visual-portfolio/classes/class-admin.php:3168
|
761 |
msgid " - use this classname for each styles you added. It is the main Visual Portfolio wrapper."
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: dist/visual-portfolio/classes/class-assets.php:462
|
765 |
msgid "Couldn't retrieve Visual Portfolio ID."
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: dist/visual-portfolio/classes/class-assets.php:464
|
769 |
msgid "Close (Esc)"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: dist/visual-portfolio/classes/class-assets.php:465, dist/visual-portfolio/classes/class-assets.php:483
|
773 |
msgid "Share"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: dist/visual-portfolio/classes/class-assets.php:466
|
777 |
msgid "Toggle fullscreen"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: dist/visual-portfolio/classes/class-assets.php:467
|
781 |
msgid "Zoom in/out"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: dist/visual-portfolio/classes/class-assets.php:468
|
785 |
msgid "Previous (arrow left)"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: dist/visual-portfolio/classes/class-assets.php:469
|
789 |
msgid "Next (arrow right)"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: dist/visual-portfolio/classes/class-assets.php:470
|
793 |
msgid "Share on Facebook"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: dist/visual-portfolio/classes/class-assets.php:471
|
797 |
msgid "Tweet"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: dist/visual-portfolio/classes/class-assets.php:472
|
801 |
msgid "Pin it"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: dist/visual-portfolio/classes/class-assets.php:474
|
805 |
msgid "Close"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: dist/visual-portfolio/classes/class-assets.php:475
|
809 |
msgid "Next"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: dist/visual-portfolio/classes/class-assets.php:476
|
813 |
msgid "Previous"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: dist/visual-portfolio/classes/class-assets.php:477
|
817 |
msgid "The requested content cannot be loaded. <br /> Please try again later."
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: dist/visual-portfolio/classes/class-assets.php:478
|
821 |
msgid "Start slideshow"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: dist/visual-portfolio/classes/class-assets.php:479
|
825 |
msgid "Pause slideshow"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: dist/visual-portfolio/classes/class-assets.php:480
|
829 |
msgid "Full screen"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: dist/visual-portfolio/classes/class-assets.php:481
|
833 |
msgid "Thumbnails"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: dist/visual-portfolio/classes/class-assets.php:482
|
837 |
msgid "Download"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: dist/visual-portfolio/classes/class-assets.php:484
|
841 |
msgid "Zoom"
|
842 |
msgstr ""
|
843 |
|
873 |
msgid "Edit"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: dist/visual-portfolio/classes/class-elementor-widget.php:137, dist/visual-portfolio/classes/class-settings.php:100
|
877 |
msgid "General"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: dist/visual-portfolio/classes/class-elementor-widget.php:145, dist/visual-portfolio/classes/class-vc.php:72
|
881 |
msgid "Select Layout"
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:265
|
885 |
msgid "No items found."
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:1463
|
889 |
msgid "Default sorting"
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:1464
|
893 |
msgid "Sort by date (newest)"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:1465
|
897 |
msgid "Sort by date (oldest)"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:1466
|
901 |
msgid "Sort by title (A-Z)"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:1467
|
905 |
msgid "Sort by title (Z-A)"
|
906 |
msgstr ""
|
907 |
|
908 |
#. translators: %s - published in human format.
|
909 |
+
#: dist/visual-portfolio/classes/class-get-portfolio.php:1575
|
910 |
msgid "%s ago"
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: dist/visual-portfolio/classes/class-rest.php:82
|
914 |
msgid "Layouts not found."
|
915 |
msgstr ""
|
916 |
|
readme.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4 |
* Tags: portfolio, gallery, image, masonry, popup
|
5 |
* Requires at least: 4.0.0
|
6 |
* Tested up to: 5.3
|
7 |
-
* Requires PHP: 5.
|
8 |
-
* Stable tag: 1.
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: <http://www.gnu.org/licenses/gpl-2.0.html>
|
11 |
|
@@ -58,9 +58,10 @@ Visual Portfolio let you create beautiful portfolio layouts and image galleries.
|
|
58 |
|
59 |
## Real Usage Examples ##
|
60 |
|
61 |
-
* [
|
62 |
-
* [
|
63 |
-
* [
|
|
|
64 |
|
65 |
## Screenshots ##
|
66 |
|
@@ -123,6 +124,24 @@ The manual installation method involves downloading our Visual Portfolio plugin
|
|
123 |
|
124 |
## Changelog ##
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
= 1.15.1 =
|
127 |
|
128 |
* fixed errors when upload images without width or height (for example, SVG)
|
@@ -360,7 +379,7 @@ Note: Don't forget to clear cache after plugin update. Changed portfolios with p
|
|
360 |
* changed portfolio default image sizes (since we use Lazyload, we can use larger image sizes)
|
361 |
* updated FontAwesome to 5.2.0
|
362 |
* fixed Slider styles when used 2 sliders on the page
|
363 |
-
* removed imagesloaded
|
364 |
* disabled 'with_front' in portfolio post type (thanks to [https://wordpress.org/support/topic/change-the-permalink-structure-2/](https://wordpress.org/support/topic/change-the-permalink-structure-2/))
|
365 |
|
366 |
= 1.6.2 =
|
4 |
* Tags: portfolio, gallery, image, masonry, popup
|
5 |
* Requires at least: 4.0.0
|
6 |
* Tested up to: 5.3
|
7 |
+
* Requires PHP: 5.5.9
|
8 |
+
* Stable tag: 1.16.0
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: <http://www.gnu.org/licenses/gpl-2.0.html>
|
11 |
|
58 |
|
59 |
## Real Usage Examples ##
|
60 |
|
61 |
+
* [SquadForce - eSports Gaming WordPress Theme](https://wp.nkdev.info/squadforce/)
|
62 |
+
* [Skylith - Multipurpose Gutenberg Theme](https://wp.nkdev.info/skylith/)
|
63 |
+
* [Piroll - Portfolio Theme](https://wp.nkdev.info/piroll/)
|
64 |
+
* [Snow - Portfolio Theme](https://wp.nkdev.info/snow/)
|
65 |
|
66 |
## Screenshots ##
|
67 |
|
124 |
|
125 |
## Changelog ##
|
126 |
|
127 |
+
= 1.16.0 =
|
128 |
+
|
129 |
+
* added preview preloader in layouts editor
|
130 |
+
* added imagesloaded after AJAX loaded event (fixes Safari images stacking)
|
131 |
+
* changed images placeholders to SVG (less code, better performance)
|
132 |
+
* prevent ajax loading if requested URL is currently loaded
|
133 |
+
* fixed Avoid Duplicate Posts option if used Post-Based with Custom Post IDs
|
134 |
+
* fixed WP Smush lazyload conflict
|
135 |
+
* fixed infinite scroll loading 2 next pages at a time
|
136 |
+
* fixed Grid items position in FireFox
|
137 |
+
* fixed stretch option usage in preview (just disable it)
|
138 |
+
* fixed Elementor widget output on frontend
|
139 |
+
* fixed post-based taxonomies when posts don't contain it
|
140 |
+
* fixed AMP plugin integration PHP notices
|
141 |
+
* fixed AJAX loading with changed layout settings in editor preview
|
142 |
+
* fixed error in layouts preview when no items loaded
|
143 |
+
* a lot of code improvements for upcoming PRO plugin
|
144 |
+
|
145 |
= 1.15.1 =
|
146 |
|
147 |
* fixed errors when upload images without width or height (for example, SVG)
|
379 |
* changed portfolio default image sizes (since we use Lazyload, we can use larger image sizes)
|
380 |
* updated FontAwesome to 5.2.0
|
381 |
* fixed Slider styles when used 2 sliders on the page
|
382 |
+
* removed imagesloaded dependency
|
383 |
* disabled 'with_front' in portfolio post type (thanks to [https://wordpress.org/support/topic/change-the-permalink-structure-2/](https://wordpress.org/support/topic/change-the-permalink-structure-2/))
|
384 |
|
385 |
= 1.6.2 =
|
templates/items-list/filter/dropdown/filter.php
CHANGED
@@ -15,6 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
<div class="<?php echo esc_attr( $args['class'] ); ?> vp-filter__style-dropdown">
|
16 |
<select>
|
17 |
<?php
|
|
|
18 |
foreach ( $args['items'] as $item ) {
|
19 |
?>
|
20 |
<option class="<?php echo esc_attr( $item['class'] ); ?>" data-vp-url="<?php echo esc_url( $item['url'] ); ?>" data-vp-filter="<?php echo esc_attr( $item['filter'] ); ?>" value="<?php echo esc_attr( $item['filter'] ); ?>" <?php selected( $item['active'] ); ?>>
|
15 |
<div class="<?php echo esc_attr( $args['class'] ); ?> vp-filter__style-dropdown">
|
16 |
<select>
|
17 |
<?php
|
18 |
+
// phpcs:ignore
|
19 |
foreach ( $args['items'] as $item ) {
|
20 |
?>
|
21 |
<option class="<?php echo esc_attr( $item['class'] ); ?>" data-vp-url="<?php echo esc_url( $item['url'] ); ?>" data-vp-filter="<?php echo esc_attr( $item['filter'] ); ?>" value="<?php echo esc_attr( $item['filter'] ); ?>" <?php selected( $item['active'] ); ?>>
|
templates/items-list/filter/filter.php
CHANGED
@@ -14,6 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
|
15 |
<ul class="<?php echo esc_attr( $args['class'] ); ?> vp-filter__style-default">
|
16 |
<?php
|
|
|
17 |
foreach ( $args['items'] as $item ) {
|
18 |
?>
|
19 |
<li class="<?php echo esc_attr( $item['class'] ); ?>">
|
14 |
|
15 |
<ul class="<?php echo esc_attr( $args['class'] ); ?> vp-filter__style-default">
|
16 |
<?php
|
17 |
+
// phpcs:ignore
|
18 |
foreach ( $args['items'] as $item ) {
|
19 |
?>
|
20 |
<li class="<?php echo esc_attr( $item['class'] ); ?>">
|
templates/items-list/items-style/emerge/meta.php
CHANGED
@@ -11,6 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
exit;
|
12 |
}
|
13 |
|
|
|
14 |
$show_meta = $opts['show_title'] && $args['title'] ||
|
15 |
$opts['show_date'] ||
|
16 |
$opts['show_excerpt'] && $args['excerpt'] ||
|
@@ -73,7 +74,10 @@ $show_meta = $opts['show_title'] && $args['title'] ||
|
|
73 |
?>
|
74 |
<ul class="vp-portfolio__item-meta-categories">
|
75 |
<?php
|
|
|
76 |
$count = $opts['categories_count'];
|
|
|
|
|
77 |
foreach ( $args['categories'] as $category ) {
|
78 |
if ( ! $count ) {
|
79 |
break;
|
11 |
exit;
|
12 |
}
|
13 |
|
14 |
+
// phpcs:ignore
|
15 |
$show_meta = $opts['show_title'] && $args['title'] ||
|
16 |
$opts['show_date'] ||
|
17 |
$opts['show_excerpt'] && $args['excerpt'] ||
|
74 |
?>
|
75 |
<ul class="vp-portfolio__item-meta-categories">
|
76 |
<?php
|
77 |
+
// phpcs:ignore
|
78 |
$count = $opts['categories_count'];
|
79 |
+
|
80 |
+
// phpcs:ignore
|
81 |
foreach ( $args['categories'] as $category ) {
|
82 |
if ( ! $count ) {
|
83 |
break;
|
templates/items-list/items-style/fade/meta.php
CHANGED
@@ -11,11 +11,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
exit;
|
12 |
}
|
13 |
|
|
|
14 |
$tag = 'a';
|
15 |
if ( ! $args['url'] ) {
|
|
|
16 |
$tag = 'span';
|
17 |
}
|
18 |
|
|
|
19 |
$show_meta = $opts['show_icon'] && $opts['icon'] ||
|
20 |
$opts['show_title'] && $args['title'] ||
|
21 |
$opts['show_date'] ||
|
@@ -84,7 +87,10 @@ $show_meta = $opts['show_icon'] && $opts['icon'] ||
|
|
84 |
?>
|
85 |
<ul class="vp-portfolio__item-meta-categories">
|
86 |
<?php
|
|
|
87 |
$count = $opts['categories_count'];
|
|
|
|
|
88 |
foreach ( $args['categories'] as $category ) {
|
89 |
if ( ! $count ) {
|
90 |
break;
|
11 |
exit;
|
12 |
}
|
13 |
|
14 |
+
// phpcs:ignore
|
15 |
$tag = 'a';
|
16 |
if ( ! $args['url'] ) {
|
17 |
+
// phpcs:ignore
|
18 |
$tag = 'span';
|
19 |
}
|
20 |
|
21 |
+
// phpcs:ignore
|
22 |
$show_meta = $opts['show_icon'] && $opts['icon'] ||
|
23 |
$opts['show_title'] && $args['title'] ||
|
24 |
$opts['show_date'] ||
|
87 |
?>
|
88 |
<ul class="vp-portfolio__item-meta-categories">
|
89 |
<?php
|
90 |
+
// phpcs:ignore
|
91 |
$count = $opts['categories_count'];
|
92 |
+
|
93 |
+
// phpcs:ignore
|
94 |
foreach ( $args['categories'] as $category ) {
|
95 |
if ( ! $count ) {
|
96 |
break;
|
templates/items-list/items-style/fly/meta.php
CHANGED
@@ -11,11 +11,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
exit;
|
12 |
}
|
13 |
|
|
|
14 |
$tag = 'a';
|
15 |
if ( ! $args['url'] ) {
|
|
|
16 |
$tag = 'span';
|
17 |
}
|
18 |
|
|
|
19 |
$show_meta = $opts['show_icon'] && $opts['icon'] ||
|
20 |
$opts['show_title'] && $args['title'] ||
|
21 |
$opts['show_date'] ||
|
@@ -83,7 +86,10 @@ $show_meta = $opts['show_icon'] && $opts['icon'] ||
|
|
83 |
?>
|
84 |
<ul class="vp-portfolio__item-meta-categories">
|
85 |
<?php
|
|
|
86 |
$count = $opts['categories_count'];
|
|
|
|
|
87 |
foreach ( $args['categories'] as $category ) {
|
88 |
if ( ! $count ) {
|
89 |
break;
|
11 |
exit;
|
12 |
}
|
13 |
|
14 |
+
// phpcs:ignore
|
15 |
$tag = 'a';
|
16 |
if ( ! $args['url'] ) {
|
17 |
+
// phpcs:ignore
|
18 |
$tag = 'span';
|
19 |
}
|
20 |
|
21 |
+
// phpcs:ignore
|
22 |
$show_meta = $opts['show_icon'] && $opts['icon'] ||
|
23 |
$opts['show_title'] && $args['title'] ||
|
24 |
$opts['show_date'] ||
|
86 |
?>
|
87 |
<ul class="vp-portfolio__item-meta-categories">
|
88 |
<?php
|
89 |
+
// phpcs:ignore
|
90 |
$count = $opts['categories_count'];
|
91 |
+
|
92 |
+
// phpcs:ignore
|
93 |
foreach ( $args['categories'] as $category ) {
|
94 |
if ( ! $count ) {
|
95 |
break;
|
templates/items-list/items-style/meta.php
CHANGED
@@ -11,6 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
exit;
|
12 |
}
|
13 |
|
|
|
14 |
$show_meta = $opts['show_title'] && $args['title'] ||
|
15 |
$opts['show_date'] ||
|
16 |
$opts['show_excerpt'] && $args['excerpt'] ||
|
@@ -83,7 +84,10 @@ $show_meta = $opts['show_title'] && $args['title'] ||
|
|
83 |
?>
|
84 |
<ul class="vp-portfolio__item-meta-categories">
|
85 |
<?php
|
|
|
86 |
$count = $opts['categories_count'];
|
|
|
|
|
87 |
foreach ( $args['categories'] as $category ) {
|
88 |
if ( ! $count ) {
|
89 |
break;
|
11 |
exit;
|
12 |
}
|
13 |
|
14 |
+
// phpcs:ignore
|
15 |
$show_meta = $opts['show_title'] && $args['title'] ||
|
16 |
$opts['show_date'] ||
|
17 |
$opts['show_excerpt'] && $args['excerpt'] ||
|
84 |
?>
|
85 |
<ul class="vp-portfolio__item-meta-categories">
|
86 |
<?php
|
87 |
+
// phpcs:ignore
|
88 |
$count = $opts['categories_count'];
|
89 |
+
|
90 |
+
// phpcs:ignore
|
91 |
foreach ( $args['categories'] as $category ) {
|
92 |
if ( ! $count ) {
|
93 |
break;
|
templates/items-list/pagination/paged.php
CHANGED
@@ -14,6 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
|
15 |
<ul class="<?php echo esc_attr( $args['class'] ); ?> vp-pagination__style-default" data-vp-pagination-type="<?php echo esc_attr( $args['type'] ); ?>">
|
16 |
<?php
|
|
|
17 |
foreach ( $args['items'] as $item ) {
|
18 |
?>
|
19 |
<li class="<?php echo esc_attr( $item['class'] ); ?>">
|
14 |
|
15 |
<ul class="<?php echo esc_attr( $args['class'] ); ?> vp-pagination__style-default" data-vp-pagination-type="<?php echo esc_attr( $args['type'] ); ?>">
|
16 |
<?php
|
17 |
+
// phpcs:ignore
|
18 |
foreach ( $args['items'] as $item ) {
|
19 |
?>
|
20 |
<li class="<?php echo esc_attr( $item['class'] ); ?>">
|
templates/items-list/sort/dropdown/sort.php
CHANGED
@@ -15,6 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
<div class="<?php echo esc_attr( $args['class'] ); ?> vp-sort__style-dropdown">
|
16 |
<select>
|
17 |
<?php
|
|
|
18 |
foreach ( $args['items'] as $item ) {
|
19 |
?>
|
20 |
<option class="<?php echo esc_attr( $item['class'] ); ?>" data-vp-url="<?php echo esc_url( $item['url'] ); ?>" data-vp-sort="<?php echo esc_attr( $item['sort'] ); ?>" value="<?php echo esc_attr( $item['sort'] ); ?>" <?php selected( $item['active'] ); ?>>
|
15 |
<div class="<?php echo esc_attr( $args['class'] ); ?> vp-sort__style-dropdown">
|
16 |
<select>
|
17 |
<?php
|
18 |
+
// phpcs:ignore
|
19 |
foreach ( $args['items'] as $item ) {
|
20 |
?>
|
21 |
<option class="<?php echo esc_attr( $item['class'] ); ?>" data-vp-url="<?php echo esc_url( $item['url'] ); ?>" data-vp-sort="<?php echo esc_attr( $item['sort'] ); ?>" value="<?php echo esc_attr( $item['sort'] ); ?>" <?php selected( $item['active'] ); ?>>
|
templates/items-list/sort/sort.php
CHANGED
@@ -14,6 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
|
15 |
<ul class="<?php echo esc_attr( $args['class'] ); ?> vp-sort__style-default">
|
16 |
<?php
|
|
|
17 |
foreach ( $args['items'] as $item ) {
|
18 |
?>
|
19 |
<li class="<?php echo esc_attr( $item['class'] ); ?>">
|
14 |
|
15 |
<ul class="<?php echo esc_attr( $args['class'] ); ?> vp-sort__style-default">
|
16 |
<?php
|
17 |
+
// phpcs:ignore
|
18 |
foreach ( $args['items'] as $item ) {
|
19 |
?>
|
20 |
<li class="<?php echo esc_attr( $item['class'] ); ?>">
|
vendors/class-settings-api.php
CHANGED
@@ -112,7 +112,7 @@ class Visual_Portfolio_Settings_API {
|
|
112 |
if ( isset( $section['desc'] ) && ! empty( $section['desc'] ) ) {
|
113 |
$section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
|
114 |
$callback = create_function( '', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";' );
|
115 |
-
}
|
116 |
$callback = $section['callback'];
|
117 |
} else {
|
118 |
$callback = null;
|
112 |
if ( isset( $section['desc'] ) && ! empty( $section['desc'] ) ) {
|
113 |
$section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
|
114 |
$callback = create_function( '', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";' );
|
115 |
+
} elseif ( isset( $section['callback'] ) ) {
|
116 |
$callback = $section['callback'];
|
117 |
} else {
|
118 |
$callback = null;
|