Skip to content

Commit

Permalink
Auto-insert Avatar block under comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 4, 2023
1 parent def627b commit f4d5f0c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/experimental/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,7 @@ function gutenberg_auto_insert_blocks( $block_content, $block ) {
return $block_content;
}

$inserted_block_markup = <<<END
<!-- wp:social-links -->
<ul class="wp-block-social-links"><!-- wp:social-link {"url":"https://wordpress.org","service":"wordpress"} /--></ul>
<!-- /wp:social-links -->
END;
$inserted_block_markup = '<!-- wp:avatar {"size":40,"style":{"border":{"radius":"10px"}}} /-->';

$inserted_blocks = parse_blocks( $inserted_block_markup );
$inserted_content = render_block( $inserted_blocks[0] );
Expand Down

0 comments on commit f4d5f0c

Please sign in to comment.