excerpt_allowed_wrapper_blocks
Filters the list of blocks that can be used as wrapper blocks, allowing excerpts to be generated from the innerBlocks of these wrappers.
Usage
add_filter( 'excerpt_allowed_wrapper_blocks', 'wp_kama_excerpt_allowed_wrapper_blocks_filter' ); /** * Function for `excerpt_allowed_wrapper_blocks` filter-hook. * * @param string[] $allowed_wrapper_blocks The list of names of allowed wrapper blocks. * * @return string[] */ function wp_kama_excerpt_allowed_wrapper_blocks_filter( $allowed_wrapper_blocks ){ // filter... return $allowed_wrapper_blocks; }
- $allowed_wrapper_blocks(string[])
- The list of names of allowed wrapper blocks.
Changelog
Since 5.8.0 | Introduced. |
Where the hook is called
excerpt_allowed_wrapper_blocks
wp-includes/blocks.php 907
$allowed_wrapper_blocks = apply_filters( 'excerpt_allowed_wrapper_blocks', $allowed_wrapper_blocks );