PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32
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
← All changes | classes/models/fields/FrmFieldHTML.php +24 -5 6.36.32 View file →
@@ -9,8 +9,9 @@
9 9 class FrmFieldHTML extends FrmFieldType {
10 10
11 11 /**
12 12 * @var string
13 + *
13 14 * @since 3.0
14 15 */
15 16 protected $type = 'html';
16 17
@@ -15,8 +16,9 @@
15 16 protected $type = 'html';
16 17
17 18 /**
18 19 * @var bool
20 + *
19 21 * @since 3.0
20 22 */
21 23 protected $has_input = false;
22 24
@@ -22,9 +24,9 @@
22 24
23 25 /**
24 26 * @since 4.0
25 27 *
26 - * @param array $args - Includes 'field', 'display', and 'values'
28 + * @param array $args Includes 'field', 'display', and 'values'.
27 29 *
28 30 * @return void
29 31 */
30 32 public function show_primary_options( $args ) {
@@ -42,18 +44,20 @@
42 44 }
43 45
44 46 /**
45 47 * @since 3.0
48 + *
49 + * @param array $args
50 + * @param string $html
51 + *
52 + * @return string
46 53 */
47 54 protected function after_replace_html_shortcodes( $args, $html ) {
48 55 FrmFieldsHelper::run_wpautop( array( 'wpautop' => true ), $html );
49 56 $pre_filter = $html;
50 57 $html = apply_filters( 'frm_get_default_value', $html, (object) $this->field, false );
51 - if ( $pre_filter === $html ) {
52 - $html = do_shortcode( $html );
53 - }
54 58
55 - return $html;
59 + return $pre_filter === $html ? do_shortcode( $html ) : $html;
56 60 }
57 61
58 62 /**
59 63 * @return string
@@ -66,6 +70,21 @@
66 70 * @return string
67 71 */
68 72 protected function include_form_builder_file() {
69 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;
70 89 }
71 90 }