PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / 3.0.9
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager v3.0.9
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 1 year ago admin-content.php 1 year ago email-signup.php 1 year ago folder-deactivate-form.php 1 year ago folder-popup.php 1 year ago general-settings.php 1 year ago help.php 1 year ago media-cleaning.php 1 year ago media-replace.php 1 year ago modals.php 1 year ago recommended-plugins.php 1 year ago update.php 1 year ago upgrade-table.php 1 year ago upgrade-to-pro.php 1 year ago
admin-content.php
317 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 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']) ?>; }
68 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']) ?>; }
69 <?php if (!isset($customize_folders['folder_bg_color']) || empty($customize_folders['folder_bg_color'])) {
70 $customize_folders['folder_bg_color'] = "#f51366";
71 }
72
73 $rgbColor = self::hexToRgb($customize_folders['folder_bg_color']); ?>
74 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;}
75 .dynamic-menu li.color-folder:hover { background: rgba(<?php echo esc_attr($rgbColor['r'].",".$rgbColor['g'].",".$rgbColor['b'].", 0.08") ?>) !important; }
76 body:not(.no-hover-css) .dynamic-menu li.color-folder a:hover { background: transparent !important; }
77
78 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; }
79 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; }
80 #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; }
81 .pfolder-folder-close {color: <?php echo esc_attr($customize_folders['default_icon_color']) ?>}
82 .drag-bot > a {
83 border-bottom: solid 2px <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
84 }
85 .drag-up > a {
86 border-top: solid 2px <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
87 }
88 #custom-scroll-menu .jstree-hovered:not(.jstree-clicked) .pfolder-folder-close {
89 color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
90 }
91 .folders-action-menu > ul > li > a:not(.disabled):hover, .folders-action-menu > ul > li > label:not(.disabled):hover {
92 color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?>;
93 }
94 .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']) ?> }
95 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 {
96 background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;
97 color: #fff !important;
98 }
99 .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; }
100 #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; }
101 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 {
102 color: #fff !important;
103 }
104 .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; }
105 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") ?>);}
106 .wcp-drop-hover {
107 background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;
108 }
109 #custom-menu .route .nav-icon .wcp-icon {color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important;}
110 .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; }
111 .os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle { background: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; }
112 .jstree-node.drag-in > a.jstree-anchor.jstree-hovered { background-color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff; }
113 <?php
114
115 if (isset($customize_folders['folder_size']) && !empty($customize_folders['folder_size'])) {
116 if ($customize_folders['folder_size'] == "custom") {
117 $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'];
118 }
119 ?>
120 .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; }
121 <?php
122 }
123 ?>
124 </style>
125 <?php if (!empty($font_family)) {
126 wp_enqueue_style('custom-google-fonts', 'https://fonts.googleapis.com/css?family='.urlencode($font_family), false, WCP_FOLDER_VERSION);
127 } ?>
128 <div id="media-css">
129
130 </div>
131 <?php
132 $optionName = $typenow."_parent_status";
133 $status = get_option($optionName);
134 global $typenow;
135 $title = ucfirst($typenow);
136 if ($typenow == "page") {
137 $title = "Pages";
138 } else if ($typenow == "post") {
139 $title = "Posts";
140 } else if ($typenow == "attachment") {
141 $title = "Files";
142 } else {
143 $post_type = $typenow;
144 $post_types = get_post_types([ "name" => $post_type], 'objects');
145 if (!empty($post_types) && is_array($post_types) && isset($post_types[$post_type]) && isset($post_types[$post_type]->label)) {
146 $title = $post_types[$post_type]->label;
147 }
148 }
149
150 $display_status = "wcp_dynamic_display_status_".$typenow;
151 $display_status = get_option($display_status);
152 $class_name = isset($display_status) && $display_status == "hide" ? "hide-folders-area" : "";
153 $active_class = (isset($display_status) && $display_status == "hide") ? "" : "active";
154 $active_class_2 = (isset($display_status) && $display_status == "hide") ? "active" : "";
155
156 // Do not change here, Free/Pro Class name
157 $post_type = WCP_Folders::get_custom_post_type($typenow);
158 $active = "";
159 $active_all_class = "";
160 if (!empty($post_type)) {
161 $activeItem = filter_input(INPUT_POST, $post_type);
162 if (empty($activeItem)) {
163 $activeItem = filter_input(INPUT_GET, $post_type);
164 }
165
166 if ($activeItem == -1) {
167 $active = "active-item";
168 }
169
170 if (empty($activeItem) || $activeItem == "") {
171 $active_all_class = "active-item";
172 }
173 }
174 $horClass = (!isset($customize_folders['enable_horizontal_scroll']) || $customize_folders['enable_horizontal_scroll'] == "on") ? "hor-scroll" : "";
175 ?>
176 <div id="wcp-content" class="<?php echo esc_attr(isset($display_status) && $display_status == "hide" ? "hide-folders-area" : "") ?>" >
177 <div id="wcp-content-resize">
178 <div class="wcp-content">
179 <div class="wcp-hide-show-buttons">
180 <div class="toggle-buttons hide-folders <?php echo esc_attr($active_class) ?>"><span class="dashicons dashicons-arrow-left"></span></div>
181 <div class="toggle-buttons show-folders <?php echo esc_attr($active_class_2) ?>"><span class="dashicons dashicons-arrow-right"></span></div>
182 </div>
183 <div class='wcp-container'>
184 <div class="sticky-wcp-custom-form">
185 <?php echo ($form_html) ?>
186 <div class="top-settings">
187 <div class="folder-search-form">
188 <div class="form-search-input">
189 <input type="text" value="" id="folder-search" autocomplete="off" />
190 <span><i class="pfolder-search"></i></span>
191 </div>
192 </div>
193 <div class="folder-separator"></div>
194 <div class="header-posts">
195 <a href="javascript:;" 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>
196 </div>
197 <div class="un-categorised-items <?php echo esc_attr($active) ?>">
198 <a href="javascript:;" class="un-categorized-posts"><?php echo esc_attr("Unassigned ".$title); ?> <span class="total-count total-empty"><?php echo esc_attr($ttemp) ?></span> </a>
199 </div>
200 <div class="folder-separator-2"></div>
201 <div class="folders-action-menu">
202 <ul>
203 <li style="flex: 0 0 22px;"><a href="javascript:;" class="no-bg"><input type="checkbox" id="menu-checkbox" ></a></li>
204 <li class="folder-inline-tooltip">
205 <a class="full-width upload-media-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>">
206 <span class="inline-tooltip"><?php esc_html_e("Uploading folder is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
207 <span class="dashicons dashicons-cloud-upload"></span>
208 </a>
209 </li>
210 <li class="folder-inline-tooltip cut-folder-action">
211 <a class="full cut-folder-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
212 <span class="inline-tooltip"><?php esc_html_e("Cut is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
213 <span class="pfolder-cut"></span>
214 </a>
215 </li>
216 <li class="folder-inline-tooltip cut-folder-action">
217 <a class="full copy-folder-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
218 <span class="inline-tooltip"><?php esc_html_e("Copy is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
219 <span class="pfolder-copy"></span>
220 </a>
221 </li>
222 <li class="folder-inline-tooltip cut-folder-action">
223 <a class="paste-folder-action disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
224 <span class="inline-tooltip"><?php esc_html_e("Paste is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
225 <span class="pfolder-paste"></span>
226 </a>
227 </li>
228 <li class="folder-inline-tooltip">
229 <a class="lock-unlock-all-folders open-folders disabled" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" >
230 <span class="inline-tooltip"><?php esc_html_e("Lock/Unlock is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
231 <span class="dashicons dashicons-lock"></span>
232 </a>
233 </li>
234 <!--<li><a class="folder-tooltip undo-folder-action disabled" href="javascript:;" data-folder-tooltip="<?php /*esc_html_e("Undo Changes", "folders"); */?>"><span class="pfolder-undo"></span></a></li>-->
235 <li><a class="folder-tooltip delete-folder-action disabled" href="javascript:;" data-folder-tooltip="<?php esc_html_e("Delete", "folders"); ?>"><span class="pfolder-remove"></span></a></li>
236 </ul>
237 </div>
238 <div class="folder-separator-2"></div>
239 </div>
240 </div>
241 <div id="custom-scroll-menu" class="custom-scroll-menu <?php echo esc_attr($horClass) ?>">
242 <div class="horizontal-scroll-menu">
243 <div class="ajax-preloader">
244 <div class="cssload-container">
245 <div class="cssload-tube-tunnel"></div>
246 </div>
247 </div>
248 <div class="js-tree-data">
249 <div id="js-tree-menu" class="<?php echo ($status == 1) ? "active" : "" ?>">
250 <ul class='space first-space' id='space_0'>
251 <?php echo ($terms_data); ?>
252 </ul>
253 </div>
254 </div>
255 </div>
256 </div>
257 </div>
258 </div>
259 </div>
260 </div>
261 <?php
262 include_once "modals.php";
263 $hide_folder_color_pop_up = get_option("hide_folder_color_pop_up");
264 if($hide_folder_color_pop_up != "yes" && WCP_FOLDER_VERSION == "3.0") {
265 $customize_folders = get_option("customize_folders");
266 if (isset($customize_folders['show_folder_in_settings']) && $customize_folders['show_folder_in_settings'] == "yes") {
267 $setting_url = admin_url("options-general.php?page=wcp_folders_settings&setting_page=customize-folders&focus=icon-color");
268 } else {
269 $setting_url = admin_url("admin.php?page=wcp_folders_settings&setting_page=customize-folders&focus=icon-color");
270 }
271 ?>
272 <div class="folder-popup-form color-popup-options always-show" id="color-pop-up-options" style="display: block">
273 <div class="popup-form-content">
274 <div class="popup-form-data">
275 <div class="close-popup-button">
276 <a class="is-modal" href="javascript:;"><span></span></a>
277 </div>
278 <div class="folder-popup-top">
279 <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/color-popup.png") ?>" />
280 </div>
281 <div class="folder-popup-bottom">
282 <div class="folder-color-title">
283 <?php esc_html_e("🎨 Set custom colors to folders icon", "folders") ?>
284 </div>
285 <div class="folder-color-desc">
286 <?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") ?>
287 </div>
288 </div>
289 <div class="folder-form-buttons">
290 <a href="javascript:;" class="form-cancel-btn avoid-cancel"><?php esc_html_e("Cancel", "folders") ?></a>
291 <a href="<?php echo esc_url($setting_url) ?>" class="form-submit-btn customize-folder-color"><?php esc_html_e("Customise", "folders") ?></a>
292 </div>
293 </div>
294 </div>
295 <script>
296 jQuery(document).ready(function(){
297 jQuery(document).on("click", ".color-popup-options .form-cancel-btn, .color-popup-options .close-popup-button, #color-pop-up-options", function(e){
298 e.stopPropagation();
299 e.stopImmediatePropagation();
300 jQuery("#color-pop-up-options").hide();
301 jQuery.ajax({
302 url: "<?php echo esc_url(admin_url("admin-ajax.php")) ?>",
303 data: {
304 action: 'hide_folder_color_pop_up',
305 nonce: '<?php echo esc_attr(wp_create_nonce('hide_folder_color_pop_up')) ?>'
306 },
307 type: 'post',
308 success: function(){
309
310 }
311 });
312 });
313 });
314 </script>
315 </div>
316 <?php } ?>
317