PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.34
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.34
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / models / fields / FrmFieldHTML.php

FrmFieldHTML.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.34, at classes/models/fields/FrmFieldHTML.php

91 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 /**
7 * @since 3.0
8 */
9 class FrmFieldHTML extends FrmFieldType {
10
11 /**
12 * @var string
13 *
14 * @since 3.0
15 */
16 protected $type = 'html';
17
18 /**
19 * @var bool
20 *
21 * @since 3.0
22 */
23 protected $has_input = false;
24
25 /**
26 * @since 4.0
27 *
28 * @param array $args Includes 'field', 'display', and 'values'.
29 *
30 * @return void
31 */
32 public function show_primary_options( $args ) {
33 $field = $args['field'];
34 include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/html-content.php';
35
36 parent::show_primary_options( $args );
37 }
38
39 /**
40 * @return string
41 */
42 public function default_html() {
43 return '<div id="frm_field_[id]_container" class="frm_form_field form-field">[description]</div>';
44 }
45
46 /**
47 * @since 3.0
48 *
49 * @param array $args
50 * @param string $html
51 *
52 * @return string
53 */
54 protected function after_replace_html_shortcodes( $args, $html ) {
55 FrmFieldsHelper::run_wpautop( array( 'wpautop' => true ), $html );
56 $pre_filter = $html;
57 $html = apply_filters( 'frm_get_default_value', $html, (object) $this->field, false );
58
59 return $pre_filter === $html ? do_shortcode( $html ) : $html;
60 }
61
62 /**
63 * @return string
64 */
65 public function get_container_class() {
66 return ' frm_html_container';
67 }
68
69 /**
70 * @return string
71 */
72 protected function include_form_builder_file() {
73 return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-html.php';
74 }
75
76 /**
77 * Overwrite FrmFieldType::should_strip_most_html_before_preparing_display_value.
78 * An HTML field is not populated from user input.
79 * It does not need to be passed through FrmAppHelper::strip_most_html.
80 *
81 * @since 6.8.3
82 *
83 * @param array $atts
84 *
85 * @return bool
86 */
87 protected function should_strip_most_html_before_preparing_display_value( $atts ) {
88 return false;
89 }
90 }
91