Completed
Pull Request — master (#114)
by
unknown
02:50
created

FrmFieldHidden::sanitize_value()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @since 3.0
5
 */
6
class FrmFieldHidden extends FrmFieldType {
7
8
	/**
9
	 * @var string
10
	 * @since 3.0
11
	 */
12
	protected $type = 'hidden';
13
14
	/**
15
	 * @var bool
16
	 * @since 3.0
17
	 */
18
	protected $has_input = false;
19
20
	/**
21
	 * @var bool
22
	 * @since 3.0
23
	 */
24
	protected $has_html = false;
25
26
	/**
27
	 * @var bool
28
	 * @since 3.0
29
	 */
30
	protected $holds_email_values = true;
31
32
	protected function field_settings_for_type() {
33
		$settings        = parent::field_settings_for_type();
34
		$settings['css'] = false;
35
		$settings['default'] = true;
36
37
		return $settings;
38
	}
39
40
	protected function include_form_builder_file() {
41
		return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-hidden.php';
42
	}
43
44
	protected function html5_input_type() {
45
		return 'hidden';
46
	}
47
48
	/**
49
	 * @since 4.0
50
	 */
51
	public function sanitize_value( &$value ) {
52
		FrmAppHelper::sanitize_value( 'sanitize_text_field', $value );
53
	}
54
}
55