Skip to content

Commit

Permalink
Remove Gutenberg Pattern block resolution filters.
Browse files Browse the repository at this point in the history
This is a temporary fix for: #12

This is unlikely to work if/when the change is merged in Core.
  • Loading branch information
justintadlock committed May 12, 2024
1 parent 5bffecb commit 4ff1c54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public function __construct(
public function boot(): void
{
$this->hookMethods();

// Temporary fix for Gutenberg 18.1+ bypassing `render_block`
// when calling the Pattern block.
// @link https://github.com/x3p0-dev/x3p0-ideas/issues/12
remove_filter( 'get_block_templates', 'gutenberg_replace_pattern_blocks_get_block_templates' );
remove_filter( 'get_block_template', 'gutenberg_replace_pattern_blocks_get_block_template' );
}

/**
Expand Down

0 comments on commit 4ff1c54

Please sign in to comment.