Skip to content

Commit

Permalink
Remove render callback from cell block
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi3315 committed Aug 2, 2024
1 parent 9367c78 commit e3d9ef4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
5 changes: 0 additions & 5 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ function register_front_end_styles(): void {
* @return void
*/
function register_blocks(): void {
// Avoid registering blocks in the admin to avoid a conflict with Blade.
if ( is_admin() ) {
return;
}

// Include helper functions.
require_once __DIR__ . '/blocks/helpers.php';

Expand Down
19 changes: 1 addition & 18 deletions src/editor/blocks/table/children/cell/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,5 @@
*/
function bootstrap(): void {
// Register the block.
register_block_type_from_metadata(
__DIR__,
[
'render_callback' => __NAMESPACE__ . '\\render',
]
);
}

/**
* Render this block.
*
* @param mixed[] $attributes The block attributes.
* @param string $content The block default content.
*
* @return string
*/
function render( array $attributes = [], string $content = '' ): string {
return $content;
register_block_type_from_metadata( __DIR__ );
}

0 comments on commit e3d9ef4

Please sign in to comment.