folders.class.php
6 years ago
form.class.php
6 years ago
plugin.updates.php
6 years ago
tree.class.php
6 years ago
form.class.php
54 lines
| 1 | <?php |
| 2 | defined('ABSPATH') or wp_die('Nope, not accessing this'); |
| 3 | |
| 4 | class WCP_Forms { |
| 5 | public function __construct() { |
| 6 | parent::__construct(); |
| 7 | } |
| 8 | |
| 9 | public static function get_form_html($option_data = "") { |
| 10 | ob_start(); |
| 11 | ?> |
| 12 | <div class="wcp-custom-form"> |
| 13 | <div class="form-title"> |
| 14 | <?php esc_html_e("Folders", WCP_FOLDER) ?> |
| 15 | <a href="javascript:;" class="add-new-folder" id="add-new-folder"><span class="folder-icon-create_new_folder"></span> <span><?php esc_html_e("New Folder", WCP_FOLDER) ?></span></a> |
| 16 | <div class="clear"></div> |
| 17 | </div> |
| 18 | <div class="form-options"> |
| 19 | <ul> |
| 20 | <li> |
| 21 | <a href="javascript:;" id="inline-update"><span class="icon folder-icon-border_color"><span class="path1"></span><span class="path2"></span></span> <span class="text"><?php esc_html_e("Rename", WCP_FOLDER) ?></span> </a> |
| 22 | </li> |
| 23 | <li> |
| 24 | <a href="javascript:;" id="inline-remove"><span class="icon folder-icon-delete"></span> <span class="text"><?php esc_html_e("Delete", WCP_FOLDER) ?></span> </a> |
| 25 | </li> |
| 26 | <li class="last"> |
| 27 | <a href="javascript:;" id="expand-collapse-list"><span class="icon folder-icon-expand_more"></span></span> </a> |
| 28 | </li> |
| 29 | </ul> |
| 30 | <div class="upgrade-message"> |
| 31 | <?php |
| 32 | $total_folders = get_option("folder_old_plugin_folder_status"); |
| 33 | if($total_folders == false || $total_folders < 10) { |
| 34 | $total_folders = 10; |
| 35 | } |
| 36 | $total = WCP_Folders::get_total_term_folders(); |
| 37 | if($total > $total_folders) { |
| 38 | $total_folders = $total; |
| 39 | } |
| 40 | ?> |
| 41 | <span class="upgrade-message">You have used <span class='pink' id='current-folder'><?php echo esc_attr($total) ?></span>/<span id='total-folder'><?php echo esc_attr($total_folders) ?></span> Folders. <a class="pink" href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a></span> |
| 42 | <script> |
| 43 | folderLimitation = <?php echo esc_attr($total_folders); ?>; |
| 44 | </script> |
| 45 | </div> |
| 46 | </div> |
| 47 | <div class="form-loader"> |
| 48 | <div class="form-loader-count"></div> |
| 49 | </div> |
| 50 | </div> |
| 51 | <?php |
| 52 | return ob_get_clean(); |
| 53 | } |
| 54 | } |