PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / trunk
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager vtrunk
3.1.9 3.1.8 3.1.7 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 trunk 1.3.7 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9 2.9.1 2.9.2
folders / templates / admin / admin-content.php
folders / templates / admin Last commit date
settings-tabs 10 months ago admin-content.php 7 months ago email-signup.php 10 months ago folder-deactivate-form.php 10 months ago folder-popup.php 1 year ago general-settings.php 10 months ago help.php 2 months ago media-cleaning.php 1 year ago media-replace.php 9 months ago modals.php 9 months ago recommended-plugins.php 1 year ago update.php 10 months ago upgrade-table.php 1 year ago upgrade-to-pro.php 1 year ago
admin-content.php
346 lines
1 <?php
2 /**
3 * Admin form folder settings
4 *
5 * @author : Premio <contact@premio.io>
6 * @license : GPL2
7 * */
8
9 if (! defined('ABSPATH')) {
10 exit;
11 }
12
13 ?>
14 <style>
15 <?php
16 $string = "";
17 global $typenow;
18 $width = get_option("wcp_dynamic_width_for_".$typenow);
19 $width = intval($width);
20 if ($width == null || empty($width) || $width > 1200) {
21 $width = 280;
22 }
23
24 $width = ($width - 40);
25 $customize_folders = get_option('customize_folders');
26 $customize_folders = (empty($customize_folders)||!is_array($customize_folders))?[]:$customize_folders;
27 ?>
28 </style>
29 <style>
30 <?php
31 $font_family = "";
32 if (isset($customize_folders['folder_font']) && !empty($customize_folders['folder_font'])) {
33 $font_family = $customize_folders['folder_font'];
34 $folder_fonts = self::get_font_list();
35 if (isset($folder_fonts[$font_family])) {
36 if ($font_family == "System Stack") {
37 $font_family = "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif";
38 }
39 ?>
40 .wcp-container, .folder-popup-form, .dynamic-menu { font-family: <?php echo esc_attr($font_family) ?>; }
41 <?php
42 }
43
44 if ($font_family == "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif") {
45 $font_family = "System Stack";
46 }
47
48 if ($folder_fonts[$font_family] == "Default") {
49 $font_family = "";
50 }
51 }
52
53 if (!isset($customize_folders['new_folder_color']) || empty($customize_folders['new_folder_color'])) {
54 $customize_folders['new_folder_color'] = "#f51366";
55 }
56 if (!isset($customize_folders['default_icon_color']) || empty($customize_folders['default_icon_color'])) {
57 $customize_folders['default_icon_color'] = "#334155";
58 }
59 ?>
60 .add-new-folder { background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>; border-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?> }
61 .wcp-hide-show-buttons .toggle-buttons { background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>; }
62 .folders-toggle-button span { background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>; }
63 .ui-resizable-handle.ui-resizable-e:before, .ui-resizable-handle.ui-resizable-w:before {border-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>;}
64 <?php if (!isset($customize_folders['bulk_organize_button_color']) || empty($customize_folders['bulk_organize_button_color'])) {
65 $customize_folders['bulk_organize_button_color'] = "#f51366";
66 } ?>
67
68
69 /* Folders Downlaod Pogress */
70
71 .folder-rounded-progress svg circle {
72 stroke: <?php echo esc_attr($customize_folders['new_folder_color']) ?> !important;
73 }
74 .folder-rounded-progress svg path,
75 .folders-file-icon svg path {
76 stroke: <?php echo esc_attr($customize_folders['new_folder_color']) ?> !important;
77 }
78 .folders-progress-completed {
79 background: linear-gradient(90deg, <?php echo esc_attr($customize_folders['new_folder_color']) ?> 0%, <?php echo esc_attr($customize_folders['new_folder_color']) ?> 100%) !important;
80 }
81 .folders-progress-uploading {
82 background: linear-gradient(90deg, <?php echo esc_attr($customize_folders['new_folder_color']) ?> 0%, <?php echo esc_attr($customize_folders['new_folder_color']) ?> 100%) !important;
83 }
84 .folders-status-completed {
85 color: <?php echo esc_attr($customize_folders['new_folder_color']) ?> !important;
86 }
87 .folders-file-name-clickable:hover {
88 color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>;
89 }
90 .folders-upload-close:hover {
91 background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>30 !important;
92 }
93 /* Folders Downlaod Pogress */
94
95
96 button.button.organize-button { background-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; border-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; }
97 button.button.organize-button:hover { background-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; border-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; }
98 <?php if (!isset($customize_folders['folder_bg_color']) || empty($customize_folders['folder_bg_color'])) {
99 $customize_folders['folder_bg_color'] = "#f51366";
100 }
101
102 $rgbColor = self::hexToRgb($customize_folders['folder_bg_color']); ?>
103 body:not(.no-hover-css) #custom-scroll-menu .jstree-hovered:not(.jstree-clicked), body:not(.no-hover-css) #custom-scroll-menu .jstree-hovered:not(.jstree-clicked):hover, .dynamic-menu a.active, .dynamic-menu a:hover, .folder-setting-menu li a:hover { background: rgba(<?php echo esc_attr($rgbColor['r'].",".$rgbColor['g'].",".$rgbColor['b'].", 0.08") ?>) !important; color: #333333;}
104 .dynamic-menu li.color-folder:hover { background: rgba(<?php echo esc_attr($rgbColor['r'].",".$rgbColor['g'].",".$rgbColor['b'].", 0.08") ?>) !important; }
105 body:not(.no-hover-css) .dynamic-menu li.color-folder a:hover { background: transparent !important; }
106
107 body:not(.no-hover-css) #custom-scroll-menu .jstree-clicked, body:not(.no-hover-css) #custom-scroll-menu .jstree-clicked:not(.jstree-clicked):focus, #custom-scroll-menu .jstree-clicked, #custom-scroll-menu .jstree-clicked:hover { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff !important; }
108 body:not(.no-hover-css) #custom-scroll-menu .jstree-clicked .folder-actions { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff !important; }
109 #custom-scroll-menu .jstree-hovered.wcp-drop-hover, #custom-scroll-menu .jstree-hovered.wcp-drop-hover:hover, #custom-scroll-menu .jstree-clicked.wcp-drop-hover, #custom-scroll-menu .jstree-clicked.wcp-drop-hover:hover, body #custom-scroll-menu *.drag-in > a:hover { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff !important; }
110 .pfolder-folder-close {color: <?php echo esc_attr($customize_folders['default_icon_color']) ?>}
111 .drag-bot > a {
112 border-bottom: solid 2px <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
113 }
114 .drag-up > a {
115 border-top: solid 2px <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
116 }
117 #custom-scroll-menu .jstree-hovered:not(.jstree-clicked) .pfolder-folder-close {
118 color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
119 }
120 .folders-action-menu > ul > li > a:not(.disabled):hover, .folders-action-menu > ul > li > label:not(.disabled):hover {
121 color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
122 }
123 .dynamic-menu a.active span i, .dynamic-menu a:hover span i, .dynamic-menu a.active span.dashicons, .dynamic-menu a:hover span.dashicons { color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> }
124 body:not(.no-hover-css) #custom-scroll-menu *.drag-in > a.jstree-hovered, body:not(.no-hover-css) #custom-scroll-menu *.drag-in > a.jstree-hovered:hover {
125 background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;
126 color: #fff !important;
127 }
128 .custom-scroll-menu.hor-scroll .horizontal-scroll-menu .jstree-clicked .folder-actions { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff !important; }
129 #custom-scroll-menu .jstree-hovered.wcp-drop-hover, #custom-scroll-menu .jstree-hovered.wcp-drop-hover:hover, #custom-scroll-menu .jstree-clicked.wcp-drop-hover, #custom-scroll-menu .jstree-clicked.wcp-drop-hover:hover, body #custom-scroll-menu *.drag-in > a:hover { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff !important; }
130 body:not(.no-hover-css) #custom-scroll-menu *.drag-in > a.jstree-hovered .pfolder-folder-close, body:not(.no-hover-css) #custom-scroll-menu *.drag-in > a.jstree-hovered:hover .pfolder-folder-close {
131 color: #fff !important;
132 }
133 .orange-bg > span ,.wcp-container .route.active-item > h3.title, .header-posts a.active-item, .un-categorised-items.active-item, .sticky-folders ul li a.active-item { background-color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff; }
134 body:not(.no-hover-css) .wcp-container .route .title:hover, body:not(.no-hover-css) .header-posts a:hover, body:not(.no-hover-css) .un-categorised-items:hover, body:not(.no-hover-css) .sticky-folders ul li a:hover {background: rgba(<?php echo esc_attr($rgbColor['r'].",".$rgbColor['g'].",".$rgbColor['b'].", 0.08") ?>);}
135 .wcp-drop-hover {
136 background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;
137 }
138 #custom-menu .route .nav-icon .wcp-icon {color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;}
139 .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; }
140 .os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; }
141 .jstree-node.drag-in > a.jstree-anchor.jstree-hovered { background-color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff; }
142 <?php
143
144 if (isset($customize_folders['folder_size']) && !empty($customize_folders['folder_size'])) {
145 if ($customize_folders['folder_size'] == "custom") {
146 $customize_folders['folder_size'] = ! isset($customize_folders['folder_custom_font_size']) || empty($customize_folders['folder_custom_font_size']) ? "16" : $customize_folders['folder_custom_font_size'];
147 }
148 ?>
149 .wcp-container .route span.title-text, .header-posts a, .un-categorised-items a, .sticky-title, .sticky-folders > ul > li > a, .jstree-default .jstree-anchor { font-size: <?php echo esc_attr($customize_folders['folder_size']) ?>px; }
150 <?php
151 }
152 ?>
153 </style>
154 <?php if (!empty($font_family)) {
155 wp_enqueue_style('custom-google-fonts', 'https://fonts.googleapis.com/css?family='.urlencode($font_family), false, WCP_FOLDER_VERSION);
156 } ?>
157 <div id="media-css">
158
159 </div>
160 <?php
161 $optionName = $typenow."_parent_status";
162 $status = get_option($optionName);
163 global $typenow;
164 $title = ucfirst($typenow);
165 if ($typenow == "page") {
166 $title = "Pages";
167 } else if ($typenow == "post") {
168 $title = "Posts";
169 } else if ($typenow == "attachment") {
170 $title = "Files";
171 } else {
172 $post_type = $typenow;
173 $post_types = get_post_types([ "name" => $post_type], 'objects');
174 if (!empty($post_types) && is_array($post_types) && isset($post_types[$post_type]) && isset($post_types[$post_type]->label)) {
175 $title = $post_types[$post_type]->label;
176 }
177 }
178
179 $display_status = "wcp_dynamic_display_status_".$typenow;
180 $display_status = get_option($display_status);
181 $class_name = isset($display_status) && $display_status == "hide" ? "hide-folders-area" : "";
182 $active_class = (isset($display_status) && $display_status == "hide") ? "" : "active";
183 $active_class_2 = (isset($display_status) && $display_status == "hide") ? "active" : "";
184
185 // Do not change here, Free/Pro Class name
186 $post_type = WCP_Folders::get_custom_post_type($typenow);
187 $active = "";
188 $active_all_class = "";
189 if (!empty($post_type)) {
190 $activeItem = filter_input(INPUT_POST, $post_type);
191 if (empty($activeItem)) {
192 $activeItem = filter_input(INPUT_GET, $post_type);
193 }
194
195 if ($activeItem == -1) {
196 $active = "active-item";
197 }
198
199 if (empty($activeItem) || $activeItem == "") {
200 $active_all_class = "active-item";
201 }
202 }
203 $horClass = (!isset($customize_folders['enable_horizontal_scroll']) || $customize_folders['enable_horizontal_scroll'] == "on") ? "hor-scroll" : "";
204 ?>
205 <div id="wcp-content" class="<?php echo esc_attr(isset($display_status) && $display_status == "hide" ? "hide-folders-area" : "") ?>" >
206 <div id="wcp-content-resize">
207 <div class="wcp-content">
208 <div class="wcp-hide-show-buttons">
209 <div class="toggle-buttons hide-folders <?php echo esc_attr($active_class) ?>"><span class="dashicons dashicons-arrow-left"></span></div>
210 <div class="toggle-buttons show-folders <?php echo esc_attr($active_class_2) ?>"><span class="dashicons dashicons-arrow-right"></span></div>
211 </div>
212 <div class='wcp-container'>
213 <div class="sticky-wcp-custom-form">
214 <?php echo ($form_html) ?>
215 <div class="top-settings">
216 <div class="folder-search-form">
217 <div class="form-search-input">
218 <input type="text" value="" id="folder-search" autocomplete="off" />
219 <span><i class="pfolder-search"></i></span>
220 </div>
221 </div>
222 <div class="folder-separator"></div>
223 <div class="header-posts">
224 <a href="#" class="all-posts <?php echo esc_attr($active_all_class) ?>"><?php echo esc_attr("All ".$title); ?> <span class="total-count"><?php echo esc_attr($ttpsts) ?></span></a>
225 </div>
226 <div class="un-categorised-items <?php echo esc_attr($active) ?>">
227 <a href="#" class="un-categorized-posts"><?php echo esc_attr("Unassigned ".$title); ?> <span class="total-count total-empty"><?php echo esc_attr($ttemp) ?></span> </a>
228 </div>
229 <div class="folder-separator-2"></div>
230 <div class="folders-action-menu">
231 <ul>
232 <li style="align-items: center; justify-content: center; vertical-align: middle; display: flex;"> <span class="no-bg full-width"><input type="checkbox" id="menu-checkbox" ></span></li>
233 <li class="folder-inline-tooltip">
234 <a class="full-width upload-media-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>">
235 <span class="inline-tooltip"><?php esc_html_e("Uploading folder is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
236 <span class="dashicons dashicons-cloud-upload"></span>
237 </a>
238 </li>
239 <li class="folder-inline-tooltip cut-folder-action">
240 <a class="full cut-folder-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
241 <span class="inline-tooltip"><?php esc_html_e("Cut is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
242 <span class="pfolder-cut"></span>
243 </a>
244 </li>
245 <li class="folder-inline-tooltip cut-folder-action">
246 <a class="full copy-folder-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
247 <span class="inline-tooltip"><?php esc_html_e("Copy is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
248 <span class="pfolder-copy"></span>
249 </a>
250 </li>
251 <li class="folder-inline-tooltip cut-folder-action">
252 <a class="paste-folder-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
253 <span class="inline-tooltip"><?php esc_html_e("Paste is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
254 <span class="pfolder-paste"></span>
255 </a>
256 </li>
257 <li class="folder-inline-tooltip">
258 <a class="lock-unlock-all-folders open-folders disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
259 <span class="inline-tooltip"><?php esc_html_e("Lock/Unlock is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
260 <span class="dashicons dashicons-lock"></span>
261 </a>
262 </li>
263 <!--<li><a class="folder-tooltip undo-folder-action disabled" href="#" data-folder-tooltip="<?php /*esc_html_e("Undo Changes", "folders"); */?>"><span class="pfolder-undo"></span></a></li>-->
264 <li><a class="folder-tooltip delete-folder-action disabled" href="#" data-folder-tooltip="<?php esc_html_e("Delete", "folders"); ?>"><span class="pfolder-remove"></span></a></li>
265 </ul>
266 </div>
267 <div class="folder-separator-2"></div>
268 </div>
269 </div>
270 <div id="custom-scroll-menu" class="custom-scroll-menu <?php echo esc_attr($horClass) ?>">
271 <div class="horizontal-scroll-menu">
272 <div class="ajax-preloader">
273 <div class="cssload-container">
274 <div class="cssload-tube-tunnel"></div>
275 </div>
276 </div>
277 <div class="js-tree-data">
278 <div id="js-tree-menu" class="<?php echo ($status == 1) ? "active" : "" ?>">
279 <ul class='space first-space' id='space_0'>
280 <?php echo ($terms_data); ?>
281 </ul>
282 </div>
283 </div>
284 </div>
285 </div>
286 </div>
287 </div>
288 </div>
289 </div>
290 <?php
291 include_once "modals.php";
292 $hide_folder_color_pop_up = get_option("hide_folder_color_pop_up");
293 if($hide_folder_color_pop_up != "yes" && WCP_FOLDER_VERSION == "3.0") {
294 $customize_folders = get_option("customize_folders");
295 if (isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
296 $setting_url = admin_url("options-general.php?page=wcp_folders_settings&setting_page=customize-folders&focus=icon-color");
297 } else {
298 $setting_url = admin_url("admin.php?page=wcp_folders_settings&setting_page=customize-folders&focus=icon-color");
299 }
300 ?>
301 <div class="folder-popup-form color-popup-options always-show" id="color-pop-up-options" style="display: block">
302 <div class="popup-form-content">
303 <div class="popup-form-data">
304 <div class="close-popup-button">
305 <a class="is-modal" href="#"><span></span></a>
306 </div>
307 <div class="folder-popup-top">
308 <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/color-popup.png") ?>" />
309 </div>
310 <div class="folder-popup-bottom">
311 <div class="folder-color-title">
312 <?php esc_html_e("🎨 Set custom colors to folders icon", "folders") ?>
313 </div>
314 <div class="folder-color-desc">
315 <?php esc_html_e("You can now change the icon color for each folder from the menu and change the default icon color from the Folders settings.", "folders") ?>
316 </div>
317 </div>
318 <div class="folder-form-buttons">
319 <a href="#" class="form-cancel-btn avoid-cancel"><?php esc_html_e("Cancel", "folders") ?></a>
320 <a href="<?php echo esc_url($setting_url) ?>" class="form-submit-btn customize-folder-color"><?php esc_html_e("Customise", "folders") ?></a>
321 </div>
322 </div>
323 </div>
324 <script>
325 jQuery(document).ready(function(){
326 jQuery(document).on("click", ".color-popup-options .form-cancel-btn, .color-popup-options .close-popup-button, #color-pop-up-options", function(e){
327 e.stopPropagation();
328 e.stopImmediatePropagation();
329 jQuery("#color-pop-up-options").hide();
330 jQuery.ajax({
331 url: "<?php echo esc_url(admin_url("admin-ajax.php")) ?>",
332 data: {
333 action: 'hide_folder_color_pop_up',
334 nonce: '<?php echo esc_attr(wp_create_nonce('hide_folder_color_pop_up')) ?>'
335 },
336 type: 'post',
337 success: function(){
338
339 }
340 });
341 });
342 });
343 </script>
344 </div>
345 <?php } ?>
346