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
2179
2180      /**
2181       * Filter the default array of block categories.
2182       *
2183       * @since 5.0.0
2184       *
2185       * @param array   $default_categories Array of block categories.
2186       * @param WP_Post $post               Post being loaded.
2187       */
2188      return apply_filters( 'block_categories', $default_categories, $post );
2189 }
2190
2191 /**
2192  * Prepares server-registered blocks for the block editor.
2193  *
2194  * Returns an associative array of registered block data keyed by block name. Data includes properties
2195  * of a block relevant for client registration.
2196  *
2197  * @since 5.0.0