Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager - Version 2.6.3

Version Description

Replace media feature, import option (FileBird, Enhanced Media Library, Wicked Folders, Real Media Library, and WP Media Folder), create multiple folders at once (comma separated), option to hide Folders settings from main menu, bug fixed

Download this release

Release Info

Developer galdub
Plugin Icon wp plugin Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager
Version 2.6.3
Comparing to
See all releases

Code changes from version 2.6.2 to 2.6.3

assets/css/admin-setting.css CHANGED
@@ -1 +1 @@
1
- @import url(https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap);*,:after,:before{box-sizing:border-box}#wpwrap{background:#6572db;background:-moz-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:-webkit-gradient(left top,right bottom,color-stop(0,#6572db),color-stop(67%,#ee86c6),color-stop(100%,#ee86c6));background:-webkit-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:-o-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:-ms-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:linear-gradient(135deg,#6572db 0,#ee86c6 67%,#ee86c6 100%)}.pricing-table{margin:0 0 45px;color:#28375a;font-size:16px;line-height:25px;font-family:Lato,sans-serif}.price-title{font-weight:700;font-size:24px;line-height:30px;color:#28375a;text-align:center}.price-table{background:#fff;box-sizing:border-box;border-radius:10px}.price-table-top{padding:20px;position:relative;border-radius:10px}.price-table.basic-feature{box-shadow:0 12px 44px rgba(108,203,255,.2);border:2px solid #b9eafd}.price-table.basic-feature .price-table-top{background:url(../images/basic-price-bg.png) no-repeat left top}.price-table.plus-feature{border:2px solid #f9d9bd;box-shadow:0 12px 44px rgba(239,140,106,.2)}.price-table.plus-feature .price-table-top{background:url(../images/plus-price.png) no-repeat left top}.price-table.agency-feature{border:2px solid #cfd3fb;box-shadow:0 12px 44px rgba(96,93,236,.2)}.price-table.agency-feature .price-table-top{background:url(../images/agency-price.png) no-repeat left top}.price-tables{margin:30px 0 50px}.plan-name{font-size:30px;line-height:36px;font-weight:700;color:#28375a}.plan-price{position:absolute;right:18px;top:8px;font-weight:700;font-size:60px;line-height:72px;color:#42b9fa}.price-table.plus-feature .plan-price{color:#ef8c6a}.price-table.agency-feature .plan-price{color:#605dec}.price-table.agency-feature .plan-name{color:#fff}.price-head{line-height:72px;padding:5px 0 25px 0}.price-offer,.price-websites{line-height:18px;font-size:15px}.cus-tooltip{cursor:pointer;display:inline-block;position:relative}.cus-tooltip .tooltip__content{background-color:#1849ab;border-radius:4px;bottom:150%;color:#fff;left:0;margin-left:15px;opacity:0;padding:5px 10px;position:absolute;transition:opacity .25s;visibility:hidden;width:auto;z-index:1;text-align:left;margin-right:15px;font-size:14px;line-height:20px}.cus-tooltip .tooltip__content::after{border-width:5px;border-style:solid;border-color:#1849ab transparent transparent transparent;content:"";left:25px;margin-left:-5px;position:absolute;top:100%}.cus-tooltip:hover .tooltip__content{opacity:1;visibility:visible}.price-table-middle ul{list-style:none;margin:0;padding:0}.price-table-middle ul li{display:block;width:100%;border-bottom:solid 1px #e9e9e9;padding:15px 0;margin:0}.price-table-middle ul li a{padding:0 15px;color:#28375a;font-size:16px;line-height:19px;display:block;text-decoration:none}span.has-tooltip{color:#605dec}.price-table-bottom{padding:15px}.custom-dd-btn{background:#fff;border:1px solid #e9e9e9;border-radius:6px;height:40px;line-height:40px;width:100%;text-align:left;padding:0 15px}.custom-dd{margin-bottom:15px}.price-table-bottom a{background:#fff;border:1px solid #42b9fa;color:#42b9fa;border-radius:20px;height:40px;line-height:38px;padding:0 15px;display:block;text-align:center;transition:all .25s linear}.price-table-bottom a:hover{color:#fff;background:#42b9fa}.price-table.plus-feature .price-table-bottom a{background:#ef8c6a;border:1px solid #ef8c6a;color:#fff}.price-table.plus-feature .price-table-bottom a:hover{background:#fff;color:#ef8c6a}.price-table.agency-feature .price-table-bottom a{background:#fff;border:1px solid #605dec;color:#605dec}.price-table.agency-feature .price-table-bottom a:hover{background:#605dec;color:#fff}.container{max-width:1180px;width:100%;padding:30px;background:#fff;border-radius:15px;margin:50px auto}.row{margin-right:-15px;margin-left:-15px}.col-md-4{padding-right:15px;padding-left:15px;width:33.33333333%;float:left}.select2-container--default .select2-selection--single{background:#fff;border:1px solid #e9e9e9;border-radius:6px;height:40px;line-height:40px;width:100%;text-align:left;padding:0 15px;outline:0}span.select2.select2-container{width:100%!important}.website-package{padding:0 15px;line-height:18px}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.website-package .select2-container--default .select2-results>.select2-results__options{margin-top:5px}.custom-dd .select2-container--default .select2-selection--single .select2-selection__arrow{height:20px;top:10px;right:1px;width:20px}@media (min-width:768px){.col-sm-4{width:100%;float:none}}a,a:focus,a:hover{text-decoration:none}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:38px}.select2-results__option{user-select:none;-webkit-user-select:none;font-size:14px;padding:8px 25px;margin:0}.select2-dropdown{border:1px solid #e9e9e9}.price-after{padding:0;text-align:center;font-size:16px;line-height:25px;font-family:Lato,sans-serif}.price-after p,.price-after span{font-size:16px;line-height:25px;margin:0;padding:0}.clearfix{clear:both}.price-after span{display:inline-block;vertical-align:text-top;font-size:20px;color:#42b9fa}.payments{padding:20px 0 10px}.folder-testimonial-list{width:100%;margin:30px auto 0;font-family:Lato,sans-serif}.folder-testimonial{position:relative}.folder-testimonial .testimonial-image{position:absolute;height:60px;width:60px;top:50%;margin-top:-30px;z-index:1;overflow:hidden;border-radius:30px}.folder-testimonial .testimonial-image img{width:100%;height:auto}.folder-testimonial .testimonial-data{position:relative;margin-left:30px;font-size:16px;line-height:22px;padding:10px 10px 10px 40px;background:#f5f5f5;border-radius:4px}.testimonial-title{font-weight:700;font-size:18px;padding:0 0 5px}.testimonial-author{font-size:16px;font-style:italic;font-weight:500;padding:5px 0 0}.plan-price span{font-size:16px;color:#28375a}.price-table-middle{margin-top:20px}.agency-feature .price-table-middle{margin-top:0}.website-package .select2-container--default .select2-selection--single{border:1px solid #6156f6;box-shadow:0 12px 44px rgba(96,93,236,.2)}.website-package .select2-container--default .select2-selection--single .select2-selection__rendered{color:#6156f6}.website-package .select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#6156f6 transparent transparent transparent}.website-package .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #6156f6 transparent;border-width:0 4px 5px 4px}
1
+ @import url(https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap);*,:after,:before{box-sizing:border-box}#wpwrap{background:#6572db;background:-moz-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:-webkit-gradient(left top,right bottom,color-stop(0,#6572db),color-stop(67%,#ee86c6),color-stop(100%,#ee86c6));background:-webkit-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:-o-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:-ms-linear-gradient(-45deg,#6572db 0,#ee86c6 67%,#ee86c6 100%);background:linear-gradient(135deg,#6572db 0,#ee86c6 67%,#ee86c6 100%)}.pricing-table{margin:0 0 45px;color:#28375a;font-size:16px;line-height:25px;font-family:Lato,sans-serif}.price-title{font-weight:700;font-size:24px;line-height:30px;color:#28375a;text-align:center}.price-table{background:#fff;box-sizing:border-box;border-radius:10px}.price-table-top{padding:20px;position:relative;border-radius:10px}.price-table.basic-feature{box-shadow:0 12px 44px rgba(108,203,255,.2);border:2px solid #b9eafd}.price-table.basic-feature .price-table-top{background:url(../images/basic-price-bg.png) no-repeat left top}.price-table.plus-feature{border:2px solid #f9d9bd;box-shadow:0 12px 44px rgba(239,140,106,.2)}.price-table.plus-feature .price-table-top{background:url(../images/plus-price.png) no-repeat left top}.price-table.agency-feature{border:2px solid #cfd3fb;box-shadow:0 12px 44px rgba(96,93,236,.2)}.price-table.agency-feature .price-table-top{background:url(../images/agency-price.png) no-repeat left top}.price-tables{margin:30px 0 50px}.plan-name{font-size:30px;line-height:36px;font-weight:700;color:#28375a}.plan-price{position:absolute;right:18px;top:8px;font-weight:700;font-size:60px;line-height:72px;color:#42b9fa}.price-table.plus-feature .plan-price{color:#ef8c6a}.price-table.agency-feature .plan-price{color:#605dec}.price-table.agency-feature .plan-name{color:#fff}.price-head{line-height:72px;padding:5px 0 25px 0}.price-offer,.price-websites{line-height:18px;font-size:15px}.cus-tooltip{cursor:pointer;display:inline-block;position:relative}.cus-tooltip .tooltip__content{background-color:#1849ab;border-radius:4px;bottom:150%;color:#fff;left:0;margin-left:15px;opacity:0;padding:5px 10px;position:absolute;transition:opacity .25s;visibility:hidden;width:auto;z-index:1;text-align:left;margin-right:15px;font-size:14px;line-height:20px}.cus-tooltip .tooltip__content::after{border-width:5px;border-style:solid;border-color:#1849ab transparent transparent transparent;content:"";left:25px;margin-left:-5px;position:absolute;top:100%}.cus-tooltip:hover .tooltip__content{opacity:1;visibility:visible}.price-table-middle ul{list-style:none;margin:0;padding:0}.price-table-middle ul li{display:block;width:100%;border-bottom:solid 1px #e9e9e9;padding:15px 0;margin:0}.price-table-middle ul li a{padding:0 15px;color:#28375a;font-size:16px;line-height:19px;display:block;text-decoration:none}span.has-tooltip{color:#605dec}.price-table-bottom{padding:15px}.custom-dd-btn{background:#fff;border:1px solid #e9e9e9;border-radius:6px;height:40px;line-height:40px;width:100%;text-align:left;padding:0 15px}.custom-dd{margin-bottom:15px}.price-table-bottom a{background:#fff;border:1px solid #42b9fa;color:#42b9fa;border-radius:20px;height:40px;line-height:38px;padding:0 15px;display:block;text-align:center;transition:all .25s linear}.price-table-bottom a:hover{color:#fff;background:#42b9fa}.price-table.plus-feature .price-table-bottom a{background:#ef8c6a;border:1px solid #ef8c6a;color:#fff}.price-table.plus-feature .price-table-bottom a:hover{background:#fff;color:#ef8c6a}.price-table.agency-feature .price-table-bottom a{background:#fff;border:1px solid #605dec;color:#605dec}.price-table.agency-feature .price-table-bottom a:hover{background:#605dec;color:#fff}.container{max-width:1180px;width:100%;padding:30px;background:#fff;border-radius:15px;margin:50px auto}.row{margin-right:-15px;margin-left:-15px}.col-md-4{padding-right:15px;padding-left:15px;width:33.33333333%;float:left}.select2-container--default .select2-selection--single{background:#fff;border:1px solid #e9e9e9;border-radius:6px;height:40px;line-height:40px;width:100%;text-align:left;padding:0 15px;outline:0}span.select2.select2-container{width:100%!important}.website-package{padding:0 15px;line-height:18px}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.website-package .select2-container--default .select2-results>.select2-results__options{margin-top:5px}.custom-dd .select2-container--default .select2-selection--single .select2-selection__arrow{height:20px;top:10px;right:1px;width:20px}@media (min-width:768px){.col-sm-4{width:100%;float:none}}a,a:focus,a:hover{text-decoration:none}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:38px}.select2-results__option{user-select:none;-webkit-user-select:none;font-size:14px;padding:8px 25px;margin:0}.select2-dropdown{border:1px solid #e9e9e9}.price-after{padding:0;text-align:center;font-size:16px;line-height:25px;font-family:Lato,sans-serif}.price-after p,.price-after span{font-size:16px;line-height:25px;margin:0;padding:0}.clearfix{clear:both}.price-after span{display:inline-block;vertical-align:text-top;font-size:20px;color:#42b9fa}.payments{padding:20px 0 10px}.folder-testimonial-list{width:100%;margin:30px auto 0;font-family:Lato,sans-serif}.folder-testimonial{position:relative}.folder-testimonial .testimonial-image{position:absolute;height:60px;width:60px;top:50%;margin-top:-30px;z-index:1;overflow:hidden;border-radius:30px}.folder-testimonial .testimonial-image img{width:100%;height:auto}.folder-testimonial .testimonial-data{position:relative;margin-left:30px;font-size:16px;line-height:22px;padding:10px 10px 10px 40px;background:#f5f5f5;border-radius:4px}.testimonial-title{font-weight:700;font-size:18px;padding:0 0 5px}.testimonial-author{font-size:16px;font-style:italic;font-weight:500;padding:5px 0 0}.plan-price span{font-size:16px;color:#28375a}.price-table-middle{margin-top:20px}.agency-feature .price-table-middle{margin-top:0}.website-package .select2-container--default .select2-selection--single{border:1px solid #6156f6;box-shadow:0 12px 44px rgba(96,93,236,.2)}.website-package .select2-container--default .select2-selection--single .select2-selection__rendered{color:#6156f6}.website-package .select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#6156f6 transparent transparent transparent}.website-package .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #6156f6 transparent;border-width:0 4px 5px 4px}.folders-tabs{max-width:inherit}
assets/css/design.css CHANGED
@@ -126,14 +126,14 @@ html[dir=rtl] body.folded .wcp-content {
126
  right: 36px
127
  }
128
  body.wp-admin #wpcontent {
129
- padding-left: 335px;
130
  transition: all .15s linear;
131
  -webkit-transition: all .15s linear;
132
  -moz-transition: all .15s linear
133
  }
134
  html[dir=rtl] body.wp-admin #wpcontent {
135
  padding-left: 0;
136
- padding-right: 320px
137
  }
138
  .wcp-container {
139
  padding: 20px 20px 20px 16px
@@ -615,18 +615,15 @@ span.total-count {
615
  li.active-menu {
616
  z-index: 2 !important
617
  }
618
- .wp-list-table th {
619
- width: auto !important
620
- }
621
  .wp-list-table th.column-title {
622
- width: 35% !important;
623
- }
624
- .fixed .column-author, .fixed .column-date, .fixed .column-format, .fixed .column-links, .fixed .column-parent, .fixed .column-posts {
625
- width: 10% !important;
626
  }
627
  .wp-list-table #wcp_move {
628
  width: 20px !important
629
  }
 
 
 
630
  td.wcp_move.column-wcp_move {
631
  vertical-align: middle
632
  }
126
  right: 36px
127
  }
128
  body.wp-admin #wpcontent {
129
+ padding-left: 305px;
130
  transition: all .15s linear;
131
  -webkit-transition: all .15s linear;
132
  -moz-transition: all .15s linear
133
  }
134
  html[dir=rtl] body.wp-admin #wpcontent {
135
  padding-left: 0;
136
+ padding-right: 305px
137
  }
138
  .wcp-container {
139
  padding: 20px 20px 20px 16px
615
  li.active-menu {
616
  z-index: 2 !important
617
  }
 
 
 
618
  .wp-list-table th.column-title {
619
+ width: 22% !important;
 
 
 
620
  }
621
  .wp-list-table #wcp_move {
622
  width: 20px !important
623
  }
624
+ body.woocommerce-page th#taxonomy-product_folder {
625
+ width: 10% !important;
626
+ }
627
  td.wcp_move.column-wcp_move {
628
  vertical-align: middle
629
  }
assets/css/design.min.css CHANGED
@@ -1 +1 @@
1
- .wcp-custom-menu{padding-left:0}.wcp-custom-menu a,.wcp-custom-menu a:focus{outline:0;box-shadow:none}.wcp-custom-menu{position:relative}.wcp-container ul{list-style:none}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;margin-top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.wcp-container .route span{position:absolute;top:2px;left:0;z-index:10;width:20px;height:18px;text-indent:0;font-size:20px;background:no-repeat;text-align:center}.wcp-container .route .title{position:absolute;border:0;margin:0;padding:0;height:30px;width:200px;text-indent:28px;background:0 0;box-shadow:none;font-size:13px;line-height:26px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;overflow:hidden;font-weight:400}.wcp-container .first-title{margin-left:10px}.wcp-container .space{position:relative;list-style-type:none;border:0;margin:0 0 0 20px;padding:0 0 30px 0;width:40px;top:30px;height:100%;z-index:1}.wcp-container .first-space{margin-left:0;top:0;padding:0}i.fa-caret-right{transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}li.active>span>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}li.active>span>i.fa-folder:before{content:"\f07c"}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}.has-sub-tree>.nav-icon{display:block}.wcp-content{position:fixed!important;top:32px;left:160px;bottom:0;width:280px;box-sizing:border-box;z-index:1;direction:ltr;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] .wcp-content{left:auto;right:160px}body.folded .wcp-content{left:36px}html[dir=rtl] body.folded .wcp-content{left:auto;right:36px}body.wp-admin #wpcontent{padding-left:335px;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] body.wp-admin #wpcontent{padding-left:0;padding-right:320px}.wcp-container{padding:20px 20px 20px 16px}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.form-operations{border:solid 1px #e5e5e5;border-right:none;margin-bottom:20px}.form-operations ul{margin:0;padding:0}.form-operations li{display:block;float:left;width:20%;text-align:center;background:#fff;margin:0;padding:0}.form-operations li a{display:block;padding:10px 0;border-right:solid 1px #e5e5e5;font-size:16px;color:#727272}.clearfix{clear:both}.wcp-parent-data{position:relative}.wcp-parent{position:absolute;left:-21px;font-weight:700;font-size:14px}.wcp-parent .fa{font-size:18px;margin-right:8px}.wcp-form-data{background:#fff;border:solid 1px #f1f1f1;padding:15px;display:none;margin-bottom:20px}.wcp-form-title{color:#727272;font-size:14px;text-transform:uppercase;padding:0 0 10px 0}.wcp-form-data .form-field{padding:0 0 10px 0}.wcp-form-data .form-field input,.wcp-form-data .form-field select{width:100%}button#wcp-save-folder{float:right}.wcp-form-message span{display:block;padding:5px 10px;background:#ffabab;margin-bottom:10px;color:#000;border:solid 1px #8c0000;border-radius:4px}.wcp-container .route.active-item>h3.title{background:#008ec2;color:#fff;border-radius:4px}.wcp-container .route span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}.route.active-item>span.ui-icon{background:#008ec2;color:#fff}#custom-menu.active>ul>li.route{display:block}.wcp-parent.active>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.wcp-parent.active>i.fa-folder:before{content:"\f07c"}.wcp-container .route .title .folder-sticky-icon,.wcp-container .route .title .move-folder-icon{float:right;position:relative;top:0;left:auto;width:20px;height:30px;line-height:26px;display:none}.wcp-container .route.is-sticky .title .folder-sticky-icon{display:block}span.folder-sticky-icon i{font-size:14px!important}.mCS_no_scrollbar .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{overflow:visible}body:not(.no-hover-css) .wcp-container .route .title:hover{background:rgba(250,22,107,.08);cursor:pointer}body:not(.no-hover-css) .wcp-container .route .title:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .move-folder-icon,body:not(.no-hover-css) .wcp-container .route .title:hover .move-folder-icon{display:block}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .ui-icon .pfolder-folder-close:before,body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-folder-close:before{content:"\e901"!important}#custom-menu .route.active>h3.title .pfolder-folder-close:before{content:"\e902"}.route.is-sticky>h3.title>.ui-icon>.folder-sticky-icon{display:block;width:100%;height:auto;margin:3px auto 0}.route.is-sticky.active-item>h3.title>.ui-icon>.folder-sticky-icon{filter:invert(100%);-webkit-filter:invert(100%)}.wcp-container .route .title.wcp-drop-hover img{filter:invert(100%);-webkit-filter:invert(100%)}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block;vertical-align:middle}.add-new-folder{text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder:focus,.add-new-folder:hover{color:#fff}.add-new-folder:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.add-new-folder span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}.add-new-folder span.folder-icon-create_new_folder{font-size:20px}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.form-options .form-options{padding:0;background:0 0;box-shadow:none}.form-options ul{margin:0;padding:0}.form-options>ul>li{display:inline-block;margin:0 2px 0 0;vertical-align:top}.form-options>ul>li.last{margin:0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 5px;color:#000;vertical-align:middle;margin:0 0 5px 0;background:#f1f1f1;border-radius:4px}.form-options>ul>li.last>a{padding:3px}a#expand-collapse-list.all-open span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.form-options>ul>li>a:hover{background:#404040;color:#fff}.form-options>ul>li>a:hover span.icon{color:#fff}.form-options>ul>li>a.expand-collapse{width:14px;text-align:center}.form-options a.expand-collapse span.icon{font-size:10px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.un-categorised-items{border-radius:3px}.header-posts a,.un-categorised-items a{color:#444;padding:7px;display:block;text-decoration:none;font-size:14px;border-radius:4px;line-height:18px}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px}.header-posts a.active-item,.un-categorised-items.active-item{background:#008ec2!important;color:#fff!important}.un-categorised-items.active-item a{color:#fff!important}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}span.total-count{float:right;font-size:12px;line-height:16px}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0)}.route.active>.nav-icon>.folder-icon-arrow_right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.route.active>.ui-icon>.folder-icon-folder:before{content:"\e90c"}.wcp-container .route span.total-count{position:relative;font-size:10px;float:right;text-align:center;width:auto;display:block;margin:4px 8px 3px 3px;color:#23282d!important;line-height:16px;height:16px}.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.dynamic-menu{position:absolute;left:auto;right:5px;background:#fff;width:170px;padding:0;z-index:101;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25)}.sticky-folders .dynamic-menu{left:auto;right:50px}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu a{text-decoration:none;color:#333;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap}.dynamic-menu ul>li>a>span,.dynamic-menu ul>li>a>span span{position:relative!important;display:inline-block;vertical-align:middle;margin-right:5px;top:auto!important;width:20px!important;height:20px!important;line-height:14px}#custom-menu .dynamic-menu ul>li>a .sticky-pin{line-height:20px}#custom-menu .dynamic-menu ul>li>a .sticky-pin i{font-size:16px!important}.dynamic-menu ul>li>a>span span{top:auto;height:auto;width:auto;margin:0;left:auto;vertical-align:baseline;display:inline}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.dynamic-menu ul li span{font-size:20px;vertical-align:middle}.dynamic-menu ul li span.sticky-folder-icon{width:20px}.dynamic-menu ul li span i{font-size:14px;line-height:16px;font-weight:400}.wcp-form-input{padding-left:35px;box-sizing:border-box;position:relative}.wcp-form-input input{width:100%}.wcp-form-btn{padding:4px 0 4px 2px}.wcp-form-input:before{content:"\e90d";font-family:folder-icon!important;speak:none;position:absolute;left:0;font-size:28px;top:5px}.add-new-folder-btn{margin-right:5px!important}.form-loader{width:100%;height:5px;margin:0 0 10px}.form-loader-count{width:0;height:5px;background:url(../images/form-loader.png);transition:all 2.5s linear;-webkit-transition:all 2s linear;-moz-transition:all 2.5s linear}.route.is-high>.ui-icon>i:before{content:"\e900"!important}.route.is-high.active>.ui-icon>i:before{content:"\e90c"!important;z-index:11;color:#444;font-size:20px}.route.is-high.active>.ui-icon>i:after{content:"\e907";margin-left:-1.2em;color:#444;font-size:11px;top:1px;position:absolute}.route.is-high.active.active-item>.ui-icon>i:after,.route.is-high.active.active-item>.ui-icon>i:before{color:#fff}li.active-menu{z-index:2!important}.wp-list-table th{width:auto!important}.wp-list-table th.column-title{width:35%!important}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%!important}.wp-list-table #wcp_move{width:20px!important}td.wcp_move.column-wcp_move{vertical-align:middle}.wp-list-table tr td .wcp-move-file{vertical-align:middle;opacity:0}.wp-list-table td.wcp_move.column-wcp_move.wcp-draggable,.wp-list-table tr:hover td .wcp-move-file{opacity:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:1051!important}.wcp-hover-list{background:#fa166b!important;color:#fff;position:relative}.wcp-hover-list a{color:#fff}.wcp-hover-list span.total-count{color:#000}span.wcp-item{display:none}.wcp-move-file{cursor:move}.wcp-drop-hover-list a.folder-view{background:#008ec2;color:#fff;border:solid 1px #fff;position:relative}.wcp-drop-hover-list a.folder-view:before{width:100%;height:100%;content:"";position:absolute;top:-2px;left:-2px;border:solid 1px #008ec2;padding:1px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}.ui-draggable-dragging.wcp-move-file{z-index:5001;display:inline-block;border:solid 2px #0073aa;padding:5px 10px;border-radius:5px;background:#e4f6ff;position:fixed!important;max-width:230px;overflow:hidden;width:auto!important}.ui-draggable-dragging.wcp-move-file span{display:block;float:left}.ui-draggable-dragging.wcp-move-file span.wcp-move{margin-right:5px;display:block;float:left}.wcp-container .route span.title-text{position:relative;top:auto;left:auto;display:inline-block;font-size:16px;line-height:30px;height:30px;width:calc(100% - 100px);overflow:hidden;white-space:nowrap;text-align:left}.ui-resizable-handle.ui-resizable-e{position:absolute;top:0;height:100%;height:100vh;width:1px;right:0;border-right:1px solid #ccc;cursor:col-resize}.ui-resizable-handle.ui-resizable-e:before,.ui-resizable-handle.ui-resizable-w:before{content:"";top:25%;width:3px;height:30px;position:absolute;border-left:solid 1px #fa166b;border-right:solid 1px #fa166b;left:-1px}.ui-resizable-handle.ui-resizable-w{position:absolute;top:0;height:100%;height:100vh;width:1px;left:0;border-right:1px solid #ccc;cursor:col-resize}div#custom-menu{padding:0 10px 10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}body:not(.no-hover-css) .sticky-folders li a:hover span.update-inline-record,body:not(.no-hover-css) .wcp-container .route h3:hover>span.update-inline-record{width:18px}.tree-structure li{display:block;width:auto;float:left;margin:0;padding:0}.tree-structure .folder-item{padding:4px;position:relative}.tree-structure .folder-view{display:block;border:none;color:#404040;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;position:relative;cursor:pointer;background:#f1f1f1;font-size:14px;line-height:16px}.tree-structure .folder-view span.item-name{display:block;padding:8px 15px 8px 30px;position:relative;width:100%;overflow:hidden;height:32px;font-size:14px;box-sizing:border-box}.folder-view span.item-name:before{content:"\e906";font-family:premio-folder!important;position:absolute;left:8px;font-size:16px;color:#a4c0d2}.folder-view.is-high span.item-name:before{content:"\e900"}.folder-view.is-post span.item-name:before{content:"\e901"}.tree-structure span.folder-option{position:absolute;right:0;font-family:folder-icon!important;top:0;font-size:20px;line-height:38px;z-index:1;cursor:pointer;display:none}.tree-structure .folder-view:hover span.folder-option{display:block}.tree-structure span.folder-option:hover{color:#f51366}.tree-structure span.folder-option:after{content:"\e90a"}.tree-structure li{position:relative}.tree-structure{margin-left:-8px;margin-right:-8px}.tree-structure .folder-view span.folder-title{width:100%;display:block}.swal2-popup .swal2-title{line-height:36px}.attachments-browser.ui-draggable-dragging .media-sidebar,.attachments-browser.ui-draggable-dragging .media-toolbar,.attachments-browser.ui-draggable-dragging .uploader-inline,.attachments-browser.ui-draggable-dragging ul.attachments{display:none}.attachments.ui-sortable.ui-draggable-dragging{z-index:5000}.selected-items{background:#0073aa;color:#fff;padding:10px 20px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;margin-top:0;cursor:none;font-size:12px}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{width:2px!important;background-color:transparent!important;box-shadow:none!important}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px!important;background-color:#fa166b!important;margin:0 0 0 4px!important;padding:0!important}.mCSB_outside+.mCSB_scrollTools{right:-15px!important}body.upload-php.eml-grid #wpbody{position:relative!important;top:0!important;bottom:auto!important;left:auto!important;right:auto!important;height:auto}#footer-thankyou{display:none}span.upgrade-message{padding:0;background:#fff;display:inline-block;font-size:12px;color:#000}span.upgrade-message a.pink,span.upgrade-message span.pink{color:#ff5983;text-decoration:none;font-weight:700}.media-toolbar.sticky-media{position:fixed;top:32px;right:18px!important;left:auto}.media-position{width:1px;height:1px}.media-frame.mode-grid .media-toolbar{margin:0!important}.button-disabled{cursor:no-drop;pointer-events:none}.wcp-hide-show-buttons{position:absolute;top:25px;right:-20px;z-index:10001}html[dir=rtl] .wcp-hide-show-buttons{left:-20px;right:auto}.wcp-hide-show-buttons .toggle-buttons{background:#f51366;color:#fff;display:inline-block;margin:0;padding:0;float:left;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%;display:none;width:20px;height:20px;cursor:pointer;position:relative}.wcp-hide-show-buttons:hover .toggle-buttons:after{content:"";width:100%;height:100%;background:0 0;position:absolute;top:0;left:0;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-border-top-left-radius:50%;-webkit-border-bottom-left-radius:50%;-moz-border-radius-top-left:50%;-moz-border-radius-bottom-left:50%;border-top-left-radius:50%;border-bottom-left-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.hide-folders-area .wcp-content{width:0!important}.hide-folders-area .wcp-container{display:none}.wcp-hide-show-buttons .toggle-buttons.active{display:block}#wcp-content.no-transition .wcp-container{display:none}button.button.organize-button{vertical-align:middle;text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:3px;line-height:14px;-webkit-box-shadow:0 3px 5px -3px #333;-moz-box-shadow:0 3px 5px -3px #333;box-shadow:0 3px 5px -3px #333;position:relative}button.button.organize-button:focus,button.button.organize-button:hover{color:#fff}button.button.organize-button:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.tree-structure-content ul{margin:0;padding:0}.tree-structure-content{padding:5px 10px;background:#fff;margin:10px 0 15px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;border:solid 1px #ccc}.tree-structure-content .tree-structure{height:40px;overflow:hidden;transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}.tree-structure-content.active .tree-structure{height:auto}.folders-toggle-button{height:15px;text-align:center;position:relative}.folders-toggle-button span{background:#f51366;color:#fff;height:20px;width:30px;text-align:center;display:block;margin:0 auto;position:absolute;left:0;right:0;bottom:-10px;cursor:pointer;font-family:dashicons;font-size:20px;line-height:20px}.folders-toggle-button span:after{content:"\f347"}.tree-structure-content.active .folders-toggle-button span:after{content:"\f343"}span.media-info-message{vertical-align:middle;line-height:20px;font-weight:700;color:#f51366;padding:0 0 10px 0;display:none!important}span.media-info-message.active{display:block!important}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display:none}.folder-popup-form.disabled{pointer-events:none}.popup-form-content{background:#fff;min-height:100px;width:400px;text-align:center;margin:0 auto;position:absolute;left:0;right:0;top:50%;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-o-transform:translate(0,-50%);-ms-transform:translate(0,-50%);padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#484848}.folder-form-buttons a,.folder-form-buttons button{display:inline-flex;padding:0;text-decoration:none;margin:10px 3px;border-radius:4px;border:solid 1px #1da1f4;line-height:34px;font-weight:700;font-size:14px;box-sizing:border-box;height:36px;cursor:pointer;flex:1;justify-content:center}.folder-form-buttons a span,.folder-form-buttons button span{-webkit-animation:fa-spin .75s infinite linear;animation:fa-spin .75s infinite linear;padding:7px}.wcp-container .folder-tooltip{position:relative}.wcp-container .folder-tooltip::after,.wcp-container .folder-tooltip::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}.wcp-container .folder-tooltip::before{content:'';border:5px solid transparent;z-index:1001}.wcp-container .folder-tooltip::after{content:attr(data-folder-tooltip);font-family:Helvetica,sans-serif;text-align:center;min-width:3em;max-width:21em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1ch 1.5ch;border-radius:.3ch;box-shadow:0 1em 2em -.5em rgba(0,0,0,.35);background:#333;color:#fff;z-index:1000}.wcp-container .folder-tooltip:hover::after,.wcp-container .folder-tooltip:hover::before{display:block;opacity:1}.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip[flow^=up]::after{bottom:calc(100% + 5px)}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::after,.wcp-container .folder-tooltip[flow^=up]::before{left:50%;transform:translate(-50%,-.5em)}.wp-core-ui .button-primary.select-all-item-btn{margin:11px 11px 11px 0;display:none!important}.wp-core-ui .button-primary.select-all-item-btn.active{display:inline-block!important}.form-options>ul>li.last.folder-checkbox{padding:5px 0 0}#custom-menu input.checkbox{display:none}#custom-menu.show-folder-checkbox input.checkbox{display:block;margin:5px 0 0 0}#custom-menu.show-folder-checkbox h3.title>.ui-icon>i,#custom-menu.show-folder-checkbox h3.title>.ui-icon>img{display:none!important}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.folder-form-buttons a:focus,.folder-form-buttons a:hover,.folder-form-buttons button:focus,.folder-form-buttons button:hover{color:#fff;outline:0}.folder-form-buttons a:focus{outline:0;outline:0}.form-cancel-btn,a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.form-submit-btn{background-color:#3085d6;color:#fff;outline:0}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.folder-form-message{font-size:15px;line-height:18px;color:#484848;padding:25px 70px}.folder-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-errors.active{display:block}span.folder-loader-ajax{margin:0;line-height:30px;display:none;vertical-align:middle}.folder-loader-ajax.active{display:inline-block}@-webkit-keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@-webkit-keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}#successAnimationCircle{stroke-dasharray:151px 151px;stroke:#2ce0a7}#successAnimationCheck{stroke-dasharray:36px 36px;stroke:#2ce0a7}#successAnimationResult{fill:#2ce0a7;opacity:0}svg#successAnimation{width:30px;height:34px;padding:0;display:none;float:left}#successAnimation.active{display:inline-block}.folder-loader-ajax img{display:none}.folder-loader-ajax img.active{display:inline-block}#successAnimation.animated{-webkit-animation:1s ease-out 0s 1 both scaleAnimation;animation:1s ease-out 0s 1 both scaleAnimation}#successAnimation.animated #successAnimationCircle{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationCheck{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationResult{-webkit-animation:.3s linear .9s both fadeIn;animation:.3s linear .9s both fadeIn}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:10px 0!important}.popup-folder-title{font-weight:700;font-size:24px;padding:0 0 20px 0}.select-box{padding:20px 0 10px 0}.select-box select{width:100%;max-width:300px}.actions #media_folder,select.media-select-folder{width:132px}select#media-attachment-taxonomy-filter{width:132px}.custom-media-select{float:right;padding:10px 0 0 0;display:none}.custom-media-select.active{display:block}.folder-progress{background:#b4b9be;border-radius:4px;margin:5px 0 0 0;position:relative}.folder-meter{height:20px;position:relative;background:#f1f1f1;padding:0;width:0%;border-radius:4px;-webkit-transition:all .2s linear;transition:all .2s linear}.folder-meter>span{display:block;height:100%;-webkit-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);-moz-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);position:relative;overflow:hidden;border-radius:4px}.folder-animate>span>span,.folder-meter>span:after,.folder-progress:after{content:"";position:absolute;border-radius:4px;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:50px 50px;-moz-background-size:50px 50px;-webkit-animation:move 2s linear infinite;overflow:hidden}.folder-animate>span:after{display:none}@-webkit-keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}.media-folder-loader{padding:10px 0 15px;display:none}.media-folder-loader>span{font-weight:700}.sticky-folders{display:none;padding:0;margin:10px 0 5px;border-top:solid 1px #e9e5e5}.top-settings{background:#fff;padding:10px 10px 5px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.sticky-folders.active{display:block}.sticky-folders ul{margin:0;padding:0}.sticky-folders>ul>li{display:block;margin:0;padding:0}.sticky-folders>ul>li>a{display:block;color:#333;padding:0 0 0 10px;border-radius:3px;text-decoration:none;font-size:14px;line-height:30px;position:relative}.sticky-folders ul li a.active,body:not(.no-hover-css) .sticky-folders ul li a:hover{background:#dfdfdf;border-radius:3px}.sticky-folders ul li a.active-item{background-color:#008ec2!important;color:#fff}.sticky-folders ul li a.active-item img{filter:invert(100%);-webkit-filter:invert(100%)}.sticky-folders>ul>li>a>span{display:inline-block;vertical-align:middle;line-height:30px}.sticky-folders ul li a span.update-inline-record{line-height:30px;padding:0 0 0 5px;height:30px}.sticky-folders ul li a span.folder-count{padding:0 8px 0 3px}.sticky-wcp-custom-form a:focus{box-shadow:none;outline:0}span.folder-count{float:right;background:0 0;padding:0;font-size:10px;line-height:16px;border-radius:2px}span.folder-count:empty{display:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}.sticky-title img{display:inline-block;vertical-align:middle;height:20px;width:20px}.sticky-folder-icon img{width:100%;filter:invert(50%);-webkit-filter:invert(50%)}.dynamic-menu .sticky-folder:hover img{filter:invert(0);-webkit-filter:invert(0)}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.sort-folder-order svg{width:100%;height:100%;fill:#000}.sort-folder-order:hover svg{fill:#fff}.folder-order{position:relative}.folder-sort-menu{position:absolute;right:0;width:120px;z-index:101;background:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25);display:none}.folder-order.active .folder-sort-menu{display:block}.folder-order.active .sort-folder-order{background:#404040;color:#fff}.folder-order.active .sort-folder-order svg{fill:#fff}.folder-sort-menu li{display:block;margin:0;padding:0;background:0 0}.folder-sort-menu li a{display:block;margin:0;padding:3px 5px;background:0 0;color:#848484;text-decoration:none;font-size:14px}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.dynamic-menu.bottom-fix{bottom:0}.folder-form-buttons{display:flex}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.folder-grouptextarea{resize:none}.folder-group input,.folder-group textarea{background:0 0;font-size:14px;padding:0 0 0 15px;display:block;width:100%;border-radius:4px;border:1px solid #484848;height:34px;line-height:34px;color:#484848}.folder-group input:focus,.folder-group textarea:focus{outline:0}.folder-group input:focus~label,.folder-group input:valid~label,.folder-group textarea:focus~label,.folder-group textarea:valid~label{top:-9px;background:#fff;padding:0 5px;font-weight:400;font-size:12px;line-height:14px;color:#aeaeae}.folder-group input:focus~.bar:before,.folder-group textarea:focus~.bar:before{width:320px}.folder-group input[type=password]{letter-spacing:.3em}.folder-group label{font-size:14px;font-weight:500;position:absolute;pointer-events:none;left:20px;top:10px;-webkit-transition:.3s ease all;transition:.3s ease all;color:#484848}.folder-group .folder-bar{position:relative;display:block;width:320px}.folder-group .folder-bar:before{content:'';height:2px;width:0;bottom:0;position:absolute;background:#2196f3;-webkit-transition:.3s ease all;transition:.3s ease all;left:0}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-],.sticky-folders i{font-size:12px}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px;width:100%;outline:0;box-shadow:none!important}.folder-search-form span{position:absolute;color:#aeaeae;right:0;top:0;height:32px;line-height:32px;width:32px;text-align:center}.folder-separator{padding:0 10px;height:1px;background:#e9e5e5;margin:0 0 10px 0}#custom-menu.has-filter li.route{display:none!important}#custom-menu.has-filter li.route.has-search{display:block!important}#custom-menu.has-filter h3 span.title-text.has-search-text{font-weight:700}.hide-folders-area .ui-resizable-handle.ui-resizable-e{display:none!important}.pull-right{float:right;display:block;line-height:22px}.folder-separator-2{padding:0;height:1px;background:#e9e5e5;margin:0 0 5px 0}.mCSB_scrollTools{width:10px!important}.mCSB_inside>.mCSB_container{margin-right:0!important}#custom-menu .route.has-sub-tree.has-search>.nav-icon>.pfolder-arrow-down{transform:rotate(0)}@media screen and (max-width:960px){.wcp-content{left:36px}html[dir=rtl] .wcp-content{right:36px;left:auto}}@media screen and (max-width:780px){.wcp-content{left:0}html[dir=rtl] .wcp-content{right:0}}@media screen and (max-width:640px){.wcp-content{left:0;position:relative!important;width:100%!important;padding-bottom:100px;top:0;right:0;display:block}.ui-resizable-handle.ui-resizable-e{display:none!important}.hide-folders-area .wcp-container{display:block}.wcp-hide-show-buttons{display:none}.hide-folders-area .wcp-content{width:100%!important}body.wp-admin #wpcontent{padding:0!important}#wpbody-content{padding-bottom:30px}}
1
+ .wcp-custom-menu{padding-left:0}.wcp-custom-menu a,.wcp-custom-menu a:focus{outline:0;box-shadow:none}.wcp-custom-menu{position:relative}.wcp-container ul{list-style:none}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;margin-top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.wcp-container .route span{position:absolute;top:2px;left:0;z-index:10;width:20px;height:18px;text-indent:0;font-size:20px;background:no-repeat;text-align:center}.wcp-container .route .title{position:absolute;border:0;margin:0;padding:0;height:30px;width:200px;text-indent:28px;background:0 0;box-shadow:none;font-size:13px;line-height:26px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;overflow:hidden;font-weight:400}.wcp-container .first-title{margin-left:10px}.wcp-container .space{position:relative;list-style-type:none;border:0;margin:0 0 0 20px;padding:0 0 30px 0;width:40px;top:30px;height:100%;z-index:1}.wcp-container .first-space{margin-left:0;top:0;padding:0}i.fa-caret-right{transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}li.active>span>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}li.active>span>i.fa-folder:before{content:"\f07c"}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}.has-sub-tree>.nav-icon{display:block}.wcp-content{position:fixed!important;top:32px;left:160px;bottom:0;width:280px;box-sizing:border-box;z-index:1;direction:ltr;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] .wcp-content{left:auto;right:160px}body.folded .wcp-content{left:36px}html[dir=rtl] body.folded .wcp-content{left:auto;right:36px}body.wp-admin #wpcontent{padding-left:305px;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] body.wp-admin #wpcontent{padding-left:0;padding-right:305px}.wcp-container{padding:20px 20px 20px 16px}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.form-operations{border:solid 1px #e5e5e5;border-right:none;margin-bottom:20px}.form-operations ul{margin:0;padding:0}.form-operations li{display:block;float:left;width:20%;text-align:center;background:#fff;margin:0;padding:0}.form-operations li a{display:block;padding:10px 0;border-right:solid 1px #e5e5e5;font-size:16px;color:#727272}.clearfix{clear:both}.wcp-parent-data{position:relative}.wcp-parent{position:absolute;left:-21px;font-weight:700;font-size:14px}.wcp-parent .fa{font-size:18px;margin-right:8px}.wcp-form-data{background:#fff;border:solid 1px #f1f1f1;padding:15px;display:none;margin-bottom:20px}.wcp-form-title{color:#727272;font-size:14px;text-transform:uppercase;padding:0 0 10px 0}.wcp-form-data .form-field{padding:0 0 10px 0}.wcp-form-data .form-field input,.wcp-form-data .form-field select{width:100%}button#wcp-save-folder{float:right}.wcp-form-message span{display:block;padding:5px 10px;background:#ffabab;margin-bottom:10px;color:#000;border:solid 1px #8c0000;border-radius:4px}.wcp-container .route.active-item>h3.title{background:#008ec2;color:#fff;border-radius:4px}.wcp-container .route span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}.route.active-item>span.ui-icon{background:#008ec2;color:#fff}#custom-menu.active>ul>li.route{display:block}.wcp-parent.active>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.wcp-parent.active>i.fa-folder:before{content:"\f07c"}.wcp-container .route .title .folder-sticky-icon,.wcp-container .route .title .move-folder-icon{float:right;position:relative;top:0;left:auto;width:20px;height:30px;line-height:26px;display:none}.wcp-container .route.is-sticky .title .folder-sticky-icon{display:block}span.folder-sticky-icon i{font-size:14px!important}.mCS_no_scrollbar .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{overflow:visible}body:not(.no-hover-css) .wcp-container .route .title:hover{background:rgba(250,22,107,.08);cursor:pointer}body:not(.no-hover-css) .wcp-container .route .title:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .move-folder-icon,body:not(.no-hover-css) .wcp-container .route .title:hover .move-folder-icon{display:block}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .ui-icon .pfolder-folder-close:before,body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-folder-close:before{content:"\e901"!important}#custom-menu .route.active>h3.title .pfolder-folder-close:before{content:"\e902"}.route.is-sticky>h3.title>.ui-icon>.folder-sticky-icon{display:block;width:100%;height:auto;margin:3px auto 0}.route.is-sticky.active-item>h3.title>.ui-icon>.folder-sticky-icon{filter:invert(100%);-webkit-filter:invert(100%)}.wcp-container .route .title.wcp-drop-hover img{filter:invert(100%);-webkit-filter:invert(100%)}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block;vertical-align:middle}.add-new-folder{text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder:focus,.add-new-folder:hover{color:#fff}.add-new-folder:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.add-new-folder span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}.add-new-folder span.folder-icon-create_new_folder{font-size:20px}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.form-options .form-options{padding:0;background:0 0;box-shadow:none}.form-options ul{margin:0;padding:0}.form-options>ul>li{display:inline-block;margin:0 2px 0 0;vertical-align:top}.form-options>ul>li.last{margin:0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 5px;color:#000;vertical-align:middle;margin:0 0 5px 0;background:#f1f1f1;border-radius:4px}.form-options>ul>li.last>a{padding:3px}a#expand-collapse-list.all-open span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.form-options>ul>li>a:hover{background:#404040;color:#fff}.form-options>ul>li>a:hover span.icon{color:#fff}.form-options>ul>li>a.expand-collapse{width:14px;text-align:center}.form-options a.expand-collapse span.icon{font-size:10px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.un-categorised-items{border-radius:3px}.header-posts a,.un-categorised-items a{color:#444;padding:7px;display:block;text-decoration:none;font-size:14px;border-radius:4px;line-height:18px}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px}.header-posts a.active-item,.un-categorised-items.active-item{background:#008ec2!important;color:#fff!important}.un-categorised-items.active-item a{color:#fff!important}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}span.total-count{float:right;font-size:12px;line-height:16px}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0)}.route.active>.nav-icon>.folder-icon-arrow_right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.route.active>.ui-icon>.folder-icon-folder:before{content:"\e90c"}.wcp-container .route span.total-count{position:relative;font-size:10px;float:right;text-align:center;width:auto;display:block;margin:4px 8px 3px 3px;color:#23282d!important;line-height:16px;height:16px}.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.dynamic-menu{position:absolute;left:auto;right:5px;background:#fff;width:170px;padding:0;z-index:101;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25)}.sticky-folders .dynamic-menu{left:auto;right:50px}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu a{text-decoration:none;color:#333;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap}.dynamic-menu ul>li>a>span,.dynamic-menu ul>li>a>span span{position:relative!important;display:inline-block;vertical-align:middle;margin-right:5px;top:auto!important;width:20px!important;height:20px!important;line-height:14px}#custom-menu .dynamic-menu ul>li>a .sticky-pin{line-height:20px}#custom-menu .dynamic-menu ul>li>a .sticky-pin i{font-size:16px!important}.dynamic-menu ul>li>a>span span{top:auto;height:auto;width:auto;margin:0;left:auto;vertical-align:baseline;display:inline}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.dynamic-menu ul li span{font-size:20px;vertical-align:middle}.dynamic-menu ul li span.sticky-folder-icon{width:20px}.dynamic-menu ul li span i{font-size:14px;line-height:16px;font-weight:400}.wcp-form-input{padding-left:35px;box-sizing:border-box;position:relative}.wcp-form-input input{width:100%}.wcp-form-btn{padding:4px 0 4px 2px}.wcp-form-input:before{content:"\e90d";font-family:folder-icon!important;speak:none;position:absolute;left:0;font-size:28px;top:5px}.add-new-folder-btn{margin-right:5px!important}.form-loader{width:100%;height:5px;margin:0 0 10px}.form-loader-count{width:0;height:5px;background:url(../images/form-loader.png);transition:all 2.5s linear;-webkit-transition:all 2s linear;-moz-transition:all 2.5s linear}.route.is-high>.ui-icon>i:before{content:"\e900"!important}.route.is-high.active>.ui-icon>i:before{content:"\e90c"!important;z-index:11;color:#444;font-size:20px}.route.is-high.active>.ui-icon>i:after{content:"\e907";margin-left:-1.2em;color:#444;font-size:11px;top:1px;position:absolute}.route.is-high.active.active-item>.ui-icon>i:after,.route.is-high.active.active-item>.ui-icon>i:before{color:#fff}li.active-menu{z-index:2!important}.wp-list-table th.column-title{width:22%!important}.wp-list-table #wcp_move{width:20px!important}body.woocommerce-page th#taxonomy-product_folder{width:10%!important}td.wcp_move.column-wcp_move{vertical-align:middle}.wp-list-table tr td .wcp-move-file{vertical-align:middle;opacity:0}.wp-list-table td.wcp_move.column-wcp_move.wcp-draggable,.wp-list-table tr:hover td .wcp-move-file{opacity:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:1051!important}.wcp-hover-list{background:#fa166b!important;color:#fff;position:relative}.wcp-hover-list a{color:#fff}.wcp-hover-list span.total-count{color:#000}span.wcp-item{display:none}.wcp-move-file{cursor:move}.wcp-drop-hover-list a.folder-view{background:#008ec2;color:#fff;border:solid 1px #fff;position:relative}.wcp-drop-hover-list a.folder-view:before{width:100%;height:100%;content:"";position:absolute;top:-2px;left:-2px;border:solid 1px #008ec2;padding:1px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}.ui-draggable-dragging.wcp-move-file{z-index:5001;display:inline-block;border:solid 2px #0073aa;padding:5px 10px;border-radius:5px;background:#e4f6ff;position:fixed!important;max-width:230px;overflow:hidden;width:auto!important}.ui-draggable-dragging.wcp-move-file span{display:block;float:left}.ui-draggable-dragging.wcp-move-file span.wcp-move{margin-right:5px;display:block;float:left}.wcp-container .route span.title-text{position:relative;top:auto;left:auto;display:inline-block;font-size:16px;line-height:30px;height:30px;width:calc(100% - 100px);overflow:hidden;white-space:nowrap;text-align:left}.ui-resizable-handle.ui-resizable-e{position:absolute;top:0;height:100%;height:100vh;width:1px;right:0;border-right:1px solid #ccc;cursor:col-resize}.ui-resizable-handle.ui-resizable-e:before,.ui-resizable-handle.ui-resizable-w:before{content:"";top:25%;width:3px;height:30px;position:absolute;border-left:solid 1px #fa166b;border-right:solid 1px #fa166b;left:-1px}.ui-resizable-handle.ui-resizable-w{position:absolute;top:0;height:100%;height:100vh;width:1px;left:0;border-right:1px solid #ccc;cursor:col-resize}div#custom-menu{padding:0 10px 10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}body:not(.no-hover-css) .sticky-folders li a:hover span.update-inline-record,body:not(.no-hover-css) .wcp-container .route h3:hover>span.update-inline-record{width:18px}.tree-structure li{display:block;width:auto;float:left;margin:0;padding:0}.tree-structure .folder-item{padding:4px;position:relative}.tree-structure .folder-view{display:block;border:none;color:#404040;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;position:relative;cursor:pointer;background:#f1f1f1;font-size:14px;line-height:16px}.tree-structure .folder-view span.item-name{display:block;padding:8px 15px 8px 30px;position:relative;width:100%;overflow:hidden;height:32px;font-size:14px;box-sizing:border-box}.folder-view span.item-name:before{content:"\e906";font-family:premio-folder!important;position:absolute;left:8px;font-size:16px;color:#a4c0d2}.folder-view.is-high span.item-name:before{content:"\e900"}.folder-view.is-post span.item-name:before{content:"\e901"}.tree-structure span.folder-option{position:absolute;right:0;font-family:folder-icon!important;top:0;font-size:20px;line-height:38px;z-index:1;cursor:pointer;display:none}.tree-structure .folder-view:hover span.folder-option{display:block}.tree-structure span.folder-option:hover{color:#f51366}.tree-structure span.folder-option:after{content:"\e90a"}.tree-structure li{position:relative}.tree-structure{margin-left:-8px;margin-right:-8px}.tree-structure .folder-view span.folder-title{width:100%;display:block}.swal2-popup .swal2-title{line-height:36px}.attachments-browser.ui-draggable-dragging .media-sidebar,.attachments-browser.ui-draggable-dragging .media-toolbar,.attachments-browser.ui-draggable-dragging .uploader-inline,.attachments-browser.ui-draggable-dragging ul.attachments{display:none}.attachments.ui-sortable.ui-draggable-dragging{z-index:5000}.selected-items{background:#0073aa;color:#fff;padding:10px 20px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;margin-top:0;cursor:none;font-size:12px}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{width:2px!important;background-color:transparent!important;box-shadow:none!important}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px!important;background-color:#fa166b!important;margin:0 0 0 4px!important;padding:0!important}.mCSB_outside+.mCSB_scrollTools{right:-15px!important}body.upload-php.eml-grid #wpbody{position:relative!important;top:0!important;bottom:auto!important;left:auto!important;right:auto!important;height:auto}#footer-thankyou{display:none}span.upgrade-message{padding:0;background:#fff;display:inline-block;font-size:12px;color:#000}span.upgrade-message a.pink,span.upgrade-message span.pink{color:#ff5983;text-decoration:none;font-weight:700}.media-toolbar.sticky-media{position:fixed;top:32px;right:18px!important;left:auto}.media-position{width:1px;height:1px}.media-frame.mode-grid .media-toolbar{margin:0!important}.button-disabled{cursor:no-drop;pointer-events:none}.wcp-hide-show-buttons{position:absolute;top:25px;right:-20px;z-index:10001}html[dir=rtl] .wcp-hide-show-buttons{left:-20px;right:auto}.wcp-hide-show-buttons .toggle-buttons{background:#f51366;color:#fff;display:inline-block;margin:0;padding:0;float:left;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%;display:none;width:20px;height:20px;cursor:pointer;position:relative}.wcp-hide-show-buttons:hover .toggle-buttons:after{content:"";width:100%;height:100%;background:0 0;position:absolute;top:0;left:0;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-border-top-left-radius:50%;-webkit-border-bottom-left-radius:50%;-moz-border-radius-top-left:50%;-moz-border-radius-bottom-left:50%;border-top-left-radius:50%;border-bottom-left-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.hide-folders-area .wcp-content{width:0!important}.hide-folders-area .wcp-container{display:none}.wcp-hide-show-buttons .toggle-buttons.active{display:block}#wcp-content.no-transition .wcp-container{display:none}button.button.organize-button{vertical-align:middle;text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:3px;line-height:14px;-webkit-box-shadow:0 3px 5px -3px #333;-moz-box-shadow:0 3px 5px -3px #333;box-shadow:0 3px 5px -3px #333;position:relative}button.button.organize-button:focus,button.button.organize-button:hover{color:#fff}button.button.organize-button:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.tree-structure-content ul{margin:0;padding:0}.tree-structure-content{padding:5px 10px;background:#fff;margin:10px 0 15px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;border:solid 1px #ccc}.tree-structure-content .tree-structure{height:40px;overflow:hidden;transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}.tree-structure-content.active .tree-structure{height:auto}.folders-toggle-button{height:15px;text-align:center;position:relative}.folders-toggle-button span{background:#f51366;color:#fff;height:20px;width:30px;text-align:center;display:block;margin:0 auto;position:absolute;left:0;right:0;bottom:-10px;cursor:pointer;font-family:dashicons;font-size:20px;line-height:20px}.folders-toggle-button span:after{content:"\f347"}.tree-structure-content.active .folders-toggle-button span:after{content:"\f343"}span.media-info-message{vertical-align:middle;line-height:20px;font-weight:700;color:#f51366;padding:0 0 10px 0;display:none!important}span.media-info-message.active{display:block!important}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display:none}.folder-popup-form.disabled{pointer-events:none}.popup-form-content{background:#fff;min-height:100px;width:400px;text-align:center;margin:0 auto;position:absolute;left:0;right:0;top:50%;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-o-transform:translate(0,-50%);-ms-transform:translate(0,-50%);padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#484848}.folder-form-buttons a,.folder-form-buttons button{display:inline-flex;padding:0;text-decoration:none;margin:10px 3px;border-radius:4px;border:solid 1px #1da1f4;line-height:34px;font-weight:700;font-size:14px;box-sizing:border-box;height:36px;cursor:pointer;flex:1;justify-content:center}.folder-form-buttons a span,.folder-form-buttons button span{-webkit-animation:fa-spin .75s infinite linear;animation:fa-spin .75s infinite linear;padding:7px}.wcp-container .folder-tooltip{position:relative}.wcp-container .folder-tooltip::after,.wcp-container .folder-tooltip::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}.wcp-container .folder-tooltip::before{content:'';border:5px solid transparent;z-index:1001}.wcp-container .folder-tooltip::after{content:attr(data-folder-tooltip);font-family:Helvetica,sans-serif;text-align:center;min-width:3em;max-width:21em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1ch 1.5ch;border-radius:.3ch;box-shadow:0 1em 2em -.5em rgba(0,0,0,.35);background:#333;color:#fff;z-index:1000}.wcp-container .folder-tooltip:hover::after,.wcp-container .folder-tooltip:hover::before{display:block;opacity:1}.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip[flow^=up]::after{bottom:calc(100% + 5px)}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::after,.wcp-container .folder-tooltip[flow^=up]::before{left:50%;transform:translate(-50%,-.5em)}.wp-core-ui .button-primary.select-all-item-btn{margin:11px 11px 11px 0;display:none!important}.wp-core-ui .button-primary.select-all-item-btn.active{display:inline-block!important}.form-options>ul>li.last.folder-checkbox{padding:5px 0 0}#custom-menu input.checkbox{display:none}#custom-menu.show-folder-checkbox input.checkbox{display:block;margin:5px 0 0 0}#custom-menu.show-folder-checkbox h3.title>.ui-icon>i,#custom-menu.show-folder-checkbox h3.title>.ui-icon>img{display:none!important}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.folder-form-buttons a:focus,.folder-form-buttons a:hover,.folder-form-buttons button:focus,.folder-form-buttons button:hover{color:#fff;outline:0}.folder-form-buttons a:focus{outline:0;outline:0}.form-cancel-btn,a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.form-submit-btn{background-color:#3085d6;color:#fff;outline:0}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.folder-form-message{font-size:15px;line-height:18px;color:#484848;padding:25px 70px}.folder-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-errors.active{display:block}span.folder-loader-ajax{margin:0;line-height:30px;display:none;vertical-align:middle}.folder-loader-ajax.active{display:inline-block}@-webkit-keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@-webkit-keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}#successAnimationCircle{stroke-dasharray:151px 151px;stroke:#2ce0a7}#successAnimationCheck{stroke-dasharray:36px 36px;stroke:#2ce0a7}#successAnimationResult{fill:#2ce0a7;opacity:0}svg#successAnimation{width:30px;height:34px;padding:0;display:none;float:left}#successAnimation.active{display:inline-block}.folder-loader-ajax img{display:none}.folder-loader-ajax img.active{display:inline-block}#successAnimation.animated{-webkit-animation:1s ease-out 0s 1 both scaleAnimation;animation:1s ease-out 0s 1 both scaleAnimation}#successAnimation.animated #successAnimationCircle{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationCheck{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationResult{-webkit-animation:.3s linear .9s both fadeIn;animation:.3s linear .9s both fadeIn}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:10px 0!important}.popup-folder-title{font-weight:700;font-size:24px;padding:0 0 20px 0}.select-box{padding:20px 0 10px 0}.select-box select{width:100%;max-width:300px}.actions #media_folder,select.media-select-folder{width:132px}select#media-attachment-taxonomy-filter{width:132px}.custom-media-select{float:right;padding:10px 0 0 0;display:none}.custom-media-select.active{display:block}.folder-progress{background:#b4b9be;border-radius:4px;margin:5px 0 0 0;position:relative}.folder-meter{height:20px;position:relative;background:#f1f1f1;padding:0;width:0%;border-radius:4px;-webkit-transition:all .2s linear;transition:all .2s linear}.folder-meter>span{display:block;height:100%;-webkit-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);-moz-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);position:relative;overflow:hidden;border-radius:4px}.folder-animate>span>span,.folder-meter>span:after,.folder-progress:after{content:"";position:absolute;border-radius:4px;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:50px 50px;-moz-background-size:50px 50px;-webkit-animation:move 2s linear infinite;overflow:hidden}.folder-animate>span:after{display:none}@-webkit-keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}.media-folder-loader{padding:10px 0 15px;display:none}.media-folder-loader>span{font-weight:700}.sticky-folders{display:none;padding:0;margin:10px 0 5px;border-top:solid 1px #e9e5e5}.top-settings{background:#fff;padding:10px 10px 5px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.sticky-folders.active{display:block}.sticky-folders ul{margin:0;padding:0}.sticky-folders>ul>li{display:block;margin:0;padding:0}.sticky-folders>ul>li>a{display:block;color:#333;padding:0 0 0 10px;border-radius:3px;text-decoration:none;font-size:14px;line-height:30px;position:relative}.sticky-folders ul li a.active,body:not(.no-hover-css) .sticky-folders ul li a:hover{background:#dfdfdf;border-radius:3px}.sticky-folders ul li a.active-item{background-color:#008ec2!important;color:#fff}.sticky-folders ul li a.active-item img{filter:invert(100%);-webkit-filter:invert(100%)}.sticky-folders>ul>li>a>span{display:inline-block;vertical-align:middle;line-height:30px}.sticky-folders ul li a span.update-inline-record{line-height:30px;padding:0 0 0 5px;height:30px}.sticky-folders ul li a span.folder-count{padding:0 8px 0 3px}.sticky-wcp-custom-form a:focus{box-shadow:none;outline:0}span.folder-count{float:right;background:0 0;padding:0;font-size:10px;line-height:16px;border-radius:2px}span.folder-count:empty{display:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}.sticky-title img{display:inline-block;vertical-align:middle;height:20px;width:20px}.sticky-folder-icon img{width:100%;filter:invert(50%);-webkit-filter:invert(50%)}.dynamic-menu .sticky-folder:hover img{filter:invert(0);-webkit-filter:invert(0)}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.sort-folder-order svg{width:100%;height:100%;fill:#000}.sort-folder-order:hover svg{fill:#fff}.folder-order{position:relative}.folder-sort-menu{position:absolute;right:0;width:120px;z-index:101;background:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25);display:none}.folder-order.active .folder-sort-menu{display:block}.folder-order.active .sort-folder-order{background:#404040;color:#fff}.folder-order.active .sort-folder-order svg{fill:#fff}.folder-sort-menu li{display:block;margin:0;padding:0;background:0 0}.folder-sort-menu li a{display:block;margin:0;padding:3px 5px;background:0 0;color:#848484;text-decoration:none;font-size:14px}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.dynamic-menu.bottom-fix{bottom:0}.folder-form-buttons{display:flex}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.folder-grouptextarea{resize:none}.folder-group input,.folder-group textarea{background:0 0;font-size:14px;padding:0 0 0 15px;display:block;width:100%;border-radius:4px;border:1px solid #484848;height:34px;line-height:34px;color:#484848}.folder-group input:focus,.folder-group textarea:focus{outline:0}.folder-group input:focus~label,.folder-group input:valid~label,.folder-group textarea:focus~label,.folder-group textarea:valid~label{top:-9px;background:#fff;padding:0 5px;font-weight:400;font-size:12px;line-height:14px;color:#aeaeae}.folder-group input:focus~.bar:before,.folder-group textarea:focus~.bar:before{width:320px}.folder-group input[type=password]{letter-spacing:.3em}.folder-group label{font-size:14px;font-weight:500;position:absolute;pointer-events:none;left:20px;top:10px;-webkit-transition:.3s ease all;transition:.3s ease all;color:#484848}.folder-group .folder-bar{position:relative;display:block;width:320px}.folder-group .folder-bar:before{content:'';height:2px;width:0;bottom:0;position:absolute;background:#2196f3;-webkit-transition:.3s ease all;transition:.3s ease all;left:0}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-],.sticky-folders i{font-size:12px}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px;width:100%;outline:0;box-shadow:none!important}.folder-search-form span{position:absolute;color:#aeaeae;right:0;top:0;height:32px;line-height:32px;width:32px;text-align:center}.folder-separator{padding:0 10px;height:1px;background:#e9e5e5;margin:0 0 10px 0}#custom-menu.has-filter li.route{display:none!important}#custom-menu.has-filter li.route.has-search{display:block!important}#custom-menu.has-filter h3 span.title-text.has-search-text{font-weight:700}.hide-folders-area .ui-resizable-handle.ui-resizable-e{display:none!important}.pull-right{float:right;display:block;line-height:22px}.folder-separator-2{padding:0;height:1px;background:#e9e5e5;margin:0 0 5px 0}.mCSB_scrollTools{width:10px!important}.mCSB_inside>.mCSB_container{margin-right:0!important}#custom-menu .route.has-sub-tree.has-search>.nav-icon>.pfolder-arrow-down{transform:rotate(0)}@media screen and (max-width:960px){.wcp-content{left:36px}html[dir=rtl] .wcp-content{right:36px;left:auto}}@media screen and (max-width:780px){.wcp-content{left:0}html[dir=rtl] .wcp-content{right:0}}@media screen and (max-width:640px){.wcp-content{left:0;position:relative!important;width:100%!important;padding-bottom:100px;top:0;right:0;display:block}.ui-resizable-handle.ui-resizable-e{display:none!important}.hide-folders-area .wcp-container{display:block}.wcp-hide-show-buttons{display:none}.hide-folders-area .wcp-content{width:100%!important}body.wp-admin #wpcontent{padding:0!important}#wpbody-content{padding-bottom:30px}}
assets/css/page-post-media.css CHANGED
@@ -266,10 +266,11 @@ svg#successAnimation {
266
  color: #a4c0d2
267
  }
268
 
269
- .wcp-hide-show-buttons {
270
  display: none
271
  }
272
 
 
273
  .folder-order {
274
  position: relative
275
  }
@@ -1091,4 +1092,7 @@ html[dir=rtl] .media-frame .folder-modal .media-frame-content, html[dir=rtl] .fo
1091
  }
1092
  #vakata-dnd {
1093
  z-index: 10000000 !important;
 
 
 
1094
  }
266
  color: #a4c0d2
267
  }
268
 
269
+ .media-frame .wcp-hide-show-buttons {
270
  display: none
271
  }
272
 
273
+
274
  .folder-order {
275
  position: relative
276
  }
1092
  }
1093
  #vakata-dnd {
1094
  z-index: 10000000 !important;
1095
+ }
1096
+ .add-folder-note {
1097
+ font-size: 13px;
1098
  }
assets/css/page-post-media.min.css CHANGED
@@ -1 +1 @@
1
- .folder-custom-menu{width:275px;z-index:10001;position:absolute;height:100%;border-right:solid 1px #ddd;background:#f1f1f1;direction:ltr}.folder-modal .media-frame .media-frame-content,.folder-modal .media-frame .media-frame-router,.folder-modal .media-frame .media-frame-title,.folder-modal .media-frame .media-frame-toolbar{left:275px}.wcp-container{padding:20px 20px 20px 16px}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.media-frame a.add-new-folder{text-decoration:none;display:block;float:right;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}span.folder-loader-ajax{float:right;margin:0;line-height:30px;display:none}.folder-loader-ajax.active{display:inline-block}@-webkit-keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@-webkit-keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}#successAnimationCircle{stroke-dasharray:151px 151px;stroke:#2ce0a7}#successAnimationCheck{stroke-dasharray:36px 36px;stroke:#2ce0a7}#successAnimationResult{fill:#2ce0a7;opacity:0}svg#successAnimation{width:30px;height:34px;padding:0;display:none;float:left}#successAnimation.active{display:inline-block}.folder-loader-ajax img{display:none}#successAnimation.animated{-webkit-animation:1s ease-out 0s 1 both scaleAnimation;animation:1s ease-out 0s 1 both scaleAnimation}#successAnimation.animated #successAnimationCircle{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationCheck{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationResult{-webkit-animation:.3s linear .9s both fadeIn;animation:.3s linear .9s both fadeIn}.form-options{background:#fff;padding:5px;margin:0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.wcp-container ul{list-style:none}.form-options ul{margin:0;padding:0}.form-options>ul>li{display:inline-block;margin:0 2px 0 0;vertical-align:top}.form-options>ul>li.last{margin:0}.form-options>ul>li.last.folder-checkbox{padding:5px 0 0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 5px;color:#000;vertical-align:middle;margin:0 0 5px 0;background:#f1f1f1;border-radius:4px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.wcp-hide-show-buttons{display:none}.folder-order{position:relative}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.folder-sort-menu{position:absolute;right:0;width:120px;z-index:101;background:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25);display:none}.folder-sort-menu li{display:block;margin:0;padding:0;background:0}.folder-sort-menu li a{display:block;margin:0;padding:3px 5px;background:0;color:#848484;text-decoration:none;font-size:14px}span.upgrade-message{padding:0;background:#fff;display:inline-block;font-size:12px;color:#000}span.upgrade-message a.pink,span.upgrade-message span.pink{color:#ff5983;text-decoration:none;font-weight:700}.form-loader{width:100%;height:5px;margin:0 0 10px}.form-loader-count{width:0;height:5px;background:url(../images/form-loader.png);transition:all 2.5s linear;-webkit-transition:all 2s linear;-moz-transition:all 2.5s linear}.top-settings{background:#fff;padding:10px 10px 5px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.header-posts a,.un-categorised-items a{color:#444;padding:7px;display:block;text-decoration:none;font-size:14px;border-radius:4px;line-height:18px}.header-posts a.active-item,.orange-bg>span,.un-categorised-items.active-item,.wcp-container .route.active-item>h3.title{background-color:#fa166b!important;color:#fff}.header-posts a.active-item span.total-count,.un-categorised-items.active-item span.total-count,.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}span.total-count{float:right;font-size:12px;line-height:16px}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px;color:#444}.un-categorised-items.active-item a,.un-categorised-items.active-item a:hover{color:#fff}.un-categorised-items a:hover,.un-categorised-items:hover a{color:#444}.media-frame .folder-custom-menu a:focus{outline:0;box-shadow:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}div#custom-menu{padding:10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}.wcp-container .space{position:relative;list-style-type:none;border:0;margin:0 0 0 20px;padding:0 0 30px 0;width:40px;top:30px;height:100%;z-index:1}.wcp-container .first-space{margin-left:0;top:0;padding:0}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0}.wcp-container .route .title{position:absolute;border:0;margin:0;padding:0;height:30px;width:200px;text-indent:28px;background:0;box-shadow:none;font-size:13px;line-height:26px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;overflow:hidden;font-weight:400}.wcp-container .route span{position:absolute;top:2px;left:0;z-index:10;width:20px;height:18px;text-indent:0;font-size:20px;background:no-repeat;text-align:center}.wcp-container .route span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu input.checkbox{display:none}.wcp-container .route span.title-text{position:relative;top:auto;left:auto;display:inline-block;font-size:16px;line-height:30px;height:30px;width:calc(100% - 100px);overflow:hidden;white-space:nowrap;text-align:left}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-]{font-size:12px}.wcp-container .route .title .folder-sticky-icon,.wcp-container .route .title .move-folder-icon{float:right;position:relative;top:0;left:auto;width:20px;height:30px;line-height:26px;display:none}.wcp-container .route.is-sticky>h3.title .folder-sticky-icon,.wcp-container .route.is-sticky>h3.title .move-folder-icon{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}.header-posts a,.un-categorised-items a,.wcp-container .route span.title-text{font-size:12px}.wcp-container .route span.total-count{position:relative;font-size:10px;float:right;text-align:center;width:auto;display:block;margin:4px 8px 3px 3px;color:#23282d!important;line-height:16px;height:16px}.has-sub-tree>.nav-icon{display:block}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}body:not(.no-hover-css) .wcp-container .route .title:hover{background:rgba(250,22,107,.08);cursor:pointer}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .move-folder-icon,body:not(.no-hover-css) .wcp-container .route .title:hover .move-folder-icon{display:block}body:not(.no-hover-css) .wcp-container .route .title:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}body:not(.no-hover-css) .sticky-folders li a:hover span.update-inline-record,body:not(.no-hover-css) .wcp-container .route h3:hover>span.update-inline-record{width:18px}body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-folder-close:before,body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .ui-icon .pfolder-folder-close:before{content:"\e901"!important}.sticky-folders li.is-high a span.star-icon,.wcp-container .route.is-high>h3>span.star-icon{display:block}.dynamic-menu{position:absolute;left:50px;background:#fff;width:170px;padding:0;z-index:101;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25)}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a{text-decoration:none;color:#848484;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap}.dynamic-menu ul>li>a>span,.dynamic-menu ul>li>a>span span{position:relative!important;display:inline-block;vertical-align:middle;margin-right:5px;top:auto!important;width:20px!important;height:20px!important;line-height:14px}#custom-menu .dynamic-menu ul>li>a .sticky-pin{line-height:20px}#custom-menu .dynamic-menu ul>li>a .sticky-pin i{font-size:16px!important}li.active-menu{z-index:2!important}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display:none}.popup-form-content{background:#fff;min-height:100px;width:400px;text-align:center;margin:0 auto;position:absolute;left:0;right:0;top:50%;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-o-transform:translate(0,-50%);-ms-transform:translate(0,-50%);padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#484848}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.folder-group input,.folder-group textarea{background:0;font-size:14px;padding:0 0 0 15px;display:block;width:100%;border-radius:4px;border:1px solid #484848;height:34px;line-height:34px;color:#484848;outline:0}.highlight{background-color:#e4f2fd;color:#000}.folder-group .folder-bar{position:relative;display:block;width:320px}.folder-group label{font-size:14px;font-weight:500;position:absolute;pointer-events:none;left:20px;top:10px;-webkit-transition:.3s ease all;transition:.3s ease all;color:#484848}.folder-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-buttons{display:flex}.folder-form-buttons a,.folder-form-buttons button{display:inline-flex;padding:0;text-decoration:none;margin:10px 3px;border-radius:4px;border:solid 1px #1da1f4;line-height:34px;font-weight:700;font-size:14px;box-sizing:border-box;height:36px;cursor:pointer;flex:1;justify-content:center;outline:0;color:#fff}.folder-form-buttons .form-cancel-btn,.folder-form-buttons a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.form-submit-btn,.form-submit-btn:hover{background-color:#3085d6;color:#fff!important;outline:0}.folder-group input:focus ~ label,.folder-group input:valid ~ label,.folder-group textarea:focus ~ label,.folder-group textarea:valid ~ label{top:-9px;background:#fff;padding:0 5px;font-weight:400;font-size:12px;line-height:14px;color:#aeaeae}#no-more-folder-credit .folder-form-message{margin:20px 80px;font-size:14px}.folder-form-message{margin:25px auto;font-size:15px;line-height:18px;color:#484848;width:310px}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.folder-form-buttons a span,.folder-form-buttons button span{-webkit-animation:fa-spin .75s infinite linear;animation:fa-spin .75s infinite linear;padding:7px}.wcp-container .folder-tooltip{position:relative}.wcp-container .folder-tooltip::after,.wcp-container .folder-tooltip::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}.wcp-container .folder-tooltip::before{content:'';border:5px solid transparent;z-index:1001}.wcp-container .folder-tooltip::after{content:attr(data-folder-tooltip);font-family:Helvetica,sans-serif;text-align:center;min-width:3em;max-width:21em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1ch 1.5ch;border-radius:.3ch;box-shadow:0 1em 2em -.5em rgba(0,0,0,.35);background:#333;color:#fff;z-index:1000}.wcp-container .folder-tooltip:hover::after,.wcp-container .folder-tooltip:hover::before{display:block;opacity:1}.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip[flow^=up]::after{bottom:calc(100%+5px)}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::after,.wcp-container .folder-tooltip[flow^=up]::before{left:50%;transform:translate(-50%,-.5em)}.folder-order.active .folder-sort-menu{display:block}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.media-toolbar-secondary select{width:30%!important;width:calc(30% - 10px)!important;margin:32px 10px 0 0!important}.media-frame .uploader-inline{z-index:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.selected-items{background:#0073aa;color:#fff;padding:10px 20px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;margin-top:0;cursor:none;font-size:12px;z-index:10001!important}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0);-webkit-transform:rotate(0)}.expand-collapse.all-open span.icon{transform:rotate(180deg);-webkit-transform:rotate(180deg)}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb!important;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px!important;width:100%!important;box-shadow:none!important;outline:0}.folder-search-form span{position:absolute;color:#aeaeae;right:0;top:0;height:32px;line-height:32px;width:32px;text-align:center}.folder-separator{padding:0 10px;height:1px;background:#e9e5e5;margin:0 0 10px 0}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:10051!important}.attachments.ui-sortable.ui-draggable-dragging{z-index:10001!important}#custom-menu.has-filter li.route{display:none!important}#custom-menu.has-filter li.route.has-search{display:block!important}#custom-menu.has-filter h3 span.title-text.has-search-text{font-weight:700}.form-options>ul>li>a:hover{background:#404040;color:#fff}#custom-menu.show-folder-checkbox input.checkbox{display:block;margin:5px 0 0 0}#custom-menu.show-folder-checkbox h3.title>.ui-icon>i,#custom-menu.show-folder-checkbox h3.title>.ui-icon>img{display:none!important}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block}.form-options .form-options{background:transparent;padding:0;box-shadow:none}.attachments-browser .media-toolbar-secondary{width:78%;max-width:inherit}.media-toolbar-primary.search-form{width:20%;max-width:inherit}body *.media-frame.hide-menu .media-frame-menu{display:block}.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:275px}.media-frame-menu.has-folder-menu{width:275px}.media-frame-menu.has-folder-menu .folder-custom-menu{position:relative;border:0;width:100%}.media-frame.mode-select.hide-router .media-frame-title,.media-frame.mode-select.hide-router .media-frame-router,.media-frame.mode-select.hide-router .media-frame-content,.media-frame.mode-select.hide-router .media-frame-toolbar{left:275px}.media-frame.mode-select.hide-router select#media-attachment-taxonomy-filter{display:none}.media-frame.mode-select.hide-router .folder-custom-menu{display:none}html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:0;right:275px}html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-title,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-router,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-content,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-toolbar{left:0;right:275px}html[dir=rtl] .media-frame.hide-menu .media-frame-content,html[dir=rtl] .media-frame.hide-menu .media-frame-router,html[dir=rtl] .media-frame.hide-menu .media-frame-title,html[dir=rtl] .media-frame.hide-menu .media-frame-toolbar{left:0;right:275px}html[dir=rtl] .media-frame .folder-modal .media-frame-content,html[dir=rtl] .folder-modal .media-frame .media-frame-router,html[dir=rtl] .folder-modal .media-frame .media-frame-title,html[dir=rtl] .folder-modal .media-frame .media-frame-toolbar{left:0;right:275px}.sticky-folders>ul>li{position:relative}#vakata-dnd{z-index:10000000!important}
1
+ .folder-custom-menu{width:275px;z-index:10001;position:absolute;height:100%;border-right:solid 1px #ddd;background:#f1f1f1;direction:ltr}.folder-modal .media-frame .media-frame-content,.folder-modal .media-frame .media-frame-router,.folder-modal .media-frame .media-frame-title,.folder-modal .media-frame .media-frame-toolbar{left:275px}.wcp-container{padding:20px 20px 20px 16px}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.media-frame a.add-new-folder{text-decoration:none;display:block;float:right;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}span.folder-loader-ajax{float:right;margin:0;line-height:30px;display:none}.folder-loader-ajax.active{display:inline-block}@-webkit-keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@-webkit-keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}#successAnimationCircle{stroke-dasharray:151px 151px;stroke:#2ce0a7}#successAnimationCheck{stroke-dasharray:36px 36px;stroke:#2ce0a7}#successAnimationResult{fill:#2ce0a7;opacity:0}svg#successAnimation{width:30px;height:34px;padding:0;display:none;float:left}#successAnimation.active{display:inline-block}.folder-loader-ajax img{display:none}#successAnimation.animated{-webkit-animation:1s ease-out 0s 1 both scaleAnimation;animation:1s ease-out 0s 1 both scaleAnimation}#successAnimation.animated #successAnimationCircle{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationCheck{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationResult{-webkit-animation:.3s linear .9s both fadeIn;animation:.3s linear .9s both fadeIn}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.wcp-container ul{list-style:none}.form-options ul{margin:0;padding:0}.form-options>ul>li{display:inline-block;margin:0 2px 0 0;vertical-align:top}.form-options>ul>li.last{margin:0}.form-options>ul>li.last.folder-checkbox{padding:5px 0 0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 5px;color:#000;vertical-align:middle;margin:0 0 5px 0;background:#f1f1f1;border-radius:4px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.media-frame .wcp-hide-show-buttons{display:none}.folder-order{position:relative}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.folder-sort-menu{position:absolute;right:0;width:120px;z-index:101;background:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25);display:none}.folder-sort-menu li{display:block;margin:0;padding:0;background:0 0}.folder-sort-menu li a{display:block;margin:0;padding:3px 5px;background:0 0;color:#848484;text-decoration:none;font-size:14px}span.upgrade-message{padding:0;background:#fff;display:inline-block;font-size:12px;color:#000}span.upgrade-message a.pink,span.upgrade-message span.pink{color:#ff5983;text-decoration:none;font-weight:700}.form-loader{width:100%;height:5px;margin:0 0 10px}.form-loader-count{width:0;height:5px;background:url(../images/form-loader.png);transition:all 2.5s linear;-webkit-transition:all 2s linear;-moz-transition:all 2.5s linear}.top-settings{background:#fff;padding:10px 10px 5px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.header-posts a,.un-categorised-items a{color:#444;padding:7px;display:block;text-decoration:none;font-size:14px;border-radius:4px;line-height:18px}.header-posts a.active-item,.orange-bg>span,.un-categorised-items.active-item,.wcp-container .route.active-item>h3.title{background-color:#fa166b!important;color:#fff}.header-posts a.active-item span.total-count,.un-categorised-items.active-item span.total-count,.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}span.total-count{float:right;font-size:12px;line-height:16px}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px;color:#444}.un-categorised-items.active-item a,.un-categorised-items.active-item a:hover{color:#fff}.un-categorised-items a:hover,.un-categorised-items:hover a{color:#444}.media-frame .folder-custom-menu a:focus{outline:0;box-shadow:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}div#custom-menu{padding:10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}.wcp-container .space{position:relative;list-style-type:none;border:0;margin:0 0 0 20px;padding:0 0 30px 0;width:40px;top:30px;height:100%;z-index:1}.wcp-container .first-space{margin-left:0;top:0;padding:0}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.wcp-container .route .title{position:absolute;border:0;margin:0;padding:0;height:30px;width:200px;text-indent:28px;background:0 0;box-shadow:none;font-size:13px;line-height:26px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;overflow:hidden;font-weight:400}.wcp-container .route span{position:absolute;top:2px;left:0;z-index:10;width:20px;height:18px;text-indent:0;font-size:20px;background:no-repeat;text-align:center}.wcp-container .route span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu input.checkbox{display:none}.wcp-container .route span.title-text{position:relative;top:auto;left:auto;display:inline-block;font-size:16px;line-height:30px;height:30px;width:calc(100% - 100px);overflow:hidden;white-space:nowrap;text-align:left}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-]{font-size:12px}.wcp-container .route .title .folder-sticky-icon,.wcp-container .route .title .move-folder-icon{float:right;position:relative;top:0;left:auto;width:20px;height:30px;line-height:26px;display:none}.wcp-container .route.is-sticky>h3.title .folder-sticky-icon,.wcp-container .route.is-sticky>h3.title .move-folder-icon{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}.header-posts a,.un-categorised-items a,.wcp-container .route span.title-text{font-size:12px}.wcp-container .route span.total-count{position:relative;font-size:10px;float:right;text-align:center;width:auto;display:block;margin:4px 8px 3px 3px;color:#23282d!important;line-height:16px;height:16px}.has-sub-tree>.nav-icon{display:block}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}body:not(.no-hover-css) .wcp-container .route .title:hover{background:rgba(250,22,107,.08);cursor:pointer}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .move-folder-icon,body:not(.no-hover-css) .wcp-container .route .title:hover .move-folder-icon{display:block}body:not(.no-hover-css) .wcp-container .route .title:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}body:not(.no-hover-css) .sticky-folders li a:hover span.update-inline-record,body:not(.no-hover-css) .wcp-container .route h3:hover>span.update-inline-record{width:18px}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .ui-icon .pfolder-folder-close:before,body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-folder-close:before{content:"\e901"!important}.sticky-folders li.is-high a span.star-icon,.wcp-container .route.is-high>h3>span.star-icon{display:block}.dynamic-menu{position:absolute;left:50px;background:#fff;width:170px;padding:0;z-index:101;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25)}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a{text-decoration:none;color:#848484;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap}.dynamic-menu ul>li>a>span,.dynamic-menu ul>li>a>span span{position:relative!important;display:inline-block;vertical-align:middle;margin-right:5px;top:auto!important;width:20px!important;height:20px!important;line-height:14px}#custom-menu .dynamic-menu ul>li>a .sticky-pin{line-height:20px}#custom-menu .dynamic-menu ul>li>a .sticky-pin i{font-size:16px!important}li.active-menu{z-index:2!important}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display:none}.popup-form-content{background:#fff;min-height:100px;width:400px;text-align:center;margin:0 auto;position:absolute;left:0;right:0;top:50%;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-o-transform:translate(0,-50%);-ms-transform:translate(0,-50%);padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#484848}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.folder-group input,.folder-group textarea{background:0 0;font-size:14px;padding:0 0 0 15px;display:block;width:100%;border-radius:4px;border:1px solid #484848;height:34px;line-height:34px;color:#484848;outline:0}.highlight{background-color:#e4f2fd;color:#000}.folder-group .folder-bar{position:relative;display:block;width:320px}.folder-group label{font-size:14px;font-weight:500;position:absolute;pointer-events:none;left:20px;top:10px;-webkit-transition:.3s ease all;transition:.3s ease all;color:#484848}.folder-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-buttons{display:flex}.folder-form-buttons a,.folder-form-buttons button{display:inline-flex;padding:0;text-decoration:none;margin:10px 3px;border-radius:4px;border:solid 1px #1da1f4;line-height:34px;font-weight:700;font-size:14px;box-sizing:border-box;height:36px;cursor:pointer;flex:1;justify-content:center;outline:0;color:#fff}.folder-form-buttons .form-cancel-btn,.folder-form-buttons a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.form-submit-btn,.form-submit-btn:hover{background-color:#3085d6;color:#fff!important;outline:0}.folder-group input:focus~label,.folder-group input:valid~label,.folder-group textarea:focus~label,.folder-group textarea:valid~label{top:-9px;background:#fff;padding:0 5px;font-weight:400;font-size:12px;line-height:14px;color:#aeaeae}#no-more-folder-credit .folder-form-message{margin:20px 80px;font-size:14px}.folder-form-message{margin:25px auto;font-size:15px;line-height:18px;color:#484848;width:310px}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.folder-form-buttons a span,.folder-form-buttons button span{-webkit-animation:fa-spin .75s infinite linear;animation:fa-spin .75s infinite linear;padding:7px}.wcp-container .folder-tooltip{position:relative}.wcp-container .folder-tooltip::after,.wcp-container .folder-tooltip::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}.wcp-container .folder-tooltip::before{content:'';border:5px solid transparent;z-index:1001}.wcp-container .folder-tooltip::after{content:attr(data-folder-tooltip);font-family:Helvetica,sans-serif;text-align:center;min-width:3em;max-width:21em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1ch 1.5ch;border-radius:.3ch;box-shadow:0 1em 2em -.5em rgba(0,0,0,.35);background:#333;color:#fff;z-index:1000}.wcp-container .folder-tooltip:hover::after,.wcp-container .folder-tooltip:hover::before{display:block;opacity:1}.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip[flow^=up]::after{bottom:calc(100% + 5px)}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::after,.wcp-container .folder-tooltip[flow^=up]::before{left:50%;transform:translate(-50%,-.5em)}.folder-order.active .folder-sort-menu{display:block}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.media-toolbar-secondary select{width:30%!important;width:calc(30% - 10px)!important;margin:32px 10px 0 0!important}.media-frame .uploader-inline{z-index:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.selected-items{background:#0073aa;color:#fff;padding:10px 20px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;margin-top:0;cursor:none;font-size:12px;z-index:10001!important}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0);-webkit-transform:rotate(0)}.expand-collapse.all-open span.icon{transform:rotate(180deg);-webkit-transform:rotate(180deg)}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb!important;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px!important;width:100%!important;box-shadow:none!important;outline:0}.folder-search-form span{position:absolute;color:#aeaeae;right:0;top:0;height:32px;line-height:32px;width:32px;text-align:center}.folder-separator{padding:0 10px;height:1px;background:#e9e5e5;margin:0 0 10px 0}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:10051!important}.attachments.ui-sortable.ui-draggable-dragging{z-index:10001!important}#custom-menu.has-filter li.route{display:none!important}#custom-menu.has-filter li.route.has-search{display:block!important}#custom-menu.has-filter h3 span.title-text.has-search-text{font-weight:700}.form-options>ul>li>a:hover{background:#404040;color:#fff}#custom-menu.show-folder-checkbox input.checkbox{display:block;margin:5px 0 0 0}#custom-menu.show-folder-checkbox h3.title>.ui-icon>i,#custom-menu.show-folder-checkbox h3.title>.ui-icon>img{display:none!important}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block}.form-options .form-options{background:0 0;padding:0;box-shadow:none}.attachments-browser .media-toolbar-secondary{width:78%;max-width:inherit}.media-toolbar-primary.search-form{width:20%;max-width:inherit}body .media-frame.hide-menu .media-frame-menu{display:block}.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:275px}.media-frame-menu.has-folder-menu{width:275px}.media-frame-menu.has-folder-menu .folder-custom-menu{position:relative;border:none;width:100%}.media-frame.mode-select.hide-router .media-frame-content,.media-frame.mode-select.hide-router .media-frame-router,.media-frame.mode-select.hide-router .media-frame-title,.media-frame.mode-select.hide-router .media-frame-toolbar{left:275px}.media-frame.mode-select.hide-router select#media-attachment-taxonomy-filter{display:none}.media-frame.mode-select.hide-router .folder-custom-menu{display:none}html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:0;right:275px}html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-content,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-router,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-title,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-toolbar{left:0;right:275px}html[dir=rtl] .media-frame.hide-menu .media-frame-content,html[dir=rtl] .media-frame.hide-menu .media-frame-router,html[dir=rtl] .media-frame.hide-menu .media-frame-title,html[dir=rtl] .media-frame.hide-menu .media-frame-toolbar{left:0;right:275px}html[dir=rtl] .folder-modal .media-frame .media-frame-router,html[dir=rtl] .folder-modal .media-frame .media-frame-title,html[dir=rtl] .folder-modal .media-frame .media-frame-toolbar,html[dir=rtl] .media-frame .folder-modal .media-frame-content{left:0;right:275px}.sticky-folders>ul>li{position:relative}#vakata-dnd{z-index:10000000!important}.add-folder-note{font-size:13px}
assets/css/replace-media.css ADDED
@@ -0,0 +1 @@
 
1
+ .replace-media-page{padding:10px;background:#fff;margin:10px 0 0}.replace-media-page p{padding:0 0 10px 0;margin:0}.preview-box{width:250px;height:250px;background:#f1f1f1;text-align:center;position:relative}.current-image-box,.new-image-box{float:left;margin:0 25px 0 0;border:1px solid #ddd}.preview-box span.dashicons{font-size:80px;width:auto;height:auto;line-height:250px}.preview-box span.image-size{font-size:12px;line-height:25px;opacity:.7;position:absolute;color:#ccc;left:48%;top:50%;transform:translate(-50%,-50%);background-color:#333;padding:5px 10px}.preview-box img{width:100%;height:auto;max-height:250px;object-fit:cover}.clearfix{clear:both}.file-option,.file-size{text-align:center;padding:5px;height:20px;line-height:20px}.replace-message{display:none;background:#fff;padding:8px;margin:10px 0}.replace-message.active{display:block}.replace-message.warning{border-left:4px solid #ffb900}.replace-message.error{border-left:4px solid red}.replace-message.success{border-left:4px solid green}.upload-area .drag-and-drop-title{text-align:center;font-weight:400;width:250px;height:250px;position:relative;cursor:pointer}.upload-area .drag-and-drop-title span{position:absolute;left:48%;top:50%;transform:translate(-50%,-50%);padding:5px 10px;width:140px}#media_file{display:none}.replacement-options{margin:20px 0 0;border-top:solid 1px #ddd}.replace-media-buttons{padding:14px 0 0}.replace-media-buttons button.button{margin:0 5px 0 0}
assets/css/settings.css CHANGED
@@ -1 +1,954 @@
1
- @import url(https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap);span.upgrade-message{padding:5px 10px;background:#fff;display:inline-block;font-size:14px;color:#000}a.pink,span.pink{color:#ff5983;text-decoration:none;font-weight:700}.form-table{margin:0}#setting-form{font-family:Roboto,sans-serif}.form-table th{width:220px;font-weight:400;vertical-align:middle}.form-table th.default-folder{width:100px}.premio-help{text-align:center}.premio-help a{display:block;float:right}.premio-help a img{width:auto;height:auto}.hide-option{display:none}.accordion{max-width:1024px;box-shadow:0 4px 21px rgba(7,16,28,.1);border-radius:4px;margin:0 0 20px 0}.accordion-header{background:#ebf1f4;padding:10px 15px;font-size:16px;cursor:pointer;border-radius:4px;color:#484848;font-weight:500}.accordion-header.active{border-radius:0;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px}.accordion-header.active span{transform:rotate(180deg)}select.hide-show-option{width:170px}.accordion-content{background:#fff;padding:15px;-webkit-border-bottom-right-radius:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-bottomleft:10px;border-bottom-right-radius:10px;border-bottom-left-radius:10px;display:none}.sp-replacer.sp-light{padding:0!important;margin:0!important;border:solid 2px #fff!important;box-shadow:0 3px 7px rgba(149,149,150,.3);border-radius:4px}.sp-dd{display:none!important}.sp-preview{width:18px!important;height:18px!important;margin:0!important;padding:0!important;border:none!important}.form-table select{width:180px}.accordion-header span{float:right;width:20px;height:20px;line-height:22px;font-size:14px;background:#fff;border-radius:10px}.accordion-header span:hover{background:#1da1f4;color:#fff}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.add-new-folder,button.organize-button{text-decoration:none;display:block;float:right;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder span{display:block;float:left;line-height:26px;font-size:14px;margin-right:5px}.add-new-folder span.folder-icon-create_new_folder{font-size:20px}.form-options{background:#fff;padding:10px 10px 0 10px;margin:0 0;box-shadow:0 4px 21px rgba(7,16,28,.1);border-radius:4px}.shadow-box{padding:10px;box-shadow:0 4px 21px rgba(7,16,28,.1);margin:20px 0 0 0}.accordion .separator{border-bottom:solid 1px #e9e5e5}.form-options ul{margin:0;padding:0}.form-options li{display:inline-block;margin:0;vertical-align:top}.form-options li a{display:inline-block;text-decoration:none;padding:5px 12px;color:#484848;vertical-align:middle;margin:0 0 10px 0;background:#f1f1f1;border-radius:4px;font-size:11px;line-height:20px}.form-options span.icon{font-size:14px;display:inline-block;vertical-align:top;line-height:20px;color:#a4c0d2}.form-options li.last{margin:0}.form-options li.last a{padding:5px 3px 3px;width:24px;text-align:center;height:22px;line-height:20px}.form-options li.last{font-size:28px;line-height:22px}.header-posts a,.un-categorised-items a{color:#444;padding:7px;border-radius:3px;display:block;text-decoration:none;font-size:14px;line-height:18px}.header-posts a.active-item,.un-categorised-items.active-item{background:#008ec2;color:#fff}span.total-count{float:right;font-size:12px!important;line-height:16px;border-radius:2px}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}.media-buttons{padding:10px 0;background:#fff;text-align:center}.media-buttons button,.media-buttons select{width:48%;display:inline-block;margin:0 2% 0 0}.un-categorised-items{margin:0 0 10px 0}.header-posts{margin:10px 0 0 0}.add-new-folder:focus,.add-new-folder:hover,.organize-button:focus,.organize-button:hover{color:#fff}.add-new-folder:hover:after,.organize-button:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.folder-list li a{color:#333;text-decoration:none;margin:0 0 1px 0;border-radius:3px;font-size:20px;display:block;line-height:18px}.folder-list li a i{display:inline-block;vertical-align:middle;font-size:14px}.folder-list li a span{font-size:16px;display:inline-block;vertical-align:middle}.preview-inner-box{padding:15px;width:300px;float:left;background:#fff;border:1px solid #dbdbdb;box-sizing:border-box;border-radius:4px}.accordion-left{width:calc(100% - 260px);float:left;max-width:550px}.accordion-right{width:300px;float:right}.preview-text{font-size:20px;padding:0 0 10px}.preview-text-info{padding:10px 0 0;font-size:12px;line-height:12px}.media-select option{color:#000}.media-select option:first-child{font-weight:700}.folder-popup{position:fixed;width:100%;height:100%;top:0;left:0;z-index:100001;background:rgba(0,0,0,.75)}.folder-popup-box{padding:0;width:600px;max-width:100%;margin:auto;top:50%;position:absolute;left:0;right:0;border-radius:5px;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);text-align:center;background:#fcfcfc}.folder-popup-header{padding:15px;font-size:20px;border-bottom:solid 1px #e6e6e6}.folder-popup-content{background:#fff;padding:15px;font-size:14px;line-height:20px}.folder-popup-content iframe{margin:30px 0}.folder-popup-footer{padding:15px;border-top:solid 1px #e6e6e6}.folder-popup-footer button{border:none;padding:10px 20px;border-radius:4px;background:#00c478;color:#fff}.close-folder-popup{margin:0;padding:0;background:0 0;border:none;float:right;background:#000;border-radius:50%;color:#fff;text-align:center;width:24px;height:24px}.close-folder-popup span{line-height:24px}.wrap h1{margin:0 0 15px 0}.upgrade-btn{background:#fff;border:1px solid #1da1f4;box-sizing:border-box;border-radius:4px;height:34px;line-height:30px;padding:0 25px;display:inline-block;text-decoration:none;font-weight:700;color:#1da1f4}.upgrade-btn:hover{background:#1da1f4;color:#fff}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.custom-checkbox span{background:#fff;border:1px solid #dbdbdb;box-sizing:border-box;border-radius:4px;margin:0 auto;height:18px;width:18px;display:inline-block;vertical-align:middle;position:relative;color:#fff}.custom-checkbox input:checked+span{background:#1da1f4}.custom-checkbox input:checked+span:after{content:"\f147";font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;text-decoration:inherit;font-size:14px}.custom-checkbox{display:inline-block}.form-table td.no-padding{padding:15px 0}.custom-checkbox+label{padding:0 0 0 5px}ul.folder-list li{margin:0;line-height:32px;padding:0}ul.folder-list li a{padding:5px 10px}.un-categorised-items a:hover,ul.folder-list li a:hover{background:rgba(250,22,107,.08);border-radius:4px}.clear{clear:both}.form-options li .custom-checkbox{margin:5px 0 0 0}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}.premio-help-btn{width:180px;text-align:center;padding:15px;border:1px solid #ebf1f4;box-sizing:border-box;border-radius:4px;float:right}.need-help{font-style:normal;font-weight:500;font-size:15px;line-height:18px;color:#484848}.visit-our{font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;color:#484848}.knowledge-base{font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;color:#1da1f4;text-decoration:underline}.form-table td.default-folder{width:100px}.accordion-content.no-bp{padding-bottom:0!important}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url(https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap);
2
+
3
+ span.upgrade-message {
4
+ padding: 5px 10px;
5
+ background: #fff;
6
+ display: inline-block;
7
+ font-size: 14px;
8
+ color: #000
9
+ }
10
+
11
+ a.pink, span.pink {
12
+ color: #ff5983;
13
+ text-decoration: none;
14
+ font-weight: 700
15
+ }
16
+
17
+ .form-table {
18
+ margin: 0
19
+ }
20
+
21
+ #setting-form {
22
+ font-family: Roboto, sans-serif
23
+ }
24
+
25
+ .form-table th {
26
+ width: 220px;
27
+ font-weight: 400;
28
+ vertical-align: middle
29
+ }
30
+
31
+ .form-table th.default-folder {
32
+ width: 100px
33
+ }
34
+
35
+ .premio-help {
36
+ text-align: center
37
+ }
38
+
39
+ .premio-help a {
40
+ display: block;
41
+ float: right
42
+ }
43
+
44
+ .premio-help a img {
45
+ width: auto;
46
+ height: auto
47
+ }
48
+
49
+ .hide-option {
50
+ display: none
51
+ }
52
+
53
+ .accordion {
54
+ max-width: 1024px;
55
+ box-shadow: 0 4px 21px rgba(7, 16, 28, .1);
56
+ border-radius: 4px;
57
+ margin: 0 0 20px 0
58
+ }
59
+
60
+ .accordion-header {
61
+ background: #ebf1f4;
62
+ padding: 10px 15px;
63
+ font-size: 16px;
64
+ cursor: pointer;
65
+ border-radius: 4px;
66
+ color: #484848;
67
+ font-weight: 500
68
+ }
69
+
70
+ .accordion-header.active {
71
+ border-radius: 0;
72
+ -webkit-border-top-left-radius: 4px;
73
+ -webkit-border-top-right-radius: 4px;
74
+ -moz-border-radius-topleft: 4px;
75
+ -moz-border-radius-topright: 4px;
76
+ border-top-left-radius: 4px;
77
+ border-top-right-radius: 4px
78
+ }
79
+
80
+ .accordion-header.active span {
81
+ transform: rotate(180deg)
82
+ }
83
+
84
+ select.hide-show-option {
85
+ width: 170px
86
+ }
87
+
88
+ .sp-replacer.sp-light {
89
+ padding: 0 !important;
90
+ margin: 0 !important;
91
+ border: solid 2px #fff !important;
92
+ box-shadow: 0 3px 7px rgba(149, 149, 150, .3);
93
+ border-radius: 4px
94
+ }
95
+
96
+ .sp-dd {
97
+ display: none !important
98
+ }
99
+
100
+ .sp-preview {
101
+ width: 18px !important;
102
+ height: 18px !important;
103
+ margin: 0 !important;
104
+ padding: 0 !important;
105
+ border: none !important
106
+ }
107
+
108
+ .form-table select {
109
+ width: 180px
110
+ }
111
+
112
+ .accordion-header span {
113
+ float: right;
114
+ width: 20px;
115
+ height: 20px;
116
+ line-height: 22px;
117
+ font-size: 14px;
118
+ background: #fff;
119
+ border-radius: 10px
120
+ }
121
+
122
+ .accordion-header span:hover {
123
+ background: #1da1f4;
124
+ color: #fff
125
+ }
126
+
127
+ .form-title {
128
+ font-size: 23px;
129
+ font-weight: 400;
130
+ margin: 0;
131
+ padding: 0 0 10px 0;
132
+ line-height: 29px;
133
+ min-height: 36px
134
+ }
135
+
136
+ .add-new-folder, button.organize-button {
137
+ text-decoration: none;
138
+ display: block;
139
+ float: right;
140
+ font-size: 14px;
141
+ padding: 4px 10px 4px 4px;
142
+ background: #f51366;
143
+ color: #fff;
144
+ border: solid 1px #f51366;
145
+ border-radius: 4px;
146
+ line-height: 24px;
147
+ position: relative
148
+ }
149
+
150
+ .add-new-folder span {
151
+ display: block;
152
+ float: left;
153
+ line-height: 26px;
154
+ font-size: 14px;
155
+ margin-right: 5px
156
+ }
157
+
158
+ .add-new-folder span.folder-icon-create_new_folder {
159
+ font-size: 20px
160
+ }
161
+
162
+ .form-options {
163
+ background: #fff;
164
+ padding: 10px 10px 0 10px;
165
+ margin: 0 0;
166
+ box-shadow: 0 4px 21px rgba(7, 16, 28, .1);
167
+ border-radius: 4px
168
+ }
169
+
170
+ .shadow-box {
171
+ padding: 10px;
172
+ box-shadow: 0 4px 21px rgba(7, 16, 28, .1);
173
+ margin: 20px 0 0 0
174
+ }
175
+
176
+ .accordion .separator {
177
+ border-bottom: solid 1px #e9e5e5
178
+ }
179
+
180
+ .form-options ul {
181
+ margin: 0;
182
+ padding: 0
183
+ }
184
+
185
+ .form-options li {
186
+ display: inline-block;
187
+ margin: 0;
188
+ vertical-align: top
189
+ }
190
+
191
+ .form-options li a {
192
+ display: inline-block;
193
+ text-decoration: none;
194
+ padding: 5px 12px;
195
+ color: #484848;
196
+ vertical-align: middle;
197
+ margin: 0 0 10px 0;
198
+ background: #f1f1f1;
199
+ border-radius: 4px;
200
+ font-size: 11px;
201
+ line-height: 20px
202
+ }
203
+
204
+ .form-options span.icon {
205
+ font-size: 14px;
206
+ display: inline-block;
207
+ vertical-align: top;
208
+ line-height: 20px;
209
+ color: #a4c0d2
210
+ }
211
+
212
+ .form-options li.last {
213
+ margin: 0
214
+ }
215
+
216
+ .form-options li.last a {
217
+ padding: 5px 3px 3px;
218
+ width: 24px;
219
+ text-align: center;
220
+ height: 22px;
221
+ line-height: 20px
222
+ }
223
+
224
+ .form-options li.last {
225
+ font-size: 28px;
226
+ line-height: 22px
227
+ }
228
+
229
+ .header-posts a, .un-categorised-items a {
230
+ color: #444;
231
+ padding: 7px;
232
+ border-radius: 3px;
233
+ display: block;
234
+ text-decoration: none;
235
+ font-size: 14px;
236
+ line-height: 18px
237
+ }
238
+
239
+ .header-posts a.active-item, .un-categorised-items.active-item {
240
+ background: #008ec2;
241
+ color: #fff
242
+ }
243
+
244
+ span.total-count {
245
+ float: right;
246
+ font-size: 12px !important;
247
+ line-height: 16px;
248
+ border-radius: 2px
249
+ }
250
+
251
+ .header-posts a.active-item span.total-count, .un-categorised-items.active-item a span {
252
+ color: #fff !important
253
+ }
254
+
255
+ .media-buttons {
256
+ padding: 10px 0;
257
+ background: #fff;
258
+ text-align: center
259
+ }
260
+
261
+ .media-buttons button, .media-buttons select {
262
+ width: 48%;
263
+ display: inline-block;
264
+ margin: 0 2% 0 0
265
+ }
266
+
267
+ .un-categorised-items {
268
+ margin: 0 0 10px 0
269
+ }
270
+
271
+ .header-posts {
272
+ margin: 10px 0 0 0
273
+ }
274
+
275
+ .add-new-folder:focus, .add-new-folder:hover, .organize-button:focus, .organize-button:hover {
276
+ color: #fff
277
+ }
278
+
279
+ .add-new-folder:hover:after, .organize-button:hover:after {
280
+ content: "";
281
+ width: 100%;
282
+ height: 100%;
283
+ background: rgba(0, 0, 0, .1);
284
+ position: absolute;
285
+ top: 0;
286
+ left: 0
287
+ }
288
+
289
+ .folder-list li a {
290
+ color: #333;
291
+ text-decoration: none;
292
+ margin: 0 0 1px 0;
293
+ border-radius: 3px;
294
+ font-size: 20px;
295
+ display: block;
296
+ line-height: 18px
297
+ }
298
+
299
+ .folder-list li a i {
300
+ display: inline-block;
301
+ vertical-align: middle;
302
+ font-size: 14px
303
+ }
304
+
305
+ .folder-list li a span {
306
+ font-size: 16px;
307
+ display: inline-block;
308
+ vertical-align: middle
309
+ }
310
+
311
+ .preview-inner-box {
312
+ padding: 15px;
313
+ width: 300px;
314
+ max-width: 100%;
315
+ float: left;
316
+ background: #fff;
317
+ border: 1px solid #dbdbdb;
318
+ box-sizing: border-box;
319
+ border-radius: 4px
320
+ }
321
+
322
+ .accordion-left {
323
+ width: calc(100% - 305px);
324
+ float: left;
325
+ max-width: 550px
326
+ }
327
+
328
+ .accordion-right {
329
+ width: 300px;
330
+ float: right
331
+ }
332
+
333
+ .preview-text {
334
+ font-size: 20px;
335
+ padding: 0 0 10px
336
+ }
337
+
338
+ .preview-text-info {
339
+ padding: 10px 0 0;
340
+ font-size: 12px;
341
+ line-height: 12px
342
+ }
343
+
344
+ .media-select option {
345
+ color: #000
346
+ }
347
+
348
+ .media-select option:first-child {
349
+ font-weight: 700
350
+ }
351
+
352
+ .folder-popup {
353
+ position: fixed;
354
+ width: 100%;
355
+ height: 100%;
356
+ top: 0;
357
+ left: 0;
358
+ z-index: 100001;
359
+ background: rgba(0, 0, 0, .75)
360
+ }
361
+
362
+ .folder-popup-box {
363
+ padding: 0;
364
+ width: 600px;
365
+ max-width: 100%;
366
+ margin: auto;
367
+ top: 50%;
368
+ position: absolute;
369
+ left: 0;
370
+ right: 0;
371
+ border-radius: 5px;
372
+ transform: translate(0, -50%);
373
+ -webkit-transform: translate(0, -50%);
374
+ -moz-transform: translate(0, -50%);
375
+ text-align: center;
376
+ background: #fcfcfc
377
+ }
378
+
379
+ .folder-popup-header {
380
+ padding: 15px;
381
+ font-size: 20px;
382
+ border-bottom: solid 1px #e6e6e6
383
+ }
384
+
385
+ .folder-popup-content {
386
+ background: #fff;
387
+ padding: 15px;
388
+ font-size: 14px;
389
+ line-height: 20px
390
+ }
391
+
392
+ .folder-popup-content iframe {
393
+ margin: 30px 0
394
+ }
395
+
396
+ .folder-popup-footer {
397
+ padding: 15px;
398
+ border-top: solid 1px #e6e6e6
399
+ }
400
+
401
+ .folder-popup-footer button {
402
+ border: none;
403
+ padding: 10px 20px;
404
+ border-radius: 4px;
405
+ background: #00c478;
406
+ color: #fff
407
+ }
408
+
409
+ .close-folder-popup {
410
+ margin: 0;
411
+ padding: 0;
412
+ background: 0 0;
413
+ border: none;
414
+ float: right;
415
+ background: #000;
416
+ border-radius: 50%;
417
+ color: #fff;
418
+ text-align: center;
419
+ width: 24px;
420
+ height: 24px
421
+ }
422
+
423
+ .close-folder-popup span {
424
+ line-height: 24px
425
+ }
426
+
427
+ .wrap h1 {
428
+ margin: 0 0 15px 0
429
+ }
430
+
431
+ .upgrade-btn {
432
+ background: #fff;
433
+ border: 1px solid #1da1f4;
434
+ box-sizing: border-box;
435
+ border-radius: 4px;
436
+ height: 34px;
437
+ line-height: 34px;
438
+ padding: 0 25px;
439
+ display: inline-block;
440
+ text-decoration: none;
441
+ font-weight: 700;
442
+ color: #1da1f4
443
+ }
444
+
445
+ .upgrade-btn:hover {
446
+ background: #1da1f4;
447
+ color: #fff
448
+ }
449
+
450
+ .sr-only {
451
+ position: absolute;
452
+ width: 1px;
453
+ height: 1px;
454
+ padding: 0;
455
+ margin: -1px;
456
+ overflow: hidden;
457
+ clip: rect(0, 0, 0, 0);
458
+ white-space: nowrap;
459
+ border: 0
460
+ }
461
+
462
+ .custom-checkbox span {
463
+ background: #fff;
464
+ border: 1px solid #dbdbdb;
465
+ box-sizing: border-box;
466
+ border-radius: 4px;
467
+ margin: 0 auto;
468
+ height: 18px;
469
+ width: 18px;
470
+ display: inline-block;
471
+ vertical-align: middle;
472
+ position: relative;
473
+ color: #fff
474
+ }
475
+
476
+ .custom-checkbox input:checked + span {
477
+ background: #1da1f4
478
+ }
479
+
480
+ .custom-checkbox input:checked + span:after {
481
+ content: "\f147";
482
+ font-family: dashicons;
483
+ display: inline-block;
484
+ line-height: 1;
485
+ font-weight: 400;
486
+ font-style: normal;
487
+ text-decoration: inherit;
488
+ font-size: 14px
489
+ }
490
+
491
+ .custom-checkbox {
492
+ display: inline-block
493
+ }
494
+
495
+ .form-table td.no-padding {
496
+ padding: 0
497
+ }
498
+
499
+ .custom-checkbox + label {
500
+ padding: 0 0 0 5px
501
+ }
502
+
503
+ ul.folder-list li {
504
+ margin: 0;
505
+ line-height: 32px;
506
+ padding: 0
507
+ }
508
+
509
+ ul.folder-list li a {
510
+ padding: 5px 10px
511
+ }
512
+
513
+ .un-categorised-items a:hover, ul.folder-list li a:hover {
514
+ background: rgba(250, 22, 107, .08);
515
+ border-radius: 4px
516
+ }
517
+
518
+ .clear {
519
+ clear: both
520
+ }
521
+
522
+ .form-options li .custom-checkbox {
523
+ margin: 5px 0 0 0
524
+ }
525
+
526
+ span.create_new_folder {
527
+ width: 26px;
528
+ height: 26px;
529
+ line-height: 26px;
530
+ font-size: 14px;
531
+ background: rgba(255, 255, 255, .4);
532
+ backdrop-filter: blur(16px);
533
+ border-radius: 4px;
534
+ text-align: center;
535
+ margin: 0 15px 0 0
536
+ }
537
+
538
+ .premio-help-btn {
539
+ width: 180px;
540
+ text-align: center;
541
+ padding: 15px;
542
+ border: 1px solid #ebf1f4;
543
+ box-sizing: border-box;
544
+ border-radius: 4px;
545
+ float: right
546
+ }
547
+
548
+ .need-help {
549
+ font-style: normal;
550
+ font-weight: 500;
551
+ font-size: 15px;
552
+ line-height: 18px;
553
+ color: #484848
554
+ }
555
+
556
+ .visit-our {
557
+ font-style: normal;
558
+ font-weight: 400;
559
+ font-size: 14px;
560
+ line-height: 16px;
561
+ text-align: center;
562
+ color: #484848
563
+ }
564
+
565
+ .knowledge-base {
566
+ font-style: normal;
567
+ font-weight: 400;
568
+ font-size: 14px;
569
+ line-height: 16px;
570
+ text-align: center;
571
+ color: #1da1f4;
572
+ text-decoration: underline
573
+ }
574
+
575
+ .form-table td.default-folder {
576
+ width: 100px
577
+ }
578
+
579
+ .accordion-content.no-bp {
580
+ padding-bottom: 0 !important
581
+ }
582
+
583
+ .folders-tabs {
584
+ background: #fff;
585
+ max-width: 1024px;
586
+ box-shadow: 0 4px 21px rgba(7, 16, 28, .1);
587
+ border-radius: 4px;
588
+ margin: 0 0 20px 0
589
+ }
590
+
591
+ .folder-tab-menu {
592
+ background: #ebf1f4;
593
+ padding: 5px 15px 0;
594
+ font-size: 16px;
595
+ cursor: pointer;
596
+ color: #484848;
597
+ font-weight: 500;
598
+ -webkit-border-top-left-radius: 4px;
599
+ -webkit-border-top-right-radius: 4px;
600
+ -moz-border-radius-topleft: 4px;
601
+ -moz-border-radius-topright: 4px;
602
+ border-top-left-radius: 4px;
603
+ border-top-right-radius: 4px
604
+ }
605
+
606
+ .folder-tab-menu ul {
607
+ margin: 0;
608
+ padding: 0
609
+ }
610
+
611
+ .folder-tab-menu ul li {
612
+ display: inline-block;
613
+ margin: 0 1px 0 0
614
+ }
615
+
616
+ .folder-tab-menu ul li a {
617
+ display: inline-block;
618
+ padding: 10px 15px;
619
+ font-family: Roboto, sans-serif;
620
+ text-decoration: none;
621
+ font-size: 16px;
622
+ color: #484848;
623
+ -webkit-border-top-left-radius: 4px;
624
+ -webkit-border-top-right-radius: 4px;
625
+ -moz-border-radius-topleft: 4px;
626
+ -moz-border-radius-topright: 4px;
627
+ border-top-left-radius: 4px;
628
+ border-top-right-radius: 4px;
629
+ outline: 0;
630
+ transition: all .2s ease-in-out
631
+ }
632
+
633
+ .folder-tab-menu ul li a.active, .folder-tab-menu ul li a:focus, .folder-tab-menu ul li a:hover {
634
+ background: #fff;
635
+ box-shadow: none;
636
+ color: #000
637
+ }
638
+
639
+ .folder-tab-content {
640
+ padding: 15px
641
+ }
642
+
643
+ .folder-tab-content .tab-content {
644
+ display: none;
645
+ min-height: 20vh
646
+ }
647
+
648
+ .folder-tab-content .tab-content.active {
649
+ display: block
650
+ }
651
+
652
+ p.submit {
653
+ margin: 0;
654
+ padding: 0
655
+ }
656
+
657
+ .no-plugin-message p {
658
+ font-size: 14px;
659
+ margin: 0;
660
+ padding: 0
661
+ }
662
+
663
+ .folder-popup-form {
664
+ position: fixed;
665
+ width: 100%;
666
+ height: 100%;
667
+ background: rgba(0, 0, 0, .5);
668
+ top: 0;
669
+ left: 0;
670
+ z-index: 10001;
671
+ display: none;
672
+ font-family: Roboto, sans-serif
673
+ }
674
+
675
+ .popup-form-content {
676
+ background: #fff;
677
+ min-height: 100px;
678
+ width: 400px;
679
+ text-align: center;
680
+ margin: 0 auto;
681
+ position: absolute;
682
+ left: 0;
683
+ right: 0;
684
+ top: 50%;
685
+ transform: translate(0, -50%);
686
+ -webkit-transform: translate(0, -50%);
687
+ -moz-transform: translate(0, -50%);
688
+ -o-transform: translate(0, -50%);
689
+ -ms-transform: translate(0, -50%);
690
+ padding: 20px;
691
+ -webkit-border-radius: 4px;
692
+ -moz-border-radius: 4px;
693
+ border-radius: 4px;
694
+ color: #484848;
695
+ max-width: 80%
696
+ }
697
+
698
+ .add-update-folder-title {
699
+ display: block;
700
+ position: relative;
701
+ max-width: 100%;
702
+ margin: 0 0 .4em;
703
+ padding: 0 20px;
704
+ color: #595959;
705
+ text-align: center;
706
+ text-transform: none;
707
+ word-wrap: break-word;
708
+ font-weight: 700;
709
+ font-size: 22px;
710
+ line-height: 26px
711
+ }
712
+
713
+ .add-folder-note {
714
+ padding: 10px 0 30px;
715
+ min-height: 35px
716
+ }
717
+
718
+ .folder-form-errors {
719
+ margin: 0 0 10px 0;
720
+ padding: 8px 0;
721
+ background: #ffe4e4;
722
+ color: #a20000;
723
+ display: none
724
+ }
725
+
726
+ .folder-form-buttons {
727
+ display: flex
728
+ }
729
+
730
+ .folder-form-buttons a, .folder-form-buttons button {
731
+ display: inline-flex;
732
+ padding: 0;
733
+ text-decoration: none;
734
+ margin: 0 3px;
735
+ border-radius: 4px;
736
+ border: solid 1px #1da1f4;
737
+ line-height: 34px;
738
+ font-weight: 700;
739
+ font-size: 14px;
740
+ box-sizing: border-box;
741
+ height: 36px;
742
+ cursor: pointer;
743
+ flex: 1;
744
+ justify-content: center;
745
+ outline: 0;
746
+ box-shadow: none
747
+ }
748
+
749
+ .form-cancel-btn, a.form-cancel-btn:hover {
750
+ background-color: #fff;
751
+ color: #3085d6;
752
+ outline: 0
753
+ }
754
+
755
+ .form-submit-btn {
756
+ background-color: #3085d6;
757
+ color: #fff;
758
+ outline: 0
759
+ }
760
+
761
+ .import-folder-table table {
762
+ border-collapse: collapse;
763
+ border: solid 1px silver
764
+ }
765
+
766
+ .import-folder-table td, .import-folder-table th {
767
+ border: solid 1px silver;
768
+ padding: 10px 15px;
769
+ text-align: left;
770
+ font-size: 14px;
771
+ vertical-align: top
772
+ }
773
+
774
+ .import-folder-table th {
775
+ width: 220px
776
+ }
777
+
778
+ #import-third-party-plugin-data .import-folder-table th {
779
+ width: 120px
780
+ }
781
+
782
+ #import-third-party-plugin-data .import-folder-table td span.import-message {
783
+ display: inline-block;
784
+ margin: 0 0 0 5px;
785
+ line-height: 30px
786
+ }
787
+
788
+ #import-third-party-plugin-data .popup-form-content {
789
+ width: 430px
790
+ }
791
+
792
+ .import-folder-table td span.import-message {
793
+ display: block;
794
+ margin: 0 0 5px 0
795
+ }
796
+
797
+ .import-folder-table td button.button {
798
+ margin: 0 5px 0 0
799
+ }
800
+
801
+ .import-folder-table td button.button.remove-folder-data {
802
+ background: 0 0;
803
+ border-color: transparent
804
+ }
805
+
806
+ .import-folder-table td span.spinner {
807
+ display: none
808
+ }
809
+
810
+ .import-folder-table td span.spinner.active {
811
+ display: inline-block;
812
+ visibility: visible;
813
+ margin-right: 0
814
+ }
815
+
816
+ .import-folder-table td span.import-message.success-import {
817
+ background: #c6ffc6;
818
+ padding: 10px;
819
+ color: green;
820
+ margin: 0 0 10px 0
821
+ }
822
+
823
+ .import-folder-table td span.import-message.error-import {
824
+ background: #ffeded;
825
+ padding: 10px;
826
+ color: red;
827
+ margin: 0 0 10px 0
828
+ }
829
+
830
+ .import-folder-title, .import-plugin-title, .remove-folder-title {
831
+ font-size: 16px;
832
+ font-weight: 700;
833
+ padding: 0 0 15px 0
834
+ }
835
+
836
+ .import-folder-note, .remove-folder-note {
837
+ min-height: 50px;
838
+ padding: 0 0 20px 0
839
+ }
840
+
841
+ button#remove-folder-button.delete-folder-plugin {
842
+ color: #fff;
843
+ background: #ca0000;
844
+ border-color: #ca0000
845
+ }
846
+
847
+ .popup-content {
848
+ position: relative
849
+ }
850
+
851
+ .close-popup-button {
852
+ position: absolute;
853
+ right: -10px;
854
+ top: -2px;
855
+ width: 20px;
856
+ height: 20px
857
+ }
858
+
859
+ .close-popup-button a {
860
+ display: block;
861
+ position: relative;
862
+ width: 20px;
863
+ height: 20px;
864
+ color: #333;
865
+ padding: 2px;
866
+ box-sizing: border-box
867
+ }
868
+
869
+ .close-popup-button a:hover span {
870
+ transform: rotate(180deg)
871
+ }
872
+
873
+ .close-popup-button a span {
874
+ display: block;
875
+ position: relative;
876
+ width: 16px;
877
+ height: 16px;
878
+ transition: all .2s linear
879
+ }
880
+
881
+ .close-popup-button a span:after, .close-popup-button a span:before {
882
+ content: "";
883
+ position: absolute;
884
+ width: 12px;
885
+ height: 2px;
886
+ background-color: #333;
887
+ display: block;
888
+ border-radius: 2px;
889
+ transform: rotate(45deg);
890
+ top: 7px;
891
+ left: 2px
892
+ }
893
+
894
+ .close-popup-button a span:after {
895
+ transform: rotate(-45deg)
896
+ }
897
+
898
+ .import-plugin-note {
899
+ padding: 0 0 20px 0
900
+ }
901
+
902
+ .import-folder-table table {
903
+ width: 100%;
904
+ margin: 0 0 20px 0
905
+ }
906
+
907
+ .import-plugin-footer {
908
+ padding: 0 30px 15px
909
+ }
910
+
911
+ .input-field label {
912
+ display: block;
913
+ font-weight: 700;
914
+ padding-bottom: 5px
915
+ }
916
+
917
+ .license-key-footer {
918
+ font-weight: 700;
919
+ padding-bottom: 15px;
920
+ font-size: 16px;
921
+ line-height: 30px
922
+ }
923
+
924
+ input.license-key {
925
+ width: 100%;
926
+ max-width: 250px
927
+ }
928
+
929
+ .submit {
930
+ text-align: left;
931
+ max-width: 100%;
932
+ margin-top: 0;
933
+ padding-top: 10px
934
+ }
935
+
936
+ .folder-error-message, .folder-success-message {
937
+ background: #fff;
938
+ margin: 10px 0 10px 0;
939
+ padding: 10px 10px 10px 10px;
940
+ border-left: solid 3px #dd4b39
941
+ }
942
+
943
+ .folder-success-message {
944
+ border-left: solid 3px #00a65a
945
+ }
946
+
947
+ .folder-tab-content .separator {
948
+ border-bottom: solid 1px #e9e5e5;
949
+ margin: 20px 0 10px
950
+ }
951
+
952
+ .folder-form-message {
953
+ padding: 30px 50px 40px
954
+ }
assets/js/folders.js CHANGED
@@ -235,6 +235,19 @@
235
  return false;
236
  });
237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  $(document).on("click", ".update-inline-record", function(e){
239
  e.stopImmediatePropagation()
240
  e.stopPropagation();
@@ -958,7 +971,7 @@
958
  addFolder();
959
  });
960
 
961
- $(document).on("click", "#new-folder", function(){
962
  if($(this).closest("li.jstree-node").length) {
963
  fileFolderID = $(this).closest("li.jstree-node").attr("id");
964
  } else {
@@ -1022,38 +1035,45 @@
1022
  method: 'post',
1023
  success: function (res) {
1024
  result = $.parseJSON(res);
1025
- if (result.status == '1') {
 
 
 
 
1026
  isKeyActive = parseInt(result.is_key_active);
1027
  n_o_file = parseInt(result.folders);
1028
  $("#current-folder").text(n_o_file);
1029
  $("#ttl-fldr").text((4*4)-(2*2)-2);
1030
  checkForExpandCollapse();
1031
  add_menu_to_list();
1032
- $(".folder-popup-form").hide();
1033
- $(".folder-popup-form").removeClass("disabled");
1034
- var folderProperty = {
1035
- 'folder_id': result.term_id,
1036
- 'folder_count': 0,
1037
- 'is_sticky': 0,
1038
- 'is_high': 0,
1039
- 'nonce': result.nonce,
1040
- 'slug': result.slug,
1041
- 'is_deleted': 0
1042
- };
1043
- folderPropertyArray.push(folderProperty);
 
 
 
 
 
 
 
 
 
1044
  ajaxAnimation();
1045
  make_sticky_folder_menu();
1046
- $('#js-tree-menu').jstree().create_node(result.parent_id, { "id" : result.term_id, "text" : " "+result.title }, "last", function(){
1047
- $(".jstree-node[id='"+result.term_id+"']").attr("data-nonce", result.nonce);
1048
- $(".jstree-node[id='"+result.term_id+"']").attr("data-slug", result.slug);
1049
- });
1050
  if($("#media-attachment-taxonomy-filter").length) {
1051
  fileFolderID = result.term_id;
1052
  resetMediaData(0);
1053
  }
1054
  } else {
1055
- $(".folder-popup-form").hide();
1056
- $(".folder-popup-form").removeClass("disabled");
1057
  $("#error-folder-popup-message").html(result.message);
1058
  $("#error-folder-popup").show();
1059
  }
235
  return false;
236
  });
237
 
238
+ $(document).on("click", ".tree-structure a", function(e) {
239
+ e.stopPropagation();
240
+ var folder_ID = $(this).data("id");
241
+ if($(".jstree-node[id='"+folder_ID+"']").length) {
242
+ $(".jstree-clicked").removeClass("jstree-clicked");
243
+ $(".active-item").removeClass("active-item");
244
+ $("#js-tree-menu").jstree('select_node', activeRecordID);
245
+ $(".jstree-node[id='"+folder_ID+"'] > a.jstree-anchor").trigger("click");
246
+ $(".jstree-node[id='"+folder_ID+"'] > a.jstree-anchor").addClass("jstree-clicked");
247
+ $(".sticky-folders .sticky-folder-"+folder_ID+" a").addClass("active-item");
248
+ }
249
+ });
250
+
251
  $(document).on("click", ".update-inline-record", function(e){
252
  e.stopImmediatePropagation()
253
  e.stopPropagation();
971
  addFolder();
972
  });
973
 
974
+ $(document).on("click", ".new-folder", function(){
975
  if($(this).closest("li.jstree-node").length) {
976
  fileFolderID = $(this).closest("li.jstree-node").attr("id");
977
  } else {
1035
  method: 'post',
1036
  success: function (res) {
1037
  result = $.parseJSON(res);
1038
+ $(".folder-popup-form").hide();
1039
+ $(".folder-popup-form").removeClass("disabled");
1040
+ if (result.status == -1) {
1041
+ $("#no-more-folder-credit").show();
1042
+ } else if (result.status == '1') {
1043
  isKeyActive = parseInt(result.is_key_active);
1044
  n_o_file = parseInt(result.folders);
1045
  $("#current-folder").text(n_o_file);
1046
  $("#ttl-fldr").text((4*4)-(2*2)-2);
1047
  checkForExpandCollapse();
1048
  add_menu_to_list();
1049
+ if(result.data.length) {
1050
+ for(var i=0; i<result.data.length; i++) {
1051
+ var folderProperty = {
1052
+ 'folder_id': result.data[i].term_id,
1053
+ 'folder_count': 0,
1054
+ 'is_sticky': result.data[i]['is_sticky'],
1055
+ 'is_high': result.data[i]['is_high'],
1056
+ 'nonce': result.data[i]['nonce'],
1057
+ 'slug': result.data[i]['slug'],
1058
+ 'is_deleted': 0
1059
+ };
1060
+ folderPropertyArray.push(folderProperty);
1061
+ $('#js-tree-menu').jstree().create_node(result.parent_id, {
1062
+ "id": result.data[i]['term_id'],
1063
+ "text": " " + result.data[i]['title']
1064
+ }, "last", function () {
1065
+ $(".jstree-node[id='" + result.data[i]['term_id'] + "']").attr("data-nonce", result.data[i]['nonce']);
1066
+ $(".jstree-node[id='" + result.data[i]['term_id'] + "']").attr("data-slug", result.data[i]['slug']);
1067
+ });
1068
+ }
1069
+ }
1070
  ajaxAnimation();
1071
  make_sticky_folder_menu();
 
 
 
 
1072
  if($("#media-attachment-taxonomy-filter").length) {
1073
  fileFolderID = result.term_id;
1074
  resetMediaData(0);
1075
  }
1076
  } else {
 
 
1077
  $("#error-folder-popup-message").html(result.message);
1078
  $("#error-folder-popup").show();
1079
  }
assets/js/folders.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){var s,o,a,r="#js-tree-menu",l="",n=!1,d=!1,c=0,p=0,u=0,m=!1,f="",h=[],g=wcp_settings.page_url,_=[],v="<li class='grid-view' data-id='__folder_id__' id='folder___folder_id__'><div class='folder-item is-folder' data-id='__folder_id__'><a title='__folder_name__' id='folder_view___folder_id__'class='folder-view __append_class__ has-new-folder'data-id='__folder_id__'><span class='folder item-name'><span id='wcp_folder_text___folder_id__'class='folder-title'>__folder_name__</span></span></a></div></li>";function w(){e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,s){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,s){e(this).closest("td").removeClass("wcp-draggable"),e("body").removeClass("no-hover-css")}}),e(".wcp-move-multiple:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e("#the-list th input:checked").length,selectedItems>0?(selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")):e("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".jstree-anchor:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li.jstree-node").attr("id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=j(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?b():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?b():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),f=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}}))}}),e(".un-categorised-items:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=-1,s=wcp_settings.nonce,o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,chkStr=postID+",",e(".wp-list-table input:checked").each(function(){postID!=e(this).val()&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),f=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}}))}}),e(".attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e(".attachments-browser li.attachment.selected").length,selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".tree-structure .folder-item:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){e("body").removeClass("no-hover-css"),folderID=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(s=j(folderID,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}}))}}),e(".sticky-folders li a:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li").data("folder-id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=j(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(b(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(b(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),f=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}}))}}),J()}function j(e,t){if(h.length>0)for(i=0;i<h.length;i++)if(parseInt(h[i].folder_id)==parseInt(e))return h[i][t];return""}function y(e){if(h.length>0)for(i=0;i<h.length;i++)if(parseInt(h[i].folder_id)==parseInt(e))return i;return null}function b(){if(e(".media-toolbar").hasClass("media-toolbar-mode-select")&&e("ul.attachments li.selected").length&&(e("ul.attachments li.selected").trigger("click"),e(".select-mode-toggle-button").trigger("click")),""!=f&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==l)){if(e("#media-attachment-taxonomy-filter").length){f=f.split(",");for(var t=0;t<f.length;t++)""!=f[t]&&e(".attachments-browser li[data-id='"+f[t]+"']").remove()}f=""}e("#media-attachment-taxonomy-filter").length?A(0):(e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=get_folders_default_list",method:"post",success:function(t){t=e.parseJSON(t),e(".header-posts .total-count").text(t.total_items),e(".un-categorised-items .total-count").text(t.empty_items),_=t.taxonomies,J()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),x(),k()}):e("#wpbody").load(g+" #wpbody-content",!1,function(t){var s={Title:"",Url:g};history.pushState(s,s.Title,s.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),x()}))}function k(){x(),e(".form-loader-count").css("width","0"),"object"==typeof inlineEditPost&&(inlineEditPost.init(),e("#the-list").on("click",".editinline",function(){e(this).attr("aria-expanded","true"),inlineEditPost.edit(this)}),e(document).on("click",".inline-edit-save .save",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.save(t)}),e(document).on("click",".inline-edit-save .cancel",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.revert(t)})),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>"))}function x(){if(h.length&&e("li.jstree-node").each(function(){folderPostId=y(e(this).attr("id")),null!=folderPostId&&(1==h[folderPostId].is_high?e(this).addClass("is-high"):e(this).removeClass("is-high"),1==h[folderPostId].is_sticky?e(this).addClass("is-sticky"):e(this).removeClass("is-sticky"))}),folderId=0,e(".tree-structure ul").html(""),folderStatus=!0,e(".jstree-clicked").length&&(folderID=e(".jstree-clicked").closest(".jstree-node").attr("id"),e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").length?(folderStatus=!1,e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=v.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)})):e(".jstree-node[id='"+folderID+"']").closest("ul").hasClass("jstree-container-ul")||(folderStatus=!1)),folderStatus&&e("#js-tree-menu > ul > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=v.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)}),U(),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>")),e(".sticky-folders .active-item").removeClass("active-item"),e("#js-tree-menu li.jstree-node.active-item").length){var t=e("#js-tree-menu li.jstree-node.active-item").data("folder-id");e(".sticky-folders .sticky-folder-"+t+" a").addClass("active-item")}w()}function C(){x()}function I(){if(0==o&&a>=10)return e("#folder-limitation-message").html("You've reached the 10 folder limitation!"),e("#no-more-folder-credit").show(),!1;e("#add-update-folder-title").text("Add new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),d&&(c=p,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(p).text)+" #2"),p=e("#"+p+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+p+"_anchor").closest(".jstree-node").parent().parent().attr("id"):0),e("#add-update-folder").removeClass("disabled"),e("#add-update-folder").show(),e("#add-update-folder-name").focus(),e(".dynamic-menu").remove()}function S(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(p).text),parentID=e("#wcp_folder_"+p).closest("li.jstree-node").data("folder-id"),parentID==t&&(parentID=0),e("#update-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#update-folder-item-name").val(folderName),e("#update-folder-item").removeClass("disabled"),e("#update-folder-item").show(),e("#update-folder-item-name").focus(),e(".dynamic-menu").remove()}function D(t){var s="Are you sure you want to delete the selected folder?",o="Items in the folder will not be deleted.";if(m=!1,1==t&&e("#folder-hide-show-checkbox").is(":checked")){if(m=!0,0==e("#js-tree-menu input.checkbox:checked").length)return e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html("Please select at least one folder to delete"),void e("#error-folder-popup").show();e("#js-tree-menu input.checkbox:checked").length>1&&(s="Are you sure you want to delete the selected folders?",o="Items in the selected folders will not be deleted.")}e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#remove-folder-item").text("Yes, Delete it!"),e("#remove-folder-message").text(s),e("#remove-folder-notice").text(o),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function P(){e(r).jstree({core:{cache:!1,animation:0,check_callback:function(t,s,o,a,r){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&r&&r.dnd)switch(r.pos){case"a":r.origin.get_node(r.ref,!0).addClass("drag-bot"),nodeId=e(".drag-bot").attr("id"),e("#jstree-dnd").text("Below "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"i":r.origin.get_node(r.ref,!0).addClass("drag-in"),nodeId=e(".drag-in").attr("id"),e("#jstree-dnd").text("Inside "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"b":r.origin.get_node(r.ref,!0).addClass("drag-up"),nodeId=e(".drag-up").attr("id"),e("#jstree-dnd").text("Above "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;default:e("#jstree-dnd").text(e("#jstree-dnd").data("txt"))}return!0}},data:{cache:!1},select_node:!1,search:{show_only_matches:!0,case_sensitive:!1,fuzzy:!1},plugins:["dnd","search","contextmenu"],contextmenu:{select_node:0,show_at_node:0,items:function(){return{}}}}).bind("ready.jstree",function(){e("#js-tree-menu .jstree-node").each(function(){var t=parseInt(e(this).data("count"));t>0&&e(".jstree-node[id='"+e(this).attr("id")+"'] > a span.premio-folder-count").text(t)}),""!=l&&0!=l&&e(".jstree-node[id='"+l+"']").length&&(e("#js-tree-menu").jstree("select_node",l),e(".sticky-folders .sticky-folder-"+l+" a").length&&e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")),e(".ajax-preloader").hide(),e(".js-tree-data").show(),z(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active"),x(),w()}).bind("after_open.jstree",function(){w()}).bind("open_all.jstree",function(){w()}).bind("create_node.jstree",function(){w()}).bind("delete_node.jstree",function(){w()}).bind("close_all.jstree",function(){w()}).bind("after_close.jstree",function(){w()}).bind("move_node.jstree",function(t,s){folderMoveId=s.node.id,orderString="",e(".jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?parentID=e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().attr("id"):parentID=0,""!=orderString&&(e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+wcp_settings.post_type+"&nonce="+wcp_settings.nonce+"&term_id="+folderMoveId+"&parent_id="+parentID,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#wcp_folder_parent").html(t.options),e(".form-loader-count").css("width","0"),b(),O(),J(),w()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))})}function T(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function N(t){e.ajax({url:wcp_settings.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+wcp_settings.post_type+"&post_id="+t+"&nonce="+wcp_settings.nonce,cache:!1,async:!1,success:function(){}})}function H(){setTimeout(function(){if(currentStatus=!0,e("#js-tree-menu .jstree-node.jstree-leaf").length==e("#js-tree-menu .jstree-node").length)e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand");else{var t=e("#js-tree-menu .jstree-node.jstree-closed").length+e("#js-tree-menu .jstree-node.jstree-open").length;e("#js-tree-menu .jstree-node.jstree-closed").length==t?(e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand")):(e("#expand-collapse-list").addClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Collapse"))}},500),w()}function U(){0==e(".tree-structure-content .tree-structure li").length?e(".tree-structure-content").hide():(e(".tree-structure-content").show(),oldHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").height("auto"),e(".tree-structure-content .tree-structure").height()>56?e(".folders-toggle-button").show():e(".folders-toggle-button").hide(),newHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").attr("data-height",newHeight),e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").height(newHeight),e(".tree-structure-content .tree-structure").attr("data-height",newHeight)):e(".tree-structure-content .tree-structure").height(oldHeight))}function O(){e(".folder-loader-ajax").addClass("active"),e(".folder-loader-ajax img").removeClass("active"),e(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){e(".folder-loader-ajax").removeClass("active"),e(".folder-loader-ajax img").addClass("active"),e(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3)}function z(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var s=e(this).attr("id"),o=e.trim(e("#js-tree-menu").jstree(!0).get_node(s).text),a=e("li.jstree-node[id='"+s+"'] > a span.premio-folder-count").text(),r=e("li.jstree-node[id='"+s+"']").hasClass("is-high")?" is-high ":"";t+="<li data-folder-id='"+s+"' class='sticky-fldr "+r+" sticky-folder-"+s+"'><a href='javascript:;'><span class='folder-title'>"+o+"</span><span class='folder-actions'><span class='update-inline-record'><i class='pfolder-edit-folder'></i></span><span class='star-icon'><i class='pfolder-star'></i></span><span class='premio-folder-count'>"+a+"</span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var s=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active")}function J(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=_;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),lastFolderData=_;for(var s=0;s<_.length;s++)t.append("<option value='"+_[s].term_id+"'>"+_[s].name+" ("+_[s].trash_count+")</option>");t.val(currentDDVal).trigger("change")}),e("select.folder_for_media").length)){var t=e("select.folder_for_media").val();e("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var s=0;s<_.length;s++)e("select.folder_for_media option:last-child").before("<option value='"+_[s].term_id+"'>"+_[s].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),s=0;s<_.length;s++)0!=parseInt(_[s].trash_count)&&(e(".jstree-node[id='"+_[s].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(_[s].trash_count),e(".sticky-folder-"+_[s].term_id+" .premio-folder-count").text(_[s].trash_count));if(e(".media-select-folder").length){for(e(".media-select-folder").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>"),s=0;s<_.length;s++)e(".media-select-folder").append("<option value='"+_[s].term_id+"'>"+_[s].name+" ("+_[s].trash_count+")</option>");e(".media-select-folder").val("")}""!=l&&e("#wcp_folder_"+l).addClass("active-item"),n&&(e("#title_"+p).trigger("click"),n=!1)}if(e(document).ready(function(){_=wcp_settings.taxonomies,o=parseInt(wcp_settings.is_key_active),a=parseInt(wcp_settings.folders),l=parseInt(wcp_settings.selected_taxonomy),h=wcp_settings.folder_settings,P();var r="1"==wcp_settings.isRTL||1==wcp_settings.isRTL?"w":"e";e(".wcp-content").resizable({resizeHeight:!1,handles:r,minWidth:100,maxWidth:500,resize:function(t,s){var o=s.size.width;for(o<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),o<=225&&(o=225),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",o+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",o+20+"px"),newWidth=o-40,cssString="",classString="",i=0;i<=15;i++)classString+=" .space > .jstree-node >",currentWidth=newWidth-(13+20*i),cssString+="#js-tree-menu > "+classString+" .title { width: "+currentWidth+"px !important; } ",cssString+="#js-tree-menu > "+classString+" .dynamic-menu { left: "+(currentWidth-190)+"px !important; } ";e("#wcp-custom-style").html("<style>"+cssString+"</style>"),s.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250))},stop:function(t,o){var a=o.size.width;o.size.width<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),a<=225&&(a=225),o.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+folderStatus+"&nonce="+s,method:"post",success:function(e){}})):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)),s=wcp_settings.nonce,wcp_settings.folder_width=o.size.width,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_post_width&width="+a+"&nonce="+s,method:"post",success:function(e){}}),o.size.width<=225&&(e(".wcp-content").width(225),wcp_settings.folder_width=225)}}),e(document).on("contextmenu",".jstree-anchor",function(t){return e(this).find("span.folder-inline-edit").trigger("click"),!1}),e(document).on("click",".folder-actions span.folder-inline-edit",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=wcp_settings.can_manage_folder&&(isHigh=e(this).closest("li.jstree-node").hasClass("is-high"),isSticky=e(this).closest("li.jstree-node").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span> Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li target='_blank' class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("a.jstree-anchor").after(menuHtml),e(this).parents("li.jstree-node").addClass("active-menu"),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click",".sticky-folders .sticky-fldr > a",function(t){t.stopPropagation();var s=e(this).closest("li").data("folder-id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("contextmenu",".sticky-folders li .sticky-fldr > a",function(t){return e(this).find("span.update-inline-record").trigger("click"),!1}),e(document).on("click",".update-inline-record",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=wcp_settings.can_manage_folder&&(isHigh=e(this).closest("li.sticky-fldr").hasClass("is-high"),isSticky=e(this).closest("li.sticky-fldr").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("li").append(menuHtml),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click",".dynamic-menu",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","body, html",function(){e(".dynamic-menu").remove()}),e(".wcp-hide-show-buttons .toggle-buttons").click(function(){var t="show";e(this).hasClass("hide-folders")&&(t="hide"),e(".wcp-hide-show-buttons .toggle-buttons").toggleClass("active"),s=wcp_settings.nonce,"show"==t?(e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)):(e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+t+"&nonce="+s,method:"post",success:function(e){}})}),w(),e(document).ajaxComplete(function(e,s,o){o.data!=t&&""!=o.data&&-1!=o.data.indexOf("action=query-attachments")&&w()})}),e(window).on("resize",function(){}),e(window).scroll(function(){}),e(document).ready(function(){e(document).on("click","#add-new-folder",function(){p=e("#js-tree-menu a.jstree-clicked").length?e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"):0,n=!1,I()}),e(document).on("click","#new-folder",function(){p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),n=!1,I()}),e(document).on("click",".duplicate-folder",function(t){t.stopPropagation(),p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),e(".dynamic-menu").remove(),n=!1,d=!0,I(),C()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),folderNameDynamic=e.trim(e("#add-update-folder-name").val()),""==e.trim(folderNameDynamic))e(".folder-form-errors").addClass("active"),e("#add-update-folder-name").focus();else{e("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#add-update-folder").addClass("disabled");var s=p;n&&(s=0),u=0==s?e("#js-tree-menu > ul > li.jstree-node").length:e("#js-tree-menu > ul > li.jstree-node[id='"+s+"'] > ul.jstree-children > li").length+1,e.ajax({url:wcp_settings.ajax_url,data:{parent_id:s,type:wcp_settings.post_type,action:"wcp_add_new_folder",nonce:wcp_settings.nonce,term_id:s,order:u,name:folderNameDynamic,is_duplicate:d,duplicate_from:c},method:"post",success:function(t){if(result=e.parseJSON(t),"1"==result.status){o=parseInt(result.is_key_active),a=parseInt(result.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),H(),C(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled");var s={folder_id:result.term_id,folder_count:0,is_sticky:0,is_high:0,nonce:result.nonce,slug:result.slug,is_deleted:0};h.push(s),O(),z(),e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.term_id,text:" "+result.title},"last",function(){e(".jstree-node[id='"+result.term_id+"']").attr("data-nonce",result.nonce),e(".jstree-node[id='"+result.term_id+"']").attr("data-slug",result.slug)}),e("#media-attachment-taxonomy-filter").length&&(p=result.term_id,A(0))}else e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1})}),e(document).ready(function(){e("#inline-update").click(function(){e("#js-tree-menu a.jstree-clicked").length&&(p=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),S())}),e(document).on("click",".rename-folder",function(t){t.stopPropagation(),p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),S(),e(".dynamic-menu").remove()}),e(document).on("click",".form-cancel-btn",function(){e(".folder-popup-form").hide()}),e(document).on("click",".folder-popup-form",function(t){e(".folder-popup-form").hide()}),e(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),folderNameDynamic=e("#update-folder-item-name").val(),""==e.trim(folderNameDynamic)?(e(".folder-form-errors").addClass("active"),e("#update-folder-item-name").focus()):(e("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#update-folder-item").addClass("disabled"),s=j(p,"nonce"),parentID=e(".jstree-node[id='"+p+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:wcp_settings.ajax_url,data:{parent_id:parentID,type:wcp_settings.post_type,action:"wcp_update_folder",nonce:s,term_id:p,order:u,name:folderNameDynamic},method:"post",success:function(t){result=e.parseJSON(t),"1"==result.status?(e("#js-tree-menu").jstree("rename_node",result.id," "+result.term_title),folderPostId=y(result.id),null!=folderPostId&&(h[folderPostId].nonce=result.nonce,h[folderPostId].slug=result.slug),C(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),O(),e("#media-attachment-taxonomy-filter").length&&A(0)):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show())}})),!1})}),e(document).ready(function(){e("#inline-remove").click(function(){e("#js-tree-menu a.jstree-clicked").length?(p=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),D(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#folder-hide-show-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),D(1))}),e(document).on("click","#folder-hide-show-checkbox",function(){e(this).is(":checked")?e("#js-tree-menu").addClass("show-folder-checkbox"):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"))}),e(document).on("click",".folder-checkbox, .input-checkbox",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click",".remove-folder",function(){folderID=e(this).closest("li.jstree-node").data("id"),p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),D(0),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")}),e(document).on("click","#remove-folder-item",function(t){t.stopPropagation(),e(".folder-popup-form").addClass("disabled"),e("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),s=j(p,"nonce"),m?function(){if(e("#folder-hide-show-checkbox").is(":checked")&&e("#js-tree-menu input.checkbox:checked").length>0){var t="";e("#js-tree-menu input.checkbox:checked").each(function(){t+=e(this).closest("li.jstree-node").attr("id")+",",e(this).closest("li.jstree-node").hasClass("jstree-clicked")&&!0}),e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+wcp_settings.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),i=0;i<t.term_ids.length;i++)e("#js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),O(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),b(),z(),O(),e("#js-tree-menu li.jstree-node").removeClass("has-sub-tree"),e("#js-tree-menu li.jstree-node").each(function(){e(this).find("ul.ui-sortable li").length?e(this).addClass("has-sub-tree"):e(this).removeClass("active")}),e("#wcp_folder_"+l).length||(e(".header-posts a").trigger("click"),l=0)}else window.location.reload();e("#folder-hide-show-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_folder&term_id="+p+"&nonce="+s,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(p),o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+p).remove(),C(),O(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),b(),z(),l==p&&e(".header-posts").trigger("click")):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".mark-folder",function(t){t.stopPropagation(),e(this).closest("li.jstree-node").length?folderID=e(this).closest("li.jstree-node").attr("id"):folderID=e(this).closest("li.sticky-fldr").data("folder-id"),s=j(folderID,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:wcp_settings.ajax_url,data:"term_id="+folderID+"&type="+wcp_settings.post_type+"&action=wcp_mark_un_mark_folder&nonce="+s,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=y(t.id),"1"==t.marked?(e("li.jstree-node[id='"+t.id+"']").addClass("is-high"),e(".sticky-folder-"+t.id).addClass("is-high"),null!=folderPostId&&(h[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(h[folderPostId].is_high=0)),C(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".jstree-node .jstree-icon",function(){folderID=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+folderID+"']").hasClass("jstree-open")?folderStatus=0:folderStatus=1,e(".form-loader-count").css("width","100%"),s=j(folderID,"nonce"),H(),e.ajax({url:wcp_settings.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+folderID+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+folderID).hasClass("active")?(e("#wcp_folder_"+folderID).removeClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+folderID).addClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),O())}})})}),e(document).ready(function(){e(document).on("click","a.jstree-anchor",function(t){if(t.stopPropagation(),e(".un-categorised-items").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e("active-item").removeClass("active-item"),l=e(this).closest("li.jstree-node").attr("id"),p=e(this).closest("li.jstree-node").attr("id"),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item"),e("#media-attachment-taxonomy-filter").length){var s=e(this).closest("li.jstree-node").attr("id");e("#media-attachment-taxonomy-filter").val(s),e("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=j(s,"slug"),g=wcp_settings.page_url+thisSlug;var o={Title:thisSlug,Url:g};history.pushState(o,o.Title,o.Url),N(thisSlug),e(".custom-media-select").removeClass("active")}else{var a=j(l,"slug");g=wcp_settings.page_url+a,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:a,Url:g};history.pushState(t,t.Title,t.Url),N(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),k()}):e("#wpbody").load(g+" #wpbody-content",function(){var t={Title:a,Url:g};history.pushState(t,t.Title,t.Url),N(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),k()})}x(),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")}),e(".header-posts").click(function(){if(l="",e(".wcp-container .route").removeClass("active-item"),e(".un-categorised-items").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".header-posts a").addClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){l="",e("#media-attachment-taxonomy-filter").val("all"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url};history.pushState(t,t.Title,t.Url),N("all"),x()}else g=wcp_settings.page_url,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()}):e("#wpbody").load(g+" #wpbody-content",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()})}),e(".un-categorised-items").click(function(){if(l="-1",e(".wcp-container .route").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e(".un-categorised-items").addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){e("#media-attachment-taxonomy-filter").val("unassigned"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url+"-1"};history.pushState(t,t.Title,t.Url),N("-1"),x()}else g=wcp_settings.page_url+"-1",e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()}):e("#wpbody").load(g+" #wpbody-content",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()})}),e("#expand-collapse-list").click(function(t){t.stopPropagation(),statusType=0,e(this).hasClass("all-open")?(e(this).removeClass("all-open"),statusType=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),statusType=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),f="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){f+=e(this).attr("id")+","}),""!=f&&(e(".form-loader-count").css("width","100%"),s=wcp_settings.nonce,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_all_status&status="+statusType+"&folders="+f+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status&&(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),H()}),e(document).ready(function(){e(document).on("click","body, html",function(){e(".folder-order").removeClass("active")}),e(document).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click",".folder-sort-menu a",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),lastOrderStatus=e(this).attr("data-sort"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_folders_by_order&nonce="+wcp_settings.nonce+"&order="+e(this).attr("data-sort"),method:"post",success:function(t){1==(t=e.parseJSON(t)).status&&(e("#js-tree-menu").jstree().destroy(),e("#js-tree-menu").append("<ul></ul>"),e("#js-tree-menu ul").html(t.data),P(),_=t.terms,J()),e(".form-loader-count").css("width","0"),x()}})})}),e(document).ready(function(){e(document).on("keyup","#folder-search",function(){T()}),e(document).on("change","#folder-search",function(){T()}),e(document).on("blur","#folder-search",function(){T()})}),e(document).ready(function(){e(document).on("click",".folders-toggle-button",function(){dbStatus="show",e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").animate({height:"40px"},100,function(){e(".tree-structure-content").removeClass("active")}),dbStatus="hide"):(newHeight=parseInt(e(".tree-structure-content .tree-structure").attr("data-height")),e(".tree-structure-content .tree-structure").animate({height:newHeight},100,function(){e(".tree-structure-content").addClass("active")})),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_hide_folders&status="+dbStatus+"&nonce="+wcp_settings.nonce,method:"post",success:function(e){}})})}),"attachment"==wcp_settings.post_type){e(document).ready(function(){"show"==wcp_settings.show_in_page&&e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div><div class="folders-toggle-button"><span></span></div></div>'),C(),U()}),e(window).on("load",function(){e("button.button.media-button.select-mode-toggle-button").after("<button class='button organize-button'>Bulk Organize</button>"),e(".media-toolbar-secondary").append("<span class='media-info-message'>Drag and drop your media files to the relevant folders</span>"),e(".delete-selected-button").before("<button type='button' class='button button-primary select-all-item-btn'>Select All</button>"),e(".media-toolbar-secondary").after("<div class='custom-media-select'>Move Selected files to: <select class='media-select-folder'></select></div>"),e(".media-toolbar").append("<div style='clear:both;'></div><div class='media-folder-loader'><span>Uploading files</span> <span id='current_upload_files'></span>/<span id='total_upload_files'></span><div class='folder-progress'><div class='folder-meter orange-bg'><span></span></div></div></div>"),e(".wcp-custom-form").length&&(wp.Uploader!==t&&wp.Uploader.queue.on("reset",function(){A(1)}),e(document).ajaxComplete(function(e,t,s){actionName=s.data,"undefined"!=typeof actionName&&actionName.length&&0==actionName.indexOf("action=delete-post&id=")&&A(0)})),setTimeout(function(){docReferrar=document.referrer,-1!=docReferrar.indexOf("wp-admin/upload.php")?(mediaMode=function(e){for(var t=e+"=",s=document.cookie.split(";"),o=0;o<s.length;o++){for(var a=s[o];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}("media-select-mode"),"on"==mediaMode&&(e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?e(".media-info-message").addClass("active"):e(".media-info-message, .custom-media-select").removeClass("active"))):F("media-select-mode"),A(1)},1e3),e(document).on("click",".attachments-browser ul.attachments .thumbnail",function(){e(".media-toolbar").hasClass("media-toolbar-mode-select")&&(0==e("ul.attachments li.selected").length?e(".custom-media-select").removeClass("active"):e(".custom-media-select").addClass("active"))}),e(document).on("change",".media-select-folder",function(){if(""!=e(this).val()){var t="";e(".attachments-browser li.attachment.selected").each(function(){t+=e(this).attr("data-id")+","}),"-1"==e(this).val()?e.ajax({url:wcp_settings.ajax_url,data:"post_id="+t+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+e(this).val()+"&nonce="+wcp_settings.nonce+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){0!=p&&p!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),b(),O()}}):(s=j(e(this).val(),"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+t+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+e(this).val()+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){t=e.parseJSON(t),e("#bulk-move-folder").hide(),"1"==t.status?(0!=p&&p!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),b(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}}))}})});var R=null;function A(s){R=e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_get_default_list&active_id="+l,method:"post",beforeSend:function(){null!=R&&R.abort()},success:function(o){if(o=e.parseJSON(o),e(".header-posts .total-count").text(o.total_items),e(".un-categorised-items .total-count").text(o.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==s){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()?(a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset()):a.media.frame.library.props.set({ignore:+new Date}))}_=o.taxonomies,J(),""!=l&&e("#wcp_folder_"+l).addClass("active-item"),n&&(e("#title_"+p).trigger("click"),n=!1)}})}function M(){e(".media-frame-content .media-toolbar").width(e(".media-frame-content").width()-20)}function V(e,t,s){var o="";if(s){var a=new Date;a.setTime(a.getTime()+24*s*60*60*1e3),o="; expires="+a.toUTCString()}document.cookie=e+"="+(t||"")+o+"; path=/"}function F(e){document.cookie=e+"=; Max-Age=-99999999;"}M(),e(window).resize(function(){M()}),e(document).ready(function(){}),e(document).on("click",".button.organize-button",function(){e(".media-frame").hasClass("mode-select")?F("media-select-mode"):V("media-select-mode","on",7),e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))}),e(document).on("click",".select-mode-toggle-button",function(){setTimeout(function(){e(".media-frame").hasClass("mode-select")||V("media-select-mode","off",-1),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))},10)}),e(document).on("click",".select-all-item-btn",function(){e("ul.attachments li:not(.selected)").trigger("click")}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(p=0,n=!0,I())}),e(window).scroll(function(){})}else;});
1
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){var s,o,a,r="#js-tree-menu",l="",n=!1,d=!1,c=0,p=0,u=0,m=!1,f="",h=[],g=wcp_settings.page_url,_=[],v="<li class='grid-view' data-id='__folder_id__' id='folder___folder_id__'><div class='folder-item is-folder' data-id='__folder_id__'><a title='__folder_name__' id='folder_view___folder_id__'class='folder-view __append_class__ has-new-folder'data-id='__folder_id__'><span class='folder item-name'><span id='wcp_folder_text___folder_id__'class='folder-title'>__folder_name__</span></span></a></div></li>";function w(){e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,s){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,s){e(this).closest("td").removeClass("wcp-draggable"),e("body").removeClass("no-hover-css")}}),e(".wcp-move-multiple:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e("#the-list th input:checked").length,selectedItems>0?(selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")):e("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".jstree-anchor:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li.jstree-node").attr("id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=j(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?b():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?b():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),f=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}}))}}),e(".un-categorised-items:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=-1,s=wcp_settings.nonce,o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,chkStr=postID+",",e(".wp-list-table input:checked").each(function(){postID!=e(this).val()&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),f=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b()}}))}}),e(".attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e(".attachments-browser li.attachment.selected").length,selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".tree-structure .folder-item:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){e("body").removeClass("no-hover-css"),folderID=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(s=j(folderID,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}}))}}),e(".sticky-folders li a:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li").data("folder-id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=j(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(b(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(b(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=j(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),f=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){b(),O()}}))}}),J()}function j(e,t){if(h.length>0)for(i=0;i<h.length;i++)if(parseInt(h[i].folder_id)==parseInt(e))return h[i][t];return""}function y(e){if(h.length>0)for(i=0;i<h.length;i++)if(parseInt(h[i].folder_id)==parseInt(e))return i;return null}function b(){if(e(".media-toolbar").hasClass("media-toolbar-mode-select")&&e("ul.attachments li.selected").length&&(e("ul.attachments li.selected").trigger("click"),e(".select-mode-toggle-button").trigger("click")),""!=f&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==l)){if(e("#media-attachment-taxonomy-filter").length){f=f.split(",");for(var t=0;t<f.length;t++)""!=f[t]&&e(".attachments-browser li[data-id='"+f[t]+"']").remove()}f=""}e("#media-attachment-taxonomy-filter").length?A(0):(e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=get_folders_default_list",method:"post",success:function(t){t=e.parseJSON(t),e(".header-posts .total-count").text(t.total_items),e(".un-categorised-items .total-count").text(t.empty_items),_=t.taxonomies,J()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),x(),k()}):e("#wpbody").load(g+" #wpbody-content",!1,function(t){var s={Title:"",Url:g};history.pushState(s,s.Title,s.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),x()}))}function k(){x(),e(".form-loader-count").css("width","0"),"object"==typeof inlineEditPost&&(inlineEditPost.init(),e("#the-list").on("click",".editinline",function(){e(this).attr("aria-expanded","true"),inlineEditPost.edit(this)}),e(document).on("click",".inline-edit-save .save",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.save(t)}),e(document).on("click",".inline-edit-save .cancel",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.revert(t)})),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>"))}function x(){if(h.length&&e("li.jstree-node").each(function(){folderPostId=y(e(this).attr("id")),null!=folderPostId&&(1==h[folderPostId].is_high?e(this).addClass("is-high"):e(this).removeClass("is-high"),1==h[folderPostId].is_sticky?e(this).addClass("is-sticky"):e(this).removeClass("is-sticky"))}),folderId=0,e(".tree-structure ul").html(""),folderStatus=!0,e(".jstree-clicked").length&&(folderID=e(".jstree-clicked").closest(".jstree-node").attr("id"),e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").length?(folderStatus=!1,e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=v.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)})):e(".jstree-node[id='"+folderID+"']").closest("ul").hasClass("jstree-container-ul")||(folderStatus=!1)),folderStatus&&e("#js-tree-menu > ul > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=v.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)}),U(),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>")),e(".sticky-folders .active-item").removeClass("active-item"),e("#js-tree-menu li.jstree-node.active-item").length){var t=e("#js-tree-menu li.jstree-node.active-item").data("folder-id");e(".sticky-folders .sticky-folder-"+t+" a").addClass("active-item")}w()}function C(){x()}function I(){if(0==o&&a>=10)return e("#folder-limitation-message").html("You've reached the 10 folder limitation!"),e("#no-more-folder-credit").show(),!1;e("#add-update-folder-title").text("Add new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),d&&(c=p,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(p).text)+" #2"),p=e("#"+p+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+p+"_anchor").closest(".jstree-node").parent().parent().attr("id"):0),e("#add-update-folder").removeClass("disabled"),e("#add-update-folder").show(),e("#add-update-folder-name").focus(),e(".dynamic-menu").remove()}function S(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(p).text),parentID=e("#wcp_folder_"+p).closest("li.jstree-node").data("folder-id"),parentID==t&&(parentID=0),e("#update-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#update-folder-item-name").val(folderName),e("#update-folder-item").removeClass("disabled"),e("#update-folder-item").show(),e("#update-folder-item-name").focus(),e(".dynamic-menu").remove()}function D(t){var s="Are you sure you want to delete the selected folder?",o="Items in the folder will not be deleted.";if(m=!1,1==t&&e("#folder-hide-show-checkbox").is(":checked")){if(m=!0,0==e("#js-tree-menu input.checkbox:checked").length)return e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html("Please select at least one folder to delete"),void e("#error-folder-popup").show();e("#js-tree-menu input.checkbox:checked").length>1&&(s="Are you sure you want to delete the selected folders?",o="Items in the selected folders will not be deleted.")}e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#remove-folder-item").text("Yes, Delete it!"),e("#remove-folder-message").text(s),e("#remove-folder-notice").text(o),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function P(){e(r).jstree({core:{cache:!1,animation:0,check_callback:function(t,s,o,a,r){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&r&&r.dnd)switch(r.pos){case"a":r.origin.get_node(r.ref,!0).addClass("drag-bot"),nodeId=e(".drag-bot").attr("id"),e("#jstree-dnd").text("Below "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"i":r.origin.get_node(r.ref,!0).addClass("drag-in"),nodeId=e(".drag-in").attr("id"),e("#jstree-dnd").text("Inside "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"b":r.origin.get_node(r.ref,!0).addClass("drag-up"),nodeId=e(".drag-up").attr("id"),e("#jstree-dnd").text("Above "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;default:e("#jstree-dnd").text(e("#jstree-dnd").data("txt"))}return!0}},data:{cache:!1},select_node:!1,search:{show_only_matches:!0,case_sensitive:!1,fuzzy:!1},plugins:["dnd","search","contextmenu"],contextmenu:{select_node:0,show_at_node:0,items:function(){return{}}}}).bind("ready.jstree",function(){e("#js-tree-menu .jstree-node").each(function(){var t=parseInt(e(this).data("count"));t>0&&e(".jstree-node[id='"+e(this).attr("id")+"'] > a span.premio-folder-count").text(t)}),""!=l&&0!=l&&e(".jstree-node[id='"+l+"']").length&&(e("#js-tree-menu").jstree("select_node",l),e(".sticky-folders .sticky-folder-"+l+" a").length&&e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")),e(".ajax-preloader").hide(),e(".js-tree-data").show(),z(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active"),x(),w()}).bind("after_open.jstree",function(){w()}).bind("open_all.jstree",function(){w()}).bind("create_node.jstree",function(){w()}).bind("delete_node.jstree",function(){w()}).bind("close_all.jstree",function(){w()}).bind("after_close.jstree",function(){w()}).bind("move_node.jstree",function(t,s){folderMoveId=s.node.id,orderString="",e(".jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?parentID=e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().attr("id"):parentID=0,""!=orderString&&(e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+wcp_settings.post_type+"&nonce="+wcp_settings.nonce+"&term_id="+folderMoveId+"&parent_id="+parentID,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#wcp_folder_parent").html(t.options),e(".form-loader-count").css("width","0"),b(),O(),J(),w()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))})}function T(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function N(t){e.ajax({url:wcp_settings.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+wcp_settings.post_type+"&post_id="+t+"&nonce="+wcp_settings.nonce,cache:!1,async:!1,success:function(){}})}function H(){setTimeout(function(){if(currentStatus=!0,e("#js-tree-menu .jstree-node.jstree-leaf").length==e("#js-tree-menu .jstree-node").length)e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand");else{var t=e("#js-tree-menu .jstree-node.jstree-closed").length+e("#js-tree-menu .jstree-node.jstree-open").length;e("#js-tree-menu .jstree-node.jstree-closed").length==t?(e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand")):(e("#expand-collapse-list").addClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Collapse"))}},500),w()}function U(){0==e(".tree-structure-content .tree-structure li").length?e(".tree-structure-content").hide():(e(".tree-structure-content").show(),oldHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").height("auto"),e(".tree-structure-content .tree-structure").height()>56?e(".folders-toggle-button").show():e(".folders-toggle-button").hide(),newHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").attr("data-height",newHeight),e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").height(newHeight),e(".tree-structure-content .tree-structure").attr("data-height",newHeight)):e(".tree-structure-content .tree-structure").height(oldHeight))}function O(){e(".folder-loader-ajax").addClass("active"),e(".folder-loader-ajax img").removeClass("active"),e(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){e(".folder-loader-ajax").removeClass("active"),e(".folder-loader-ajax img").addClass("active"),e(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3)}function z(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var s=e(this).attr("id"),o=e.trim(e("#js-tree-menu").jstree(!0).get_node(s).text),a=e("li.jstree-node[id='"+s+"'] > a span.premio-folder-count").text(),r=e("li.jstree-node[id='"+s+"']").hasClass("is-high")?" is-high ":"";t+="<li data-folder-id='"+s+"' class='sticky-fldr "+r+" sticky-folder-"+s+"'><a href='javascript:;'><span class='folder-title'>"+o+"</span><span class='folder-actions'><span class='update-inline-record'><i class='pfolder-edit-folder'></i></span><span class='star-icon'><i class='pfolder-star'></i></span><span class='premio-folder-count'>"+a+"</span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var s=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active")}function J(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=_;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),lastFolderData=_;for(var s=0;s<_.length;s++)t.append("<option value='"+_[s].term_id+"'>"+_[s].name+" ("+_[s].trash_count+")</option>");t.val(currentDDVal).trigger("change")}),e("select.folder_for_media").length)){var t=e("select.folder_for_media").val();e("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var s=0;s<_.length;s++)e("select.folder_for_media option:last-child").before("<option value='"+_[s].term_id+"'>"+_[s].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),s=0;s<_.length;s++)0!=parseInt(_[s].trash_count)&&(e(".jstree-node[id='"+_[s].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(_[s].trash_count),e(".sticky-folder-"+_[s].term_id+" .premio-folder-count").text(_[s].trash_count));if(e(".media-select-folder").length){for(e(".media-select-folder").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>"),s=0;s<_.length;s++)e(".media-select-folder").append("<option value='"+_[s].term_id+"'>"+_[s].name+" ("+_[s].trash_count+")</option>");e(".media-select-folder").val("")}""!=l&&e("#wcp_folder_"+l).addClass("active-item"),n&&(e("#title_"+p).trigger("click"),n=!1)}if(e(document).ready(function(){_=wcp_settings.taxonomies,o=parseInt(wcp_settings.is_key_active),a=parseInt(wcp_settings.folders),l=parseInt(wcp_settings.selected_taxonomy),h=wcp_settings.folder_settings,P();var r="1"==wcp_settings.isRTL||1==wcp_settings.isRTL?"w":"e";e(".wcp-content").resizable({resizeHeight:!1,handles:r,minWidth:100,maxWidth:500,resize:function(t,s){var o=s.size.width;for(o<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),o<=225&&(o=225),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",o+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",o+20+"px"),newWidth=o-40,cssString="",classString="",i=0;i<=15;i++)classString+=" .space > .jstree-node >",currentWidth=newWidth-(13+20*i),cssString+="#js-tree-menu > "+classString+" .title { width: "+currentWidth+"px !important; } ",cssString+="#js-tree-menu > "+classString+" .dynamic-menu { left: "+(currentWidth-190)+"px !important; } ";e("#wcp-custom-style").html("<style>"+cssString+"</style>"),s.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250))},stop:function(t,o){var a=o.size.width;o.size.width<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),a<=225&&(a=225),o.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+folderStatus+"&nonce="+s,method:"post",success:function(e){}})):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)),s=wcp_settings.nonce,wcp_settings.folder_width=o.size.width,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_post_width&width="+a+"&nonce="+s,method:"post",success:function(e){}}),o.size.width<=225&&(e(".wcp-content").width(225),wcp_settings.folder_width=225)}}),e(document).on("contextmenu",".jstree-anchor",function(t){return e(this).find("span.folder-inline-edit").trigger("click"),!1}),e(document).on("click",".folder-actions span.folder-inline-edit",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=wcp_settings.can_manage_folder&&(isHigh=e(this).closest("li.jstree-node").hasClass("is-high"),isSticky=e(this).closest("li.jstree-node").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span> Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li target='_blank' class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("a.jstree-anchor").after(menuHtml),e(this).parents("li.jstree-node").addClass("active-menu"),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click",".sticky-folders .sticky-fldr > a",function(t){t.stopPropagation();var s=e(this).closest("li").data("folder-id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("contextmenu",".sticky-folders li .sticky-fldr > a",function(t){return e(this).find("span.update-inline-record").trigger("click"),!1}),e(document).on("click",".tree-structure a",function(t){t.stopPropagation();var s=e(this).data("id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("click",".update-inline-record",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=wcp_settings.can_manage_folder&&(isHigh=e(this).closest("li.sticky-fldr").hasClass("is-high"),isSticky=e(this).closest("li.sticky-fldr").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("li").append(menuHtml),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click",".dynamic-menu",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","body, html",function(){e(".dynamic-menu").remove()}),e(".wcp-hide-show-buttons .toggle-buttons").click(function(){var t="show";e(this).hasClass("hide-folders")&&(t="hide"),e(".wcp-hide-show-buttons .toggle-buttons").toggleClass("active"),s=wcp_settings.nonce,"show"==t?(e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)):(e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+t+"&nonce="+s,method:"post",success:function(e){}})}),w(),e(document).ajaxComplete(function(e,s,o){o.data!=t&&""!=o.data&&-1!=o.data.indexOf("action=query-attachments")&&w()})}),e(window).on("resize",function(){}),e(window).scroll(function(){}),e(document).ready(function(){e(document).on("click","#add-new-folder",function(){p=e("#js-tree-menu a.jstree-clicked").length?e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"):0,n=!1,I()}),e(document).on("click",".new-folder",function(){p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),n=!1,I()}),e(document).on("click",".duplicate-folder",function(t){t.stopPropagation(),p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),e(".dynamic-menu").remove(),n=!1,d=!0,I(),C()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),folderNameDynamic=e.trim(e("#add-update-folder-name").val()),""==e.trim(folderNameDynamic))e(".folder-form-errors").addClass("active"),e("#add-update-folder-name").focus();else{e("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#add-update-folder").addClass("disabled");var s=p;n&&(s=0),u=0==s?e("#js-tree-menu > ul > li.jstree-node").length:e("#js-tree-menu > ul > li.jstree-node[id='"+s+"'] > ul.jstree-children > li").length+1,e.ajax({url:wcp_settings.ajax_url,data:{parent_id:s,type:wcp_settings.post_type,action:"wcp_add_new_folder",nonce:wcp_settings.nonce,term_id:s,order:u,name:folderNameDynamic,is_duplicate:d,duplicate_from:c},method:"post",success:function(t){if(result=e.parseJSON(t),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),-1==result.status)e("#no-more-folder-credit").show();else if("1"==result.status){if(o=parseInt(result.is_key_active),a=parseInt(result.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),H(),C(),result.data.length)for(var s=0;s<result.data.length;s++){var r={folder_id:result.data[s].term_id,folder_count:0,is_sticky:result.data[s].is_sticky,is_high:result.data[s].is_high,nonce:result.data[s].nonce,slug:result.data[s].slug,is_deleted:0};h.push(r),e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.data[s].term_id,text:" "+result.data[s].title},"last",function(){e(".jstree-node[id='"+result.data[s].term_id+"']").attr("data-nonce",result.data[s].nonce),e(".jstree-node[id='"+result.data[s].term_id+"']").attr("data-slug",result.data[s].slug)})}O(),z(),e("#media-attachment-taxonomy-filter").length&&(p=result.term_id,A(0))}else e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1})}),e(document).ready(function(){e("#inline-update").click(function(){e("#js-tree-menu a.jstree-clicked").length&&(p=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),S())}),e(document).on("click",".rename-folder",function(t){t.stopPropagation(),p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),S(),e(".dynamic-menu").remove()}),e(document).on("click",".form-cancel-btn",function(){e(".folder-popup-form").hide()}),e(document).on("click",".folder-popup-form",function(t){e(".folder-popup-form").hide()}),e(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),folderNameDynamic=e("#update-folder-item-name").val(),""==e.trim(folderNameDynamic)?(e(".folder-form-errors").addClass("active"),e("#update-folder-item-name").focus()):(e("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#update-folder-item").addClass("disabled"),s=j(p,"nonce"),parentID=e(".jstree-node[id='"+p+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:wcp_settings.ajax_url,data:{parent_id:parentID,type:wcp_settings.post_type,action:"wcp_update_folder",nonce:s,term_id:p,order:u,name:folderNameDynamic},method:"post",success:function(t){result=e.parseJSON(t),"1"==result.status?(e("#js-tree-menu").jstree("rename_node",result.id," "+result.term_title),folderPostId=y(result.id),null!=folderPostId&&(h[folderPostId].nonce=result.nonce,h[folderPostId].slug=result.slug),C(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),O(),e("#media-attachment-taxonomy-filter").length&&A(0)):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show())}})),!1})}),e(document).ready(function(){e("#inline-remove").click(function(){e("#js-tree-menu a.jstree-clicked").length?(p=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),D(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#folder-hide-show-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),D(1))}),e(document).on("click","#folder-hide-show-checkbox",function(){e(this).is(":checked")?e("#js-tree-menu").addClass("show-folder-checkbox"):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"))}),e(document).on("click",".folder-checkbox, .input-checkbox",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click",".remove-folder",function(){folderID=e(this).closest("li.jstree-node").data("id"),p=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),D(0),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")}),e(document).on("click","#remove-folder-item",function(t){t.stopPropagation(),e(".folder-popup-form").addClass("disabled"),e("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),s=j(p,"nonce"),m?function(){if(e("#folder-hide-show-checkbox").is(":checked")&&e("#js-tree-menu input.checkbox:checked").length>0){var t="";e("#js-tree-menu input.checkbox:checked").each(function(){t+=e(this).closest("li.jstree-node").attr("id")+",",e(this).closest("li.jstree-node").hasClass("jstree-clicked")&&!0}),e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+wcp_settings.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),i=0;i<t.term_ids.length;i++)e("#js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),O(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),b(),z(),O(),e("#js-tree-menu li.jstree-node").removeClass("has-sub-tree"),e("#js-tree-menu li.jstree-node").each(function(){e(this).find("ul.ui-sortable li").length?e(this).addClass("has-sub-tree"):e(this).removeClass("active")}),e("#wcp_folder_"+l).length||(e(".header-posts a").trigger("click"),l=0)}else window.location.reload();e("#folder-hide-show-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_folder&term_id="+p+"&nonce="+s,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(p),o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+p).remove(),C(),O(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),b(),z(),l==p&&e(".header-posts").trigger("click")):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".mark-folder",function(t){t.stopPropagation(),e(this).closest("li.jstree-node").length?folderID=e(this).closest("li.jstree-node").attr("id"):folderID=e(this).closest("li.sticky-fldr").data("folder-id"),s=j(folderID,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:wcp_settings.ajax_url,data:"term_id="+folderID+"&type="+wcp_settings.post_type+"&action=wcp_mark_un_mark_folder&nonce="+s,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=y(t.id),"1"==t.marked?(e("li.jstree-node[id='"+t.id+"']").addClass("is-high"),e(".sticky-folder-"+t.id).addClass("is-high"),null!=folderPostId&&(h[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(h[folderPostId].is_high=0)),C(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".jstree-node .jstree-icon",function(){folderID=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+folderID+"']").hasClass("jstree-open")?folderStatus=0:folderStatus=1,e(".form-loader-count").css("width","100%"),s=j(folderID,"nonce"),H(),e.ajax({url:wcp_settings.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+folderID+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+folderID).hasClass("active")?(e("#wcp_folder_"+folderID).removeClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+folderID).addClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),O())}})})}),e(document).ready(function(){e(document).on("click","a.jstree-anchor",function(t){if(t.stopPropagation(),e(".un-categorised-items").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e("active-item").removeClass("active-item"),l=e(this).closest("li.jstree-node").attr("id"),p=e(this).closest("li.jstree-node").attr("id"),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item"),e("#media-attachment-taxonomy-filter").length){var s=e(this).closest("li.jstree-node").attr("id");e("#media-attachment-taxonomy-filter").val(s),e("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=j(s,"slug"),g=wcp_settings.page_url+thisSlug;var o={Title:thisSlug,Url:g};history.pushState(o,o.Title,o.Url),N(thisSlug),e(".custom-media-select").removeClass("active")}else{var a=j(l,"slug");g=wcp_settings.page_url+a,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:a,Url:g};history.pushState(t,t.Title,t.Url),N(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),k()}):e("#wpbody").load(g+" #wpbody-content",function(){var t={Title:a,Url:g};history.pushState(t,t.Title,t.Url),N(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),k()})}x(),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")}),e(".header-posts").click(function(){if(l="",e(".wcp-container .route").removeClass("active-item"),e(".un-categorised-items").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".header-posts a").addClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){l="",e("#media-attachment-taxonomy-filter").val("all"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url};history.pushState(t,t.Title,t.Url),N("all"),x()}else g=wcp_settings.page_url,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()}):e("#wpbody").load(g+" #wpbody-content",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()})}),e(".un-categorised-items").click(function(){if(l="-1",e(".wcp-container .route").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e(".un-categorised-items").addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){e("#media-attachment-taxonomy-filter").val("unassigned"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url+"-1"};history.pushState(t,t.Title,t.Url),N("-1"),x()}else g=wcp_settings.page_url+"-1",e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(g+" #posts-filter",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()}):e("#wpbody").load(g+" #wpbody-content",function(){var t={Title:"",Url:g};history.pushState(t,t.Title,t.Url),N("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),x(),k()})}),e("#expand-collapse-list").click(function(t){t.stopPropagation(),statusType=0,e(this).hasClass("all-open")?(e(this).removeClass("all-open"),statusType=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),statusType=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),f="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){f+=e(this).attr("id")+","}),""!=f&&(e(".form-loader-count").css("width","100%"),s=wcp_settings.nonce,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_all_status&status="+statusType+"&folders="+f+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status&&(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),H()}),e(document).ready(function(){e(document).on("click","body, html",function(){e(".folder-order").removeClass("active")}),e(document).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click",".folder-sort-menu a",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),lastOrderStatus=e(this).attr("data-sort"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_folders_by_order&nonce="+wcp_settings.nonce+"&order="+e(this).attr("data-sort"),method:"post",success:function(t){1==(t=e.parseJSON(t)).status&&(e("#js-tree-menu").jstree().destroy(),e("#js-tree-menu").append("<ul></ul>"),e("#js-tree-menu ul").html(t.data),P(),_=t.terms,J()),e(".form-loader-count").css("width","0"),x()}})})}),e(document).ready(function(){e(document).on("keyup","#folder-search",function(){T()}),e(document).on("change","#folder-search",function(){T()}),e(document).on("blur","#folder-search",function(){T()})}),e(document).ready(function(){e(document).on("click",".folders-toggle-button",function(){dbStatus="show",e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").animate({height:"40px"},100,function(){e(".tree-structure-content").removeClass("active")}),dbStatus="hide"):(newHeight=parseInt(e(".tree-structure-content .tree-structure").attr("data-height")),e(".tree-structure-content .tree-structure").animate({height:newHeight},100,function(){e(".tree-structure-content").addClass("active")})),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_hide_folders&status="+dbStatus+"&nonce="+wcp_settings.nonce,method:"post",success:function(e){}})})}),"attachment"==wcp_settings.post_type){e(document).ready(function(){"show"==wcp_settings.show_in_page&&e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div><div class="folders-toggle-button"><span></span></div></div>'),C(),U()}),e(window).on("load",function(){e("button.button.media-button.select-mode-toggle-button").after("<button class='button organize-button'>Bulk Organize</button>"),e(".media-toolbar-secondary").append("<span class='media-info-message'>Drag and drop your media files to the relevant folders</span>"),e(".delete-selected-button").before("<button type='button' class='button button-primary select-all-item-btn'>Select All</button>"),e(".media-toolbar-secondary").after("<div class='custom-media-select'>Move Selected files to: <select class='media-select-folder'></select></div>"),e(".media-toolbar").append("<div style='clear:both;'></div><div class='media-folder-loader'><span>Uploading files</span> <span id='current_upload_files'></span>/<span id='total_upload_files'></span><div class='folder-progress'><div class='folder-meter orange-bg'><span></span></div></div></div>"),e(".wcp-custom-form").length&&(wp.Uploader!==t&&wp.Uploader.queue.on("reset",function(){A(1)}),e(document).ajaxComplete(function(e,t,s){actionName=s.data,"undefined"!=typeof actionName&&actionName.length&&0==actionName.indexOf("action=delete-post&id=")&&A(0)})),setTimeout(function(){docReferrar=document.referrer,-1!=docReferrar.indexOf("wp-admin/upload.php")?(mediaMode=function(e){for(var t=e+"=",s=document.cookie.split(";"),o=0;o<s.length;o++){for(var a=s[o];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}("media-select-mode"),"on"==mediaMode&&(e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?e(".media-info-message").addClass("active"):e(".media-info-message, .custom-media-select").removeClass("active"))):F("media-select-mode"),A(1)},1e3),e(document).on("click",".attachments-browser ul.attachments .thumbnail",function(){e(".media-toolbar").hasClass("media-toolbar-mode-select")&&(0==e("ul.attachments li.selected").length?e(".custom-media-select").removeClass("active"):e(".custom-media-select").addClass("active"))}),e(document).on("change",".media-select-folder",function(){if(""!=e(this).val()){var t="";e(".attachments-browser li.attachment.selected").each(function(){t+=e(this).attr("data-id")+","}),"-1"==e(this).val()?e.ajax({url:wcp_settings.ajax_url,data:"post_id="+t+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+e(this).val()+"&nonce="+wcp_settings.nonce+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){0!=p&&p!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),b(),O()}}):(s=j(e(this).val(),"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+t+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+e(this).val()+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){t=e.parseJSON(t),e("#bulk-move-folder").hide(),"1"==t.status?(0!=p&&p!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),b(),O()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}}))}})});var R=null;function A(s){R=e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_get_default_list&active_id="+l,method:"post",beforeSend:function(){null!=R&&R.abort()},success:function(o){if(o=e.parseJSON(o),e(".header-posts .total-count").text(o.total_items),e(".un-categorised-items .total-count").text(o.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==s){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()?(a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset()):a.media.frame.library.props.set({ignore:+new Date}))}_=o.taxonomies,J(),""!=l&&e("#wcp_folder_"+l).addClass("active-item"),n&&(e("#title_"+p).trigger("click"),n=!1)}})}function M(){e(".media-frame-content .media-toolbar").width(e(".media-frame-content").width()-20)}function V(e,t,s){var o="";if(s){var a=new Date;a.setTime(a.getTime()+24*s*60*60*1e3),o="; expires="+a.toUTCString()}document.cookie=e+"="+(t||"")+o+"; path=/"}function F(e){document.cookie=e+"=; Max-Age=-99999999;"}M(),e(window).resize(function(){M()}),e(document).ready(function(){}),e(document).on("click",".button.organize-button",function(){e(".media-frame").hasClass("mode-select")?F("media-select-mode"):V("media-select-mode","on",7),e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))}),e(document).on("click",".select-mode-toggle-button",function(){setTimeout(function(){e(".media-frame").hasClass("mode-select")||V("media-select-mode","off",-1),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))},10)}),e(document).on("click",".select-all-item-btn",function(){e("ul.attachments li:not(.selected)").trigger("click")}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(p=0,n=!0,I())}),e(window).scroll(function(){})}else;});
assets/js/page-post-media.js CHANGED
@@ -555,37 +555,43 @@
555
  method: 'post',
556
  success: function (res) {
557
  result = $.parseJSON(res);
558
- if (result.status == '1') {
 
 
 
 
559
  isKeyActive = parseInt(result.is_key_active);
560
  n_o_file = parseInt(result.folders);
561
  $("#current-folder").text(n_o_file);
562
  $("#ttl-fldr").text((4*4)-(2*2)-2);
563
  checkForExpandCollapse();
564
- $(".folder-popup-form").hide();
565
- $(".folder-popup-form").removeClass("disabled");
566
- var folderProperty = {
567
- 'folder_id': result.term_id,
568
- 'folder_count': 0,
569
- 'is_sticky': 0,
570
- 'is_high': 0,
571
- 'nonce': result.nonce,
572
- 'slug': result.slug,
573
- 'is_deleted': 0
574
- };
575
- folderPropertyArray.push(folderProperty);
 
 
 
 
 
 
 
 
 
 
576
  ajaxAnimation();
577
  make_sticky_folder_menu();
578
- $('#js-tree-menu').jstree().create_node(result.parent_id, { "id" : result.term_id, "text" : " "+result.title }, "last", function(){
579
- $(".jstree-node[id='"+result.term_id+"']").attr("data-nonce", result.nonce);
580
- $(".jstree-node[id='"+result.term_id+"']").attr("data-slug", result.slug);
581
- });
582
- //if($("#media-attachment-taxonomy-filter").length) {
583
- fileFolderID = result.term_id;
584
- resetMediaData(0);
585
- //}
586
  } else {
587
- $(".folder-popup-form").hide();
588
- $(".folder-popup-form").removeClass("disabled");
589
  $("#error-folder-popup-message").html(result.message);
590
  $("#error-folder-popup").show();
591
  }
555
  method: 'post',
556
  success: function (res) {
557
  result = $.parseJSON(res);
558
+ $(".folder-popup-form").hide();
559
+ $(".folder-popup-form").removeClass("disabled");
560
+ if (result.status == -1) {
561
+ $("#no-more-folder-credit").show();
562
+ } else if (result.status == '1') {
563
  isKeyActive = parseInt(result.is_key_active);
564
  n_o_file = parseInt(result.folders);
565
  $("#current-folder").text(n_o_file);
566
  $("#ttl-fldr").text((4*4)-(2*2)-2);
567
  checkForExpandCollapse();
568
+ add_menu_to_list();
569
+ if(result.data.length) {
570
+ for(var i=0; i<result.data.length; i++) {
571
+ var folderProperty = {
572
+ 'folder_id': result.data[i].term_id,
573
+ 'folder_count': 0,
574
+ 'is_sticky': result.data[i]['is_sticky'],
575
+ 'is_high': result.data[i]['is_high'],
576
+ 'nonce': result.data[i]['nonce'],
577
+ 'slug': result.data[i]['slug'],
578
+ 'is_deleted': 0
579
+ };
580
+ folderPropertyArray.push(folderProperty);
581
+ $('#js-tree-menu').jstree().create_node(result.parent_id, {
582
+ "id": result.data[i]['term_id'],
583
+ "text": " " + result.data[i]['title']
584
+ }, "last", function () {
585
+ $(".jstree-node[id='" + result.data[i]['term_id'] + "']").attr("data-nonce", result.data[i]['nonce']);
586
+ $(".jstree-node[id='" + result.data[i]['term_id'] + "']").attr("data-slug", result.data[i]['slug']);
587
+ });
588
+ }
589
+ }
590
  ajaxAnimation();
591
  make_sticky_folder_menu();
592
+ fileFolderID = result.term_id;
593
+ resetMediaData(0);
 
 
 
 
 
 
594
  } else {
 
 
595
  $("#error-folder-popup-message").html(result.message);
596
  $("#error-folder-popup").show();
597
  }
assets/js/page-post-media.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){var o=".folder-modal #js-tree-menu",s=[],a=-1,r=0,d=0,l="",n=-1,c=0,m="",p=folders_media_options.page_url,f="",u="",h=!1,v=!1,g=!1,y=0,j=0,w=[],k=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter",createFilters:function(){var e={};folders_media_options.terms.length;_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.count+")",props:{media_folder:t.slug}}}),e.all={text:"All Folders",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e},change:function(){var e={};_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.count+")",props:{media_folder:t.slug}}}),e.all={text:"Select a folder >>",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e;var t=this.filters[this.el.value];t&&this.model.set(t.props)}}),x=0,b=0,C=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){C.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryOrganizerTaxonomyFilter",new k({controller:this.controller,model:this.collection.props,priority:-75}).render())}});var S,I=wp.media.model.Query;_.extend(I,{get:(S=[],function(e,t){var o,s={},a=I.orderby,r=I.defaultProps;return delete e.query,delete e.cache,_.defaults(e,r),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(e,t){_.isNull(e)||(s[I.propmap[t]||t]=e)}),_.defaults(s,I.defaultArgs),s.orderby=a.valuemap[e.orderby]||e.orderby,S=[],o||(o=new I([],_.extend(t||{},{props:e,args:s})),S.push(o)),o})});var P=window.wp;void 0!==P&&"function"==typeof P.Uploader&&(P.media.view.Modal.prototype.on("open",function(){setTimeout(function(){e("#media-attachment-taxonomy-filter").length&&("all"==e("#media-attachment-taxonomy-filter").val()&&(e("#media-attachment-taxonomy-filter option:gt(1)").remove(),_.each(folders_media_options.terms,function(t,o){e("#media-attachment-taxonomy-filter").append("<option value='"+t.term_id+"'>"+t.name+" ("+t.trash_count+")</option>")})),e("#wcp-content").length||e(".editor-post-featured-image").length&&e(".attachment-filters").val("all").trigger("change"))},100)}),e.extend(P.Uploader.prototype,{progress:function(){},init:function(){this.uploader&&(this.uploader.bind("FileFiltered",function(t,o){x++,e(".folder-meter").css("width","0%"),e(".media-folder-loader").show(),e("#total_upload_files").text(x)}),this.uploader.bind("BeforeUpload",function(t,o){var s=a,r=t.settings.multipart_params;if((s=parseInt(s))>0&&(r.folder_for_media=s),b<x){e(".media-folder-loader").show();var d=b/x*100;e(".folder-meter").css("width",d+"%")}b++,e("#current_upload_files").text(b)}),this.uploader.bind("UploadComplete",function(e,t){a=-1}),this.uploader.bind("UploadComplete",function(t,o){var s=window.wp;e(".folder-meter").css("width","100%"),setTimeout(function(){e(".media-folder-loader").hide(),e(".folder-meter").css("width","0%"),x=0,b=0},1250),function(){e("#media-attachment-taxonomy-filter").val();D=e.ajax({url:folders_media_options.ajax_url,data:"type=attachment&action=wcp_get_default_list&active_id=0",method:"post",beforeSend:function(){null!=D&&D.abort()},success:function(t){var t=e.parseJSON(t);w=t.taxonomies,V(),U()}})}(),void 0!==s.media.frame&&null!==s.media.frame.content.get()?(s.media.frame.content.get().collection.props.set({ignore:+new Date}),s.media.frame.content.get().options.selection.reset()):e("#media-attachment-taxonomy-filter").length&&e(".attachment-filters").each(function(){e(this).trigger("change")})}))}}));var D,N=window.wp;if(void 0!==N&&"function"==typeof N.Uploader){var A=window.wp.media,O=A.view.Modal;A.view.Modal=A.view.Modal.extend({className:"folder-modal",initialize:function(){O.prototype.initialize.apply(this,arguments)},open:function(){O.prototype.open.apply(this,arguments)&&(e(".folder-modal").length||e(".supports-drag-drop").length&&e(".supports-drag-drop").each(function(){"block"!=e(this).css("display")&&"inline-block"!=e(this).css("display")||(console.log("class added"),e(this).addClass("folder-modal"))}),e(".folder-modal").length?(e(".folder-custom-menu").remove(),e(".folder-modal .media-frame-tab-panel").removeClass("has-folder-menu"),e(".folder-modal .media-frame").hasClass("hide-menu")?e(".folder-custom-menu").length||(e(".folder-modal .media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){R(),J()})):e(".folder-custom-menu").length||(e(".folder-modal .media-frame-menu").addClass("has-folder-menu"),e(".folder-modal .media-frame-menu .media-menu").append("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){R(),J()})),e(".folder-form-data").remove(),e(".media-frame-tab-panel:first").before("<div class='folder-form-data'></div>"),e(".folder-form-data").load(folders_media_options.media_page_url+" #folder-add-update-content",function(){})):setTimeout(function(){-1!=a&&e("#media-attachment-taxonomy-filter").each(function(){e(this).val(a),e(this).trigger("change")})},1e3))},close:function(){O.prototype.close.apply(this,arguments),e(".folder-modal").removeClass("folder-modal")}})}function U(){e(".jstree-anchor:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){r=e(this).closest("li.jstree-node").attr("id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),m=T(r,"nonce"),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?M():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?M():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),u=chkStr,e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}}))}}),e(".media-frame:not(.hide-router) .attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,o){e(".selected-items").remove();var s=e(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length;return e("<div class='selected-items'><span class='total-post-count'>"+(s=0==s||1==s?"1 Item":s+" Items")+" Selected</span></div>")},start:function(t,o){e("body").addClass("no-hover-css")},cursor:"move",appendTo:".media-modal",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".un-categorised-items").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){r=-1,m=folders_media_options.nonce,o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:folders_media_options.ajax_url,data:"post_id="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M()}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,chkStr=postID+",",e(".wp-list-table input:checked").each(function(){postID!=e(this).val()&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_id="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),u=chkStr,e.ajax({url:folders_media_options.ajax_url,data:"post_id="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M()}}))}}),e(".tree-structure .folder-item:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){e("body").removeClass("no-hover-css"),r=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(m=T(r,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}}))}}),e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,o){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,o){e(this).closest("td").removeClass("wcp-draggable"),e("body").removeClass("no-hover-css")}}),e(".wcp-move-multiple:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,o){return e(".selected-items").remove(),selectedItems=e("#the-list th input:checked").length,selectedItems>0?(selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")):e("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(t,o){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}})}function J(){e(o).jstree({core:{cache:!1,animation:0,check_callback:function(t,o,s,a,r){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&r&&r.dnd)switch(r.pos){case"a":r.origin.get_node(r.ref,!0).addClass("drag-bot"),nodeId=e(".drag-bot").attr("id"),e("#jstree-dnd").text("Below "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"i":r.origin.get_node(r.ref,!0).addClass("drag-in"),nodeId=e(".drag-in").attr("id"),e("#jstree-dnd").text("Inside "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"b":r.origin.get_node(r.ref,!0).addClass("drag-up"),nodeId=e(".drag-up").attr("id"),e("#jstree-dnd").text("Above "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;default:e("#jstree-dnd").text(e("#jstree-dnd").data("txt"))}return!0}},data:{cache:!1},select_node:!1,search:{show_only_matches:!0,case_sensitive:!1,fuzzy:!1},plugins:["dnd","search","contextmenu"],contextmenu:{select_node:0,show_at_node:0,items:function(){return{}}}}).bind("ready.jstree",function(){!function(){e("#js-tree-menu .jstree-node").each(function(){var t=parseInt(e(this).data("count"));t>0&&e(".jstree-node[id='"+e(this).attr("id")+"'] > a span.premio-folder-count").text(t)}),""!=f&&0!=f&&e(".jstree-node[id='"+f+"']").length&&(e("#js-tree-menu").jstree("select_node",f),e(".sticky-folders .sticky-folder-"+f+" a").length&&e(".sticky-folders .sticky-folder-"+f+" a").addClass("active-item"));e(".ajax-preloader").hide(),e(".js-tree-data").show(),F(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active")}(),U()}).bind("after_open.jstree",function(){U()}).bind("open_all.jstree",function(){U()}).bind("create_node.jstree",function(){U()}).bind("delete_node.jstree",function(){U()}).bind("close_all.jstree",function(){U()}).bind("after_close.jstree",function(){U()}).bind("move_node.jstree",function(t,o){folderMoveId=o.node.id,orderString="",e(".folder-modal .jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e(".folder-modal #"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?parentID=e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().attr("id"):parentID=0,""!=orderString&&(e(".form-loader-count").css("width","100%"),e.ajax({url:folders_media_options.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+folders_media_options.post_type+"&nonce="+folders_media_options.nonce+"&term_id="+folderMoveId+"&parent_id="+parentID,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#wcp_folder_parent").html(t.options),e(".form-loader-count").css("width","0"),M(),Y(),V(),U()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),U()}function T(e,t){if(s.length>0)for(i=0;i<s.length;i++)if(parseInt(s[i].folder_id)==parseInt(e))return s[i][t];return""}function H(e){if(s.length>0)for(i=0;i<s.length;i++)if(parseInt(s[i].folder_id)==parseInt(e))return i;return null}function F(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var o=e(this).attr("id"),s=e.trim(e("#js-tree-menu").jstree(!0).get_node(o).text),a=(e("#"+o+"_anchor .premio-folder-count").text(),e("li.jstree-node[id='"+o+"']").hasClass("is-high")?" is-high ":"");t+="<li data-folder-id='"+o+"' class='sticky-fldr "+a+" sticky-folder-"+o+"'><a href='javascript:;'><span class='folder-title'>"+s+"</span><span class='folder-actions'><span class='update-inline-record'><i class='pfolder-edit-folder'></i></span><span class='star-icon'><i class='pfolder-star'></i></span><span class='premio-folder-count'></span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var o=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+o+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active")}function M(){if(e(".media-toolbar").hasClass("media-toolbar-mode-select")&&e("ul.attachments li.selected").length&&(e("ul.attachments li.selected").trigger("click"),e(".select-mode-toggle-button").trigger("click")),""!=u&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==f)){if(e("#media-attachment-taxonomy-filter").length){u=u.split(",");for(var t=0;t<u.length;t++)""!=u[t]&&e(".attachments-browser li[data-id='"+u[t]+"']").remove()}u=""}e("#media-attachment-taxonomy-filter").length?Q(0):(e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=get_folders_default_list",method:"post",success:function(t){t=e.parseJSON(t),e(".header-posts .total-count").text(t.total_items),e(".un-categorised-items .total-count").text(t.empty_items),w=t.taxonomies,V(),U()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(p+" #posts-filter",function(){var t={Title:"",Url:p};history.pushState(t,t.Title,t.Url),"show"!=folders_media_options.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),triggerInlineUpdate()}):e("#wpbody").load(p+" #wpbody-content",!1,function(t){var o={Title:"",Url:p};history.pushState(o,o.Title,o.Url),"show"!=folders_media_options.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>')}))}function V(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=w;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),w;for(var o=0;o<w.length;o++)t.append("<option value='"+w[o].term_id+"'>"+w[o].name+" ("+w[o].trash_count+")</option>");t.val(currentDDVal).trigger("change")}),e("select.folder_for_media").length)){var t=e("select.folder_for_media").val();e("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var o=0;o<w.length;o++)e("select.folder_for_media option:last-child").before("<option value='"+w[o].term_id+"'>"+w[o].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),o=0;o<w.length;o++)0!=parseInt(w[o].trash_count)&&(e(".jstree-node[id='"+w[o].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(w[o].trash_count),e(".sticky-folder-"+w[o].term_id+" .premio-folder-count").text(w[o].trash_count));""!=f&&e("#wcp_folder_"+f).addClass("active-item"),v&&(e("#title_"+d).trigger("click"),v=!1)}function z(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function q(t){var o="Are you sure you want to delete the selected folder?",s="Items in the folder will not be deleted.";if(h=!1,1==t&&e("#folder-hide-show-checkbox").is(":checked")){if(h=!0,0==e("#js-tree-menu input.checkbox:checked").length)return e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html("Please select at least one folder to delete"),void e("#error-folder-popup").show();e("#js-tree-menu input.checkbox:checked").length>1&&(o="Are you sure you want to delete the selected folders?",s="Items in the selected folders will not be deleted.")}e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#remove-folder-item").text("Yes, Delete it!"),e("#remove-folder-message").text(o),e("#remove-folder-notice").text(s),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function B(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(d).text),parentID=e("#wcp_folder_"+d).closest("li.jstree-node").data("folder-id"),parentID==t&&(parentID=0),e("#update-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#update-folder-item-name").val(folderName),e("#update-folder-item").removeClass("disabled"),e("#update-folder-item").show(),e("#update-folder-item-name").focus(),e(".dynamic-menu").remove()}function E(){if(0==c&&n>=10)return e("#folder-limitation-message").html("You've reached the 10 folder limitation!"),e("#no-more-folder-credit").show(),!1;e("#add-update-folder-title").text("Add new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),g&&(y=d,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(d).text)+" #2"),d=e("#"+d+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+d+"_anchor").closest(".jstree-node").parent().parent().attr("id"):0),e("#add-update-folder").removeClass("disabled"),e("#add-update-folder").show(),e("#add-update-folder-name").focus(),e(".dynamic-menu").remove()}function R(){setTimeout(function(){if(e("#js-tree-menu .jstree-node.jstree-leaf").length==e("#js-tree-menu .jstree-node").length)e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand");else{var t=e("#js-tree-menu .jstree-node.jstree-closed").length+e("#js-tree-menu .jstree-node.jstree-open").length;e("#js-tree-menu .jstree-node.jstree-closed").length==t?(e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand")):(e("#expand-collapse-list").addClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Collapse"))}},500),U()}function Q(o){D=e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_get_default_list&active_id="+f,method:"post",beforeSend:function(){null!=D&&D.abort()},success:function(s){if(s=e.parseJSON(s),e(".header-posts .total-count").text(s.total_items),e(".un-categorised-items .total-count").text(s.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==o){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()?(a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset()):a.media.frame.library.props.set({ignore:+new Date}))}w=s.taxonomies,V(),U()}})}function Y(){e(".folder-loader-ajax").addClass("active"),e(".folder-loader-ajax img").removeClass("active"),e(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){e(".folder-loader-ajax").removeClass("active"),e(".folder-loader-ajax img").addClass("active"),e(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3),U()}e(document).ready(function(){e(document).ajaxComplete(function(e,o,s){s.data!=t&&""!=s.data&&-1!=s.data.indexOf("action=query-attachments")&&U()}),w=folders_media_options.terms,c=parseInt(folders_media_options.is_key_active),n=parseInt(folders_media_options.folders),s=folders_media_options.folder_settings,e(document).on("click",".header-posts a.all-posts",function(t){d=0,f="",a="all",e(".active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("all").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("all").trigger("change")}),e(document).on("click",".un-categorised-items",function(t){d=0,f="",a="unassigned",e(".active-item").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("unassigned").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("-1").trigger("change")}),e(document).on("click","a.jstree-anchor",function(t){var o,s=e(this).closest("li.jstree-node").attr("id");a=d=s,e(this).closest(".folder-modal").find(".active-item").removeClass("active-item"),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").val(s),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=T(s,"slug"),o=thisSlug,e.ajax({url:folders_media_options.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+folders_media_options.post_type+"&post_id="+o+"&nonce="+folders_media_options.nonce,cache:!1,async:!1,success:function(){}}),e(".custom-media-select").removeClass("active")}),e(document).on("change",".folder_for_media",function(){"add-folder"!=e(this).val()&&null!=e(this).val()?a=e(this).val():"add-folder"==e(this).val()&&(a=-1)}),e(document).on("click",".update-inline-record",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=folders_media_options.can_manage_folder&&(isHigh=e(this).closest("li.sticky-fldr").hasClass("is-high"),isSticky=e(this).closest("li.sticky-fldr").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("li").append(menuHtml),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click","body, html",function(t){e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e(".folder-order").removeClass("active")}),e(document).on("click",".dynamic-menu, .folder-order",function(e){e.stopPropagation()}),e(document).on("contextmenu",".jstree-anchor",function(t){return e(this).find("span.folder-inline-edit").trigger("click"),!1}),e(document).on("click",".folder-actions span.folder-inline-edit",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=folders_media_options.can_manage_folder&&(isHigh=e(this).closest("li.jstree-node").hasClass("is-high"),isSticky=e(this).closest("li.jstree-node").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("a.jstree-anchor").after(menuHtml),e(this).parents("li.jstree-node").addClass("active-menu"),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click",".dynamic-menu",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","body, html",function(){e(".dynamic-menu").remove()}),e(document).on("click",".new-folder",function(t){t.stopPropagation(),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),v=!1,g=!1,E()}),e(document).on("click","#add-new-folder",function(t){d=e("#custom-menu li.active-item").length?e("#custom-menu li.active-item").data("folder-id"):0,v=!1,E()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),l=e("#add-update-folder-name").val(),""==e.trim(l))e(".folder-form-errors").addClass("active"),e("#add-update-folder-name").focus();else{e("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#add-update-folder").addClass("disabled");var o=d;v&&(o=0),j=0==o?e("#js-tree-menu > ul > li.jstree-node").length:e("#js-tree-menu > ul > li.jstree-node[id='"+o+"'] > ul.jstree-children > li").length+1,e.ajax({url:folders_media_options.ajax_url,data:{parent_id:o,type:folders_media_options.post_type,action:"wcp_add_new_folder",nonce:folders_media_options.nonce,term_id:o,order:j,name:l,is_duplicate:g,duplicate_from:y},method:"post",success:function(t){if(result=e.parseJSON(t),"1"==result.status){c=parseInt(result.is_key_active),n=parseInt(result.folders),e("#current-folder").text(n),e("#ttl-fldr").text(10),R(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled");var o={folder_id:result.term_id,folder_count:0,is_sticky:0,is_high:0,nonce:result.nonce,slug:result.slug,is_deleted:0};s.push(o),Y(),F(),e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.term_id,text:" "+result.title},"last",function(){e(".jstree-node[id='"+result.term_id+"']").attr("data-nonce",result.nonce),e(".jstree-node[id='"+result.term_id+"']").attr("data-slug",result.slug)}),d=result.term_id,Q(0)}else e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1}),e(document).on("click",".form-cancel-btn",function(){e(".folder-popup-form").hide()}),e(document).on("click",".folder-popup-form",function(t){e(".folder-popup-form").hide()}),e(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),document.onkeydown=function(t){("key"in(t=t||window.event)?"Escape"===t.key||"Esc"===t.key:27===t.keyCode)&&e(".folder-popup-form").hide()},e(document).on("click",".rename-folder",function(t){t.stopPropagation(),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),B(),e(".dynamic-menu").remove()}),e(document).on("click","#inline-update",function(t){e("#js-tree-menu a.jstree-clicked").length&&(d=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),B())}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),l=e("#update-folder-item-name").val(),""==e.trim(l)?(e(".folder-form-errors").addClass("active"),e("#update-folder-item-name").focus()):(e("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#update-folder-item").addClass("disabled"),m=T(d,"nonce"),parentID=e(".jstree-node[id='"+d+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:folders_media_options.ajax_url,data:{parent_id:parentID,type:folders_media_options.post_type,action:"wcp_update_folder",nonce:m,term_id:d,order:j,name:l},method:"post",success:function(t){result=e.parseJSON(t),"1"==result.status?(e("#js-tree-menu").jstree("rename_node",result.id," "+result.term_title),folderPostId=H(result.id),null!=folderPostId&&(s[folderPostId].nonce=result.nonce,s[folderPostId].slug=result.slug),e(".folder-popup-form").hide(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),Y(),e("#media-attachment-taxonomy-filter").length&&Q(0)):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show())}})),!1}),e(document).on("click",".mark-folder",function(t){t.stopPropagation(),r=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),m=T(r,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:folders_media_options.ajax_url,data:"term_id="+r+"&type="+folders_media_options.post_type+"&action=wcp_mark_un_mark_folder&nonce="+m,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=H(t.id),"1"==t.marked?(e("li.jstree-node[id='"+t.id+"']").addClass("is-high"),e(".sticky-folder-"+t.id).addClass("is-high"),null!=folderPostId&&(s[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(s[folderPostId].is_high=0)),Y()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})}),e(document).on("click",".duplicate-folder",function(t){t.stopPropagation(),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),e(".dynamic-menu").remove(),v=!1,g=!0,E()}),e(document).on("click",".remove-folder",function(){r=e(this).closest("li.jstree-node").data("id"),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),q(0),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")}),e(document).on("click","#remove-folder-item",function(t){t.stopPropagation(),e(".folder-popup-form").addClass("disabled"),e("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),m=T(d,"nonce"),h?function(){if(e("#folder-hide-show-checkbox").is(":checked")&&e("#js-tree-menu input.checkbox:checked").length>0){var t="";e("#js-tree-menu input.checkbox:checked").each(function(){t+=e(this).closest("li.jstree-node").attr("id")+",",e(this).closest("li.jstree-node").hasClass("jstree-clicked")&&!0}),e(".form-loader-count").css("width","100%"),e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+folders_media_options.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(c=parseInt(t.is_key_active),n=parseInt(t.folders),e("#current-folder").text(n),i=0;i<t.term_ids.length;i++)e(".folder-modal #js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),Y(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),M(),F(),Y(),e(".folder-modal #wcp_folder_"+f).length||(e(".header-posts a").trigger("click"),f=0)}else window.location.reload();e("#folder-hide-show-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_folder&term_id="+d+"&nonce="+m,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(d),c=parseInt(t.is_key_active),n=parseInt(t.folders),e("#current-folder").text(n),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+d).remove(),Y(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),M(),F(),f==d&&e(".header-posts").trigger("click")):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})}),e(document).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click","#expand-collapse-list",function(t){t.stopPropagation();var o=0;e(this).hasClass("all-open")?(e(this).removeClass("all-open"),o=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),o=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),u="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){u+=e(this).attr("id")+","}),""!=u&&(e(".form-loader-count").css("width","100%"),m=folders_media_options.nonce,e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_change_all_status&status="+o+"&folders="+u+"&nonce="+m,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status&&(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),e(document).on("click",".folder-sort-menu a",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),e(this).attr("data-sort"),e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_folders_by_order&nonce="+folders_media_options.nonce+"&order="+e(this).attr("data-sort"),method:"post",success:function(t){1==(t=e.parseJSON(t)).status&&(e("#js-tree-menu").jstree().destroy(),e("#js-tree-menu").append("<ul></ul>"),e("#js-tree-menu ul").html(t.data),w=t.terms,V(),J()),e(".form-loader-count").css("width","0")}})}),e(document).on("click",".jstree-node .jstree-icon",function(){r=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+r+"']").hasClass("jstree-open")?folderStatus=0:folderStatus=1,e(".form-loader-count").css("width","100%"),m=T(r,"nonce"),R(),e.ajax({url:folders_media_options.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+r+"&nonce="+m,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+r).hasClass("active")?(e("#wcp_folder_"+r).removeClass("active"),e("#wcp_folder_"+r).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+r).addClass("active"),e("#wcp_folder_"+r).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),Y())}})}),e(document).on("keyup","#folder-search",function(){z()}),e(document).on("change","#folder-search",function(){z()}),e(document).on("blur","#folder-search",function(){z()}),e(document).on("click","#folder-hide-show-checkbox",function(){e(this).is(":checked")?e("#js-tree-menu").addClass("show-folder-checkbox"):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"))}),e(document).on("click",".folder-checkbox, .input-checkbox",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","#inline-remove",function(){e("#js-tree-menu a.jstree-clicked").length?(d=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),q(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#folder-hide-show-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),q(1))}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(v=!0,e("#add-new-folder").trigger("click"))}),U()})});
1
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){var o=".folder-modal #js-tree-menu",s=[],a=-1,r=0,d=0,l="",n=-1,c=0,m="",p=folders_media_options.page_url,f="",u="",h=!1,v=!1,g=!1,y=0,j=0,w=[],k=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter",createFilters:function(){var e={};folders_media_options.terms.length;_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.count+")",props:{media_folder:t.slug}}}),e.all={text:"All Folders",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e},change:function(){var e={};_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.count+")",props:{media_folder:t.slug}}}),e.all={text:"Select a folder >>",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e;var t=this.filters[this.el.value];t&&this.model.set(t.props)}}),x=0,b=0,C=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){C.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryOrganizerTaxonomyFilter",new k({controller:this.controller,model:this.collection.props,priority:-75}).render())}});var S,I=wp.media.model.Query;_.extend(I,{get:(S=[],function(e,t){var o,s={},a=I.orderby,r=I.defaultProps;return delete e.query,delete e.cache,_.defaults(e,r),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(e,t){_.isNull(e)||(s[I.propmap[t]||t]=e)}),_.defaults(s,I.defaultArgs),s.orderby=a.valuemap[e.orderby]||e.orderby,S=[],o||(o=new I([],_.extend(t||{},{props:e,args:s})),S.push(o)),o})});var P=window.wp;void 0!==P&&"function"==typeof P.Uploader&&(P.media.view.Modal.prototype.on("open",function(){setTimeout(function(){e("#media-attachment-taxonomy-filter").length&&("all"==e("#media-attachment-taxonomy-filter").val()&&(e("#media-attachment-taxonomy-filter option:gt(1)").remove(),_.each(folders_media_options.terms,function(t,o){e("#media-attachment-taxonomy-filter").append("<option value='"+t.term_id+"'>"+t.name+" ("+t.trash_count+")</option>")})),e("#wcp-content").length||e(".editor-post-featured-image").length&&e(".attachment-filters").val("all").trigger("change"))},100)}),e.extend(P.Uploader.prototype,{progress:function(){},init:function(){this.uploader&&(this.uploader.bind("FileFiltered",function(t,o){x++,e(".folder-meter").css("width","0%"),e(".media-folder-loader").show(),e("#total_upload_files").text(x)}),this.uploader.bind("BeforeUpload",function(t,o){var s=a,r=t.settings.multipart_params;if((s=parseInt(s))>0&&(r.folder_for_media=s),b<x){e(".media-folder-loader").show();var d=b/x*100;e(".folder-meter").css("width",d+"%")}b++,e("#current_upload_files").text(b)}),this.uploader.bind("UploadComplete",function(e,t){a=-1}),this.uploader.bind("UploadComplete",function(t,o){var s=window.wp;e(".folder-meter").css("width","100%"),setTimeout(function(){e(".media-folder-loader").hide(),e(".folder-meter").css("width","0%"),x=0,b=0},1250),function(){e("#media-attachment-taxonomy-filter").val();D=e.ajax({url:folders_media_options.ajax_url,data:"type=attachment&action=wcp_get_default_list&active_id=0",method:"post",beforeSend:function(){null!=D&&D.abort()},success:function(t){var t=e.parseJSON(t);w=t.taxonomies,V(),U()}})}(),void 0!==s.media.frame&&null!==s.media.frame.content.get()?(s.media.frame.content.get().collection.props.set({ignore:+new Date}),s.media.frame.content.get().options.selection.reset()):e("#media-attachment-taxonomy-filter").length&&e(".attachment-filters").each(function(){e(this).trigger("change")})}))}}));var D,N=window.wp;if(void 0!==N&&"function"==typeof N.Uploader){var A=window.wp.media,O=A.view.Modal;A.view.Modal=A.view.Modal.extend({className:"folder-modal",initialize:function(){O.prototype.initialize.apply(this,arguments)},open:function(){O.prototype.open.apply(this,arguments)&&(e(".folder-modal").length||e(".supports-drag-drop").length&&e(".supports-drag-drop").each(function(){"block"!=e(this).css("display")&&"inline-block"!=e(this).css("display")||(console.log("class added"),e(this).addClass("folder-modal"))}),e(".folder-modal").length?(e(".folder-custom-menu").remove(),e(".folder-modal .media-frame-tab-panel").removeClass("has-folder-menu"),e(".folder-modal .media-frame").hasClass("hide-menu")?e(".folder-custom-menu").length||(e(".folder-modal .media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){R(),J()})):e(".folder-custom-menu").length||(e(".folder-modal .media-frame-menu").addClass("has-folder-menu"),e(".folder-modal .media-frame-menu .media-menu").append("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){R(),J()})),e(".folder-form-data").remove(),e(".media-frame-tab-panel:first").before("<div class='folder-form-data'></div>"),e(".folder-form-data").load(folders_media_options.media_page_url+" #folder-add-update-content",function(){})):setTimeout(function(){-1!=a&&e("#media-attachment-taxonomy-filter").each(function(){e(this).val(a),e(this).trigger("change")})},1e3))},close:function(){O.prototype.close.apply(this,arguments),e(".folder-modal").removeClass("folder-modal")}})}function U(){e(".jstree-anchor:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){r=e(this).closest("li.jstree-node").attr("id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),m=T(r,"nonce"),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?M():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?M():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),u=chkStr,e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}}))}}),e(".media-frame:not(.hide-router) .attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,o){e(".selected-items").remove();var s=e(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length;return e("<div class='selected-items'><span class='total-post-count'>"+(s=0==s||1==s?"1 Item":s+" Items")+" Selected</span></div>")},start:function(t,o){e("body").addClass("no-hover-css")},cursor:"move",appendTo:".media-modal",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".un-categorised-items").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){r=-1,m=folders_media_options.nonce,o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:folders_media_options.ajax_url,data:"post_id="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M()}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,chkStr=postID+",",e(".wp-list-table input:checked").each(function(){postID!=e(this).val()&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_id="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),u=chkStr,e.ajax({url:folders_media_options.ajax_url,data:"post_id="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M()}}))}}),e(".tree-structure .folder-item:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){e("body").removeClass("no-hover-css"),r=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(m=T(r,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,m=T(r,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+r+"&nonce="+m+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+f,method:"post",success:function(e){M(),Y()}}))}}),e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,o){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,o){e(this).closest("td").removeClass("wcp-draggable"),e("body").removeClass("no-hover-css")}}),e(".wcp-move-multiple:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,o){return e(".selected-items").remove(),selectedItems=e("#the-list th input:checked").length,selectedItems>0?(selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")):e("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(t,o){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}})}function J(){e(o).jstree({core:{cache:!1,animation:0,check_callback:function(t,o,s,a,r){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&r&&r.dnd)switch(r.pos){case"a":r.origin.get_node(r.ref,!0).addClass("drag-bot"),nodeId=e(".drag-bot").attr("id"),e("#jstree-dnd").text("Below "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"i":r.origin.get_node(r.ref,!0).addClass("drag-in"),nodeId=e(".drag-in").attr("id"),e("#jstree-dnd").text("Inside "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"b":r.origin.get_node(r.ref,!0).addClass("drag-up"),nodeId=e(".drag-up").attr("id"),e("#jstree-dnd").text("Above "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;default:e("#jstree-dnd").text(e("#jstree-dnd").data("txt"))}return!0}},data:{cache:!1},select_node:!1,search:{show_only_matches:!0,case_sensitive:!1,fuzzy:!1},plugins:["dnd","search","contextmenu"],contextmenu:{select_node:0,show_at_node:0,items:function(){return{}}}}).bind("ready.jstree",function(){!function(){e("#js-tree-menu .jstree-node").each(function(){var t=parseInt(e(this).data("count"));t>0&&e(".jstree-node[id='"+e(this).attr("id")+"'] > a span.premio-folder-count").text(t)}),""!=f&&0!=f&&e(".jstree-node[id='"+f+"']").length&&(e("#js-tree-menu").jstree("select_node",f),e(".sticky-folders .sticky-folder-"+f+" a").length&&e(".sticky-folders .sticky-folder-"+f+" a").addClass("active-item"));e(".ajax-preloader").hide(),e(".js-tree-data").show(),F(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active")}(),U()}).bind("after_open.jstree",function(){U()}).bind("open_all.jstree",function(){U()}).bind("create_node.jstree",function(){U()}).bind("delete_node.jstree",function(){U()}).bind("close_all.jstree",function(){U()}).bind("after_close.jstree",function(){U()}).bind("move_node.jstree",function(t,o){folderMoveId=o.node.id,orderString="",e(".folder-modal .jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e(".folder-modal #"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?parentID=e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().attr("id"):parentID=0,""!=orderString&&(e(".form-loader-count").css("width","100%"),e.ajax({url:folders_media_options.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+folders_media_options.post_type+"&nonce="+folders_media_options.nonce+"&term_id="+folderMoveId+"&parent_id="+parentID,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#wcp_folder_parent").html(t.options),e(".form-loader-count").css("width","0"),M(),Y(),V(),U()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),U()}function T(e,t){if(s.length>0)for(i=0;i<s.length;i++)if(parseInt(s[i].folder_id)==parseInt(e))return s[i][t];return""}function H(e){if(s.length>0)for(i=0;i<s.length;i++)if(parseInt(s[i].folder_id)==parseInt(e))return i;return null}function F(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var o=e(this).attr("id"),s=e.trim(e("#js-tree-menu").jstree(!0).get_node(o).text),a=(e("#"+o+"_anchor .premio-folder-count").text(),e("li.jstree-node[id='"+o+"']").hasClass("is-high")?" is-high ":"");t+="<li data-folder-id='"+o+"' class='sticky-fldr "+a+" sticky-folder-"+o+"'><a href='javascript:;'><span class='folder-title'>"+s+"</span><span class='folder-actions'><span class='update-inline-record'><i class='pfolder-edit-folder'></i></span><span class='star-icon'><i class='pfolder-star'></i></span><span class='premio-folder-count'></span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var o=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+o+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active")}function M(){if(e(".media-toolbar").hasClass("media-toolbar-mode-select")&&e("ul.attachments li.selected").length&&(e("ul.attachments li.selected").trigger("click"),e(".select-mode-toggle-button").trigger("click")),""!=u&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==f)){if(e("#media-attachment-taxonomy-filter").length){u=u.split(",");for(var t=0;t<u.length;t++)""!=u[t]&&e(".attachments-browser li[data-id='"+u[t]+"']").remove()}u=""}e("#media-attachment-taxonomy-filter").length?Q(0):(e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=get_folders_default_list",method:"post",success:function(t){t=e.parseJSON(t),e(".header-posts .total-count").text(t.total_items),e(".un-categorised-items .total-count").text(t.empty_items),w=t.taxonomies,V(),U()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(p+" #posts-filter",function(){var t={Title:"",Url:p};history.pushState(t,t.Title,t.Url),"show"!=folders_media_options.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),triggerInlineUpdate()}):e("#wpbody").load(p+" #wpbody-content",!1,function(t){var o={Title:"",Url:p};history.pushState(o,o.Title,o.Url),"show"!=folders_media_options.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>')}))}function V(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=w;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),w;for(var o=0;o<w.length;o++)t.append("<option value='"+w[o].term_id+"'>"+w[o].name+" ("+w[o].trash_count+")</option>");t.val(currentDDVal).trigger("change")}),e("select.folder_for_media").length)){var t=e("select.folder_for_media").val();e("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var o=0;o<w.length;o++)e("select.folder_for_media option:last-child").before("<option value='"+w[o].term_id+"'>"+w[o].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),o=0;o<w.length;o++)0!=parseInt(w[o].trash_count)&&(e(".jstree-node[id='"+w[o].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(w[o].trash_count),e(".sticky-folder-"+w[o].term_id+" .premio-folder-count").text(w[o].trash_count));""!=f&&e("#wcp_folder_"+f).addClass("active-item"),v&&(e("#title_"+d).trigger("click"),v=!1)}function z(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function q(t){var o="Are you sure you want to delete the selected folder?",s="Items in the folder will not be deleted.";if(h=!1,1==t&&e("#folder-hide-show-checkbox").is(":checked")){if(h=!0,0==e("#js-tree-menu input.checkbox:checked").length)return e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html("Please select at least one folder to delete"),void e("#error-folder-popup").show();e("#js-tree-menu input.checkbox:checked").length>1&&(o="Are you sure you want to delete the selected folders?",s="Items in the selected folders will not be deleted.")}e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#remove-folder-item").text("Yes, Delete it!"),e("#remove-folder-message").text(o),e("#remove-folder-notice").text(s),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function B(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(d).text),parentID=e("#wcp_folder_"+d).closest("li.jstree-node").data("folder-id"),parentID==t&&(parentID=0),e("#update-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#update-folder-item-name").val(folderName),e("#update-folder-item").removeClass("disabled"),e("#update-folder-item").show(),e("#update-folder-item-name").focus(),e(".dynamic-menu").remove()}function E(){if(0==c&&n>=10)return e("#folder-limitation-message").html("You've reached the 10 folder limitation!"),e("#no-more-folder-credit").show(),!1;e("#add-update-folder-title").text("Add new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),g&&(y=d,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(d).text)+" #2"),d=e("#"+d+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+d+"_anchor").closest(".jstree-node").parent().parent().attr("id"):0),e("#add-update-folder").removeClass("disabled"),e("#add-update-folder").show(),e("#add-update-folder-name").focus(),e(".dynamic-menu").remove()}function R(){setTimeout(function(){if(e("#js-tree-menu .jstree-node.jstree-leaf").length==e("#js-tree-menu .jstree-node").length)e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand");else{var t=e("#js-tree-menu .jstree-node.jstree-closed").length+e("#js-tree-menu .jstree-node.jstree-open").length;e("#js-tree-menu .jstree-node.jstree-closed").length==t?(e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand")):(e("#expand-collapse-list").addClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Collapse"))}},500),U()}function Q(o){D=e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_get_default_list&active_id="+f,method:"post",beforeSend:function(){null!=D&&D.abort()},success:function(s){if(s=e.parseJSON(s),e(".header-posts .total-count").text(s.total_items),e(".un-categorised-items .total-count").text(s.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==o){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()?(a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset()):a.media.frame.library.props.set({ignore:+new Date}))}w=s.taxonomies,V(),U()}})}function Y(){e(".folder-loader-ajax").addClass("active"),e(".folder-loader-ajax img").removeClass("active"),e(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){e(".folder-loader-ajax").removeClass("active"),e(".folder-loader-ajax img").addClass("active"),e(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3),U()}e(document).ready(function(){e(document).ajaxComplete(function(e,o,s){s.data!=t&&""!=s.data&&-1!=s.data.indexOf("action=query-attachments")&&U()}),w=folders_media_options.terms,c=parseInt(folders_media_options.is_key_active),n=parseInt(folders_media_options.folders),s=folders_media_options.folder_settings,e(document).on("click",".header-posts a.all-posts",function(t){d=0,f="",a="all",e(".active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("all").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("all").trigger("change")}),e(document).on("click",".un-categorised-items",function(t){d=0,f="",a="unassigned",e(".active-item").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("unassigned").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("-1").trigger("change")}),e(document).on("click","a.jstree-anchor",function(t){var o,s=e(this).closest("li.jstree-node").attr("id");a=d=s,e(this).closest(".folder-modal").find(".active-item").removeClass("active-item"),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").val(s),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=T(s,"slug"),o=thisSlug,e.ajax({url:folders_media_options.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+folders_media_options.post_type+"&post_id="+o+"&nonce="+folders_media_options.nonce,cache:!1,async:!1,success:function(){}}),e(".custom-media-select").removeClass("active")}),e(document).on("change",".folder_for_media",function(){"add-folder"!=e(this).val()&&null!=e(this).val()?a=e(this).val():"add-folder"==e(this).val()&&(a=-1)}),e(document).on("click",".update-inline-record",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=folders_media_options.can_manage_folder&&(isHigh=e(this).closest("li.sticky-fldr").hasClass("is-high"),isSticky=e(this).closest("li.sticky-fldr").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("li").append(menuHtml),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click","body, html",function(t){e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e(".folder-order").removeClass("active")}),e(document).on("click",".dynamic-menu, .folder-order",function(e){e.stopPropagation()}),e(document).on("contextmenu",".jstree-anchor",function(t){return e(this).find("span.folder-inline-edit").trigger("click"),!1}),e(document).on("click",".folder-actions span.folder-inline-edit",function(t){t.stopImmediatePropagation(),t.stopPropagation(),0!=folders_media_options.can_manage_folder&&(isHigh=e(this).closest("li.jstree-node").hasClass("is-high"),isSticky=e(this).closest("li.jstree-node").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e(this).closest("a.jstree-anchor").after(menuHtml),e(this).parents("li.jstree-node").addClass("active-menu"),e(this).offset().top+e(".dynamic-menu").height()>e(window).height()-20&&(e(".dynamic-menu").addClass("bottom-fix"),e(".dynamic-menu.bottom-fix").offset().top<e("#custom-scroll-menu").offset().top&&e(".dynamic-menu").removeClass("bottom-fix")))}),e(document).on("click",".dynamic-menu",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","body, html",function(){e(".dynamic-menu").remove()}),e(document).on("click",".new-folder",function(t){t.stopPropagation(),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),v=!1,g=!1,E()}),e(document).on("click","#add-new-folder",function(t){d=e("#custom-menu li.active-item").length?e("#custom-menu li.active-item").data("folder-id"):0,v=!1,E()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),l=e("#add-update-folder-name").val(),""==e.trim(l))e(".folder-form-errors").addClass("active"),e("#add-update-folder-name").focus();else{e("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#add-update-folder").addClass("disabled");var o=d;v&&(o=0),j=0==o?e("#js-tree-menu > ul > li.jstree-node").length:e("#js-tree-menu > ul > li.jstree-node[id='"+o+"'] > ul.jstree-children > li").length+1,e.ajax({url:folders_media_options.ajax_url,data:{parent_id:o,type:folders_media_options.post_type,action:"wcp_add_new_folder",nonce:folders_media_options.nonce,term_id:o,order:j,name:l,is_duplicate:g,duplicate_from:y},method:"post",success:function(t){if(result=e.parseJSON(t),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),-1==result.status)e("#no-more-folder-credit").show();else if("1"==result.status){if(c=parseInt(result.is_key_active),n=parseInt(result.folders),e("#current-folder").text(n),e("#ttl-fldr").text(10),R(),add_menu_to_list(),result.data.length)for(var o=0;o<result.data.length;o++){var a={folder_id:result.data[o].term_id,folder_count:0,is_sticky:result.data[o].is_sticky,is_high:result.data[o].is_high,nonce:result.data[o].nonce,slug:result.data[o].slug,is_deleted:0};s.push(a),e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.data[o].term_id,text:" "+result.data[o].title},"last",function(){e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-nonce",result.data[o].nonce),e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-slug",result.data[o].slug)})}Y(),F(),d=result.term_id,Q(0)}else e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1}),e(document).on("click",".form-cancel-btn",function(){e(".folder-popup-form").hide()}),e(document).on("click",".folder-popup-form",function(t){e(".folder-popup-form").hide()}),e(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),document.onkeydown=function(t){("key"in(t=t||window.event)?"Escape"===t.key||"Esc"===t.key:27===t.keyCode)&&e(".folder-popup-form").hide()},e(document).on("click",".rename-folder",function(t){t.stopPropagation(),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),B(),e(".dynamic-menu").remove()}),e(document).on("click","#inline-update",function(t){e("#js-tree-menu a.jstree-clicked").length&&(d=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),B())}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),l=e("#update-folder-item-name").val(),""==e.trim(l)?(e(".folder-form-errors").addClass("active"),e("#update-folder-item-name").focus()):(e("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#update-folder-item").addClass("disabled"),m=T(d,"nonce"),parentID=e(".jstree-node[id='"+d+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:folders_media_options.ajax_url,data:{parent_id:parentID,type:folders_media_options.post_type,action:"wcp_update_folder",nonce:m,term_id:d,order:j,name:l},method:"post",success:function(t){result=e.parseJSON(t),"1"==result.status?(e("#js-tree-menu").jstree("rename_node",result.id," "+result.term_title),folderPostId=H(result.id),null!=folderPostId&&(s[folderPostId].nonce=result.nonce,s[folderPostId].slug=result.slug),e(".folder-popup-form").hide(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),Y(),e("#media-attachment-taxonomy-filter").length&&Q(0)):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show())}})),!1}),e(document).on("click",".mark-folder",function(t){t.stopPropagation(),r=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),m=T(r,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:folders_media_options.ajax_url,data:"term_id="+r+"&type="+folders_media_options.post_type+"&action=wcp_mark_un_mark_folder&nonce="+m,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=H(t.id),"1"==t.marked?(e("li.jstree-node[id='"+t.id+"']").addClass("is-high"),e(".sticky-folder-"+t.id).addClass("is-high"),null!=folderPostId&&(s[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(s[folderPostId].is_high=0)),Y()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})}),e(document).on("click",".duplicate-folder",function(t){t.stopPropagation(),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),e(".dynamic-menu").remove(),v=!1,g=!0,E()}),e(document).on("click",".remove-folder",function(){r=e(this).closest("li.jstree-node").data("id"),d=e(this).closest("li.jstree-node").length?e(this).closest("li.jstree-node").attr("id"):e(this).closest("li.sticky-fldr").data("folder-id"),q(0),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")}),e(document).on("click","#remove-folder-item",function(t){t.stopPropagation(),e(".folder-popup-form").addClass("disabled"),e("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),m=T(d,"nonce"),h?function(){if(e("#folder-hide-show-checkbox").is(":checked")&&e("#js-tree-menu input.checkbox:checked").length>0){var t="";e("#js-tree-menu input.checkbox:checked").each(function(){t+=e(this).closest("li.jstree-node").attr("id")+",",e(this).closest("li.jstree-node").hasClass("jstree-clicked")&&!0}),e(".form-loader-count").css("width","100%"),e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+folders_media_options.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(c=parseInt(t.is_key_active),n=parseInt(t.folders),e("#current-folder").text(n),i=0;i<t.term_ids.length;i++)e(".folder-modal #js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),Y(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),M(),F(),Y(),e(".folder-modal #wcp_folder_"+f).length||(e(".header-posts a").trigger("click"),f=0)}else window.location.reload();e("#folder-hide-show-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_folder&term_id="+d+"&nonce="+m,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(d),c=parseInt(t.is_key_active),n=parseInt(t.folders),e("#current-folder").text(n),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+d).remove(),Y(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),M(),F(),f==d&&e(".header-posts").trigger("click")):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})}),e(document).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click","#expand-collapse-list",function(t){t.stopPropagation();var o=0;e(this).hasClass("all-open")?(e(this).removeClass("all-open"),o=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),o=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),u="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){u+=e(this).attr("id")+","}),""!=u&&(e(".form-loader-count").css("width","100%"),m=folders_media_options.nonce,e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_change_all_status&status="+o+"&folders="+u+"&nonce="+m,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status&&(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),e(document).on("click",".folder-sort-menu a",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),e(this).attr("data-sort"),e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_folders_by_order&nonce="+folders_media_options.nonce+"&order="+e(this).attr("data-sort"),method:"post",success:function(t){1==(t=e.parseJSON(t)).status&&(e("#js-tree-menu").jstree().destroy(),e("#js-tree-menu").append("<ul></ul>"),e("#js-tree-menu ul").html(t.data),w=t.terms,V(),J()),e(".form-loader-count").css("width","0")}})}),e(document).on("click",".jstree-node .jstree-icon",function(){r=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+r+"']").hasClass("jstree-open")?folderStatus=0:folderStatus=1,e(".form-loader-count").css("width","100%"),m=T(r,"nonce"),R(),e.ajax({url:folders_media_options.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+r+"&nonce="+m,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+r).hasClass("active")?(e("#wcp_folder_"+r).removeClass("active"),e("#wcp_folder_"+r).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+r).addClass("active"),e("#wcp_folder_"+r).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),Y())}})}),e(document).on("keyup","#folder-search",function(){z()}),e(document).on("change","#folder-search",function(){z()}),e(document).on("blur","#folder-search",function(){z()}),e(document).on("click","#folder-hide-show-checkbox",function(){e(this).is(":checked")?e("#js-tree-menu").addClass("show-folder-checkbox"):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"))}),e(document).on("click",".folder-checkbox, .input-checkbox",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","#inline-remove",function(){e("#js-tree-menu a.jstree-clicked").length?(d=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),q(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#folder-hide-show-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),q(1))}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(v=!0,e("#add-new-folder").trigger("click"))}),U()})});
assets/js/replace-media.js ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function (factory) {
2
+ "use strict";
3
+ if (typeof define === 'function' && define.amd) {
4
+ define(['jquery'], factory);
5
+ }
6
+ else if(typeof module !== 'undefined' && module.exports) {
7
+ module.exports = factory(require('jquery'));
8
+ }
9
+ else {
10
+ factory(jQuery);
11
+ }
12
+ }(function ($, undefined) {
13
+ $(document).ready(function (){
14
+ // Open file selector on div click
15
+ $("#upload-file").click(function(){
16
+ $("#media_file").click();
17
+ });
18
+
19
+ // file selected
20
+ $("#media_file").change(function(){
21
+ var fd = new FormData();
22
+
23
+ var files = $('#media_file')[0].files[0];
24
+
25
+ fd.append('media_file',files);
26
+
27
+ uploadData(this);
28
+ });
29
+ });
30
+
31
+ function uploadData(input) {
32
+ if($("#media_file").val() != "") {
33
+
34
+ var fileName = $("#media_file").val();
35
+ fileName = fileName.toLowerCase();
36
+ fileName = fileName.split(".");
37
+ var fileExt = fileName[fileName.length - 1];
38
+ if(fileExt == "jpg" || fileExt == "png" || fileExt == "jpeg" || fileExt == "gif") {
39
+ if (input.files && input.files[0]) {
40
+ var reader = new FileReader();
41
+
42
+ reader.onload = function (e) {
43
+ $(".drag-and-drop-title").html("<img class='pre-image' id='pre-image' >");
44
+ $('#pre-image').attr('src', e.target.result);
45
+ }
46
+
47
+ reader.readAsDataURL(input.files[0]); // convert to base64 string
48
+ }
49
+ } else {
50
+ $(".drag-and-drop-title").html('<span class="dashicons dashicons-media-document"></span>');
51
+ }
52
+
53
+ setFileSize(input.files[0].size);
54
+
55
+ $(".replace-message").removeClass("active");
56
+ if(fileExt != $("#file_ext").val()) {
57
+ $(".file-type").addClass("active");
58
+ $("#rename-file").prop("checked", true);
59
+ } else {
60
+ $("#replace-file").prop("checked", true);
61
+ }
62
+ $(".button-primary").prop("disabled", false);
63
+ } else {
64
+ $(".button-primary").prop("disabled", true);
65
+ }
66
+ }
67
+
68
+ function setFileSize(fileSize) {
69
+ fileSize = parseInt(fileSize);
70
+ if(fileSize > 1000000) {
71
+ fileSize = parseFloat(fileSize/1000000).toFixed(2)+" MB";
72
+ } else if(fileSize > 1000) {
73
+ fileSize = parseFloat(fileSize/1000).toFixed(2)+" KB";
74
+ } else {
75
+ fileSize = fileSize+" B";
76
+ }
77
+ $(".new-image-box .file-size").html(fileSize);
78
+ }
79
+
80
+ }));
folders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
- * Version: 2.6.2
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
@@ -30,9 +30,82 @@ if(!defined("WCP_FOLDER_URL")) {
30
  define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
31
  }
32
  if(!defined("WCP_FOLDER_VERSION")) {
33
- define('WCP_FOLDER_VERSION', "2.6.2");
34
  }
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
37
  register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
38
  WCP_Folders::get_instance();
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.6.3
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
30
  define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
31
  }
32
  if(!defined("WCP_FOLDER_VERSION")) {
33
+ define('WCP_FOLDER_VERSION', "2.6.3");
34
  }
35
 
36
+
37
+ if(!function_exists("folders_clear_all_caches")) {
38
+ function folders_clear_all_caches()
39
+ {
40
+ /* Clear cookies from browser */
41
+ try {
42
+ global $wp_fastest_cache;
43
+ // if W3 Total Cache is being used, clear the cache
44
+ if (function_exists('w3tc_flush_all')) {
45
+ w3tc_flush_all();
46
+ /* if WP Super Cache is being used, clear the cache */
47
+ } else if (function_exists('wp_cache_clean_cache')) {
48
+ global $file_prefix, $supercachedir;
49
+ if (empty($supercachedir) && function_exists('get_supercache_dir')) {
50
+ $supercachedir = get_supercache_dir();
51
+ }
52
+ wp_cache_clean_cache($file_prefix);
53
+ } else if (class_exists('WpeCommon')) {
54
+ //be extra careful, just in case 3rd party changes things on us
55
+ if (method_exists('WpeCommon', 'purge_memcached')) {
56
+ //WpeCommon::purge_memcached();
57
+ }
58
+ if (method_exists('WpeCommon', 'clear_maxcdn_cache')) {
59
+ //WpeCommon::clear_maxcdn_cache();
60
+ }
61
+ if (method_exists('WpeCommon', 'purge_varnish_cache')) {
62
+ //WpeCommon::purge_varnish_cache();
63
+ }
64
+ } else if (method_exists('WpFastestCache', 'deleteCache') && !empty($wp_fastest_cache)) {
65
+ $wp_fastest_cache->deleteCache();
66
+ } else if (function_exists('rocket_clean_domain')) {
67
+ rocket_clean_domain();
68
+ // Preload cache.
69
+ if (function_exists('run_rocket_sitemap_preload')) {
70
+ run_rocket_sitemap_preload();
71
+ }
72
+ } else if (class_exists("autoptimizeCache") && method_exists("autoptimizeCache", "clearall")) {
73
+ autoptimizeCache::clearall();
74
+ } else if (class_exists("LiteSpeed_Cache_API") && method_exists("autoptimizeCache", "purge_all")) {
75
+ LiteSpeed_Cache_API::purge_all();
76
+ }
77
+
78
+ if (class_exists("Breeze_PurgeCache") && method_exists("Breeze_PurgeCache", "breeze_cache_flush")) {
79
+ Breeze_PurgeCache::breeze_cache_flush();
80
+ }
81
+
82
+
83
+ if (class_exists( '\Hummingbird\Core\Utils' ) ) {
84
+ $modules = \Hummingbird\Core\Utils::get_active_cache_modules();
85
+ foreach ( $modules as $module => $name ) {
86
+ $mod = \Hummingbird\Core\Utils::get_module( $module );
87
+ if ( $mod->is_active() ) {
88
+ if ( 'minify' === $module ) {
89
+ $mod->clear_files();
90
+ } else {
91
+ $mod->clear_cache();
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ if ( function_exists( 'wp_cache_clean_cache' ) ) {
98
+ global $file_prefix;
99
+ wp_cache_clean_cache( $file_prefix, true );
100
+ }
101
+ } catch (Exception $e) {
102
+ return 1;
103
+ }
104
+ }
105
+ }
106
+
107
+ include_once plugin_dir_path(__FILE__)."includes/plugins.class.php";
108
+ include_once plugin_dir_path(__FILE__)."includes/media.replace.php";
109
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
110
  register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
111
  WCP_Folders::get_instance();
includes/folders.class.php CHANGED
@@ -135,7 +135,9 @@ class WCP_Folders
135
  /* load language files */
136
  add_action( 'plugins_loaded', array( $this, 'folders_text' ) );
137
 
138
- add_action("wp_ajax_folder_update_popup_status", array($this, 'update_popup_status'));
 
 
139
 
140
  add_filter('get_terms', array( $this, 'get_terms_filter_without_trash'), 10, 3);
141
 
@@ -217,6 +219,11 @@ class WCP_Folders
217
  $tree_data = WCP_Tree::get_full_tree_data($folder_type, $order_by, $order);
218
 
219
  $response['data'] = $tree_data['string'];
 
 
 
 
 
220
  }
221
  echo json_encode($response); die;
222
  }
@@ -354,6 +361,23 @@ class WCP_Folders
354
  $last_status = get_option("last_folder_status_for".$typenow);
355
  if(empty($post_status) && !$isAjax && (in_array($typenow, $options) || !empty($last_status)) && (isset($current_screen->base) && ($current_screen->base == "edit" || ($current_screen->base == "upload")))) {
356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  if(!empty($last_status)) {
358
  $status = 1;
359
  if($last_status != "-1" && $last_status != "all") {
@@ -917,17 +941,19 @@ class WCP_Folders
917
  'terms' => self::get_terms_hierarchical('media_folder'),
918
  'taxonomy' => get_taxonomy('media_folder'),
919
  'ajax_url' => admin_url("admin-ajax.php"),
920
- 'activate_url' => admin_url("admin.php?page=wcp_folders_register"),
921
  'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
922
  'is_key_active' => $is_active,
923
  'folders' => $folders,
924
  ));
925
  /* Free/Pro URL Change */
926
  wp_enqueue_style( 'folders-media', WCP_FOLDER_URL . 'assets/css/media.css' , array(), WCP_FOLDER_VERSION);
927
- } else if(is_admin() && !self::is_active_for_screen()) {
 
 
928
  global $current_screen;
929
- if(isset($current_screen->base) && $current_screen->base == "post") {
930
- /* Free/Pro URL Change */
931
  $is_active = 1;
932
  $folders = -1;
933
  if (!self::check_has_valid_key()) {
@@ -972,7 +998,7 @@ class WCP_Folders
972
  'taxonomy' => get_taxonomy('media_folder'),
973
  'ajax_url' => admin_url("admin-ajax.php"),
974
  'media_page_url' => admin_url("upload.php"),
975
- 'activate_url' => admin_url("admin.php?page=wcp_folders_register"),
976
  'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
977
  'is_key_active' => $is_active,
978
  'folders' => $folders,
@@ -997,7 +1023,6 @@ class WCP_Folders
997
  wp_enqueue_style('folders-media', WCP_FOLDER_URL . 'assets/css/page-post-media.min.css', array(), WCP_FOLDER_VERSION);
998
  wp_enqueue_style('folder-icon', WCP_FOLDER_URL . 'assets/css/folder-icon.css', array(), WCP_FOLDER_VERSION);
999
  $width = 275;
1000
- $width = $width - 40;
1001
  $string = "";
1002
  $css_text = "";
1003
  $customize_folders = get_option('customize_folders');
@@ -2162,6 +2187,7 @@ class WCP_Folders
2162
  $response['login'] = 1;
2163
  $response['data'] = array();
2164
  $response['message'] = "";
 
2165
  $postData = $_REQUEST;
2166
  $errorCounter = 0;
2167
  if (!current_user_can("manage_categories")) {
@@ -2193,50 +2219,80 @@ class WCP_Folders
2193
  $term_name = self::sanitize_options($postData['name']);
2194
  $term = term_exists($term_name, $folder_type, $parent);
2195
  if (!(0 !== $term && null !== $term)) {
2196
- $slug = self::create_slug_from_string($postData['name']) . "-" . time();
2197
- $result = wp_insert_term(
2198
- urldecode($postData['name']), // the term
2199
- $folder_type, // the taxonomy
2200
- array(
2201
- 'parent' => $parent,
2202
- 'slug' => $slug
2203
- )
2204
- );
2205
- if (!empty($result)) {
2206
- $response['id'] = $result['term_id'];
2207
- $response['status'] = 1;
2208
- $term = get_term($result['term_id'], $folder_type);
2209
- $order = isset($postData['order']) ? $postData['order'] : 0;
2210
- $order = self::sanitize_options($order);
2211
- update_term_meta($result['term_id'], "wcp_custom_order", $order);
2212
- if ($parent != 0) {
2213
- update_term_meta($parent, "is_active", 1);
2214
- }
2215
 
2216
- $class = "";
 
 
 
 
 
2217
 
2218
- if(isset($postData['is_duplicate']) && $postData['is_duplicate'] == true) {
2219
- if(isset($postData['duplicate_from']) && !empty($postData['duplicate_from'])) {
2220
- $term_id = $postData['duplicate_from'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2221
 
2222
- $term_data = get_term($term_id, $folder_type);
2223
- if(!empty($term_data)) {
2224
- $is_sticky = get_term_meta($term_id, "is_folder_sticky", true);
2225
 
2226
- if($is_sticky == 1) {
2227
- $class .= " is-sticky";
2228
- add_term_meta($term->term_id, "is_folder_sticky", 1);
2229
- }
2230
 
2231
- $status = get_term_meta($term_id, "is_highlighted", true);
2232
- if($status == 1) {
2233
- add_term_meta($term->term_id, "is_highlighted", 1);
2234
- $class .= " is-high";
2235
- }
2236
 
2237
- $count = ($term_data->count != 0)?"<span class='total-count'>{$term_data->count}</span>":"";
 
 
 
 
2238
 
2239
- // if(!empty($term_data->count)) {
2240
  $postArray = get_posts(
2241
  array(
2242
  'posts_per_page' => -1,
@@ -2250,34 +2306,25 @@ class WCP_Folders
2250
  )
2251
  )
2252
  );
2253
- if(!empty($postArray)) {
2254
- foreach($postArray as $p) {
2255
  wp_set_post_terms($p->ID, $term->term_id, $folder_type, true);
2256
  }
2257
  }
2258
- // }
2259
  }
2260
  }
 
2261
  }
2262
- $term_nonce = wp_create_nonce('wcp_folder_term_'.$term->term_id);
2263
- /* Free/Pro URL Change */
2264
- $response['parent_id'] = $parent;
2265
- $response['slug'] = $term->slug;
2266
- $response['nonce'] = $term_nonce;
2267
- $response['term_id'] = $result['term_id'];
2268
- $response['title'] = urldecode($postData['name']);
2269
- $response['parent_id'] = empty($postData['parent_id'])?"#":$postData['parent_id'];
2270
-
2271
- $is_active = 1;
2272
- $folders = -1;
2273
- if (!self::check_has_valid_key()) {
2274
- $is_active = 0;
2275
- $folders = self::ttl_fldrs();
2276
  }
2277
- $response['is_key_active'] = $is_active;
2278
- $response['folders'] = $folders;
2279
- } else {
2280
- $response['message'] = esc_attr__("Error during server request", WCP_FOLDER);
2281
  }
2282
  } else {
2283
  $response['error'] = 1;
@@ -2304,10 +2351,6 @@ class WCP_Folders
2304
 
2305
  $postData = filter_input_array(INPUT_POST);
2306
 
2307
-
2308
- // if ((isset($postData['action']) && $postData['action'] == 'inline-save') && (isset($postData['post_type']) && self::is_for_this_post_type($postData['post_type']))) {
2309
- // return true;
2310
- // }
2311
  global $current_screen;
2312
 
2313
  if (self::is_for_this_post_type($typenow) && ('edit' == $current_screen->base || 'upload' == $current_screen->base)) {
@@ -2481,7 +2524,8 @@ class WCP_Folders
2481
  'show_in_menu' => false,
2482
  'show_in_rest' => true,
2483
  'show_admin_column' => true,
2484
- 'update_count_callback' => '_update_generic_term_count',
 
2485
  'query_var' => true,
2486
  'rewrite' => false,
2487
  'capabilities' => array(
@@ -2543,6 +2587,17 @@ class WCP_Folders
2543
  }
2544
  update_option("customize_folders", $posts);
2545
  }
 
 
 
 
 
 
 
 
 
 
 
2546
  }
2547
  }
2548
 
@@ -2662,17 +2717,22 @@ class WCP_Folders
2662
  wp_register_style('wcp-css-handle', false);
2663
  wp_enqueue_style('wcp-css-handle');
2664
  $css = "
2665
- .wcp-folder-upgrade-button {color: #FF5983; font-weight: bold;}
2666
  ";
2667
  if (self::is_active_for_screen()) {
2668
  global $typenow;
2669
  $width = get_option("wcp_dynamic_width_for_" . $typenow);
2670
  $width = esc_attr($width);
 
 
 
 
 
 
2671
  $display_status = "wcp_dynamic_display_status_" . $typenow;
2672
  $display_status = get_option($display_status);
2673
  if($display_status != "hide") {
2674
  if (!empty($width) && is_numeric($width)) {
2675
- $css .= ".wcp-content{width:{$width}px}";
2676
  if (function_exists('is_rtl') && is_rtl()) {
2677
  $css .= "html[dir='rtl'] body.wp-admin #wpcontent {padding-right:" . ($width + 20) . "px}";
2678
  $css .= "html[dir='rtl'] body.wp-admin #wpcontent {padding-left:0px}";
@@ -2689,8 +2749,15 @@ class WCP_Folders
2689
  }
2690
  }
2691
  if (!empty($width) && is_numeric($width)) {
 
 
 
 
2692
  $css .= ".wcp-content {width: {$width}px}";
2693
  }
 
 
 
2694
  }
2695
  wp_add_inline_style('wcp-css-handle', $css);
2696
 
@@ -2800,7 +2867,7 @@ class WCP_Folders
2800
  $folders = self::ttl_fldrs();
2801
  }
2802
  /* For free: upgrade URL, for Pro: Register Key URL */
2803
- $register_url = admin_url("admin.php?page=wcp_folders_upgrade");
2804
 
2805
  $is_rtl = 0;
2806
  if ( function_exists( 'is_rtl' ) && is_rtl() ) {
@@ -2809,7 +2876,11 @@ class WCP_Folders
2809
 
2810
  $can_manage_folder = current_user_can("manage_categories")?1:0;
2811
  $width = get_option("wcp_dynamic_width_for_" . $typenow);
2812
- $width = empty($width)||!is_numeric($width)?310:$width;
 
 
 
 
2813
  $post_type = self::get_custom_post_type($typenow);
2814
  $taxonomy_status = 0;
2815
  $selected_taxonomy = "";
@@ -2888,7 +2959,7 @@ class WCP_Folders
2888
  'terms' => self::get_terms_hierarchical('media_folder'),
2889
  'taxonomy' => get_taxonomy('media_folder'),
2890
  'ajax_url' => admin_url("admin-ajax.php"),
2891
- 'activate_url' => admin_url("admin.php?page=wcp_folders_upgrade"),
2892
  'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
2893
  'is_key_active' => $is_active,
2894
  'folders' => $folders,
@@ -2903,7 +2974,7 @@ class WCP_Folders
2903
  $links['need_help'] = '<a target="_blank" href="https://premio.io/help/folders/?utm_source=pluginspage" >'.__( 'Need help?', WCP_FOLDER).'</a>';
2904
 
2905
  /* PRO link for only for FREE*/
2906
- $links['pro'] = '<a class="wcp-folder-upgrade-button" href="'.admin_url("admin.php?page=wcp_folders_upgrade").'" >'.__( 'Upgrade', WCP_FOLDER).'</a>';
2907
  return $links;
2908
  }
2909
 
@@ -2978,6 +3049,32 @@ class WCP_Folders
2978
  }
2979
  }
2980
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2981
  function wcp_manage_columns_head($defaults, $d = "")
2982
  {
2983
  global $typenow;
@@ -3043,52 +3140,61 @@ class WCP_Folders
3043
  }
3044
  }
3045
 
3046
- public function admin_menu()
3047
- {
3048
- // Add menu item for settings page
3049
- $page_title = esc_attr__('Folders', WCP_FOLDER);
3050
- $menu_title = esc_attr__('Folders Settings', WCP_FOLDER);
3051
- $capability = 'manage_options';
3052
- $menu_slug = 'wcp_folders_settings';
3053
- $callback = array($this, "wcp_folders_settings");
3054
- $icon_url = 'dashicons-category';
3055
- $position = 99;
3056
-
3057
- add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $position);
3058
-
3059
-
3060
- $getData = filter_input_array(INPUT_GET);
3061
- if(isset($getData['hide_folder_recommended_plugin']) && isset($getData['nonce'])) {
3062
- if(current_user_can('manage_options')) {
3063
- $nonce = $getData['nonce'];
3064
- if(wp_verify_nonce($nonce, "folder_recommended_plugin")) {
3065
- update_option('hide_folder_recommended_plugin',"1");
 
 
 
 
 
 
 
 
 
3066
  }
3067
  }
3068
- }
3069
 
3070
- $recommended_plugin = get_option("hide_folder_recommended_plugin");
3071
- if($recommended_plugin === false) {
 
 
 
 
 
 
 
 
 
 
 
3072
  add_submenu_page(
3073
  $menu_slug,
3074
- esc_html__('Recommended Plugins', WCP_FOLDER),
3075
- esc_html__('Recommended Plugins', WCP_FOLDER),
3076
  'manage_options',
3077
- 'recommended-folder-plugins',
3078
- array($this, 'recommended_plugins')
3079
  );
3080
  }
3081
 
3082
- /* Do not Change Free/Pro Change for menu */
3083
- add_submenu_page(
3084
- $menu_slug,
3085
- esc_html__('Upgrade to Pro', WCP_FOLDER),
3086
- esc_html__('Upgrade to Pro', WCP_FOLDER),
3087
- 'manage_options',
3088
- 'wcp_folders_upgrade',
3089
- array($this, 'wcp_folders_upgrade_or_register')
3090
- );
3091
-
3092
  self::check_and_set_post_type();
3093
 
3094
  $show_menu = get_option("folders_show_in_menu", true);
@@ -3130,6 +3236,15 @@ class WCP_Folders
3130
  }
3131
  }
3132
  $fonts = self::get_font_list();
 
 
 
 
 
 
 
 
 
3133
  include_once dirname(dirname(__FILE__)) . "/templates/admin/general-settings.php";
3134
 
3135
  $option = get_option("folder_intro_box");
@@ -4085,7 +4200,7 @@ class WCP_Folders
4085
  }
4086
 
4087
  /* Free and Pro major changes */
4088
- public function update_popup_status() {
4089
  if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'folder_update_popup_status')) {
4090
  update_option("folder_intro_box", "hide");
4091
  }
@@ -4093,6 +4208,14 @@ class WCP_Folders
4093
  die;
4094
  }
4095
 
 
 
 
 
 
 
 
 
4096
  public function check_has_valid_key()
4097
  {
4098
  /* Free/Pro: checking for key, for Free return 0, for Pro check for Key */
135
  /* load language files */
136
  add_action( 'plugins_loaded', array( $this, 'folders_text' ) );
137
 
138
+ add_action("wp_ajax_folder_update_popup_status", array($this, 'folder_update_popup_status'));
139
+
140
+ add_action("wp_ajax_wcp_update_folders_import_status", array($this, 'update_folders_import_status'));
141
 
142
  add_filter('get_terms', array( $this, 'get_terms_filter_without_trash'), 10, 3);
143
 
219
  $tree_data = WCP_Tree::get_full_tree_data($folder_type, $order_by, $order);
220
 
221
  $response['data'] = $tree_data['string'];
222
+ $taxonomies = array();
223
+ if($postData['type'] == "attachment") {
224
+ $taxonomies = self::get_terms_hierarchical($folder_type);
225
+ }
226
+ $response['terms'] = $taxonomies;
227
  }
228
  echo json_encode($response); die;
229
  }
361
  $last_status = get_option("last_folder_status_for".$typenow);
362
  if(empty($post_status) && !$isAjax && (in_array($typenow, $options) || !empty($last_status)) && (isset($current_screen->base) && ($current_screen->base == "edit" || ($current_screen->base == "upload")))) {
363
 
364
+ $requests = filter_input_array(INPUT_GET);
365
+ $requests = empty($requests)||!is_array($requests)?array():$requests;
366
+
367
+ if ($typenow == "attachment") {
368
+ if(count($requests) > 0) {
369
+ return;
370
+ }
371
+ } else if ($typenow == "post") {
372
+ if(count($requests) > 0) {
373
+ return;
374
+ }
375
+ } else {
376
+ if(count($requests) > 1) {
377
+ return;
378
+ }
379
+ }
380
+
381
  if(!empty($last_status)) {
382
  $status = 1;
383
  if($last_status != "-1" && $last_status != "all") {
941
  'terms' => self::get_terms_hierarchical('media_folder'),
942
  'taxonomy' => get_taxonomy('media_folder'),
943
  'ajax_url' => admin_url("admin-ajax.php"),
944
+ 'activate_url' => $this->getFoldersUpgradeURL(),
945
  'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
946
  'is_key_active' => $is_active,
947
  'folders' => $folders,
948
  ));
949
  /* Free/Pro URL Change */
950
  wp_enqueue_style( 'folders-media', WCP_FOLDER_URL . 'assets/css/media.css' , array(), WCP_FOLDER_VERSION);
951
+ } else if(is_admin()) {
952
+ /* Free/Pro URL Change */
953
+ global $typenow;
954
  global $current_screen;
955
+ // echo "<pre>"; print_r($current_screen); die;
956
+ if(!isset($current_screen->base) || $current_screen->base != "plugins") {
957
  $is_active = 1;
958
  $folders = -1;
959
  if (!self::check_has_valid_key()) {
998
  'taxonomy' => get_taxonomy('media_folder'),
999
  'ajax_url' => admin_url("admin-ajax.php"),
1000
  'media_page_url' => admin_url("upload.php"),
1001
+ 'activate_url' => $this->getFoldersUpgradeURL(),
1002
  'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
1003
  'is_key_active' => $is_active,
1004
  'folders' => $folders,
1023
  wp_enqueue_style('folders-media', WCP_FOLDER_URL . 'assets/css/page-post-media.min.css', array(), WCP_FOLDER_VERSION);
1024
  wp_enqueue_style('folder-icon', WCP_FOLDER_URL . 'assets/css/folder-icon.css', array(), WCP_FOLDER_VERSION);
1025
  $width = 275;
 
1026
  $string = "";
1027
  $css_text = "";
1028
  $customize_folders = get_option('customize_folders');
2187
  $response['login'] = 1;
2188
  $response['data'] = array();
2189
  $response['message'] = "";
2190
+ $response['message2'] = "";
2191
  $postData = $_REQUEST;
2192
  $errorCounter = 0;
2193
  if (!current_user_can("manage_categories")) {
2219
  $term_name = self::sanitize_options($postData['name']);
2220
  $term = term_exists($term_name, $folder_type, $parent);
2221
  if (!(0 !== $term && null !== $term)) {
2222
+ $folders = $postData['name'];
2223
+ $folders = explode(",", $folders);
2224
+ $foldersArray = array();
2225
+ $order = isset($postData['order']) ? $postData['order'] : 0;
2226
+ $order = self::sanitize_options($order);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2227
 
2228
+ $is_active = 1;
2229
+ $total_folders = -1;
2230
+ if (!self::check_has_valid_key()) {
2231
+ $is_active = 0;
2232
+ $total_folders = self::ttl_fldrs();
2233
+ }
2234
 
2235
+ if(!$is_active) {
2236
+ if (($total_folders + count($folders)) > 10) {
2237
+ $response['status'] = -1;
2238
+ echo json_encode($response);
2239
+ wp_die();
2240
+ }
2241
+ }
2242
+ foreach ($folders as $key => $folder) {
2243
+ $folder = trim($folder);
2244
+ $slug = self::create_slug_from_string($folder) . "-" . time();
2245
+
2246
+ $result = wp_insert_term(
2247
+ urldecode($folder), // the term
2248
+ $folder_type, // the taxonomy
2249
+ array(
2250
+ 'parent' => $parent,
2251
+ 'slug' => $slug
2252
+ )
2253
+ );
2254
+ if (!empty($result)) {
2255
+ $total_folders++;
2256
+ $response['id'] = $result['term_id'];
2257
+ $response['status'] = 1;
2258
+ $term = get_term($result['term_id'], $folder_type);
2259
+ $order = $order + $key;
2260
+ $term_nonce = wp_create_nonce('wcp_folder_term_' . $term->term_id);
2261
+
2262
+ $folder_item = array();
2263
+ $folder_item['parent_id'] = $parent;
2264
+ $folder_item['slug'] = $term->slug;
2265
+ $folder_item['nonce'] = $term_nonce;
2266
+ $folder_item['term_id'] = $result['term_id'];
2267
+ $folder_item['title'] = $folder;
2268
+ $folder_item['parent_id'] = empty($postData['parent_id']) ? "0" : $postData['parent_id'];
2269
+ $folder_item['is_sticky'] = 0;
2270
+ $folder_item['is_high'] = 0;
2271
+
2272
+ update_term_meta($result['term_id'], "wcp_custom_order", $order);
2273
+ if ($parent != 0) {
2274
+ update_term_meta($parent, "is_active", 1);
2275
+ }
2276
 
2277
+ if (isset($postData['is_duplicate']) && $postData['is_duplicate'] == true) {
2278
+ if (isset($postData['duplicate_from']) && !empty($postData['duplicate_from'])) {
2279
+ $term_id = $postData['duplicate_from'];
2280
 
2281
+ $term_data = get_term($term_id, $folder_type);
2282
+ if (!empty($term_data)) {
2283
+ $is_sticky = get_term_meta($term_id, "is_folder_sticky", true);
 
2284
 
2285
+ if ($is_sticky == 1) {
2286
+ add_term_meta($term->term_id, "is_folder_sticky", 1);
2287
+ $folder_item['is_sticky'] = 1;
2288
+ }
 
2289
 
2290
+ $status = get_term_meta($term_id, "is_highlighted", true);
2291
+ if ($status == 1) {
2292
+ add_term_meta($term->term_id, "is_highlighted", 1);
2293
+ $folder_item['is_high'] = 1;
2294
+ }
2295
 
 
2296
  $postArray = get_posts(
2297
  array(
2298
  'posts_per_page' => -1,
2306
  )
2307
  )
2308
  );
2309
+ if (!empty($postArray)) {
2310
+ foreach ($postArray as $p) {
2311
  wp_set_post_terms($p->ID, $term->term_id, $folder_type, true);
2312
  }
2313
  }
2314
+ }
2315
  }
2316
  }
2317
+ $foldersArray[] = $folder_item;
2318
  }
2319
+
2320
+ if (!empty($foldersArray)) {
2321
+ $response['is_key_active'] = $is_active;
2322
+ $response['folders'] = $total_folders;
2323
+ $response['parent_id'] = empty($parent) ? "#" : $parent;
2324
+
2325
+ $response['status'] = 1;
2326
+ $response['data'] = $foldersArray;
 
 
 
 
 
 
2327
  }
 
 
 
 
2328
  }
2329
  } else {
2330
  $response['error'] = 1;
2351
 
2352
  $postData = filter_input_array(INPUT_POST);
2353
 
 
 
 
 
2354
  global $current_screen;
2355
 
2356
  if (self::is_for_this_post_type($typenow) && ('edit' == $current_screen->base || 'upload' == $current_screen->base)) {
2524
  'show_in_menu' => false,
2525
  'show_in_rest' => true,
2526
  'show_admin_column' => true,
2527
+ 'update_count_callback' => '_update_post_term_count',
2528
+ // 'update_count_callback' => '_update_generic_term_count',
2529
  'query_var' => true,
2530
  'rewrite' => false,
2531
  'capabilities' => array(
2587
  }
2588
  update_option("customize_folders", $posts);
2589
  }
2590
+
2591
+ $setting_page = $this->getFolderSettingsURL();
2592
+ if(!empty($setting_page)) {
2593
+ $type = filter_input(INPUT_GET, 'setting_page', FILTER_SANITIZE_STRING);
2594
+ $type = empty($type)?"":"&setting_page=".$type;
2595
+ wp_redirect($setting_page.$type);
2596
+ exit;
2597
+ } else if(isset($_POST['folder_page']) && !empty($_POST['folder_page'])) {
2598
+ wp_redirect($_POST['folder_page']);
2599
+ exit;
2600
+ }
2601
  }
2602
  }
2603
 
2717
  wp_register_style('wcp-css-handle', false);
2718
  wp_enqueue_style('wcp-css-handle');
2719
  $css = "
2720
+ .wcp-folder-upgrade-button {color: #FF5983; font-weight: bold; display: inline-block;border: solid 1px #FF5983;border-radius: 4px;padding: 0 5px;}
2721
  ";
2722
  if (self::is_active_for_screen()) {
2723
  global $typenow;
2724
  $width = get_option("wcp_dynamic_width_for_" . $typenow);
2725
  $width = esc_attr($width);
2726
+ $width = intval($width);
2727
+ $width = empty($width)||!is_numeric($width)?280:$width;
2728
+ if($width > 1200) {
2729
+ $width = 280;
2730
+ }
2731
+ $width = intval($width);
2732
  $display_status = "wcp_dynamic_display_status_" . $typenow;
2733
  $display_status = get_option($display_status);
2734
  if($display_status != "hide") {
2735
  if (!empty($width) && is_numeric($width)) {
 
2736
  if (function_exists('is_rtl') && is_rtl()) {
2737
  $css .= "html[dir='rtl'] body.wp-admin #wpcontent {padding-right:" . ($width + 20) . "px}";
2738
  $css .= "html[dir='rtl'] body.wp-admin #wpcontent {padding-left:0px}";
2749
  }
2750
  }
2751
  if (!empty($width) && is_numeric($width)) {
2752
+ if($width > 1200) {
2753
+ $width = 280;
2754
+ }
2755
+ $width = intval($width);
2756
  $css .= ".wcp-content {width: {$width}px}";
2757
  }
2758
+ global $typenow;
2759
+ $post_type = self::get_custom_post_type($typenow);
2760
+ $css .= "body:not(.woocommerce-page) .wp-list-table th#taxonomy-{$post_type} { width: 130px !important; } @media screen and (max-width: 1180px) { body:not(.woocommerce-page) .wp-list-table th#taxonomy-{$post_type} { width: 90px !important; }} @media screen and (max-width: 960px) { body:not(.woocommerce-page) .wp-list-table th#taxonomy-{$post_type} { width: auto !important; }}";
2761
  }
2762
  wp_add_inline_style('wcp-css-handle', $css);
2763
 
2867
  $folders = self::ttl_fldrs();
2868
  }
2869
  /* For free: upgrade URL, for Pro: Register Key URL */
2870
+ $register_url = $this->getFoldersUpgradeURL();
2871
 
2872
  $is_rtl = 0;
2873
  if ( function_exists( 'is_rtl' ) && is_rtl() ) {
2876
 
2877
  $can_manage_folder = current_user_can("manage_categories")?1:0;
2878
  $width = get_option("wcp_dynamic_width_for_" . $typenow);
2879
+ $width = intval($width);
2880
+ $width = empty($width)||!is_numeric($width)?280:$width;
2881
+ if($width > 1200) {
2882
+ $width = 280;
2883
+ }
2884
  $post_type = self::get_custom_post_type($typenow);
2885
  $taxonomy_status = 0;
2886
  $selected_taxonomy = "";
2959
  'terms' => self::get_terms_hierarchical('media_folder'),
2960
  'taxonomy' => get_taxonomy('media_folder'),
2961
  'ajax_url' => admin_url("admin-ajax.php"),
2962
+ 'activate_url' => $this->getFoldersUpgradeURL(),
2963
  'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
2964
  'is_key_active' => $is_active,
2965
  'folders' => $folders,
2974
  $links['need_help'] = '<a target="_blank" href="https://premio.io/help/folders/?utm_source=pluginspage" >'.__( 'Need help?', WCP_FOLDER).'</a>';
2975
 
2976
  /* PRO link for only for FREE*/
2977
+ $links['pro'] = '<a class="wcp-folder-upgrade-button" href="'.$this->getFoldersUpgradeURL().'" >'.__( 'Upgrade', WCP_FOLDER).'</a>';
2978
  return $links;
2979
  }
2980
 
3049
  }
3050
  }
3051
 
3052
+ function getFoldersUpgradeURL() {
3053
+ $customize_folders = get_option("customize_folders");
3054
+ if(isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
3055
+ return admin_url("options-general.php?page=wcp_folders_settings&setting_page=upgrade-to-pro");
3056
+ } else {
3057
+ return admin_url("admin.php?page=wcp_folders_settings");
3058
+ }
3059
+ }
3060
+
3061
+ function getFolderSettingsURL() {
3062
+ $customize_folders = get_option("customize_folders");
3063
+ if(isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
3064
+ return admin_url("options-general.php?page=wcp_folders_settings");
3065
+ } else {
3066
+ return admin_url("admin.php?page=wcp_folders_settings");
3067
+ }
3068
+ }
3069
+
3070
+ function isFoldersInSettings() {
3071
+ $customize_folders = get_option("customize_folders");
3072
+ if (isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
3073
+ return true;
3074
+ }
3075
+ return false;
3076
+ }
3077
+
3078
  function wcp_manage_columns_head($defaults, $d = "")
3079
  {
3080
  global $typenow;
3140
  }
3141
  }
3142
 
3143
+ public function admin_menu() {
3144
+ $customize_folders = get_option("customize_folders");
3145
+ if (isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
3146
+ add_options_page(
3147
+ esc_html__('Folders Settings', WCP_FOLDER),
3148
+ esc_html__('Folders Settings', WCP_FOLDER),
3149
+ 'manage_options',
3150
+ 'wcp_folders_settings',
3151
+ array($this, 'wcp_folders_settings')
3152
+ );
3153
+ } else {
3154
+ $menu_slug = 'wcp_folders_settings';
3155
+
3156
+ // Add menu item for settings page
3157
+ $page_title = esc_attr__('Folders', WCP_FOLDER);
3158
+ $menu_title = esc_attr__('Folders Settings', WCP_FOLDER);
3159
+ $capability = 'manage_options';
3160
+ $callback = array($this, "wcp_folders_settings");
3161
+ $icon_url = 'dashicons-category';
3162
+ $position = 99;
3163
+ add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $position);
3164
+
3165
+ $getData = filter_input_array(INPUT_GET);
3166
+ if(isset($getData['hide_folder_recommended_plugin']) && isset($getData['nonce'])) {
3167
+ if(current_user_can('manage_options')) {
3168
+ $nonce = $getData['nonce'];
3169
+ if(wp_verify_nonce($nonce, "folder_recommended_plugin")) {
3170
+ update_option('hide_folder_recommended_plugin',"1");
3171
+ }
3172
  }
3173
  }
 
3174
 
3175
+ $recommended_plugin = get_option("hide_folder_recommended_plugin");
3176
+ if($recommended_plugin === false) {
3177
+ add_submenu_page(
3178
+ $menu_slug,
3179
+ esc_html__('Recommended Plugins', WCP_FOLDER),
3180
+ esc_html__('Recommended Plugins', WCP_FOLDER),
3181
+ 'manage_options',
3182
+ 'recommended-folder-plugins',
3183
+ array($this, 'recommended_plugins')
3184
+ );
3185
+ }
3186
+
3187
+ /* Do not Change Free/Pro Change for menu */
3188
  add_submenu_page(
3189
  $menu_slug,
3190
+ esc_attr__('Upgrade to Pro', WCP_FOLDER),
3191
+ esc_attr__('Upgrade to Pro', WCP_FOLDER),
3192
  'manage_options',
3193
+ 'folders-upgrade-to-pro',
3194
+ array($this, 'wcp_folders_upgrade_or_register')
3195
  );
3196
  }
3197
 
 
 
 
 
 
 
 
 
 
 
3198
  self::check_and_set_post_type();
3199
 
3200
  $show_menu = get_option("folders_show_in_menu", true);
3236
  }
3237
  }
3238
  $fonts = self::get_font_list();
3239
+
3240
+ $plugins = new WCP_Folder_Plugins();
3241
+ $plugin_info = $plugins->get_plugin_information();
3242
+ $is_plugin_exists = $plugins->is_exists;
3243
+ $settingURL = $this->getFolderSettingsURL();
3244
+ $setting_page = isset($_GET['setting_page'])?$_GET['setting_page']:"folder-settings";
3245
+ $setting_page = in_array($setting_page, array("folder-settings", "customize-folders", "folders-import", "upgrade-to-pro"))?$setting_page:"folder-settings";
3246
+ $isInSettings = $this->isFoldersInSettings();
3247
+
3248
  include_once dirname(dirname(__FILE__)) . "/templates/admin/general-settings.php";
3249
 
3250
  $option = get_option("folder_intro_box");
4200
  }
4201
 
4202
  /* Free and Pro major changes */
4203
+ public function folder_update_popup_status() {
4204
  if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'folder_update_popup_status')) {
4205
  update_option("folder_intro_box", "hide");
4206
  }
4208
  die;
4209
  }
4210
 
4211
+ public function update_folders_import_status() {
4212
+ if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'folders_import_3rd_party_data')) {
4213
+ update_option("folder_redirect_status", "3");
4214
+ }
4215
+ echo esc_attr("1");
4216
+ die;
4217
+ }
4218
+
4219
  public function check_has_valid_key()
4220
  {
4221
  /* Free/Pro: checking for key, for Free return 0, for Pro check for Key */
includes/form.class.php CHANGED
@@ -70,8 +70,14 @@ class WCP_Forms {
70
  if($total > $tlfs) {
71
  $tlfs = $total;
72
  }
 
 
 
 
 
 
73
  ?>
74
- <span class="upgrade-message">You have used <span class='pink' id='current-folder'><?php echo esc_attr($total) ?></span>/<span id='ttl-fldr'><?php echo esc_attr($tlfs) ?></span> Folders. <a class="pink" href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a></span>
75
  </div>
76
  </div>
77
  <div class="form-loader">
70
  if($total > $tlfs) {
71
  $tlfs = $total;
72
  }
73
+ $customize_folders = get_option("customize_folders");
74
+ if(isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
75
+ $upgradeURL = admin_url("options-general.php?page=wcp_folders_settings&setting_page=upgrade-to-pro");
76
+ } else {
77
+ $upgradeURL = admin_url("admin.php?page=folders-upgrade-to-pro");
78
+ }
79
  ?>
80
+ <span class="upgrade-message">You have used <span class='pink' id='current-folder'><?php echo esc_attr($total) ?></span>/<span id='ttl-fldr'><?php echo esc_attr($tlfs) ?></span> Folders. <a class="pink" href="<?php echo esc_url($upgradeURL) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a></span>
81
  </div>
82
  </div>
83
  <div class="form-loader">
includes/media.replace.php ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+
4
+ class folders_replace_media {
5
+
6
+ public $button_color;
7
+
8
+ function __construct() {
9
+
10
+ $customize_folders = get_option('customize_folders');
11
+
12
+ $this->button_color = isset($customize_folders['media_replace_button'])?$customize_folders['media_replace_button']:"#FA166B";
13
+
14
+ add_action('admin_menu', array($this, 'admin_menu'));
15
+
16
+ add_filter('media_row_actions', array($this, 'add_media_action'), 10, 2);
17
+
18
+ add_action('add_meta_boxes', function () {
19
+ add_meta_box('folders-replace-box', esc_html__('Replace Media', 'folders'), array($this, 'replace_meta_box'), 'attachment', 'side', 'low');
20
+ });
21
+ add_filter('attachment_fields_to_edit', array($this, 'attachment_editor'), 10, 2);
22
+
23
+ add_action('admin_enqueue_scripts', array($this, 'folders_admin_css_and_js'));
24
+
25
+ add_action('admin_init', array($this, 'handle_folders_file_upload'));
26
+
27
+ }
28
+
29
+ public function folders_admin_css_and_js($page) {
30
+ if($page == "media_page_folders-replace-media") {
31
+ wp_enqueue_style('folders-media', plugin_dir_url(dirname(__FILE__)) . 'assets/css/replace-media.css', array(), WCP_FOLDER_VERSION);
32
+ wp_enqueue_script('folders-media', plugin_dir_url(dirname(__FILE__)) . 'assets/js/replace-media.js', array(), WCP_FOLDER_VERSION);
33
+ }
34
+ }
35
+
36
+ public function admin_menu()
37
+ {
38
+ add_submenu_page(null,
39
+ esc_html__("Replace media", "folders"),
40
+ esc_html__("Replace media", "folders"),
41
+ 'upload_files',
42
+ 'folders-replace-media',
43
+ array($this, 'folders_replace_media')
44
+ );
45
+ }
46
+
47
+ public function folders_replace_media() {
48
+ global $plugin_page;
49
+ $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : '';
50
+ $attachment_id = isset($_GET['attachment_id']) ? sanitize_text_field($_GET['attachment_id']) : '';
51
+ $nonce = isset($_GET['nonce']) ? sanitize_text_field($_GET['nonce']) : '';
52
+ if (!wp_verify_nonce($nonce, "folders-replace-media-".$attachment_id)) {
53
+ echo 'Invalid Nonce';
54
+ exit;
55
+ }
56
+ $attachment = get_post($attachment_id);
57
+ if(empty($attachment) || !isset($attachment->guid)) {
58
+ echo 'Invalid URL';
59
+ exit;
60
+ }
61
+ $guid = $attachment->guid;
62
+ $guid = explode(".", $guid);
63
+ if($guid == $attachment->guid) {
64
+ echo 'Invalid URL';
65
+ exit;
66
+ }
67
+ $form_action = $this->getMediaReplaceURL($attachment_id);
68
+ include_once dirname(dirname(__FILE__)) . WCP_DS . "/templates" . WCP_DS . "admin" . WCP_DS . "media-replace.php";
69
+ }
70
+
71
+ public function add_media_action($actions, $post) {
72
+ $link = $this->getMediaReplaceURL($post->ID);
73
+
74
+ $newaction['replace_media'] = '<a style="color: '.$this->button_color.'" href="' . $link . '" rel="permalink">' . esc_html__("Replace media", "folders") . '</a>';
75
+ return array_merge($actions, $newaction);
76
+ }
77
+
78
+ public function getMediaReplaceURL($attach_id) {
79
+ $url = admin_url( "upload.php");
80
+ $url = add_query_arg(array(
81
+ 'page' => 'folders-replace-media',
82
+ 'action' => 'folders_replace_media',
83
+ 'attachment_id' => $attach_id,
84
+ 'nonce' => wp_create_nonce("folders-replace-media-".$attach_id)
85
+ ), $url);
86
+
87
+ return $url;
88
+ }
89
+
90
+ public function replace_meta_box($post) {
91
+ $link = $this->getMediaReplaceURL($post->ID);
92
+ echo "<p><a style='background: {$this->button_color}; border-color: {$this->button_color}; color:#ffffff' href='" . $link . "' class='button-secondary'>" . esc_html__("Upload a new file", "folders") . "</a></p><p>" . esc_html__("Click on the button to replace the file with another file", "folders") . "</p>";
93
+ }
94
+
95
+ public function attachment_editor($form_fields, $post)
96
+ {
97
+ $screen = null;
98
+ if (function_exists('get_current_screen'))
99
+ {
100
+ $screen = get_current_screen();
101
+
102
+ if(! is_null($screen) && $screen->id == 'attachment') // hide on edit attachment screen.
103
+ return $form_fields;
104
+ }
105
+
106
+ $link = $this->getMediaReplaceURL($post->ID);
107
+ $form_fields["folders"] = array(
108
+ "label" => esc_html__("Replace media", "folders"),
109
+ "input" => "html",
110
+ "html" => "<a style='background: {$this->button_color}; border-color: {$this->button_color}; color:#ffffff' href='" . $link . "' class='button-secondary'>" . esc_html__("Upload a new file", "folders") . "</a>", "helps" => esc_html__("Click on the button to replace the file with another file", "folders")
111
+ );
112
+
113
+ return $form_fields;
114
+ }
115
+
116
+ public function getFileSize($attachment_id) {
117
+ $size = filesize( get_attached_file( $attachment_id ));
118
+ if($size > 1000000) {
119
+ $size = ($size/1000000);
120
+ return number_format((float)$size, 2, ".", ",")." MB";
121
+ } else if($size > 1000) {
122
+ $size = ($size/1000);
123
+ return number_format((float)$size, 2, ".", ",")." KB";
124
+ }
125
+ return $size." B";
126
+ }
127
+
128
+ public $old_file_ext;
129
+ public $old_file_path;
130
+ public $old_file_url;
131
+ public $new_file_path;
132
+ public $new_file_url;
133
+
134
+ public $new_file_name;
135
+
136
+ public $current_upload_data;
137
+
138
+ public $mode = "rename-file";
139
+
140
+ public $old_image_meta;
141
+ public $new_image_meta;
142
+ public $upload_dir;
143
+
144
+ public $is_old_image = 0;
145
+ public $is_new_image = 0;
146
+ public $attachment_id;
147
+
148
+ public function handle_folders_file_upload() {
149
+ global $wpdb;
150
+ if(isset($_FILES['new_media_file'])) {
151
+ if($_FILES['new_media_file']['error'] == 0) {
152
+ $attachment_id = isset($_GET['attachment_id']) ? sanitize_text_field($_GET['attachment_id']) : '';
153
+ $nonce = isset($_GET['nonce']) ? sanitize_text_field($_GET['nonce']) : '';
154
+ if (!wp_verify_nonce($nonce, "folders-replace-media-" . $attachment_id)) {
155
+ return;
156
+ }
157
+ $attachment = get_post($attachment_id);
158
+ if (empty($attachment) || !isset($attachment->guid)) {
159
+ return;
160
+ }
161
+ $attachment_url = $attachment->guid;
162
+ $url = wp_get_attachment_url($attachment_id);
163
+ if(!empty($url)) {
164
+ $attachment_url = $url;
165
+ }
166
+ $guid = explode(".", $attachment_url);
167
+ $guid = array_pop($guid);
168
+ if ($guid == $attachment->guid) {
169
+ return;
170
+ }
171
+
172
+ $this->attachment_id = $attachment_id;
173
+
174
+ $file = $_FILES['new_media_file'];
175
+ $file_name = $file['name'];
176
+ $file_ext = explode(".", $file_name);
177
+ $file_ext = array_pop($file_ext);
178
+
179
+ if ($guid == $file_ext) {
180
+ $this->mode = "replace-file";
181
+ }
182
+
183
+ if (wp_attachment_is('image', $attachment_id)) {
184
+ $this->is_old_image = 1;
185
+ }
186
+ $this->old_file_url = $attachment_url;
187
+
188
+ $new_file = $file['tmp_name'];
189
+
190
+ $file_parts = pathinfo($attachment_url);
191
+
192
+ $upload_dir = wp_upload_dir($attachment->post_date_gmt);
193
+ $this->current_upload_data = $upload_dir;
194
+ $upload_path = $upload_dir['path'];
195
+
196
+ $this->upload_dir = $upload_dir;
197
+
198
+ $this->old_file_path = $upload_dir['path'] . "/" . $file_parts['basename'];
199
+
200
+ $this->old_image_meta = wp_get_attachment_metadata($attachment_id);
201
+ if (!is_dir($upload_path)) {
202
+ mkdir($upload_path, 755, true);
203
+ }
204
+ if (is_dir($upload_path)) {
205
+ $file_name = uniqid()."-".$file['name'];
206
+ $upload_file = $upload_path . DIRECTORY_SEPARATOR . $file_name;
207
+ $status = move_uploaded_file($new_file, $upload_file);
208
+
209
+ $this->new_file_path = $upload_dir['path'] . "/" . $file_name;
210
+
211
+ $this->new_file_url = $upload_dir['url']."/".$file_name;
212
+
213
+ if ($status) {
214
+
215
+ if(file_exists($this->upload_dir['path'].DIRECTORY_SEPARATOR.$file_parts['basename'])) {
216
+ @unlink($this->upload_dir['path'].DIRECTORY_SEPARATOR.$file_parts['basename']);
217
+ }
218
+
219
+ update_attached_file($attachment->ID, $this->new_file_path);
220
+
221
+ $update_array = array();
222
+ $update_array['ID'] = $attachment->ID;
223
+ $update_array['post_title'] = $file_parts['filename'];
224
+ $update_array['post_name'] = sanitize_title($file_parts['filename']);
225
+ $update_array['guid'] = $this->new_file_path; //wp_get_attachment_url($this->post_id);
226
+ $update_array['post_mime_type'] = $file['type'];
227
+ $post_id = \wp_update_post($update_array, true);
228
+
229
+ // update post doesn't update GUID on updates.
230
+ $wpdb->update($wpdb->posts, array('guid' => $this->new_file_path), array('ID' => $attachment->ID));
231
+
232
+ $this->removeThumbImages();
233
+
234
+ $metadata = wp_generate_attachment_metadata($attachment->ID, $this->new_file_path);
235
+ wp_update_attachment_metadata($attachment->ID, $metadata);
236
+
237
+ $this->new_image_meta = wp_get_attachment_metadata($attachment_id);
238
+
239
+ $this->searchAndReplace();
240
+
241
+ wp_redirect(admin_url("post.php?post=" . $attachment_id . "&action=edit"));
242
+ exit;
243
+ } else {
244
+ wp_die("Error during uploading file");
245
+ }
246
+
247
+ } else {
248
+ wp_die("Permission issue, Unable to create directory");
249
+ }
250
+ }
251
+ }
252
+ }
253
+
254
+ public $replace_items = array();
255
+
256
+ public function removeThumbImages() {
257
+ if(!empty($this->old_image_meta) && isset($this->old_image_meta['sizes']) && !empty($this->upload_dir) && isset($this->upload_dir['path'])) {
258
+ $path = $this->upload_dir['path'].DIRECTORY_SEPARATOR;
259
+ foreach ($this->old_image_meta['sizes'] as $image) {
260
+ if(file_exists($path.$image['file'])) {
261
+ @unlink($path . $image['file']);
262
+ }
263
+ }
264
+ }
265
+ }
266
+
267
+ public function searchAndReplace() {
268
+ if (wp_attachment_is('image', $this->attachment_id)) {
269
+ $this->is_new_image = 1;
270
+ }
271
+ if($this->old_file_url != $this->new_file_url) {
272
+ $replace = array(
273
+ 'search' => $this->old_file_url,
274
+ 'replace' => $this->new_file_url,
275
+ );
276
+ $this->replace_items[] = $replace;
277
+ }
278
+
279
+ $base_url = $this->upload_dir['url'];
280
+ $base_url = trim($base_url, "/")."/";
281
+ $new_url = $this->new_file_url;
282
+
283
+ if(isset($this->old_image_meta['sizes']) && !empty($this->old_image_meta['sizes'])) {
284
+ if(!isset($this->new_image_meta['sizes']) || empty($this->new_image_meta['sizes'])) {
285
+ foreach ($this->old_image_meta['sizes'] as $key=>$image) {
286
+ $replace = array(
287
+ 'search' => $base_url.$image['file'],
288
+ 'replace' => $new_url,
289
+ );
290
+ $this->replace_items[] = $replace;
291
+ }
292
+ } else if(isset($this->new_image_meta['sizes']) && !empty($this->new_image_meta['sizes'])) {
293
+ $new_size = $this->new_image_meta['sizes'];
294
+ foreach ($this->old_image_meta['sizes'] as $key=>$image) {
295
+ $new_replace_url = $new_url;
296
+ if(isset($new_size[$key])) {
297
+ $new_replace_url = $base_url.$new_size[$key]['file'];
298
+ }
299
+ $replace = array(
300
+ 'search' => $base_url.$image['file'],
301
+ 'replace' => $new_replace_url,
302
+ );
303
+ $this->replace_items[] = $replace;
304
+ }
305
+ }
306
+ }
307
+
308
+ if(!empty($this->replace_items)) {
309
+ $replace_items = array();
310
+ foreach($this->replace_items as $args) {
311
+ if($args['search'] != $args['replace']) {
312
+ $replace_items[] = $args;
313
+ }
314
+ }
315
+ $this->replace_items = $replace_items;
316
+ $this->replaceURL();
317
+ }
318
+ }
319
+
320
+ function replaceURL() {
321
+ /* check in post content */
322
+ $this->checkInPostContent();
323
+
324
+ /* check in options */
325
+ $this->checkInOptions();
326
+
327
+ /* check in meta */
328
+ $this->checkInMetaData();
329
+
330
+ if(function_exists('folders_clear_all_caches')) {
331
+ folders_clear_all_caches();
332
+ }
333
+ }
334
+
335
+ function checkInPostContent() {
336
+ global $wpdb;
337
+ $post_table = $wpdb->prefix."posts";
338
+ if(!empty($this->replace_items)) {
339
+ $query = "SELECT ID, post_content FROM {$post_table} WHERE post_content LIKE %s";
340
+ $update_query = "UPDATE {$post_table} SET post_content = %s WHERE ID = %d";
341
+ foreach ($this->replace_items as $args) {
342
+ if($args['search'] != $args['replace']) {
343
+ $sql_query = $wpdb->prepare($query, "%".$args['search']."%");
344
+ $results = $wpdb->get_results($sql_query, ARRAY_A );
345
+ if(!empty($results)) {
346
+ foreach ($results AS $row) {
347
+ $content = $this->findAndReplaceContent($row['post_content'], $args['search'], $args['replace']);
348
+ $update_post_query = $wpdb->prepare($update_query, $content, $row['ID']);
349
+ $result = $wpdb->query($update_post_query);
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+
357
+ function checkInOptions() {
358
+ global $wpdb;
359
+ $post_table = $wpdb->prefix."options";
360
+ if(!empty($this->replace_items)) {
361
+ $query = "SELECT option_id, option_value FROM {$post_table} WHERE option_value LIKE %s";
362
+ $update_query = "UPDATE {$post_table} SET option_value = %s WHERE option_id = %d";
363
+ foreach ($this->replace_items as $args) {
364
+ if($args['search'] != $args['replace']) {
365
+ $sql_query = $wpdb->prepare($query, "%".$args['search']."%");
366
+ $results = $wpdb->get_results($sql_query, ARRAY_A );
367
+ if(!empty($results)) {
368
+ foreach ($results AS $row) {
369
+ $content = $this->findAndReplaceContent($row['post_content'], $args['search'], $args['replace']);
370
+ $update_post_query = $wpdb->prepare($update_query, $content, $row['ID']);
371
+ $result = $wpdb->query($update_post_query);
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ }
378
+
379
+ function checkInMetaData() {
380
+ $tables = array(
381
+ array(
382
+ 'table_name' => 'usermeta',
383
+ 'primary_key' => 'umeta_id',
384
+ 'search_key' => 'meta_value'
385
+ ),
386
+ array(
387
+ 'table_name' => 'termmeta',
388
+ 'primary_key' => 'meta_id',
389
+ 'search_key' => 'meta_value'
390
+ ),
391
+ array(
392
+ 'table_name' => 'postmeta',
393
+ 'primary_key' => 'meta_id',
394
+ 'search_key' => 'meta_value'
395
+ ),
396
+ array(
397
+ 'table_name' => 'commentmeta',
398
+ 'primary_key' => 'meta_id',
399
+ 'search_key' => 'meta_value'
400
+ )
401
+ );
402
+ global $wpdb;
403
+ foreach ($tables as $table) {
404
+ $post_table = $wpdb->prefix . $table['table_name'];
405
+ if (!empty($this->replace_items)) {
406
+ $query = "SELECT {$table['primary_key']}, {$table['search_key']} FROM {$post_table} WHERE {$table['search_key']} LIKE %s";
407
+ $update_query = "UPDATE {$post_table} SET {$table['search_key']} = %s WHERE {$table['primary_key']} = %d";
408
+ foreach ($this->replace_items as $args) {
409
+ if ($args['search'] != $args['replace']) {
410
+ $sql_query = $wpdb->prepare($query, "%" . $args['search'] . "%");
411
+ $results = $wpdb->get_results($sql_query, ARRAY_A);
412
+ if (!empty($results)) {
413
+ foreach ($results as $row) {
414
+ $content = $this->findAndReplaceContent($row[$table['search_key']], $args['search'], $args['replace']);
415
+ $update_post_query = $wpdb->prepare($update_query, $content, $row[$table['primary_key']]);
416
+ $result = $wpdb->query($update_post_query);
417
+ }
418
+ }
419
+ }
420
+ }
421
+ }
422
+ }
423
+ }
424
+
425
+ function findAndReplaceContent($content, $search, $replace, $in_deep = false) {
426
+ $content = maybe_unserialize($content);
427
+ $isJson = $this->isJSON($content);
428
+
429
+ if ($isJson) {
430
+ $content = json_decode($content);
431
+ }
432
+
433
+ if (is_string($content)) {
434
+ $content = str_replace($search, $replace, $content);
435
+ }
436
+ else if(is_wp_error($content)) {
437
+
438
+ }
439
+ else if(is_array($content)) {
440
+ foreach($content as $index => $value) {
441
+ $content[$index] = $this->findAndReplaceContent($value, $search, $replace, true);
442
+ if (is_string($index)) {
443
+ $index_replaced = $this->findAndReplaceContent($index, $search, $replace, true);
444
+ if ($index_replaced !== $index)
445
+ $content = $this->changeArrayKey($content, array($index => $index_replaced));
446
+ }
447
+ }
448
+ }
449
+ else if(is_object($content)) {
450
+ foreach($content as $key => $value) {
451
+ $content->{$key} = $this->findAndReplaceContent($value, $search, $replace, true);
452
+ }
453
+ }
454
+
455
+ if ($isJson && $in_deep === false) {
456
+ $content = json_encode($content, JSON_UNESCAPED_SLASHES);
457
+ }
458
+ else if($in_deep === false && (is_array($content) || is_object($content))) {
459
+ $content = maybe_serialize($content);
460
+ }
461
+
462
+ return $content;
463
+ }
464
+
465
+ function changeArrayKey($array, $set) {
466
+ if (is_array($array) && is_array($set)) {
467
+ $newArr = array();
468
+ foreach ($array as $k => $v) {
469
+ $key = array_key_exists( $k, $set) ? $set[$k] : $k;
470
+ $newArr[$key] = is_array($v) ? $this->changeArrayKey($v, $set) : $v;
471
+ }
472
+ return $newArr;
473
+ }
474
+ return $array;
475
+ }
476
+
477
+ function isJSON($content)
478
+ {
479
+ if (is_array($content) || is_object($content))
480
+ return false;
481
+
482
+ $json = json_decode($content);
483
+ return $json && $json != $content;
484
+ }
485
+ }
486
+ $folders_replace_media = new folders_replace_media();
includes/plugins.class.php ADDED
@@ -0,0 +1,529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+ /* Free/Pro Class name change */
4
+ class WCP_Folder_Plugins {
5
+
6
+ public $plugins = array();
7
+ public $post_types = array();
8
+ public $is_exists = 0;
9
+
10
+ public function __construct() {
11
+
12
+ /* Import plugin data */
13
+ add_action( 'wp_ajax_wcp_import_plugin_folders_data', array($this, 'import_plugin_folders_data'));
14
+ add_action( 'wp_ajax_wcp_remove_plugin_folders_data', array($this, 'remove_plugin_folders_data'));
15
+ }
16
+
17
+
18
+ public function remove_plugin_folders_data(){
19
+ global $wpdb;
20
+ $postData = filter_input_array(INPUT_POST);
21
+
22
+ $plugin = isset($postData['plugin']) ? $postData['plugin'] : "";
23
+ $nonce = isset($postData['nonce']) ? $postData['nonce'] : "";
24
+ $response = array();
25
+ $response['status'] = 0;
26
+ $response['message'] = esc_html__("Invalid request", "folders");
27
+ $response['data'] = array();
28
+ $response['data']['plugin'] = $plugin;
29
+ if (wp_verify_nonce($nonce, "import_data_from_" . $plugin)) {
30
+ $this->get_plugin_information();
31
+ $folders = isset($this->plugins[$plugin]['folders']) ? $this->plugins[$plugin]['folders'] : array();
32
+ $attachments = isset($this->plugins[$plugin]['attachments']) ? $this->plugins[$plugin]['attachments'] : array();
33
+
34
+ if($plugin != 'filebird' && $plugin != 'real-media-library') {
35
+ $deleted = [];
36
+
37
+ foreach ( $folders as $folder ) {
38
+ $term_id = intval( $folder->term_id );
39
+
40
+ if ( $term_id ) {
41
+ $deleted[$term_id]['term_relationships'] = $wpdb->delete( $wpdb->prefix . 'term_relationships', ['term_taxonomy_id' => $term_id] );
42
+ $deleted[$term_id]['term_taxonomy'] = $wpdb->delete( $wpdb->prefix . 'term_taxonomy', ['term_id' => $term_id] );
43
+ $deleted[$term_id]['terms'] = $wpdb->delete( $wpdb->prefix . 'terms', ['term_id' => $term_id] );
44
+
45
+ if ( $plugin === 'folders' ) {
46
+ $deleted[$term_id]['termmeta'] = $wpdb->delete( $wpdb->prefix . 'termmeta', ['term_id' => $term_id] );
47
+ }
48
+ }
49
+ }
50
+ } else {
51
+
52
+ if ( count( $folders ) ) {
53
+ if ( $plugin === 'filebird' ) {
54
+ $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'fbv' );
55
+ }
56
+
57
+ if ( $plugin === 'real-media-library' ) {
58
+ $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'realmedialibrary' );
59
+
60
+ $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'realmedialibrary_meta' );
61
+ }
62
+ }
63
+
64
+ if ( count( $attachments ) ) {
65
+ if ( $plugin === 'filebird' ) {
66
+ $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'fbv_attachment_folder' );
67
+ }
68
+
69
+ if ( $plugin === 'real-media-library' ) {
70
+ $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'realmedialibrary_posts' );
71
+ }
72
+ }
73
+ }
74
+ $response['status'] = 1;
75
+
76
+ }
77
+ echo json_encode($response);
78
+ exit;
79
+ }
80
+
81
+ public function checkForLimit($folders) {
82
+ $response = array();
83
+ $response['status'] = 0;
84
+ $response['message'] = esc_html__("Invalid request", "folders");
85
+ $response['data'] = array();
86
+ $response['data']['plugin'] = array();
87
+ if($folders >= 10) {
88
+ $response['status'] = -1;
89
+ echo json_encode($response);
90
+ exit;
91
+ }
92
+ }
93
+
94
+ public function import_plugin_folders_data() {
95
+ $postData = filter_input_array(INPUT_POST);
96
+
97
+ $plugin = isset($postData['plugin']) ?$postData['plugin']:"";
98
+ $nonce = isset($postData['nonce']) ?$postData['nonce']:"";
99
+ $response = array();
100
+ $response['status'] = 0;
101
+ $response['message'] = esc_html__("Invalid request", "folders");
102
+ $response['data'] = array();
103
+ $response['data']['plugin'] = $plugin;
104
+ if(wp_verify_nonce($nonce, "import_data_from_".$plugin)) {
105
+ $this->get_plugin_information();
106
+ $folders = isset($this->plugins[$plugin]['folders']) ? $this->plugins[$plugin]['folders'] : array();
107
+ $attachments = isset($this->plugins[$plugin]['attachments']) ? $this->plugins[$plugin]['attachments'] : array();
108
+
109
+ $categoryByID = array();
110
+ $foldersImported = array();
111
+ $attachmentsImported = array();
112
+
113
+ $total_folders = WCP_Folders::get_ttl_fldrs();
114
+
115
+ $this->checkForLimit($total_folders);
116
+
117
+ if($plugin != 'filebird' && $plugin != 'real-media-library') {
118
+
119
+ foreach ($folders as $folder) {
120
+ $folder_id = $folder->term_id;
121
+ $parent = intval($folder->parent);
122
+
123
+ $taxonomy = 'media_folder';
124
+
125
+ foreach ($this->post_types as $post_type) {
126
+ if (strpos($folder->taxonomy, $post_type) !== false) {
127
+ if ($post_type == "post") {
128
+ $taxonomy = "post_folder";
129
+ } else if ($post_type == "page") {
130
+ $taxonomy = "folder";
131
+ } else if ($post_type == "attachment") {
132
+ $taxonomy = "media_folder";
133
+ } else {
134
+ $taxonomy = $post_type . '_folder';
135
+ }
136
+ }
137
+ }
138
+
139
+ if ($parent && isset($categoryByID[$parent]['term_id'])) {
140
+ $parent = intval($categoryByID[$parent]['term_id']);
141
+ }
142
+
143
+ $new_term = wp_insert_term($folder->name, $taxonomy, ['parent' => $parent]);
144
+
145
+ if (is_wp_error($new_term)) {
146
+ continue;
147
+ }
148
+
149
+ $total_folders++;
150
+ $this->checkForLimit($total_folders);
151
+
152
+ $arg = array(
153
+ 'hide_empty' => false,
154
+ 'parent' => $parent,
155
+ 'hierarchical' => false,
156
+ 'update_count_callback' => '_update_generic_term_count',
157
+ );
158
+ $terms = get_terms( $taxonomy, $arg);
159
+ $position = count($terms);
160
+
161
+ update_term_meta($new_term['term_id'], 'wcp_custom_order', $position);
162
+
163
+ $foldersImported[] = $new_term;
164
+
165
+ $categoryByID[$folder_id] = [
166
+ 'term_id' => $new_term['term_id'],
167
+ 'parent' => $parent,
168
+ 'name' => $folder->name,
169
+ ];
170
+ }
171
+
172
+ // STEP: Assign plugin categories to HF categories
173
+ foreach ($attachments as $attachment) {
174
+ $hf_category_id = isset($categoryByID[$attachment->term_taxonomy_id]['term_id']) ? intval($categoryByID[$attachment->term_taxonomy_id]['term_id']) : 0;
175
+ $attachment_id = isset($attachment->object_id) ? intval($attachment->object_id) : 0;
176
+
177
+ if (!$hf_category_id || !$attachment_id) {
178
+ continue;
179
+ }
180
+
181
+ // Get attachment taxonomy by post type
182
+ $post_type = get_post_type($attachment_id);
183
+ if ($post_type == "post") {
184
+ $taxonomy = "post_folder";
185
+ } else if ($post_type == "page") {
186
+ $taxonomy = "folder";
187
+ } else if ($post_type == "attachment") {
188
+ $taxonomy = "media_folder";
189
+ } else {
190
+ $taxonomy = $post_type . '_folder';
191
+ }
192
+
193
+ $term_ids = wp_get_object_terms($attachment_id, $taxonomy, ['fields' => 'ids']);
194
+ $term_ids[] = $hf_category_id;
195
+
196
+ $term_set = wp_set_object_terms($attachment_id, $term_ids, $taxonomy);
197
+
198
+ if (is_wp_error($term_set)) {
199
+ continue;
200
+ }
201
+
202
+ $attachmentsImported[] = [
203
+ 'cat_id' => $hf_category_id,
204
+ 'term_ids' => $term_ids,
205
+ 'set' => $term_set,
206
+ ];
207
+ }
208
+ } else {
209
+ foreach ( $folders as $folder ) {
210
+ $parent = intval( $folder->parent );
211
+ $parentID = 0;
212
+
213
+ if ( $parent && isset( $categoryByID[$parent]['term_id'] ) ) {
214
+ $parentID = $categoryByID[$parent]['term_id'];
215
+ }
216
+
217
+ $new_term = wp_insert_term( $folder->name, "media_folder", ['parent' => $parentID] );
218
+
219
+ if ( is_wp_error( $new_term ) ) {
220
+ continue;
221
+ }
222
+
223
+ $total_folders++;
224
+ $this->checkForLimit($total_folders);
225
+
226
+ $taxonomy = 'media_folder';
227
+
228
+ $arg = array(
229
+ 'hide_empty' => false,
230
+ 'parent' => $parentID,
231
+ 'hierarchical' => false,
232
+ 'update_count_callback' => '_update_generic_term_count',
233
+ );
234
+ $terms = get_terms( $taxonomy, $arg);
235
+ $position = count($terms);
236
+
237
+
238
+ update_term_meta( $new_term['term_id'], 'wcp_custom_order', intval( $position ) );
239
+
240
+ $foldersImported[] = $new_term;
241
+
242
+ $categoryByID[$folder->id] = [
243
+ 'name' => $folder->name,
244
+ 'parent' => $parent,
245
+ 'term_id' => $new_term['term_id'],
246
+ ];
247
+ }
248
+
249
+ foreach ( $attachments as $attachment ) {
250
+ $hf_category_id = isset( $categoryByID[$attachment->folder_id]['term_id'] ) ? intval( $categoryByID[$attachment->folder_id]['term_id'] ) : 0;
251
+ $attachment_id = isset( $attachment->attachment_id ) ? intval( $attachment->attachment_id ) : 0;
252
+
253
+ if ( ! $hf_category_id || ! $attachment_id ) {
254
+ continue;
255
+ }
256
+
257
+ $term_ids = wp_get_object_terms( $attachment_id, "media_folder", ['fields' => 'ids'] );
258
+ $term_ids[] = $hf_category_id;
259
+
260
+ $term_set = wp_set_object_terms( $attachment_id, $term_ids, "media_folder" );
261
+
262
+ if ( is_wp_error( $term_set ) ) {
263
+ continue;
264
+ }
265
+
266
+ $attachmentsImported[] = [
267
+ 'cat_id' => $hf_category_id,
268
+ 'term_ids' => $term_ids,
269
+ 'set' => $term_set,
270
+ ];
271
+ }
272
+ }
273
+
274
+ $response['status'] = 1;
275
+ $response['data']['imported'] = count($foldersImported);
276
+ $response['data']['attachments'] = count($attachmentsImported);
277
+ $response['data']['plugin'] = $plugin;
278
+ $response['message'] = sprintf(esc_html__( '%s folders imported and %s attachments categorized.', 'folders'), count($foldersImported), count($attachmentsImported));
279
+ }
280
+ echo json_encode($response);
281
+ exit;
282
+ }
283
+
284
+ public function get_plugin_information() {
285
+ $this->get_other_plugins_data();
286
+ return $this->plugins;
287
+ }
288
+
289
+ public function get_other_plugins_data() {
290
+ if(!empty($this->plugins)) {
291
+ return $this->plugins;
292
+ }
293
+ $this->plugins = array(
294
+ // FileBird
295
+ 'filebird' => array(
296
+ 'name' => 'FileBird (v4)',
297
+ 'taxonomy' => 'filebird', // has custom DB table
298
+ 'folders' => array(),
299
+ 'attachments' => array(),
300
+ 'total_folders' => 0,
301
+ 'total_attachments' => 0,
302
+ 'is_exists' => 0
303
+ ),
304
+ 'enhanced-media-library' => array(
305
+ // Enhanced Media Library
306
+ 'name' => 'Enhanced Media Library',
307
+ 'taxonomy' => 'media_category',
308
+ 'folders' => array(),
309
+ 'attachments' => array(),
310
+ 'total_folders' => 0,
311
+ 'total_attachments' => 0,
312
+ 'is_exists' => 0
313
+ ),
314
+ 'wicked-folders' => array(
315
+ // Enhanced Media Library
316
+ 'name' => 'Wicked Folders',
317
+ 'taxonomy' => 'wf_attachment_folders',
318
+ 'folders' => array(),
319
+ 'attachments' => array(),
320
+ 'total_folders' => 0,
321
+ 'total_attachments' => 0,
322
+ 'is_exists' => 0
323
+ ),
324
+ 'real-media-library' => array(
325
+ // Real Media Library
326
+ 'name' => 'Real Media Library (by DevOwl)',
327
+ 'taxonomy' => 'rml', // has custom DB table
328
+ 'folders' => array(),
329
+ 'attachments' => array(),
330
+ 'total_folders' => 0,
331
+ 'total_attachments' => 0,
332
+ 'is_exists' => 0
333
+ ),
334
+ 'wp-media-folder' => array(
335
+ // Real Media Library
336
+ 'name' => 'WP Media Folder (by JoomUnited)',
337
+ 'taxonomy' => 'wpmf-category',
338
+ 'folders' => array(),
339
+ 'attachments' => array(),
340
+ 'total_folders' => 0,
341
+ 'total_attachments' => 0,
342
+ 'is_exists' => 0
343
+ )
344
+ );
345
+ $post_types = get_post_types(array());
346
+ $this->post_types = array_keys($post_types);
347
+
348
+ foreach ($this->plugins as $slug => $plugin_data ) {
349
+ $taxonomy = $plugin_data['taxonomy'];
350
+
351
+ if ( $slug === 'wicked-folders' ) {
352
+ // Run for all registered post types
353
+ $folders = [];
354
+
355
+ foreach ( $this->post_types as $post_type ) {
356
+ $wicked_folders = $this->get_plugin_folders( 'wf_' . $post_type . '_folders', $slug );
357
+
358
+ if ( is_array( $wicked_folders ) ) {
359
+ $folders = array_merge( $folders, $wicked_folders );
360
+ }
361
+ }
362
+ }
363
+
364
+ else {
365
+ $folders = $this->get_plugin_folders( $taxonomy, $slug );
366
+ }
367
+
368
+ if ( in_array( $taxonomy, ['filebird', 'rml'] ) ) {
369
+ $folders = is_array( $folders ) && count( $folders ) ? $this->map_plugin_folders( $taxonomy, $folders ) : [];
370
+ }
371
+
372
+ $this->plugins[$slug]['folders'] = $folders;
373
+
374
+ $attachments = is_array( $folders ) && count( $folders ) ? $this->get_plugin_attachments( $taxonomy, $folders ) : [];
375
+
376
+ if ( in_array( $taxonomy, ['filebird', 'rml'] ) ) {
377
+ $attachments = $this->map_plugin_attachments( $taxonomy, $attachments );
378
+ }
379
+
380
+ $this->plugins[$slug]['attachments'] = $attachments;
381
+ }
382
+
383
+ foreach ($this->plugins as $key=>$plugin) {
384
+ $folders = isset($plugin['folders'])&&is_array($plugin['folders'])?$plugin['folders']:array();
385
+ $this->plugins[$key]['total_folders'] = count($folders);
386
+
387
+ $attachments = isset($plugin['attachments'])&&is_array($plugin['attachments'])?$plugin['attachments']:array();
388
+ $this->plugins[$key]['total_attachments'] = count($attachments);
389
+
390
+ if(count($folders) > 0 || count($attachments)>0) {
391
+ $this->plugins[$key]['is_exists'] = 1;
392
+ $this->is_exists = 1;
393
+ }
394
+ }
395
+ }
396
+
397
+ public function get_plugin_folders( $taxonomy, $slug ) {
398
+ global $wpdb;
399
+
400
+ // FileBird has its own db table
401
+ if ( $taxonomy === 'filebird' ) {
402
+ $filebird_folders_table = $wpdb->prefix . 'fbv';
403
+
404
+ // Get FileBird folders (order by 'parent' to create parent categories first)
405
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$filebird_folders_table'") == $filebird_folders_table ) {
406
+ return $wpdb->get_results( "SELECT * FROM $filebird_folders_table ORDER BY parent ASC" );
407
+ }
408
+ }
409
+
410
+ // Real Media Library has its own db table
411
+ else if ( $taxonomy === 'rml' ) {
412
+ $rml_folders_table = $wpdb->prefix . 'realmedialibrary';
413
+
414
+ // Get FileBird folders (order by 'parent' to create parent categories first)
415
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$rml_folders_table'") == $rml_folders_table ) {
416
+ return $wpdb->get_results( "SELECT * FROM $rml_folders_table ORDER BY parent ASC" );
417
+ }
418
+ }
419
+
420
+ // Default: Plugins with custom taxonomy terms
421
+ else {
422
+ $folders = $wpdb->get_results(
423
+ "SELECT * FROM " . $wpdb->term_taxonomy . "
424
+ LEFT JOIN " . $wpdb->terms . "
425
+ ON " . $wpdb->term_taxonomy . ".term_id = " . $wpdb->terms . ".term_id
426
+ WHERE " . $wpdb->term_taxonomy . ".taxonomy = '" . $taxonomy . "'
427
+ ORDER BY parent ASC"
428
+ );
429
+
430
+ // WP Media Folder (JoomUnited): Remove root folder
431
+ if ( $slug === 'wp-media-folder' ) {
432
+ foreach ( $folders as $index => $folder ) {
433
+ if ( $folder->slug === 'wp-media-folder-root' ) {
434
+ unset( $folders[$index] );
435
+ }
436
+ }
437
+ }
438
+
439
+ return array_values( $folders );
440
+ }
441
+ }
442
+
443
+ public function map_plugin_folders( $taxonomy, $folders ) {
444
+ $mapped_folders = [];
445
+
446
+ foreach ( $folders as $folder ) {
447
+
448
+ // FileBird, Real Media Library
449
+ if ( $taxonomy === 'filebird' || $taxonomy === 'rml' ) {
450
+ $folder_object = new \stdClass();
451
+
452
+ $folder_object->name = $folder->name;
453
+ $folder_object->id = intval( $folder->id );
454
+ $folder_object->parent = intval( $folder->parent );
455
+ $folder_object->position = intval( $folder->ord );
456
+
457
+ $mapped_folders[] = $folder_object;
458
+ }
459
+
460
+ }
461
+
462
+ return $mapped_folders;
463
+ }
464
+
465
+ public function map_plugin_attachments( $taxonomy, $attachments ) {
466
+ $mapped_attachments = [];
467
+
468
+ foreach ( $attachments as $folder ) {
469
+
470
+ // FileBird
471
+ if ( $taxonomy === 'filebird' ) {
472
+ $folder_object = new \stdClass();
473
+
474
+ $folder_object->folder_id = intval( $folder->folder_id );
475
+ $folder_object->attachment_id = intval( $folder->attachment_id );
476
+
477
+ $mapped_attachments[] = $folder_object;
478
+ }
479
+
480
+ // Real Media Library
481
+ if ( $taxonomy === 'rml' ) {
482
+ $folder_object = new \stdClass();
483
+
484
+ $folder_object->folder_id = intval( $folder->fid );
485
+ $folder_object->attachment_id = intval( $folder->attachment );
486
+
487
+ $mapped_attachments[] = $folder_object;
488
+ }
489
+
490
+ }
491
+
492
+ return $mapped_attachments;
493
+ }
494
+
495
+ public function get_plugin_attachments( $taxonomy, $folders ) {
496
+ global $wpdb;
497
+
498
+ // FileBird has its own db table
499
+ if ( $taxonomy === 'filebird' ) {
500
+ $filebird_attachments_table = $wpdb->prefix . 'fbv_attachment_folder';
501
+
502
+ // Get FileBird attachments (order by 'folder_id')
503
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$filebird_attachments_table'") == $filebird_attachments_table ) {
504
+ return $wpdb->get_results( "SELECT * FROM $filebird_attachments_table ORDER BY folder_id ASC" );
505
+ }
506
+ }
507
+
508
+ // Real Media Library has its own db table
509
+ else if ( $taxonomy === 'rml' ) {
510
+ $rml_attachments_table = $wpdb->prefix . 'realmedialibrary_posts';
511
+
512
+ // Get FileBird folders (order by 'parent' to create parent categories first)
513
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$rml_attachments_table'") == $rml_attachments_table ) {
514
+ return $wpdb->get_results( "SELECT * FROM $rml_attachments_table ORDER BY fid ASC" );
515
+ }
516
+ }
517
+
518
+ // Default: Plugins with custom taxonomy terms
519
+ else {
520
+ return $wpdb->get_results(
521
+ "SELECT " . $wpdb->term_relationships . ".object_id,
522
+ " . $wpdb->term_relationships . ".term_taxonomy_id
523
+ FROM " . $wpdb->term_relationships . "
524
+ WHERE " . $wpdb->term_relationships . ".term_taxonomy_id IN (" . implode( ',', array_column( $folders, 'term_id' ) ) . ")"
525
+ );
526
+ }
527
+ }
528
+ }
529
+ $WCP_Folder_Plugins = new WCP_Folder_Plugins();
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
  === Folders - Organize Media Library Folders, Pages, Posts, Media Categories Folder, File Manager ===
2
  Contributors: galdub, tomeraharon, premio
3
- Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories, media library folders, media library folder
4
  Requires at least: 3.0.0
5
  Tested up to: 5.6
6
- Stable tag: 2.6.2
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
- Folders is a WordPress plugin that will help you quickly organize and manage your Media library files, Pages, Posts, and Custom Posts in folders
10
 
11
  == Description ==
12
 
13
- Folders is a WordPress plugin that enables users to quickly organize all of their Pages, Posts and Media files in folders. You can easily drag and drop items into directories and change the folders tree view (hierarchy) as you wish. Need more than 10 folders? Check out <a href="https://premio.io/downloads/folders" target="_blank" title="Folders pro plans"><strong>Folders Pro Plans</strong></a>.
14
 
15
  [youtube https://www.youtube.com/watch?v=GKq5jvuoRY0]
16
 
@@ -22,7 +22,9 @@ There are several ways professionals are using the Folders file manager plugin t
22
  * Web developers: keep your clients’ website pages in proper order during and after development. You can also mark a folder with a star or give it a unique name for clients to understand what is important and what they should (or shouldn't) touch.
23
  * Bloggers: manage your own content with ease with this file manager plugin. Never get confused again – organize photos and content by topics, categories, and/or dates.
24
  * Quickly upload pages, media, and content to your WordPress and easily organize them into directories so they’re never lost. It’s content creation and organization at its finest!
25
- * Mark certain folders as important to quickly find the content you need for your WordPress projects and tasks. No worries of your content getting lost in a sea of directories!
 
 
26
 
27
  <strong>Note:</strong> adding a page/post/image into a folder will not change its URL.
28
 
@@ -36,36 +38,23 @@ Have any questions or feature suggestions? We'd love to hear from you. <strong><
36
 
37
  It’s rather simple really – once you install the plugin, you can begin using it. If you’re a content creator, you can upload text, images, videos, and audio at the click of a button. Then you can organize everything you upload into neat subfolders. For instance, you can create a media folder, content folder, and image folder, then have them all organized by date. It has a drag and drop interface, making it user-friendly for everyone. It’s like having your own media library at your own disposal. You can create this media library for yourself or others – it’s perfect for website owners and content professionals!
38
 
39
- = Here Are Some Use Cases =
40
-
41
- Wondering how you can use this pages, posts and media library folders for your online business? Here’s are a few use cases:
42
-
43
- Bloggers: Easily upload content for blogs, including text, photos, videos, and audio files. Then manage everything you upload by placing them in clearly labeled media library folders.
44
- Web developers: Design websites in an organized fashion by uploading graphics, animations, site elements, and content – all packaged neatly in directories.
45
-
46
-
47
- E-Commerce businesses: Quickly upload new products and descriptions and then place them in folders organized by categories. For example, shoes, dresses, suits, and under garments.
48
-
49
- Photographers: As a photographer, you may take hundreds of photos per month and many media categories. If you're uploading them to your website, then things can get pretty hectic. Use folders to organize your photographs into media library folders by type, such as people, animals, nature, environment, real estate, weddings, and so on.
50
-
51
- Publishers: You have a lot of content to manage, edit, and publish. Wouldn't it be nice to have a way to organize it all? With Folders, you can organize every piece of content and media used in each piece into neat posts folders, pages folders, and media categories based on the media type, date, topic, and so on.
52
-
53
- Digital Agencies: You're creating all sorts of content for your clients daily - ads, blog posts, social media content, videos, media categories, and all kind of wordpress media library files. Now, you can easily organize it all by file type, topic, campaign, or other categories using the Folders plugin.
54
-
55
- = FOLDERS PLUGIN FEATURES: =
56
 
57
  * Create new folders
58
  * Create and organize subfolders
59
  * Drag and drop pages, posts, and media library
 
 
60
  * You can also move media library files, pages, posts, or any custom post to folders without using our drag and drop feature. Whenever you select any element or select some elements in bulk, you can move it to a folder using our dropdown menu
61
  * Select specific folders when you add media to your pages, posts or any other post type
62
  * Drag and drop folders, change order, and hierarchy
63
  * Search folder names
 
64
  * Duplicate folders - duplicate an existing folder with all its content
65
  * Upload directly to a media library folder - you can easily upload images or any other kind of files to a specific folder
66
  * Select a default folder for your media library, posts, pages, and custom posts - you can select the folder that will load by default when you open your media library, pages, posts, and custom posts. For example, you can show all the unassigned files whenever you open the media library.
67
  * New! Sort your folders - you can sort your folders based on name and creation date
68
- * New! Media Library folders upload progress bar - track the progress of your uploads to the media library in real time.
69
  * Bulk select images and media files and drag them to any folder. No worries, you can also drag and drop media library files one-by-one if you want :)
70
  * Bulk select and delete folders. You can select one folder or more and delete it in the click of a button.
71
  * While adding images or any kind of file from your media library to your pages and posts, use Folders to view all your media library files based on the folder the files are assigned to. You can also upload new files directly to a folder from that section
@@ -74,20 +63,43 @@ Digital Agencies: You're creating all sorts of content for your clients daily -
74
  * Sticky toolbar for the media library so you can navigate and organize your folders with ease
75
  * Add stars to important directories
76
  * New! Customize the look and feel of your folders. Change the colors, font, and size of your media folder, pages, posts, and custom posts folders
77
- * Simultaneously assign and organize media, pages, posts, templates and custom posts while adding them to directories
78
  * Place content in multiple folders at once
79
  * Easily see subfolders within each file
80
  * Resize folders menu
81
- * Compatible with RTL admin panel (such as Hebrew,Arabic etc.)
82
  * Add and remove folders menu from pages, posts, and media
83
  * Minimize the folders area if you need extra space
84
  * Create media library folders directly when you upload new media files
85
 
86
- = FOLDERS PLUGIN PRO FEATURES: =
87
  * <a href="https://premio.io/downloads/folders?utm_source=wporg" target="_blank" title="Folders pro plans"><strong>Upgrade to pro</strong></a> to get unlimited folders :)
88
  * Download any media library folder as Zip: you can download any media library folder as a zip file. Use this feature to organize your website files and download them locally.
89
  * Sticky Folders - you can pin your folders to the upper part of the folders navigation area. Use the sticky folders feature to make your most important folders accessible at all times.
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  = GDPR AND PRIVACY =
92
  Folders plugin is GDPR compliant:
93
 
@@ -95,7 +107,7 @@ Folders plugin is GDPR compliant:
95
  * We don’t send any data to remote servers
96
  * Our plugin is only used to organize WordPress media library, pages, and posts
97
 
98
- The plugin is compatible with Gutenberg, Elementor website builder, Divi, Visual Composer, WPbakery, Beaver Builder and with any WordPress theme.
99
 
100
  Download this plugin today for free and get 10 folders to organize your WP content. Then unlock unlimited folders with the Pro Plan for max organization!
101
 
@@ -135,9 +147,15 @@ Step 3: Create new folders and drag & drop elements into your new folders
135
  = Is there a time limit for the free plan? =
136
  No. you can use the free plan as long as you want.
137
 
 
 
 
138
  = Does Folders change the URL of my images/posts/pages? =
139
  No. adding a page/post/image into a folder will not change its URL
140
 
 
 
 
141
  = Do I need any coding skills to use Folders plugin? =
142
  No! just activate the plugin and you're good to go.
143
 
@@ -162,6 +180,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
162
 
163
  == Changelog ==
164
 
 
 
 
165
  = 2.6.2 =
166
  WordPress 5.6 compatibility + Visual composer overlapping bug fixed
167
 
1
  === Folders - Organize Media Library Folders, Pages, Posts, Media Categories Folder, File Manager ===
2
  Contributors: galdub, tomeraharon, premio
3
+ Tags: folder, folders, replace media, pages folders, media library, posts folders, media folders, media replace, file manager, directories, media library folders, media library folder
4
  Requires at least: 3.0.0
5
  Tested up to: 5.6
6
+ Stable tag: 2.6.3
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
+ Folders is a WordPress plugin that will help you quickly organize and manage your Media Library files, Pages, Posts, and Custom Posts in folders
10
 
11
  == Description ==
12
 
13
+ Folders is a WordPress plugin that enables users to quickly organize all of their Pages, Posts, and Media files in folders. You can easily drag and drop items into directories and change the folders tree view (hierarchy) as you wish. Need more than 10 folders? Check out <a href="https://premio.io/downloads/folders" target="_blank" title="Folders pro plans"><strong>Folders Pro Plans</strong></a>.
14
 
15
  [youtube https://www.youtube.com/watch?v=GKq5jvuoRY0]
16
 
22
  * Web developers: keep your clients’ website pages in proper order during and after development. You can also mark a folder with a star or give it a unique name for clients to understand what is important and what they should (or shouldn't) touch.
23
  * Bloggers: manage your own content with ease with this file manager plugin. Never get confused again – organize photos and content by topics, categories, and/or dates.
24
  * Quickly upload pages, media, and content to your WordPress and easily organize them into directories so they’re never lost. It’s content creation and organization at its finest!
25
+ * Mark certain folders as important to quickly find the content you need for your WordPress projects and tasks. No worries about your content getting lost in a sea of directories!
26
+ * Media replace: replace media files with other files. Whenever you replace media, the change will reflect throughout your website on all your pages, posts, etc.
27
+
28
 
29
  <strong>Note:</strong> adding a page/post/image into a folder will not change its URL.
30
 
38
 
39
  It’s rather simple really – once you install the plugin, you can begin using it. If you’re a content creator, you can upload text, images, videos, and audio at the click of a button. Then you can organize everything you upload into neat subfolders. For instance, you can create a media folder, content folder, and image folder, then have them all organized by date. It has a drag and drop interface, making it user-friendly for everyone. It’s like having your own media library at your own disposal. You can create this media library for yourself or others – it’s perfect for website owners and content professionals!
40
 
41
+ = FOLDERS PLUGIN FEATURES =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  * Create new folders
44
  * Create and organize subfolders
45
  * Drag and drop pages, posts, and media library
46
+ * New! Media replace - replace media files (images, PDF, you name it) with other files uploaded by you
47
+ * New! Import folders from other plugins - import folders from FileBird, Enhanced Media Library, Wicked Folders, Real Media Library, and WP Media Folder
48
  * You can also move media library files, pages, posts, or any custom post to folders without using our drag and drop feature. Whenever you select any element or select some elements in bulk, you can move it to a folder using our dropdown menu
49
  * Select specific folders when you add media to your pages, posts or any other post type
50
  * Drag and drop folders, change order, and hierarchy
51
  * Search folder names
52
+ * Create more than one folder at once (separate your folders names with commas)
53
  * Duplicate folders - duplicate an existing folder with all its content
54
  * Upload directly to a media library folder - you can easily upload images or any other kind of files to a specific folder
55
  * Select a default folder for your media library, posts, pages, and custom posts - you can select the folder that will load by default when you open your media library, pages, posts, and custom posts. For example, you can show all the unassigned files whenever you open the media library.
56
  * New! Sort your folders - you can sort your folders based on name and creation date
57
+ * New! Media Library folders upload progress bar - track the progress of your uploads to the media library in real-time.
58
  * Bulk select images and media files and drag them to any folder. No worries, you can also drag and drop media library files one-by-one if you want :)
59
  * Bulk select and delete folders. You can select one folder or more and delete it in the click of a button.
60
  * While adding images or any kind of file from your media library to your pages and posts, use Folders to view all your media library files based on the folder the files are assigned to. You can also upload new files directly to a folder from that section
63
  * Sticky toolbar for the media library so you can navigate and organize your folders with ease
64
  * Add stars to important directories
65
  * New! Customize the look and feel of your folders. Change the colors, font, and size of your media folder, pages, posts, and custom posts folders
66
+ * Simultaneously assign and organize media, pages, posts, templates, and custom posts while adding them to directories
67
  * Place content in multiple folders at once
68
  * Easily see subfolders within each file
69
  * Resize folders menu
70
+ * Compatible with RTL admin panel (such as Hebrew, Arabic etc.)
71
  * Add and remove folders menu from pages, posts, and media
72
  * Minimize the folders area if you need extra space
73
  * Create media library folders directly when you upload new media files
74
 
75
+ = FOLDERS PLUGIN PRO FEATURES 🚀 =
76
  * <a href="https://premio.io/downloads/folders?utm_source=wporg" target="_blank" title="Folders pro plans"><strong>Upgrade to pro</strong></a> to get unlimited folders :)
77
  * Download any media library folder as Zip: you can download any media library folder as a zip file. Use this feature to organize your website files and download them locally.
78
  * Sticky Folders - you can pin your folders to the upper part of the folders navigation area. Use the sticky folders feature to make your most important folders accessible at all times.
79
 
80
+ = Replace media files =
81
+ With Folders plugin, you can replace media library files with other files. This feature is a life-saver whenever you need to replace a media file on all of your pages, posts, etc. When you replace a media file, the change will reflect on all of your pages, posts, and more. Check out the media replace feature in action:
82
+ [youtube https://www.youtube.com/watch?v=16MrxVo2EC4]
83
+
84
+ = Import folders =
85
+ You can import folders data from FileBird, Enhanced Media Library, Wicked Folders, Real Media Library, and WP Media Folder
86
+
87
+ = Here Are Some Use Cases =
88
+
89
+ Wondering how you can use this pages, posts and media library folders for your online business? Here’s are a few use cases:
90
+
91
+ <strong>Bloggers:</strong> Easily upload content for blogs, including text, photos, videos, and audio files. Then manage everything you upload by placing them in clearly labeled media library folders.
92
+ Web developers: Design websites in an organized fashion by uploading graphics, animations, site elements, and content – all packaged neatly in directories.
93
+
94
+
95
+ <strong>E-Commerce businesses:</strong> Quickly upload new products and descriptions and then place them in folders organized by categories. For example, shoes, dresses, suits, and undergarments.
96
+
97
+ <strong>Photographers:</strong> As a photographer, you may take hundreds of photos per month and many media categories. If you're uploading them to your website, then things can get pretty hectic. Use folders to organize your photographs into media library folders by type, such as people, animals, nature, environment, real estate, weddings, and so on.
98
+
99
+ <strong>Publishers:</strong> You have a lot of content to manage, edit, and publish. Wouldn't it be nice to have a way to organize it all? With Folders, you can organize every piece of content and media used in each piece into neat posts folders, pages folders, and media categories based on the media type, date, topic, and so on.
100
+
101
+ <strong>Digital Agencies:</strong> You're creating all sorts of content for your clients daily - ads, blog posts, social media content, videos, media categories, and all kind of WordPress media library files. Now, you can easily organize it all by file type, topic, campaign, or other categories using the Folders plugin.
102
+
103
  = GDPR AND PRIVACY =
104
  Folders plugin is GDPR compliant:
105
 
107
  * We don’t send any data to remote servers
108
  * Our plugin is only used to organize WordPress media library, pages, and posts
109
 
110
+ The plugin is compatible with Gutenberg, Elementor website builder, Divi, Visual Composer, WPbakery, Beaver Builder, and with any WordPress theme.
111
 
112
  Download this plugin today for free and get 10 folders to organize your WP content. Then unlock unlimited folders with the Pro Plan for max organization!
113
 
147
  = Is there a time limit for the free plan? =
148
  No. you can use the free plan as long as you want.
149
 
150
+ = Can I import folders form other plugins? =
151
+ Yes you can! Currently, we support FileBird, Enhanced Media Library, Wicked Folders, Real Media Library, and WP Media Folder
152
+
153
  = Does Folders change the URL of my images/posts/pages? =
154
  No. adding a page/post/image into a folder will not change its URL
155
 
156
+ = Can I replace media library files with Folders plugin? =
157
+ Yes, you can! Whenever you change media library files, the change will reflect on all of your pages, posts, and more
158
+
159
  = Do I need any coding skills to use Folders plugin? =
160
  No! just activate the plugin and you're good to go.
161
 
180
 
181
  == Changelog ==
182
 
183
+ = 2.6.3 =
184
+ Replace media feature, import option (FileBird, Enhanced Media Library, Wicked Folders, Real Media Library, and WP Media Folder), create multiple folders at once (comma separated), option to hide Folders settings from main menu, bug fixed
185
+
186
  = 2.6.2 =
187
  WordPress 5.6 compatibility + Visual composer overlapping bug fixed
188
 
templates/admin/admin-content.php CHANGED
@@ -165,7 +165,10 @@ if(!empty($post_type)) {
165
  <div class="popup-form-content">
166
  <form action="" method="post" id="save-folder-form">
167
  <div id="add-update-folder-title" class="add-update-folder-title">
168
- Add new folder
 
 
 
169
  </div>
170
  <div class="folder-form-input">
171
  <div class="folder-group">
@@ -234,7 +237,7 @@ if(!empty($post_type)) {
234
  </div>
235
  <div class="folder-form-buttons">
236
  <a href="javascript:;" class="form-cancel-btn">Cancel</a>
237
- <a href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>" target="_blank" class="form-submit-btn">See Pro Plans</a>
238
  </div>
239
  </div>
240
  </div>
165
  <div class="popup-form-content">
166
  <form action="" method="post" id="save-folder-form">
167
  <div id="add-update-folder-title" class="add-update-folder-title">
168
+ Add a new folder
169
+ </div>
170
+ <div class="add-folder-note">
171
+ Enter your folder's name (or create more than one folder by separating the name with a comma)
172
  </div>
173
  <div class="folder-form-input">
174
  <div class="folder-group">
237
  </div>
238
  <div class="folder-form-buttons">
239
  <a href="javascript:;" class="form-cancel-btn">Cancel</a>
240
+ <a href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" target="_blank" class="form-submit-btn">See Pro Plans</a>
241
  </div>
242
  </div>
243
  </div>
templates/admin/folder-popup.php CHANGED
@@ -36,6 +36,31 @@
36
  },
37
  error: function (xhr, status, error) {
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  });
41
  });
36
  },
37
  error: function (xhr, status, error) {
38
 
39
+ }
40
+ });
41
+ if(jQuery("#import-third-party-plugin-data").length) {
42
+ jQuery("#import-third-party-plugin-data").show();
43
+ }
44
+ });
45
+
46
+ jQuery("#import-third-party-plugin-data").hide();
47
+
48
+ jQuery(document).on("click", "#cancel-plugin-import", function(){
49
+ jQuery.ajax({
50
+ type: 'POST',
51
+ url: ajaxurl,
52
+ data: {
53
+ action: 'wcp_update_folders_import_status',
54
+ nonce: '<?php echo wp_create_nonce("folders_import_3rd_party_data") ?>'
55
+ },
56
+ beforeSend: function (xhr) {
57
+
58
+ },
59
+ success: function (res) {
60
+
61
+ },
62
+ error: function (xhr, status, error) {
63
+
64
  }
65
  });
66
  });
templates/admin/general-settings.php CHANGED
@@ -1,97 +1,211 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
  ?>
4
- <!-- do not change here, Free/Pro URL Change -->
5
- <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/settings.css' type='text/css' media='all' />
6
- <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/folder-icon.css' type='text/css' media='all' />
7
- <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/spectrum.min.css' type='text/css' media='all' />
8
- <script src="<?php echo WCP_FOLDER_URL ?>assets/js/spectrum.min.js"></script>
9
- <style>
10
- <?php if ( function_exists( 'is_rtl' ) && is_rtl() ) { ?>
11
- #setting-form {
12
- float: right;
13
- }
14
- <?php } ?>
15
- </style>
16
- <script>
17
- jQuery(document).ready(function(){
18
- jQuery(document).on("click",".folder-select",function(){
19
- if(jQuery(this).is(":checked")) {
20
- jQuery(this).closest("tr").find(".hide-show-option").removeClass("hide-option");
21
- } else {
22
- jQuery(this).closest("tr").find(".hide-show-option").addClass("hide-option");
23
  }
24
- });
25
- jQuery(document).on("click", ".accordion-header", function(){
26
- if(jQuery(this).hasClass("active")) {
27
- jQuery(this).closest(".accordion").find(".accordion-content").slideUp();
28
- jQuery(this).removeClass("active");
29
- } else {
30
- jQuery(this).closest(".accordion").find(".accordion-content").slideDown();
31
- jQuery(this).addClass("active");
32
  }
33
- });
34
- jQuery(".accordion-header:first").trigger("click");
35
- jQuery("#folder_font, #folder_size").change(function(){
36
- setCSSProperties();
37
- });
38
- setCSSProperties();
39
- jQuery('.color-field').spectrum({
40
- chooseText: "Submit",
41
- preferredFormat: "hex",
42
- showInput: true,
43
- cancelText: "Cancel",
44
- move: function (color) {
45
- jQuery(this).val(color.toHexString());
46
- setCSSProperties();
47
- },
48
- change: function (color) {
49
- jQuery(this).val(color.toHexString());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  setCSSProperties();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
- });
53
- });
54
 
55
- function setCSSProperties() {
56
- if(jQuery("#new_folder_color").val() != "") {
57
- jQuery("#add-new-folder").css("border-color", jQuery("#new_folder_color").val());
58
- jQuery("#add-new-folder").css("background-color", jQuery("#new_folder_color").val());
59
- }
60
- if(jQuery("#bulk_organize_button_color").val() != "") {
61
- jQuery(".organize-button").css("border-color", jQuery("#bulk_organize_button_color").val());
62
- jQuery(".organize-button").css("background-color", jQuery("#bulk_organize_button_color").val());
63
- jQuery(".organize-button").css("color", "#ffffff");
64
- }
65
- if(jQuery("#dropdown_color").val() != "") {
66
- jQuery(".media-select").css("border-color", jQuery("#dropdown_color").val());
67
- jQuery(".media-select").css("color", jQuery("#dropdown_color").val());
68
- }
69
- if(jQuery("#folder_bg_color").val() != "") {
70
- jQuery(".all-posts.active-item").css("border-color", jQuery("#folder_bg_color").val());
71
- jQuery(".all-posts.active-item").css("background-color", jQuery("#folder_bg_color").val());
72
- jQuery(".all-posts.active-item").css("color", "#ffffff");
73
- }
74
- jQuery("#custom-css").html("");
75
- if(jQuery("#folder_font").val() != "") {
76
- font_val = jQuery("#folder_font").val();
77
- jQuery('head').append('<link href="https://fonts.googleapis.com/css?family=' + font_val + ':400,600,700" rel="stylesheet" type="text/css" class="chaty-google-font">');
78
- jQuery('.preview-box').css('font-family', font_val);
79
- } else {
80
- jQuery('.preview-box').css('style', "");
81
- }
82
- if(jQuery("#folder_size").val() != "") {
83
- jQuery(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", jQuery("#folder_size").val()+"px");
84
- } else {
85
- jQuery(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", "14px");
86
- }
87
- }
88
- </script>
89
- <div id="custom-css">
90
 
91
- </div>
92
- <div class="wrap">
93
- <h1><?php esc_attr_e( 'Folders Settings', WCP_FOLDER ); ?></h1>
94
- <form action="options.php" method="post" id="setting-form">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  <?php
96
  settings_fields('folders_settings');
97
  settings_fields('default_folders');
@@ -102,329 +216,503 @@ if ( ! defined( 'ABSPATH' ) ) exit;
102
  $default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders;
103
  do_settings_sections( __FILE__ );
104
  ?>
105
- <input type="hidden" name="folder_nonce" value="<?php echo wp_create_nonce("folder_settings") ?>">
106
- <div class="accordion">
107
- <div class="accordion-header">Folders Settings <span class="dashicons dashicons-arrow-down-alt2"></span></div>
108
- <div class="accordion-content no-bp" style="display: block">
109
- <div class="accordion-left">
110
- <table class="form-table">
111
- <tboby>
112
- <?php
113
- $post_types = get_post_types( array( ), 'objects' );
114
- $post_array = array("page", "post", "attachment");
115
- foreach ( $post_types as $post_type ) : ?>
116
- <?php
117
- if ( ! $post_type->show_ui) continue;
118
- $is_checked = !in_array( $post_type->name, $options )?"hide-option":"";
119
- $selected_id = (isset($default_folders[$post_type->name]))?$default_folders[$post_type->name]:"all";
120
- if(in_array($post_type->name, $post_array)){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  ?>
122
  <tr>
123
  <td class="no-padding">
124
- <label for="folders_<?php echo esc_attr($post_type->name); ?>" class="custom-checkbox">
125
- <input type="checkbox" class="folder-select sr-only" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
126
- <span></span>
127
- </label>
128
  </td>
129
- <td width="220px">
130
- <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use folders with: ', WCP_FOLDER )." ".esc_html_e($post_type->label); ?></label>
131
  </td>
132
- <td class="default-folder">
133
- <label class="hide-show-option <?php echo esc_attr($is_checked) ?>" for="folders_for_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Default folder: ', WCP_FOLDER ) ?></label>
 
 
 
 
 
134
  </td>
135
  <td>
136
- <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
137
- <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option>
138
- <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
139
- <?php
140
- if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
141
- foreach ($terms_data[$post_type->name] as $term) {
142
- $selected = ($selected_id == $term->slug)?"selected":"";
143
- echo "<option ".esc_attr($selected)." value='".esc_attr($term->slug)."'>".esc_attr($term->name)."</option>";
144
- }
145
- } ?>
146
- </select>
147
  </td>
148
  </tr>
149
  <?php
150
- } else { ?>
 
151
  <tr>
152
  <td class="no-padding">
153
- <label for="folders_<?php echo esc_attr($post_type->name); ?>" class="custom-checkbox">
154
- <input type="checkbox" class="sr-only folder-select" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
155
- <span></span>
156
- </label>
157
  </td>
158
  <td>
159
- <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use folders with: ', WCP_FOLDER )." ".esc_html_e($post_type->label); ?></label>
160
  </td>
161
- <td class="default-folder">
162
- <label class="hide-show-option <?php echo esc_attr($is_checked) ?>" for="folders_for_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Default folder: ', WCP_FOLDER ) ?></label>
 
 
 
 
 
163
  </td>
164
  <td>
165
- <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
166
- <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option>
167
- <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
168
- <?php
169
- if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
170
- foreach ($terms_data[$post_type->name] as $term) {
171
- $selected = ($selected_id == $term->slug)?"selected":"";
172
- echo "<option ".esc_attr($selected)." value='".esc_attr($term->slug)."'>".esc_attr($term->name)."</option>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  </select>
176
  </td>
177
  </tr>
178
- <?php } endforeach; ?>
179
- <tr>
180
- <td width="20" class="no-padding">
181
- <?php $val = get_option("folders_show_in_menu"); ?>
182
- <input type="hidden" name="folders_show_in_menu" value="off" />
183
- <label for="folders_show_in_menu" class="custom-checkbox">
184
- <input class="sr-only" type="checkbox" id="folders_show_in_menu" name="folders_show_in_menu" value="on" <?php echo ($val == "on")?"checked='checked'":"" ?>/>
185
- <span></span>
186
- </label>
187
- </td>
188
- <td colspan="3">
189
- <label for="folders_show_in_menu" ><?php esc_html_e( 'Show Folders in Menu:', WCP_FOLDER ); ?></label>
190
- </td>
191
- </tr>
192
- <!-- Do not make changes here, Only for Free -->
193
- </tboby>
194
- </table>
195
- <input type="hidden" name="folders_settings1[premio_folder_option]" value="yes" />
196
- </div>
197
- <div class="accordion-right">
198
- <div class="premio-help">
199
- <a href="https://premio.io/help/folders/?utm_source=pluginspage" target="_blank">
200
- <div class="premio-help-btn">
201
- <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/premio-help.png") ?>" alt="Premio Help" class="Premio Help" />
202
- <div class="need-help">Need Help</div>
203
- <div class="visit-our">Visit our</div>
204
- <div class="knowledge-base">knowledge base</div>
205
- </div>
206
- </a>
207
- </div>
208
- </div>
209
- <div class="clear"></div>
210
- <div class="separator"></div>
211
- <table class="form-table">
212
- <tfoot>
213
- <tr>
214
- <td class="no-padding" width="20px">
215
- <span class="dashicons dashicons-editor-help"></span>
216
- </td>
217
- <td width="220px">
218
- <?php
219
- $tlfs = get_option("folder_old_plugin_folder_status");
220
- if($tlfs == false || $tlfs < 10) {
221
- $tlfs = 10;
222
- }
223
- $total = WCP_Folders::get_ttl_fldrs();
224
- if($total > $tlfs) {
225
- $tlfs = $total;
226
- }
227
- ?>
228
- You have used <b><?php echo esc_attr($total) ?></b>/<?php echo esc_attr($tlfs) ?> Folders.
229
- </td>
230
- <td class="no-padding" colspan="2">
231
- <a class="upgrade-btn" href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a>
232
- </td>
233
- </tr>
234
- </tfoot>
235
- </table>
236
- </div>
237
- </div>
238
- <div class="accordion">
239
- <div class="accordion-header">Customize Folders <span class="dashicons dashicons-arrow-down-alt2"></span></div>
240
- <div class="accordion-content">
241
- <div class="accordion-left">
242
- <table class="form-table">
243
- <?php
244
- $color = !isset($customize_folders['new_folder_color'])||empty($customize_folders['new_folder_color'])?"#FA166B":$customize_folders['new_folder_color'];
245
- ?>
246
- <tr>
247
- <td width="220px" class="no-padding">
248
- <label for="new_folder_color" ><b>"New Folder"</b> button color</label>
249
- </td>
250
- <td width="32px">
251
- <input type="text" class="color-field" name="customize_folders[new_folder_color]" id="new_folder_color" value="<?php echo esc_attr($color) ?>" />
252
- </td>
253
- <td rowspan="4" >
254
-
255
- </td>
256
- </tr>
257
- <?php
258
- $color = !isset($customize_folders['bulk_organize_button_color'])||empty($customize_folders['bulk_organize_button_color'])?"#FA166B":$customize_folders['bulk_organize_button_color'];
259
- ?>
260
- <tr>
261
- <td class="no-padding">
262
- <label for="bulk_organize_button_color" ><b>"Bulk Organize"</b> button color</label>
263
- </td>
264
- <td>
265
- <input type="text" class="color-field" name="customize_folders[bulk_organize_button_color]" id="bulk_organize_button_color" value="<?php echo esc_attr($color) ?>" />
266
- </td>
267
- </tr>
268
- <?php
269
- $color = !isset($customize_folders['dropdown_color'])||empty($customize_folders['dropdown_color'])?"#484848":$customize_folders['dropdown_color'];
270
- ?>
271
- <tr>
272
- <td class="no-padding">
273
- <label for="dropdown_color" >Dropdown color</label>
274
- </td>
275
- <td>
276
- <input type="text" class="color-field" name="customize_folders[dropdown_color]" id="dropdown_color" value="<?php echo esc_attr($color) ?>" />
277
- </td>
278
- </tr>
279
- <?php
280
- $color = !isset($customize_folders['folder_bg_color'])||empty($customize_folders['folder_bg_color'])?"#FA166B":$customize_folders['folder_bg_color'];
281
- ?>
282
- <tr>
283
- <td class="no-padding">
284
- <label for="folder_bg_color" >Folders background color</label>
285
- </td>
286
- <td>
287
- <input type="text" class="color-field" name="customize_folders[folder_bg_color]" id="folder_bg_color" value="<?php echo esc_attr($color) ?>" />
288
- </td>
289
- </tr>
290
- <tr>
291
- <td class="no-padding">
292
- <label for="folder_font" >Folders font</label>
293
- </td>
294
- <td colspan="2">
295
- <?php
296
- $font = !isset($customize_folders['folder_font'])||empty($customize_folders['folder_font'])?"":$customize_folders['folder_font'];
297
- $index = 0;
298
- ?>
299
- <select name="customize_folders[folder_font]" id="folder_font" >
300
- <?php $group = '';
301
- foreach ($fonts as $key => $value):
302
- $title = $key;
303
- if($index == 0) {
304
- $key = "";
305
- }
306
- $index++;
307
- if ($value != $group) {
308
- echo '<optgroup label="' . $value . '">';
309
- $group = $value;
310
- }
311
- ?>
312
- <option value="<?php echo $key; ?>" <?php selected($font, $key); ?>><?php echo $title; ?></option>
313
- <?php endforeach; ?>
314
- </select>
315
- </td>
316
- </tr>
317
- <tr>
318
- <td class="no-padding">
319
- <label for="folder_size" >Folders size</label>
320
- </td>
321
- <td colspan="2">
322
- <?php
323
- $sizes = array(
324
- "12" => "Small",
325
- "16" => "Medium",
326
- "20" => "Large"
327
- );
328
- $size = !isset($customize_folders['folder_size'])||empty($customize_folders['folder_size'])?"16":$customize_folders['folder_size'];
329
- ?>
330
- <select name="customize_folders[folder_size]" id="folder_size" >
331
  <?php
332
- foreach ($sizes as $key=>$value) {
333
- $selected = ($key == $size)?"selected":"";
334
- echo "<option ".$selected." value='".$key."'>".$value."</option>";
335
  }
336
  ?>
337
- </select>
338
- </td>
339
- </tr>
340
- <?php
341
- $show_in_page = !isset($customize_folders['show_in_page'])||empty($customize_folders['show_in_page'])?"show":$customize_folders['show_in_page'];
342
- if(empty($show_in_page)) {
343
- $show_in_page = "show";
344
- }
345
- ?>
346
- <tr>
347
- <td colspan="3" class="no-padding">
348
- <input type="hidden" name="customize_folders[show_in_page]" value="hide">
349
- <div class="custom-checkbox">
350
- <input id="show_folders" class="sr-only" <?php checked($show_in_page, "show") ?> type="checkbox" name="customize_folders[show_in_page]" value="show">
351
- <span></span>
352
- </div>
353
- <label for="show_folders">Show Folders in upper position</label>
354
- </td>
355
- </tr>
356
- </table>
357
- </div>
358
- <div class="accordion-right">
359
- <div class="preview-text">
360
- Preview
361
- <div class="preview-text-info">See the full functionality on your media library, posts, pages, and custom posts</div>
362
- </div>
363
- <div class="preview-inner-box">
364
- <div class="preview-box">
365
- <div class="wcp-custom-form">
366
- <div class="form-title">
367
- Folders
368
- <a href="javascript:;" class="add-new-folder" id="add-new-folder">
369
- <span class="create_new_folder"><i class="pfolder-add-folder"></i></span>
370
- <span>New Folder</span>
371
- </a>
372
- <div class="clear"></div>
373
- </div>
374
- <div class="form-options">
375
- <ul>
376
- <li>
377
  <div class="custom-checkbox">
378
- <input type="checkbox" class="sr-only" >
379
  <span></span>
380
  </div>
381
- </li>
382
- <li>
383
- <a href="javascript:;" id="inline-update"><span class="icon pfolder-edit-folder"><span class="path2"></span></span> <span class="text">Rename</span> </a>
384
- </li>
385
- <li>
386
- <a href="javascript:;" id="inline-remove"><span class="icon pfolder-remove"></span> <span class="text">Delete</span> </a>
387
- </li>
388
- <li class="last">
389
- <a href="javascript:;" id="expand-collapse-list" data-tooltip="Expand"><span class="icon pfolder-arrow-down"></span></a>
390
- </li>
391
- <li class="last">
392
- <a href="javascript:;" ><span class="icon pfolder-arrow-sort"></span></a>
393
- </li>
394
- </ul>
395
- </div>
396
  </div>
397
- <div class="shadow-box">
398
- <div class="header-posts">
399
- <a href="javascript:;" class="all-posts active-item">All Files <span class="total-count">215</span></a>
 
400
  </div>
401
- <div class="un-categorised-items ui-droppable">
402
- <a href="javascript:;" class="un-categorized-posts">Unassigned Files <span class="total-count total-empty">191</span> </a>
403
- </div>
404
- <div class="separator"></div>
405
- <ul class="folder-list">
406
- <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span>Folder 1</span><span class="total-count">20</span><span class="clear"></span></a></li>
407
- <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span>Folder 2</span><span class="total-count">13</span><span class="clear"></span></a></li>
408
- <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span>Folder 3</span><span class="total-count">5</span><span class="clear"></span></a></li>
409
- </ul>
410
- <div class="separator"></div>
411
- <div class="media-buttons">
412
- <select class="media-select">
413
- <option>All Files</option>
414
- <option>Folder 1</option>
415
- <option>Folder 2</option>
416
- <option>Folder 3</option>
417
- </select>
418
- <button type="button" class="button organize-button">Bulk Organize</button>
419
- <div style="clear: both;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  </div>
421
  </div>
 
 
422
  </div>
423
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  </div>
425
- <div class="clear"></div>
426
  </div>
427
  </div>
428
- <?php submit_button(); ?>
429
- </form>
430
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
  ?>
4
+ <!-- do not change here, Free/Pro URL Change -->
5
+ <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/settings.css' type='text/css' media='all' />
6
+ <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/folder-icon.css' type='text/css' media='all' />
7
+ <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/spectrum.min.css' type='text/css' media='all' />
8
+ <script src="<?php echo WCP_FOLDER_URL ?>assets/js/spectrum.min.js"></script>
9
+ <style>
10
+ <?php if ( function_exists( 'is_rtl' ) && is_rtl() ) { ?>
11
+ #setting-form {
12
+ float: right;
13
+ }
14
+ <?php } ?>
15
+ </style>
16
+ <script>
17
+ (function (factory) {
18
+ "use strict";
19
+ if (typeof define === 'function' && define.amd) {
20
+ define(['jquery'], factory);
 
 
21
  }
22
+ else if(typeof module !== 'undefined' && module.exports) {
23
+ module.exports = factory(require('jquery'));
 
 
 
 
 
 
24
  }
25
+ else {
26
+ factory(jQuery);
27
+ }
28
+ }(function ($, undefined) {
29
+ var selectedItem;
30
+ var importTitle = "<?php esc_html_e("Import folders from %plugin%", "folders"); ?>";
31
+ var importDesc = "<?php esc_html_e("Are you sure you'd like to import %d folders from %plugin%?", "folders"); ?>";
32
+ var removeTitle = "<?php esc_html_e("Are you sure?", "folders"); ?>";
33
+ var removeDesc = "<?php esc_html_e("You're about to delete %plugin%'s folders. Are you sure you'd like to proceed?", "folders"); ?>";
34
+ $(document).ready(function(){
35
+ $(document).on("click",".form-cancel-btn, .close-popup-button, .folder-popup-form",function(){
36
+ $(".folder-popup-form").hide();
37
+ });
38
+ $(document).on("click",".popup-form-content", function(e){
39
+ e.stopPropagation();
40
+ e.stopImmediatePropagation();
41
+ });
42
+ $(document).on("click",".folder-select",function(){
43
+ if($(this).is(":checked")) {
44
+ $(this).closest("tr").find(".hide-show-option").removeClass("hide-option");
45
+ } else {
46
+ $(this).closest("tr").find(".hide-show-option").addClass("hide-option");
47
+ }
48
+ });
49
+ $(document).on("click", ".accordion-header", function(){
50
+ if($(this).hasClass("active")) {
51
+ $(this).closest(".accordion").find(".accordion-content").slideUp();
52
+ $(this).removeClass("active");
53
+ } else {
54
+ $(this).closest(".accordion").find(".accordion-content").slideDown();
55
+ $(this).addClass("active");
56
+ }
57
+ });
58
+ $(".accordion-header:first").trigger("click");
59
+ $("#folder_font, #folder_size").change(function(){
60
+ setCSSProperties();
61
+ });
62
  setCSSProperties();
63
+ $('.color-field').spectrum({
64
+ chooseText: "Submit",
65
+ preferredFormat: "hex",
66
+ showInput: true,
67
+ cancelText: "Cancel",
68
+ move: function (color) {
69
+ $(this).val(color.toHexString());
70
+ setCSSProperties();
71
+ },
72
+ change: function (color) {
73
+ $(this).val(color.toHexString());
74
+ setCSSProperties();
75
+ }
76
+ });
77
+ $(document).on("click", ".import-folder-data", function(e){
78
+ selectedItem = $(this).closest("tr").data("plugin");
79
+ if(!$(this).hasClass("in-popup")) {
80
+ var pluginName = $(this).closest("tr").find(".plugin-name").html();
81
+ var pluginFolders = parseInt($(this).closest("tr").data("folders"));
82
+ var popupTitle = importTitle.replace("%plugin%", pluginName);
83
+ $(".import-folder-title").html(popupTitle);
84
+ var popupDesc = importDesc.replace("%plugin%", "<b>" + pluginName + "</b>");
85
+ popupDesc = popupDesc.replace("%d", "<b>" + pluginFolders + "</b>");
86
+ $(".import-folder-note").html(popupDesc);
87
+ $("#import-plugin-data").show();
88
+ } else {
89
+ importPluginData();
90
+ }
91
+ });
92
+ $(document).on("click", "#import-folder-button", function(e){
93
+ importPluginData();
94
+ });
95
+ $(document).on("click", ".remove-folder-data", function(e){
96
+ selectedItem = $(this).closest("tr").data("plugin");
97
+ var pluginName = $(this).closest("tr").find(".plugin-name").html();
98
+ var pluginFolders = parseInt($(this).closest("tr").data("folders"));
99
+ var popupTitle = removeTitle.replace("%plugin%", pluginName);
100
+ $(".remove-folder-title").html(popupTitle);
101
+ var popupDesc = removeDesc.replace("%plugin%", "<b>" + pluginName + "</b>");
102
+ popupDesc = popupDesc.replace("%d", "<b>" + pluginFolders + "</b>");
103
+ $(".remove-folder-note").html(popupDesc);
104
+ $("#remove-plugin-data").show();
105
+ });
106
+ $(document).on("click", "#remove-folder-button", function(){
107
+ removePluginData();
108
+ });
109
+ });
110
+
111
+ function importPluginData() {
112
+ $("#import-folder-button").addClass("button");
113
+ $("#import-folder-button").prop("disabled", true);
114
+ $(".other-plugins-"+selectedItem+" .import-folder-data").prop("disabled", true);
115
+ $(".other-plugins-"+selectedItem+" .import-folder-data .spinner").addClass("active");
116
+ $.ajax({
117
+ url: "<?php echo admin_url("admin-ajax.php") ?>",
118
+ data: {
119
+ 'plugin': $(".other-plugins-"+selectedItem).data("plugin"),
120
+ 'nonce': $(".other-plugins-"+selectedItem).data("nonce"),
121
+ 'action': 'wcp_import_plugin_folders_data'
122
+ },
123
+ type: 'post',
124
+ success: function(res){
125
+ var response = $.parseJSON(res);
126
+ if(response.status == -1) {
127
+ $(".other-plugins-"+selectedItem+" .import-folder-data").prop("disabled", false);
128
+ $(".other-plugins-"+selectedItem+" .import-folder-data .spinner").removeClass("active");
129
+ $("#import-third-party-plugin-data").hide();
130
+ $("#no-more-folder-credit").show();
131
+ $("#import-folder-button").removeClass("button");
132
+ $("#import-folder-button").prop("disabled", false);
133
+ } else if(response.status) {
134
+ $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("success-import");
135
+ $(".other-plugins-"+response.data.plugin+" .import-folder-data").remove();
136
+ } else {
137
+ $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("error-import");
138
+ $(".other-plugins-"+response.data.plugin+" .import-folder-data").remove();
139
+ }
140
+ $("#import-folder-button").prop("disabled", false);
141
+ $("#import-plugin-data").hide();
142
+ }
143
+ });
144
  }
 
 
145
 
146
+ function removePluginData() {
147
+ $(".other-plugins-"+selectedItem+" .remove-folder-data .spinner").addClass("active");
148
+ $.ajax({
149
+ url: "<?php echo admin_url("admin-ajax.php") ?>",
150
+ data: {
151
+ 'plugin': $(".other-plugins-"+selectedItem).data("plugin"),
152
+ 'nonce': $(".other-plugins-"+selectedItem).data("nonce"),
153
+ 'action': 'wcp_remove_plugin_folders_data'
154
+ },
155
+ type: 'post',
156
+ success: function(res){
157
+ var response = $.parseJSON(res);
158
+ $("#remove-plugin-data").hide();
159
+ if(response.status) {
160
+ $(".other-plugins-"+response.data.plugin).remove();
161
+ } else {
162
+ $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("error-import");
163
+ $(".other-plugins-"+response.data.plugin+" .remove-folder-data .spinner").removeClass("active");
164
+ }
165
+ }
166
+ });
167
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
169
+ function setCSSProperties() {
170
+ if($("#new_folder_color").val() != "") {
171
+ $("#add-new-folder").css("border-color", $("#new_folder_color").val());
172
+ $("#add-new-folder").css("background-color", $("#new_folder_color").val());
173
+ }
174
+ if($("#bulk_organize_button_color").val() != "") {
175
+ $(".organize-button").css("border-color", $("#bulk_organize_button_color").val());
176
+ $(".organize-button").css("background-color", $("#bulk_organize_button_color").val());
177
+ $(".organize-button").css("color", "#ffffff");
178
+ }
179
+ if($("#dropdown_color").val() != "") {
180
+ $(".media-select").css("border-color", $("#dropdown_color").val());
181
+ $(".media-select").css("color", $("#dropdown_color").val());
182
+ }
183
+ if($("#folder_bg_color").val() != "") {
184
+ $(".all-posts.active-item").css("border-color", $("#folder_bg_color").val());
185
+ $(".all-posts.active-item").css("background-color", $("#folder_bg_color").val());
186
+ $(".all-posts.active-item").css("color", "#ffffff");
187
+ }
188
+ $("#custom-css").html("");
189
+ if($("#folder_font").val() != "") {
190
+ font_val = $("#folder_font").val();
191
+ $('head').append('<link href="https://fonts.googleapis.com/css?family=' + font_val + ':400,600,700" rel="stylesheet" type="text/css" class="chaty-google-font">');
192
+ $('.preview-box').css('font-family', font_val);
193
+ } else {
194
+ $('.preview-box').css('style', "");
195
+ }
196
+ if($("#folder_size").val() != "") {
197
+ $(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", $("#folder_size").val()+"px");
198
+ } else {
199
+ $(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", "14px");
200
+ }
201
+ }
202
+ }));
203
+ </script>
204
+ <div id="custom-css">
205
+
206
+ </div>
207
+ <div class="wrap">
208
+ <h1><?php esc_html_e( 'Folders Settings', WCP_FOLDER ); ?></h1>
209
  <?php
210
  settings_fields('folders_settings');
211
  settings_fields('default_folders');
216
  $default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders;
217
  do_settings_sections( __FILE__ );
218
  ?>
219
+ <?php if($setting_page!="upgrade-to-pro") { ?>
220
+ <form action="options.php" method="post" id="setting-form">
221
+ <?php } ?>
222
+ <div class="folders-tabs">
223
+ <div class="folder-tab-menu">
224
+ <ul>
225
+ <li><a class="<?php echo esc_attr(($setting_page=="folder-settings")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=folder-settings") ?>"><?php esc_html_e( 'Folders Settings', WCP_FOLDER ); ?></a></li>
226
+ <li><a class="<?php echo esc_attr(($setting_page=="customize-folders")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=customize-folders") ?>"><?php esc_html_e( 'Customize Folders', WCP_FOLDER ); ?></a></li>
227
+ <li><a class="<?php echo esc_attr(($setting_page=="folders-import")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=folders-import") ?>"><?php esc_html_e( 'Import', WCP_FOLDER ); ?></a></li>
228
+ <?php if($isInSettings) { ?>
229
+ <li><a class="<?php echo esc_attr(($setting_page=="upgrade-to-pro")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=upgrade-to-pro") ?>"><?php esc_html_e( 'Upgrade to Pro', WCP_FOLDER ); ?></a></li>
230
+ <?php } ?>
231
+ </ul>
232
+ </div>
233
+ <div class="folder-tab-content">
234
+ <div class="tab-content <?php echo esc_attr(($setting_page=="folder-settings")?"active":"") ?>" id="folder-settings">
235
+ <div class="accordion-content no-bp">
236
+ <div class="accordion-left">
237
+ <table class="form-table">
238
+ <tboby>
239
+ <?php
240
+ $post_types = get_post_types( array( ), 'objects' );
241
+ $post_array = array("page", "post", "attachment");
242
+ foreach ( $post_types as $post_type ) : ?>
243
+ <?php
244
+ if ( ! $post_type->show_ui) continue;
245
+ $is_checked = !in_array( $post_type->name, $options )?"hide-option":"";
246
+ $selected_id = (isset($default_folders[$post_type->name]))?$default_folders[$post_type->name]:"all";
247
+ if(in_array($post_type->name, $post_array)){
248
+ ?>
249
+ <tr>
250
+ <td class="no-padding">
251
+ <label label for="folders_<?php echo esc_attr($post_type->name); ?>" class="custom-checkbox">
252
+ <input type="checkbox" class="folder-select sr-only" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
253
+ <span></span>
254
+ </label>
255
+ </td>
256
+ <td width="220px">
257
+ <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use Folders with: ', WCP_FOLDER )." ".esc_html_e($post_type->label); ?></label>
258
+ </td>
259
+ <td class="default-folder">
260
+ <label class="hide-show-option <?php echo esc_attr($is_checked) ?>" for="folders_for_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Default folder: ', WCP_FOLDER ) ?></label>
261
+ </td>
262
+ <td>
263
+ <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
264
+ <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option>
265
+ <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
266
+ <?php
267
+ if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
268
+ foreach ($terms_data[$post_type->name] as $term) {
269
+ $selected = ($selected_id == $term->slug)?"selected":"";
270
+ echo "<option ".esc_attr($selected)." value='".esc_attr($term->slug)."'>".esc_attr($term->name)."</option>";
271
+ }
272
+ } ?>
273
+ </select>
274
+ </td>
275
+ </tr>
276
+ <?php
277
+ } else { ?>
278
+ <tr>
279
+ <td class="no-padding">
280
+ <label label for="folders_<?php echo esc_attr($post_type->name); ?>" class="custom-checkbox">
281
+ <input type="checkbox" class="sr-only folder-select" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
282
+ <span></span>
283
+ </label>
284
+ </td>
285
+ <td>
286
+ <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use Folders with: ', WCP_FOLDER )." ".esc_html_e($post_type->label); ?></label>
287
+ </td>
288
+ <td class="default-folder">
289
+ <label class="hide-show-option <?php echo esc_attr($is_checked) ?>" for="folders_for_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Default folder: ', WCP_FOLDER ) ?></label>
290
+ </td>
291
+ <td>
292
+ <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
293
+ <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option>
294
+ <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
295
+ <?php
296
+ if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
297
+ foreach ($terms_data[$post_type->name] as $term) {
298
+ $selected = ($selected_id == $term->slug)?"selected":"";
299
+ echo "<option ".esc_attr($selected)." value='".esc_attr($term->slug)."'>".esc_attr($term->name)."</option>";
300
+ }
301
+ } ?>
302
+ </select>
303
+ </td>
304
+ </tr>
305
+ <?php }
306
+ endforeach; ?>
307
+ <?php
308
+ $show_in_page = !isset($customize_folders['show_folder_in_settings'])?"no":$customize_folders['show_folder_in_settings'];
309
+ ?>
310
+ <tr>
311
+ <td class="no-padding">
312
+ <input type="hidden" name="customize_folders[show_folder_in_settings]" value="no">
313
+ <div class="custom-checkbox">
314
+ <input id="show_folder_in_settings" class="sr-only" <?php checked($show_in_page, "yes") ?> type="checkbox" name="customize_folders[show_folder_in_settings]" value="yes">
315
+ <span></span>
316
+ </div>
317
+ </td>
318
+ <td colspan="3">
319
+ <label for="show_folder_in_settings" ><?php esc_html_e( 'Place the Folders settings page nested under "Settings"', WCP_FOLDER ); ?></label>
320
+ </td>
321
+ </tr>
322
+ <tr>
323
+ <td width="20" class="no-padding">
324
+ <?php $val = get_option("folders_show_in_menu"); ?>
325
+ <input type="hidden" name="folders_show_in_menu" value="off" />
326
+ <label for="folders_show_in_menu" class="custom-checkbox">
327
+ <input class="sr-only" type="checkbox" id="folders_show_in_menu" name="folders_show_in_menu" value="on" <?php echo ($val == "on")?"checked='checked'":"" ?>/>
328
+ <span></span>
329
+ </label>
330
+ </td>
331
+ <td colspan="3">
332
+ <label for="folders_show_in_menu" ><?php esc_html_e( 'Show the folders also in WordPress menu', WCP_FOLDER ); ?></label>
333
+ </td>
334
+ </tr>
335
+ <!-- Do not make changes here, Only for Free -->
336
+ </tboby>
337
+ </table>
338
+ <input type="hidden" name="folders_settings1[premio_folder_option]" value="yes" />
339
+ </div>
340
+ <div class="accordion-right">
341
+ <div class="premio-help">
342
+ <a href="https://premio.io/help/folders/?utm_source=pluginspage" target="_blank">
343
+ <div class="premio-help-btn">
344
+ <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/premio-help.png") ?>" alt="Premio Help" class="Premio Help" />
345
+ <div class="need-help">Need Help</div>
346
+ <div class="visit-our">Visit our</div>
347
+ <div class="knowledge-base">knowledge base</div>
348
+ </div>
349
+ </a>
350
+ </div>
351
+ </div>
352
+ <div class="clear"></div>
353
+ <?php submit_button(); ?>
354
+ <div class="separator"></div>
355
+ <table class="form-table">
356
+ <tfoot>
357
+ <tr>
358
+ <td class="no-padding" width="20px">
359
+ <span class="dashicons dashicons-editor-help"></span>
360
+ </td>
361
+ <td width="220px">
362
+ <?php
363
+ $tlfs = get_option("folder_old_plugin_folder_status");
364
+ if($tlfs == false || $tlfs < 10) {
365
+ $tlfs = 10;
366
+ }
367
+ $total = WCP_Folders::get_ttl_fldrs();
368
+ if($total > $tlfs) {
369
+ $tlfs = $total;
370
+ }
371
+ ?>
372
+ You have used <b><?php echo esc_attr($total) ?></b>/<?php echo esc_attr($tlfs) ?> Folders.
373
+ </td>
374
+ <td class="no-padding" colspan="2">
375
+ <a class="upgrade-btn" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a>
376
+ </td>
377
+ </tr>
378
+ </tfoot>
379
+ </table>
380
+ </div>
381
+ </div>
382
+ <div class="tab-content <?php echo esc_attr(($setting_page=="customize-folders")?"active":"") ?>" id="customize-folders">
383
+ <div class="accordion-content">
384
+ <div class="accordion-left">
385
+ <table class="form-table">
386
+ <?php
387
+ $color = !isset($customize_folders['new_folder_color'])||empty($customize_folders['new_folder_color'])?"#FA166B":$customize_folders['new_folder_color'];
388
+ ?>
389
+ <tr>
390
+ <td width="220px" class="no-padding">
391
+ <label for="new_folder_color" ><b>"New Folder"</b> button color</label>
392
+ </td>
393
+ <td width="32px">
394
+ <input type="text" class="color-field" name="customize_folders[new_folder_color]" id="new_folder_color" value="<?php echo esc_attr($color) ?>" />
395
+ </td>
396
+ <td rowspan="4" >
397
+
398
+ </td>
399
+ </tr>
400
+ <?php
401
+ $color = !isset($customize_folders['bulk_organize_button_color'])||empty($customize_folders['bulk_organize_button_color'])?"#FA166B":$customize_folders['bulk_organize_button_color'];
402
  ?>
403
  <tr>
404
  <td class="no-padding">
405
+ <label for="bulk_organize_button_color" ><b>"Bulk Organize"</b> button color</label>
 
 
 
406
  </td>
407
+ <td>
408
+ <input type="text" class="color-field" name="customize_folders[bulk_organize_button_color]" id="bulk_organize_button_color" value="<?php echo esc_attr($color) ?>" />
409
  </td>
410
+ </tr>
411
+ <?php
412
+ $color = !isset($customize_folders['media_replace_button'])||empty($customize_folders['media_replace_button'])?"#FA166B":$customize_folders['media_replace_button'];
413
+ ?>
414
+ <tr>
415
+ <td class="no-padding">
416
+ <label for="bulk_organize_button_color" ><b>"Replace File"</b> media library button</label>
417
  </td>
418
  <td>
419
+ <input type="text" class="color-field" name="customize_folders[media_replace_button]" id="media_replace_button" value="<?php echo esc_attr($color) ?>" />
 
 
 
 
 
 
 
 
 
 
420
  </td>
421
  </tr>
422
  <?php
423
+ $color = !isset($customize_folders['dropdown_color'])||empty($customize_folders['dropdown_color'])?"#484848":$customize_folders['dropdown_color'];
424
+ ?>
425
  <tr>
426
  <td class="no-padding">
427
+ <label for="dropdown_color" >Dropdown color</label>
 
 
 
428
  </td>
429
  <td>
430
+ <input type="text" class="color-field" name="customize_folders[dropdown_color]" id="dropdown_color" value="<?php echo esc_attr($color) ?>" />
431
  </td>
432
+ </tr>
433
+ <?php
434
+ $color = !isset($customize_folders['folder_bg_color'])||empty($customize_folders['folder_bg_color'])?"#FA166B":$customize_folders['folder_bg_color'];
435
+ ?>
436
+ <tr>
437
+ <td class="no-padding">
438
+ <label for="folder_bg_color" >Folders background color</label>
439
  </td>
440
  <td>
441
+ <input type="text" class="color-field" name="customize_folders[folder_bg_color]" id="folder_bg_color" value="<?php echo esc_attr($color) ?>" />
442
+ </td>
443
+ </tr>
444
+ <tr>
445
+ <td class="no-padding">
446
+ <label for="folder_font" >Folders font</label>
447
+ </td>
448
+ <td colspan="2">
449
+ <?php
450
+ $font = !isset($customize_folders['folder_font'])||empty($customize_folders['folder_font'])?"":$customize_folders['folder_font'];
451
+ $index = 0;
452
+ ?>
453
+ <select name="customize_folders[folder_font]" id="folder_font" >
454
+ <?php $group = '';
455
+ foreach ($fonts as $key => $value):
456
+ $title = $key;
457
+ if($index == 0) {
458
+ $key = "";
459
+ }
460
+ $index++;
461
+ if ($value != $group) {
462
+ echo '<optgroup label="' . $value . '">';
463
+ $group = $value;
464
  }
465
+ ?>
466
+ <option value="<?php echo $key; ?>" <?php selected($font, $key); ?>><?php echo $title; ?></option>
467
+ <?php endforeach; ?>
468
+ </select>
469
+ </td>
470
+ </tr>
471
+ <tr>
472
+ <td class="no-padding">
473
+ <label for="folder_size" >Folders size</label>
474
+ </td>
475
+ <td colspan="2">
476
+ <?php
477
+ $sizes = array(
478
+ "12" => "Small",
479
+ "16" => "Medium",
480
+ "20" => "Large"
481
+ );
482
+ $size = !isset($customize_folders['folder_size'])||empty($customize_folders['folder_size'])?"16":$customize_folders['folder_size'];
483
+ ?>
484
+ <select name="customize_folders[folder_size]" id="folder_size" >
485
+ <?php
486
+ foreach ($sizes as $key=>$value) {
487
+ $selected = ($key == $size)?"selected":"";
488
+ echo "<option ".$selected." value='".$key."'>".$value."</option>";
489
+ }
490
+ ?>
491
  </select>
492
  </td>
493
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  <?php
495
+ $show_in_page = !isset($customize_folders['show_in_page'])||empty($customize_folders['show_in_page'])?"show":$customize_folders['show_in_page'];
496
+ if(empty($show_in_page)) {
497
+ $show_in_page = "show";
498
  }
499
  ?>
500
+ <tr>
501
+ <td colspan="3" class="no-padding">
502
+ <input type="hidden" name="customize_folders[show_in_page]" value="hide">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
  <div class="custom-checkbox">
504
+ <input id="show_folders" class="sr-only" <?php checked($show_in_page, "show") ?> type="checkbox" name="customize_folders[show_in_page]" value="show">
505
  <span></span>
506
  </div>
507
+ <label for="show_folders">Show Folders in upper position</label>
508
+ </td>
509
+ </tr>
510
+ </table>
 
 
 
 
 
 
 
 
 
 
 
511
  </div>
512
+ <div class="accordion-right">
513
+ <div class="preview-text">
514
+ Preview
515
+ <div class="preview-text-info">See the full functionality on your media library, posts, pages, and custom posts</div>
516
  </div>
517
+ <div class="preview-inner-box">
518
+ <div class="preview-box">
519
+ <div class="wcp-custom-form">
520
+ <div class="form-title">
521
+ Folders
522
+ <a href="javascript:;" class="add-new-folder" id="add-new-folder">
523
+ <span class="create_new_folder"><i class="pfolder-add-folder"></i></span>
524
+ <span>New Folder</span>
525
+ </a>
526
+ <div class="clear"></div>
527
+ </div>
528
+ <div class="form-options">
529
+ <ul>
530
+ <li>
531
+ <div class="custom-checkbox">
532
+ <input type="checkbox" class="sr-only" >
533
+ <span></span>
534
+ </div>
535
+ </li>
536
+ <li>
537
+ <a href="javascript:;" id="inline-update"><span class="icon pfolder-edit-folder"><span class="path2"></span></span> <span class="text">Rename</span> </a>
538
+ </li>
539
+ <li>
540
+ <a href="javascript:;" id="inline-remove"><span class="icon pfolder-remove"></span> <span class="text">Delete</span> </a>
541
+ </li>
542
+ <li class="last">
543
+ <a href="javascript:;" id="expand-collapse-list" data-tooltip="Expand"><span class="icon pfolder-arrow-down"></span></a>
544
+ </li>
545
+ <li class="last">
546
+ <a href="javascript:;" ><span class="icon pfolder-arrow-sort"></span></a>
547
+ </li>
548
+ </ul>
549
+ </div>
550
+ </div>
551
+ <div class="shadow-box">
552
+ <div class="header-posts">
553
+ <a href="javascript:;" class="all-posts active-item">All Files <span class="total-count">215</span></a>
554
+ </div>
555
+ <div class="un-categorised-items ui-droppable">
556
+ <a href="javascript:;" class="un-categorized-posts">Unassigned Files <span class="total-count total-empty">191</span> </a>
557
+ </div>
558
+ <div class="separator"></div>
559
+ <ul class="folder-list">
560
+ <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span>Folder 1</span><span class="total-count">20</span><span class="clear"></span></a></li>
561
+ <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span>Folder 2</span><span class="total-count">13</span><span class="clear"></span></a></li>
562
+ <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span>Folder 3</span><span class="total-count">5</span><span class="clear"></span></a></li>
563
+ </ul>
564
+ <div class="separator"></div>
565
+ <div class="media-buttons">
566
+ <select class="media-select">
567
+ <option>All Files</option>
568
+ <option>Folder 1</option>
569
+ <option>Folder 2</option>
570
+ <option>Folder 3</option>
571
+ </select>
572
+ <button type="button" class="button organize-button">Bulk Organize</button>
573
+ <div style="clear: both;"></div>
574
+ </div>
575
+ </div>
576
+ </div>
577
  </div>
578
  </div>
579
+ <div class="clear"></div>
580
+ <?php submit_button(); ?>
581
  </div>
582
  </div>
583
+ <div class="tab-content <?php echo esc_attr(($setting_page=="folders-import")?"active":"") ?>" id="folder-import">
584
+ <?php if($is_plugin_exists) { ?>
585
+ <div class="import-folder-table">
586
+ <table>
587
+ <tbody>
588
+ <?php foreach ($plugin_info as $slug=>$plugin) {
589
+ if($plugin['is_exists']) { ?>
590
+ <tr class="other-plugins-<?php echo esc_attr__($slug) ?>" data-plugin="<?php echo esc_attr__($slug) ?>" data-nonce="<?php echo wp_create_nonce("import_data_from_".$slug) ?>" data-folders="<?php echo esc_attr($plugin['total_folders']) ?>" data-attachments="<?php echo esc_attr($plugin['total_attachments']) ?>">
591
+ <th class="plugin-name"><?php echo esc_attr__($plugin['name']) ?></th>
592
+ <td>
593
+ <span class="import-message"><?php printf(esc_html__("%s folder%s and %s attachment%s", "folders"), "<b>".$plugin['total_folders']."</b>", ($plugin['total_folders']>1)?esc_html__("s"):"" ,"<b>".$plugin['total_attachments']."</b>", ($plugin['total_attachments']>1)?esc_html__("s"):"") ?></span>
594
+ <button type="button" class="button button-primary import-folder-data"><?php esc_html_e("Import", "folders"); ?> <span class="spinner"></span></button>
595
+ <button type="button" class="button button-secondary remove-folder-data"><?php esc_html_e("Delete plugin data", "folders"); ?> <span class="spinner"></span></button>
596
+ </td>
597
+ </tr>
598
+ <?php }
599
+ } ?>
600
+ </tbody>
601
+ </table>
602
+ </div>
603
+ <?php } else { ?>
604
+ <div class="no-plugin-message">
605
+ <p><?php esc_html_e("We couldn't detect any external folders that can be imported.", WCP_FOLDER); ?></p>
606
+ <p><?php echo sprintf(esc_html__("If you have external folders that were not detected, please contact us at %s", WCP_FOLDER), "<a href='mailto:contact@premio.io'>contact@premio.io</a>"); ?></p>
607
+ </div>
608
+ <?php } ?>
609
+ </div>
610
+ <div class="tab-content <?php echo esc_attr(($setting_page=="upgrade-to-pro")?"active":"") ?>">
611
+ <?php if($setting_page=="upgrade-to-pro") { ?>
612
+ <?php include_once "upgrade-table.php" ?>
613
+ <?php } ?>
614
+ </div>
615
+ </div>
616
+ </div>
617
+ <?php
618
+ ?>
619
+ <input type="hidden" name="folder_nonce" value="<?php echo wp_create_nonce("folder_settings") ?>">
620
+ <input type="hidden" name="folder_page" value="<?php echo $_SERVER['REQUEST_URI'] ?>">
621
+ <?php if($setting_page!="upgrade-to-pro") { ?>
622
+ </form>
623
+ <?php } ?>
624
+ </div>
625
+
626
+ <div class="folder-popup-form" id="import-plugin-data">
627
+ <div class="popup-form-content">
628
+ <div class="popup-content">
629
+ <div class="close-popup-button">
630
+ <a class="" href="javascript:;"><span></span></a>
631
+ </div>
632
+ <div class="import-folder-title"></div>
633
+ <div class="import-folder-note">Are you sure you'd like to import $x folders from $plugin?</div>
634
+ <div class="folder-form-buttons">
635
+ <button type="submit" class="form-submit-btn" id="import-folder-button"><?php esc_html_e("Import", WCP_FOLDER); ?></button>
636
+ <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", WCP_FOLDER); ?></a>
637
  </div>
 
638
  </div>
639
  </div>
640
+ </div>
641
+
642
+ <div class="folder-popup-form" id="remove-plugin-data">
643
+ <div class="popup-form-content">
644
+ <div class="popup-content">
645
+ <div class="close-popup-button">
646
+ <a class="" href="javascript:;"><span></span></a>
647
+ </div>
648
+ <div class="remove-folder-title">Are you sure?</div>
649
+ <div class="remove-folder-note">You're about to delete $plugin's folders. Are you sure you'd like to proceed?</div>
650
+ <div class="folder-form-buttons">
651
+ <button type="submit" class="form-submit-btn delete-folder-plugin" id="remove-folder-button"><?php esc_html_e("Delete plugin data", WCP_FOLDER); ?></button>
652
+ <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", WCP_FOLDER); ?></a>
653
+ </div>
654
+ </div>
655
+ </div>
656
+ </div>
657
+
658
+ <?php
659
+ $option = get_option("folder_intro_box");
660
+ if(($option == "show" || get_option("folder_redirect_status") == 2) && $is_plugin_exists) { ?>
661
+ <div class="folder-popup-form" id="import-third-party-plugin-data" style="display: block" ?>
662
+ <div class="popup-form-content">
663
+ <div class="popup-content">
664
+ <div class="close-popup-button">
665
+ <a class="" href="javascript:;"><span></span></a>
666
+ </div>
667
+ <div class="import-plugin-title"><?php esc_html_e("Import data", WCP_FOLDER); ?></div>
668
+ <div class="import-plugin-note"><?php esc_html_e("We've detected that you use another folders plugin. Would you like the Folders plugin to import your current folders? Keep in mind you can always do it in Folders Settings -> Import", WCP_FOLDER) ?></div>
669
+ <div class="plugin-import-table">
670
+ <div class="import-folder-table">
671
+ <table>
672
+ <tbody>
673
+ <?php foreach ($plugin_info as $slug=>$plugin) {
674
+ if($plugin['is_exists']) { ?>
675
+ <tr class="other-plugins-<?php echo esc_attr__($slug) ?>" data-plugin="<?php echo esc_attr__($slug) ?>" data-nonce="<?php echo wp_create_nonce("import_data_from_".$slug) ?>" data-folders="<?php echo esc_attr($plugin['total_folders']) ?>" data-attachments="<?php echo esc_attr($plugin['total_attachments']) ?>">
676
+ <th class="plugin-name"><?php echo esc_attr__($plugin['name']) ?></th>
677
+ <td>
678
+ <button type="button" class="button button-primary import-folder-data in-popup"><?php esc_html_e("Import", "folders"); ?> <span class="spinner"></span></button>
679
+ <span class="import-message"><?php printf(esc_html__("%s folder%s and %s attachment%s", "folders"), "<b>".$plugin['total_folders']."</b>", ($plugin['total_folders']>1)?esc_html__("s"):"" ,"<b>".$plugin['total_attachments']."</b>", ($plugin['total_attachments']>1)?esc_html__("s"):"") ?></span>
680
+ </td>
681
+ </tr>
682
+ <?php }
683
+ } ?>
684
+ </tbody>
685
+ </table>
686
+ </div>
687
+ </div>
688
+ <div class="folder-form-buttons">
689
+ <div class=""></div>
690
+ <a href="javascript:;" id="cancel-plugin-import" class="form-cancel-btn"><?php esc_html_e("Close", WCP_FOLDER); ?></a>
691
+ </div>
692
+ </div>
693
+ </div>
694
+ </div>
695
+ <?php
696
+ if($option != "show") {
697
+ update_option("folder_redirect_status", 3);
698
+ }
699
+ } ?>
700
+ <div class="folder-popup-form" id="no-more-folder-credit">
701
+ <div class="popup-form-content">
702
+ <div class="popup-content">
703
+ <div class="close-popup-button">
704
+ <a class="" href="javascript:;"><span></span></a>
705
+ </div>
706
+ <div class="add-update-folder-title" id="folder-limitation-message">
707
+ You've reached the 10 folder limitation!
708
+ </div>
709
+ <div class="folder-form-message">
710
+ Unlock unlimited amount of folders by upgrading to one of our pro plans.
711
+ </div>
712
+ <div class="folder-form-buttons">
713
+ <a href="javascript:;" class="form-cancel-btn">Cancel</a>
714
+ <a href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" target="_blank" class="form-submit-btn">See Pro Plans</a>
715
+ </div>
716
+ </div>
717
+ </div>
718
+ </div>
templates/admin/media-replace.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+
4
+ if (!current_user_can('upload_files'))
5
+ wp_die(esc_html__('You do not have permission to upload files.', 'enable-media-replace'));
6
+
7
+ global $wpdb;
8
+
9
+ $attachment_id = intval($_GET['attachment_id']);
10
+ $attachment = get_post($attachment_id);
11
+
12
+ $size = 0;
13
+ if(isset($attachment->guid)) {
14
+ $size = $this->getFileSize($attachment_id);
15
+ }
16
+ //$url = wp_get_attachment_url($attachment_id); die;
17
+ $guid = $attachment->guid;
18
+ $url = wp_get_attachment_url($attachment_id);
19
+ if(!empty($url)) {
20
+ $guid = $url;
21
+ }
22
+ $guid = explode(".", $guid);
23
+ $ext = array_pop($guid);
24
+ $image_meta = wp_get_attachment_metadata($attachment_id);
25
+ $thumb = wp_get_attachment_image_src($attachment_id, 'thumbnail');
26
+ $source_type = get_post_mime_type($attachment_id);
27
+ $url = "";
28
+ if(isset($thumb[0])) {
29
+ $url = $thumb[0];
30
+ }
31
+ $file_parts = pathinfo($attachment->guid);
32
+ $file_name = $file_parts['basename'];
33
+ ?>
34
+ <div class="wrap">
35
+ <h2><?php esc_html_e("Replace Media"); ?></h2>
36
+ <div class="file-type warning replace-message">
37
+ <?php esc_html_e("Replacement file is not the same filetype. This might cause unexpected issues", "folders"); ?>
38
+ </div>
39
+ <form enctype="multipart/form-data" method="POST" action="<?php echo esc_url($form_action) ?>">
40
+ <div class="replace-media-page">
41
+ <p><b><?php esc_html_e("Current File", "folders") ?></b>: <?php echo esc_attr($file_name) ?></p>
42
+ <p><?php esc_html_e("Upload a new file instead of the current one", "folders") ?></p>
43
+ <p><?php printf(__('Maximum file size: <strong>%s</strong>', 'enable-media-replace'), size_format(wp_max_upload_size())) ?></p>
44
+ <input type="hidden" name="attachment_id" value="<?php echo esc_attr__($attachment_id) ?>"/>
45
+ <input type="hidden" name="ext" id="file_ext" value="<?php echo esc_attr__($ext) ?>"/>
46
+ <div class="upload-media-box">
47
+
48
+ </div>
49
+ <div class="">
50
+ <div class="current-image-box">
51
+ <div class="file-option"><?php esc_html_e("Current File", "folders") ?></div>
52
+ <div class="preview-box">
53
+ <?php if (wp_attachment_is('image', $attachment_id)) { ?>
54
+ <?php if(!empty($url)) { ?>
55
+ <img src="<?php echo esc_url($url) ?>" />
56
+ <span class="image-size"><?php echo esc_attr($image_meta['width']." x ".$image_meta['height']) ?></span>
57
+ <?php } ?>
58
+ <?php } else { ?>
59
+ <span class="dashicons dashicons-media-document"></span>
60
+ <?php } ?>
61
+ </div>
62
+ <?php if(!empty($size)) { ?>
63
+ <div class="file-size"><?php echo esc_attr($size) ?></div>
64
+ <?php } ?>
65
+ </div>
66
+ <div class="new-image-box">
67
+ <div class="file-option"><?php esc_html_e("New File", "folders") ?></div>
68
+ <div class="preview-box">
69
+ <div class="container" >
70
+ <div class="container" >
71
+ <input type="file" name="new_media_file" id="media_file">
72
+
73
+ <!-- Drag and Drop container-->
74
+ <div class="upload-area" id="upload-file">
75
+ <div class="drag-and-drop-title">
76
+ <span>Click here to upload file</span>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div class="file-size"></div>
83
+ </div>
84
+ <div class="clearfix"></div>
85
+ </div>
86
+ <div class="replace-media-buttons">
87
+ <button type="submit" class="button button-primary" disabled><?php echo esc_html_e("Change File", "bolders") ?></button>
88
+ <button type="button" class="button button-secondary" onclick="history.back();"><?php echo esc_html_e("Cancel", "bolders") ?></button>
89
+ </div>
90
+ </div>
91
+ </form>
92
+ </div>
templates/admin/upgrade-table.php ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit;
2
+ $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=";
3
+ ?>
4
+ <link href="<?php echo esc_url(WCP_FOLDER_URL."assets/css/select2.min.css?ver=".WCP_FOLDER_VERSION) ?>" type="text/css" rel="stylesheet" />
5
+ <link href="<?php echo esc_url(WCP_FOLDER_URL."assets/css/admin-setting.css?ver=".WCP_FOLDER_VERSION) ?>" type="text/css" rel="stylesheet" />
6
+ <div class="modal-upgrade upgrade-block" id="folder-modal">
7
+ <div class="easy-modal-inner">
8
+ <div class="container">
9
+ <div class="pricing-table">
10
+ <div class="price-title">Unlock All Features</div>
11
+ <div class="price-tables">
12
+ <div class="row">
13
+ <div class="col-md-4 col-sm-12">
14
+ <div class="price-table basic-feature">
15
+ <div class="price-table-top">
16
+ <div class="price-head">
17
+ <div class="plan-name">Basic</div>
18
+ <div class="plan-price">$25<span>/year</span></div>
19
+ </div>
20
+ <div class="price-websites">For small website owners</div>
21
+ <div class="price-offer">Renewals for <b>25% off</b></div>
22
+ </div>
23
+ <div class="price-table-middle">
24
+ <ul>
25
+ <li><a href="javascript:;" class="cus-tooltip">1 website <span class="has-tooltip">*</span><span class="tooltip__content">Use Folders on 1 domain</span></a></li>
26
+ <li><a href="javascript:;">Organize Pages, Posts and Media files</a></li>
27
+ <li><a href="javascript:;" class="cus-tooltip">Unlimited folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create unlimited folders and sub-folders. On the Free plan it is limited to 10 folders in total</span></a></li>
28
+ <li><a href="javascript:;" class="cus-tooltip">Unlimited files <span class="has-tooltip">*</span><span class="tooltip__content">You can add unlimited pages, posts and media files to your folders</span></a></li>
29
+ <li><a href="javascript:;" class="cus-tooltip">Sub-folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create additional 2 tires of sub-folders</span></a></li>
30
+ <li><a href="javascript:;" class="cus-tooltip">Download folders as ZIP <span class="has-tooltip">*</span><span class="tooltip__content">You can use this feature to download all the content of any media library folder as a ZIP file.</span></a></li>
31
+ <li><a href="javascript:;" class="cus-tooltip">Sticky Folders <span class="has-tooltip">*</span><span class="tooltip__content">Pin selected folders to the upper part of the folders navigation area for easy access.</span></a></li>
32
+ </ul>
33
+ </div>
34
+ <div class="price-table-bottom">
35
+ <div class="custom-dd">
36
+ <select class="multiple-options">
37
+ <option data-option="1_year" data-header="Renewals for 25% off" data-price="25" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=1">Updates &amp; support for 1 year</option>
38
+ <option data-option="2_year" data-header="For 2 years" data-price="39" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=13">Updates &amp; support for 2 years</option>
39
+ <option data-option="lifetime" data-header="For lifetime" data-price="79" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=5">Updates &amp; support for lifetime</option>
40
+ </select>
41
+ </div>
42
+ <a class="cart-link" target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=1">Buy now</a>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <div class="col-md-4 col-sm-12">
47
+ <div class="price-table plus-feature">
48
+ <div class="price-table-top">
49
+ <div class="price-head">
50
+ <div class="plan-name">Plus</div>
51
+ <div class="plan-price">$59<span>/year</span></div>
52
+ </div>
53
+ <div class="price-websites">For businesses with multiple websites</div>
54
+ <div class="price-offer">Renewals for <b>25% off</b></div>
55
+ </div>
56
+ <div class="price-table-middle">
57
+ <ul>
58
+ <li><a href="javascript:;" class="cus-tooltip">5 website <span class="has-tooltip">*</span><span class="tooltip__content">Use Folders on 5 domains</span></a></li>
59
+ <li><a href="javascript:;">Organize Pages, Posts and Media files</a></li>
60
+ <li><a href="javascript:;" class="cus-tooltip">Unlimited folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create unlimited folders and sub-folders. On the Free plan it is limited to 10 folders in total</span></a></li>
61
+ <li><a href="javascript:;" class="cus-tooltip">Unlimited files <span class="has-tooltip">*</span><span class="tooltip__content">You can add unlimited pages, posts and media files to your folders</span></a></li>
62
+ <li><a href="javascript:;" class="cus-tooltip">Sub-folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create additional 2 tires of sub-folders</span></a></li>
63
+ <li><a href="javascript:;" class="cus-tooltip">Download folders as ZIP <span class="has-tooltip">*</span><span class="tooltip__content">You can use this feature to download all the content of any media library folder as a ZIP file.</span></a></li>
64
+ <li><a href="javascript:;" class="cus-tooltip">Sticky Folders <span class="has-tooltip">*</span><span class="tooltip__content">Pin selected folders to the upper part of the folders navigation area for easy access.</span></a></li>
65
+ </ul>
66
+ </div>
67
+ <div class="price-table-bottom">
68
+ <div class="custom-dd">
69
+ <select class="multiple-options">
70
+ <option data-option="1_year" data-header="Renewals for 25% off" data-price="59" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=2">Updates &amp; support for 1 year</option>
71
+ <option data-option="2_year" data-header="For 2 years" data-price="89" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=14">Updates &amp; support for 2 years</option>
72
+ <option data-option="lifetime" data-header="For lifetime" data-price="149" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=7">Updates &amp; support for lifetime</option>
73
+ </select>
74
+ </div>
75
+ <a class="cart-link" target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=2">Buy now</a>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ <div class="col-md-4 col-sm-12">
80
+ <div class="price-table agency-feature">
81
+ <div class="price-table-top">
82
+ <div class="price-head">
83
+ <div class="plan-name">Agency</div>
84
+ <div class="plan-price">$99<span>/year</span></div>
85
+ </div>
86
+ <div class="price-websites">For agencies who manage clients</div>
87
+ <div class="price-offer">Renewals for <b>25% off</b></div>
88
+ </div>
89
+ <div class="price-table-middle">
90
+ <ul>
91
+ <li>
92
+ <div class="website-package">
93
+ <select class="multiple-web-options">
94
+ <option value="50_websites">50 websites</option>
95
+ <option value="500_websites">500 websites</option>
96
+ <option value="1000_websites">1000 websites</option>
97
+ </select>
98
+ </div>
99
+ </li>
100
+ <li><a href="javascript:;">Organize Pages, Posts and Media files</a></li>
101
+ <li><a href="javascript:;" class="cus-tooltip">Unlimited folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create unlimited folders and sub-folders. On the Free plan it is limited to 10 folders in total</span></a></li>
102
+ <li><a href="javascript:;" class="cus-tooltip">Unlimited files <span class="has-tooltip">*</span><span class="tooltip__content">You can add unlimited pages, posts and media files to your folders</span></a></li>
103
+ <li><a href="javascript:;" class="cus-tooltip">Sub-folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create additional 2 tires of sub-folders</span></a></li>
104
+ <li><a href="javascript:;" class="cus-tooltip">Download folders as ZIP <span class="has-tooltip">*</span><span class="tooltip__content">You can use this feature to download all the content of any media library folder as a ZIP file.</span></a></li>
105
+ <li><a href="javascript:;" class="cus-tooltip">Sticky Folders <span class="has-tooltip">*</span><span class="tooltip__content">Pin selected folders to the upper part of the folders navigation area for easy access.</span></a></li>
106
+ </ul>
107
+ </div>
108
+ <div class="price-table-bottom">
109
+ <div class="custom-dd">
110
+ <select class="multiple-options has-multiple-websites">
111
+ <option data-option="1_year" data-header="Renewals for 25% off" data-price="99" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=10">Updates &amp; support for 1 year</option>
112
+ <option data-option="2_year" data-header="For 2 years" data-price="149" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=15">Updates &amp; support for 2 years</option>
113
+ <option data-option="lifetime" data-header="For lifetime" data-price="249" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=12">Updates &amp; support for lifetime</option>
114
+ </select>
115
+ </div>
116
+ <a class="cart-link" target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=10">Buy now</a>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ <div class="clearfix"></div>
122
+ </div>
123
+ </div>
124
+ <div class="text-center price-after">
125
+ <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
126
+ <?php esc_html_e("30 days money back guaranteed", WCP_FOLDER); ?>
127
+ </p>
128
+ <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
129
+ <?php esc_html_e("The plugin will always keep working even if you don't renew your license", WCP_FOLDER); ?>
130
+ </p>
131
+ <div class="payments">
132
+ <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/payment.png") ?>" alt="Payment" class="payment-img" />
133
+ </div>
134
+ </div>
135
+ <div class="folder-testimonial-list">
136
+ <div class="folder-testimonial">
137
+ <div class="testimonial-image"> <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/client-image.jpg") ?>"> </div>
138
+ <div class="testimonial-data">
139
+ <div class="testimonial-title">A brilliant solution!</div>
140
+ <div class="testimonial-desc">I’ve used other folder plug-ins for my WordPress media files, but Folders is better than any of them. An uncluttered interface, intuitive to use, allows drag-and-drop and allows subfolders: exactly what I needed in a media library folder plug-in. I can’t believe it’s free!</div>
141
+ <div class="testimonial-author">- Trevor Jordan</div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ <script src="<?php echo esc_url(WCP_FOLDER_URL."assets/js/select2.min.js?ver=".WCP_FOLDER_VERSION) ?>" type="text/javascript" ></script>
149
+ <script>
150
+ var priceOptions = {"50_websites":{"1_year":{"price":99,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=10"},"2_year":{"price":149,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=15"},"lifetime":{"price":249,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=12"}},"500_websites":{"1_year":{"price":179,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=16"},"2_year":{"price":269,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=17"},"lifetime":{"price":449,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=18"}},"1000_websites":{"1_year":{"price":249,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=19"},"2_year":{"price":375,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=20"},"lifetime":{"price":619,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=21"}}};
151
+ jQuery(document).ready(function(){
152
+ if(jQuery(".multiple-options").length) {
153
+ jQuery(".multiple-options").select2({
154
+ minimumResultsForSearch: -1
155
+ });
156
+ }
157
+ if(jQuery(".multiple-web-options").length) {
158
+ jQuery(".multiple-web-options").select2({
159
+ minimumResultsForSearch: -1
160
+ });
161
+ }
162
+ jQuery(document).on("change", ".multiple-options", function(){
163
+ priceText = jQuery(this).find("option:selected").attr("data-header");
164
+ thisValue = jQuery(this).val();
165
+ thisPrice = jQuery(this).find("option:selected").attr("data-price");
166
+ if(!jQuery(this).hasClass("has-multiple-websites")) {
167
+ jQuery(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
168
+ jQuery(this).closest(".price-table").find(".plan-price").text("$" + thisPrice);
169
+ } else {
170
+ var webOption = jQuery(".multiple-web-options").val();
171
+ var priceSettings = priceOptions[webOption];
172
+ var yearPlan = jQuery(".multiple-options.has-multiple-websites option:selected").attr("data-option");
173
+ if(priceSettings[yearPlan] != undefined) {
174
+ priceSettings = priceSettings[yearPlan];
175
+ thisValue = priceSettings.link;
176
+ thisPrice = priceSettings.price;
177
+ }
178
+ }
179
+ thisOption = jQuery(this).find("option:selected").attr("data-option");
180
+ if(thisOption == "1_year") {
181
+ thisPrice = thisPrice+"<span>/year</span>";
182
+ priceText = "Renewals for <b>25% off</b>";
183
+ } else if(thisOption == "2_year") {
184
+ thisPrice = thisPrice+"<span>/2 years</span>";
185
+ priceText = "Renewals for <b>25% off</b>";
186
+ } else {
187
+ thisPrice = thisPrice+"<span>/lifetime</span>";
188
+ priceText = "For lifetime";
189
+ }
190
+ jQuery(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
191
+ jQuery(this).closest(".price-table").find(".plan-price").html("$" + thisPrice);
192
+ jQuery(this).closest(".price-table").find(".price-offer").html(priceText);
193
+ });
194
+
195
+ jQuery(document).on("change", ".multiple-web-options", function(){
196
+ jQuery(".multiple-options.has-multiple-websites").trigger("change");
197
+ });
198
+
199
+ if(jQuery(".multiple-options.has-multiple-websites").length) {
200
+ jQuery(".multiple-options.has-multiple-websites").trigger("change");
201
+ }
202
+ });
203
+ </script>
templates/admin/upgrade-to-pro.php CHANGED
@@ -1,207 +1,8 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) exit;
2
  $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=";
3
  ?>
4
- <link href="<?php echo esc_url(WCP_FOLDER_URL."assets/css/select2.min.css?ver=".WCP_FOLDER_VERSION) ?>" type="text/css" rel="stylesheet" />
5
- <link href="<?php echo esc_url(WCP_FOLDER_URL."assets/css/admin-setting.css?ver=".WCP_FOLDER_VERSION) ?>" type="text/css" rel="stylesheet" />
6
  <div class="wrap">
7
  <div class="key-table">
8
- <div class="modal-upgrade upgrade-block" id="folder-modal">
9
- <div class="easy-modal-inner">
10
- <div class="container">
11
- <div class="pricing-table">
12
- <div class="price-title">Unlock All Features</div>
13
- <div class="price-tables">
14
- <div class="row">
15
- <div class="col-md-4 col-sm-12">
16
- <div class="price-table basic-feature">
17
- <div class="price-table-top">
18
- <div class="price-head">
19
- <div class="plan-name">Basic</div>
20
- <div class="plan-price">$25<span>/year</span></div>
21
- </div>
22
- <div class="price-websites">For small website owners</div>
23
- <div class="price-offer">Renewals for <b>25% off</b></div>
24
- </div>
25
- <div class="price-table-middle">
26
- <ul>
27
- <li><a href="javascript:;" class="cus-tooltip">1 website <span class="has-tooltip">*</span><span class="tooltip__content">Use Folders on 1 domain</span></a></li>
28
- <li><a href="javascript:;">Organize Pages, Posts and Media files</a></li>
29
- <li><a href="javascript:;" class="cus-tooltip">Unlimited folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create unlimited folders and sub-folders. On the Free plan it is limited to 10 folders in total</span></a></li>
30
- <li><a href="javascript:;" class="cus-tooltip">Unlimited files <span class="has-tooltip">*</span><span class="tooltip__content">You can add unlimited pages, posts and media files to your folders</span></a></li>
31
- <li><a href="javascript:;" class="cus-tooltip">Sub-folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create additional 2 tires of sub-folders</span></a></li>
32
- <li><a href="javascript:;" class="cus-tooltip">Download folders as ZIP <span class="has-tooltip">*</span><span class="tooltip__content">You can use this feature to download all the content of any media library folder as a ZIP file.</span></a></li>
33
- <li><a href="javascript:;" class="cus-tooltip">Sticky Folders <span class="has-tooltip">*</span><span class="tooltip__content">Pin selected folders to the upper part of the folders navigation area for easy access.</span></a></li>
34
- </ul>
35
- </div>
36
- <div class="price-table-bottom">
37
- <div class="custom-dd">
38
- <select class="multiple-options">
39
- <option data-option="1_year" data-header="Renewals for 25% off" data-price="25" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=1">Updates &amp; support for 1 year</option>
40
- <option data-option="2_year" data-header="For 2 years" data-price="39" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=13">Updates &amp; support for 2 years</option>
41
- <option data-option="lifetime" data-header="For lifetime" data-price="79" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=5">Updates &amp; support for lifetime</option>
42
- </select>
43
- </div>
44
- <a class="cart-link" target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=1">Buy now</a>
45
- </div>
46
- </div>
47
- </div>
48
- <div class="col-md-4 col-sm-12">
49
- <div class="price-table plus-feature">
50
- <div class="price-table-top">
51
- <div class="price-head">
52
- <div class="plan-name">Plus</div>
53
- <div class="plan-price">$59<span>/year</span></div>
54
- </div>
55
- <div class="price-websites">For businesses with multiple websites</div>
56
- <div class="price-offer">Renewals for <b>25% off</b></div>
57
- </div>
58
- <div class="price-table-middle">
59
- <ul>
60
- <li><a href="javascript:;" class="cus-tooltip">5 website <span class="has-tooltip">*</span><span class="tooltip__content">Use Folders on 5 domains</span></a></li>
61
- <li><a href="javascript:;">Organize Pages, Posts and Media files</a></li>
62
- <li><a href="javascript:;" class="cus-tooltip">Unlimited folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create unlimited folders and sub-folders. On the Free plan it is limited to 10 folders in total</span></a></li>
63
- <li><a href="javascript:;" class="cus-tooltip">Unlimited files <span class="has-tooltip">*</span><span class="tooltip__content">You can add unlimited pages, posts and media files to your folders</span></a></li>
64
- <li><a href="javascript:;" class="cus-tooltip">Sub-folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create additional 2 tires of sub-folders</span></a></li>
65
- <li><a href="javascript:;" class="cus-tooltip">Download folders as ZIP <span class="has-tooltip">*</span><span class="tooltip__content">You can use this feature to download all the content of any media library folder as a ZIP file.</span></a></li>
66
- <li><a href="javascript:;" class="cus-tooltip">Sticky Folders <span class="has-tooltip">*</span><span class="tooltip__content">Pin selected folders to the upper part of the folders navigation area for easy access.</span></a></li>
67
- </ul>
68
- </div>
69
- <div class="price-table-bottom">
70
- <div class="custom-dd">
71
- <select class="multiple-options">
72
- <option data-option="1_year" data-header="Renewals for 25% off" data-price="59" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=2">Updates &amp; support for 1 year</option>
73
- <option data-option="2_year" data-header="For 2 years" data-price="89" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=14">Updates &amp; support for 2 years</option>
74
- <option data-option="lifetime" data-header="For lifetime" data-price="149" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=7">Updates &amp; support for lifetime</option>
75
- </select>
76
- </div>
77
- <a class="cart-link" target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=2">Buy now</a>
78
- </div>
79
- </div>
80
- </div>
81
- <div class="col-md-4 col-sm-12">
82
- <div class="price-table agency-feature">
83
- <div class="price-table-top">
84
- <div class="price-head">
85
- <div class="plan-name">Agency</div>
86
- <div class="plan-price">$99<span>/year</span></div>
87
- </div>
88
- <div class="price-websites">For agencies who manage clients</div>
89
- <div class="price-offer">Renewals for <b>25% off</b></div>
90
- </div>
91
- <div class="price-table-middle">
92
- <ul>
93
- <li>
94
- <div class="website-package">
95
- <select class="multiple-web-options">
96
- <option value="50_websites">50 websites</option>
97
- <option value="500_websites">500 websites</option>
98
- <option value="1000_websites">1000 websites</option>
99
- </select>
100
- </div>
101
- </li>
102
- <li><a href="javascript:;">Organize Pages, Posts and Media files</a></li>
103
- <li><a href="javascript:;" class="cus-tooltip">Unlimited folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create unlimited folders and sub-folders. On the Free plan it is limited to 10 folders in total</span></a></li>
104
- <li><a href="javascript:;" class="cus-tooltip">Unlimited files <span class="has-tooltip">*</span><span class="tooltip__content">You can add unlimited pages, posts and media files to your folders</span></a></li>
105
- <li><a href="javascript:;" class="cus-tooltip">Sub-folders <span class="has-tooltip">*</span><span class="tooltip__content">You can create additional 2 tires of sub-folders</span></a></li>
106
- <li><a href="javascript:;" class="cus-tooltip">Download folders as ZIP <span class="has-tooltip">*</span><span class="tooltip__content">You can use this feature to download all the content of any media library folder as a ZIP file.</span></a></li>
107
- <li><a href="javascript:;" class="cus-tooltip">Sticky Folders <span class="has-tooltip">*</span><span class="tooltip__content">Pin selected folders to the upper part of the folders navigation area for easy access.</span></a></li>
108
- </ul>
109
- </div>
110
- <div class="price-table-bottom">
111
- <div class="custom-dd">
112
- <select class="multiple-options has-multiple-websites">
113
- <option data-option="1_year" data-header="Renewals for 25% off" data-price="99" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=10">Updates &amp; support for 1 year</option>
114
- <option data-option="2_year" data-header="For 2 years" data-price="149" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=15">Updates &amp; support for 2 years</option>
115
- <option data-option="lifetime" data-header="For lifetime" data-price="249" value="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=12">Updates &amp; support for lifetime</option>
116
- </select>
117
- </div>
118
- <a class="cart-link" target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options%5Bprice_id%5D=10">Buy now</a>
119
- </div>
120
- </div>
121
- </div>
122
- </div>
123
- <div class="clearfix"></div>
124
- </div>
125
- </div>
126
- <div class="text-center price-after">
127
- <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
128
- <?php esc_html_e("30 days money back guaranteed", WCP_FOLDER); ?>
129
- </p>
130
- <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
131
- <?php esc_html_e("The plugin will always keep working even if you don't renew your license", WCP_FOLDER); ?>
132
- </p>
133
- <div class="payments">
134
- <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/payment.png") ?>" alt="Payment" class="payment-img" />
135
- </div>
136
- </div>
137
- <div class="folder-testimonial-list">
138
- <div class="folder-testimonial">
139
- <div class="testimonial-image"> <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/client-image.jpg") ?>"> </div>
140
- <div class="testimonial-data">
141
- <div class="testimonial-title">A brilliant solution!</div>
142
- <div class="testimonial-desc">I’ve used other folder plug-ins for my WordPress media files, but Folders is better than any of them. An uncluttered interface, intuitive to use, allows drag-and-drop and allows subfolders: exactly what I needed in a media library folder plug-in. I can’t believe it’s free!</div>
143
- <div class="testimonial-author">- Trevor Jordan</div>
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
- </div>
150
  </div>
151
- </div>
152
- <script src="<?php echo esc_url(WCP_FOLDER_URL."assets/js/select2.min.js?ver=".WCP_FOLDER_VERSION) ?>" type="text/javascript" ></script>
153
- <script>
154
- var priceOptions = {"50_websites":{"1_year":{"price":99,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=10"},"2_year":{"price":149,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=15"},"lifetime":{"price":249,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=12"}},"500_websites":{"1_year":{"price":179,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=16"},"2_year":{"price":269,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=17"},"lifetime":{"price":449,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=18"}},"1000_websites":{"1_year":{"price":249,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=19"},"2_year":{"price":375,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=20"},"lifetime":{"price":619,"link":"https:\/\/go.premio.io\/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=21"}}};
155
- jQuery(document).ready(function(){
156
- if(jQuery(".multiple-options").length) {
157
- jQuery(".multiple-options").select2({
158
- minimumResultsForSearch: -1
159
- });
160
- }
161
- if(jQuery(".multiple-web-options").length) {
162
- jQuery(".multiple-web-options").select2({
163
- minimumResultsForSearch: -1
164
- });
165
- }
166
- jQuery(document).on("change", ".multiple-options", function(){
167
- priceText = jQuery(this).find("option:selected").attr("data-header");
168
- thisValue = jQuery(this).val();
169
- thisPrice = jQuery(this).find("option:selected").attr("data-price");
170
- if(!jQuery(this).hasClass("has-multiple-websites")) {
171
- jQuery(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
172
- jQuery(this).closest(".price-table").find(".plan-price").text("$" + thisPrice);
173
- } else {
174
- var webOption = jQuery(".multiple-web-options").val();
175
- var priceSettings = priceOptions[webOption];
176
- var yearPlan = jQuery(".multiple-options.has-multiple-websites option:selected").attr("data-option");
177
- if(priceSettings[yearPlan] != undefined) {
178
- priceSettings = priceSettings[yearPlan];
179
- thisValue = priceSettings.link;
180
- thisPrice = priceSettings.price;
181
- }
182
- }
183
- thisOption = jQuery(this).find("option:selected").attr("data-option");
184
- if(thisOption == "1_year") {
185
- thisPrice = thisPrice+"<span>/year</span>";
186
- priceText = "Renewals for <b>25% off</b>";
187
- } else if(thisOption == "2_year") {
188
- thisPrice = thisPrice+"<span>/2 years</span>";
189
- priceText = "Renewals for <b>25% off</b>";
190
- } else {
191
- thisPrice = thisPrice+"<span>/lifetime</span>";
192
- priceText = "For lifetime";
193
- }
194
- jQuery(this).closest(".price-table").find("a.cart-link").attr("href", thisValue);
195
- jQuery(this).closest(".price-table").find(".plan-price").html("$" + thisPrice);
196
- jQuery(this).closest(".price-table").find(".price-offer").html(priceText);
197
- });
198
-
199
- jQuery(document).on("change", ".multiple-web-options", function(){
200
- jQuery(".multiple-options.has-multiple-websites").trigger("change");
201
- });
202
-
203
- if(jQuery(".multiple-options.has-multiple-websites").length) {
204
- jQuery(".multiple-options.has-multiple-websites").trigger("change");
205
- }
206
- });
207
- </script>
1
  <?php if ( ! defined( 'ABSPATH' ) ) exit;
2
  $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=";
3
  ?>
 
 
4
  <div class="wrap">
5
  <div class="key-table">
6
+ <?php include_once "upgrade-table.php" ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  </div>
8
+ </div>