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
1994
1995      /**
1996       * Filter the default array of block categories.
1997       *
1998       * @since 5.0.0
1999       *
2000       * @param array   $default_categories Array of block categories.
2001       * @param WP_Post $post               Post being loaded.
2002       */
2003      return apply_filters( 'block_categories', $default_categories, $post );
2004 }
2005
2006 /**
2007  * Prepares server-registered blocks for the block editor.
2008  *
2009  * Returns an associative array of registered block data keyed by block name. Data includes properties
2010  * of a block relevant for client registration.
2011  *
2012  * @since 5.0.0