Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: block_type_metadata

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
206           'skip_inner_blocks' => true,
207      );
209      /*
210       * Filters the metadata object, the same way it's done inside
211       * `register_block_type_from_metadata()`. This applies some default filters,
212       * like `_wp_multiple_block_styles`, which is required in this case because
213       * the block has multiple styles.
214       */
215      $metadata = apply_filters( 'block_type_metadata', $metadata );
217      register_block_type( 'core/post-comments', $metadata );
218 }
219 add_action( 'init', 'register_legacy_post_comments_block', 21 );