Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add excerpt_allowed_wrapper_blocks filter #1479

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,16 @@ function excerpt_remove_blocks( $content ) {
'core/group',
);

/**
* Filters the list of blocks that can be used as wrapper blocks,
* allowing excerpts to be generated from their `innerBlocks`<div class=""></div>
aristath marked this conversation as resolved.
Show resolved Hide resolved
*
* @since 5.8.0
*
* @param array $allowed_wrapper_blocks The list of allowed wrapper blocks.
*/
$allowed_wrapper_blocks = apply_filters( 'excerpt_allowed_wrapper_blocks', $allowed_wrapper_blocks );

$allowed_blocks = array_merge( $allowed_inner_blocks, $allowed_wrapper_blocks );

/**
Expand Down