Warning: This hook has been deprecated. Use the ‘block_categories_all’ filter instead.

block_categories WordPress Hook

The block_categories hook is used to register custom blocks categories. This hook is used to register custom blocks categories. This can be used to group blocks together by function, or to create specialized block types.

apply_filters_deprecated( 'block_categories', array[] $block_categories, WP_Post $post ) #

Filters the default array of categories for block types.


Parameters

$block_categories

(array[])Array of categories for block types.

$post

(WP_Post)Post being loaded.


Top ↑

Source

File: wp-includes/block-editor.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Use the 'block_categories_all' filter instead.
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.