| 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 |
$pre_filter = $html; |
| 30 |
$html = apply_filters( 'frm_get_default_value', $html, (object) $this->field, false ); |
| 31 |
if ( $pre_filter === $html ) { |
| 32 |
$html = do_shortcode( $html ); |
| 33 |
} |
| 34 |
return $html; |
| 35 |
} |
| 36 |
|
| 37 |
public function get_container_class() { |
| 38 |
return ' frm_html_container'; |
| 39 |
} |
| 40 |
|
| 41 |
protected function include_form_builder_file() { |
| 42 |
return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-html.php'; |
| 43 |
} |
| 44 |
} |
| 45 |
|