Skip to content
Snippets Groups Projects
Commit f353b907 authored by Piotr Potrebka's avatar Piotr Potrebka
Browse files

Merge branch 'devel' into 'master'

Devel

See merge request !31
parents 6d3ac246 6af1f2dd
No related branches found
Tags 3.2.0
1 merge request!31Devel
Pipeline #171746 passed with warnings with stages
in 43 seconds
# Changelog
## [3.2.0] - 2023-03-16
### Added
- WPEditorField
- DateField
### Deprecated
- WyswigField
### Fixed
- Removed sanitizing from sublabel
## [3.1.0] - 2022-08-30
### Added
- de_DE translations
......
......@@ -7,15 +7,14 @@ use WPDesk\Forms\Sanitizer\TextFieldSanitizer;
class DateField extends BasicField {
public function __construct() {
parent::__construct();
$this->set_placeholder('YYYY-MM-DD');
}
public function get_type() {
public function get_type(): string {
return 'date';
}
public function get_template_name() {
public function get_template_name(): string {
return 'input-text';
}
......
......@@ -57,7 +57,7 @@ if ( empty( $value ) || is_string( $value ) ) {
</div>
<?php if ( $field->get_type() === 'checkbox' && $field->has_sublabel() ) : ?>
<?php echo \esc_html( $field->get_sublabel() ); ?></label>
<?php echo wp_kses_post( $field->get_sublabel() ); ?></label>
<?php endif; ?>
<?php endforeach; ?>
</div>
......
......@@ -39,5 +39,5 @@ if ( $field->get_type() === 'checkbox' && $field->has_sublabel() ) :
/>
<?php if ( $field->get_type() === 'checkbox' && $field->has_sublabel() ) : ?>
<?php echo \esc_html( $field->get_sublabel() ); ?></label>
<?php echo wp_kses_post( $field->get_sublabel() ); ?></label>
<?php endif; ?>
......@@ -8,7 +8,7 @@
wp_print_styles( 'media-views' );
$default_settings = [
'textarea_name' => esc_attr( $name_prefix ) . '[' . esc_attr( $this->get_name() ) . ']',
'textarea_name' => esc_attr( $name_prefix ) . '[' . esc_attr( $field->get_name() ) . ']',
'tinymce' => [
'toolbar1' => 'bold,italic,underline,separator,alignleft,aligncenter,alignright,separator,link,unlink,undo,redo',
'toolbar2' => '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment