PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / 3.1.2
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager v3.1.2
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.fields.php
folders / includes Last commit date
class-affiliate.php 1 year ago class-email-signup.php 1 year ago class-help.php 1 year ago class-polylang.php 1 year ago class-review-box.php 1 year ago class-upgrade-box.php 1 year ago class-wpml.php 1 year ago folders.class.php 1 year ago form.class.php 1 year ago form.fields.php 1 year ago import.export.class.php 1 year ago media.replace.php 1 year ago notifications.class.php 1 year ago plugins.class.php 1 year ago svg.class.php 1 year ago tree.class.php 1 year ago
form.fields.php
99 lines
1 <?php
2 class Fldr_Form_Fields {
3 public function __construct() {
4 add_action( 'folders_field_prefix_settings', array( $this, 'field_prefix_settings' ), 10, 2 );
5 add_action( 'folders_field_label', array( $this, 'field_label' ), 10, 1 );
6 add_action( 'folders_field_input', array( $this, 'field_input' ), 10, 4 );
7 add_action( 'folders_field_label_postfix', array( $this, 'field_label_postfix' ), 10, 1 );
8 add_action( 'folders_field_tooltip', array( $this, 'field_tooltip' ), 10, 1 );
9 }
10
11 public function field_prefix_settings($field, $value = 'no') {
12
13 }
14
15 public function field_label($field) {
16 if($field['type'] == 'input') { ?>
17 <div class="form-label">
18 <label class="folder-label" for="<?php echo esc_attr($field['id']) ?>"><?php esc_attr($field['label']) ?></label>
19 </div>
20 <?php }
21 }
22
23 public function field_input($field, $value = '', $is_valid = false, $upgrade_url = '') {
24 $disabled = (!$is_valid && $field['is_pro'])?'disabled':'';
25 $value = (!$is_valid && $field['is_pro'])?'':$value;
26 if($field['type'] == 'input') { ?>
27 <div class="form-input">
28 <input id="<?php echo esc_attr($field['id']) ?>" type="text" name="<?php echo esc_attr($field['name']) ?>" value="<?php echo esc_attr($value) ?>" />
29 </div>
30 <?php } elseif($field['type'] == 'timeout') { ?>
31 <div class="form-input">
32 <label class="folder-label" for="<?php echo esc_attr($field['id']) ?>"><?php echo esc_attr($field['label']) ?></label>
33 <div class="seconds-box">
34 <input id="<?php echo esc_attr($field['id']) ?>" type="number" name="<?php echo esc_attr($field['name']) ?>" value="<?php echo esc_attr($value) ?>" />
35 </div>
36 </div>
37 <?php } elseif($field['type'] == 'upload_size') { ?>
38 <div class="form-input">
39 <label class="folder-label" for="<?php echo esc_attr($field['id']) ?>"><?php echo esc_attr($field['label']) ?></label>
40 <div class="mb-box">
41 <input id="<?php echo esc_attr($field['id']) ?>" type="number" name="<?php echo esc_attr($field['name']) ?>" value="<?php echo esc_attr($value) ?>" />
42 </div>
43 </div>
44 <?php } elseif($field['type'] == 'checkbox') { ?>
45 <div class="form-label <?php echo esc_attr($field['label_class'])?> ">
46 <input class="sr-only" <?php checked($value, $field['value']) ?> type="hidden" name="<?php echo esc_attr($field['name']) ?>" value="off">
47 <?php if($field['is_pro'] && !$is_valid) { ?>
48 <a class="inline-flex upgrade-box-link" href="<?php echo esc_url($upgrade_url) ?>" target="_blank" >
49 <label class="switch-label" for="">
50 <?php } else {?>
51 <label class="switch-label" for="<?php echo esc_attr($field['id']) ?>">
52 <?php } ?>
53 <input <?php echo esc_attr($disabled) ?> type="checkbox" id="<?php echo esc_attr($field['id']) ?>" class="sr-only" <?php checked($value, $field['value']) ?> name="<?php echo esc_attr($field['name']) ?>" value="<?php echo esc_attr($field['value']) ?>">
54 <span class="form-switch"></span>
55 <?php echo esc_attr($field['label']) ?>
56 <?php do_action('folders_field_tooltip', $field); ?>
57 <?php do_action('folders_field_label_prefix', $field); ?>
58 <?php if($field['is_pro'] && !$is_valid) { ?>
59 <button type="button" class="upgrade-link">Upgrade to Pro</button>
60 <?php } ?>
61 </label>
62 <?php if($field['is_pro'] && !$is_valid) { ?>
63 </a>
64 <?php } ?>
65 <?php do_action('folders_field_label_postfix', $field); ?>
66 </div>
67 <?php }
68 }
69
70 public function field_label_postfix($field) {
71 if($field['id'] == 'use_shortcuts') { ?>
72 <a href="#" class="view-shortcodes inline-flex" >(
73 <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">
74 <path stroke-linecap="round" stroke-linejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z"/>
75 </svg>
76 <span><?php esc_html_e('View shortcuts', 'folders'); ?></span>)
77 </a>
78 <?php }
79 }
80
81 public function field_tooltip($field) {
82 if($field['has_tooltip'] && !empty($field['tooltip'])) {
83 if(isset($field['tooltip_image']) && !empty($field['tooltip_image'])) { ?>
84 <span class="html-tooltip dynamic">
85 <span class="dashicons dashicons-editor-help"></span>
86 <span class="tooltip-text top" style="">
87 <?php echo esc_attr($field['tooltip']) ?>
88 <img src="<?php echo esc_url($field['tooltip_image']) ?>">
89 </span>
90 </span>
91 <?php } else { ?>
92 <span class="folder-tooltip" data-title="<?php echo esc_attr($field['tooltip']) ?>">
93 <span class="dashicons dashicons-editor-help"></span>
94 </span>
95 <?php }
96 }
97 }
98 }
99 new Fldr_Form_Fields();