From 4caec0940b8acdbf5459b691f27efd48e31d40f3 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Fri, 6 Aug 2021 06:53:49 -0700 Subject: [PATCH] Add docs to disabe remote calls for block patterns Adds a new section to the editor filters documentation for the filter `should_load_remote_block_patterns` Fixes #32591 --- docs/reference-guides/filters/editor-filters.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/reference-guides/filters/editor-filters.md b/docs/reference-guides/filters/editor-filters.md index a445abe95e177..28d03bd4ab56d 100644 --- a/docs/reference-guides/filters/editor-filters.md +++ b/docs/reference-guides/filters/editor-filters.md @@ -134,3 +134,15 @@ The Block Directory enables installing new block plugins from [WordPress.org.](h remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); ``` + +### Block Patterns + +#### `should_load_remote_block_patterns` + +Default `true`. The filter is checked when registering remote block patterns, set to false to disable. + +For example, to disable use: + +``` +add_filter( 'should_load_remote_block_patterns', '__return_false' ); +```