excerpt_allowed_wrapper_blocks хук-фильтрWP 5.8.0

Filters the list of blocks that can be used as wrapper blocks, allowing excerpts to be generated from the innerBlocks of these wrappers.

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

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.

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

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

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

excerpt_remove_blocks()
excerpt_allowed_wrapper_blocks
wp-includes/blocks.php 1540
$allowed_wrapper_blocks = apply_filters( 'excerpt_allowed_wrapper_blocks', $allowed_wrapper_blocks );

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

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