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

Version Description

Various bugs were fixed after our last major release

Download this release

Release Info

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

Code changes from version 2.5.4 to 2.5.5

assets/css/page-post-media.css CHANGED
@@ -5,6 +5,7 @@
5
  height: 100%;
6
  border-right: solid 1px #ddd;
7
  background: #f1f1f1;
 
8
  }
9
 
10
  .media-frame.hide-menu .media-frame-content, .media-frame.hide-menu .media-frame-router, .media-frame.hide-menu .media-frame-title, .media-frame.hide-menu .media-frame-toolbar {
@@ -55,7 +56,7 @@ span.create_new_folder {
55
  backdrop-filter: blur(16px);
56
  border-radius: 4px;
57
  text-align: center;
58
- margin: 0 15px 0 0
59
  }
60
 
61
  span.folder-loader-ajax {
@@ -762,7 +763,7 @@ li.active-menu {
762
  font-size: 14px;
763
  padding: 0 0 0 15px;
764
  display: block;
765
- width: 100%;
766
  border-radius: 4px;
767
  border: 1px solid #484848;
768
  height: 34px;
@@ -1005,7 +1006,7 @@ li.active-menu {
1005
  line-height: 32px;
1006
  box-sizing: border-box;
1007
  padding: 0 5px !important;
1008
- width: 100%;
1009
  box-shadow: none !important;
1010
  outline: 0
1011
  }
@@ -1087,4 +1088,42 @@ li.active-menu {
1087
  .media-toolbar-primary.search-form {
1088
  width: 20%;
1089
  max-width: inherit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1090
  }
5
  height: 100%;
6
  border-right: solid 1px #ddd;
7
  background: #f1f1f1;
8
+ direction: ltr;
9
  }
10
 
11
  .media-frame.hide-menu .media-frame-content, .media-frame.hide-menu .media-frame-router, .media-frame.hide-menu .media-frame-title, .media-frame.hide-menu .media-frame-toolbar {
56
  backdrop-filter: blur(16px);
57
  border-radius: 4px;
58
  text-align: center;
59
+ margin: 0 10px 0 0
60
  }
61
 
62
  span.folder-loader-ajax {
763
  font-size: 14px;
764
  padding: 0 0 0 15px;
765
  display: block;
766
+ width: 100% !important;
767
  border-radius: 4px;
768
  border: 1px solid #484848;
769
  height: 34px;
1006
  line-height: 32px;
1007
  box-sizing: border-box;
1008
  padding: 0 5px !important;
1009
+ width: 100% !important;
1010
  box-shadow: none !important;
1011
  outline: 0
1012
  }
1088
  .media-toolbar-primary.search-form {
1089
  width: 20%;
1090
  max-width: inherit;
1091
+ }
1092
+
1093
+ body *.media-frame.hide-menu .media-frame-menu {
1094
+ display: block;
1095
+ }
1096
+
1097
+ .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 {
1098
+ left: 275px;
1099
+ }
1100
+ .media-frame-menu.has-folder-menu {
1101
+ width: 275px;
1102
+ }
1103
+ .media-frame-menu.has-folder-menu .folder-custom-menu {
1104
+ position: relative;
1105
+ border: none;
1106
+ width: 100%;
1107
+ }
1108
+ .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 {
1109
+ left: 275px;
1110
+ }
1111
+ .media-frame.mode-select.hide-router select#media-attachment-taxonomy-filter {
1112
+ display: none;
1113
+ }
1114
+ .media-frame.mode-select.hide-router .folder-custom-menu {
1115
+ display: none;
1116
+ }
1117
+
1118
+ 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 {
1119
+ left: 0;
1120
+ right: 275px;
1121
+ }
1122
+ 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 {
1123
+ left: 0;
1124
+ right: 275px;
1125
+ }
1126
+ 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 {
1127
+ left: 0;
1128
+ right: 275px;
1129
  }
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}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .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}.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-folders{display:none;padding:0 0 5px;margin:0 0 5px;border-bottom:solid 1px #ccc}.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}.sticky-folders li a span.update-inline-record,.wcp-container .route span.update-inline-record{position:relative;left:auto;top:0;float:right;width:0;height:30px;font-size:16px;overflow:hidden;transition:all .25s linear;-webkit-transition:all .25s linear;-moz-transition:all .25s linear;line-height:30px}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-]{font-size:12px}.sticky-folders li a span.star-icon,.wcp-container .route span.star-icon{position:relative;top:2px;left:auto;float:right;speak:none;color:#ffc90e;display:none;font-size:14px}.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 .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}.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:inline-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}[data-tooltip]{position:relative}[data-tooltip]::after,[data-tooltip]::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}[data-tooltip]::before{content:'';border:5px solid transparent;z-index:1001}[data-tooltip]::after{content:attr(data-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}[data-tooltip]:hover::after,[data-tooltip]:hover::before{display:block;opacity:1}[data-tooltip]:not([flow])::before,[data-tooltip][flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}[data-tooltip]:not([flow])::after,[data-tooltip][flow^=up]::after{bottom:calc(100% + 5px)}[data-tooltip]:not([flow])::after,[data-tooltip]:not([flow])::before,[data-tooltip][flow^=up]::after,[data-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%;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}
1
+ .folder-custom-menu{width:275px;z-index:10001;position:absolute;height:100%;border-right:solid 1px #ddd;background:#f1f1f1;direction:ltr}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .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 10px 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}.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-folders{display:none;padding:0 0 5px;margin:0 0 5px;border-bottom:solid 1px #ccc}.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}.sticky-folders li a span.update-inline-record,.wcp-container .route span.update-inline-record{position:relative;left:auto;top:0;float:right;width:0;height:30px;font-size:16px;overflow:hidden;transition:all .25s linear;-webkit-transition:all .25s linear;-moz-transition:all .25s linear;line-height:30px}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-]{font-size:12px}.sticky-folders li a span.star-icon,.wcp-container .route span.star-icon{position:relative;top:2px;left:auto;float:right;speak:none;color:#ffc90e;display:none;font-size:14px}.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 .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}.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:inline-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%!important;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}[data-tooltip]{position:relative}[data-tooltip]::after,[data-tooltip]::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}[data-tooltip]::before{content:'';border:5px solid transparent;z-index:1001}[data-tooltip]::after{content:attr(data-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}[data-tooltip]:hover::after,[data-tooltip]:hover::before{display:block;opacity:1}[data-tooltip]:not([flow])::before,[data-tooltip][flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}[data-tooltip]:not([flow])::after,[data-tooltip][flow^=up]::after{bottom:calc(100% + 5px)}[data-tooltip]:not([flow])::after,[data-tooltip]:not([flow])::before,[data-tooltip][flow^=up]::after,[data-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}
assets/js/custom.js CHANGED
@@ -398,7 +398,7 @@ function triggerInlineUpdate() {
398
  jQuery(".form-loader-count").css("width", "0");
399
  if(typeof inlineEditPost == "object") {
400
 
401
- //inlineEditPost.init();
402
 
403
  jQuery("#the-list").on("click",".editinline",function(){
404
  jQuery(this).attr("aria-expanded","true");
398
  jQuery(".form-loader-count").css("width", "0");
399
  if(typeof inlineEditPost == "object") {
400
 
401
+ inlineEditPost.init();
402
 
403
  jQuery("#the-list").on("click",".editinline",function(){
404
  jQuery(this).attr("aria-expanded","true");
assets/js/media.js CHANGED
@@ -269,7 +269,9 @@ if (typeof wp !== 'undefined' && typeof wp.Uploader === 'function') {
269
  }
270
 
271
  if(!jQuery("#wcp-content").length) {
272
- jQuery(".attachment-filters").val(selectedFolderPageID).trigger("change");
 
 
273
  }
274
  }
275
  },100);
@@ -317,7 +319,7 @@ if (typeof wp !== 'undefined' && typeof wp.Uploader === 'function') {
317
 
318
  resetDDCounter();
319
 
320
- if( wp_media.media.frame.content.get() !== null) {
321
  wp_media.media.frame.content.get().collection.props.set({ignore: (+ new Date())});
322
  wp_media.media.frame.content.get().options.selection.reset();
323
  } else {
269
  }
270
 
271
  if(!jQuery("#wcp-content").length) {
272
+ if(jQuery(".editor-post-featured-image").length) {
273
+ jQuery(".attachment-filters").val(selectedFolderPageID).trigger("change");
274
+ }
275
  }
276
  }
277
  },100);
319
 
320
  resetDDCounter();
321
 
322
+ if(typeof wp_media.media.frame !== "undefined" && wp_media.media.frame.content.get() !== null) {
323
  wp_media.media.frame.content.get().collection.props.set({ignore: (+ new Date())});
324
  wp_media.media.frame.content.get().options.selection.reset();
325
  } else {
assets/js/page-post-media.js CHANGED
@@ -216,8 +216,7 @@
216
  }, 1250);
217
 
218
  resetDDCounter();
219
-
220
- if( wp_media.media.frame.content.get() !== null) {
221
  wp_media.media.frame.content.get().collection.props.set({ignore: (+ new Date())});
222
  wp_media.media.frame.content.get().options.selection.reset();
223
  } else {
@@ -236,21 +235,62 @@
236
 
237
  var wpMedia = window.wp;
238
  if (typeof wpMedia !== 'undefined' && typeof wpMedia.Uploader === 'function') {
239
- wpMedia.media.view.Modal.prototype.on('open', function() {
240
- if(!$(".folder-custom-menu").length) {
241
- $(".media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>");
242
- $(".folder-menu-content").load(folders_media_options.media_page_url+ " #wcp-content-resize", function(){
243
- console.log("content loaded from media page");
244
- checkForExpandCollapse();
245
- });
246
- $(".media-frame-tab-panel").before("<div class='folder-form-data'></div>");
247
- $(".folder-form-data").load(folders_media_options.media_page_url+ " #folder-add-update-content", function(){
248
- console.log("content loaded from media page");
249
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
- resetMediaData(0);
 
 
 
 
 
 
 
252
  }
253
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
255
 
256
  $(document).ready(function(){
@@ -263,8 +303,8 @@
263
  activeRecordID = "";
264
  $(".active-item").removeClass("active-item");
265
  $(this).addClass("active-item");
266
- $("#media-attachment-taxonomy-filter").val("all").trigger("change");
267
- $(".folder_for_media").val("all").trigger("change");
268
  });
269
 
270
  $(document).on("click", ".un-categorised-items", function(e){
@@ -272,8 +312,8 @@
272
  activeRecordID = "";
273
  $(".active-item").removeClass("active-item");
274
  $(this).addClass("active-item");
275
- $("#media-attachment-taxonomy-filter").val("unassigned").trigger("change");
276
- $(".folder_for_media").val("-1").trigger("change");
277
  });
278
 
279
  $(document).on("click", "h3.title", function(e){
@@ -281,8 +321,8 @@
281
  activeRecordID = fileFolderID;
282
  $(".active-item").removeClass("active-item");
283
  $(this).closest("li.route").addClass("active-item");
284
- $("#media-attachment-taxonomy-filter").val(fileFolderID).trigger("change");
285
- $(".folder_for_media").val(fileFolderID).trigger("change");
286
  });
287
 
288
  $(document).on("change", ".folder_for_media", function(){
@@ -596,8 +636,6 @@
596
  $(".folder-popup-form").hide();
597
  $(".folder-popup-form").removeClass("disabled");
598
 
599
- console.log("activeRecordID: "+activeRecordID);
600
- console.log("fileFolderID: "+fileFolderID);
601
  if (activeRecordID == fileFolderID) {
602
  jQuery(".header-posts a").trigger("click");
603
  }
@@ -763,7 +801,7 @@
763
 
764
  $("h3.title").livequery(function(){
765
  $(this).droppable({
766
- accept: ".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",
767
  hoverClass: 'wcp-drop-hover',
768
  classes: {
769
  "ui-droppable-active": "ui-state-highlight"
@@ -825,9 +863,9 @@
825
  } else if (ui.draggable.hasClass('attachment')) {
826
  var chkStr = ui.draggable[0].attributes['data-id'].nodeValue;
827
  nonce = $.trim($("#wcp_folder_" + folderID).data("nonce"));
828
- if ($(".attachments-browser li.attachment.selected").length > 1) {
829
  chkStr = "";
830
- $(".attachments-browser li.attachment.selected").each(function () {
831
  chkStr += $(this).data("id") + ",";
832
  });
833
  }
@@ -847,13 +885,13 @@
847
  });
848
  });
849
 
850
- $(".attachments-browser li.attachment").livequery(function () {
851
  $(this).draggable({
852
  revert: "invalid",
853
  containment: "document",
854
  helper: function (event, ui) {
855
  $(".selected-items").remove();
856
- var selectedItems = $(".attachments-browser li.attachment.selected").length;
857
  selectedItems = (selectedItems == 0 || selectedItems == 1) ? "1 Item" : selectedItems + " Items";
858
  return $("<div class='selected-items'><span class='total-post-count'>" + selectedItems + " Selected</span></div>");
859
  },
@@ -875,7 +913,7 @@
875
 
876
  $(".un-categorised-items").livequery(function () {
877
  $(this).droppable({
878
- accept: ".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",
879
  hoverClass: 'wcp-hover-list',
880
  classes: {
881
  "ui-droppable-active": "ui-state-highlight"
@@ -920,9 +958,9 @@
920
  });
921
  } else if (ui.draggable.hasClass('attachment')) {
922
  var chkStr = ui.draggable[0].attributes['data-id'].nodeValue;
923
- if ($(".attachments-browser li.attachment.selected").length > 1) {
924
  chkStr = "";
925
- $(".attachments-browser li.attachment.selected").each(function () {
926
  chkStr += $(this).data("id") + ",";
927
  });
928
  }
@@ -944,7 +982,7 @@
944
 
945
  $(".tree-structure .folder-item").livequery(function(){
946
  $(this).droppable({
947
- accept: ".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",
948
  hoverClass: 'wcp-drop-hover-list',
949
  classes: {
950
  "ui-droppable-active": "ui-state-highlight"
@@ -992,9 +1030,9 @@
992
  } else if( ui.draggable.hasClass( 'attachment' ) ){
993
  var chkStr = ui.draggable[0].attributes['data-id'].nodeValue;
994
  nonce = $.trim($("#wcp_folder_"+folderID).data("nonce"));
995
- if($(".attachments-browser li.attachment.selected").length > 1) {
996
  chkStr = "";
997
- $(".attachments-browser li.attachment.selected").each(function(){
998
  chkStr += $(this).data("id")+",";
999
  });
1000
  }
@@ -1201,7 +1239,7 @@
1201
  folderIDs = folderIDs.split(",");
1202
  for (var i = 0; i < folderIDs.length; i++) {
1203
  if(folderIDs[i] != "") {
1204
- $(".attachments-browser li[data-id='"+folderIDs[i]+"']").remove();
1205
  }
1206
  }
1207
  }
216
  }, 1250);
217
 
218
  resetDDCounter();
219
+ if(typeof wp_media.media.frame !== "undefined" && wp_media.media.frame.content.get() !== null) {
 
220
  wp_media.media.frame.content.get().collection.props.set({ignore: (+ new Date())});
221
  wp_media.media.frame.content.get().options.selection.reset();
222
  } else {
235
 
236
  var wpMedia = window.wp;
237
  if (typeof wpMedia !== 'undefined' && typeof wpMedia.Uploader === 'function') {
238
+ var windowMedia = window.wp.media;
239
+ var windowModal = windowMedia.view.Modal
240
+ windowMedia.view.Modal = windowMedia.view.Modal.extend({
241
+ className: "folder-modal",
242
+ initialize: function () {
243
+ windowModal.prototype.initialize.apply(this, arguments);
244
+ }, open: function () {
245
+ $(".folder-modal").removeClass("folder-modal");
246
+ if (windowModal.prototype.open.apply(this, arguments)) {
247
+ console.log("media frame open");
248
+ if($(".folder-modal").length) {
249
+ $(".folder-custom-menu").remove();
250
+ $(".folder-modal .media-frame-tab-panel").removeClass("has-folder-menu");
251
+ if($(".folder-modal .media-frame").hasClass("hide-menu")) {
252
+ if (!$(".folder-custom-menu").length) {
253
+ $(".folder-modal .media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>");
254
+ $(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url + " #wcp-content-resize", function () {
255
+ checkForExpandCollapse();
256
+ });
257
+ }
258
+ } else {
259
+ if (!$(".folder-custom-menu").length) {
260
+ $(".folder-modal .media-frame-menu").addClass("has-folder-menu");
261
+ $(".folder-modal .media-frame-menu .media-menu").append("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>");
262
+ $(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url + " #wcp-content-resize", function () {
263
+ checkForExpandCollapse();
264
+ });
265
+ }
266
+ }
267
 
268
+ $(".folder-form-data").remove();
269
+ $(".media-frame-tab-panel:first").before("<div class='folder-form-data'></div>");
270
+ $(".folder-form-data").load(folders_media_options.media_page_url+ " #folder-add-update-content", function(){ });
271
+ }
272
+ }
273
+ }, close: function () {
274
+ windowModal.prototype.close.apply(this, arguments);
275
+ $(".folder-modal").removeClass("folder-modal");
276
  }
277
+ })
278
+ // wpMedia.media.view.Modal.prototype.on('open', function() {
279
+ // $(".folder-custom-menu").remove();
280
+ // if(!$(".folder-custom-menu").length) {
281
+ // $(".media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>");
282
+ // $(".folder-menu-content").load(folders_media_options.media_page_url+ " #wcp-content-resize", function(){
283
+ // console.log("content loaded from media page");
284
+ // checkForExpandCollapse();
285
+ // });
286
+ // $(".media-frame-tab-panel").before("<div class='folder-form-data'></div>");
287
+ // $(".folder-form-data").load(folders_media_options.media_page_url+ " #folder-add-update-content", function(){
288
+ // console.log("content loaded from media page");
289
+ // });
290
+ //
291
+ // resetMediaData(0);
292
+ // }
293
+ // });
294
  }
295
 
296
  $(document).ready(function(){
303
  activeRecordID = "";
304
  $(".active-item").removeClass("active-item");
305
  $(this).addClass("active-item");
306
+ $(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("all").trigger("change");
307
+ $(this).closest(".media-frame").find(".folder_for_media").val("all").trigger("change");
308
  });
309
 
310
  $(document).on("click", ".un-categorised-items", function(e){
312
  activeRecordID = "";
313
  $(".active-item").removeClass("active-item");
314
  $(this).addClass("active-item");
315
+ $(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("unassigned").trigger("change");
316
+ $(this).closest(".media-frame").find(".folder_for_media").val("-1").trigger("change");
317
  });
318
 
319
  $(document).on("click", "h3.title", function(e){
321
  activeRecordID = fileFolderID;
322
  $(".active-item").removeClass("active-item");
323
  $(this).closest("li.route").addClass("active-item");
324
+ $(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val(fileFolderID).trigger("change");
325
+ $(this).closest(".media-frame").find(".folder_for_media").val(fileFolderID).trigger("change");
326
  });
327
 
328
  $(document).on("change", ".folder_for_media", function(){
636
  $(".folder-popup-form").hide();
637
  $(".folder-popup-form").removeClass("disabled");
638
 
 
 
639
  if (activeRecordID == fileFolderID) {
640
  jQuery(".header-posts a").trigger("click");
641
  }
801
 
802
  $("h3.title").livequery(function(){
803
  $(this).droppable({
804
+ accept: ".wcp-move-file, .wcp-move-multiple, .media-frame:not(.hide-router) .attachments-browser li.attachment",
805
  hoverClass: 'wcp-drop-hover',
806
  classes: {
807
  "ui-droppable-active": "ui-state-highlight"
863
  } else if (ui.draggable.hasClass('attachment')) {
864
  var chkStr = ui.draggable[0].attributes['data-id'].nodeValue;
865
  nonce = $.trim($("#wcp_folder_" + folderID).data("nonce"));
866
+ if ($(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length > 1) {
867
  chkStr = "";
868
+ $(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").each(function () {
869
  chkStr += $(this).data("id") + ",";
870
  });
871
  }
885
  });
886
  });
887
 
888
+ $(".media-frame:not(.hide-router) .attachments-browser li.attachment").livequery(function () {
889
  $(this).draggable({
890
  revert: "invalid",
891
  containment: "document",
892
  helper: function (event, ui) {
893
  $(".selected-items").remove();
894
+ var selectedItems = $(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length;
895
  selectedItems = (selectedItems == 0 || selectedItems == 1) ? "1 Item" : selectedItems + " Items";
896
  return $("<div class='selected-items'><span class='total-post-count'>" + selectedItems + " Selected</span></div>");
897
  },
913
 
914
  $(".un-categorised-items").livequery(function () {
915
  $(this).droppable({
916
+ accept: ".wcp-move-file, .wcp-move-multiple, .media-frame:not(.hide-router) .attachments-browser li.attachment",
917
  hoverClass: 'wcp-hover-list',
918
  classes: {
919
  "ui-droppable-active": "ui-state-highlight"
958
  });
959
  } else if (ui.draggable.hasClass('attachment')) {
960
  var chkStr = ui.draggable[0].attributes['data-id'].nodeValue;
961
+ if ($(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length > 1) {
962
  chkStr = "";
963
+ $(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").each(function () {
964
  chkStr += $(this).data("id") + ",";
965
  });
966
  }
982
 
983
  $(".tree-structure .folder-item").livequery(function(){
984
  $(this).droppable({
985
+ accept: ".wcp-move-file, .wcp-move-multiple, .media-frame:not(.hide-router) .attachments-browser li.attachment",
986
  hoverClass: 'wcp-drop-hover-list',
987
  classes: {
988
  "ui-droppable-active": "ui-state-highlight"
1030
  } else if( ui.draggable.hasClass( 'attachment' ) ){
1031
  var chkStr = ui.draggable[0].attributes['data-id'].nodeValue;
1032
  nonce = $.trim($("#wcp_folder_"+folderID).data("nonce"));
1033
+ if($(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length > 1) {
1034
  chkStr = "";
1035
+ $(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").each(function(){
1036
  chkStr += $(this).data("id")+",";
1037
  });
1038
  }
1239
  folderIDs = folderIDs.split(",");
1240
  for (var i = 0; i < folderIDs.length; i++) {
1241
  if(folderIDs[i] != "") {
1242
+ $(".media-frame:not(.hide-router) .attachments-browser li[data-id='"+folderIDs[i]+"']").remove();
1243
  }
1244
  }
1245
  }
assets/js/page-post-media.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){"use strict";var o=-1,a=0,s=0,i="",r=-1,l="",d=folders_media_options.page_url,n="",c="",m=!1,p=!1,u=!1,f=0,h=0,v=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)}}),g=(o=-1,0),x=0,y=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){y.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryOrganizerTaxonomyFilter",new v({controller:this.controller,model:this.collection.props,priority:-75}).render())}});var w,b=wp.media.model.Query;_.extend(b,{get:(w=[],function(e,t){var o,a={},s=b.orderby,i=b.defaultProps;return delete e.query,delete e.cache,_.defaults(e,i),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(e,t){_.isNull(e)||(a[b.propmap[t]||t]=e)}),_.defaults(a,b.defaultArgs),a.orderby=s.valuemap[e.orderby]||e.orderby,w=[],o||(o=new b([],_.extend(t||{},{props:e,args:a})),w.push(o)),o})});var C=window.wp;void 0!==C&&"function"==typeof C.Uploader&&(C.media.view.Modal.prototype.on("open",function(){setTimeout(function(){t("#media-attachment-taxonomy-filter").length&&("all"==t("#media-attachment-taxonomy-filter").val()&&(t("#media-attachment-taxonomy-filter option:gt(1)").remove(),_.each(folders_media_options.terms,function(e,o){t("#media-attachment-taxonomy-filter").append("<option value='"+e.term_id+"'>"+e.name+" ("+e.count+")</option>")})),jQuery("#wcp-content").length||jQuery(".editor-post-featured-image").length&&jQuery(".attachment-filters").val("all").trigger("change"))},100)}),jQuery.extend(C.Uploader.prototype,{progress:function(){},init:function(){this.uploader&&(this.uploader.bind("FileFiltered",function(e,o){g++,t(".folder-meter").css("width","0%"),t(".media-folder-loader").show(),t("#total_upload_files").text(g)}),this.uploader.bind("BeforeUpload",function(e,a){var s=o,i=e.settings.multipart_params;if((s=parseInt(s))>0&&(i.folder_for_media=s),x<g){t(".media-folder-loader").show();var r=x/g*100;t(".folder-meter").css("width",r+"%")}x++,t("#current_upload_files").text(x)}),this.uploader.bind("UploadComplete",function(e,t){o=-1}),this.uploader.bind("UploadComplete",function(e,o){var a=window.wp;t(".folder-meter").css("width","100%"),setTimeout(function(){t(".media-folder-loader").hide(),t(".folder-meter").css("width","0%"),g=0,x=0},1250),Q(),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()):t("#media-attachment-taxonomy-filter").length&&t(".attachment-filters").each(function(){t(this).trigger("change")})}))}}));var k=window.wp;function j(){if(t(".media-toolbar").hasClass("media-toolbar-mode-select")&&t("ul.attachments li.selected").length&&(t("ul.attachments li.selected").trigger("click"),t(".select-mode-toggle-button").trigger("click")),""!=c&&(t("#custom-menu li.active-item").length>0||"-1"==n)){if(t("#media-attachment-taxonomy-filter").length){c=c.split(",");for(var e=0;e<c.length;e++)""!=c[e]&&t(".attachments-browser li[data-id='"+c[e]+"']").remove()}c=""}t("#media-attachment-taxonomy-filter").length?N(0):(jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=get_folders_default_list",method:"post",success:function(o){o=jQuery.parseJSON(o);for(t(".header-posts .total-count").text(o.total_items),t(".un-categorised-items .total-count").text(o.empty_items),e=0;e<o.taxonomies.length;e++)t("#title_"+o.taxonomies[e].term_id+" .total-count").length||t("#title_"+o.taxonomies[e].term_id+" .star-icon").before("<span class='total-count'></span>"),t("#title_"+o.taxonomies[e].term_id+" .total-count").text(parseInt(o.taxonomies[e].trash_count)),t(".sticky-folders .sticky-folder-"+o.taxonomies[e].term_id+" .folder-count").length||t(".sticky-folders .sticky-folder-"+o.taxonomies[e].term_id+" a").append("<span class='folder-count'></span>"),t(".sticky-folders .sticky-folder-"+o.taxonomies[e].term_id+" .folder-count").text(parseInt(o.taxonomies[e].trash_count));t("#custom-menu .total-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()}),t(".sticky-folders .folder-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()})}}),t(".folder-loader-ajax").addClass("active"),t("#folder-posts-filter").length?t("#folder-posts-filter").load(d+" #posts-filter",function(){"show"!=folders_media_options.show_in_page||t(".tree-structure").length||t(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),add_active_item_to_list(),triggerInlineUpdate()}):t("#wpbody").load(d+" #wpbody-content",!1,function(e){"show"!=folders_media_options.show_in_page||t(".tree-structure").length||t(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),add_active_item_to_list()}))}function Q(){var e=t("#media-attachment-taxonomy-filter").val();jQuery.ajax({url:folders_media_options.ajax_url,data:"type=attachment&action=wcp_get_default_list&active_id=0",method:"post",success:function(o){o=jQuery.parseJSON(o);if(t("#media-attachment-taxonomy-filter").length){if(t("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=o.taxonomies;var a=t(this);a.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),o.taxonomies;for(var s=0;s<o.taxonomies.length;s++)a.append("<option value='"+o.taxonomies[s].term_id+"'>"+o.taxonomies[s].name+" ("+o.taxonomies[s].count+")</option>");a.val(e).trigger("change")}),t("select.folder_for_media").length){var a=t("select.folder_for_media").val();t("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var s=0;s<o.taxonomies.length;s++)t("select.folder_for_media option:last-child").before("<option value='"+o.taxonomies[s].term_id+"'>"+o.taxonomies[s].name+"</option>");""!=a&&t(".folder_for_media").val(a)}for(s=0;s<o.taxonomies.length;s++)t("#title_"+o.taxonomies[s].term_id+" .total-count").length||t("#title_"+o.taxonomies[s].term_id+" .star-icon").before("<span class='total-count'></span>"),t("#title_"+o.taxonomies[s].term_id+" .total-count").text(parseInt(o.taxonomies[s].trash_count)),t(".sticky-folders .sticky-folder-"+o.taxonomies[s].term_id+" .folder-count").length||t(".sticky-folders .sticky-folder-"+o.taxonomies[s].term_id+" a").append("<span class='folder-count'></span>"),t(".sticky-folders .sticky-folder-"+o.taxonomies[s].term_id+" .folder-count").text(parseInt(o.taxonomies[s].trash_count)),t("#title_"+o.taxonomies[s].term_id).attr("title",o.taxonomies[s].term_name),t("#title_"+o.taxonomies[s].term_id+" .title-text").html(o.taxonomies[s].term_name);t("#custom-menu .total-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()}),t(".sticky-folders .folder-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()})}}})}function I(){if(""!=t.trim(t("#folder-search").val())){t("#custom-menu").addClass("has-filter");var e=t.trim(t("#folder-search").val());t("#custom-menu span.title-text").removeClass("has-search-text"),t("li.route").removeClass("has-search"),t("#custom-menu span.title-text").each(function(){-1!==t(this).text().indexOf(e)&&(t(this).addClass("has-search-text"),t(this).parents("li.route:not(.has-sub-tree)").addClass("has-search"),t(this).parents("li.route.has-sub-tree.active").addClass("has-search"))})}else t("#custom-menu").removeClass("has-filter"),t("#custom-menu span.title-text").removeClass("has-search-text"),t("li.route").removeClass("has-search")}function S(e){var o="Are you sure you want to delete the selected folder?",a="Items in the folder will not be deleted.";if(m=!1,1==e&&t("#folder-hide-show-checkbox").is(":checked")){if(m=!0,0==t("#custom-menu input.checkbox:checked").length)return t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html("Please select at least one folder to delete"),void t("#error-folder-popup").show();t("#custom-menu input.checkbox:checked").length>1&&(o="Are you sure you want to delete the selected folders?",a="Items in the selected folders will not be deleted.")}t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#remove-folder-item").text("Yes, Delete it!"),t("#remove-folder-message").text(o),t("#remove-folder-notice").text(a),t("#confirm-remove-folder").show(),t("#remove-folder-item").focus()}function P(){var e=t.trim(t("#wcp_folder_"+s+" > h3 > .title-text").text()),o=t("#wcp_folder_"+s).closest("li.route").data("folder-id");null==o&&(o=0),t(".dynamic-menu").hide(),t("#update-folder-data").text("Submit"),t(".folder-form-errors").removeClass("active"),t("#update-folder-item-name").val(e),t("#update-folder-item").removeClass("disabled"),t("#update-folder-item").show(),t("#update-folder-item-name").focus()}function A(){if(0==parseInt(folders_media_options.is_key_active)&&r>=10)return t("#folder-limitation-message").html("You've reached the 10 folder limitation!"),t("#no-more-folder-credit").show(),!1;t("#add-update-folder-title").text("Add new folder"),t("#save-folder-data").text("Submit"),t(".folder-form-errors").removeClass("active"),t("#add-update-folder-name").val(""),u&&(f=s,t("#add-update-folder-name").val(t("#title_"+s+" .title-text").text()+" #2"),s=t("li#wcp_folder_"+s).parent().hasClass("first-space")?0:t("li#wcp_folder_"+s).parent().parent().data("folder-id")),h=t("#space_"+s+" > li").length+1,folders_media_options.ajax_url+"?parent_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_add_new_folder&nonce="+folders_media_options.nonce+"&term_id="+s+"&order="+h+"&name=",t("#add-update-folder").removeClass("disabled"),t("#add-update-folder").show(),t("#add-update-folder-name").focus()}function D(){t("#custom-menu .has-sub-tree").length==t("#custom-menu .has-sub-tree.active").length&&t("#custom-menu .has-sub-tree").length?(t("#expand-collapse-list").addClass("all-open"),t("#expand-collapse-list").attr("data-tooltip","Collapse")):(t("#expand-collapse-list").removeClass("all-open"),t("#expand-collapse-list").attr("data-tooltip","Expand"))}function N(e){jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_get_default_list&active_id="+n,method:"post",success:function(e){e=jQuery.parseJSON(e),t(".header-posts .total-count").text(e.total_items),t(".un-categorised-items .total-count").text(e.empty_items);var o=t("#media-attachment-taxonomy-filter").val();if("all"!=o){var a=parent.wp;null!=a.media&&(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}))}if(e.taxonomies.length){if(t("#media-attachment-taxonomy-filter").length){folders_media_options.terms=e.taxonomies;var i=t("#media-attachment-taxonomy-filter");i.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),t(".media-select-folder").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>");for(var r=0;r<e.taxonomies.length;r++)i.append("<option value='"+e.taxonomies[r].term_id+"'>"+e.taxonomies[r].name+" ("+e.taxonomies[r].trash_count+")</option>"),t(".media-select-folder").append("<option value='"+e.taxonomies[r].term_id+"'>"+e.taxonomies[r].name+" ("+e.taxonomies[r].trash_count+")</option>"),t("#title_"+e.taxonomies[r].term_id).attr("title",e.taxonomies[r].term_name),t("#title_"+e.taxonomies[r].term_id+" .title-text").html(e.taxonomies[r].term_name);i.val(o),t(".media-select-folder").val("")}if(t("select.folder_for_media").length){o=t("select.folder_for_media").val(),t("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(r=0;r<e.taxonomies.length;r++)t("select.folder_for_media option:last-child").before("<option value='"+e.taxonomies[r].term_id+"'>"+e.taxonomies[r].name+"</option>");""!=o&&t(".folder_for_media").val(o)}for(r=0;r<e.taxonomies.length;r++)t("#title_"+e.taxonomies[r].term_id+" .total-count").length||t("#title_"+e.taxonomies[r].term_id+" .star-icon").before("<span class='total-count'></span>"),t("#title_"+e.taxonomies[r].term_id+" .total-count").text(parseInt(e.taxonomies[r].trash_count)),t(".sticky-folders .sticky-folder-"+e.taxonomies[r].term_id+" .folder-count").length||t(".sticky-folders .sticky-folder-"+e.taxonomies[r].term_id+" a").append("<span class='folder-count'></span>"),t(".sticky-folders .sticky-folder-"+e.taxonomies[r].term_id+" .folder-count").text(parseInt(e.taxonomies[r].trash_count)),t("#title_"+e.taxonomies[r].term_id).attr("title",e.taxonomies[r].term_name),t("#title_"+e.taxonomies[r].term_id+" .title-text").html(e.taxonomies[r].term_name);t("#custom-menu .total-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()}),t(".sticky-folders .folder-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()})}""!=n&&t("#wcp_folder_"+n).addClass("active-item"),p&&(t("#title_"+s).trigger("click"),p=!1)}})}function O(){t(".folder-loader-ajax").addClass("active"),t(".folder-loader-ajax img").removeClass("active"),t(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){t(".folder-loader-ajax").removeClass("active"),t(".folder-loader-ajax img").addClass("active"),t(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3)}void 0!==k&&"function"==typeof k.Uploader&&k.media.view.Modal.prototype.on("open",function(){t(".folder-custom-menu").length||(t(".media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>"),t(".folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){console.log("content loaded from media page"),D()}),t(".media-frame-tab-panel").before("<div class='folder-form-data'></div>"),t(".folder-form-data").load(folders_media_options.media_page_url+" #folder-add-update-content",function(){console.log("content loaded from media page")}),N(0))}),t(document).ready(function(){parseInt(folders_media_options.is_key_active),r=parseInt(folders_media_options.folders),t(document).on("click",".header-posts a.all-posts",function(e){s=0,n="",t(".active-item").removeClass("active-item"),t(this).addClass("active-item"),t("#media-attachment-taxonomy-filter").val("all").trigger("change"),t(".folder_for_media").val("all").trigger("change")}),t(document).on("click",".un-categorised-items",function(e){s=0,n="",t(".active-item").removeClass("active-item"),t(this).addClass("active-item"),t("#media-attachment-taxonomy-filter").val("unassigned").trigger("change"),t(".folder_for_media").val("-1").trigger("change")}),t(document).on("click","h3.title",function(e){s=t(this).closest("li.route").data("folder-id"),n=s,t(".active-item").removeClass("active-item"),t(this).closest("li.route").addClass("active-item"),t("#media-attachment-taxonomy-filter").val(s).trigger("change"),t(".folder_for_media").val(s).trigger("change")}),t(document).on("change",".folder_for_media",function(){"add-folder"!=t(this).val()&&null!=t(this).val()?o=t(this).val():"add-folder"==t(this).val()&&(o=-1)}),t(document).on("click",".update-inline-record",function(e){e.stopPropagation();var o=t(this).closest("li.route").hasClass("is-high");t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu");var a="<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>"+(o?" 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>",s=parseInt(t(this).closest("li.route").find("h3.title:first > .total-count").text());"attachment"==folders_media_options.post_type&&s&&(a+="<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>"),a+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",t(this).closest("h3.title").after(a),t(this).parents("li.route").addClass("active-menu"),t(this).closest("h3.title").offset().top+t(".dynamic-menu").height()>t(window).height()-20&&(t(".dynamic-menu").addClass("bottom-fix"),t(".dynamic-menu.bottom-fix").offset().top<t("#custom-scroll-menu").offset().top&&t(".dynamic-menu").removeClass("bottom-fix"))}),t(document).on("click","body, html",function(e){t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu"),t(".folder-order").removeClass("active")}),t(document).on("click",".dynamic-menu, .folder-order",function(e){e.stopPropagation()}),t(document).on("contextmenu","h3.title",function(){if(e.preventDefault(),0==folders_media_options.can_manage_folder)return!1;var o=t(this).closest("li.route").hasClass("is-high");t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu");var a="<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>"+(o?" 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>",s=parseInt(t(this).closest("li.route").find("h3.title:first > .total-count").text());return"attachment"==folders_media_options.post_type&&s&&(a+="<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>"),a+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",t(this).after(a),t(this).parents("li.route").addClass("active-menu"),t(this).offset().top+t(".dynamic-menu").height()>t(window).height()-20&&(t(".dynamic-menu").addClass("bottom-fix"),t(".dynamic-menu.bottom-fix").offset().top<t("#custom-scroll-menu").offset().top&&t(".dynamic-menu").removeClass("bottom-fix")),!1}),t(document).on("click",".new-folder",function(e){e.stopPropagation(),t(".active-menu").removeClass("active-menu"),s=t(this).closest("li.route").data("folder-id"),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu"),p=!1,u=!1,A()}),t(document).on("click","#add-new-folder",function(e){s=t("#custom-menu li.active-item").length?t("#custom-menu li.active-item").data("folder-id"):0,p=!1,A()}),t(document).on("submit","#save-folder-form",function(e){if(e.stopPropagation(),e.preventDefault(),i=t("#add-update-folder-name").val(),""==t.trim(i))t(".folder-form-errors").addClass("active"),t("#add-update-folder-name").focus();else{t("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),t("#add-update-folder").addClass("disabled");var o="parent_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_add_new_folder&nonce="+folders_media_options.nonce+"&term_id="+s+"&order="+h+"&name="+i+"&is_duplicate="+u+"&duplicate_from="+f;p&&(o="parent_id=0&type="+folders_media_options.post_type+"&action=wcp_add_new_folder&nonce="+folders_media_options.nonce+"&term_id=0&order="+h+"&name="+i+"&is_duplicate="+u+"&duplicate_from="+f),jQuery.ajax({url:folders_media_options.ajax_url,data:o,method:"post",success:function(e){var o=jQuery.parseJSON(e);"1"==o.status?(t("#space_"+o.parent_id).append(o.term_data),t("#wcp_folder_"+o.parent_id).addClass("active has-sub-tree"),parseInt(o.is_key_active),r=parseInt(o.folders),t("#current-folder").text(r),t("#ttl-fldr").text(10),D(),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),O(),s=o.term_id,N(0)):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(o.message),t("#error-folder-popup").show())}})}return!1}),t(document).on("click",".form-cancel-btn",function(){t(".folder-popup-form").hide()}),t(document).on("click",".folder-popup-form",function(e){t(".folder-popup-form").hide()}),t(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),document.onkeydown=function(e){("key"in(e=e||window.event)?"Escape"===e.key||"Esc"===e.key:27===e.keyCode)&&t(".folder-popup-form").hide()},t(document).on("click",".rename-folder",function(e){e.stopPropagation(),s=t(this).closest("li.route").data("folder-id"),P()}),t(document).on("click","#inline-update",function(e){t("#custom-menu li.active-item").length&&(s=t("#custom-menu li.active-item").data("folder-id"),P())}),t(document).on("submit","#update-folder-form",function(e){if(e.stopPropagation(),e.preventDefault(),t(".dynamic-menu").hide(),i=t("#update-folder-item-name").val(),""==t.trim(i))t(".folder-form-errors").addClass("active"),t("#update-folder-item-name").focus();else{t("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),t("#update-folder-item").addClass("disabled"),l=t.trim(t("#wcp_folder_"+s).data("rename"));var o=t("#wcp_folder_"+s).closest("li.route").data("folder-id");null==o&&(o=0),jQuery.ajax({url:folders_media_options.ajax_url,data:"parent_id="+o+"&nonce="+l+"&type="+folders_media_options.post_type+"&action=wcp_update_folder&term_id="+s+"&name="+i,method:"post",success:function(e){var o=jQuery.parseJSON(e);"1"==o.status?(t("#wcp_folder_"+o.id+" > h3 > .title-text").text(o.term_title),t("#wcp_folder_"+o.id+" > h3").attr("title",o.term_title),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),O(),N(0)):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(o.message),t("#error-folder-popup").show())}})}return!1}),t(document).on("click",".mark-folder",function(e){e.stopPropagation(),a=t(this).closest("li.route").data("folder-id"),l=t.trim(t("#wcp_folder_"+a).data("star")),t(".form-loader-count").css("width","100%"),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu"),jQuery.ajax({url:folders_media_options.ajax_url,data:"term_id="+a+"&type="+folders_media_options.post_type+"&action=wcp_mark_un_mark_folder&nonce="+l,method:"post",cache:!1,success:function(e){e=jQuery.parseJSON(e);t(".form-loader-count").css("width","0%"),"1"==e.status?("1"==e.marked?t("#wcp_folder_"+e.id).addClass("is-high"):t("#wcp_folder_"+e.id).removeClass("is-high"),O()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}),t(document).on("click",".duplicate-folder",function(e){e.stopPropagation(),t(".active-menu").removeClass("active-menu"),s=t(this).closest("li.route").data("folder-id"),t(".dynamic-menu").remove(),u=!0,A()}),t(document).on("click",".remove-folder",function(e){a=t(this).closest("li.route").data("folder-id"),s=a,S(0),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu")}),t(document).on("click","#remove-folder-item",function(e){e.stopPropagation(),t(".folder-popup-form").addClass("disabled"),t("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),l=t.trim(t("#wcp_folder_"+s).data("delete")),m?function(){if(t("#folder-hide-show-checkbox").is(":checked")&&t("#custom-menu input.checkbox:checked").length>0){var e="";t("#custom-menu input.checkbox:checked").each(function(){e+=t(this).val()+",",t(this).closest("li.route").hasClass("active-item")&&!0}),t(".form-loader-count").css("width","100%"),jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_muliple_folder&term_id="+e+"&nonce="+folders_media_options.nonce,method:"post",success:function(e){var e=jQuery.parseJSON(e);t(".form-loader-count").css("width","0px"),"1"==e.status?(parseInt(e.is_key_active),r=parseInt(e.folders),t("#current-folder").text(r),t("#custom-menu input.checkbox:checked").each(function(){t("#wcp_folder_"+t(this).val()).closest("li.route").remove(),t("#space"+t(this).val()).remove()}),t("#ttl-fldr").text(10),O(),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),j(),O(),t("#wcp_folder_"+n).length||(t(".header-posts a").trigger("click"),n=0)):window.location.reload(),t("#folder-hide-show-checkbox").attr("checked",!1),t("#custom-menu input.checkbox").attr("checked",!1),t("#custom-menu").removeClass("show-folder-checkbox")}})}}():jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_folder&term_id="+s+"&nonce="+l,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(t("#wcp_folder_"+s).remove(),t("#folder_"+s).remove(),parseInt(e.is_key_active),r=parseInt(e.folders),t("#current-folder").text(r),t("#ttl-fldr").text(10),O(),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),console.log("activeRecordID: "+n),console.log("fileFolderID: "+s),n==s&&jQuery(".header-posts a").trigger("click"),Q()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}),t(document).on("click","#sort-order-list",function(e){e.stopPropagation(),t(".folder-order").toggleClass("active")}),t(document).on("click","#expand-collapse-list",function(e){e.stopPropagation();var o=0;t(this).hasClass("all-open")?(t(this).removeClass("all-open"),t(".has-sub-tree").removeClass("active"),o=0,t(this).attr("data-tooltip","Expand")):(t(this).addClass("all-open"),o=1,t(".has-sub-tree").addClass("active"),t(this).attr("data-tooltip","Collapse")),c="",t(".has-sub-tree").each(function(){c+=t(this).data("folder-id")+","}),""!=c&&(t(".form-loader-count").css("width","100%"),l=folders_media_options.nonce,jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_change_all_status&status="+o+"&folders="+c+"&nonce="+l,method:"post",success:function(e){t(".form-loader-count").css("width","0"),"0"==(e=jQuery.parseJSON(e)).status&&(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show(),window.location.reload(!0))}}))}),t(document).on("click",".folder-sort-menu a",function(e){e.stopPropagation(),e.preventDefault(),t(".form-loader-count").css("width","100%"),t(".folder-order").removeClass("active"),t(this).attr("data-sort"),jQuery.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="+t(this).attr("data-sort"),method:"post",success:function(e){1==(e=jQuery.parseJSON(e)).status&&t("#space_0").html(e.data),t(".form-loader-count").css("width","0")}})}),t(".space").livequery(function(){t(this).sortable({placeholder:"ui-state-highlight",connectWith:".space",tolerance:"intersect",over:function(e,t){},update:function(e,o){o.item.context.attributes["data-folder-id"].nodeValue;var a="";t(this).children().each(function(){t(this).hasClass("route")&&(a+=t(this).data("folder-id")+",")}),""!=a&&(t(".form-loader-count").css("width","100%"),jQuery.ajax({url:folders_media_options.ajax_url,data:"term_ids="+a+"&action=wcp_save_folder_order&type="+folders_media_options.post_type+"&nonce="+folders_media_options.nonce,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(t("#wcp_folder_parent").html(e.options),t(".form-loader-count").css("width","0"),j(),O()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show(),window.location.reload(!0))}}))},receive:function(e,o){!function e(o){var a=t(o).siblings(".space").children(".route").children(".title");t(a).each(function(a,s){var i=parseInt(t(o).css("width")),r=parseInt(t(o).siblings(".space").css("margin-left")),l=i-r;"title_0"==t(o).attr("id")&&(l-=10),t(s).css({width:l}),e(s)})}(t(this).siblings(".title")),t(this).closest("li.route").addClass("active"),t(this).closest("li.route").find("ul.ui-sortable:first-child > li").slideDown();var a=t(this).closest("li.route").data("folder-id"),s=o.item.context.attributes["data-folder-id"].nodeValue;null==a&&(a=0);t("#wcp_folder_"+a+" .ui-sortable li").length?t("#wcp_folder_"+a+" .ui-sortable li").each(function(){t(this).data("folder-id")+","}):0==a&&t("#custom-menu > ul.space > li").each(function(){t(this).data("folder-id")+","}),t(".form-loader-count").css("width","100%"),l=t.trim(t("#wcp_folder_"+s).data("nonce")),jQuery.ajax({url:folders_media_options.ajax_url,data:"term_id="+s+"&action=wcp_update_parent_information&parent_id="+a+"&type="+folders_media_options.post_type+"&nonce="+l,method:"post",success:function(e){t(".form-loader-count").css("width","0%"),0==(e=jQuery.parseJSON(e)).status?(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show()):O()}})}}),t(this).disableSelection()}),t("h3.title").livequery(function(){t(this).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(e,o){if(a=t(this).closest("li.route").data("folder-id"),o.draggable.hasClass("wcp-move-multiple")){if(t(".wp-list-table input:checked").length){var s="";t(".wp-list-table input:checked").each(function(){s+=t(this).val()+","}),l=t.trim(t("#wcp_folder_"+a).data("nonce")),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(j(),O()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}}else if(o.draggable.hasClass("wcp-move-file")){var i=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce")),s=i+",",t(".wp-list-table input:checked").each(function(){t(this).val()!=i&&(s+=t(this).val()+",")}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(j(),O()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}else if(o.draggable.hasClass("attachment")){s=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce")),t(".attachments-browser li.attachment.selected").length>1&&(s="",t(".attachments-browser li.attachment.selected").each(function(){s+=t(this).data("id")+","})),c=s,jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}}})}),t(".attachments-browser li.attachment").livequery(function(){t(this).draggable({revert:"invalid",containment:"document",helper:function(e,o){t(".selected-items").remove();var a=t(".attachments-browser li.attachment.selected").length;return t("<div class='selected-items'><span class='total-post-count'>"+(a=0==a||1==a?"1 Item":a+" Items")+" Selected</span></div>")},start:function(e,o){t("body").addClass("no-hover-css")},cursor:"move",appendTo:".media-modal",cursorAt:{left:0,top:0},stop:function(e,o){t(".selected-items").remove(),t("body").removeClass("no-hover-css")}})}),t(".un-categorised-items").livequery(function(){t(this).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(e,o){if(a=-1,l=folders_media_options.nonce,o.draggable.hasClass("wcp-move-multiple")){if(t(".wp-list-table input:checked").length){var s="";t(".wp-list-table input:checked").each(function(){s+=t(this).val()+","}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}}else if(o.draggable.hasClass("wcp-move-file")){var i=o.draggable[0].attributes["data-id"].nodeValue;s=i+",";t(".wp-list-table input:checked").each(function(){i!=t(this).val()&&(s+=t(this).val()+",")}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}else if(o.draggable.hasClass("attachment")){s=o.draggable[0].attributes["data-id"].nodeValue;t(".attachments-browser li.attachment.selected").length>1&&(s="",t(".attachments-browser li.attachment.selected").each(function(){s+=t(this).data("id")+","})),c=s,jQuery.ajax({url:folders_media_options.ajax_url,data:"post_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}}})}),t(".tree-structure .folder-item").livequery(function(){t(this).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(e,o){if(t("body").removeClass("no-hover-css"),a=t(this).data("id"),o.draggable.hasClass("wcp-move-multiple")){if(l=t.trim(t("#wcp_folder_"+a).data("nonce")),t(".wp-list-table input:checked").length){var s="";t(".wp-list-table input:checked").each(function(){s+=t(this).val()+","}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}}else if(o.draggable.hasClass("wcp-move-file")){var i=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce"));s=i+",";t(".wp-list-table input:checked").each(function(){t(this).val()!=i&&(s+=t(this).val()+",")}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}else if(o.draggable.hasClass("attachment")){s=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce")),t(".attachments-browser li.attachment.selected").length>1&&(s="",t(".attachments-browser li.attachment.selected").each(function(){s+=t(this).data("id")+","})),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){j(),O()}})}}})}),t(".wcp-move-file").livequery(function(){t(this).draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(e,o){t(this).closest("td").addClass("wcp-draggable"),t("body").addClass("no-hover-css")},stop:function(e,o){t(this).closest("td").removeClass("wcp-draggable"),t("body").removeClass("no-hover-css")}})}),t(".wcp-move-multiple").livequery(function(){t(this).draggable({revert:"invalid",containment:"document",helper:function(e,o){t(".selected-items").remove();var a=t("#the-list th input:checked").length;return t(a>0?"<div class='selected-items'><span class='total-post-count'>"+(a=0==a||1==a?"1 Item":a+" Items")+" Selected</span></div>":"<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(e,o){t("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(e,o){t(".selected-items").remove(),t("body").removeClass("no-hover-css")}})}),t(document).on("click",".nav-icon",function(){a=t(this).closest("li.route").data("folder-id");var e=1;e=t("#wcp_folder_"+a).hasClass("active")?0:1,t(".form-loader-count").css("width","100%"),l=t.trim(t("#wcp_folder_"+a).data("nonce")),D(),jQuery.ajax({url:folders_media_options.ajax_url,data:"is_active="+e+"&action=save_wcp_folder_state&term_id="+a+"&nonce="+l,method:"post",success:function(o){t(".form-loader-count").css("width","0"),"0"==(o=jQuery.parseJSON(o)).status?(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(o.message),t("#error-folder-popup").show()):(t("#wcp_folder_"+a).hasClass("active")?(t("#wcp_folder_"+a).removeClass("active"),t("#wcp_folder_"+a).find("ul.ui-sortable:first-child > li").slideUp(),e=0):(t("#wcp_folder_"+a).addClass("active"),t("#wcp_folder_"+a).find("ul.ui-sortable:first-child > li").slideDown(),e=1),O())}})}),t(document).on("keyup","#folder-search",function(){I()}),t(document).on("change","#folder-search",function(){I()}),t(document).on("blur","#folder-search",function(){I()}),t(document).on("click","#folder-hide-show-checkbox",function(){t(this).is(":checked")?t("#custom-menu").addClass("show-folder-checkbox"):(t("#custom-menu input.checkbox").attr("checked",!1),t("#custom-menu").removeClass("show-folder-checkbox"))}),t(document).on("click","#inline-remove",function(){t("#custom-menu li.active-item").length?(s=t("#custom-menu li.active-item").data("folder-id"),S(1),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu")):t("#folder-hide-show-checkbox").is(":checked")&&(t(".dynamic-menu").remove(),S(1))})})}(jQuery,_);
1
+ !function(t){"use strict";var o=-1,a=0,s=0,i="",r=-1,l="",d=folders_media_options.page_url,n="",c="",m=!1,p=!1,f=!1,u=0,h=0,v=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)}}),g=(o=-1,0),x=0,y=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){y.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryOrganizerTaxonomyFilter",new v({controller:this.controller,model:this.collection.props,priority:-75}).render())}});var w,b=wp.media.model.Query;_.extend(b,{get:(w=[],function(e,t){var o,a={},s=b.orderby,i=b.defaultProps;return delete e.query,delete e.cache,_.defaults(e,i),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(e,t){_.isNull(e)||(a[b.propmap[t]||t]=e)}),_.defaults(a,b.defaultArgs),a.orderby=s.valuemap[e.orderby]||e.orderby,w=[],o||(o=new b([],_.extend(t||{},{props:e,args:a})),w.push(o)),o})});var C=window.wp;void 0!==C&&"function"==typeof C.Uploader&&(C.media.view.Modal.prototype.on("open",function(){setTimeout(function(){t("#media-attachment-taxonomy-filter").length&&("all"==t("#media-attachment-taxonomy-filter").val()&&(t("#media-attachment-taxonomy-filter option:gt(1)").remove(),_.each(folders_media_options.terms,function(e,o){t("#media-attachment-taxonomy-filter").append("<option value='"+e.term_id+"'>"+e.name+" ("+e.count+")</option>")})),jQuery("#wcp-content").length||jQuery(".editor-post-featured-image").length&&jQuery(".attachment-filters").val("all").trigger("change"))},100)}),jQuery.extend(C.Uploader.prototype,{progress:function(){},init:function(){this.uploader&&(this.uploader.bind("FileFiltered",function(e,o){g++,t(".folder-meter").css("width","0%"),t(".media-folder-loader").show(),t("#total_upload_files").text(g)}),this.uploader.bind("BeforeUpload",function(e,a){var s=o,i=e.settings.multipart_params;if((s=parseInt(s))>0&&(i.folder_for_media=s),x<g){t(".media-folder-loader").show();var r=x/g*100;t(".folder-meter").css("width",r+"%")}x++,t("#current_upload_files").text(x)}),this.uploader.bind("UploadComplete",function(e,t){o=-1}),this.uploader.bind("UploadComplete",function(e,o){var a=window.wp;t(".folder-meter").css("width","100%"),setTimeout(function(){t(".media-folder-loader").hide(),t(".folder-meter").css("width","0%"),g=0,x=0},1250),S(),void 0!==a.media.frame&&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()):t("#media-attachment-taxonomy-filter").length&&t(".attachment-filters").each(function(){t(this).trigger("change")})}))}}));var k=window.wp;if(void 0!==k&&"function"==typeof k.Uploader){var j=window.wp.media,Q=j.view.Modal;j.view.Modal=j.view.Modal.extend({className:"folder-modal",initialize:function(){Q.prototype.initialize.apply(this,arguments)},open:function(){t(".folder-modal").removeClass("folder-modal"),Q.prototype.open.apply(this,arguments)&&(console.log("media frame open"),t(".folder-modal").length&&(t(".folder-custom-menu").remove(),t(".folder-modal .media-frame-tab-panel").removeClass("has-folder-menu"),t(".folder-modal .media-frame").hasClass("hide-menu")?t(".folder-custom-menu").length||(t(".folder-modal .media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>"),t(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){D()})):t(".folder-custom-menu").length||(t(".folder-modal .media-frame-menu").addClass("has-folder-menu"),t(".folder-modal .media-frame-menu .media-menu").append("<div class='folder-custom-menu'><div class='folder-menu-content'></div></div>"),t(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){D()})),t(".folder-form-data").remove(),t(".media-frame-tab-panel:first").before("<div class='folder-form-data'></div>"),t(".folder-form-data").load(folders_media_options.media_page_url+" #folder-add-update-content",function(){})))},close:function(){Q.prototype.close.apply(this,arguments),t(".folder-modal").removeClass("folder-modal")}})}function I(){if(t(".media-toolbar").hasClass("media-toolbar-mode-select")&&t("ul.attachments li.selected").length&&(t("ul.attachments li.selected").trigger("click"),t(".select-mode-toggle-button").trigger("click")),""!=c&&(t("#custom-menu li.active-item").length>0||"-1"==n)){if(t("#media-attachment-taxonomy-filter").length){c=c.split(",");for(var e=0;e<c.length;e++)""!=c[e]&&t(".media-frame:not(.hide-router) .attachments-browser li[data-id='"+c[e]+"']").remove()}c=""}t("#media-attachment-taxonomy-filter").length?J(0):(jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=get_folders_default_list",method:"post",success:function(o){o=jQuery.parseJSON(o);for(t(".header-posts .total-count").text(o.total_items),t(".un-categorised-items .total-count").text(o.empty_items),e=0;e<o.taxonomies.length;e++)t("#title_"+o.taxonomies[e].term_id+" .total-count").length||t("#title_"+o.taxonomies[e].term_id+" .star-icon").before("<span class='total-count'></span>"),t("#title_"+o.taxonomies[e].term_id+" .total-count").text(parseInt(o.taxonomies[e].trash_count)),t(".sticky-folders .sticky-folder-"+o.taxonomies[e].term_id+" .folder-count").length||t(".sticky-folders .sticky-folder-"+o.taxonomies[e].term_id+" a").append("<span class='folder-count'></span>"),t(".sticky-folders .sticky-folder-"+o.taxonomies[e].term_id+" .folder-count").text(parseInt(o.taxonomies[e].trash_count));t("#custom-menu .total-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()}),t(".sticky-folders .folder-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()})}}),t(".folder-loader-ajax").addClass("active"),t("#folder-posts-filter").length?t("#folder-posts-filter").load(d+" #posts-filter",function(){"show"!=folders_media_options.show_in_page||t(".tree-structure").length||t(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),add_active_item_to_list(),triggerInlineUpdate()}):t("#wpbody").load(d+" #wpbody-content",!1,function(e){"show"!=folders_media_options.show_in_page||t(".tree-structure").length||t(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>'),add_active_item_to_list()}))}function S(){var e=t("#media-attachment-taxonomy-filter").val();jQuery.ajax({url:folders_media_options.ajax_url,data:"type=attachment&action=wcp_get_default_list&active_id=0",method:"post",success:function(o){o=jQuery.parseJSON(o);if(t("#media-attachment-taxonomy-filter").length){if(t("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=o.taxonomies;var a=t(this);a.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),o.taxonomies;for(var s=0;s<o.taxonomies.length;s++)a.append("<option value='"+o.taxonomies[s].term_id+"'>"+o.taxonomies[s].name+" ("+o.taxonomies[s].count+")</option>");a.val(e).trigger("change")}),t("select.folder_for_media").length){var a=t("select.folder_for_media").val();t("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var s=0;s<o.taxonomies.length;s++)t("select.folder_for_media option:last-child").before("<option value='"+o.taxonomies[s].term_id+"'>"+o.taxonomies[s].name+"</option>");""!=a&&t(".folder_for_media").val(a)}for(s=0;s<o.taxonomies.length;s++)t("#title_"+o.taxonomies[s].term_id+" .total-count").length||t("#title_"+o.taxonomies[s].term_id+" .star-icon").before("<span class='total-count'></span>"),t("#title_"+o.taxonomies[s].term_id+" .total-count").text(parseInt(o.taxonomies[s].trash_count)),t(".sticky-folders .sticky-folder-"+o.taxonomies[s].term_id+" .folder-count").length||t(".sticky-folders .sticky-folder-"+o.taxonomies[s].term_id+" a").append("<span class='folder-count'></span>"),t(".sticky-folders .sticky-folder-"+o.taxonomies[s].term_id+" .folder-count").text(parseInt(o.taxonomies[s].trash_count)),t("#title_"+o.taxonomies[s].term_id).attr("title",o.taxonomies[s].term_name),t("#title_"+o.taxonomies[s].term_id+" .title-text").html(o.taxonomies[s].term_name);t("#custom-menu .total-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()}),t(".sticky-folders .folder-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()})}}})}function N(){if(""!=t.trim(t("#folder-search").val())){t("#custom-menu").addClass("has-filter");var e=t.trim(t("#folder-search").val());t("#custom-menu span.title-text").removeClass("has-search-text"),t("li.route").removeClass("has-search"),t("#custom-menu span.title-text").each(function(){-1!==t(this).text().indexOf(e)&&(t(this).addClass("has-search-text"),t(this).parents("li.route:not(.has-sub-tree)").addClass("has-search"),t(this).parents("li.route.has-sub-tree.active").addClass("has-search"))})}else t("#custom-menu").removeClass("has-filter"),t("#custom-menu span.title-text").removeClass("has-search-text"),t("li.route").removeClass("has-search")}function P(e){var o="Are you sure you want to delete the selected folder?",a="Items in the folder will not be deleted.";if(m=!1,1==e&&t("#folder-hide-show-checkbox").is(":checked")){if(m=!0,0==t("#custom-menu input.checkbox:checked").length)return t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html("Please select at least one folder to delete"),void t("#error-folder-popup").show();t("#custom-menu input.checkbox:checked").length>1&&(o="Are you sure you want to delete the selected folders?",a="Items in the selected folders will not be deleted.")}t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#remove-folder-item").text("Yes, Delete it!"),t("#remove-folder-message").text(o),t("#remove-folder-notice").text(a),t("#confirm-remove-folder").show(),t("#remove-folder-item").focus()}function A(){var e=t.trim(t("#wcp_folder_"+s+" > h3 > .title-text").text()),o=t("#wcp_folder_"+s).closest("li.route").data("folder-id");null==o&&(o=0),t(".dynamic-menu").hide(),t("#update-folder-data").text("Submit"),t(".folder-form-errors").removeClass("active"),t("#update-folder-item-name").val(e),t("#update-folder-item").removeClass("disabled"),t("#update-folder-item").show(),t("#update-folder-item-name").focus()}function O(){if(0==parseInt(folders_media_options.is_key_active)&&r>=10)return t("#folder-limitation-message").html("You've reached the 10 folder limitation!"),t("#no-more-folder-credit").show(),!1;t("#add-update-folder-title").text("Add new folder"),t("#save-folder-data").text("Submit"),t(".folder-form-errors").removeClass("active"),t("#add-update-folder-name").val(""),f&&(u=s,t("#add-update-folder-name").val(t("#title_"+s+" .title-text").text()+" #2"),s=t("li#wcp_folder_"+s).parent().hasClass("first-space")?0:t("li#wcp_folder_"+s).parent().parent().data("folder-id")),h=t("#space_"+s+" > li").length+1,folders_media_options.ajax_url+"?parent_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_add_new_folder&nonce="+folders_media_options.nonce+"&term_id="+s+"&order="+h+"&name=",t("#add-update-folder").removeClass("disabled"),t("#add-update-folder").show(),t("#add-update-folder-name").focus()}function D(){t("#custom-menu .has-sub-tree").length==t("#custom-menu .has-sub-tree.active").length&&t("#custom-menu .has-sub-tree").length?(t("#expand-collapse-list").addClass("all-open"),t("#expand-collapse-list").attr("data-tooltip","Collapse")):(t("#expand-collapse-list").removeClass("all-open"),t("#expand-collapse-list").attr("data-tooltip","Expand"))}function J(e){jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_get_default_list&active_id="+n,method:"post",success:function(e){e=jQuery.parseJSON(e),t(".header-posts .total-count").text(e.total_items),t(".un-categorised-items .total-count").text(e.empty_items);var o=t("#media-attachment-taxonomy-filter").val();if("all"!=o){var a=parent.wp;null!=a.media&&(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}))}if(e.taxonomies.length){if(t("#media-attachment-taxonomy-filter").length){folders_media_options.terms=e.taxonomies;var i=t("#media-attachment-taxonomy-filter");i.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),t(".media-select-folder").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>");for(var r=0;r<e.taxonomies.length;r++)i.append("<option value='"+e.taxonomies[r].term_id+"'>"+e.taxonomies[r].name+" ("+e.taxonomies[r].trash_count+")</option>"),t(".media-select-folder").append("<option value='"+e.taxonomies[r].term_id+"'>"+e.taxonomies[r].name+" ("+e.taxonomies[r].trash_count+")</option>"),t("#title_"+e.taxonomies[r].term_id).attr("title",e.taxonomies[r].term_name),t("#title_"+e.taxonomies[r].term_id+" .title-text").html(e.taxonomies[r].term_name);i.val(o),t(".media-select-folder").val("")}if(t("select.folder_for_media").length){o=t("select.folder_for_media").val(),t("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(r=0;r<e.taxonomies.length;r++)t("select.folder_for_media option:last-child").before("<option value='"+e.taxonomies[r].term_id+"'>"+e.taxonomies[r].name+"</option>");""!=o&&t(".folder_for_media").val(o)}for(r=0;r<e.taxonomies.length;r++)t("#title_"+e.taxonomies[r].term_id+" .total-count").length||t("#title_"+e.taxonomies[r].term_id+" .star-icon").before("<span class='total-count'></span>"),t("#title_"+e.taxonomies[r].term_id+" .total-count").text(parseInt(e.taxonomies[r].trash_count)),t(".sticky-folders .sticky-folder-"+e.taxonomies[r].term_id+" .folder-count").length||t(".sticky-folders .sticky-folder-"+e.taxonomies[r].term_id+" a").append("<span class='folder-count'></span>"),t(".sticky-folders .sticky-folder-"+e.taxonomies[r].term_id+" .folder-count").text(parseInt(e.taxonomies[r].trash_count)),t("#title_"+e.taxonomies[r].term_id).attr("title",e.taxonomies[r].term_name),t("#title_"+e.taxonomies[r].term_id+" .title-text").html(e.taxonomies[r].term_name);t("#custom-menu .total-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()}),t(".sticky-folders .folder-count").each(function(){0==parseInt(t(this).text())&&t(this).remove()})}""!=n&&t("#wcp_folder_"+n).addClass("active-item"),p&&(t("#title_"+s).trigger("click"),p=!1)}})}function F(){t(".folder-loader-ajax").addClass("active"),t(".folder-loader-ajax img").removeClass("active"),t(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){t(".folder-loader-ajax").removeClass("active"),t(".folder-loader-ajax img").addClass("active"),t(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3)}t(document).ready(function(){parseInt(folders_media_options.is_key_active),r=parseInt(folders_media_options.folders),t(document).on("click",".header-posts a.all-posts",function(e){s=0,n="",t(".active-item").removeClass("active-item"),t(this).addClass("active-item"),t(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("all").trigger("change"),t(this).closest(".media-frame").find(".folder_for_media").val("all").trigger("change")}),t(document).on("click",".un-categorised-items",function(e){s=0,n="",t(".active-item").removeClass("active-item"),t(this).addClass("active-item"),t(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("unassigned").trigger("change"),t(this).closest(".media-frame").find(".folder_for_media").val("-1").trigger("change")}),t(document).on("click","h3.title",function(e){s=t(this).closest("li.route").data("folder-id"),n=s,t(".active-item").removeClass("active-item"),t(this).closest("li.route").addClass("active-item"),t(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val(s).trigger("change"),t(this).closest(".media-frame").find(".folder_for_media").val(s).trigger("change")}),t(document).on("change",".folder_for_media",function(){"add-folder"!=t(this).val()&&null!=t(this).val()?o=t(this).val():"add-folder"==t(this).val()&&(o=-1)}),t(document).on("click",".update-inline-record",function(e){e.stopPropagation();var o=t(this).closest("li.route").hasClass("is-high");t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu");var a="<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>"+(o?" 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>",s=parseInt(t(this).closest("li.route").find("h3.title:first > .total-count").text());"attachment"==folders_media_options.post_type&&s&&(a+="<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>"),a+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",t(this).closest("h3.title").after(a),t(this).parents("li.route").addClass("active-menu"),t(this).closest("h3.title").offset().top+t(".dynamic-menu").height()>t(window).height()-20&&(t(".dynamic-menu").addClass("bottom-fix"),t(".dynamic-menu.bottom-fix").offset().top<t("#custom-scroll-menu").offset().top&&t(".dynamic-menu").removeClass("bottom-fix"))}),t(document).on("click","body, html",function(e){t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu"),t(".folder-order").removeClass("active")}),t(document).on("click",".dynamic-menu, .folder-order",function(e){e.stopPropagation()}),t(document).on("contextmenu","h3.title",function(){if(e.preventDefault(),0==folders_media_options.can_manage_folder)return!1;var o=t(this).closest("li.route").hasClass("is-high");t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu");var a="<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>"+(o?" 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>",s=parseInt(t(this).closest("li.route").find("h3.title:first > .total-count").text());return"attachment"==folders_media_options.post_type&&s&&(a+="<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>"),a+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",t(this).after(a),t(this).parents("li.route").addClass("active-menu"),t(this).offset().top+t(".dynamic-menu").height()>t(window).height()-20&&(t(".dynamic-menu").addClass("bottom-fix"),t(".dynamic-menu.bottom-fix").offset().top<t("#custom-scroll-menu").offset().top&&t(".dynamic-menu").removeClass("bottom-fix")),!1}),t(document).on("click",".new-folder",function(e){e.stopPropagation(),t(".active-menu").removeClass("active-menu"),s=t(this).closest("li.route").data("folder-id"),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu"),p=!1,f=!1,O()}),t(document).on("click","#add-new-folder",function(e){s=t("#custom-menu li.active-item").length?t("#custom-menu li.active-item").data("folder-id"):0,p=!1,O()}),t(document).on("submit","#save-folder-form",function(e){if(e.stopPropagation(),e.preventDefault(),i=t("#add-update-folder-name").val(),""==t.trim(i))t(".folder-form-errors").addClass("active"),t("#add-update-folder-name").focus();else{t("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),t("#add-update-folder").addClass("disabled");var o="parent_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_add_new_folder&nonce="+folders_media_options.nonce+"&term_id="+s+"&order="+h+"&name="+i+"&is_duplicate="+f+"&duplicate_from="+u;p&&(o="parent_id=0&type="+folders_media_options.post_type+"&action=wcp_add_new_folder&nonce="+folders_media_options.nonce+"&term_id=0&order="+h+"&name="+i+"&is_duplicate="+f+"&duplicate_from="+u),jQuery.ajax({url:folders_media_options.ajax_url,data:o,method:"post",success:function(e){var o=jQuery.parseJSON(e);"1"==o.status?(t("#space_"+o.parent_id).append(o.term_data),t("#wcp_folder_"+o.parent_id).addClass("active has-sub-tree"),parseInt(o.is_key_active),r=parseInt(o.folders),t("#current-folder").text(r),t("#ttl-fldr").text(10),D(),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),F(),s=o.term_id,J(0)):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(o.message),t("#error-folder-popup").show())}})}return!1}),t(document).on("click",".form-cancel-btn",function(){t(".folder-popup-form").hide()}),t(document).on("click",".folder-popup-form",function(e){t(".folder-popup-form").hide()}),t(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),document.onkeydown=function(e){("key"in(e=e||window.event)?"Escape"===e.key||"Esc"===e.key:27===e.keyCode)&&t(".folder-popup-form").hide()},t(document).on("click",".rename-folder",function(e){e.stopPropagation(),s=t(this).closest("li.route").data("folder-id"),A()}),t(document).on("click","#inline-update",function(e){t("#custom-menu li.active-item").length&&(s=t("#custom-menu li.active-item").data("folder-id"),A())}),t(document).on("submit","#update-folder-form",function(e){if(e.stopPropagation(),e.preventDefault(),t(".dynamic-menu").hide(),i=t("#update-folder-item-name").val(),""==t.trim(i))t(".folder-form-errors").addClass("active"),t("#update-folder-item-name").focus();else{t("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),t("#update-folder-item").addClass("disabled"),l=t.trim(t("#wcp_folder_"+s).data("rename"));var o=t("#wcp_folder_"+s).closest("li.route").data("folder-id");null==o&&(o=0),jQuery.ajax({url:folders_media_options.ajax_url,data:"parent_id="+o+"&nonce="+l+"&type="+folders_media_options.post_type+"&action=wcp_update_folder&term_id="+s+"&name="+i,method:"post",success:function(e){var o=jQuery.parseJSON(e);"1"==o.status?(t("#wcp_folder_"+o.id+" > h3 > .title-text").text(o.term_title),t("#wcp_folder_"+o.id+" > h3").attr("title",o.term_title),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),F(),J(0)):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(o.message),t("#error-folder-popup").show())}})}return!1}),t(document).on("click",".mark-folder",function(e){e.stopPropagation(),a=t(this).closest("li.route").data("folder-id"),l=t.trim(t("#wcp_folder_"+a).data("star")),t(".form-loader-count").css("width","100%"),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu"),jQuery.ajax({url:folders_media_options.ajax_url,data:"term_id="+a+"&type="+folders_media_options.post_type+"&action=wcp_mark_un_mark_folder&nonce="+l,method:"post",cache:!1,success:function(e){e=jQuery.parseJSON(e);t(".form-loader-count").css("width","0%"),"1"==e.status?("1"==e.marked?t("#wcp_folder_"+e.id).addClass("is-high"):t("#wcp_folder_"+e.id).removeClass("is-high"),F()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}),t(document).on("click",".duplicate-folder",function(e){e.stopPropagation(),t(".active-menu").removeClass("active-menu"),s=t(this).closest("li.route").data("folder-id"),t(".dynamic-menu").remove(),f=!0,O()}),t(document).on("click",".remove-folder",function(e){a=t(this).closest("li.route").data("folder-id"),s=a,P(0),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu")}),t(document).on("click","#remove-folder-item",function(e){e.stopPropagation(),t(".folder-popup-form").addClass("disabled"),t("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),l=t.trim(t("#wcp_folder_"+s).data("delete")),m?function(){if(t("#folder-hide-show-checkbox").is(":checked")&&t("#custom-menu input.checkbox:checked").length>0){var e="";t("#custom-menu input.checkbox:checked").each(function(){e+=t(this).val()+",",t(this).closest("li.route").hasClass("active-item")&&!0}),t(".form-loader-count").css("width","100%"),jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_muliple_folder&term_id="+e+"&nonce="+folders_media_options.nonce,method:"post",success:function(e){var e=jQuery.parseJSON(e);t(".form-loader-count").css("width","0px"),"1"==e.status?(parseInt(e.is_key_active),r=parseInt(e.folders),t("#current-folder").text(r),t("#custom-menu input.checkbox:checked").each(function(){t("#wcp_folder_"+t(this).val()).closest("li.route").remove(),t("#space"+t(this).val()).remove()}),t("#ttl-fldr").text(10),F(),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),I(),F(),t("#wcp_folder_"+n).length||(t(".header-posts a").trigger("click"),n=0)):window.location.reload(),t("#folder-hide-show-checkbox").attr("checked",!1),t("#custom-menu input.checkbox").attr("checked",!1),t("#custom-menu").removeClass("show-folder-checkbox")}})}}():jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_folder&term_id="+s+"&nonce="+l,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(t("#wcp_folder_"+s).remove(),t("#folder_"+s).remove(),parseInt(e.is_key_active),r=parseInt(e.folders),t("#current-folder").text(r),t("#ttl-fldr").text(10),F(),t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),n==s&&jQuery(".header-posts a").trigger("click"),S()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}),t(document).on("click","#sort-order-list",function(e){e.stopPropagation(),t(".folder-order").toggleClass("active")}),t(document).on("click","#expand-collapse-list",function(e){e.stopPropagation();var o=0;t(this).hasClass("all-open")?(t(this).removeClass("all-open"),t(".has-sub-tree").removeClass("active"),o=0,t(this).attr("data-tooltip","Expand")):(t(this).addClass("all-open"),o=1,t(".has-sub-tree").addClass("active"),t(this).attr("data-tooltip","Collapse")),c="",t(".has-sub-tree").each(function(){c+=t(this).data("folder-id")+","}),""!=c&&(t(".form-loader-count").css("width","100%"),l=folders_media_options.nonce,jQuery.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_change_all_status&status="+o+"&folders="+c+"&nonce="+l,method:"post",success:function(e){t(".form-loader-count").css("width","0"),"0"==(e=jQuery.parseJSON(e)).status&&(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show(),window.location.reload(!0))}}))}),t(document).on("click",".folder-sort-menu a",function(e){e.stopPropagation(),e.preventDefault(),t(".form-loader-count").css("width","100%"),t(".folder-order").removeClass("active"),t(this).attr("data-sort"),jQuery.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="+t(this).attr("data-sort"),method:"post",success:function(e){1==(e=jQuery.parseJSON(e)).status&&t("#space_0").html(e.data),t(".form-loader-count").css("width","0")}})}),t(".space").livequery(function(){t(this).sortable({placeholder:"ui-state-highlight",connectWith:".space",tolerance:"intersect",over:function(e,t){},update:function(e,o){o.item.context.attributes["data-folder-id"].nodeValue;var a="";t(this).children().each(function(){t(this).hasClass("route")&&(a+=t(this).data("folder-id")+",")}),""!=a&&(t(".form-loader-count").css("width","100%"),jQuery.ajax({url:folders_media_options.ajax_url,data:"term_ids="+a+"&action=wcp_save_folder_order&type="+folders_media_options.post_type+"&nonce="+folders_media_options.nonce,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(t("#wcp_folder_parent").html(e.options),t(".form-loader-count").css("width","0"),I(),F()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show(),window.location.reload(!0))}}))},receive:function(e,o){!function e(o){var a=t(o).siblings(".space").children(".route").children(".title");t(a).each(function(a,s){var i=parseInt(t(o).css("width")),r=parseInt(t(o).siblings(".space").css("margin-left")),l=i-r;"title_0"==t(o).attr("id")&&(l-=10),t(s).css({width:l}),e(s)})}(t(this).siblings(".title")),t(this).closest("li.route").addClass("active"),t(this).closest("li.route").find("ul.ui-sortable:first-child > li").slideDown();var a=t(this).closest("li.route").data("folder-id"),s=o.item.context.attributes["data-folder-id"].nodeValue;null==a&&(a=0);t("#wcp_folder_"+a+" .ui-sortable li").length?t("#wcp_folder_"+a+" .ui-sortable li").each(function(){t(this).data("folder-id")+","}):0==a&&t("#custom-menu > ul.space > li").each(function(){t(this).data("folder-id")+","}),t(".form-loader-count").css("width","100%"),l=t.trim(t("#wcp_folder_"+s).data("nonce")),jQuery.ajax({url:folders_media_options.ajax_url,data:"term_id="+s+"&action=wcp_update_parent_information&parent_id="+a+"&type="+folders_media_options.post_type+"&nonce="+l,method:"post",success:function(e){t(".form-loader-count").css("width","0%"),0==(e=jQuery.parseJSON(e)).status?(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show()):F()}})}}),t(this).disableSelection()}),t("h3.title").livequery(function(){t(this).droppable({accept:".wcp-move-file, .wcp-move-multiple, .media-frame:not(.hide-router) .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(e,o){if(a=t(this).closest("li.route").data("folder-id"),o.draggable.hasClass("wcp-move-multiple")){if(t(".wp-list-table input:checked").length){var s="";t(".wp-list-table input:checked").each(function(){s+=t(this).val()+","}),l=t.trim(t("#wcp_folder_"+a).data("nonce")),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(I(),F()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}}else if(o.draggable.hasClass("wcp-move-file")){var i=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce")),s=i+",",t(".wp-list-table input:checked").each(function(){t(this).val()!=i&&(s+=t(this).val()+",")}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){"1"==(e=jQuery.parseJSON(e)).status?(I(),F()):(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(e.message),t("#error-folder-popup").show())}})}else if(o.draggable.hasClass("attachment")){s=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce")),t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length>1&&(s="",t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").each(function(){s+=t(this).data("id")+","})),c=s,jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}}})}),t(".media-frame:not(.hide-router) .attachments-browser li.attachment").livequery(function(){t(this).draggable({revert:"invalid",containment:"document",helper:function(e,o){t(".selected-items").remove();var a=t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length;return t("<div class='selected-items'><span class='total-post-count'>"+(a=0==a||1==a?"1 Item":a+" Items")+" Selected</span></div>")},start:function(e,o){t("body").addClass("no-hover-css")},cursor:"move",appendTo:".media-modal",cursorAt:{left:0,top:0},stop:function(e,o){t(".selected-items").remove(),t("body").removeClass("no-hover-css")}})}),t(".un-categorised-items").livequery(function(){t(this).droppable({accept:".wcp-move-file, .wcp-move-multiple, .media-frame:not(.hide-router) .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(e,o){if(a=-1,l=folders_media_options.nonce,o.draggable.hasClass("wcp-move-multiple")){if(t(".wp-list-table input:checked").length){var s="";t(".wp-list-table input:checked").each(function(){s+=t(this).val()+","}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}}else if(o.draggable.hasClass("wcp-move-file")){var i=o.draggable[0].attributes["data-id"].nodeValue;s=i+",";t(".wp-list-table input:checked").each(function(){i!=t(this).val()&&(s+=t(this).val()+",")}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}else if(o.draggable.hasClass("attachment")){s=o.draggable[0].attributes["data-id"].nodeValue;t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length>1&&(s="",t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").each(function(){s+=t(this).data("id")+","})),c=s,jQuery.ajax({url:folders_media_options.ajax_url,data:"post_id="+s+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}}})}),t(".tree-structure .folder-item").livequery(function(){t(this).droppable({accept:".wcp-move-file, .wcp-move-multiple, .media-frame:not(.hide-router) .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(e,o){if(t("body").removeClass("no-hover-css"),a=t(this).data("id"),o.draggable.hasClass("wcp-move-multiple")){if(l=t.trim(t("#wcp_folder_"+a).data("nonce")),t(".wp-list-table input:checked").length){var s="";t(".wp-list-table input:checked").each(function(){s+=t(this).val()+","}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}}else if(o.draggable.hasClass("wcp-move-file")){var i=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce"));s=i+",";t(".wp-list-table input:checked").each(function(){t(this).val()!=i&&(s+=t(this).val()+",")}),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}else if(o.draggable.hasClass("attachment")){s=o.draggable[0].attributes["data-id"].nodeValue;l=t.trim(t("#wcp_folder_"+a).data("nonce")),t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length>1&&(s="",t(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").each(function(){s+=t(this).data("id")+","})),jQuery.ajax({url:folders_media_options.ajax_url,data:"post_ids="+s+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+a+"&nonce="+l+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+n,method:"post",success:function(e){I(),F()}})}}})}),t(".wcp-move-file").livequery(function(){t(this).draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(e,o){t(this).closest("td").addClass("wcp-draggable"),t("body").addClass("no-hover-css")},stop:function(e,o){t(this).closest("td").removeClass("wcp-draggable"),t("body").removeClass("no-hover-css")}})}),t(".wcp-move-multiple").livequery(function(){t(this).draggable({revert:"invalid",containment:"document",helper:function(e,o){t(".selected-items").remove();var a=t("#the-list th input:checked").length;return t(a>0?"<div class='selected-items'><span class='total-post-count'>"+(a=0==a||1==a?"1 Item":a+" Items")+" Selected</span></div>":"<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(e,o){t("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(e,o){t(".selected-items").remove(),t("body").removeClass("no-hover-css")}})}),t(document).on("click",".nav-icon",function(){a=t(this).closest("li.route").data("folder-id");var e=1;e=t("#wcp_folder_"+a).hasClass("active")?0:1,t(".form-loader-count").css("width","100%"),l=t.trim(t("#wcp_folder_"+a).data("nonce")),D(),jQuery.ajax({url:folders_media_options.ajax_url,data:"is_active="+e+"&action=save_wcp_folder_state&term_id="+a+"&nonce="+l,method:"post",success:function(o){t(".form-loader-count").css("width","0"),"0"==(o=jQuery.parseJSON(o)).status?(t(".folder-popup-form").hide(),t(".folder-popup-form").removeClass("disabled"),t("#error-folder-popup-message").html(o.message),t("#error-folder-popup").show()):(t("#wcp_folder_"+a).hasClass("active")?(t("#wcp_folder_"+a).removeClass("active"),t("#wcp_folder_"+a).find("ul.ui-sortable:first-child > li").slideUp(),e=0):(t("#wcp_folder_"+a).addClass("active"),t("#wcp_folder_"+a).find("ul.ui-sortable:first-child > li").slideDown(),e=1),F())}})}),t(document).on("keyup","#folder-search",function(){N()}),t(document).on("change","#folder-search",function(){N()}),t(document).on("blur","#folder-search",function(){N()}),t(document).on("click","#folder-hide-show-checkbox",function(){t(this).is(":checked")?t("#custom-menu").addClass("show-folder-checkbox"):(t("#custom-menu input.checkbox").attr("checked",!1),t("#custom-menu").removeClass("show-folder-checkbox"))}),t(document).on("click","#inline-remove",function(){t("#custom-menu li.active-item").length?(s=t("#custom-menu li.active-item").data("folder-id"),P(1),t(".dynamic-menu").remove(),t(".active-menu").removeClass("active-menu")):t("#folder-hide-show-checkbox").is(":checked")&&(t(".dynamic-menu").remove(),P(1))})})}(jQuery,_);
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.5.4
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
@@ -30,7 +30,7 @@ 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.5.4");
34
  }
35
 
36
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.5.5
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.5.5");
34
  }
35
 
36
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
includes/folders.class.php CHANGED
@@ -924,103 +924,107 @@ class WCP_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()) {
928
- /* Free/Pro URL Change */
929
- global $typenow;
930
- $is_active = 1;
931
- $folders = -1;
932
- if (!self::check_has_valid_key()) {
933
- $is_active = 0;
934
- $folders = self::ttl_fldrs();
935
- }
 
936
 
937
- /* Free/Pro URL Change */
938
 
939
- $is_rtl = 0;
940
- if (function_exists('is_rtl') && is_rtl()) {
941
- $is_rtl = 1;
942
- }
943
- $can_manage_folder = current_user_can("manage_categories") ? 1 : 0;
944
- $width = 275;
945
- $taxonomy_status = 0;
946
- $selected_taxonomy = "";
947
- $show_in_page = false;
948
- $admin_url = admin_url("upload.php?post_type=attachment&media_folder=");
949
-
950
- wp_enqueue_script('folders-livequery', plugin_dir_url(dirname(__FILE__)) . 'assets/js/livequery.min.js', array(), WCP_FOLDER_VERSION);
951
- wp_enqueue_script('folders-media', WCP_FOLDER_URL . 'assets/js/page-post-media.min.js', array('media-editor', 'media-views', 'jquery', 'jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'backbone'), WCP_FOLDER_VERSION, true);
952
- wp_localize_script('folders-media', 'folders_media_options', array(
953
- 'terms' => self::get_terms_hierarchical('media_folder'),
954
- 'taxonomy' => get_taxonomy('media_folder'),
955
- 'ajax_url' => admin_url("admin-ajax.php"),
956
- 'media_page_url' => admin_url("upload.php"),
957
- 'activate_url' => admin_url("admin.php?page=wcp_folders_register"),
958
- 'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
959
- 'is_key_active' => $is_active,
960
- 'folders' => $folders,
961
- 'upgrade_url' => admin_url('admin.php?page=wcp_folders_upgrade'),
962
- 'post_type' => 'attachment',
963
- 'page_url' => $admin_url,
964
- 'current_url' => "",
965
- 'ajax_image' => plugin_dir_url(dirname(__FILE__)) . "assets/images/ajax-loader.gif",
966
- 'register_url' => "",
967
- 'isRTL' => $is_rtl,
968
- 'can_manage_folder' => $can_manage_folder,
969
- 'folder_width' => $width,
970
- 'taxonomy_status' => $taxonomy_status,
971
- 'selected_taxonomy' => $selected_taxonomy,
972
- 'show_in_page' => $show_in_page,
973
- 'svg_file' => WCP_FOLDER_URL . 'assets/images/pin.png',
974
- ));
975
- /* Free/Pro URL Change */
976
- wp_enqueue_style('folders-media', WCP_FOLDER_URL . 'assets/css/page-post-media.min.css', array(), WCP_FOLDER_VERSION);
977
- wp_enqueue_style('folder-icon', WCP_FOLDER_URL . 'assets/css/folder-icon.css', array(), WCP_FOLDER_VERSION);
978
- $width = 275;
979
- $width = $width - 40;
980
- $string = "";
981
- $css_text = "";
982
- for ($i = 0; $i <= 15; $i++) {
983
- $string .= " .space > .route >";
984
- $new_width = $width - (13 + (20 * $i));
985
- $css_text .= "#custom-menu > {$string} .title { width: {$new_width}px !important; } ";
986
- $css_text .= "#custom-menu > {$string} .dynamic-menu { left: ".($new_width - 190)."px !important; } ";
987
- }
988
- $customize_folders = get_option('customize_folders');
989
- if(isset($customize_folders['new_folder_color']) && !empty($customize_folders['new_folder_color'])) {
990
- $css_text .= ".media-frame a.add-new-folder { background-color: ".esc_attr($customize_folders['new_folder_color']) ."; border-color: ".esc_attr($customize_folders['new_folder_color'])."}";
991
- $css_text .= ".wcp-hide-show-buttons .toggle-buttons { background-color: ".esc_attr($customize_folders['new_folder_color'])."; }";
992
- $css_text .= ".folders-toggle-button span { background-color: ".esc_attr($customize_folders['new_folder_color'])."; }";
993
- $css_text .= ".ui-resizable-handle.ui-resizable-e:before, .ui-resizable-handle.ui-resizable-w:before {border-color: ".esc_attr($customize_folders['new_folder_color'])." !important}";
994
- }
995
- if(isset($customize_folders['folder_bg_color']) && !empty($customize_folders['folder_bg_color'])) {
996
- $rgbColor = self::hexToRgb($customize_folders['folder_bg_color']);
997
- $css_text .= ".orange-bg > span ,.wcp-container .route.active-item > h3.title, .header-posts a.active-item, .un-categorised-items.active-item { background-color: ".esc_attr($customize_folders['folder_bg_color'])." !important; color: #ffffff; }";
998
- $css_text .= "body:not(.no-hover-css) .wcp-container .route .title:hover, .header-posts a:hover, .un-categorised-items.active-item, .un-categorised-items:hover {background: rgba(".esc_attr($rgbColor['r'].",".$rgbColor['g'].",".$rgbColor['b'].", 0.08").");}";
999
- $css_text .= ".wcp-drop-hover {background-color: ".esc_attr($customize_folders['folder_bg_color'])." !important; color: #ffffff; }";
1000
- $css_text .= "#custom-menu .route .nav-icon .wcp-icon {color: ".esc_attr($customize_folders['folder_bg_color'])." !important;}";
1001
- }
1002
- if(isset($customize_folders['bulk_organize_button_color']) && !empty($customize_folders['bulk_organize_button_color'])) {
1003
- $css_text .= "button.button.organize-button { background-color: ".esc_attr($customize_folders['bulk_organize_button_color'])."; border-color: ".esc_attr($customize_folders['bulk_organize_button_color'])."; }";
1004
- $css_text .= "button.button.organize-button:hover { background-color: ".esc_attr($customize_folders['bulk_organize_button_color'])."; border-color: ".esc_attr($customize_folders['bulk_organize_button_color'])."; }";
1005
- }
1006
- $font_family = "";
1007
- if(isset($customize_folders['folder_font']) && !empty($customize_folders['folder_font'])) {
1008
- $folder_fonts = self::get_font_list();
1009
- $font_family = $customize_folders['folder_font'];
1010
- if(isset($folder_fonts[$font_family])) {
1011
- $css_text .= ".wcp-container, .folder-popup-form { font-family: " . esc_attr($font_family) . " !important; }";
1012
  }
1013
- if($folder_fonts[$font_family] == "Default") {
1014
- $font_family = "";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1015
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1016
  }
1017
- if(isset($customize_folders['folder_size']) && !empty($customize_folders['folder_size'])) {
1018
- $css_text .= ".wcp-container .route span.title-text, .header-posts a, .un-categorised-items a { font-size: ".esc_attr($customize_folders['folder_size'])."px; }";
1019
- }
1020
- if (!empty($font_family)) {
1021
- wp_enqueue_style('custom-google-fonts', 'https://fonts.googleapis.com/css?family=' . urlencode($font_family), false);
1022
- }
1023
- wp_add_inline_style('folders-media', $css_text);
1024
  }
1025
  }
1026
 
@@ -1299,7 +1303,7 @@ class WCP_Folders
1299
  </tr>
1300
  <tr>
1301
  <th>Message</th>
1302
- <td><?php echo esc_attr(nl2br($text_message)) ?></td>
1303
  </tr>
1304
  </table>
1305
  <?php
@@ -1380,7 +1384,7 @@ class WCP_Folders
1380
  </tr>
1381
  <tr>
1382
  <th>Comment</th>
1383
- <td><?php echo esc_attr(nl2br($reason)) ?></td>
1384
  </tr>
1385
  <tr>
1386
  <th>WordPress Version</th>
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()) {
934
+ $is_active = 0;
935
+ $folders = self::ttl_fldrs();
936
+ }
937
 
938
+ /* Free/Pro URL Change */
939
 
940
+ $is_rtl = 0;
941
+ if (function_exists('is_rtl') && is_rtl()) {
942
+ $is_rtl = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
943
  }
944
+ $can_manage_folder = current_user_can("manage_categories") ? 1 : 0;
945
+ $width = 275;
946
+ $taxonomy_status = 0;
947
+ $selected_taxonomy = "";
948
+ $show_in_page = false;
949
+ $admin_url = admin_url("upload.php?post_type=attachment&media_folder=");
950
+
951
+ wp_enqueue_script('folders-livequery', plugin_dir_url(dirname(__FILE__)) . 'assets/js/livequery.min.js', array(), WCP_FOLDER_VERSION);
952
+ wp_enqueue_script('folders-media', WCP_FOLDER_URL . 'assets/js/page-post-media.min.js', array('media-editor', 'media-views', 'jquery', 'jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'backbone'), WCP_FOLDER_VERSION, true);
953
+ wp_localize_script('folders-media', 'folders_media_options', array(
954
+ 'terms' => self::get_terms_hierarchical('media_folder'),
955
+ 'taxonomy' => get_taxonomy('media_folder'),
956
+ 'ajax_url' => admin_url("admin-ajax.php"),
957
+ 'media_page_url' => admin_url("upload.php"),
958
+ 'activate_url' => admin_url("admin.php?page=wcp_folders_register"),
959
+ 'nonce' => wp_create_nonce('wcp_folder_nonce_attachment'),
960
+ 'is_key_active' => $is_active,
961
+ 'folders' => $folders,
962
+ 'upgrade_url' => admin_url('admin.php?page=wcp_folders_upgrade'),
963
+ 'post_type' => 'attachment',
964
+ 'page_url' => $admin_url,
965
+ 'current_url' => "",
966
+ 'ajax_image' => plugin_dir_url(dirname(__FILE__)) . "assets/images/ajax-loader.gif",
967
+ 'register_url' => "",
968
+ 'isRTL' => $is_rtl,
969
+ 'can_manage_folder' => $can_manage_folder,
970
+ 'folder_width' => $width,
971
+ 'taxonomy_status' => $taxonomy_status,
972
+ 'selected_taxonomy' => $selected_taxonomy,
973
+ 'show_in_page' => $show_in_page,
974
+ 'svg_file' => WCP_FOLDER_URL . 'assets/images/pin.png',
975
+ ));
976
+ /* Free/Pro URL Change */
977
+ wp_enqueue_style('folders-media', WCP_FOLDER_URL . 'assets/css/page-post-media.min.css', array(), WCP_FOLDER_VERSION);
978
+ wp_enqueue_style('folder-icon', WCP_FOLDER_URL . 'assets/css/folder-icon.css', array(), WCP_FOLDER_VERSION);
979
+ $width = 275;
980
+ $width = $width - 40;
981
+ $string = "";
982
+ $css_text = "";
983
+ for ($i = 0; $i <= 15; $i++) {
984
+ $string .= " .space > .route >";
985
+ $new_width = $width - (13 + (20 * $i));
986
+ $css_text .= "#custom-menu > {$string} .title { width: {$new_width}px !important; } ";
987
+ $css_text .= "#custom-menu > {$string} .dynamic-menu { left: " . ($new_width - 190) . "px !important; } ";
988
  }
989
+ $css_text .= '.ui-state-highlight { background: transparent; border: dashed 1px #0073AA; width:150px; height: 25px !important; }';
990
+ $customize_folders = get_option('customize_folders');
991
+ if (isset($customize_folders['new_folder_color']) && !empty($customize_folders['new_folder_color'])) {
992
+ $css_text .= ".media-frame a.add-new-folder { background-color: " . esc_attr($customize_folders['new_folder_color']) . "; border-color: " . esc_attr($customize_folders['new_folder_color']) . "}";
993
+ $css_text .= ".wcp-hide-show-buttons .toggle-buttons {background-color: " . esc_attr($customize_folders['new_folder_color']) . "; }";
994
+ $css_text .= ".folders-toggle-button span { background-color: " . esc_attr($customize_folders['new_folder_color']) . "; }";
995
+ $css_text .= ".ui-resizable-handle.ui-resizable-e:before, .ui-resizable-handle.ui-resizable-w:before {border-color: " . esc_attr($customize_folders['new_folder_color']) . " !important}";
996
+ }
997
+ if (isset($customize_folders['folder_bg_color']) && !empty($customize_folders['folder_bg_color'])) {
998
+ $rgbColor = self::hexToRgb($customize_folders['folder_bg_color']);
999
+ $css_text .= ".orange-bg > span ,.wcp-container .route.active-item > h3.title, .header-posts a.active-item, .un-categorised-items.active-item { background-color: " . esc_attr($customize_folders['folder_bg_color']) . " !important; color: #ffffff; }";
1000
+ $css_text .= "body:not(.no-hover-css) .wcp-container .route .title:hover, .header-posts a:hover, .un-categorised-items.active-item, .un-categorised-items:hover {background: rgba(" . esc_attr($rgbColor['r'] . "," . $rgbColor['g'] . "," . $rgbColor['b'] . ", 0.08") . ");}";
1001
+ $css_text .= ".wcp-drop-hover {background-color: " . esc_attr($customize_folders['folder_bg_color']) . " !important; color: #ffffff; }";
1002
+ $css_text .= "#custom-menu .route .nav-icon .wcp-icon {color: " . esc_attr($customize_folders['folder_bg_color']) . " !important;}";
1003
+ $css_text .= ".ui-state-highlight { border-color: " . esc_attr($customize_folders['folder_bg_color']) . " !important;background: rgba(" . esc_attr($rgbColor['r'] . "," . $rgbColor['g'] . "," . $rgbColor['b'] . ", 0.08") . "}";
1004
+ }
1005
+ if (isset($customize_folders['bulk_organize_button_color']) && !empty($customize_folders['bulk_organize_button_color'])) {
1006
+ $css_text .= "button.button.organize-button { background-color: " . esc_attr($customize_folders['bulk_organize_button_color']) . "; border-color: " . esc_attr($customize_folders['bulk_organize_button_color']) . "; }";
1007
+ $css_text .= "button.button.organize-button:hover { background-color: " . esc_attr($customize_folders['bulk_organize_button_color']) . "; border-color: " . esc_attr($customize_folders['bulk_organize_button_color']) . "; }";
1008
+ }
1009
+ $font_family = "";
1010
+ if (isset($customize_folders['folder_font']) && !empty($customize_folders['folder_font'])) {
1011
+ $folder_fonts = self::get_font_list();
1012
+ $font_family = $customize_folders['folder_font'];
1013
+ if (isset($folder_fonts[$font_family])) {
1014
+ $css_text .= ".wcp-container, .folder-popup-form { font-family: " . esc_attr($font_family) . " !important; }";
1015
+ }
1016
+ if ($folder_fonts[$font_family] == "Default") {
1017
+ $font_family = "";
1018
+ }
1019
+ }
1020
+ if (isset($customize_folders['folder_size']) && !empty($customize_folders['folder_size'])) {
1021
+ $css_text .= ".wcp-container .route span.title-text, .header-posts a, .un-categorised-items a { font-size: " . esc_attr($customize_folders['folder_size']) . "px; }";
1022
+ }
1023
+ if (!empty($font_family)) {
1024
+ wp_enqueue_style('custom-google-fonts', 'https://fonts.googleapis.com/css?family=' . urlencode($font_family), false);
1025
+ }
1026
+ wp_add_inline_style('folders-media', $css_text);
1027
  }
 
 
 
 
 
 
 
1028
  }
1029
  }
1030
 
1303
  </tr>
1304
  <tr>
1305
  <th>Message</th>
1306
+ <td><?php echo nl2br($text_message) ?></td>
1307
  </tr>
1308
  </table>
1309
  <?php
1384
  </tr>
1385
  <tr>
1386
  <th>Comment</th>
1387
+ <td><?php echo nl2br($reason) ?></td>
1388
  </tr>
1389
  <tr>
1390
  <th>WordPress Version</th>
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.5
6
- Stable tag: 2.5.4
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
@@ -162,6 +162,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
162
 
163
  == Changelog ==
164
 
 
 
 
165
  = 2.5.4 =
166
  Divi bug fixed
167
 
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.5
6
+ Stable tag: 2.5.5
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
162
 
163
  == Changelog ==
164
 
165
+ = 2.5.5 =
166
+ Various bugs were fixed after our last major release
167
+
168
  = 2.5.4 =
169
  Divi bug fixed
170
 
templates/admin/admin-content.php CHANGED
@@ -2,18 +2,13 @@
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
  ?>
4
  <style>
5
- .ui-state-highlight {
6
- background: transparent;
7
- border: dashed 1px #0073AA;
8
- width:150px;
9
- height: 25px !important;
10
- }
11
  <?php
12
  $string = "";
13
  global $typenow;
14
  $width = get_option("wcp_dynamic_width_for_" . $typenow);
15
  if($width == null || empty($width)) {
16
- $width = 315;
17
  }
18
  $width = $width - 40;
19
  $customize_folders = get_option('customize_folders');
@@ -36,6 +31,12 @@ if ( ! defined( 'ABSPATH' ) ) exit;
36
 
37
  </div>
38
  <style>
 
 
 
 
 
 
39
  <?php
40
  if(isset($customize_folders['new_folder_color']) && !empty($customize_folders['new_folder_color'])) {
41
  ?>
@@ -53,6 +54,7 @@ if(isset($customize_folders['folder_bg_color']) && !empty($customize_folders['fo
53
  .wcp-drop-hover {
54
  background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;
55
  }
 
56
  #custom-menu .route .nav-icon .wcp-icon {color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;}
57
  <?php
58
  }
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
  ?>
4
  <style>
5
+
 
 
 
 
 
6
  <?php
7
  $string = "";
8
  global $typenow;
9
  $width = get_option("wcp_dynamic_width_for_" . $typenow);
10
  if($width == null || empty($width)) {
11
+ $width = 280;
12
  }
13
  $width = $width - 40;
14
  $customize_folders = get_option('customize_folders');
31
 
32
  </div>
33
  <style>
34
+ .ui-state-highlight {
35
+ background: transparent;
36
+ border: dashed 1px #0073AA;
37
+ width:150px;
38
+ height: 25px !important;
39
+ }
40
  <?php
41
  if(isset($customize_folders['new_folder_color']) && !empty($customize_folders['new_folder_color'])) {
42
  ?>
54
  .wcp-drop-hover {
55
  background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;
56
  }
57
+ .ui-state-highlight { border-color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; background: rgba(<?php echo esc_attr($rgbColor['r'].",".$rgbColor['g'].",".$rgbColor['b'].", 0.08") ?> !important;}
58
  #custom-menu .route .nav-icon .wcp-icon {color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;}
59
  <?php
60
  }