class-affiliate.php
3 years ago
class-polylang.php
2 years ago
class-review-box.php
2 years ago
class-upgrade-box.php
3 years ago
class-wpml.php
3 years ago
folders.class.php
2 years ago
form.class.php
3 years ago
media.replace.php
2 years ago
plugins.class.php
3 years ago
tree.class.php
2 years ago
form.class.php
142 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Class Folders Forms |
| 4 | * |
| 5 | * @author : Premio <contact@premio.io> |
| 6 | * @license : GPL2 |
| 7 | * */ |
| 8 | |
| 9 | if (! defined('ABSPATH')) { |
| 10 | exit; |
| 11 | } |
| 12 | |
| 13 | class WCP_Forms |
| 14 | { |
| 15 | |
| 16 | |
| 17 | /** |
| 18 | * Define the core functionality of the plugin. |
| 19 | * |
| 20 | * @since 1.0.0 |
| 21 | */ |
| 22 | public function __construct() |
| 23 | { |
| 24 | |
| 25 | }//end __construct() |
| 26 | |
| 27 | |
| 28 | /** |
| 29 | * Return form HTML data |
| 30 | * |
| 31 | * @since 1.0.0 |
| 32 | * @access public |
| 33 | * @return $isWPMLActive |
| 34 | */ |
| 35 | public static function get_form_html($option_data="") |
| 36 | { |
| 37 | ob_start(); |
| 38 | $customizeFolders = get_option('customize_folders'); |
| 39 | $showInPage = !isset($customizeFolders['use_shortcuts']) ? "yes" : $customizeFolders['use_shortcuts']; |
| 40 | |
| 41 | $customizeFolders = get_option("customize_folders"); |
| 42 | if (isset($customizeFolders['show_folder_in_settings']) && $customizeFolders['show_folder_in_settings'] == "yes") { |
| 43 | $upgradeURL = admin_url("options-general.php?page=wcp_folders_settings&setting_page=upgrade-to-pro"); |
| 44 | } else { |
| 45 | $upgradeURL = admin_url("admin.php?page=folders-upgrade-to-pro"); |
| 46 | } |
| 47 | |
| 48 | $isOld = false; |
| 49 | $oldStatus = get_option("wcp_folder_version_267"); |
| 50 | if ($oldStatus === false) { |
| 51 | // $isOld = true; |
| 52 | } |
| 53 | ?> |
| 54 | <div class="wcp-custom-form"> |
| 55 | <div class="form-title"> |
| 56 | <div class="plugin-title"> |
| 57 | <?php esc_html_e("Folders", 'folders'); ?> |
| 58 | <span class="folder-loader-ajax"> |
| 59 | <svg id="successAnimation" fill="#F51366" class="animated" xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 70 70"> |
| 60 | <path id="successAnimationResult" fill="#D8D8D8" d="M35,60 C21.1928813,60 10,48.8071187 10,35 C10,21.1928813 21.1928813,10 35,10 C48.8071187,10 60,21.1928813 60,35 C60,48.8071187 48.8071187,60 35,60 Z M23.6332378,33.2260427 L22.3667622,34.7739573 L34.1433655,44.40936 L47.776114,27.6305926 L46.223886,26.3694074 L33.8566345,41.59064 L23.6332378,33.2260427 Z"></path> |
| 61 | <circle id="successAnimationCircle" cx="35" cy="35" r="24" stroke="#979797" stroke-width="2" stroke-linecap="round" fill="transparent"></circle> |
| 62 | <polyline id="successAnimationCheck" stroke="#979797" stroke-width="2" points="23 34 34 43 47 27" fill="transparent"></polyline> |
| 63 | </svg> |
| 64 | </span> |
| 65 | </div> |
| 66 | <div class="plugin-button"> |
| 67 | <?php if ($showInPage == "yes") { ?> |
| 68 | <a href="#" class="view-shortcodes folder-tooltip" data-folder-tooltip="<?php esc_html_e("Press Ctrl+K to view keyboard shortcuts", 'folders'); ?>"><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z" /></svg></a> |
| 69 | <?php } ?> |
| 70 | <a href="javascript:;" class="add-new-folder" id="add-new-folder"> |
| 71 | <span class="create_new_folder"><i class="pfolder-add-folder"></i></span> <span><?php esc_html_e("New Folder", 'folders'); ?></span> |
| 72 | </a> |
| 73 | </div> |
| 74 | <div class="clear"></div> |
| 75 | </div> |
| 76 | <div class="form-options form-options2"> |
| 77 | <ul> |
| 78 | <!--<li class="last folder-checkbox"> |
| 79 | <input type="checkbox" id="folder-hide-show-checkbox"> |
| 80 | </li> |
| 81 | <li> |
| 82 | <a href="javascript:;" id="inline-update"><span class="icon pfolder-edit"></span> <span class="text"><?php /*esc_html_e("Rename", 'folders'); */?></span> </a> |
| 83 | </li> |
| 84 | <li> |
| 85 | <a href="javascript:;" id="inline-remove"><span class="icon pfolder-remove"></span> <span class="text"><?php /*esc_html_e("Delete", 'folders'); */?></span> </a> |
| 86 | </li>--> |
| 87 | <?php if ($isOld) { ?> |
| 88 | <li> |
| 89 | <a href="javascript:;" class="expand-collapse folder-tooltip" id="expand-collapse-list" data-folder-tooltip="<?php esc_html_e("Expand", 'folders'); ?>"> |
| 90 | <span class="icon pfolder-arrow-down"></span><!-- <span class="text"><?php /*esc_html_e("Expand", 'folders'); */?></span>--> |
| 91 | </a> |
| 92 | </li> |
| 93 | <?php } else { ?> |
| 94 | <li class="folder-inline-tooltip expand-collapse"> |
| 95 | <a class="paste-folder-action disabled" target="_blank" href="<?php echo esc_url($upgradeURL) ?>" > |
| 96 | <span class="inline-tooltip"><?php esc_html_e("Expand is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span> |
| 97 | <span class="icon pfolder-arrow-down"></span><!-- <span class="text"><?php /*esc_html_e("Expand", 'folders'); */?></span>--> |
| 98 | </a> |
| 99 | </li> |
| 100 | <?php } ?> |
| 101 | <li> |
| 102 | <div class="form-options"> |
| 103 | <ul> |
| 104 | <li class="last folder-order"> |
| 105 | <a data-folder-tooltip="Sort Folders" href="javascript:;" id="sort-order-list" class="sort-folder-order folder-tooltip"> |
| 106 | <span class="icon pfolder-arrow-sort"></span><!-- <span class="text"><?php /*esc_html_e("Sort", 'folders'); */?></span>--> |
| 107 | </a> |
| 108 | <div class="folder-sort-menu <?php echo ($isOld) ? "" : "is-pro" ?>"> |
| 109 | <ul> |
| 110 | <li><a data-sort="a-z" href="#"><?php esc_html_e("A → Z", 'folders'); ?></a></li> |
| 111 | <li><a data-sort="z-a" href="#"><?php esc_html_e("Z → A", 'folders'); ?></a></li> |
| 112 | <?php if ($isOld) { ?> |
| 113 | <li><a data-sort="n-o" href="#"><?php esc_html_e("Sort by newest", 'folders'); ?></a></li> |
| 114 | <li><a data-sort="o-n" href="#"><?php esc_html_e("Sort by oldest", 'folders'); ?></a></li> |
| 115 | <?php } else { ?> |
| 116 | <li><a data-sort="n-o" target="_blank" class="pro-feature" href="<?php echo esc_url($upgradeURL) ?>"><?php esc_html_e("Sort by newest", 'folders'); ?> <span><?php esc_html_e("(Pro)", 'folders'); ?></span></a></li> |
| 117 | <li><a data-sort="o-n" target="_blank" class="pro-feature" href="<?php echo esc_url($upgradeURL) ?>"><?php esc_html_e("Sort by oldest", 'folders'); ?> <span><?php esc_html_e("(Pro)", 'folders'); ?></span></a></li> |
| 118 | <?php } ?> |
| 119 | </ul> |
| 120 | </div> |
| 121 | </li> |
| 122 | </ul> |
| 123 | </div> |
| 124 | </li> |
| 125 | </ul> |
| 126 | <div class="upgrade-message"> |
| 127 | <span class="upgrade-message"><a class="pink" href="<?php echo esc_url($upgradeURL) ?>"><?php esc_html_e("Unlock all Pro features", 'folders'); ?> <span class="dashicons dashicons-arrow-right-alt"></span></a></span> |
| 128 | </div> |
| 129 | </div> |
| 130 | <div class="form-loader"> |
| 131 | <div class="form-loader-count"></div> |
| 132 | </div> |
| 133 | </div> |
| 134 | <?php |
| 135 | return ob_get_clean(); |
| 136 | |
| 137 | }//end get_form_html() |
| 138 | |
| 139 | |
| 140 | }//end class |
| 141 | |
| 142 |