PluginProbe
Gutenberg / 10.0.0
Gutenberg v10.0.0
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / lib / widget-preview-template.php

widget-preview-template.php in Gutenberg 10.0.0, at lib/widget-preview-template.php

45 lines 985 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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