WordPress at Your Fingertips
filter is not described

block_categories filter-hook . WP 5.0.0

Deprecated from version 5.8.0. It is no longer supported and can be removed in future releases. See block_categories_all.

Deprecated: 5.8.0 Use the {@see 'block_categories_all'} filter instead.

Filters the default array of categories for block types.

Usage

add_filter( 'block_categories', 'filter_function_name_5872', 10, 3 );
function filter_function_name_5872( $block_categories, $post, $string ){
	// filter...

	return $block_categories;
}
$block_categories(array[])
Array of categories for block types.
$post(WP_Post)
Post being loaded.
$string
-

Changelog

Since 5.0.0 Introduced.
Deprecated Since 5.8.0 Use the {@see 'block_categories_all'} filter instead.

Where the hook is called

get_block_categories()
block_categories
wp-includes/block-editor.php 98
$block_categories = apply_filters_deprecated( 'block_categories', array( $block_categories, $post ), '5.8.0', 'block_categories_all' );

Where in WP core the hook is used WordPress

Usage not found.