excerpt_allowed_blocks хук-фильтрWP 5.0.0

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

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


add_filter( 'excerpt_allowed_blocks', 'wp_kama_excerpt_allowed_blocks_filter' );

 * Function for `excerpt_allowed_blocks` filter-hook.
 * @param string[] $allowed_blocks The list of names of allowed blocks.
 * @return string[]
function wp_kama_excerpt_allowed_blocks_filter( $allowed_blocks ){

	// filter...
	return $allowed_blocks;
The list of names of allowed blocks.

Список изменений

С версии 5.0.0 Введена.

Где вызывается хук

wp-includes/blocks.php 921
$allowed_blocks = apply_filters( 'excerpt_allowed_blocks', $allowed_blocks );

Где используется хук в WordPress

Использование не найдено.