PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0.17
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0.17
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/views/frm-entries/errors.php +5 -19 6.315.0.17 View file →
@@ -1,16 +1,5 @@
1 1 <?php
2 -/**
3 - * Form errors and success message wrapper.
4 - *
5 - * @package Formidable
6 - *
7 - * @var stdClass|null $form Form object when available.
8 - * @var string|null $message Success message HTML.
9 - * @var array|null $errors Field errors keyed by field id.
10 - * @var string|null $include_extra_container Optional CSS class for a wrapping container.
11 - */
12 -
13 2 if ( ! defined( 'ABSPATH' ) ) {
14 3 die( 'You are not allowed to call this page directly.' );
15 4 }
16 5
@@ -17,10 +6,8 @@
17 6 if ( isset( $include_extra_container ) ) { ?>
18 7 <div class="<?php echo esc_attr( $include_extra_container ); ?>" id="frm_form_<?php echo esc_attr( $form->id ); ?>_container">
19 8 <?php
20 9 }
21 -
22 -// phpcs:ignore Universal.Operators.StrictComparisons
23 10 if ( isset( $message ) && $message != '' ) {
24 11 if ( FrmAppHelper::is_admin() ) {
25 12 ?>
26 13 <div id="message" class="frm_updated_message" role="status"><?php echo wp_kses_post( $message ); ?></div>
@@ -27,14 +14,15 @@
27 14 <?php
28 15 } else {
29 16 FrmFormsHelper::maybe_get_scroll_js( $form->id );
30 17
31 - // We need to allow scripts here for javascript in the success message
18 + // we need to allow scripts here for javascript in the success message
32 19 echo FrmAppHelper::maybe_kses( $message ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
33 20 }
34 21 }
35 22
36 -if ( ! empty( $errors ) && is_array( $errors ) ) {
23 +if ( isset( $errors ) && is_array( $errors ) && ! empty( $errors ) ) {
24 +
37 25 if ( isset( $form ) && is_object( $form ) ) {
38 26 FrmFormsHelper::get_scroll_js( $form->id );
39 27 }
40 28 ?>
@@ -40,13 +28,11 @@
40 28 ?>
41 29 <div class="<?php echo esc_attr( FrmFormsHelper::form_error_class() ); ?>" role="alert">
42 30 <?php
43 31 $img = '';
44 -
45 32 if ( ! FrmAppHelper::is_admin() ) {
46 33 $img = apply_filters( 'frm_error_icon', $img );
47 -
48 - if ( $img ) {
34 + if ( $img && ! empty( $img ) ) {
49 35 echo '<img src="' . esc_url( $img ) . '" alt="" />';
50 36 }
51 37 }
52 38
@@ -54,9 +40,9 @@
54 40
55 41 ?>
56 42 </div>
57 43 <?php
58 -}//end if
44 +}
59 45
60 46 if ( isset( $include_extra_container ) ) {
61 47 ?>
62 48 </div>