get_block_categories
get_block_categories ( $post_or_block_editor_context )
Parameters:- (WP_Post|WP_Block_Editor_Context) post_or_block_editor_context The current post object or the block editor context.
Returns:- (array[]) Array of categories for block types.
Defined at:Change Log: - Introduced in WordPress: 5.0.0
- Deprecated in WordPress: —
Description
Returns all the categories for block types that will be shown in the block editor.