Function: get_block_categories

get_block_categories( WP_Post $post )

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

Shortcut: gbc

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Parameters

Name Type(s) Default Value Description
$post WP_Post

Post object.

Returns

array

Array of block categories.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.