PluginProbe
HTML Forms – Simple WordPress Forms Plugin / 1.3.30
HTML Forms – Simple WordPress Forms Plugin v1.3.30
1.7.0 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.3.0 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 All 67 releases
html-forms / views / form-preview.php

form-preview.php in HTML Forms – Simple WordPress Forms Plugin 1.3.30, at views/form-preview.php

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) or exit;
3
4 // fake post to prevent notices in wp_enqueue_scripts call
5 $GLOBALS['post'] = new \WP_Post((object) array( 'filter' => 'raw' ));
6 $GLOBALS['wp_query'] = new \WP_Query();
7
8 // render simple page with form in it.
9 ?><!DOCTYPE html>
10 <html>
11 <head>
12 <meta charset="utf-8" />
13 <link type="text/css" rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
14 <?php
15 wp_enqueue_scripts();
16 wp_print_styles();
17 wp_print_head_scripts();
18 wp_custom_css_cb();
19 ?>
20 <style type="text/css">
21 body{
22 background: white;
23 width: 100%;
24 max-width: 100%;
25 text-align: left;
26 }
27
28 /* hide all other elements */
29 body::before,
30 body::after,
31 body > *:not(#form-preview) {
32 display:none !important;
33 }
34
35 #form-preview {
36 display: block !important;
37 width: 100%;
38 height: 100%;
39 padding: 20px;
40 border: 0;
41 margin: 0;
42 }
43 </style>
44 </head>
45 <body class="page-template-default page ">
46 <div id="form-preview" class="page type-page status-publish hentry post post-content">
47 <?php echo $form; ?>
48 </div>
49 <?php wp_footer(); ?>
50 </body>
51 </html>
52