Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: block_categories

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2217
2218      /**
2219       * Filters the default array of block categories.
2220       *
2221       * @since 5.0.0
2222       *
2223       * @param array[] $default_categories Array of block categories.
2224       * @param WP_Post $post               Post being loaded.
2225       */
2226      return apply_filters( 'block_categories', $default_categories, $post );
2227 }
2228
2229 /**
2230  * Prepares server-registered blocks for the block editor.
2231  *
2232  * Returns an associative array of registered block data keyed by block name. Data includes properties
2233  * of a block relevant for client registration.
2234  *
2235  * @since 5.0.0