Skip to content

Commit a816be9

Browse files
committed
Wrap block preview and add padding
1 parent d337a43 commit a816be9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

includes/Admin/SharedBlocksListTable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ protected function handle_row_actions( $item, $column_name, $primary ): string {
237237
add_query_arg(
238238
[
239239
'TB_iframe' => true,
240-
'width' => 850,
241-
'height' => 500,
240+
'width' => 870,
241+
'height' => 520,
242242
],
243243
Helpers::get_shared_block_preview_link(
244244
$item->get_site_id(),

views/preview.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
<?php wp_head(); ?>
2121
</head>
2222
<body>
23+
<?php wp_body_open(); ?>
24+
<div class="shared-block-preview" style="padding: 20px;">
2325
<?php
24-
wp_body_open();
2526
$blocks = parse_blocks(
2627
sprintf(
2728
'<!-- wp:multisite-shared-blocks/shared-block {"siteId":%s,"postId":%s,"blockId":"%s","blockTitle":""} /-->',
@@ -46,5 +47,7 @@
4647
echo wp_kses_post( $output );
4748
remove_filter( 'wp_kses_allowed_html', [ Helpers::class, 'kses_post_iframe_tag' ] );
4849
?>
50+
</div>
51+
<?php wp_footer(); ?>
4952
</body>
5053
</html>

0 commit comments

Comments
 (0)