PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 1.07.11
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v1.07.11
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/shared/errors.php +11 -89 6.271.07.11 View file →
@@ -1,90 +1,12 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - die( 'You are not allowed to call this page directly.' );
4 -}
1 +<div class="clear"></div>
2 +<?php if (isset($message) && $message != ''){ if(is_admin() and !defined('DOING_AJAX')){ ?><div id="message" class="updated" style="padding:5px;"><?php } echo $message; if(is_admin() and !defined('DOING_AJAX')){ ?></div><?php } } ?>
5 3
6 -if ( isset( $message ) && '' !== $message ) {
7 - if ( FrmAppHelper::is_admin() ) {
8 - echo '<div class="frm_updated_message">';
9 - FrmAppHelper::kses_echo( $message, 'all' );
10 - echo '</div>';
11 - } else {
12 - echo FrmAppHelper::maybe_kses( $message ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
13 - }
14 -}
15 -
16 -if ( ! isset( $show_messages ) ) {
17 - $show_messages = array();
18 -}
19 -
20 -$show_messages = apply_filters( 'frm_message_list', $show_messages );
21 -
22 -if ( is_array( $show_messages ) && count( $show_messages ) > 0 ) {
23 - // Define a callback function to add 'data-action' attribute to allowed HTML tags
24 - $add_data_action_callback = function ( $allowed_html ) {
25 - $allowed_html['span']['data-action'] = true;
26 - return $allowed_html;
27 - };
28 - ?>
29 - <div class="frm_warning_style" role="alert">
30 - <ul id="frm_messages">
31 - <?php
32 - // Add the callback function to the 'frm_striphtml_allowed_tags' filter
33 - add_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback );
34 -
35 - foreach ( $show_messages as $m ) {
36 - echo '<li>' . FrmAppHelper::kses( $m, array( 'a', 'br', 'span', 'p', 'svg', 'use' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
37 - }
38 - // Remove the callback function from the 'frm_striphtml_allowed_tags' filter
39 - remove_filter( 'frm_striphtml_allowed_tags', $add_data_action_callback );
40 - ?>
41 - </ul>
42 - </div>
43 - <?php
44 -}//end if
45 -
46 -if ( ! empty( $warnings ) && is_array( $warnings ) ) {
47 - ?>
48 - <div class="frm_warning_style inline" role="alert">
49 - <div class="frm_warning_heading"> <?php echo esc_html__( 'Warning:', 'formidable' ); ?></div>
50 - <ul id="frm_warnings">
51 - <?php
52 - foreach ( $warnings as $warning ) {
53 - echo '<li>' . FrmAppHelper::kses( $warning, array( 'a', 'br' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
54 - }
55 - ?>
56 - </ul>
57 - </div>
58 - <?php
59 -}
60 -
61 -if ( ! empty( $errors ) && is_array( $errors ) ) {
62 - ?>
63 - <div class="frm_error_style inline" role="alert">
64 - <ul id="frm_errors">
65 - <?php
66 - foreach ( $errors as $error ) {
67 - echo '<li>' . FrmAppHelper::kses( $error, array( 'a', 'br' ) ) . '</li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
68 - }
69 - ?>
70 - </ul>
71 - </div>
72 - <?php
73 -}
74 -
75 -if ( ! empty( $notes ) && is_array( $notes ) ) {
76 - foreach ( $notes as $note ) {
77 - ?>
78 - <div class="frm_note_style">
79 - <?php
80 - if ( is_string( $note ) ) {
81 - echo esc_html( $note );
82 - } elseif ( is_callable( $note ) ) {
83 - // If $note is a function call it so we can handle cases where we don't want to wrap the whole note in esc_html.
84 - $note();
85 - }
86 - ?>
87 - </div>
88 - <?php
89 - }
90 -}
4 +<?php if( isset($errors) && is_array($errors) && count($errors) > 0 ){ ?>
5 + <div class="error">
6 + <ul id="frm_errors">
7 + <?php foreach( $errors as $error )
8 + echo '<li>' . $error . '</li>';
9 + ?>
10 + </ul>
11 + </div>
12 +<?php } ?>