| 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 |
|