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:
  • 5: .

Description

Returns all the categories for block types that will be shown in the block editor.

Related Functions

get_default_block_categories, get_categories, register_block_core_categories, wp_get_post_categories, get_all_category_ids

Top Google Results

User discussions

wpseek mobile