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
bit-form / views / entry-edit-page.php

entry-edit-page.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V3.3.2, at views/entry-edit-page.php

94 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // This file is included via Render::view() using extract(); all variables below are in the calling method's local scope, not global namespace.
4
5 use BitCode\BitForm\Core\Util\EscapingHelper;
6 use BitCode\BitForm\Core\Util\FrontendHelpers;
7
8 if (!defined('ABSPATH')) {
9 exit;
10 }
11 if (!defined('BITFORMS_ASSET_URI')) {
12 exit;
13 }
14
15 $formUpdateVersion = get_option('bitform_form_update_version');
16 $formIdSafe = sanitize_key((string) $formID);
17
18 $bitformCssUrl = FrontendHelpers::styleSrc('form-styles/bitform-' . $formID . '.css');
19 $bitformFormIdCssUrl = FrontendHelpers::styleSrc('form-styles/bitform-' . $formID . '-formid.css');
20 $customCssSubPath = "/form-styles/bitform-custom-{$formID}.css";
21
22 wp_register_style('bitform-entry-edit-base-' . $formIdSafe, $bitformCssUrl, [], $formUpdateVersion);
23 wp_register_style('bitform-entry-edit-formid-' . $formIdSafe, $bitformFormIdCssUrl, [], $formUpdateVersion);
24 wp_enqueue_style('bitform-entry-edit-base-' . $formIdSafe);
25 wp_enqueue_style('bitform-entry-edit-formid-' . $formIdSafe);
26
27 if (file_exists(BITFORMS_CONTENT_DIR . $customCssSubPath)) {
28 wp_register_style('bitform-entry-edit-custom-' . $formIdSafe, FrontendHelpers::styleSrc($customCssSubPath), [], $formUpdateVersion);
29 wp_enqueue_style('bitform-entry-edit-custom-' . $formIdSafe);
30 }
31
32 if (isset($font) && '' !== $font) {
33 wp_register_style('bitform-entry-edit-font-' . $formIdSafe, $font, [], $formUpdateVersion);
34 wp_enqueue_style('bitform-entry-edit-font-' . $formIdSafe);
35 }
36
37 $previewJsPath = BITFORMS_UPLOAD_BASE_URL . '/form-scripts/preview-' . $formID . '.js';
38 wp_register_script('bitform-entry-edit-' . $formIdSafe, $previewJsPath, [], $formUpdateVersion, true);
39 wp_enqueue_script('bitform-entry-edit-' . $formIdSafe);
40 if (isset($bfGlobals) && '' !== $bfGlobals) {
41 wp_add_inline_script('bitform-entry-edit-' . $formIdSafe, (string) $bfGlobals, 'before');
42 }
43 ?>
44
45 <!DOCTYPE html>
46 <html lang="en">
47
48 <head>
49 <meta charset="UTF-8">
50 <meta http-equiv="X-UA-Compatible" content="IE=edge">
51 <meta name="viewport" content="width=device-width, initial-scale=1.0">
52 <title><?php echo isset($title) ? esc_html($title) : ''; ?></title>
53 <style>
54 html,
55 body {
56 min-height: 100%;
57 }
58
59 body {
60 display: flex;
61 justify-content: center;
62 align-items: center;
63 flex-direction: column;
64 /* background-color: #f1f1f1; */
65 }
66
67 ._frm-bg-b<?php echo esc_html($formID); ?> {
68 width: 600px;
69 margin-block: 100px;
70 }
71 </style>
72 <?php if (isset($font) && '' !== $font) : ?>
73 <link rel="preconnect" href="https://fonts.googleapis.com">
74 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
75 <?php endif; ?>
76 <?php
77 wp_enqueue_emoji_styles();
78 wp_print_styles();
79 ?>
80 </head>
81
82 <body>
83 <?php
84 // Fallback config for when an optimizer defers or drops the inline script.
85 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- built by buildFormConfigTag(), JSON_HEX_* escaped.
86 echo isset($configTag) ? $configTag : '';
87 ?>
88 <?php echo wp_kses($formHTML, EscapingHelper::getFormAllowedHtml(isset($formContent) ? $formContent : null)); ?>
89
90 <?php wp_print_scripts(); ?>
91 </body>
92
93 </html>
94