PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
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/widgets/FrmShowForm.php +7 -29 6.265.0 View file →
@@ -9,55 +9,34 @@
9 9 $widget_ops = array( 'description' => __( 'Display a Formidable Form', 'formidable' ) );
10 10 parent::__construct( 'frm_show_form', __( 'Formidable Form', 'formidable' ), $widget_ops );
11 11 }
12 12
13 - /**
14 - * @param array $args
15 - * @param array $instance
16 - *
17 - * @return void
18 - */
19 13 public function widget( $args, $instance ) {
20 14 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
21 15
22 - FrmAppHelper::kses_echo( $args['before_widget'], 'all' );
16 + echo FrmAppHelper::kses( $args['before_widget'], 'all' ); // WPCS: XSS ok.
23 17
24 18 echo '<div class="frm_form_widget">';
25 -
26 19 if ( $title ) {
27 - FrmAppHelper::kses_echo( $args['before_title'] . stripslashes( $title ) . $args['after_title'], 'all' );
20 + echo FrmAppHelper::kses( $args['before_title'] . stripslashes( $title ) . $args['after_title'], 'all' ); // WPCS: XSS ok.
28 21 }
29 22
30 23 $form_atts = array(
31 - 'id' => $instance['form'] ?? 0,
24 + 'id' => isset( $instance['form'] ) ? $instance['form'] : 0,
32 25 'title' => false,
33 - 'description' => $instance['description'] ?? false,
26 + 'description' => isset( $instance['description'] ) ? $instance['description'] : false,
34 27 );
35 28
36 - echo FrmFormsController::get_form_shortcode( $form_atts ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
29 + echo FrmFormsController::get_form_shortcode( $form_atts ); // WPCS: XSS ok.
37 30
38 31 echo '</div>';
39 - FrmAppHelper::kses_echo( $args['after_widget'], 'all' );
32 + echo FrmAppHelper::kses( $args['after_widget'], 'all' ); // WPCS: XSS ok.
40 33 }
41 34
42 - /**
43 - * @param array $new_instance New settings for this instance as input by the user via
44 - * WP_Widget::form().
45 - * @param array $old_instance Old settings for this instance.
46 - *
47 - * @return array Settings to save or bool false to cancel saving.
48 - */
49 35 public function update( $new_instance, $old_instance ) {
50 36 return $new_instance;
51 37 }
52 38
53 - /**
54 - * Outputs the settings update form.
55 - *
56 - * @param array $instance Current settings.
57 - *
58 - * @return string Default return is 'noform'.
59 - */
60 39 public function form( $instance ) {
61 40 $defaults = array(
62 41 'title' => false,
63 42 'form' => false,
@@ -62,9 +41,9 @@
62 41 'title' => false,
63 42 'form' => false,
64 43 'description' => false,
65 44 );
66 - $instance = wp_parse_args( $instance, $defaults );
45 + $instance = wp_parse_args( (array) $instance, $defaults );
67 46 ?>
68 47 <p>
69 48 <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
70 49 <?php esc_html_e( 'Title', 'formidable' ); ?>:
@@ -100,7 +79,6 @@
100 79 <?php esc_html_e( 'Show Description', 'formidable' ); ?>
101 80 </label>
102 81 </p>
103 82 <?php
104 - return '';
105 83 }
106 84 }