PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 All 139 releases
← All changes | includes/Frontend/Form/View/FormViewer.php +21 -16 3.3.1 → V3.3.2 View file →
@@ -222,16 +222,9 @@
222 222 // $subBtn = $this->_themeDetails->getField($this->_buttons, $buttonClass, '');
223 223 // }
224 224
225 225 if (!empty($msg)) {
226 - $restrictionMsg =
227 - '
228 - <div class="' . $this->_form->getAtomicCls("_frm-ovrly-b{$formID}") . '">
229 - <p class="' . $this->_form->getAtomicCls("_frm-ovrly-msg-b{$formID}") . '">
230 - ' . $msg . '
231 - </p>
232 - </div>
233 - ';
226 + $restrictionMsg = $this->restrictionOverlay($msg, $formID);
234 227 }
235 228 $formHTML =
236 229 '
237 230 <div id="' . $formIdentifier . '"' . $noTranslate['attrs'] . ' class="b' . $formID . '-bit-form ' . $this->_form->getAtomicCls("_frm-bg-b{$formID}") . ' bit-form bf-form-wrapper' . $noTranslate['cls'] . '">
@@ -255,8 +248,27 @@
255 248
256 249 return $formHTML;
257 250 }
258 251
252 + /**
253 + * Restriction overlay; message may hold the visitor IP, so it is kses-filtered.
254 + *
255 + * @param string $msg Restriction message
256 + * @param int $formID Form ID
257 + *
258 + * @return string Overlay markup
259 + */
260 + private function restrictionOverlay($msg, $formID)
261 + {
262 + return '
263 + <div class="' . $this->_form->getAtomicCls("_frm-ovrly-b{$formID}") . '">
264 + <p class="' . $this->_form->getAtomicCls("_frm-ovrly-msg-b{$formID}") . '">
265 + ' . wp_kses_post($msg) . '
266 + </p>
267 + </div>
268 +';
269 + }
270 +
259 271 private function setView($hasFile, $msg)
260 272 {
261 273 $noTranslate = $this->noTranslateMarkup();
262 274 $file_upload_tag = null;
@@ -326,16 +338,9 @@
326 338 $subBtn = $this->_themeDetails->getField($this->_buttons, $buttonClass, '');
327 339 }
328 340
329 341 if (!empty($msg)) {
330 - $restrictionMsg =
331 - '
332 - <div class="' . $this->_form->getAtomicCls("_frm-ovrly-b{$formID}") . '">
333 - <p class="' . $this->_form->getAtomicCls("_frm-ovrly-msg-b{$formID}") . '">
334 - ' . $msg . '
335 - </p>
336 - </div>
337 -';
342 + $restrictionMsg = $this->restrictionOverlay($msg, $formID);
338 343 }
339 344 $formHTML =
340 345 '
341 346 <div id="' . $formIdentifier . '"' . $noTranslate['attrs'] . ' class="b' . $formID . '-bit-form ' . $this->_form->getAtomicCls("_frm-bg-b{$formID}") . ' bit-form bf-form-wrapper' . $noTranslate['cls'] . '">