Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: block_categories_all

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
76
77      /**
78       * Filters the default array of categories for block types.
79       *
80       * @since 5.8.0
81       *
82       * @param array[]                 $block_categories     Array of categories for block types.
83       * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
84       */
85      $block_categories = apply_filters( 'block_categories_all', $block_categories, $block_editor_context );
86      if ( ! empty( $block_editor_context->post ) ) {
87           $post = $block_editor_context->post;
88
89           /**
90            * Filters the default array of categories for block types.
91            *
92            * @since 5.0.0
93            * @deprecated 5.8.0 Use the {@see 'block_categories_all'} filter instead.
94            *