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