| @@ -12,43 +12,31 @@ | ||
| 12 | 12 | |
| 13 | 13 | public function widget( $args, $instance ) { |
| 14 | 14 | $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); |
| 15 | 15 | |
| 16 | - FrmAppHelper::kses_echo( $args['before_widget'], 'all' ); | |
| 16 | + echo FrmAppHelper::kses( $args['before_widget'], 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 17 | 17 | |
| 18 | 18 | echo '<div class="frm_form_widget">'; |
| 19 | 19 | if ( $title ) { |
| 20 | - 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' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | $form_atts = array( |
| 24 | - 'id' => $instance['form'] ?? 0, | |
| 24 | + 'id' => isset( $instance['form'] ) ? $instance['form'] : 0, | |
| 25 | 25 | 'title' => false, |
| 26 | - 'description' => $instance['description'] ?? false, | |
| 26 | + 'description' => isset( $instance['description'] ) ? $instance['description'] : false, | |
| 27 | 27 | ); |
| 28 | 28 | |
| 29 | 29 | echo FrmFormsController::get_form_shortcode( $form_atts ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 30 | 30 | |
| 31 | 31 | echo '</div>'; |
| 32 | - FrmAppHelper::kses_echo( $args['after_widget'], 'all' ); | |
| 32 | + echo FrmAppHelper::kses( $args['after_widget'], 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - /** | |
| 36 | - * @param array $new_instance New settings for this instance as input by the user via | |
| 37 | - * WP_Widget::form(). | |
| 38 | - * @param array $old_instance Old settings for this instance. | |
| 39 | - * @return array Settings to save or bool false to cancel saving. | |
| 40 | - */ | |
| 41 | 35 | public function update( $new_instance, $old_instance ) { |
| 42 | 36 | return $new_instance; |
| 43 | 37 | } |
| 44 | 38 | |
| 45 | - /** | |
| 46 | - * Outputs the settings update form. | |
| 47 | - * | |
| 48 | - * @param array $instance Current settings. | |
| 49 | - * @return string Default return is 'noform'. | |
| 50 | - */ | |
| 51 | 39 | public function form( $instance ) { |
| 52 | 40 | $defaults = array( |
| 53 | 41 | 'title' => false, |
| 54 | 42 | 'form' => false, |
| @@ -91,7 +79,6 @@ | ||
| 91 | 79 | <?php esc_html_e( 'Show Description', 'formidable' ); ?> |
| 92 | 80 | </label> |
| 93 | 81 | </p> |
| 94 | 82 | <?php |
| 95 | - return ''; | |
| 96 | 83 | } |
| 97 | 84 | } |