Skip to content

Commit

Permalink
Update block-filters.md (#19595)
Browse files Browse the repository at this point in the history
* Update block-filters.md

Made the description short and meaningful.

* Update docs/designers-developers/developers/filters/block-filters.md

grammatical fix

Co-Authored-By: Marcus Kazmierczak <marcus@mkaz.com>

Co-authored-by: Marcus Kazmierczak <marcus@mkaz.com>
  • Loading branch information
shaikhaezaz80 and mkaz committed Jan 17, 2020
1 parent 247d383 commit 24b95e0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ add_filter( 'block_categories', 'my_plugin_block_categories', 10, 2 );

You can also display an icon with your block category by setting an `icon` attribute. The value can be the slug of a [WordPress Dashicon](https://developer.wordpress.org/resource/dashicons/).

It is possible to set an SVG as the icon of the category if a custom icon is needed. To do so, the icon should be rendered and set on the frontend, so it can make use of WordPress SVG, allowing mobile compatibility and making the icon more accessible.
You can also set a custom icon in SVG format. To do so, the icon should be rendered and set on the frontend, so it can make use of WordPress SVG, allowing mobile compatibility and making the icon more accessible.

To set an SVG icon for the category shown in the previous example, add the following example JavaScript code to the editor calling `wp.blocks.updateCategory` e.g:
```js
Expand All @@ -426,4 +426,3 @@ To set an SVG icon for the category shown in the previous example, add the follo
wp.blocks.updateCategory( 'my-category', { icon: svgIcon } );
} )();
```

0 comments on commit 24b95e0

Please sign in to comment.