PluginProbe
Float menu – awesome floating side menu / 6.1
Float menu – awesome floating side menu v6.1
7.2.5 trunk 2.1 2.2 3.0.1 3.1 3.2.2 3.3.1 3.5 3.5.1 3.5.2 3.5.3. 3.5.4 4.0 4.1 4.1.1 4.2 4.3 4.3.1 4.3.2 5.0 5.0.1 5.0.2 5.0.3 5.1 All 57 releases
← All changes | classes/Admin/SupportForm.php +13 -3 trunk6.1 View file →
@@ -1,6 +1,18 @@
1 1 <?php
2 2
3 +/**
4 + * Class SupportForm
5 + *
6 + * This class handles the support form functionality.
7 + *
8 + * @ackage WowPlugin
9 + * @subpackage Admin
10 + * @author Dmytro Lobov <dev@wow-company.com>, Wow-Company
11 + * @copyright 2024 Dmytro Lobov
12 + * @license GPL-2.0+
13 + */
14 +
3 15 namespace FloatMenuLite\Admin;
4 16
5 17 defined( 'ABSPATH' ) || exit;
6 18
@@ -123,9 +135,9 @@
123 135 echo '<p class="notice notice-error">' . esc_html( $error ) . '</p>';
124 136
125 137 return;
126 138 }
127 - // phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verification is handled elsewhere.
139 +
128 140 $from = isset( $_POST['support']['name'] ) ? sanitize_text_field( wp_unslash( $_POST['support']['name'] ) ) : '';
129 141 $email = isset( $_POST['support']['email'] ) ? sanitize_email( wp_unslash( $_POST['support']['email'] ) ) : '';
130 142 $license = isset( $_POST['support']['license'] ) ? sanitize_text_field( wp_unslash( $_POST['support']['license'] ) ) : '';
131 143 $plugin = isset( $_POST['support']['plugin'] ) ? sanitize_text_field( wp_unslash( $_POST['support']['plugin'] ) ) : '';
@@ -131,9 +143,8 @@
131 143 $plugin = isset( $_POST['support']['plugin'] ) ? sanitize_text_field( wp_unslash( $_POST['support']['plugin'] ) ) : '';
132 144 $link = isset( $_POST['support']['link'] ) ? sanitize_url( wp_unslash( $_POST['support']['link'] ) ) : '';
133 145 $message = isset( $_POST['support']['message'] ) ? wp_kses_post( wp_unslash( $_POST['support']['message'] ) ) : '';
134 146 $type = isset( $_POST['support']['type'] ) ? sanitize_text_field( wp_unslash( $_POST['support']['type'] ) ) : '';
135 - // phpcs:enable
136 147
137 148 $headers = array(
138 149 'From: ' . esc_attr( $from ) . ' <' . esc_attr( $email ) . '>',
139 150 'content-type: text/html',
@@ -178,9 +189,8 @@
178 189
179 190 $fields = [ 'name', 'email', 'link', 'type', 'plugin', 'license', 'message' ];
180 191
181 192 foreach ( $fields as $field ) {
182 - // phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verification is handled elsewhere.
183 193 if ( empty( $_POST['support'][ $field ] ) ) {
184 194 return __( 'Please fill in all the form fields below.', 'float-menu' );
185 195 }
186 196 }