| 1 |
<?php |
| 2 |
/** |
| 3 |
* Start: Include for phase 2 |
| 4 |
* Template used to render widget previews. |
| 5 |
* |
| 6 |
* @package gutenberg |
| 7 |
* @since 5.4.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! function_exists( 'wp_head' ) ) { |
| 11 |
exit; |
| 12 |
} |
| 13 |
?> |
| 14 |
<!doctype html> |
| 15 |
<html <?php language_attributes(); ?>> |
| 16 |
<head> |
| 17 |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> |
| 18 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 19 |
<link rel="profile" href="https://gmpg.org/xfn/11" /> |
| 20 |
<?php wp_head(); ?> |
| 21 |
<style> |
| 22 |
/* Reset theme styles */ |
| 23 |
html, body, #page, #content { |
| 24 |
background: #FFF !important; |
| 25 |
padding: 0 !important; |
| 26 |
margin: 0 !important; |
| 27 |
} |
| 28 |
</style> |
| 29 |
</head> |
| 30 |
|
| 31 |
<body <?php body_class(); ?>> |
| 32 |
<div id="page" class="site"> |
| 33 |
<div id="content" class="site-content"> |
| 34 |
<?php |
| 35 |
$registry = WP_Block_Type_Registry::get_instance(); |
| 36 |
$block = $registry->get_registered( 'core/legacy-widget' ); |
| 37 |
echo $block->render( $_GET['widget-preview'] ); |
| 38 |
?> |
| 39 |
</div><!-- #content --> |
| 40 |
</div><!-- #page --> |
| 41 |
|
| 42 |
<?php wp_footer(); ?> |
| 43 |
</body> |
| 44 |
</html> |
| 45 |
|