Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change block_categories to block_category #24

Merged
merged 1 commit into from
Apr 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Consider an accordion block that is registered with a `title` and `className` at
Poet provides an easy to way register, modify, and unregister Gutenberg block categories. Looking in the config, you will see a commented out example for a Call to Action category:

```php
'block_categories' => [
'block_category' => [
'cta' => [
'title' => 'Call to Action',
'icon' => 'star-filled',
Expand All @@ -230,7 +230,7 @@ This would result in a block category with a slug of `cta`. Once your block cate
In it's simplest form, you can simply pass a string:

```php
'block_categories' => [
'block_category' => [
'my-cool-blocks',
],
```
Expand All @@ -240,15 +240,15 @@ which would result in a `my-cool-blocks` category automatically converting the s
You can also specify the title by passing a value to your slug:

```php
'block_categories' => [
'block_category' => [
'my-cool-blocks' => 'Best Blocks, World.',
],
```

Like post types and taxonomies, modifying an existing block category is the same as registering one:

```php
'block_categories' => [
'block_category' => [
'layouts' => 'Sections',
'common' => ['icon' => 'star-filled'],
],
Expand All @@ -257,7 +257,7 @@ Like post types and taxonomies, modifying an existing block category is the same
You can unregister an existing block category by simply passing `false`:

```php
'block_categories' => [
'block_category' => [
'common' => false,
],
```
Expand Down