PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.0.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.0.2
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 2.10.1 2.10.2 All 137 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.0.2, at views/entry-edit-page.php

88 lines 2.8 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
7 if (!defined('ABSPATH')) {
8 exit;
9 }
10 if (!defined('BITFORMS_ASSET_URI')) {
11 exit;
12 }
13
14 $formUpdateVersion = get_option('bitform_form_update_version');
15 $formIdSafe = sanitize_key((string) $formID);
16
17 $bitformCssUrl = BITFORMS_UPLOAD_BASE_URL . '/form-styles/bitform-' . $formID . '.css';
18 $bitformFormIdCssUrl = BITFORMS_UPLOAD_BASE_URL . '/form-styles/bitform-' . $formID . '-formid.css';
19 $customCssSubPath = "/form-styles/bitform-custom-{$formID}.css";
20
21 wp_register_style('bitform-entry-edit-base-' . $formIdSafe, $bitformCssUrl, [], $formUpdateVersion);
22 wp_register_style('bitform-entry-edit-formid-' . $formIdSafe, $bitformFormIdCssUrl, [], $formUpdateVersion);
23 wp_enqueue_style('bitform-entry-edit-base-' . $formIdSafe);
24 wp_enqueue_style('bitform-entry-edit-formid-' . $formIdSafe);
25
26 if (file_exists(BITFORMS_CONTENT_DIR . $customCssSubPath)) {
27 wp_register_style('bitform-entry-edit-custom-' . $formIdSafe, BITFORMS_UPLOAD_BASE_URL . $customCssSubPath, [], $formUpdateVersion);
28 wp_enqueue_style('bitform-entry-edit-custom-' . $formIdSafe);
29 }
30
31 if (isset($font) && '' !== $font) {
32 wp_register_style('bitform-entry-edit-font-' . $formIdSafe, $font, [], $formUpdateVersion);
33 wp_enqueue_style('bitform-entry-edit-font-' . $formIdSafe);
34 }
35
36 $previewJsPath = BITFORMS_UPLOAD_BASE_URL . '/form-scripts/preview-' . $formID . '.js';
37 wp_register_script('bitform-entry-edit-' . $formIdSafe, $previewJsPath, [], $formUpdateVersion, true);
38 wp_enqueue_script('bitform-entry-edit-' . $formIdSafe);
39 if (isset($bfGlobals) && '' !== $bfGlobals) {
40 wp_add_inline_script('bitform-entry-edit-' . $formIdSafe, (string) $bfGlobals, 'before');
41 }
42 ?>
43
44 <!DOCTYPE html>
45 <html lang="en">
46
47 <head>
48 <meta charset="UTF-8">
49 <meta http-equiv="X-UA-Compatible" content="IE=edge">
50 <meta name="viewport" content="width=device-width, initial-scale=1.0">
51 <title><?php echo isset($title) ? esc_html($title) : ''; ?></title>
52 <style>
53 html,
54 body {
55 min-height: 100%;
56 }
57
58 body {
59 display: flex;
60 justify-content: center;
61 align-items: center;
62 flex-direction: column;
63 /* background-color: #f1f1f1; */
64 }
65
66 ._frm-bg-b<?php echo esc_html($formID); ?> {
67 width: 600px;
68 margin-block: 100px;
69 }
70 </style>
71 <?php if (isset($font) && '' !== $font) : ?>
72 <link rel="preconnect" href="https://fonts.googleapis.com">
73 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
74 <?php endif; ?>
75 <?php
76 wp_enqueue_emoji_styles();
77 wp_print_styles();
78 ?>
79 </head>
80
81 <body>
82 <?php echo wp_kses($formHTML, EscapingHelper::getFormAllowedHtml(isset($formContent) ? $formContent : null)); ?>
83
84 <?php wp_print_scripts(); ?>
85 </body>
86
87 </html>
88