Upload folder via GUI - inc
This commit is contained in:
14
inc/fields/class-field-date.php
Normal file
14
inc/fields/class-field-date.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if (!defined('ABSPATH')) exit;
|
||||
class WMF_Field_Date extends WMF_Field_Base {
|
||||
public $type='date'; public $label='Datum'; public $icon='dashicons-calendar-alt';
|
||||
public function defaults() { return array_merge(parent::defaults(),array('min_date'=>'','max_date'=>'')); }
|
||||
public function render($field,$value='') { ?>
|
||||
<div class="<?php echo esc_attr($this->wrapper_classes($field)); ?>"<?php echo $this->conditional_attrs($field); ?> data-field-id="<?php echo esc_attr($field['id']); ?>">
|
||||
<?php $this->render_label($field); ?>
|
||||
<input type="date" id="<?php echo esc_attr($field['id']); ?>" name="wmf_fields[<?php echo esc_attr($field['id']); ?>]" value="<?php echo esc_attr($value); ?>" <?php echo!empty($field['min_date'])?'min="'.esc_attr($field['min_date']).'"':''; ?> <?php echo!empty($field['max_date'])?'max="'.esc_attr($field['max_date']).'"':''; ?> <?php echo(!empty($field['required'])&&$field['required']==='1')?'required':''; ?> class="wmf-input">
|
||||
<?php $this->render_description($field); ?>
|
||||
<span class="wmf-field-error-msg"></span>
|
||||
</div><?php
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user