Title: excerpt_allowed_blocks
Published: December 6, 2018
Last modified: February 24, 2026

---

# apply_filters( ‘excerpt_allowed_blocks’, string[] $allowed_blocks )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#wp--skip-link--target)

Filters the list of blocks that can contribute to the excerpt.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#description)󠁿

If a dynamic block is added to this list, it must not generate another excerpt, 
as this will cause an infinite loop to occur.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#parameters)󠁿

 `$allowed_blocks`string[]

The list of names of allowed blocks.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#source)󠁿

    ```php
    $allowed_blocks = apply_filters( 'excerpt_allowed_blocks', $allowed_blocks );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/blocks.php#L2181)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/blocks.php#L2181-L2181)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#related)󠁿

| Used by | Description | 
| [excerpt_remove_blocks()](https://developer.wordpress.org/reference/functions/excerpt_remove_blocks/)`wp-includes/blocks.php` |

Parses blocks out of a content string, and renders those appropriate for the excerpt.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.0.0](https://developer.wordpress.org/reference/since/5.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fexcerpt_allowed_blocks%2F)
before being able to contribute a note or feedback.