PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 3.06.06
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v3.06.06
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/FrmFieldDefault.php +4 -21 6.263.06.06 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - die( 'You are not allowed to call this page directly.' );
4 -}
5 2
6 3 /**
7 4 * @since 3.0
8 5 */
@@ -9,17 +6,14 @@
9 6 class FrmFieldDefault extends FrmFieldType {
10 7
11 8 /**
12 9 * @var bool
13 - *
14 10 * @since 3.0
15 11 */
16 12 protected $holds_email_values = true;
17 13
18 14 /**
19 - * @param string $type
20 - *
21 - * @return void
15 + * @param $type string
22 16 */
23 17 protected function set_type( $type ) {
24 18 if ( empty( $type ) ) {
25 19 $type = 'text';
@@ -26,13 +20,8 @@
26 20 }
27 21 parent::set_type( $type );
28 22 }
29 23
30 - /**
31 - * @param string $name
32 - *
33 - * @return void
34 - */
35 24 public function show_on_form_builder( $name = '' ) {
36 25 $field = FrmFieldsHelper::setup_edit_vars( $this->field );
37 26
38 27 ob_start();
@@ -41,20 +30,14 @@
41 30 $input_html = ob_get_contents();
42 31 ob_end_clean();
43 32
44 33 if ( empty( $input_html ) ) {
45 - echo $this->builder_text_field( $name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
34 + echo $this->builder_text_field( $name ); // WPCS: XSS ok.
46 35 } else {
47 - echo $input_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
36 + echo $input_html; // WPCS: XSS ok.
48 37 }
49 38 }
50 39
51 - /**
52 - * @param array $args
53 - * @param array $shortcode_atts
54 - *
55 - * @return string
56 - */
57 40 public function front_field_input( $args, $shortcode_atts ) {
58 41 $pass_args = array(
59 42 'errors' => $args['errors'],
60 43 'html_id' => $args['html_id'],
@@ -64,7 +47,7 @@
64 47 do_action( 'frm_form_field_' . $this->type, $this->field, $args['field_name'], $pass_args );
65 48 $input_html = ob_get_contents();
66 49 ob_end_clean();
67 50
68 - return is_string( $input_html ) ? $input_html : '';
51 + return $input_html;
69 52 }
70 53 }