| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FirePlugins Framework |
| 4 | - * @version 1.0.0 | |
| 4 | + * @version 1.2.6 | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <[email protected]> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2021 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2026 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | if (!defined('ABSPATH')) |
| @@ -14,15 +14,19 @@ | ||
| 14 | 14 | exit; // Exit if accessed directly. |
| 15 | 15 | } |
| 16 | 16 | $default = $this->data->get('default', ''); |
| 17 | 17 | |
| 18 | -$picker_icon = strpos($this->data->get('input_class'), 'fpf-timepicker-item') !== false ? 'clock' : 'calendar-alt'; | |
| 18 | +$picker_icon = strpos($this->data->get('input_class', ''), 'fpf-timepicker-item') !== false ? 'clock' : 'calendar-alt'; | |
| 19 | + | |
| 20 | +$value = $this->data->get('value', ''); | |
| 21 | + | |
| 22 | +$reset_classes = empty($value) ? ' is-hidden' : ''; | |
| 19 | 23 | ?> |
| 20 | 24 | <div class="fpf-datepicker-parent"> |
| 21 | - <input type="text"<?php echo $this->data->get('required_attribute') . $this->data->get('extra_atts'); ?> id="fpf-control-input-item_<?php echo esc_attr($this->data->get('name_key')); ?>" class="fpf-field-item fpf-control-input-item fpf-datepicker-item datepicker<?php echo esc_attr($this->data->get('input_class', '')); ?>" placeholder="<?php echo esc_attr($this->data->get('placeholder', '')); ?>" value="<?php echo esc_attr($this->data->get('value')); ?>" name="<?php echo esc_attr($this->data->get('name')); ?>" /> | |
| 25 | + <input type="text"<?php echo wp_kses_data($this->data->get('required_attribute', '') . $this->data->get('extra_atts')); ?> id="fpf-control-input-item_<?php echo esc_attr($this->data->get('name')); ?>" class="fpf-field-item fpf-control-input-item fpf-datepicker-item<?php echo esc_attr($this->data->get('input_class', '')); ?>" placeholder="<?php echo esc_attr($this->data->get('placeholder', '')); ?>" value="<?php echo esc_attr($value); ?>" name="<?php echo esc_attr($this->data->get('name')); ?>" /> | |
| 22 | 26 | <?php if ($this->data->get('show_open_button', true)): ?> |
| 23 | - <a href="#" class="fpf-button fpf-datepicker-button fpf-datepicker-open-calendar dashicons dashicons-<?php echo esc_attr($picker_icon); ?>" title="<?php echo fpframework()->_('FPF_OPEN'); ?>"></a> | |
| 27 | + <a href="#" class="fpf-button fpf-datepicker-button fpf-datepicker-open-calendar dashicons dashicons-<?php echo esc_attr($picker_icon); ?>" title="<?php echo esc_attr(fpframework()->_('FPF_OPEN')); ?>"></a> | |
| 24 | 28 | <?php endif; ?> |
| 25 | 29 | <?php if ($this->data->get('show_clear_button', true)): ?> |
| 26 | - <a href="#" class="fpf-button fpf-datepicker-button fpf-datepicker-clear-calendar dashicons dashicons-no-alt" title="<?php echo fpframework()->_('FPF_CLEAR'); ?>"></a> | |
| 30 | + <a href="#" class="fpf-button fpf-datepicker-button fpf-datepicker-clear-calendar dashicons dashicons-no-alt<?php echo esc_attr($reset_classes); ?>" title="<?php echo esc_attr(fpframework()->_('FPF_CLEAR')); ?>"></a> | |
| 27 | 31 | <?php endif; ?> |
| 28 | 32 | </div> |