Skip to content

Commit

Permalink
Update docs for unregisterBlockType (#13273)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz authored and gziolo committed Jan 22, 2019
1 parent 8fdf3cd commit 2165147
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/designers-developers/developers/filters/block-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,9 @@ Adding blocks is easy enough, removing them is as easy. Plugin or theme authors

```js
// my-plugin.js

wp.blocks.unregisterBlockType( 'core/verse' );
wp.domReady( function() {
wp.blocks.unregisterBlockType( 'core/verse' );
} );
```

and load this script in the Editor
Expand All @@ -275,7 +276,7 @@ function my_plugin_blacklist_blocks() {
wp_enqueue_script(
'my-plugin-blacklist-blocks',
plugins_url( 'my-plugin.js', __FILE__ ),
array( 'wp-blocks' )
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' )
);
}
add_action( 'enqueue_block_editor_assets', 'my_plugin_blacklist_blocks' );
Expand Down

0 comments on commit 2165147

Please sign in to comment.