PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.5.2
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.5.2
3.5.2 3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / templates / emails / email-preview.php
everest-forms / templates / emails Last commit date
body-default.php 1 year ago default.php 2 years ago email-preview.php 1 year ago field-default.php 2 years ago footer-default.php 2 years ago header-default.php 2 years ago
email-preview.php
155 lines
1 <?php
2 /**
3 * Everest Form email preview template.
4 *
5 * @since 2.0.5
6 *
7 * @package Everest form email preview template.
8 */
9
10 defined( 'ABSPATH' ) || exit;
11 ?>
12 <!DOCTYPE html>
13 <html <?php language_attributes(); ?> style="background-color: #E9EAEC;">
14 <head>
15 <meta name="viewport" content="width=device-width"/>
16 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
17 <title>
18 <?php get_bloginfo( 'name' ); ?>
19 </title>
20 </head>
21 <body <?php body_class(); ?> >
22 <?php
23 $connection_id = isset( $_GET['evf_email_preview'] ) ? $_GET['evf_email_preview'] : '';
24 /**
25 * Get email message from the specific email connection
26 *
27 * @return array email preview message.
28 */
29 function form_data() {
30 $form_data = array();
31
32 if ( ! empty( $_GET['form_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
33 $connection_id = isset( $_GET['evf_email_preview'] ) ? $_GET['evf_email_preview'] : '';
34 $form_data = evf()->form->get( absint( $_GET['form_id'] ), array( 'content_only' => true ) ); // phpcs:ignore WordPress.Security.NonceVerification
35
36 if ( isset( $form_data['settings']['email'][ "$connection_id" ] ) && isset( $form_data['settings']['email'][ "$connection_id" ]['evf_email_message'] ) ) {
37 $email_preview_message = $form_data['settings']['email'][ "$connection_id" ]['evf_email_message'];
38 }
39 }
40
41 return $form_data;
42 }
43
44
45 // Email data of the specific connection.
46 $email_form_data = form_data();
47
48 if ( isset( $email_form_data['settings']['email'] ) && isset( $email_form_data['settings']['email'][ $connection_id ] ) ) {
49 $email_content = $email_form_data['settings']['email'][ $connection_id ]['evf_email_message'];
50 $email_template_included = isset( $email_form_data['settings']['email'][ $connection_id ]['choose_template'] ) ? $email_form_data['settings']['email'][ $connection_id ]['choose_template'] : 0;
51 }
52
53 // Initializing the EVF_Emails class to import the email template.
54 $evf_emails_obj = new EVF_Emails();
55 $evf_emails_obj->form_data = $email_form_data;
56
57 if ( empty( $email_content ) ) {
58 $email_content = esc_html__( '{all_fields}', 'everest-forms' );
59 }
60
61 $email_content = str_replace( '{all_fields}', evf_process_all_fields_smart_tag( $email_content ), $email_content );
62
63 // Email Template Enabled or not checked.
64 $email_template_included = ! empty( $email_form_data['settings']['email'][ $connection_id ]['choose_template'] ) ? $email_content : 0;
65
66 if ( $email_template_included ) {
67 $email_content = apply_filters( 'everest_forms_email_template_message', $email_content, $evf_emails_obj, $connection_id );
68 $allowed_tags = array(
69 'p' => array(
70 'style' => array(),
71 ),
72 'table' => array(
73 'border' => array(),
74 'cellpadding' => array(),
75 'cellspacing' => array(),
76 'style' => array(),
77 ),
78 'tr' => array(
79 'style' => array(),
80 ),
81 'td' => array(
82 'style' => array(),
83 ),
84 'img' => array(
85 'src' => array(),
86 'alt' => array(),
87 'height' => array(),
88 'width' => array(),
89 'style' => array(),
90 ),
91 'a' => array(
92 'href' => array(),
93 'title' => array(),
94 'style' => array(),
95 ),
96 'h1' => array( 'style' => array() ),
97 'h2' => array( 'style' => array() ),
98 'h3' => array( 'style' => array() ),
99 'h4' => array( 'style' => array() ),
100 'h5' => array( 'style' => array() ),
101 'h6' => array( 'style' => array() ),
102 'br' => array(),
103 'strong' => array(),
104 'em' => array(),
105 'style' => array(),
106 );
107 echo wp_kses( $email_content, $allowed_tags );
108 } else {
109 $email_content = $evf_emails_obj->build_email( $email_content );
110 $allowed_tags = array(
111 'p' => array(
112 'style' => array(),
113 ),
114 'table' => array(
115 'border' => array(),
116 'cellpadding' => array(),
117 'cellspacing' => array(),
118 'style' => array(),
119 ),
120 'tr' => array(
121 'style' => array(),
122 ),
123 'td' => array(
124 'style' => array(),
125 ),
126 'img' => array(
127 'src' => array(),
128 'alt' => array(),
129 'height' => array(),
130 'width' => array(),
131 'style' => array(),
132 ),
133 'a' => array(
134 'href' => array(),
135 'title' => array(),
136 'style' => array(),
137 ),
138 'h1' => array( 'style' => array() ),
139 'h2' => array( 'style' => array() ),
140 'h3' => array( 'style' => array() ),
141 'h4' => array( 'style' => array() ),
142 'h5' => array( 'style' => array() ),
143 'h6' => array( 'style' => array() ),
144 'br' => array(),
145 'strong' => array(),
146 'em' => array(),
147 'style' => array(),
148 );
149 echo wp_kses( $email_content, $allowed_tags );
150 }
151
152 ?>
153 </body>
154 </html>
155