Skip to content

Commit c6cb44a

Browse files
committed
No longer need to set a container id
1 parent c95480a commit c6cb44a

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

frontend/block/view.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { BlockProps, renderBlock } from "../app";
33
declare global {
44
interface Window {
55
ChatrixBlockConfig: {
6-
containerId: string,
76
attributes: object,
87
};
98
}

src/Block/block.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ function () use ( $block_json_path ) {
2828
}
2929

3030
function render( array $attributes ): string {
31-
$handle = 'chatrix-block-config';
32-
$container_id = 'wp-block-automattic-chatrix-container';
33-
31+
$handle = 'chatrix-block-config';
3432
$json_data = wp_json_encode(
3533
array(
36-
'containerId' => $container_id,
37-
'attributes' => $attributes,
34+
'attributes' => $attributes,
3835
)
3936
);
4037

@@ -44,7 +41,7 @@ function render( array $attributes ): string {
4441

4542
ob_start();
4643
?>
47-
<div <?php echo wp_kses_data( get_block_wrapper_attributes() ); ?> id="<?php echo esc_attr( $container_id ); ?>">
44+
<div <?php echo wp_kses_data( get_block_wrapper_attributes() ); ?>>
4845
<?php // Iframe will be rendered here. ?>
4946
</div>
5047
<?php

0 commit comments

Comments
 (0)