admin-content.php
5 years ago
folder-deactivate-form.php
5 years ago
folder-popup.php
5 years ago
general-settings.php
5 years ago
help.php
5 years ago
media-replace.php
5 years ago
recommended-plugins.php
5 years ago
update.php
5 years ago
upgrade-table.php
5 years ago
upgrade-to-pro.php
5 years ago
general-settings.php
1486 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 3 | ?> |
| 4 | <!-- do not change here, Free/Pro URL Change --> |
| 5 | <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/settings.css?ver=<?php echo WCP_FOLDER_VERSION ?>' type='text/css' media='all' /> |
| 6 | <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/folder-icon.css?ver=<?php echo WCP_FOLDER_VERSION ?>' type='text/css' media='all' /> |
| 7 | <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/spectrum.min.css?ver=<?php echo WCP_FOLDER_VERSION ?>' type='text/css' media='all' /> |
| 8 | <?php if($setting_page == "folder-settings") { ?> |
| 9 | <link rel='stylesheet' href='<?php echo WCP_FOLDER_URL ?>assets/css/select2.min.css?ver=<?php echo WCP_FOLDER_VERSION ?>' type='text/css' media='all' /> |
| 10 | <script type="text/javascript" src='<?php echo WCP_FOLDER_URL ?>assets/js/select2.min.js?ver=<?php echo WCP_FOLDER_VERSION ?>' ></script> |
| 11 | <?php } ?> |
| 12 | <script src="<?php echo WCP_FOLDER_URL ?>assets/js/spectrum.min.js"></script> |
| 13 | <style> |
| 14 | <?php if ( function_exists( 'is_rtl' ) && is_rtl() ) { ?> |
| 15 | #setting-form { |
| 16 | float: right; |
| 17 | } |
| 18 | <?php } ?> |
| 19 | </style> |
| 20 | <script> |
| 21 | (function (factory) { |
| 22 | "use strict"; |
| 23 | if (typeof define === 'function' && define.amd) { |
| 24 | define(['jquery'], factory); |
| 25 | } |
| 26 | else if(typeof module !== 'undefined' && module.exports) { |
| 27 | module.exports = factory(require('jquery')); |
| 28 | } |
| 29 | else { |
| 30 | factory(jQuery); |
| 31 | } |
| 32 | }(function ($, undefined) { |
| 33 | var selectedItem; |
| 34 | var importTitle = "<?php esc_html_e("Import folders from %plugin%", "folders"); ?>"; |
| 35 | var importDesc = "<?php esc_html_e("Are you sure you'd like to import %d folders from %plugin%?", "folders"); ?>"; |
| 36 | var removeTitle = "<?php esc_html_e("Are you sure?", "folders"); ?>"; |
| 37 | var removeDesc = "<?php esc_html_e("You're about to delete %plugin%'s folders. Are you sure you'd like to proceed?", "folders"); ?>"; |
| 38 | $(document).ready(function(){ |
| 39 | <?php if($setting_page == "folder-settings") { ?> |
| 40 | $(".select2-box").select2(); |
| 41 | <?php } ?> |
| 42 | $(document).on("click",".form-cancel-btn, .close-popup-button, .folder-popup-form",function(){ |
| 43 | if($(this).hasClass("cancel-folders") || $(this).hasClass("remove-folders-box") || $(this).hasClass("close-remove-folders")) { |
| 44 | $("#remove_folders_when_removed").prop("checked", false); |
| 45 | setFoldersRemoveStatus("off"); |
| 46 | } |
| 47 | if($(this).hasClass("delete-button")) { |
| 48 | setFoldersRemoveStatus("on"); |
| 49 | } |
| 50 | $(".folder-popup-form").hide(); |
| 51 | }); |
| 52 | $(document).on("click",".import-folders-button", function(e){ |
| 53 | $("#import-folders-popup").show(); |
| 54 | }); |
| 55 | $(document).on("click",".popup-form-content", function(e){ |
| 56 | e.stopPropagation(); |
| 57 | e.stopImmediatePropagation(); |
| 58 | }); |
| 59 | $(document).on("click",".folder-select",function(){ |
| 60 | if($(this).is(":checked")) { |
| 61 | $(this).closest("tr").find(".hide-show-option").removeClass("hide-option"); |
| 62 | } else { |
| 63 | $(this).closest("tr").find(".hide-show-option").addClass("hide-option"); |
| 64 | } |
| 65 | }); |
| 66 | $(document).on("click", ".accordion-header", function(){ |
| 67 | if($(this).hasClass("active")) { |
| 68 | $(this).closest(".accordion").find(".accordion-content").slideUp(); |
| 69 | $(this).removeClass("active"); |
| 70 | } else { |
| 71 | $(this).closest(".accordion").find(".accordion-content").slideDown(); |
| 72 | $(this).addClass("active"); |
| 73 | } |
| 74 | }); |
| 75 | $(document).on("change", ".hide-show-option", function(){ |
| 76 | if($(this).val() == "folders-pro") { |
| 77 | $(this).find("option").prop("selected", false); |
| 78 | $(this).find("option:first").prop("selected", true); |
| 79 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 80 | } |
| 81 | }); |
| 82 | $(document).on("change", "#folder_font", function(){ |
| 83 | if($(this).val() == "folders-pro") { |
| 84 | $(this).val("").trigger("change"); |
| 85 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 86 | } |
| 87 | }); |
| 88 | $(document).on("change", "#folder_size", function(){ |
| 89 | if($(this).val() == "folders-pro" || $(this).val() == "folders-pro-item" || $(this).val() == "folders-item-pro") { |
| 90 | $(this).val("16").trigger("change"); |
| 91 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 92 | } |
| 93 | }); |
| 94 | $(".accordion-header:first").trigger("click"); |
| 95 | $("#folder_font, #folder_size").change(function(){ |
| 96 | setCSSProperties(); |
| 97 | }); |
| 98 | $(document).on("click", "input[name='customize_folders[show_media_details]']", function(){ |
| 99 | if($("#show_media_details").is(":checked")) { |
| 100 | $(".media-setting-box").addClass("active"); |
| 101 | } else { |
| 102 | $(".media-setting-box").removeClass("active"); |
| 103 | } |
| 104 | }); |
| 105 | setCSSProperties(); |
| 106 | $('.color-field').spectrum({ |
| 107 | chooseText: "Submit", |
| 108 | preferredFormat: "hex", |
| 109 | showInput: true, |
| 110 | cancelText: "Cancel", |
| 111 | move: function (color) { |
| 112 | $(this).val(color.toHexString()); |
| 113 | setCSSProperties(); |
| 114 | }, |
| 115 | change: function (color) { |
| 116 | $(this).val(color.toHexString()); |
| 117 | setCSSProperties(); |
| 118 | } |
| 119 | }); |
| 120 | $(document).on("click", "input[name='customize_folders[remove_folders_when_removed]']", function(e){ |
| 121 | if($(this).is(":checked")) { |
| 122 | $("#remove-folders-data-box").show(); |
| 123 | //setFoldersRemoveStatus("on"); |
| 124 | } else { |
| 125 | setFoldersRemoveStatus("off"); |
| 126 | } |
| 127 | }) |
| 128 | $(document).on("click", ".import-folder-data", function(e){ |
| 129 | selectedItem = $(this).closest("tr").data("plugin"); |
| 130 | if(!$(this).hasClass("in-popup")) { |
| 131 | var pluginName = $(this).closest("tr").find(".plugin-name").html(); |
| 132 | var pluginFolders = parseInt($(this).closest("tr").data("folders")); |
| 133 | var popupTitle = importTitle.replace("%plugin%", pluginName); |
| 134 | $(".import-folder-title").html(popupTitle); |
| 135 | var popupDesc = importDesc.replace("%plugin%", "<b>" + pluginName + "</b>"); |
| 136 | popupDesc = popupDesc.replace("%d", "<b>" + pluginFolders + "</b>"); |
| 137 | $(".import-folder-note").html(popupDesc); |
| 138 | $("#import-plugin-data").show(); |
| 139 | } else { |
| 140 | importPluginData(); |
| 141 | } |
| 142 | }); |
| 143 | $(document).on("click", ".remove-folders-data", function(e){ |
| 144 | e.preventDefault(); |
| 145 | $("#remove-confirmation-box").show(); |
| 146 | $("#delete-input").focus(); |
| 147 | }); |
| 148 | $(document).on("keyup", "#delete-input", function(){ |
| 149 | if($.trim($(this).val()) != "") { |
| 150 | var inputVal = $.trim($(this).val()).toLowerCase(); |
| 151 | if (inputVal == "delete") { |
| 152 | $("#remove-folders-data-button").prop("disabled", false); |
| 153 | $(".delete-confirmation-message").html("<?php esc_html_e('This will delete all existing folders & settings', 'folders'); ?>"); |
| 154 | } else { |
| 155 | $("#remove-folders-data-button").prop("disabled", true); |
| 156 | if (inputVal != "") { |
| 157 | var textLen = inputVal.length; |
| 158 | var curStr = ("delete").substring(0, textLen); |
| 159 | if (curStr != inputVal) { |
| 160 | $(".delete-confirmation-message").html("<?php esc_html_e('Please type DELETE and click on the "Delete" button to confirm', 'folders'); ?>"); |
| 161 | } else { |
| 162 | $(".delete-confirmation-message").html(""); |
| 163 | } |
| 164 | } else { |
| 165 | $(".delete-confirmation-message").html(""); |
| 166 | } |
| 167 | } |
| 168 | } else { |
| 169 | $(".delete-confirmation-message").html(""); |
| 170 | } |
| 171 | }); |
| 172 | $(document).on("submit", "#remove_folders_data", function(e){ |
| 173 | e.preventDefault(); |
| 174 | if($.trim($("#delete-input").val()).toLowerCase() == "delete") { |
| 175 | $.ajax({ |
| 176 | url: "<?php echo admin_url("admin-ajax.php") ?>", |
| 177 | data: { |
| 178 | action: 'wcp_remove_all_folders_data', |
| 179 | nonce: $("#remove-folder-nonce").val() |
| 180 | }, |
| 181 | type: 'post', |
| 182 | success: function(res) { |
| 183 | <?php |
| 184 | $redirectURL = $this->getFolderSettingsURL(); |
| 185 | if(!empty($redirectURL)) { |
| 186 | $page = isset($_POST['tab_page'])?$_POST['tab_page']:""; |
| 187 | $type = filter_input(INPUT_GET, 'setting_page', FILTER_SANITIZE_STRING); |
| 188 | $type = empty($type)?"":"&setting_page=".$type; |
| 189 | $redirectURL = $redirectURL.$type; |
| 190 | if(!empty($page)) { |
| 191 | $redirectURL .= "&setting_page=".$page; |
| 192 | } |
| 193 | } |
| 194 | $redirectURL = $redirectURL."¬e=2"; |
| 195 | ?> |
| 196 | window.location = "<?php echo $redirectURL ?>"; |
| 197 | } |
| 198 | }); |
| 199 | } |
| 200 | return false; |
| 201 | }); |
| 202 | $(document).on("change", "#delete-input", function(){ |
| 203 | if($.trim($(this).val()).toLowerCase() == "delete") { |
| 204 | $("#remove-folders-data-button").prop("disabled", false); |
| 205 | } else { |
| 206 | $("#remove-folders-data-button").prop("disabled", true); |
| 207 | } |
| 208 | }); |
| 209 | /*$(document).on("click", "#remove-folders-data-button", function(e){ |
| 210 | e.preventDefault(); |
| 211 | $(".folder-popup-form").hide(); |
| 212 | $("#remove-confirmation-box").show(); |
| 213 | });*/ |
| 214 | $(document).on("click", "#import-folder-button", function(e){ |
| 215 | importPluginData(); |
| 216 | }); |
| 217 | $(document).on("click", ".remove-folder-data", function(e){ |
| 218 | selectedItem = $(this).closest("tr").data("plugin"); |
| 219 | var pluginName = $(this).closest("tr").find(".plugin-name").html(); |
| 220 | var pluginFolders = parseInt($(this).closest("tr").data("folders")); |
| 221 | var popupTitle = removeTitle.replace("%plugin%", pluginName); |
| 222 | $(".remove-folder-title").html(popupTitle); |
| 223 | var popupDesc = removeDesc.replace("%plugin%", "<b>" + pluginName + "</b>"); |
| 224 | popupDesc = popupDesc.replace("%d", "<b>" + pluginFolders + "</b>"); |
| 225 | $(".remove-folder-note").html(popupDesc); |
| 226 | $("#remove-plugin-data").show(); |
| 227 | }); |
| 228 | $(document).on("click", "#remove-folder-button", function(){ |
| 229 | removePluginData(); |
| 230 | }); |
| 231 | setTooltipPosition(); |
| 232 | |
| 233 | $(document).on("click", ".checkbox-color", function(){ |
| 234 | setCSSProperties(); |
| 235 | }); |
| 236 | |
| 237 | $(document).on("change", ".checkbox-color", function(){ |
| 238 | setCSSProperties(); |
| 239 | }); |
| 240 | $(document).on("click", "#use_folder_undo", function(){ |
| 241 | if($(this).is(":checked")) { |
| 242 | $(".timeout-settings").addClass("active"); |
| 243 | } else { |
| 244 | $(".timeout-settings").removeClass("active"); |
| 245 | } |
| 246 | }); |
| 247 | $('.enable-replace-media').hover( |
| 248 | function(){ |
| 249 | //$(this).addClass('hover') |
| 250 | }, |
| 251 | function(){ |
| 252 | $(this).removeClass('show') |
| 253 | } |
| 254 | ) |
| 255 | $('.enable-replace-media .html-tooltip').hover( |
| 256 | function(){ |
| 257 | $(this).closest(".enable-replace-media").addClass('show') |
| 258 | }, |
| 259 | function(){ |
| 260 | //$(this).removeClass('show') |
| 261 | } |
| 262 | ) |
| 263 | }); |
| 264 | |
| 265 | function setFoldersRemoveStatus(status) { |
| 266 | $.ajax({ |
| 267 | url: "<?php echo admin_url("admin-ajax.php") ?>", |
| 268 | data: { |
| 269 | 'action': 'wcp_update_folders_uninstall_status', |
| 270 | 'status': status, |
| 271 | 'nonce': "<?php echo wp_create_nonce("wcp_folders_uninstall_status") ?>" |
| 272 | }, |
| 273 | type: 'post', |
| 274 | success: function (res) { |
| 275 | |
| 276 | } |
| 277 | }); |
| 278 | } |
| 279 | |
| 280 | function importPluginData() { |
| 281 | $("#import-folder-button").addClass("button"); |
| 282 | $("#import-folder-button").prop("disabled", true); |
| 283 | $(".other-plugins-"+selectedItem+" .import-folder-data").prop("disabled", true); |
| 284 | $(".other-plugins-"+selectedItem+" .import-folder-data .spinner").addClass("active"); |
| 285 | $.ajax({ |
| 286 | url: "<?php echo admin_url("admin-ajax.php") ?>", |
| 287 | data: { |
| 288 | 'plugin': $(".other-plugins-"+selectedItem).data("plugin"), |
| 289 | 'nonce': $(".other-plugins-"+selectedItem).data("nonce"), |
| 290 | 'action': 'wcp_import_plugin_folders_data' |
| 291 | }, |
| 292 | type: 'post', |
| 293 | success: function(res){ |
| 294 | var response = $.parseJSON(res); |
| 295 | if(response.status == -1) { |
| 296 | $(".other-plugins-"+selectedItem+" .import-folder-data").prop("disabled", false); |
| 297 | $(".other-plugins-"+selectedItem+" .import-folder-data .spinner").removeClass("active"); |
| 298 | $("#import-third-party-plugin-data").hide(); |
| 299 | $("#no-more-folder-credit").show(); |
| 300 | $("#import-folder-button").removeClass("button"); |
| 301 | $("#import-folder-button").prop("disabled", false); |
| 302 | } else if(response.status) { |
| 303 | $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("success-import"); |
| 304 | $(".other-plugins-"+response.data.plugin+" .import-folder-data").remove(); |
| 305 | } else { |
| 306 | $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("error-import"); |
| 307 | $(".other-plugins-"+response.data.plugin+" .import-folder-data").remove(); |
| 308 | } |
| 309 | $("#import-folder-button").prop("disabled", false); |
| 310 | $("#import-plugin-data").hide(); |
| 311 | } |
| 312 | }); |
| 313 | } |
| 314 | |
| 315 | function removePluginData() { |
| 316 | $(".other-plugins-"+selectedItem+" .remove-folder-data .spinner").addClass("active"); |
| 317 | $.ajax({ |
| 318 | url: "<?php echo admin_url("admin-ajax.php") ?>", |
| 319 | data: { |
| 320 | 'plugin': $(".other-plugins-"+selectedItem).data("plugin"), |
| 321 | 'nonce': $(".other-plugins-"+selectedItem).data("nonce"), |
| 322 | 'action': 'wcp_remove_plugin_folders_data' |
| 323 | }, |
| 324 | type: 'post', |
| 325 | success: function(res){ |
| 326 | var response = $.parseJSON(res); |
| 327 | $("#remove-plugin-data").hide(); |
| 328 | if(response.status) { |
| 329 | $(".other-plugins-"+response.data.plugin).remove(); |
| 330 | } else { |
| 331 | $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("error-import"); |
| 332 | $(".other-plugins-"+response.data.plugin+" .remove-folder-data .spinner").removeClass("active"); |
| 333 | } |
| 334 | |
| 335 | if($("#import-folders-popup .plugin-import-table tr").length == 0) { |
| 336 | $("#import-folders-popup").hide(); |
| 337 | $(".has-other-plugins").remove(); |
| 338 | $(".no-more-plugins").addClass("active"); |
| 339 | } |
| 340 | } |
| 341 | }); |
| 342 | } |
| 343 | |
| 344 | function setCSSProperties() { |
| 345 | if(jQuery("#new_folder_color").length && $("#new_folder_color").val() != "") { |
| 346 | $("#add-new-folder").css("border-color", $("#new_folder_color").val()); |
| 347 | $("#add-new-folder").css("background-color", $("#new_folder_color").val()); |
| 348 | } else if ($("input[name='customize_folders[new_folder_color]']:checked").length) { |
| 349 | $("#add-new-folder").css("border-color", $("input[name='customize_folders[new_folder_color]']:checked").val()); |
| 350 | $("#add-new-folder").css("background-color", $("input[name='customize_folders[new_folder_color]']:checked").val()); |
| 351 | } |
| 352 | |
| 353 | if($("#bulk_organize_button_color").length && $("#bulk_organize_button_color").val() != "") { |
| 354 | $(".organize-button").css("border-color", $("#bulk_organize_button_color").val()); |
| 355 | $(".organize-button").css("background-color", $("#bulk_organize_button_color").val()); |
| 356 | $(".organize-button").css("color", "#ffffff"); |
| 357 | } else if ($("input[name='customize_folders[bulk_organize_button_color]']:checked").length) { |
| 358 | $(".organize-button").css("border-color", $("input[name='customize_folders[bulk_organize_button_color]']:checked").val()); |
| 359 | $(".organize-button").css("background-color", $("input[name='customize_folders[bulk_organize_button_color]']:checked").val()); |
| 360 | $(".organize-button").css("color", "#ffffff"); |
| 361 | } |
| 362 | |
| 363 | if($("#dropdown_color").length && $("#dropdown_color").val() != "") { |
| 364 | $(".media-select").css("border-color", $("#dropdown_color").val()); |
| 365 | $(".media-select").css("color", $("#dropdown_color").val()); |
| 366 | } else if ($("input[name='customize_folders[dropdown_color]']:checked").length) { |
| 367 | $(".media-select").css("border-color", $("input[name='customize_folders[dropdown_color]']:checked").val()); |
| 368 | $(".media-select").css("color", $("input[name='customize_folders[dropdown_color]']:checked").val()); |
| 369 | } |
| 370 | |
| 371 | if($("#folder_bg_color").length && $("#folder_bg_color").val() != "") { |
| 372 | $(".all-posts.active-item-link").css("border-color", $("#folder_bg_color").val()); |
| 373 | $(".all-posts.active-item-link").css("background-color", $("#folder_bg_color").val()); |
| 374 | $(".all-posts.active-item-link").css("color", "#ffffff"); |
| 375 | } else if ($("input[name='customize_folders[folder_bg_color]']:checked").length) { |
| 376 | $(".all-posts.active-item-link").css("border-color", $("input[name='customize_folders[folder_bg_color]']:checked").val()); |
| 377 | $(".all-posts.active-item-link").css("background-color", $("input[name='customize_folders[folder_bg_color]']:checked").val()); |
| 378 | $(".all-posts.active-item-link").css("color", "#ffffff"); |
| 379 | } |
| 380 | |
| 381 | $("#custom-css").html(""); |
| 382 | if($("#folder_font").val() != "") { |
| 383 | font_val = $("#folder_font").val(); |
| 384 | if(font_val == "System Stack") { |
| 385 | font_val = "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"; |
| 386 | } else { |
| 387 | $('head').append('<link href="https://fonts.googleapis.com/css?family=' + font_val + ':400,600,700" rel="stylesheet" type="text/css" class="chaty-google-font">'); |
| 388 | } |
| 389 | $('.preview-box').css('font-family', font_val); |
| 390 | } else { |
| 391 | $('.preview-box').css('style', ""); |
| 392 | } |
| 393 | if($("#folder_size").val() != "") { |
| 394 | $(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", $("#folder_size").val()+"px"); |
| 395 | } else { |
| 396 | $(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", "14px"); |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | $(window).on("scroll", function(){ |
| 401 | setTooltipPosition(); |
| 402 | }).on("resize", function(){ |
| 403 | setTooltipPosition(); |
| 404 | }); |
| 405 | |
| 406 | function setTooltipPosition() { |
| 407 | if($(".html-tooltip:not(.no-position)").length) { |
| 408 | $(".html-tooltip:not(.no-position)").each(function(){ |
| 409 | if($(this).offset().top - $(window).scrollTop() > 540) { |
| 410 | $(this).addClass("top").removeClass("side").removeClass("bottom"); |
| 411 | $(this).find(".tooltip-text").attr("style",""); |
| 412 | $(this).find(".tooltip-text").removeClass("hide-arrow"); |
| 413 | } else if($(window).height() - ($(this).offset().top - $(window).scrollTop()) > 460) { |
| 414 | $(this).addClass("bottom").removeClass("top").removeClass("side"); |
| 415 | $(this).find(".tooltip-text").attr("style",""); |
| 416 | $(this).find(".tooltip-text").removeClass("hide-arrow"); |
| 417 | } else { |
| 418 | $(this).addClass("side").removeClass("top").removeClass("bottom"); |
| 419 | if($(this).find(".tooltip-text").length) { |
| 420 | $(this).find(".tooltip-text").attr("style",""); |
| 421 | $(this).find(".tooltip-text").removeClass("hide-arrow"); |
| 422 | |
| 423 | if($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50 < 0) { |
| 424 | $(this).find(".tooltip-text").css("margin-top", Math.abs($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50)+"px"); |
| 425 | $(this).find(".tooltip-text").addClass("hide-arrow"); |
| 426 | } else { |
| 427 | $(this).find(".tooltip-text").attr("style",""); |
| 428 | if(($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) > 0) { |
| 429 | $(this).find(".tooltip-text").css("margin-top", ((-1)*Math.abs($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) - 10)+"px"); |
| 430 | $(this).find(".tooltip-text").addClass("hide-arrow"); |
| 431 | } |
| 432 | } |
| 433 | } |
| 434 | } |
| 435 | }); |
| 436 | } |
| 437 | } |
| 438 | })); |
| 439 | </script> |
| 440 | <div id="custom-css"> |
| 441 | |
| 442 | </div> |
| 443 | <div class="wrap"> |
| 444 | <h1><?php esc_html_e( 'Folders Settings', 'folders'); ?></h1> |
| 445 | <?php |
| 446 | settings_fields('folders_settings'); |
| 447 | settings_fields('default_folders'); |
| 448 | settings_fields('customize_folders'); |
| 449 | $options = get_option('folders_settings'); |
| 450 | $default_folders = get_option('default_folders'); |
| 451 | $customize_folders = get_option('customize_folders'); |
| 452 | $default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders; |
| 453 | do_settings_sections( __FILE__ ); |
| 454 | ?> |
| 455 | <?php if(isset($_GET['note']) && $_GET['note'] == 1) { ?> |
| 456 | <div class="folder-notification notice notice-success is-dismissible"> |
| 457 | <div class="folder-notification-title"><?php esc_html_e("Changes Saved", "folders") ?></div> |
| 458 | <div class="folder-notification-note"><?php esc_html_e("Your changes have been saved.", "folders") ?></div> |
| 459 | </div> |
| 460 | <?php } if(isset($_GET['note']) && $_GET['note'] == 2) {?> |
| 461 | <div class="folder-notification notice notice-error is-dismissible"> |
| 462 | <div class="folder-notification-title"><?php esc_html_e("Folders Deleted", "folders") ?></div> |
| 463 | <div class="folder-notification-note"><?php esc_html_e("All folders has been successfully deleted.", "folders") ?></div> |
| 464 | </div> |
| 465 | <?php } ?> |
| 466 | <?php if($setting_page!="license-key") { ?> |
| 467 | <form action="options.php" method="post" id="setting-form"> |
| 468 | <input type="hidden" name="tab_page" value="<?php echo esc_attr($setting_page) ?>"> |
| 469 | <?php } ?> |
| 470 | <div class="folders-tabs"> |
| 471 | <div class="folder-tab-menu"> |
| 472 | <ul> |
| 473 | <li><a class="<?php echo esc_attr(($setting_page=="folder-settings")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=folder-settings") ?>"><?php esc_html_e( 'Folders Settings', 'folders'); ?></a></li> |
| 474 | <li><a class="<?php echo esc_attr(($setting_page=="folders-by-user")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=folders-by-user") ?>"><?php esc_html_e( 'User Restrictions', 'folders'); ?></a></li> |
| 475 | <li><a class="<?php echo esc_attr(($setting_page=="customize-folders")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=customize-folders") ?>"><?php esc_html_e( 'Customize Folders', 'folders'); ?></a></li> |
| 476 | <li><a class="<?php echo esc_attr(($setting_page=="folders-import")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=folders-import") ?>"><?php esc_html_e( 'Tools', 'folders'); ?></a></li> |
| 477 | <?php if($isInSettings) { ?> |
| 478 | <li><a class="<?php echo esc_attr(($setting_page=="upgrade-to-pro")?"active":"") ?>" href="<?php echo esc_url($settingURL."&setting_page=upgrade-to-pro") ?>"><?php esc_html_e( 'Upgrade to Pro', 'folders'); ?></a></li> |
| 479 | <?php } ?> |
| 480 | </ul> |
| 481 | </div> |
| 482 | <div class="folder-tab-content"> |
| 483 | <div class="tab-content <?php echo esc_attr(($setting_page=="folder-settings")?"active":"") ?>" id="folder-settings"> |
| 484 | <div class="accordion-content no-bp"> |
| 485 | <div class="accordion-left"> |
| 486 | <table class="form-table"> |
| 487 | <tboby> |
| 488 | <?php |
| 489 | $post_types = get_post_types( array( ), 'objects' ); |
| 490 | $post_array = array("page", "post", "attachment"); |
| 491 | foreach ( $post_types as $post_type ) : ?> |
| 492 | <?php |
| 493 | if ( ! $post_type->show_ui) continue; |
| 494 | $is_checked = !in_array( $post_type->name, $options )?"hide-option":""; |
| 495 | $selected_id = (isset($default_folders[$post_type->name]))?$default_folders[$post_type->name]:"all"; |
| 496 | $is_exists = WCP_Folders::check_for_setting($post_type->name, "default_folders"); |
| 497 | $is_customized = WCP_Folders::check_for_setting($post_type->name, "folders_settings"); |
| 498 | if(in_array($post_type->name, $post_array) || $is_customized === true){ |
| 499 | ?> |
| 500 | <tr> |
| 501 | <td class="no-padding"> |
| 502 | <label label for="folders_<?php echo esc_attr($post_type->name); ?>" class="custom-checkbox"> |
| 503 | <input type="checkbox" class="folder-select sr-only" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/> |
| 504 | <span></span> |
| 505 | </label> |
| 506 | </td> |
| 507 | <td class="" width="260px"> |
| 508 | <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use Folders with: ', 'folders')." ".esc_html_e($post_type->label); ?></label> |
| 509 | </td> |
| 510 | <td class="default-folder"> |
| 511 | <label class="hide-show-option <?php echo esc_attr($is_checked) ?>" for="folders_for_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Default folder: ', 'folders'); ?></label> |
| 512 | </td> |
| 513 | <td> |
| 514 | <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?> |
| 515 | <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option> |
| 516 | <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option> |
| 517 | <?php |
| 518 | if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) { |
| 519 | foreach ($terms_data[$post_type->name] as $term) { |
| 520 | if(empty($is_exists) || $is_exists === false) { |
| 521 | echo "<option class='pro-select-item' value='folders-pro'>" . esc_attr( $term->name ). " (Pro) 🔑</option>"; |
| 522 | } else { |
| 523 | $selected = ( $selected_id == $term->slug ) ? "selected" : ""; |
| 524 | echo "<option " . esc_attr( $selected ) . " value='" . esc_attr( $term->slug ) . "'>" . esc_attr( $term->name ) . "</option>"; |
| 525 | } |
| 526 | } |
| 527 | } ?> |
| 528 | </select> |
| 529 | </td> |
| 530 | </tr> |
| 531 | <?php |
| 532 | } else { |
| 533 | $show_media_details = "off"; |
| 534 | ?> |
| 535 | <tr> |
| 536 | <td style="padding: 15px 10px 15px 0px" colspan="4"> |
| 537 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 538 | <label for="" class="custom-checkbox send-user-to-pro"> |
| 539 | <input disabled type="checkbox" class="sr-only" name="customize_folders[show_media_details]" id="show_media_details" value="on" <?php checked($show_media_details, "on") ?>> |
| 540 | <span></span> |
| 541 | </label> |
| 542 | <label for="" class="send-user-to-pro"> |
| 543 | <?php esc_html_e( 'Use Folders with: ', 'folders')." ".esc_html_e($post_type->label); ?> |
| 544 | <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 545 | </label> |
| 546 | </a> |
| 547 | </td> |
| 548 | </tr> |
| 549 | <?php } |
| 550 | endforeach; ?> |
| 551 | <?php |
| 552 | $show_in_page = !isset($customize_folders['use_folder_undo'])?"yes":$customize_folders['use_folder_undo']; |
| 553 | ?> |
| 554 | <tr> |
| 555 | <td class="no-padding"> |
| 556 | <input type="hidden" name="customize_folders[use_folder_undo]" value="no"> |
| 557 | <label for="use_folder_undo" class="custom-checkbox"> |
| 558 | <input id="use_folder_undo" class="sr-only" <?php checked($show_in_page, "yes") ?> type="checkbox" name="customize_folders[use_folder_undo]" value="yes"> |
| 559 | <span></span> |
| 560 | </label> |
| 561 | </td> |
| 562 | <td colspan="3"> |
| 563 | <label for="use_folder_undo" ><?php esc_html_e( 'Use folders with Undo action after performing tasks', 'folders'); ?> <span class="recommanded">Recommended</span></label> |
| 564 | </td> |
| 565 | </tr> |
| 566 | <?php |
| 567 | $default_timeout = !isset($customize_folders['default_timeout'])?"5":$customize_folders['default_timeout']; |
| 568 | ?> |
| 569 | <tr class="timeout-settings <?php echo ($show_in_page == "yes")?"active":"" ?>"> |
| 570 | <td style="padding: 10px 0;" colspan="4"> |
| 571 | <label for="default_timeout" ><?php esc_html_e( 'Default timeout', 'folders'); ?></label> |
| 572 | <div class="seconds-box"> |
| 573 | <input type="number" class="seconds-input" name="customize_folders[default_timeout]" value="<?php echo esc_attr($default_timeout) ?>" /> |
| 574 | </div> |
| 575 | </td> |
| 576 | </tr> |
| 577 | |
| 578 | <tr> |
| 579 | <td style="padding: 15px 10px 15px 0px" colspan="4"> |
| 580 | <?php $replace_media_title = "off"; ?> |
| 581 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 582 | <label for="" class="custom-checkbox send-user-to-pro"> |
| 583 | <input disabled type="checkbox" class="sr-only" id="enable_media_trash" value="off"> |
| 584 | <span></span> |
| 585 | </label> |
| 586 | <label for="" class="send-user-to-pro"> |
| 587 | <?php esc_html_e("Move files to trash by default before deleting", "folders"); ?> |
| 588 | <span class="folder-tooltip" data-title="<?php esc_html_e("When enabled, files will be moved to trash to prevent mistakes, and then you can delete permanently from the trash", "folders") ?>"><span class="dashicons dashicons-editor-help"></span></span></label> |
| 589 | <button type="button" class="upgrade-link" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>"><?php esc_html_e("Upgrade to Pro", 'folders') ?></button> |
| 590 | </label> |
| 591 | </a> |
| 592 | </td> |
| 593 | </tr> |
| 594 | <?php |
| 595 | $show_in_page = !isset($customize_folders['folders_enable_replace_media'])?"yes":$customize_folders['folders_enable_replace_media']; |
| 596 | ?> |
| 597 | <tr> |
| 598 | <td class="no-padding"> |
| 599 | <input type="hidden" name="customize_folders[folders_enable_replace_media]" value="no"> |
| 600 | <label for="folders_enable_replace_media" class="custom-checkbox"> |
| 601 | <input id="folders_enable_replace_media" class="sr-only" <?php checked($show_in_page, "yes") ?> type="checkbox" name="customize_folders[folders_enable_replace_media]" value="yes"> |
| 602 | <span></span> |
| 603 | </label> |
| 604 | </td> |
| 605 | <td colspan="3" class="enable-replace-media"> |
| 606 | <label for="folders_enable_replace_media" ><?php esc_html_e( 'Enable Replace Media', 'folders'); ?> |
| 607 | <span class="html-tooltip no-position top"> |
| 608 | <span class="dashicons dashicons-editor-help"></span> |
| 609 | <span class="tooltip-text top" style=""> |
| 610 | <?php esc_html_e("The Replace Media feature will allow you to replace your media files throughout your website with the click of a button, which means the file will be replaced for all your posts, pages, etc", "folders") ?> |
| 611 | <span class="new"><?php printf(esc_html__("%sPro version ✨%s includes updating all previous links of the file in the database, changing dates & more", "folders"), "<a href='".esc_url($this->getFoldersUpgradeURL())."' target='_blank'>", "</a>") ?></span> |
| 612 | </span> |
| 613 | </span> |
| 614 | <span class="recommanded">Recommended</span> |
| 615 | </label> |
| 616 | </td> |
| 617 | </tr> |
| 618 | <?php |
| 619 | $show_in_page = !isset($customize_folders['show_folder_in_settings'])?"no":$customize_folders['show_folder_in_settings']; |
| 620 | ?> |
| 621 | <tr> |
| 622 | <td class="no-padding"> |
| 623 | <input type="hidden" name="customize_folders[show_folder_in_settings]" value="no"> |
| 624 | <label for="show_folder_in_settings" class="custom-checkbox"> |
| 625 | <input id="show_folder_in_settings" class="sr-only" <?php checked($show_in_page, "yes") ?> type="checkbox" name="customize_folders[show_folder_in_settings]" value="yes"> |
| 626 | <span></span> |
| 627 | </label> |
| 628 | </td> |
| 629 | <td colspan="3"> |
| 630 | <label for="show_folder_in_settings" ><?php esc_html_e( 'Place the Folders settings page nested under "Settings"', 'folders'); ?></label> |
| 631 | </td> |
| 632 | </tr> |
| 633 | <?php $val = get_option("folders_show_in_menu"); ?> |
| 634 | <input type="hidden" name="folders_show_in_menu" value="off" /> |
| 635 | <tr> |
| 636 | <td width="20" class="no-padding"> |
| 637 | <label for="folders_show_in_menu" class="custom-checkbox"> |
| 638 | <input class="sr-only" type="checkbox" id="folders_show_in_menu" name="folders_show_in_menu" value="on" <?php checked($val, "on") ?>/> |
| 639 | <span></span> |
| 640 | </label> |
| 641 | </td> |
| 642 | <td colspan="3"> |
| 643 | <label for="folders_show_in_menu" ><?php esc_html_e( 'Show the folders also in WordPress menu', 'folders'); ?></label> |
| 644 | </td> |
| 645 | </tr> |
| 646 | <tr> |
| 647 | <td style="padding: 15px 10px 15px 0px" colspan="4"> |
| 648 | <?php $dynamic_folders = "off"; ?> |
| 649 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 650 | <label for="" class="custom-checkbox send-user-to-pro"> |
| 651 | <input disabled type="checkbox" class="sr-only" name="customize_folders[dynamic_folders]" id="dynamic_folders" value="on" <?php checked($dynamic_folders, "on") ?>> |
| 652 | <span></span> |
| 653 | </label> |
| 654 | <label for="" class="send-user-to-pro"> |
| 655 | <?php esc_html_e("Dynamic Folders", "folders"); ?> |
| 656 | <button type="button" class="upgrade-link" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>"><?php esc_html_e("Upgrade to Pro", 'folders') ?></button> |
| 657 | <span class="html-tooltip dynamic "> |
| 658 | <span class="dashicons dashicons-editor-help"></span> |
| 659 | <span class="tooltip-text top" style=""> |
| 660 | <?php esc_html_e("Automatically filter posts/pages/custom posts/media files based on author, date, file types & more", "folders") ?> |
| 661 | <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/dynamic-folders.gif") ?>"> |
| 662 | </span> |
| 663 | </span> |
| 664 | <span class="recommanded">Recommended</span> |
| 665 | </label> |
| 666 | </a> |
| 667 | </td> |
| 668 | </tr> |
| 669 | <tr> |
| 670 | <td style="padding: 15px 10px 15px 0px" colspan="4"> |
| 671 | <?php $replace_media_title = "off"; ?> |
| 672 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 673 | <label for="" class="custom-checkbox send-user-to-pro"> |
| 674 | <input disabled type="checkbox" class="sr-only" name="customize_folders[replace_media_title]" id="replace_media_title" value="on" <?php checked($replace_media_title, "on") ?>> |
| 675 | <span></span> |
| 676 | </label> |
| 677 | <label for="" class="send-user-to-pro"> |
| 678 | <?php esc_html_e("Auto Rename file based on title", "folders"); ?> |
| 679 | <span class="folder-tooltip" data-title="<?php esc_html_e("Replace the actual file name of media files with the title from the WordPress editor.", "folders") ?>"><span class="dashicons dashicons-editor-help"></span></span></label> |
| 680 | <button type="button" class="upgrade-link" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>"><?php esc_html_e("Upgrade to Pro", 'folders') ?></button> |
| 681 | </label> |
| 682 | </a> |
| 683 | </td> |
| 684 | </tr> |
| 685 | <!-- Do not make changes here, Only for Free --> |
| 686 | <tr> |
| 687 | <td style="padding: 15px 10px 15px 0px" colspan="4"> |
| 688 | <input type="hidden" name="folders_settings1" value="folders"> |
| 689 | <?php |
| 690 | $show_media_details = !isset($customize_folders['show_media_details'])?"on":$customize_folders['show_media_details']; |
| 691 | $show_media_details = "off"; |
| 692 | ?> |
| 693 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 694 | <label for="" class="custom-checkbox send-user-to-pro"> |
| 695 | <input disabled type="checkbox" class="sr-only" name="customize_folders[show_media_details]" id="show_media_details" value="on" <?php checked($show_media_details, "on") ?>> |
| 696 | <span></span> |
| 697 | </label> |
| 698 | <label for="" class="send-user-to-pro"> |
| 699 | <?php esc_html_e("Show media details on hover", "folders"); ?> |
| 700 | <button type="button" class="upgrade-link" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>"><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 701 | <span class="html-tooltip bottom"> |
| 702 | <span class="dashicons dashicons-editor-help"></span> |
| 703 | <span class="tooltip-text top" style=""> |
| 704 | <?php esc_html_e("Show useful metadata including title, size, type, date, dimension & more on hover.", "folders"); ?> |
| 705 | <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/folders-media.gif") ?>"> |
| 706 | </span> |
| 707 | </span> |
| 708 | <span class="recommanded">Recommended</span> |
| 709 | </label> |
| 710 | </a> |
| 711 | </td> |
| 712 | </tr> |
| 713 | </tboby> |
| 714 | </table> |
| 715 | <input type="hidden" name="customize_folders[show_media_details]" value="off"> |
| 716 | <div class="media-details"> |
| 717 | <div class=""> |
| 718 | <?php |
| 719 | $media_settings = array( |
| 720 | 'image_title' => array( |
| 721 | "title" => esc_html__("Title", "folders"), |
| 722 | "default" => "on", |
| 723 | ), |
| 724 | 'image_alt_text' => array( |
| 725 | "title" => esc_html__("Alternative Text", "folders"), |
| 726 | "default" => "off", |
| 727 | ), |
| 728 | 'image_file_url' => array( |
| 729 | "title" => esc_html__("File URL", "folders"), |
| 730 | "default" => "off", |
| 731 | ), |
| 732 | 'image_dimensions' => array( |
| 733 | "title" => esc_html__("Dimensions", "folders"), |
| 734 | "default" => "on", |
| 735 | ), |
| 736 | 'image_size' => array( |
| 737 | "title" => esc_html__("Size", "folders"), |
| 738 | "default" => "off", |
| 739 | ), |
| 740 | 'image_file_name' => array( |
| 741 | "title" => esc_html__("Filename", "folders"), |
| 742 | "default" => "off", |
| 743 | ), |
| 744 | 'image_type' => array( |
| 745 | "title" => esc_html__("Type", "folders"), |
| 746 | "default" => "on", |
| 747 | ), |
| 748 | 'image_date' => array( |
| 749 | "title" => esc_html__("Date", "folders"), |
| 750 | "default" => "on", |
| 751 | ), |
| 752 | 'image_uploaded_by' => array( |
| 753 | "title" => esc_html__("Uploaded by", "folders"), |
| 754 | "default" => "off", |
| 755 | ) |
| 756 | ); |
| 757 | $media_col_settings = isset($customize_folders['media_col_settings']) && is_array($customize_folders['media_col_settings'])?$customize_folders['media_col_settings']:array("image_title","image_dimensions","image_type","image_date"); |
| 758 | ?> |
| 759 | <input type="hidden" name="customize_folders[media_col_settings][]" value="all"> |
| 760 | <div class="media-setting-box active send-user-to-pro" > |
| 761 | <div class="normal-box"> |
| 762 | <select disabled multiple="multiple" name="customize_folders[media_col_settings][]" class="select2-box"> |
| 763 | <?php foreach($media_settings as $key=>$media) { |
| 764 | $selected = $media['default']; |
| 765 | ?> |
| 766 | <option <?php selected($selected, "on") ?> value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($media['title']) ?></option> |
| 767 | <?php } ?> |
| 768 | </select> |
| 769 | </div> |
| 770 | <a class="upgrade-box" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 771 | <button type="button"><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 772 | </a> |
| 773 | </div> |
| 774 | </div> |
| 775 | </div> |
| 776 | </div> |
| 777 | <div class="accordion-right"> |
| 778 | <div class="premio-help"> |
| 779 | <a href="https://premio.io/help/folders/?utm_source=pluginspage" target="_blank"> |
| 780 | <div class="premio-help-btn"> |
| 781 | <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/premio-help.png") ?>" alt="Premio Help" class="Premio Help" /> |
| 782 | <div class="need-help">Need Help?</div> |
| 783 | <div class="visit-our">Visit our</div> |
| 784 | <div class="knowledge-base">knowledge base</div> |
| 785 | </div> |
| 786 | </a> |
| 787 | </div> |
| 788 | </div> |
| 789 | <div class="clear"></div> |
| 790 | <div class="submit-button"> |
| 791 | <?php submit_button(); ?> |
| 792 | </div> |
| 793 | </div> |
| 794 | </div> |
| 795 | <div class="tab-content <?php echo esc_attr(($setting_page=="customize-folders")?"active":"") ?>" id="customize-folders"> |
| 796 | <div class="accordion-content"> |
| 797 | <div class="accordion-left"> |
| 798 | <table class="form-table"> |
| 799 | <?php |
| 800 | $colors = array( |
| 801 | "#FA166B", |
| 802 | "#0073AA", |
| 803 | "#484848" |
| 804 | ); |
| 805 | $color = !isset($customize_folders['new_folder_color'])||empty($customize_folders['new_folder_color'])?"#FA166B":$customize_folders['new_folder_color']; |
| 806 | $setting_color = WCP_Folders::check_for_setting("new_folder_color", "customize_folders"); |
| 807 | ?> |
| 808 | <tr> |
| 809 | <td width="255px" class="no-padding"> |
| 810 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 811 | <label for="new_folder_color" ><b>"New Folder"</b> button color <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button></label> |
| 812 | </a> |
| 813 | </td> |
| 814 | <td> |
| 815 | <ul class="color-list"> |
| 816 | <?php $field_name = "new_folder_color"; foreach ($colors as $key=>$value) { ?> |
| 817 | <li> |
| 818 | <label class="color-checkbox <?php echo ($color == $value)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 819 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($value) ?>" <?php checked($color, $value) ?> /> |
| 820 | <span style="background: <?php echo esc_attr($value) ?>"></span> |
| 821 | </label> |
| 822 | </li> |
| 823 | <?php } $key = 3; ?> |
| 824 | <?php if($setting_color !== false && $setting_color != "#FA166B") { ?> |
| 825 | <li> |
| 826 | <label class="color-checkbox <?php echo ($color == $setting_color)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 827 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($setting_color) ?>" <?php checked($color, $setting_color) ?> /> |
| 828 | <span style="background: <?php echo esc_attr($setting_color) ?>"></span> |
| 829 | </label> |
| 830 | </li> |
| 831 | <?php } ?> |
| 832 | <li> |
| 833 | <a class="upgrade-box-link d-block" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 834 | <span class="color-box"><span class="gradient"></span> <span class="color-box-area"><?php echo esc_html_e("Custom", "folders") ?></span></span> |
| 835 | <span class="upgrade-link"><?php echo esc_html_e("Upgrade to Pro", "folders") ?></span> |
| 836 | </a> |
| 837 | </li> |
| 838 | </ul> |
| 839 | </td> |
| 840 | <td rowspan="4" > |
| 841 | |
| 842 | </td> |
| 843 | </tr> |
| 844 | <?php |
| 845 | $color = !isset($customize_folders['bulk_organize_button_color'])||empty($customize_folders['bulk_organize_button_color'])?"#FA166B":$customize_folders['bulk_organize_button_color']; |
| 846 | $setting_color = WCP_Folders::check_for_setting("bulk_organize_button_color", "customize_folders"); |
| 847 | ?> |
| 848 | <tr> |
| 849 | <td class="no-padding"> |
| 850 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 851 | <label for="bulk_organize_button_color" ><b>"Bulk Organize"</b> button color <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button></label> |
| 852 | </a> |
| 853 | </td> |
| 854 | <td> |
| 855 | <ul class="color-list"> |
| 856 | <?php $field_name = "bulk_organize_button_color"; foreach ($colors as $key=>$value) { ?> |
| 857 | <li> |
| 858 | <label class="color-checkbox <?php echo ($color == $value)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 859 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($value) ?>" <?php checked($color, $value) ?> /> |
| 860 | <span style="background: <?php echo esc_attr($value) ?>"></span> |
| 861 | </label> |
| 862 | </li> |
| 863 | <?php } $key = 3; ?> |
| 864 | <?php if($setting_color !== false && $setting_color != "#FA166B") { ?> |
| 865 | <li> |
| 866 | <label class="color-checkbox <?php echo ($color == $setting_color)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 867 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($setting_color) ?>" <?php checked($color, $setting_color) ?> /> |
| 868 | <span style="background: <?php echo esc_attr($setting_color) ?>"></span> |
| 869 | </label> |
| 870 | </li> |
| 871 | <?php } ?> |
| 872 | <li> |
| 873 | <a class="upgrade-box-link d-block" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 874 | <span class="color-box"><span class="gradient"></span> <span class="color-box-area"><?php echo esc_html_e("Custom", "folders") ?></span></span> |
| 875 | <span class="upgrade-link"><?php echo esc_html_e("Upgrade to Pro", "folders") ?></span> |
| 876 | </a> |
| 877 | </li> |
| 878 | </ul> |
| 879 | </td> |
| 880 | </tr> |
| 881 | <?php |
| 882 | $color = !isset($customize_folders['media_replace_button'])||empty($customize_folders['media_replace_button'])?"#FA166B":$customize_folders['media_replace_button']; |
| 883 | $setting_color = WCP_Folders::check_for_setting("media_replace_button", "customize_folders"); |
| 884 | ?> |
| 885 | <tr> |
| 886 | <td class="no-padding"> |
| 887 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 888 | <label for="media_replace_button" ><b>"Replace File"</b> media library button <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button></label> |
| 889 | </a> |
| 890 | </td> |
| 891 | <td> |
| 892 | <ul class="color-list"> |
| 893 | <?php $field_name = "media_replace_button"; foreach ($colors as $key=>$value) { ?> |
| 894 | <li> |
| 895 | <label class="color-checkbox <?php echo ($color == $value)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 896 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($value) ?>" <?php checked($color, $value) ?> /> |
| 897 | <span style="background: <?php echo esc_attr($value) ?>"></span> |
| 898 | </label> |
| 899 | </li> |
| 900 | <?php } $key = 3; ?> |
| 901 | <?php if($setting_color !== false && $setting_color != "#FA166B") { ?> |
| 902 | <li> |
| 903 | <label class="color-checkbox <?php echo ($color == $setting_color)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 904 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($setting_color) ?>" <?php checked($color, $setting_color) ?> /> |
| 905 | <span style="background: <?php echo esc_attr($setting_color) ?>"></span> |
| 906 | </label> |
| 907 | </li> |
| 908 | <?php } ?> |
| 909 | <li> |
| 910 | <a class="upgrade-box-link d-block" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 911 | <span class="color-box"><span class="gradient"></span> <span class="color-box-area"><?php echo esc_html_e("Custom", "folders") ?></span></span> |
| 912 | <span class="upgrade-link"><?php echo esc_html_e("Upgrade to Pro", "folders") ?></span> |
| 913 | </a> |
| 914 | </li> |
| 915 | </ul> |
| 916 | </td> |
| 917 | </tr> |
| 918 | <?php |
| 919 | $color = !isset($customize_folders['dropdown_color'])||empty($customize_folders['dropdown_color'])?"#484848":$customize_folders['dropdown_color']; |
| 920 | $setting_color = WCP_Folders::check_for_setting("dropdown_color", "customize_folders"); |
| 921 | ?> |
| 922 | <tr> |
| 923 | <td class="no-padding"> |
| 924 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 925 | <label for="dropdown_color" ><?php echo esc_html_e("Dropdown color", "folders") ?> <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button></label> |
| 926 | </a> |
| 927 | </td> |
| 928 | <td> |
| 929 | <ul class="color-list"> |
| 930 | <?php $field_name = "dropdown_color"; foreach ($colors as $key=>$value) { ?> |
| 931 | <li> |
| 932 | <label class="color-checkbox <?php echo ($color == $value)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 933 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($value) ?>" <?php checked($color, $value) ?> /> |
| 934 | <span style="background: <?php echo esc_attr($value) ?>"></span> |
| 935 | </label> |
| 936 | </li> |
| 937 | <?php } $key = 3; ?> |
| 938 | <?php if($setting_color !== false && $setting_color != "#484848") { ?> |
| 939 | <li> |
| 940 | <label class="color-checkbox <?php echo ($color == $setting_color)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 941 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($setting_color) ?>" <?php checked($color, $setting_color) ?> /> |
| 942 | <span style="background: <?php echo esc_attr($setting_color) ?>"></span> |
| 943 | </label> |
| 944 | </li> |
| 945 | <?php } ?> |
| 946 | <li> |
| 947 | <a class="upgrade-box-link d-block" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 948 | <span class="color-box"><span class="gradient"></span> <span class="color-box-area"><?php echo esc_html_e("Custom", "folders") ?></span></span> |
| 949 | <span class="upgrade-link"><?php echo esc_html_e("Upgrade to Pro", "folders") ?></span> |
| 950 | </a> |
| 951 | </li> |
| 952 | </ul> |
| 953 | </td> |
| 954 | </tr> |
| 955 | <?php |
| 956 | $color = !isset($customize_folders['folder_bg_color'])||empty($customize_folders['folder_bg_color'])?"#FA166B":$customize_folders['folder_bg_color']; |
| 957 | $setting_color = WCP_Folders::check_for_setting("folder_bg_color", "customize_folders"); |
| 958 | ?> |
| 959 | <tr> |
| 960 | <td class="no-padding"> |
| 961 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 962 | <label for="folder_bg_color" ><?php echo esc_html_e("Folders background color", "folders") ?> <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button></label> |
| 963 | </a> |
| 964 | </td> |
| 965 | <td> |
| 966 | <ul class="color-list"> |
| 967 | <?php $field_name = "folder_bg_color"; foreach ($colors as $key=>$value) { ?> |
| 968 | <li> |
| 969 | <label class="color-checkbox <?php echo ($color == $value)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 970 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($value) ?>" <?php checked($color, $value) ?> /> |
| 971 | <span style="background: <?php echo esc_attr($value) ?>"></span> |
| 972 | </label> |
| 973 | </li> |
| 974 | <?php } $key = 3; ?> |
| 975 | <?php if($setting_color !== false && $setting_color != "#FA166B") { ?> |
| 976 | <li> |
| 977 | <label class="color-checkbox <?php echo ($color == $setting_color)?"active":"" ?>" for="<?php echo esc_attr($field_name)."-".$key ?>"> |
| 978 | <input type="radio" id="<?php echo esc_attr($field_name)."-".$key ?>" name="customize_folders[<?php echo esc_attr($field_name) ?>]" class="sr-only checkbox-color" value="<?php echo esc_attr($setting_color) ?>" <?php checked($color, $setting_color) ?> /> |
| 979 | <span style="background: <?php echo esc_attr($setting_color) ?>"></span> |
| 980 | </label> |
| 981 | </li> |
| 982 | <?php } ?> |
| 983 | <li> |
| 984 | <a class="upgrade-box-link d-block" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 985 | <span class="color-box"><span class="gradient"></span> <span class="color-box-area"><?php echo esc_html_e("Custom", "folders") ?></span></span> |
| 986 | <span class="upgrade-link"><?php echo esc_html_e("Upgrade to Pro", "folders") ?></span> |
| 987 | </a> |
| 988 | </li> |
| 989 | </ul> |
| 990 | </td> |
| 991 | </tr> |
| 992 | <?php |
| 993 | $font = !isset($customize_folders['folder_font'])||empty($customize_folders['folder_font'])?"":$customize_folders['folder_font']; |
| 994 | $setting_font = WCP_Folders::check_for_setting("folder_font", "customize_folders"); |
| 995 | $index = 0; |
| 996 | ?> |
| 997 | <tr> |
| 998 | <td class="no-padding"> |
| 999 | <label for="folder_font" > |
| 1000 | <?php if($setting_font !== false && $setting_font != "" && !in_array($setting_font, array("Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia", "System Stack"))) { |
| 1001 | esc_html_e("Folders font", 'folders'); |
| 1002 | } else { ?> |
| 1003 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1004 | <?php esc_html_e( 'Folders font', 'folders'); ?> <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 1005 | </a> |
| 1006 | <?php } ?> |
| 1007 | </label> |
| 1008 | </td> |
| 1009 | <td colspan="2"> |
| 1010 | <select name="customize_folders[folder_font]" id="folder_font" > |
| 1011 | <?php $group = ''; |
| 1012 | foreach ($fonts as $key => $value): |
| 1013 | $title = $key; |
| 1014 | if($index == 0) { |
| 1015 | $key = ""; |
| 1016 | } |
| 1017 | $index++; |
| 1018 | if ($value != $group) { |
| 1019 | echo '<optgroup label="' . $value . '">'; |
| 1020 | $group = $value; |
| 1021 | } |
| 1022 | if(($setting_font !== false && $setting_font != "" && !in_array($setting_font, array("Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia"))) || $value != "Google Fonts" ) { ?> |
| 1023 | <option value="<?php echo $key; ?>" <?php selected($font, $key); ?>><?php echo $title; ?></option> |
| 1024 | <?php } else { ?> |
| 1025 | <option class="pro-select-item" value="folders-pro"><?php echo $title; ?> (Pro) 🔑</option> |
| 1026 | <?php } ?> |
| 1027 | <?php endforeach; ?> |
| 1028 | </select> |
| 1029 | </td> |
| 1030 | </tr> |
| 1031 | <?php |
| 1032 | $size = ! isset( $customize_folders['folder_size'] ) || empty( $customize_folders['folder_size'] ) ? "16" : $customize_folders['folder_size']; |
| 1033 | $folder_size = WCP_Folders::check_for_setting("folder_size", "customize_folders"); |
| 1034 | ?> |
| 1035 | <tr> |
| 1036 | <td class="no-padding"> |
| 1037 | <label for="folder_size" > |
| 1038 | <?php if($folder_size === false || intval($folder_size) === 16) { ?> |
| 1039 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1040 | <?php esc_html_e( 'Folders size', 'folders'); ?> <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 1041 | </a> |
| 1042 | <?php } else { ?> |
| 1043 | <?php esc_html_e("Folders size", 'folders'); ?> |
| 1044 | <?php } ?> |
| 1045 | </label> |
| 1046 | </td> |
| 1047 | <td colspan="2"> |
| 1048 | <?php |
| 1049 | if($folder_size === false || intval($folder_size) == 16) { |
| 1050 | $sizes = array( |
| 1051 | "folders-pro" => "Small (Pro) 🔑", |
| 1052 | "16" => "Medium", |
| 1053 | "folders-pro-item" => "Large (Pro) 🔑", |
| 1054 | "folders-item-pro" => "Custom (Pro) 🔑" |
| 1055 | ); |
| 1056 | $size = 16; |
| 1057 | } else { |
| 1058 | $sizes = array( |
| 1059 | "12" => "Small", |
| 1060 | "16" => "Medium", |
| 1061 | "20" => "Large" |
| 1062 | ); |
| 1063 | } |
| 1064 | ?> |
| 1065 | <select name="customize_folders[folder_size]" id="folder_size" > |
| 1066 | <?php |
| 1067 | foreach ($sizes as $key=>$value) { |
| 1068 | $selected = ($key == $size)?"selected":""; |
| 1069 | echo "<option ".$selected." value='".$key."'>".$value."</option>"; |
| 1070 | } |
| 1071 | ?> |
| 1072 | </select> |
| 1073 | </td> |
| 1074 | </tr> |
| 1075 | <?php |
| 1076 | $show_in_page = isset($customize_folders['show_in_page'])?$customize_folders['show_in_page']:"hide"; |
| 1077 | $show_folder = WCP_Folders::check_for_setting("show_in_page", "customize_folders"); |
| 1078 | if(empty($show_in_page)) { |
| 1079 | $show_in_page = "hide"; |
| 1080 | } |
| 1081 | ?> |
| 1082 | <tr> |
| 1083 | <td colspan="3" style="padding: 15px 20px 15px 0"> |
| 1084 | <input type="hidden" name="customize_folders[show_in_page]" value="hide"> |
| 1085 | <?php if($show_folder === false || $show_folder === "hide") { ?> |
| 1086 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1087 | <label for="" class="custom-checkbox send-user-to-pro"> |
| 1088 | <input disabled type="checkbox" class="sr-only" name="customize_folders[show_in_page]" id="show_in_page" value="on" <?php checked($show_in_page, "show") ?>> |
| 1089 | <span></span> |
| 1090 | </label> |
| 1091 | <label for="" class="send-user-to-pro"> |
| 1092 | <?php esc_html_e("Show Folders in upper position", "folders"); ?> |
| 1093 | <button type="button" class="upgrade-link" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>"><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 1094 | </label> |
| 1095 | </a> |
| 1096 | <?php } else { ?> |
| 1097 | <div class="custom-checkbox"> |
| 1098 | <input id="show_folders" class="sr-only" <?php checked($show_in_page, "show") ?> type="checkbox" name="customize_folders[show_in_page]" value="show"> |
| 1099 | <span></span> |
| 1100 | </div> |
| 1101 | <label for="show_folders"><?php esc_html_e("Show Folders in upper position", 'folders'); ?></label> |
| 1102 | <?php } ?> |
| 1103 | </td> |
| 1104 | </tr> |
| 1105 | </table> |
| 1106 | </div> |
| 1107 | <div class="accordion-right"> |
| 1108 | <div class="preview-text"> |
| 1109 | Preview |
| 1110 | <div class="preview-text-info"><?php esc_html_e("See the full functionality on your media library, posts, pages, and custom posts", 'folders'); ?></div> |
| 1111 | </div> |
| 1112 | <div class="preview-inner-box"> |
| 1113 | <div class="preview-box"> |
| 1114 | <div class="wcp-custom-form"> |
| 1115 | <div class="form-title"> |
| 1116 | <?php esc_html_e("Folders", 'folders'); ?> |
| 1117 | <a href="javascript:;" class="add-new-folder" id="add-new-folder"> |
| 1118 | <span class="create_new_folder"><i class="pfolder-add-folder"></i></span> |
| 1119 | <span><?php esc_html_e("New Folder", 'folders'); ?></span> |
| 1120 | </a> |
| 1121 | <div class="clear"></div> |
| 1122 | </div> |
| 1123 | <div class="form-options"> |
| 1124 | <ul> |
| 1125 | <li> |
| 1126 | <div class="custom-checkbox"> |
| 1127 | <input type="checkbox" class="sr-only" > |
| 1128 | <span></span> |
| 1129 | </div> |
| 1130 | </li> |
| 1131 | <li> |
| 1132 | <a href="javascript:;" id="inline-update"><span class="icon pfolder-edit-folder"><span class="path2"></span></span> <span class="text"><?php esc_html_e("Rename", 'folders'); ?></span> </a> |
| 1133 | </li> |
| 1134 | <li> |
| 1135 | <a href="javascript:;" id="inline-remove"><span class="icon pfolder-remove"></span> <span class="text"><?php esc_html_e("Delete", 'folders'); ?></span> </a> |
| 1136 | </li> |
| 1137 | <li class="last"> |
| 1138 | <a href="javascript:;" id="expand-collapse-list" data-tooltip="Expand"><span class="icon pfolder-arrow-down"></span></a> |
| 1139 | </li> |
| 1140 | <li class="last"> |
| 1141 | <a href="javascript:;" ><span class="icon pfolder-arrow-sort"></span></a> |
| 1142 | </li> |
| 1143 | </ul> |
| 1144 | </div> |
| 1145 | </div> |
| 1146 | <div class="shadow-box"> |
| 1147 | <div class="header-posts"> |
| 1148 | <a href="javascript:;" class="all-posts active-item-link"><?php esc_html_e("All Files", 'folders'); ?> <span class="total-count">215</span></a> |
| 1149 | </div> |
| 1150 | <div class="un-categorised-items ui-droppable"> |
| 1151 | <a href="javascript:;" class="un-categorized-posts"><?php esc_html_e("Unassigned Files", 'folders'); ?> <span class="total-count total-empty">191</span> </a> |
| 1152 | </div> |
| 1153 | <div class="separator"></div> |
| 1154 | <ul class="folder-list"> |
| 1155 | <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span><?php esc_html_e("Folder 1", 'folders'); ?></span><span class="total-count">20</span><span class="clear"></span></a></li> |
| 1156 | <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span><?php esc_html_e("Folder 2", 'folders'); ?></span><span class="total-count">13</span><span class="clear"></span></a></li> |
| 1157 | <li><a href="javascript:;"><i class="wcp-icon pfolder-folder-close"></i> <span><?php esc_html_e("Folder 3", 'folders'); ?></span><span class="total-count">5</span><span class="clear"></span></a></li> |
| 1158 | </ul> |
| 1159 | <div class="separator"></div> |
| 1160 | <div class="media-buttons"> |
| 1161 | <select class="media-select"> |
| 1162 | <option><?php esc_html_e("All Files", 'folders'); ?></option> |
| 1163 | <option><?php esc_html_e("Folder 1", 'folders'); ?></option> |
| 1164 | <option><?php esc_html_e("Folder 2", 'folders'); ?></option> |
| 1165 | <option><?php esc_html_e("Folder 3", 'folders'); ?></option> |
| 1166 | </select> |
| 1167 | <button type="button" class="button organize-button"><?php esc_html_e("Bulk Organize", 'folders'); ?></button> |
| 1168 | <div style="clear: both;"></div> |
| 1169 | </div> |
| 1170 | </div> |
| 1171 | </div> |
| 1172 | </div> |
| 1173 | </div> |
| 1174 | <div class="clear"></div> |
| 1175 | <?php submit_button(); ?> |
| 1176 | </div> |
| 1177 | </div> |
| 1178 | <div class="tab-content <?php echo esc_attr(($setting_page=="folders-import")?"active":"") ?>" id="folder-import"> |
| 1179 | <?php |
| 1180 | $remove_folders_when_removed = !isset($customize_folders['remove_folders_when_removed'])?"off":$customize_folders['remove_folders_when_removed']; |
| 1181 | ?> |
| 1182 | <input type="hidden" name="customize_folders[remove_folders_when_removed]" value="off" /> |
| 1183 | <div class="folder-danger-zone"> |
| 1184 | <table class="import-export-table"> |
| 1185 | <?php if($is_plugin_exists) { ?> |
| 1186 | <tr class="has-other-plugins"> |
| 1187 | <td> |
| 1188 | <span class="folder-info"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e("Export/Import", "folders"); ?></span> |
| 1189 | <span class="folder-text"><span><?php esc_html_e("External folders found.", "folders"); ?></span> <?php esc_html_e("Click import to start importing external folders.", "folders"); ?></span> |
| 1190 | </td> |
| 1191 | <td class="last-td"> |
| 1192 | <a href="#" class="import-folders-button"><?php esc_html_e("Import", "folders"); ?></a> |
| 1193 | </td> |
| 1194 | </tr> |
| 1195 | <?php } ?> |
| 1196 | <tr class="no-more-plugins <?php echo (!$is_plugin_exists)?"active":"" ?>"> |
| 1197 | <td> |
| 1198 | <span class="folder-info"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e("Export/Import", "folders"); ?></span> |
| 1199 | <span class="folder-text"><?php esc_html_e("Couldn't detect any external folders that can be imported. Please contact us if you have external folders that were not detected", "folders"); ?></span> |
| 1200 | </td> |
| 1201 | <td class="last-td"> |
| 1202 | <a href="https://premio.io/contact/" target="_blank" class="contact-folders-button"><?php esc_html_e("Contact Us", "folders"); ?></a> |
| 1203 | </td> |
| 1204 | </tr> |
| 1205 | <tr> |
| 1206 | <td colspan="2"><span class="danzer-title"><span class="dashicons dashicons-warning"></span> <?php esc_html_e("Danger Zone", "folders"); ?></span></td> |
| 1207 | </tr> |
| 1208 | <tr> |
| 1209 | <td> |
| 1210 | <span class="danger-info"><?php esc_html_e("Delete plugin data upon deletion", "folders"); ?></span> |
| 1211 | <span class="danger-data"><?php esc_html_e("Delete all folders when the plugin is removed. This feature will remove all existing folders created by the plugin upon deletion.", "folders"); ?> <b><?php esc_html_e("(Not recommended)", "folders"); ?></span></b> |
| 1212 | </td> |
| 1213 | <td class="last-td" > |
| 1214 | <div class="inline-checkbox"> |
| 1215 | <label class="folder-switch" for="remove_folders_when_removed"> |
| 1216 | <input type="checkbox" class="sr-only change-folder-status" name="customize_folders[remove_folders_when_removed]" id="remove_folders_when_removed" value="on" <?php checked($remove_folders_when_removed, "on") ?>> |
| 1217 | <div class="folder-slider round"></div> |
| 1218 | </label> |
| 1219 | </div> |
| 1220 | </td> |
| 1221 | </tr> |
| 1222 | <tr> |
| 1223 | <td> |
| 1224 | <span class="danger-info"><?php esc_html_e("Manual Data Removal", "folders"); ?></span> |
| 1225 | <span class="danger-data"><?php esc_html_e("Delete all folders data manually This feature will remove all existing folders created by the plugin. Use this feature with caution.", "folders"); ?> |
| 1226 | </td> |
| 1227 | <td class="last-td"> |
| 1228 | <a href="#" class="remove-folders-data"><?php esc_html_e("Delete Now", "folders"); ?></a> |
| 1229 | </td> |
| 1230 | </tr> |
| 1231 | </table> |
| 1232 | </div> |
| 1233 | </div> |
| 1234 | <div class="tab-content <?php echo esc_attr(($setting_page=="upgrade-to-pro")?"active":"") ?>"> |
| 1235 | <?php if($setting_page=="upgrade-to-pro") { ?> |
| 1236 | <style>#wpwrap { background: #f0f0f1 !important; }</style> |
| 1237 | <?php include_once "upgrade-table.php"; ?> |
| 1238 | <?php } ?> |
| 1239 | </div> |
| 1240 | <div class="tab-content <?php echo esc_attr(($setting_page=="folders-by-user")?"active":"") ?>" id="folders-by-user"> |
| 1241 | <?php |
| 1242 | $folders_by_users = !isset($customize_folders['folders_by_users'])?"off":$customize_folders['folders_by_users']; |
| 1243 | $dynamic_folders_for_admin_only = !isset($customize_folders['dynamic_folders_for_admin_only'])?"off":$customize_folders['dynamic_folders_for_admin_only']; |
| 1244 | ?> |
| 1245 | <?php if($setting_page=="folders-by-user") { ?> |
| 1246 | <div class="folders-by-user"> |
| 1247 | <div class="send-user-to-pro"> |
| 1248 | <div class="normal-box"> |
| 1249 | <table class="import-export-table"> |
| 1250 | <tr> |
| 1251 | <td> |
| 1252 | <span class="danger-info"><?php esc_html_e("Restrict users to their folders only", "folders"); ?></span> |
| 1253 | <span class="danger-data"><?php esc_html_e("Users will only be able to access their folders and media. Only Admin users will be able to view all folders", "folders"); ?> |
| 1254 | </td> |
| 1255 | <td class="last-td" > |
| 1256 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1257 | <span> |
| 1258 | <label class="folder-switch send-user-to-pro" for="dynamic_folders_for_admin_only"> |
| 1259 | <input type="hidden"> |
| 1260 | <div class="folder-slider round"></div> |
| 1261 | </label> |
| 1262 | </span> |
| 1263 | <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders') ?></button> |
| 1264 | </a> |
| 1265 | </td> |
| 1266 | </tr> |
| 1267 | </table> |
| 1268 | </div> |
| 1269 | <a class="upgrade-box" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1270 | <button type="button"><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 1271 | </a> |
| 1272 | </div> |
| 1273 | <div class="send-user-to-pro"> |
| 1274 | <div class="normal-box"> |
| 1275 | <table class="import-export-table"> |
| 1276 | <tr> |
| 1277 | <td> |
| 1278 | <span class="danger-info"><?php esc_html_e("Restrict access to dynamic folders", "folders"); ?></span> |
| 1279 | <span class="danger-data"><?php esc_html_e("Regular users will not access dynamic folders.", "folders"); ?></span> |
| 1280 | <span class="danger-data"><?php esc_html_e("Only Admin users will be able to view dynamic folders.", "folders"); ?></span> |
| 1281 | </td> |
| 1282 | <td class="last-td" > |
| 1283 | <a class="upgrade-box-link" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1284 | <span> |
| 1285 | <label class="folder-switch send-user-to-pro" for="folders_by_users"> |
| 1286 | <input type="hidden"> |
| 1287 | <div class="folder-slider round"></div> |
| 1288 | </label> |
| 1289 | </span> |
| 1290 | <button type="button" class="upgrade-link" ><?php esc_html_e("Upgrade to Pro", 'folders') ?></button> |
| 1291 | </a> |
| 1292 | </td> |
| 1293 | </tr> |
| 1294 | </table> |
| 1295 | </div> |
| 1296 | <a class="upgrade-box" target="_blank" href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" > |
| 1297 | <button type="button"><?php esc_html_e("Upgrade to Pro", 'folders'); ?></button> |
| 1298 | </a> |
| 1299 | </div> |
| 1300 | </div> |
| 1301 | <?php } ?> |
| 1302 | </div> |
| 1303 | </div> |
| 1304 | </div> |
| 1305 | <?php |
| 1306 | ?> |
| 1307 | <input type="hidden" name="folder_nonce" value="<?php echo wp_create_nonce("folder_settings") ?>"> |
| 1308 | <input type="hidden" name="folder_page" value="<?php echo $_SERVER['REQUEST_URI'] ?>"> |
| 1309 | <?php if($setting_page!="upgrade-to-pro") { ?> |
| 1310 | </form> |
| 1311 | <?php } ?> |
| 1312 | </div> |
| 1313 | |
| 1314 | <div class="folder-popup-form" id="import-plugin-data"> |
| 1315 | <div class="popup-form-content"> |
| 1316 | <div class="popup-content"> |
| 1317 | <div class="close-popup-button"> |
| 1318 | <a class="" href="javascript:;"><span></span></a> |
| 1319 | </div> |
| 1320 | <div class="import-folder-title"></div> |
| 1321 | <div class="import-folder-note">Are you sure you'd like to import $x folders from $plugin?</div> |
| 1322 | <div class="folder-form-buttons"> |
| 1323 | <button type="submit" class="form-submit-btn" id="import-folder-button"><?php esc_html_e("Import", 'folders'); ?></button> |
| 1324 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 1325 | </div> |
| 1326 | </div> |
| 1327 | </div> |
| 1328 | </div> |
| 1329 | |
| 1330 | <?php //if($plugin['is_exists']) { ?> |
| 1331 | <div class="folder-popup-form" id="import-folders-popup"> |
| 1332 | <div class="popup-form-content"> |
| 1333 | <div class="popup-content"> |
| 1334 | <div class="close-popup-button"> |
| 1335 | <a class="" href="javascript:;"><span></span></a> |
| 1336 | </div> |
| 1337 | <div class="import-plugin-title"><?php esc_html_e("Import data", 'folders'); ?></div> |
| 1338 | <div class="plugin-import-table"> |
| 1339 | <div class="import-folder-table"> |
| 1340 | <table> |
| 1341 | <tbody> |
| 1342 | <?php foreach ($plugin_info as $slug=>$plugin) { ?> |
| 1343 | <?php if($plugin['is_exists']) { ?> |
| 1344 | <tr class="other-plugins-<?php echo esc_attr__($slug) ?>" data-plugin="<?php echo esc_attr__($slug) ?>" data-nonce="<?php echo wp_create_nonce("import_data_from_".$slug) ?>" data-folders="<?php echo esc_attr($plugin['total_folders']) ?>" data-attachments="<?php echo esc_attr($plugin['total_attachments']) ?>"> |
| 1345 | <th class="plugin-name"><?php echo esc_attr__($plugin['name']) ?></th> |
| 1346 | <td> |
| 1347 | <span class="import-message"><?php printf(esc_html__("%s folder%s and %s attachment%s", "folders"), "<b>".$plugin['total_folders']."</b>", ($plugin['total_folders']>1)?esc_html__("s"):"" ,"<b>".$plugin['total_attachments']."</b>", ($plugin['total_attachments']>1)?esc_html__("s"):"") ?></span> |
| 1348 | <button type="button" class="button button-primary import-folder-data in-popup"><?php esc_html_e("Import", "folders"); ?> <span class="spinner"></span></button> |
| 1349 | <button type="button" class="button button-secondary remove-folder-data in-popup"><?php esc_html_e("Delete plugin data", "folders"); ?> <span class="spinner"></span></button> |
| 1350 | </td> |
| 1351 | </tr> |
| 1352 | <?php } ?> |
| 1353 | <?php } ?> |
| 1354 | </tbody> |
| 1355 | </table> |
| 1356 | </div> |
| 1357 | </div> |
| 1358 | <div class="folder-form-buttons"> |
| 1359 | <div class=""></div> |
| 1360 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Close", 'folders'); ?></a> |
| 1361 | </div> |
| 1362 | </div> |
| 1363 | </div> |
| 1364 | </div> |
| 1365 | <?php //} ?> |
| 1366 | |
| 1367 | <div class="folder-popup-form" id="remove-plugin-data"> |
| 1368 | <div class="popup-form-content"> |
| 1369 | <div class="popup-content"> |
| 1370 | <div class="close-popup-button"> |
| 1371 | <a class="" href="javascript:;"><span></span></a> |
| 1372 | </div> |
| 1373 | <div class="remove-folder-title"><?php esc_html_e("Are you sure?", 'folders'); ?></div> |
| 1374 | <div class="remove-folder-note"></div> |
| 1375 | <div class="folder-form-buttons"> |
| 1376 | <button type="submit" class="form-submit-btn delete-folder-plugin" id="remove-folder-button"><?php esc_html_e("Delete plugin data", 'folders'); ?></button> |
| 1377 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 1378 | </div> |
| 1379 | </div> |
| 1380 | </div> |
| 1381 | </div> |
| 1382 | |
| 1383 | <div class="folder-popup-form remove-folders-box" id="remove-folders-data-box"> |
| 1384 | <div class="popup-form-content"> |
| 1385 | <div class="popup-content"> |
| 1386 | <div class="close-popup-button close-remove-folders"> |
| 1387 | <a class="" href="javascript:;"><span></span></a> |
| 1388 | </div> |
| 1389 | <div class="remove-folder-title"><?php esc_html_e("Are you sure?", 'folders'); ?></div> |
| 1390 | <div class="remove-folder-note"><?php printf(esc_html__("Folders will remove all created folders once you remove the plugin. We recommend you %snot to use this feature%s if you plan to use Folders in future.", 'folders'), "<b>", "</b>"); ?></div> |
| 1391 | <div class="folder-form-buttons"> |
| 1392 | <a href="javascript:;" class="form-cancel-btn cancel-folders"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 1393 | <button type="submit" class="form-cancel-btn delete-button"><?php esc_html_e("I want to delete anyway", 'folders'); ?></button> |
| 1394 | </div> |
| 1395 | </div> |
| 1396 | </div> |
| 1397 | </div> |
| 1398 | |
| 1399 | <div class="folder-popup-form" id="remove-confirmation-box"> |
| 1400 | <div class="popup-form-content"> |
| 1401 | <div class="popup-content"> |
| 1402 | <form id="remove_folders_data" autocomplete="off" > |
| 1403 | <div class="close-popup-button"> |
| 1404 | <a class="" href="javascript:;"><span></span></a> |
| 1405 | </div> |
| 1406 | <div class="remove-folder-title"></div> |
| 1407 | <div class="remove-folder-note text-left"> |
| 1408 | <b><?php esc_html_e("Type DELETE to confirm", 'folders'); ?></b> |
| 1409 | <div class="input-box"> |
| 1410 | <input autocomplete="off" type="text" id="delete-input" name="delete" > |
| 1411 | </div> |
| 1412 | <div class="delete-confirmation-message"><?php esc_html_e('', 'folders'); ?></div> |
| 1413 | </div> |
| 1414 | <div class="folder-form-buttons"> |
| 1415 | <input type="hidden" name="nonce" id="remove-folder-nonce" value="<?php echo wp_create_nonce("remove_folders_data") ?>"> |
| 1416 | <input type="hidden" name="action" value="remove_all_folders_data"> |
| 1417 | <button disabled type="submit" class="form-submit-btn delete-button" id="remove-folders-data-button"><?php esc_html_e("Delete", 'folders'); ?></button> |
| 1418 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 1419 | </div> |
| 1420 | </form> |
| 1421 | </div> |
| 1422 | </div> |
| 1423 | </div> |
| 1424 | |
| 1425 | <?php |
| 1426 | $option = get_option("folder_intro_box"); |
| 1427 | if(($option == "show" || get_option("folder_redirect_status") == 2) && $is_plugin_exists) { ?> |
| 1428 | <div class="folder-popup-form" id="import-third-party-plugin-data" style="display: block" ?> |
| 1429 | <div class="popup-form-content"> |
| 1430 | <div class="popup-content"> |
| 1431 | <div class="close-popup-button"> |
| 1432 | <a class="" href="javascript:;"><span></span></a> |
| 1433 | </div> |
| 1434 | <div class="import-plugin-title"><?php esc_html_e("Import data", 'folders'); ?></div> |
| 1435 | <div class="import-plugin-note"><?php esc_html_e("We've detected that you use another folders plugin. Would you like the Folders plugin to import your current folders? Keep in mind you can always do it in Folders Settings -> Import", 'folders'); ?></div> |
| 1436 | <div class="plugin-import-table"> |
| 1437 | <div class="import-folder-table"> |
| 1438 | <table> |
| 1439 | <tbody> |
| 1440 | <?php foreach ($plugin_info as $slug=>$plugin) { |
| 1441 | if($plugin['is_exists']) { ?> |
| 1442 | <tr class="other-plugins-<?php echo esc_attr__($slug) ?>" data-plugin="<?php echo esc_attr__($slug) ?>" data-nonce="<?php echo wp_create_nonce("import_data_from_".$slug) ?>" data-folders="<?php echo esc_attr($plugin['total_folders']) ?>" data-attachments="<?php echo esc_attr($plugin['total_attachments']) ?>"> |
| 1443 | <th class="plugin-name"><?php echo esc_attr__($plugin['name']) ?></th> |
| 1444 | <td> |
| 1445 | <button type="button" class="button button-primary import-folder-data in-popup"><?php esc_html_e("Import", "folders"); ?> <span class="spinner"></span></button> |
| 1446 | <span class="import-message"><?php printf(esc_html__("%s folder%s and %s attachment%s", "folders"), "<b>".$plugin['total_folders']."</b>", ($plugin['total_folders']>1)?esc_html__("s"):"" ,"<b>".$plugin['total_attachments']."</b>", ($plugin['total_attachments']>1)?esc_html__("s"):"") ?></span> |
| 1447 | </td> |
| 1448 | </tr> |
| 1449 | <?php } |
| 1450 | } ?> |
| 1451 | </tbody> |
| 1452 | </table> |
| 1453 | </div> |
| 1454 | </div> |
| 1455 | <div class="folder-form-buttons"> |
| 1456 | <div class=""></div> |
| 1457 | <a href="javascript:;" id="cancel-plugin-import" class="form-cancel-btn"><?php esc_html_e("Close", 'folders'); ?></a> |
| 1458 | </div> |
| 1459 | </div> |
| 1460 | </div> |
| 1461 | </div> |
| 1462 | <?php |
| 1463 | if($option != "show") { |
| 1464 | update_option("folder_redirect_status", 3); |
| 1465 | } |
| 1466 | } ?> |
| 1467 | <div class="folder-popup-form" id="no-more-folder-credit"> |
| 1468 | <div class="popup-form-content"> |
| 1469 | <div class="popup-content"> |
| 1470 | <div class="close-popup-button"> |
| 1471 | <a class="" href="javascript:;"><span></span></a> |
| 1472 | </div> |
| 1473 | <div class="add-update-folder-title" id="folder-limitation-message"> |
| 1474 | <?php esc_html_e("You've reached the 10 folder limitation!", 'folders'); ?> |
| 1475 | </div> |
| 1476 | <div class="folder-form-message"> |
| 1477 | <?php esc_html_e("Unlock unlimited amount of folders by upgrading to one of our pro plans.", 'folders'); ?> |
| 1478 | </div> |
| 1479 | <div class="folder-form-buttons"> |
| 1480 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 1481 | <a href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" target="_blank" class="form-submit-btn"><?php esc_html_e("See Pro Plans", 'folders'); ?></a> |
| 1482 | </div> |
| 1483 | </div> |
| 1484 | </div> |
| 1485 | </div> |
| 1486 | <?php include_once "help.php" ?> |