Completed
Branch 3.0 (1aee71)
by Stephanie
03:09
created

FrmFieldHTML   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 3

4 Methods

Rating   Name   Duplication   Size   Complexity  
A default_html() 0 3 1
A after_replace_html_shortcodes() 0 6 1
A get_container_class() 0 3 1
A include_form_builder_file() 0 3 1
1
<?php
2
3
/**
4
 * @since 3.0
5
 */
6
class FrmFieldHTML extends FrmFieldType {
7
8
	/**
9
	 * @var string
10
	 * @since 3.0
11
	 */
12
	protected $type = 'html';
13
14
	/**
15
	 * @var bool
16
	 * @since 3.0
17
	 */
18
	protected $has_input = false;
19
20
	public function default_html() {
21
		return '<div id="frm_field_[id]_container" class="frm_form_field form-field">[description]</div>';
22
	}
23
24
	/**
25
	 * @since 3.0
26
	 */
27
	protected function after_replace_html_shortcodes( $args, $html ) {
28
		FrmFieldsHelper::run_wpautop( array( 'wpautop' => true ), $html );
29
30
		$html = apply_filters( 'frm_get_default_value', $html, (object) $this->field, false );
31
		return do_shortcode( $html );
32
	}
33
34
	public function get_container_class() {
35
		return ' frm_html_container';
36
	}
37
38
	protected function include_form_builder_file() {
39
		return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-html.php';
40
	}
41
}
42