PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / trunk
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager vtrunk
3.1.9 3.1.8 3.1.7 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 trunk 1.3.7 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9 2.9.1 2.9.2
folders / includes / form.class.php
folders / includes Last commit date
class-email-signup.php 1 year ago class-help.php 1 month ago class-polylang.php 7 months ago class-review-box.php 1 year ago class-upgrade-box.php 10 months ago class-wpml.php 7 months ago folders.class.php 1 month ago form.class.php 10 months ago form.fields.php 1 year ago import.export.class.php 8 months ago media.replace.php 7 months ago notifications.class.php 8 months ago plugins.class.php 8 months ago tree.class.php 8 months ago
form.class.php
149 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="", $post_type = "")
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 $customSort = isset($customizeFolders['force_sorting'])?$customizeFolders['force_sorting']:"off";
54 $currentSort = "";
55 if($customSort != "on") {
56 $customSort = "off";
57 } else {
58 $currentSort = get_option("wcp_custom_sort_".$post_type, "");
59 }
60 ?>
61 <div class="wcp-custom-form">
62 <div class="form-title">
63 <div class="plugin-title">
64 <?php esc_html_e("Folders", 'folders'); ?>
65 <span class="folder-loader-ajax">
66 <svg id="successAnimation" fill="#F51366" class="animated" xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 70 70">
67 <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>
68 <circle id="successAnimationCircle" cx="35" cy="35" r="24" stroke="#979797" stroke-width="2" stroke-linecap="round" fill="transparent"></circle>
69 <polyline id="successAnimationCheck" stroke="#979797" stroke-width="2" points="23 34 34 43 47 27" fill="transparent"></polyline>
70 </svg>
71 </span>
72 </div>
73 <div class="plugin-button">
74 <?php if ($showInPage == "yes") { ?>
75 <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>
76 <?php } ?>
77 <a href="#" class="add-new-folder" id="add-new-folder">
78 <span class="create_new_folder"><i class="pfolder-add-folder"></i></span> <span><?php esc_html_e("New Folder", 'folders'); ?></span>
79 </a>
80 </div>
81 <div class="clear"></div>
82 </div>
83 <div class="form-options form-options2">
84 <ul>
85 <!--<li class="last folder-checkbox">
86 <input type="checkbox" id="folder-hide-show-checkbox">
87 </li>
88 <li>
89 <a href="#" id="inline-update"><span class="icon pfolder-edit"></span> <span class="text"><?php /*esc_html_e("Rename", 'folders'); */?></span> </a>
90 </li>
91 <li>
92 <a href="#" id="inline-remove"><span class="icon pfolder-remove"></span> <span class="text"><?php /*esc_html_e("Delete", 'folders'); */?></span> </a>
93 </li>-->
94 <?php if ($isOld) { ?>
95 <li>
96 <a href="#" class="expand-collapse folder-tooltip" id="expand-collapse-list" data-folder-tooltip="<?php esc_html_e("Expand", 'folders'); ?>">
97 <span class="icon pfolder-arrow-down"></span><!-- <span class="text"><?php /*esc_html_e("Expand", 'folders'); */?></span>-->
98 </a>
99 </li>
100 <?php } else { ?>
101 <li class="folder-inline-tooltip expand-collapse">
102 <a class="paste-folder-action disabled" target="_blank" href="<?php echo esc_url($upgradeURL) ?>" >
103 <span class="inline-tooltip"><?php esc_html_e("Expand is pro feature", "folders"); ?> <span><?php esc_html_e("Upgrade Now 🎉", "folders") ?></span></span>
104 <span class="icon pfolder-arrow-down"></span><!-- <span class="text"><?php /*esc_html_e("Expand", 'folders'); */?></span>-->
105 </a>
106 </li>
107 <?php } ?>
108 <li>
109 <div class="form-options">
110 <ul>
111 <li class="last folder-order">
112 <a data-folder-tooltip="Sort Folders" href="#" id="sort-order-list" class="sort-folder-order folder-tooltip">
113 <span class="icon pfolder-arrow-sort"></span><!-- <span class="text"><?php /*esc_html_e("Sort", 'folders'); */?></span>-->
114 </a>
115 <div class="folder-sort-menu <?php echo ($isOld) ? "" : "is-pro" ?>">
116 <ul>
117 <li><a class="<?php echo esc_attr($currentSort == 'a-z'?'active':'') ?>" data-sort="a-z" href="#"><?php esc_html_e("A → Z", 'folders'); ?></a></li>
118 <li><a class="<?php echo esc_attr($currentSort == 'z-a'?'active':'') ?>" data-sort="z-a" href="#"><?php esc_html_e("Z → A", 'folders'); ?></a></li>
119 <?php if ($isOld) { ?>
120 <li><a class="<?php echo esc_attr($currentSort == 'n-o'?'active':'') ?>" data-sort="n-o" href="#"><?php esc_html_e("Sort by newest", 'folders'); ?></a></li>
121 <li><a class="<?php echo esc_attr($currentSort == 'o-n'?'active':'') ?>" data-sort="o-n" href="#"><?php esc_html_e("Sort by oldest", 'folders'); ?></a></li>
122 <?php } else { ?>
123 <li><a class="<?php echo esc_attr($currentSort == 'n-o'?'active':'') ?>" 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>
124 <li><a class="<?php echo esc_attr($currentSort == 'o-n'?'active':'') ?>" 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>
125 <?php } ?>
126 </ul>
127 </div>
128 </li>
129 </ul>
130 </div>
131 </li>
132 </ul>
133 <div class="upgrade-message">
134 <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>
135 </div>
136 </div>
137 <div class="form-loader">
138 <div class="form-loader-count"></div>
139 </div>
140 </div>
141 <?php
142 return ob_get_clean();
143
144 }//end get_form_html()
145
146
147 }//end class
148
149