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
general-settings.php
955 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin folders settings |
| 4 | * |
| 5 | * @author : Premio <contact@premio.io> |
| 6 | * @license : GPL2 |
| 7 | * */ |
| 8 | |
| 9 | if (! defined('ABSPATH')) { |
| 10 | exit; |
| 11 | } |
| 12 | ?> |
| 13 | <!-- do not change here, Free/Pro URL Change --> |
| 14 | <style> |
| 15 | <?php if (function_exists('is_rtl') && is_rtl()) { ?> |
| 16 | #setting-form { |
| 17 | float: right; |
| 18 | } |
| 19 | <?php } ?> |
| 20 | </style> |
| 21 | <script> |
| 22 | (function (factory) { |
| 23 | "use strict"; |
| 24 | if (typeof define === 'function' && define.amd) { |
| 25 | define(['jquery'], factory); |
| 26 | } |
| 27 | else if(typeof module !== 'undefined' && module.exports) { |
| 28 | module.exports = factory(require('jquery')); |
| 29 | } |
| 30 | else { |
| 31 | factory(jQuery); |
| 32 | } |
| 33 | }(function ($, undefined) { |
| 34 | var selectedItem; |
| 35 | var importTitle = "<?php esc_html_e("Import folders from %plugin%", "folders"); ?>"; |
| 36 | var importDesc = "<?php esc_html_e("Are you sure you'd like to import %1\$d folders from %plugin%?", "folders"); ?>"; |
| 37 | var removeTitle = "<?php esc_html_e("Are you sure?", "folders"); ?>"; |
| 38 | var removeDesc = "<?php esc_html_e("You're about to delete %plugin%'s folders. Are you sure you'd like to proceed?", "folders"); ?>"; |
| 39 | $(document).ready(function(){ |
| 40 | <?php if ($setting_page == "folder-settings") { ?> |
| 41 | $(".select2-box").select2(); |
| 42 | $("#folders_post_type").select2(); |
| 43 | $(".folder-post-select").select2(); |
| 44 | $(".folder-post-select").on("change", function (e) { |
| 45 | $(this).val() |
| 46 | var thisID = $(this).attr("id"); |
| 47 | var folderURL = $("#"+thisID+" option:selected").data("url"); |
| 48 | var folderType = $(this).data("folder"); |
| 49 | $("#link-for-"+folderType).attr("href", folderURL); |
| 50 | }); |
| 51 | $("#folders_post_type").on("change", function (e) { |
| 52 | $(".folder-post-type").addClass("hide-option"); |
| 53 | if($(this).find("option:selected[value='folders-pro']").length) { |
| 54 | e.preventDefault(); |
| 55 | $(this).find("option:selected[value='folders-pro']").prop("selected", false); |
| 56 | $(this).trigger("change"); |
| 57 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 58 | } |
| 59 | $(this).find("option:selected").each(function () { |
| 60 | $("#folders-for-" + $(this).attr("value")).removeClass("hide-option"); |
| 61 | }); |
| 62 | }); |
| 63 | $(".folder-post-select").on("change", function () { |
| 64 | if ($(this).val() == "folders-pro") { |
| 65 | $(this).val("").trigger("change"); |
| 66 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 67 | } |
| 68 | }); |
| 69 | <?php } ?> |
| 70 | <?php |
| 71 | $focus = filter_input(INPUT_GET, 'focus'); |
| 72 | if($focus == "icon-color") { |
| 73 | $hide_folder_color_pop_up = get_option("hide_folder_color_pop_up"); |
| 74 | if(!($hide_folder_color_pop_up)) { |
| 75 | add_option("hide_folder_color_pop_up", "yes"); |
| 76 | } else { |
| 77 | update_option("hide_folder_color_pop_up", "yes"); |
| 78 | } |
| 79 | ?> |
| 80 | $(".default-icon-color").addClass("add-focus-animate"); |
| 81 | <?php } ?> |
| 82 | $(document).on("click",".form-cancel-btn, .close-popup-button, .folder-popup-form",function(){ |
| 83 | if($(this).hasClass("cancel-folders") || $(this).hasClass("remove-folders-box") || $(this).hasClass("close-remove-folders")) { |
| 84 | $("#remove_folders_when_removed").prop("checked", false); |
| 85 | setFoldersRemoveStatus("off"); |
| 86 | } |
| 87 | if($(this).hasClass("delete-button")) { |
| 88 | setFoldersRemoveStatus("on"); |
| 89 | } |
| 90 | $(".folder-popup-form").hide(); |
| 91 | if($(this).closest(".folder-popup-form").attr("id") == "import-third-party-plugin-data") { |
| 92 | if($("#wordpress-popup").length) { |
| 93 | $("#wordpress-popup").show(); |
| 94 | } |
| 95 | } |
| 96 | }); |
| 97 | $("#save-settings").on("click", function(){ |
| 98 | $("#setting-form #submit").trigger("click"); |
| 99 | }); |
| 100 | const form = document.getElementById('setting-form'); |
| 101 | let isFormDirty = false; |
| 102 | const formOldValues = $('#setting-form').serialize(); |
| 103 | |
| 104 | $(document).on("change", "#setting-form", function () { |
| 105 | isFormDirty = formOldValues !== $('#setting-form').serialize() |
| 106 | }); |
| 107 | |
| 108 | window.addEventListener('beforeunload', (event) => { |
| 109 | if (isFormDirty) { |
| 110 | const confirmationMessage = 'You have unsaved changes. Are you sure you want to leave this page?'; |
| 111 | event.returnValue = confirmationMessage; |
| 112 | return confirmationMessage; |
| 113 | } |
| 114 | }); |
| 115 | |
| 116 | // Reset isFormDirty on form submit |
| 117 | form.addEventListener('submit', () => { |
| 118 | isFormDirty = false; |
| 119 | }); |
| 120 | $(document).on("click",".import-folders-button", function(e){ |
| 121 | $("#import-folders-popup").show(); |
| 122 | }); |
| 123 | $(document).on("click",".popup-form-content", function(e){ |
| 124 | e.stopPropagation(); |
| 125 | e.stopImmediatePropagation(); |
| 126 | }); |
| 127 | $(document).on("click",".folder-select",function(){ |
| 128 | if($(this).is(":checked")) { |
| 129 | $(this).closest("tr").find(".hide-show-option").removeClass("hide-option"); |
| 130 | } else { |
| 131 | $(this).closest("tr").find(".hide-show-option").addClass("hide-option"); |
| 132 | } |
| 133 | }); |
| 134 | $(document).on("click", ".accordion-header", function(){ |
| 135 | if($(this).hasClass("active")) { |
| 136 | $(this).closest(".accordion").find(".accordion-content").slideUp(); |
| 137 | $(this).removeClass("active"); |
| 138 | } else { |
| 139 | $(this).closest(".accordion").find(".accordion-content").slideDown(); |
| 140 | $(this).addClass("active"); |
| 141 | } |
| 142 | }); |
| 143 | $(document).on("change", ".hide-show-option", function(){ |
| 144 | if($(this).val() == "folders-pro") { |
| 145 | $(this).find("option").prop("selected", false); |
| 146 | $(this).find("option:first").prop("selected", true); |
| 147 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 148 | } |
| 149 | }); |
| 150 | $(document).on("change", "#folder_font", function(){ |
| 151 | if($(this).val() == "folders-pro") { |
| 152 | $(this).val("").trigger("change"); |
| 153 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 154 | } |
| 155 | }); |
| 156 | $(document).on("click",".view-shortcodes", function(e){ |
| 157 | e.preventDefault(); |
| 158 | $("#keyboard-shortcut").show(); |
| 159 | }); |
| 160 | $(document).on("change", "#folder_size", function(){ |
| 161 | if($(this).val() == "folders-pro" || $(this).val() == "folders-pro-item" || $(this).val() == "folders-item-pro") { |
| 162 | $(this).val("16").trigger("change"); |
| 163 | window.open("<?php echo esc_url($this->getFoldersUpgradeURL()) ?>", "_blank"); |
| 164 | } |
| 165 | }); |
| 166 | $(".accordion-header:first").trigger("click"); |
| 167 | $("#folder_font, #folder_size").change(function(){ |
| 168 | setCSSProperties(); |
| 169 | }); |
| 170 | $(document).on("click", "input[name='customize_folders[show_media_details]']", function(){ |
| 171 | if($("#show_media_details").is(":checked")) { |
| 172 | $(".media-setting-box").addClass("active"); |
| 173 | } else { |
| 174 | $(".media-setting-box").removeClass("active"); |
| 175 | } |
| 176 | }); |
| 177 | $(document).on("change", "input[name='customize_folders[default_icon_color]']:checked", function(){ |
| 178 | setCSSProperties(); |
| 179 | }); |
| 180 | setCSSProperties(); |
| 181 | $('.color-field').spectrum({ |
| 182 | chooseText: "Submit", |
| 183 | preferredFormat: "hex", |
| 184 | showInput: true, |
| 185 | cancelText: "Cancel", |
| 186 | move: function (color) { |
| 187 | $(this).val(color.toHexString()); |
| 188 | setCSSProperties(); |
| 189 | }, |
| 190 | change: function (color) { |
| 191 | $(this).val(color.toHexString()); |
| 192 | setCSSProperties(); |
| 193 | } |
| 194 | }); |
| 195 | $(document).on("click", "input[name='customize_folders[remove_folders_when_removed]']", function(e){ |
| 196 | if($(this).is(":checked")) { |
| 197 | $("#remove-folders-data-box").show(); |
| 198 | //setFoldersRemoveStatus("on"); |
| 199 | } else { |
| 200 | setFoldersRemoveStatus("off"); |
| 201 | } |
| 202 | }) |
| 203 | $(document).on("click", ".import-folder-data", function(e){ |
| 204 | selectedItem = $(this).closest("tr").data("plugin"); |
| 205 | if(!$(this).hasClass("in-popup")) { |
| 206 | var pluginName = $(this).closest("tr").find(".plugin-name").html(); |
| 207 | var pluginFolders = parseInt($(this).closest("tr").data("folders")); |
| 208 | var popupTitle = importTitle.replace("%plugin%", pluginName); |
| 209 | $(".import-folder-title").html(popupTitle); |
| 210 | var popupDesc = importDesc.replace("%plugin%", "<b>" + pluginName + "</b>"); |
| 211 | popupDesc = popupDesc.replace("%d", "<b>" + pluginFolders + "</b>"); |
| 212 | $(".import-folder-note").html(popupDesc); |
| 213 | $("#import-plugin-data").show(); |
| 214 | } else { |
| 215 | importPluginData(); |
| 216 | } |
| 217 | }); |
| 218 | $(document).on("click", ".remove-folders-data", function(e){ |
| 219 | e.preventDefault(); |
| 220 | $("#remove-confirmation-box").show(); |
| 221 | $("#delete-input").focus(); |
| 222 | }); |
| 223 | $(document).on("keyup", "#delete-input", function(){ |
| 224 | if($.trim($(this).val()) != "") { |
| 225 | var inputVal = $.trim($(this).val()).toLowerCase(); |
| 226 | if (inputVal == "delete") { |
| 227 | $("#remove-folders-data-button").prop("disabled", false); |
| 228 | $(".delete-confirmation-message").html("<?php esc_html_e('This will delete all existing folders & settings', 'folders'); ?>"); |
| 229 | } else { |
| 230 | $("#remove-folders-data-button").prop("disabled", true); |
| 231 | if (inputVal != "") { |
| 232 | var textLen = inputVal.length; |
| 233 | var curStr = ("delete").substring(0, textLen); |
| 234 | if (curStr != inputVal) { |
| 235 | $(".delete-confirmation-message").html("<?php esc_html_e('Please type DELETE and click on the "Delete" button to confirm', 'folders'); ?>"); |
| 236 | } else { |
| 237 | $(".delete-confirmation-message").html(""); |
| 238 | } |
| 239 | } else { |
| 240 | $(".delete-confirmation-message").html(""); |
| 241 | } |
| 242 | } |
| 243 | } else { |
| 244 | $(".delete-confirmation-message").html(""); |
| 245 | } |
| 246 | }); |
| 247 | $(document).on("submit", "#remove_folders_data", function(e){ |
| 248 | e.preventDefault(); |
| 249 | if($.trim($("#delete-input").val()).toLowerCase() == "delete") { |
| 250 | $.ajax({ |
| 251 | url: "<?php echo esc_url(admin_url("admin-ajax.php")) ?>", |
| 252 | data: { |
| 253 | action: 'wcp_remove_all_folders_data', |
| 254 | nonce: $("#remove-folder-nonce").val() |
| 255 | }, |
| 256 | type: 'post', |
| 257 | success: function(res) { |
| 258 | <?php |
| 259 | $redirectURL = $this->getFolderSettingsURL(); |
| 260 | if (!empty($redirectURL)) { |
| 261 | $page = filter_input(INPUT_POST, 'tab_page'); |
| 262 | $type = filter_input(INPUT_GET, 'setting_page'); |
| 263 | $type = empty($type) ? "" : "&setting_page=".esc_attr($type); |
| 264 | $redirectURL = $redirectURL.$type; |
| 265 | if (!empty($page)) { |
| 266 | $redirectURL .= "&setting_page=".esc_attr($page); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | $redirectURL = $redirectURL."¬e=2"; |
| 271 | ?> |
| 272 | window.location = "<?php echo esc_url($redirectURL) ?>"; |
| 273 | } |
| 274 | }); |
| 275 | } |
| 276 | return false; |
| 277 | }); |
| 278 | $(document).on("change", "#delete-input", function(){ |
| 279 | if($.trim($(this).val()).toLowerCase() == "delete") { |
| 280 | $("#remove-folders-data-button").prop("disabled", false); |
| 281 | } else { |
| 282 | $("#remove-folders-data-button").prop("disabled", true); |
| 283 | } |
| 284 | }); |
| 285 | $(document).on("click", "#import-folder-button", function(e){ |
| 286 | importPluginData(); |
| 287 | }); |
| 288 | $(document).on("click", "#folders_by_user_roles", function(e){ |
| 289 | if($(this).is(":checked")) { |
| 290 | $(".folder-user-settings").addClass("active"); |
| 291 | } else { |
| 292 | $(".folder-user-settings").removeClass("active"); |
| 293 | } |
| 294 | }); |
| 295 | $(document).on("click", ".remove-folder-data", function(e){ |
| 296 | selectedItem = $(this).closest("tr").data("plugin"); |
| 297 | var pluginName = $(this).closest("tr").find(".plugin-name").html(); |
| 298 | var pluginFolders = parseInt($(this).closest("tr").data("folders")); |
| 299 | var popupTitle = removeTitle.replace("%plugin%", pluginName); |
| 300 | $(".remove-folder-title").html(popupTitle); |
| 301 | var popupDesc = removeDesc.replace("%plugin%", "<b>" + pluginName + "</b>"); |
| 302 | popupDesc = popupDesc.replace("%d", "<b>" + pluginFolders + "</b>"); |
| 303 | $(".remove-folder-note").html(popupDesc); |
| 304 | $("#remove-plugin-data").show(); |
| 305 | }); |
| 306 | $(document).on("click", "#remove-folder-button", function(){ |
| 307 | removePluginData(); |
| 308 | }); |
| 309 | setTooltipPosition(); |
| 310 | |
| 311 | $(document).on("click", ".checkbox-color", function(){ |
| 312 | setCSSProperties(); |
| 313 | }); |
| 314 | |
| 315 | $(document).on("change", ".checkbox-color", function(){ |
| 316 | setCSSProperties(); |
| 317 | }); |
| 318 | $(document).on("click", "#use_folder_undo", function(){ |
| 319 | if($(this).is(":checked")) { |
| 320 | $(".timeout-settings").addClass("active"); |
| 321 | } else { |
| 322 | $(".timeout-settings").removeClass("active"); |
| 323 | } |
| 324 | }); |
| 325 | $('.enable-replace-media').hover( |
| 326 | function(){ |
| 327 | //$(this).addClass('hover') |
| 328 | }, |
| 329 | function(){ |
| 330 | $(this).removeClass('show') |
| 331 | } |
| 332 | ) |
| 333 | $('.enable-replace-media .html-tooltip').hover( |
| 334 | function(){ |
| 335 | $(this).closest(".enable-replace-media").addClass('show') |
| 336 | }, |
| 337 | function(){ |
| 338 | //$(this).removeClass('show') |
| 339 | } |
| 340 | ) |
| 341 | }); |
| 342 | |
| 343 | function setFoldersRemoveStatus(status) { |
| 344 | $.ajax({ |
| 345 | url: "<?php echo esc_url(admin_url("admin-ajax.php")) ?>", |
| 346 | data: { |
| 347 | 'action': 'wcp_update_folders_uninstall_status', |
| 348 | 'status': status, |
| 349 | 'nonce': "<?php echo esc_attr(wp_create_nonce("wcp_folders_uninstall_status")) ?>" |
| 350 | }, |
| 351 | type: 'post', |
| 352 | success: function (res) { |
| 353 | |
| 354 | } |
| 355 | }); |
| 356 | } |
| 357 | |
| 358 | var totalAttachments = 0; |
| 359 | |
| 360 | function importPluginData() { |
| 361 | $("#import-folder-button").addClass("button"); |
| 362 | $("#import-folder-button").prop("disabled", true); |
| 363 | $(".import-folder-data").prop("disabled", true); |
| 364 | $(".other-plugins-"+selectedItem+" .import-folder-data .spinner").addClass("active"); |
| 365 | totalAttachments = 0; |
| 366 | importPluginDataByPage(1); |
| 367 | } |
| 368 | |
| 369 | function importPluginDataByPage(pageNo) { |
| 370 | $.ajax({ |
| 371 | url: "<?php echo esc_url(admin_url("admin-ajax.php")) ?>", |
| 372 | data: { |
| 373 | 'plugin': $(".other-plugins-"+selectedItem).data("plugin"), |
| 374 | 'nonce': $(".other-plugins-"+selectedItem).data("nonce"), |
| 375 | 'action': 'wcp_import_plugin_folders_data', |
| 376 | 'paged' : pageNo, |
| 377 | 'attached': totalAttachments |
| 378 | }, |
| 379 | type: 'post', |
| 380 | success: function(res){ |
| 381 | var response = $.parseJSON(res); |
| 382 | if(response.status == -1) { |
| 383 | totalAttachments = 0; |
| 384 | $(".import-folder-data").prop("disabled", false); |
| 385 | $(".other-plugins-"+selectedItem+" .import-folder-data .spinner").removeClass("active"); |
| 386 | $("#import-third-party-plugin-data").hide(); |
| 387 | $("#no-more-folder-credit").show(); |
| 388 | $("#import-folder-button").removeClass("button"); |
| 389 | $("#import-folder-button").prop("disabled", false); |
| 390 | } else if(response.status) { |
| 391 | $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("success-import"); |
| 392 | |
| 393 | if(parseInt(response.data.pages) > parseInt(response.data.current)) { |
| 394 | totalAttachments = response.data.attachments; |
| 395 | importPluginDataByPage(parseInt(response.data.current)+1); |
| 396 | } else { |
| 397 | totalAttachments = 0; |
| 398 | $(".other-plugins-"+response.data.plugin+" .import-folder-data").remove(); |
| 399 | $(".import-folder-data").prop("disabled", false); |
| 400 | } |
| 401 | } else { |
| 402 | $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("error-import"); |
| 403 | $(".other-plugins-"+response.data.plugin+" .import-folder-data").remove(); |
| 404 | $(".import-folder-data").prop("disabled", false); |
| 405 | totalAttachments = 0; |
| 406 | } |
| 407 | $("#import-folder-button").prop("disabled", false); |
| 408 | $("#import-plugin-data").hide(); |
| 409 | } |
| 410 | }); |
| 411 | } |
| 412 | |
| 413 | function removePluginData() { |
| 414 | $(".other-plugins-"+selectedItem+" .remove-folder-data .spinner").addClass("active"); |
| 415 | $.ajax({ |
| 416 | url: "<?php echo esc_url(admin_url("admin-ajax.php")) ?>", |
| 417 | data: { |
| 418 | 'plugin': $(".other-plugins-"+selectedItem).data("plugin"), |
| 419 | 'nonce': $(".other-plugins-"+selectedItem).data("nonce"), |
| 420 | 'action': 'wcp_remove_plugin_folders_data' |
| 421 | }, |
| 422 | type: 'post', |
| 423 | success: function(res){ |
| 424 | var response = $.parseJSON(res); |
| 425 | $("#remove-plugin-data").hide(); |
| 426 | if(response.status) { |
| 427 | $(".other-plugins-"+response.data.plugin).remove(); |
| 428 | } else { |
| 429 | $(".other-plugins-"+response.data.plugin+" .import-message").html(response.message).addClass("error-import"); |
| 430 | $(".other-plugins-"+response.data.plugin+" .remove-folder-data .spinner").removeClass("active"); |
| 431 | } |
| 432 | |
| 433 | if($("#import-folders-popup .plugin-import-table tr").length == 0) { |
| 434 | $("#import-folders-popup").hide(); |
| 435 | $(".has-other-plugins").remove(); |
| 436 | $(".no-more-plugins").addClass("active"); |
| 437 | } |
| 438 | } |
| 439 | }); |
| 440 | } |
| 441 | |
| 442 | function setCSSProperties() { |
| 443 | if(jQuery("#new_folder_color").length && $("#new_folder_color").val() != "") { |
| 444 | $("#add-new-folder").css("border-color", $("#new_folder_color").val()); |
| 445 | $("#add-new-folder").css("background-color", $("#new_folder_color").val()); |
| 446 | } else if ($("input[name='customize_folders[new_folder_color]']:checked").length) { |
| 447 | $("#add-new-folder").css("border-color", $("input[name='customize_folders[new_folder_color]']:checked").val()); |
| 448 | $("#add-new-folder").css("background-color", $("input[name='customize_folders[new_folder_color]']:checked").val()); |
| 449 | } |
| 450 | |
| 451 | if($("#bulk_organize_button_color").length && $("#bulk_organize_button_color").val() != "") { |
| 452 | $(".organize-button").css("border-color", $("#bulk_organize_button_color").val()); |
| 453 | $(".organize-button").css("background-color", $("#bulk_organize_button_color").val()); |
| 454 | $(".organize-button").css("color", "#ffffff"); |
| 455 | } else if ($("input[name='customize_folders[bulk_organize_button_color]']:checked").length) { |
| 456 | $(".organize-button").css("border-color", $("input[name='customize_folders[bulk_organize_button_color]']:checked").val()); |
| 457 | $(".organize-button").css("background-color", $("input[name='customize_folders[bulk_organize_button_color]']:checked").val()); |
| 458 | $(".organize-button").css("color", "#ffffff"); |
| 459 | } |
| 460 | |
| 461 | if($("#dropdown_color").length && $("#dropdown_color").val() != "") { |
| 462 | $(".media-select").css("border-color", $("#dropdown_color").val()); |
| 463 | $(".media-select").css("color", $("#dropdown_color").val()); |
| 464 | } else if ($("input[name='customize_folders[dropdown_color]']:checked").length) { |
| 465 | $(".media-select").css("border-color", $("input[name='customize_folders[dropdown_color]']:checked").val()); |
| 466 | $(".media-select").css("color", $("input[name='customize_folders[dropdown_color]']:checked").val()); |
| 467 | } |
| 468 | |
| 469 | if($("#folder_bg_color").length && $("#folder_bg_color").val() != "") { |
| 470 | $(".all-posts.active-item-link").css("border-color", $("#folder_bg_color").val()); |
| 471 | $(".all-posts.active-item-link").css("background-color", $("#folder_bg_color").val()); |
| 472 | $(".all-posts.active-item-link").css("color", "#ffffff"); |
| 473 | } else if ($("input[name='customize_folders[folder_bg_color]']:checked").length) { |
| 474 | $(".all-posts.active-item-link").css("border-color", $("input[name='customize_folders[folder_bg_color]']:checked").val()); |
| 475 | $(".all-posts.active-item-link").css("background-color", $("input[name='customize_folders[folder_bg_color]']:checked").val()); |
| 476 | $(".all-posts.active-item-link").css("color", "#ffffff"); |
| 477 | } |
| 478 | |
| 479 | $("#custom-css").html(""); |
| 480 | if($("#folder_font").val() != "") { |
| 481 | font_val = $("#folder_font").val(); |
| 482 | if(font_val == "System Stack") { |
| 483 | font_val = "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"; |
| 484 | } else { |
| 485 | $('head').append('<link href="https://fonts.googleapis.com/css?family=' + font_val + ':400,600,700" rel="stylesheet" type="text/css" class="chaty-google-font">'); |
| 486 | } |
| 487 | $('.preview-box').css('font-family', font_val); |
| 488 | } else { |
| 489 | $('.preview-box').css('style', ""); |
| 490 | } |
| 491 | if($("#folder_size").val() != "") { |
| 492 | $(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", $("#folder_size").val()+"px"); |
| 493 | } else { |
| 494 | $(".folder-list li a span, .header-posts a, .un-categorised-items a").css("font-size", "14px"); |
| 495 | } |
| 496 | |
| 497 | var folderColor = "#334155"; |
| 498 | if($("input[name='customize_folders[default_icon_color]']:checked").length) { |
| 499 | folderColor = $("input[name='customize_folders[default_icon_color]']:checked").val(); |
| 500 | } |
| 501 | $(".folder-list i").css("color", folderColor); |
| 502 | } |
| 503 | |
| 504 | $(window).on("scroll", function(){ |
| 505 | setTooltipPosition(); |
| 506 | }).on("resize", function(){ |
| 507 | setTooltipPosition(); |
| 508 | }); |
| 509 | |
| 510 | function setTooltipPosition() { |
| 511 | if($(".html-tooltip:not(.no-position)").length) { |
| 512 | $(".html-tooltip:not(.no-position)").each(function(){ |
| 513 | if($(this).offset().top - $(window).scrollTop() > 540) { |
| 514 | $(this).addClass("top").removeClass("side").removeClass("bottom"); |
| 515 | $(this).find(".tooltip-text").attr("style",""); |
| 516 | $(this).find(".tooltip-text").removeClass("hide-arrow"); |
| 517 | } else if($(window).height() - ($(this).offset().top - $(window).scrollTop()) > 460) { |
| 518 | $(this).addClass("bottom").removeClass("top").removeClass("side"); |
| 519 | $(this).find(".tooltip-text").attr("style",""); |
| 520 | $(this).find(".tooltip-text").removeClass("hide-arrow"); |
| 521 | } else { |
| 522 | $(this).addClass("side").removeClass("top").removeClass("bottom"); |
| 523 | if($(this).find(".tooltip-text").length) { |
| 524 | $(this).find(".tooltip-text").attr("style",""); |
| 525 | $(this).find(".tooltip-text").removeClass("hide-arrow"); |
| 526 | |
| 527 | if($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50 < 0) { |
| 528 | $(this).find(".tooltip-text").css("margin-top", Math.abs($(this).find(".tooltip-text").offset().top - $(window).scrollTop() - 50)+"px"); |
| 529 | $(this).find(".tooltip-text").addClass("hide-arrow"); |
| 530 | } else { |
| 531 | $(this).find(".tooltip-text").attr("style",""); |
| 532 | if(($(this).find(".tooltip-text").offset().top + parseInt($(this).find(".tooltip-text").outerHeight()) - $(window).scrollTop() - $(window).height()) > 0) { |
| 533 | $(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"); |
| 534 | $(this).find(".tooltip-text").addClass("hide-arrow"); |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | } |
| 539 | }); |
| 540 | } |
| 541 | } |
| 542 | })); |
| 543 | </script> |
| 544 | <div id="custom-css"> |
| 545 | |
| 546 | </div> |
| 547 | <?php |
| 548 | // Check website is hosted on wp.org or not |
| 549 | $wp_status = get_option("is_web_hosted_on_wp"); |
| 550 | if ($wp_status === false) { |
| 551 | $site_url = site_url("/"); |
| 552 | $domain = wp_parse_url($site_url); |
| 553 | |
| 554 | $options = [ |
| 555 | 'http' => ['ignore_errors' => true], |
| 556 | ]; |
| 557 | |
| 558 | $webLink = $domain['host']; |
| 559 | |
| 560 | $context = stream_context_create($options); |
| 561 | $response = wp_remote_get('https://public-api.wordpress.com/rest/v1/sites/'.$webLink); |
| 562 | if (!is_wp_error($response)) { |
| 563 | $data = wp_remote_retrieve_body($response); |
| 564 | $response = json_decode($data, true); |
| 565 | |
| 566 | if (!empty($response) && is_array($response)) { |
| 567 | if (isset($response['ID']) && !empty($response['ID'])) { |
| 568 | add_option("is_web_hosted_on_wp", "yes"); |
| 569 | $wp_status = "yes"; |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | }//end if |
| 574 | |
| 575 | if ($wp_status === false) { |
| 576 | if (!function_exists("get_current_user_id")) { |
| 577 | add_option("is_web_hosted_on_wp", "yes"); |
| 578 | $wp_status = "yes"; |
| 579 | } |
| 580 | } |
| 581 | |
| 582 | if ($wp_status === false) { |
| 583 | add_option("is_web_hosted_on_wp", "no"); |
| 584 | } |
| 585 | |
| 586 | $show_media_popup = false; |
| 587 | if ($wp_status == "yes") { |
| 588 | $popup_shown = get_option("is_wp_media_popup_shown"); |
| 589 | if ($popup_shown === false) { |
| 590 | $show_media_popup = true; |
| 591 | add_option("is_wp_media_popup_shown", 1); |
| 592 | } else { |
| 593 | if (!is_numeric($popup_shown)) { |
| 594 | $popup_shown = 1; |
| 595 | } |
| 596 | |
| 597 | $popup_shown++; |
| 598 | if ($popup_shown < 4) { |
| 599 | $show_media_popup = true; |
| 600 | } |
| 601 | |
| 602 | update_option("is_wp_media_popup_shown", $popup_shown); |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | ?> |
| 607 | <div class="wrap"> |
| 608 | <h1 class="folders-header"> |
| 609 | <span><?php esc_html_e('Folders Settings', 'folders'); ?></span> |
| 610 | <?php if ($setting_page == "folder-settings" || $setting_page == "customize-folders") { ?> |
| 611 | <button class="button button-primary" id="save-settings"><?php esc_html_e('Save Settings', 'folders'); ?></button> |
| 612 | <?php } ?> |
| 613 | </h1> |
| 614 | <?php |
| 615 | settings_fields('folders_settings'); |
| 616 | settings_fields('default_folders'); |
| 617 | settings_fields('customize_folders'); |
| 618 | $options = get_option('folders_settings'); |
| 619 | $default_folders = get_option('default_folders'); |
| 620 | $customize_folders = get_option('customize_folders'); |
| 621 | $default_folders = (empty($default_folders) || !is_array($default_folders)) ? [] : $default_folders; |
| 622 | do_settings_sections(__FILE__); |
| 623 | delete_transient("premio_folders_without_trash"); |
| 624 | $note = filter_input(INPUT_GET, "note"); |
| 625 | ?> |
| 626 | <?php if ($note == 1) { ?> |
| 627 | <div class="folder-notification notice notice-success is-dismissible"> |
| 628 | <div class="folder-notification-title"><?php esc_html_e("Changes Saved", "folders") ?></div> |
| 629 | <div class="folder-notification-note"><?php esc_html_e("Your changes have been saved.", "folders") ?></div> |
| 630 | </div> |
| 631 | <?php } else if ($note == 2) {?> |
| 632 | <div class="folder-notification notice notice-error is-dismissible"> |
| 633 | <div class="folder-notification-title"><?php esc_html_e("Folders Deleted", "folders") ?></div> |
| 634 | <div class="folder-notification-note"><?php esc_html_e("All folders has been successfully deleted.", "folders") ?></div> |
| 635 | </div> |
| 636 | <?php } ?> |
| 637 | <?php if ($setting_page != "license-key") { ?> |
| 638 | <form action="options.php" method="post" id="setting-form"> |
| 639 | <input type="hidden" name="tab_page" value="<?php echo esc_attr($setting_page) ?>"> |
| 640 | <?php } ?> |
| 641 | <div class="folders-tabs"> |
| 642 | <div class="folder-tab-menu"> |
| 643 | <ul> |
| 644 | <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> |
| 645 | <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> |
| 646 | <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> |
| 647 | <li><a class="<?php echo esc_attr(($setting_page == "notification-settings") ? "active" : "") ?>" href="<?php echo esc_url($settingURL."&setting_page=notification-settings") ?>"><?php esc_html_e('Notifications', 'folders'); ?></a></li> |
| 648 | <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> |
| 649 | <?php if ($isInSettings) { ?> |
| 650 | <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> |
| 651 | <?php } ?> |
| 652 | </ul> |
| 653 | </div> |
| 654 | <div class="folder-tab-content"> |
| 655 | |
| 656 | <?php include_once dirname(dirname(__FILE__))."/admin/settings-tabs/folder-settings.php"; ?> |
| 657 | |
| 658 | <?php include_once dirname(dirname(__FILE__))."/admin/settings-tabs/customize-folders.php"; ?> |
| 659 | |
| 660 | <?php include_once dirname(dirname(__FILE__))."/admin/settings-tabs/folders-import.php"; ?> |
| 661 | |
| 662 | <?php include_once dirname(dirname(__FILE__))."/admin/settings-tabs/notification-settings.php"; ?> |
| 663 | |
| 664 | <div class="tab-content <?php echo esc_attr(($setting_page == "upgrade-to-pro") ? "active" : "") ?>"> |
| 665 | <?php if ($setting_page == "upgrade-to-pro") { ?> |
| 666 | <?php include_once "upgrade-table.php"; ?> |
| 667 | <?php } ?> |
| 668 | </div> |
| 669 | |
| 670 | <?php include_once dirname(dirname(__FILE__))."/admin/settings-tabs/folders-by-user.php"; ?> |
| 671 | |
| 672 | |
| 673 | </div> |
| 674 | </div> |
| 675 | <?php |
| 676 | ?> |
| 677 | <input type="hidden" name="folder_nonce" value="<?php echo esc_attr(wp_create_nonce("folder_settings")) ?>"> |
| 678 | <input type="hidden" name="folder_page" value="<?php echo filter_input(INPUT_SERVER, "REQUEST_URI") ?>"> |
| 679 | <?php if ($setting_page != "upgrade-to-pro") { ?> |
| 680 | </form> |
| 681 | <?php } ?> |
| 682 | </div> |
| 683 | |
| 684 | <div class="folder-popup-form" id="import-plugin-data"> |
| 685 | <div class="popup-form-content"> |
| 686 | <div class="folder-modal-content"> |
| 687 | <div class="close-popup-button"> |
| 688 | <a class="" href="javascript:;"><span></span></a> |
| 689 | </div> |
| 690 | <div class="import-folder-title"></div> |
| 691 | <div class="import-folder-note">Are you sure you'd like to import $x folders from $plugin?</div> |
| 692 | <div class="folder-form-buttons"> |
| 693 | <button type="submit" class="form-submit-btn" id="import-folder-button"><?php esc_html_e("Import", 'folders'); ?></button> |
| 694 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 695 | </div> |
| 696 | </div> |
| 697 | </div> |
| 698 | </div> |
| 699 | |
| 700 | <?php |
| 701 | // if($plugin['is_exists']) { ?> |
| 702 | <div class="folder-popup-form" id="import-folders-popup"> |
| 703 | <div class="popup-form-content"> |
| 704 | <div class="folder-modal-content"> |
| 705 | <div class="close-popup-button"> |
| 706 | <a class="" href="javascript:;"><span></span></a> |
| 707 | </div> |
| 708 | <div class="import-plugin-title"><?php esc_html_e("Import data", 'folders'); ?></div> |
| 709 | <div class="plugin-import-table"> |
| 710 | <div class="import-folder-table"> |
| 711 | <table> |
| 712 | <tbody> |
| 713 | <?php foreach ($plugin_info as $slug => $plugin) { ?> |
| 714 | <?php if ($plugin['is_exists']) { ?> |
| 715 | <tr class="other-plugins-<?php echo esc_attr($slug) ?>" data-plugin="<?php echo esc_attr($slug) ?>" data-nonce="<?php echo esc_attr(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']) ?>"> |
| 716 | <th class="plugin-name"><?php echo esc_attr($plugin['name']) ?></th> |
| 717 | <td> |
| 718 | <span class="import-message"><?php printf(esc_html__("%1\$s folder%2\$s and %3\$s attachment%4\$s", "folders"), "<b>".esc_attr($plugin['total_folders'])."</b>", ($plugin['total_folders'] > 1) ? esc_html__("s", 'folders') : "", "<b>".esc_attr($plugin['total_attachments'])."</b>", ($plugin['total_attachments'] > 1) ? esc_html__("s", 'folders') : "") ?></span> |
| 719 | <button type="button" class="button button-primary import-folder-data in-popup"><?php esc_html_e("Import", "folders"); ?> <span class="spinner"></span></button> |
| 720 | <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> |
| 721 | </td> |
| 722 | </tr> |
| 723 | <?php } ?> |
| 724 | <?php } ?> |
| 725 | </tbody> |
| 726 | </table> |
| 727 | </div> |
| 728 | </div> |
| 729 | <div class="folder-form-buttons"> |
| 730 | <div class=""></div> |
| 731 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Close", 'folders'); ?></a> |
| 732 | </div> |
| 733 | </div> |
| 734 | </div> |
| 735 | </div> |
| 736 | <?php |
| 737 | // } ?> |
| 738 | |
| 739 | <div class="folder-popup-form" id="remove-plugin-data"> |
| 740 | <div class="popup-form-content"> |
| 741 | <div class="folder-modal-content"> |
| 742 | <div class="close-popup-button"> |
| 743 | <a class="" href="javascript:;"><span></span></a> |
| 744 | </div> |
| 745 | <div class="remove-folder-title"><?php esc_html_e("Are you sure?", 'folders'); ?></div> |
| 746 | <div class="remove-folder-note"></div> |
| 747 | <div class="folder-form-buttons"> |
| 748 | <button type="submit" class="form-submit-btn delete-folder-plugin" id="remove-folder-button"><?php esc_html_e("Delete plugin data", 'folders'); ?></button> |
| 749 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 750 | </div> |
| 751 | </div> |
| 752 | </div> |
| 753 | </div> |
| 754 | |
| 755 | <div class="folder-popup-form remove-folders-box" id="remove-folders-data-box"> |
| 756 | <div class="popup-form-content"> |
| 757 | <div class="folder-modal-content"> |
| 758 | <div class="close-popup-button close-remove-folders"> |
| 759 | <a class="" href="javascript:;"><span></span></a> |
| 760 | </div> |
| 761 | <div class="remove-folder-title"><?php esc_html_e("Are you sure?", 'folders'); ?></div> |
| 762 | <div class="remove-folder-note"><?php printf(esc_html__("Folders will remove all created folders once you remove the plugin. We recommend you %1\$snot to use this feature%2\$s if you plan to use Folders in future.", 'folders'), "<b>", "</b>"); ?></div> |
| 763 | <div class="folder-form-buttons"> |
| 764 | <a href="javascript:;" class="form-cancel-btn cancel-folders"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 765 | <button type="submit" class="form-cancel-btn delete-button"><?php esc_html_e("I want to delete anyway", 'folders'); ?></button> |
| 766 | </div> |
| 767 | </div> |
| 768 | </div> |
| 769 | </div> |
| 770 | |
| 771 | <div class="folder-popup-form" id="remove-confirmation-box"> |
| 772 | <div class="popup-form-content"> |
| 773 | <div class="folder-modal-content"> |
| 774 | <form id="remove_folders_data" autocomplete="off" > |
| 775 | <div class="close-popup-button"> |
| 776 | <a class="" href="javascript:;"><span></span></a> |
| 777 | </div> |
| 778 | <div class="remove-folder-title"></div> |
| 779 | <div class="remove-folder-note text-left"> |
| 780 | <b><?php esc_html_e("Type DELETE to confirm", 'folders'); ?></b> |
| 781 | <div class="input-box"> |
| 782 | <input autocomplete="off" type="text" id="delete-input" name="delete" > |
| 783 | </div> |
| 784 | <div class="delete-confirmation-message"></div> |
| 785 | </div> |
| 786 | <div class="folder-form-buttons"> |
| 787 | <input type="hidden" name="nonce" id="remove-folder-nonce" value="<?php echo esc_attr(wp_create_nonce("remove_folders_data")) ?>"> |
| 788 | <input type="hidden" name="action" value="remove_all_folders_data"> |
| 789 | <button disabled type="submit" class="form-submit-btn delete-button" id="remove-folders-data-button"><?php esc_html_e("Delete", 'folders'); ?></button> |
| 790 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 791 | </div> |
| 792 | </form> |
| 793 | </div> |
| 794 | </div> |
| 795 | </div> |
| 796 | |
| 797 | <?php |
| 798 | if ($wp_status == "yes" && $show_media_popup) { |
| 799 | add_option("is_wp_media_popup_shown", "yes"); |
| 800 | ?> |
| 801 | <div class="folder-popup-form" id="wordpress-popup"> |
| 802 | <div class="popup-form-content"> |
| 803 | <div class="folder-modal-content"> |
| 804 | <div class="popup-form-data"> |
| 805 | <div class="close-popup-button"> |
| 806 | <a class="" href="javascript:;"><span></span></a> |
| 807 | </div> |
| 808 | <div class="popup-folder-title"> |
| 809 | <?php esc_html_e("Seems you’re using WordPress.com", "folders") ?> |
| 810 | </div> |
| 811 | <div class="folder-form-message" style="padding: 25px 10px;" > |
| 812 | <?php esc_html_e('You need to alter a setting to make Folders compatible with WordPress.com media library.', "folders") ?> |
| 813 | </div> |
| 814 | <div class="folder-form-buttons" style="display:block;"> |
| 815 | <a class="form-submit-btn a-inline" target="_blank" href="https://premio.io/help/folders/how-to-activate-folders-for-wordpress-com-media-library/" ><?php esc_html_e("Learn how to enable Folders on media library", 'folders'); ?></a> |
| 816 | </div> |
| 817 | </div> |
| 818 | </div> |
| 819 | </div> |
| 820 | </div> |
| 821 | <?php }//end if |
| 822 | ?> |
| 823 | |
| 824 | <?php |
| 825 | $option = get_option("folder_intro_box"); |
| 826 | if (($option == "show" || get_option("folder_redirect_status") == 2) && $is_plugin_exists) { ?> |
| 827 | <div class="folder-popup-form" id="import-third-party-plugin-data" style="display: block" ?> |
| 828 | <div class="popup-form-content"> |
| 829 | <div class="folder-modal-content"> |
| 830 | <div class="close-popup-button"> |
| 831 | <a class="" href="javascript:;"><span></span></a> |
| 832 | </div> |
| 833 | <div class="import-plugin-title"><?php esc_html_e("Import data", 'folders'); ?></div> |
| 834 | <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> |
| 835 | <div class="plugin-import-table"> |
| 836 | <div class="import-folder-table"> |
| 837 | <table> |
| 838 | <tbody> |
| 839 | <?php foreach ($plugin_info as $slug => $plugin) { |
| 840 | if ($plugin['is_exists']) { ?> |
| 841 | <tr class="other-plugins-<?php echo esc_attr($slug) ?>" data-plugin="<?php echo esc_attr($slug) ?>" data-nonce="<?php echo esc_attr(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']) ?>"> |
| 842 | <th class="plugin-name"><?php echo esc_attr($plugin['name']) ?></th> |
| 843 | <td> |
| 844 | <button type="button" class="button button-primary import-folder-data in-popup"><?php esc_html_e("Import", "folders"); ?> <span class="spinner"></span></button> |
| 845 | <span class="import-message"><?php printf(esc_html__("%1\$s folder%2\$s and %3\$s attachment%4\$s", "folders"), "<b>".esc_attr($plugin['total_folders'])."</b>", ($plugin['total_folders'] > 1) ? esc_html__("s", 'folders') : "", "<b>".esc_attr($plugin['total_attachments'])."</b>", ($plugin['total_attachments'] > 1) ? esc_html__("s", 'folders') : "") ?></span> |
| 846 | </td> |
| 847 | </tr> |
| 848 | <?php } |
| 849 | } ?> |
| 850 | </tbody> |
| 851 | </table> |
| 852 | </div> |
| 853 | </div> |
| 854 | <div class="folder-form-buttons"> |
| 855 | <div class=""></div> |
| 856 | <a href="javascript:;" id="cancel-plugin-import" class="form-cancel-btn"><?php esc_html_e("Close", 'folders'); ?></a> |
| 857 | </div> |
| 858 | </div> |
| 859 | </div> |
| 860 | </div> |
| 861 | <?php |
| 862 | if ($option != "show") { |
| 863 | update_option("folder_redirect_status", 3); |
| 864 | } |
| 865 | }//end if |
| 866 | ?> |
| 867 | |
| 868 | <div class="folder-popup-form" id="no-more-folder-credit"> |
| 869 | <div class="popup-form-content"> |
| 870 | <div class="folder-modal-content"> |
| 871 | <div class="close-popup-button"> |
| 872 | <a class="" href="javascript:;"><span></span></a> |
| 873 | </div> |
| 874 | <div class="add-update-folder-title" id="folder-limitation-message"> |
| 875 | <?php esc_html_e("You've reached the 10 folder limitation!", 'folders'); ?> |
| 876 | </div> |
| 877 | <div class="folder-form-message"> |
| 878 | <?php esc_html_e("Unlock unlimited amount of folders by upgrading to one of our pro plans.", 'folders'); ?> |
| 879 | </div> |
| 880 | <div class="folder-form-buttons"> |
| 881 | <a href="javascript:;" class="form-cancel-btn"><?php esc_html_e("Cancel", 'folders'); ?></a> |
| 882 | <a href="<?php echo esc_url($this->getFoldersUpgradeURL()) ?>" target="_blank" class="form-submit-btn"><?php esc_html_e("See Pro Plans", 'folders'); ?></a> |
| 883 | </div> |
| 884 | </div> |
| 885 | </div> |
| 886 | </div> |
| 887 | <?php require_once "help.php" ?> |
| 888 | |
| 889 | <div class="folder-popup-form" id="keyboard-shortcut"> |
| 890 | <div class="popup-form-content" style="padding: 20px 0 0;"> |
| 891 | <div class="folder-modal-content"> |
| 892 | <div class="close-popup-button" style="padding: 0 20px;"> |
| 893 | <a class="" href="javascript:;"><span></span></a> |
| 894 | </div> |
| 895 | <div class="import-plugin-title"><?php esc_html_e("Keyboard shortcuts (Ctrl+K)", 'folders'); ?></div> |
| 896 | <div class="plugin-import-table" style="padding: 0 20px 10px; max-height: calc(100vh - 160px); overflow-y: auto;"> |
| 897 | <table class="keyboard-shortcut"> |
| 898 | <tr> |
| 899 | <th><?php esc_html_e("Create New Folder", "folders") ?></th> |
| 900 | <td><span class="key-button">Shift</span><span class="plus-button">+</span><span class="key-button">N</span> </td> |
| 901 | </tr> |
| 902 | <tr> |
| 903 | <th><?php esc_html_e("Rename Folder", "folders") ?></th> |
| 904 | <td><span class="key-button">F2</span></td> |
| 905 | </tr> |
| 906 | <tr> |
| 907 | <th><?php esc_html_e("Copy Folder", "folders") ?></th> |
| 908 | <td><span class="key-button">Ctrl</span><span class="plus-button">+</span><span class="key-button">C</span> </td> |
| 909 | </tr> |
| 910 | <tr> |
| 911 | <th><?php esc_html_e("Cut Folder", "folders") ?></th> |
| 912 | <td><span class="key-button">Ctrl</span><span class="plus-button">+</span><span class="key-button">X</span> </td> |
| 913 | </tr> |
| 914 | <tr> |
| 915 | <th><?php esc_html_e("Paste Folder", "folders") ?></th> |
| 916 | <td><span class="key-button">Ctrl</span><span class="plus-button">+</span><span class="key-button">V</span> </td> |
| 917 | </tr> |
| 918 | <tr> |
| 919 | <th><?php esc_html_e("Duplicate Folder", "folders") ?></th> |
| 920 | <td><span class="key-button">Ctrl</span><span class="plus-button">+</span><span class="key-button">D</span> </td> |
| 921 | </tr> |
| 922 | <tr> |
| 923 | <th><?php esc_html_e("Delete Folder", "folders") ?></th> |
| 924 | <td><span class="key-button">Delete</span></td> |
| 925 | </tr> |
| 926 | <tr> |
| 927 | <th><?php esc_html_e("Next Folder", "folders") ?></th> |
| 928 | <td><span class="key-button"><span class="dashicons dashicons-arrow-down-alt"></span></span> </td> |
| 929 | </tr> |
| 930 | <tr> |
| 931 | <th><?php esc_html_e("Previous Folder", "folders") ?></th> |
| 932 | <td><span class="key-button"><span class="dashicons dashicons-arrow-up-alt"></span></span> </td> |
| 933 | </tr> |
| 934 | <tr> |
| 935 | <th><?php esc_html_e("Expand Folder", "folders") ?></th> |
| 936 | <td><span class="key-button"><span class="dashicons dashicons-arrow-right-alt"></span></span> </td> |
| 937 | </tr> |
| 938 | <tr> |
| 939 | <th><?php esc_html_e("Collapse Folder", "folders") ?></th> |
| 940 | <td><span class="key-button"><span class="dashicons dashicons-arrow-left-alt"></span></span> </td> |
| 941 | </tr> |
| 942 | <tr> |
| 943 | <th><?php esc_html_e("Re-order folders to upwards", "folders") ?></th> |
| 944 | <td><span class="key-button">Ctrl</span><span class="plus-button">+</span><span class="key-button"><span class="dashicons dashicons-arrow-up-alt"></span></span></td> |
| 945 | </tr> |
| 946 | <tr> |
| 947 | <th><?php esc_html_e("Re-order folders to downwards", "folders") ?></th> |
| 948 | <td><span class="key-button">Ctrl</span><span class="plus-button">+</span><span class="key-button"><span class="dashicons dashicons-arrow-down-alt"></span></span></td> |
| 949 | </tr> |
| 950 | </table> |
| 951 | </div> |
| 952 | </div> |
| 953 | </div> |
| 954 | </div> |
| 955 |