Filters the list of blocks that can contribute to the excerpt.
$allowed_blocksstring[]wp-includes/blocks.php:2296excerpt_remove_blocks() * excerpt, as this will cause an infinite loop to occur. * * @since 5.0.0 * * @param string[] $allowed_blocks The list of names of allowed blocks. */ $allowed_blocks = apply_filters( 'excerpt_allowed_blocks', $allowed_blocks ); $blocks = parse_blocks( $content ); $output = ''; foreach ( $blocks as $block ) { // Hide the block whenever the value is boolean false, regardless of the // block's current visibility support. This prevents blocks that previouslyIntroduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.