apply_filters( 'block_categories', array[] $default_categories , WP_Post $post )
Filters the default array of block categories.
Parameters Parameters
- $default_categories
-
(array[]) Array of block categories.
- $post
-
(WP_Post) Post being loaded.
Source Source
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Register a new block category for “My Plugin” if it doesn’t exist already.
Note: You can also pass a second argument
$post
to generate a different category depending on the post’s content or type.Expand full source codeCollapse full source code