Skip to content

Commit

Permalink
Add docs to disabe remote calls for block patterns (#33930)
Browse files Browse the repository at this point in the history
Adds a new section to the editor filters documentation
for the filter `should_load_remote_block_patterns`

Fixes #32591
  • Loading branch information
mkaz authored Aug 6, 2021
1 parent e5506ed commit e3010b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/reference-guides/filters/editor-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
```

0 comments on commit e3010b2

Please sign in to comment.