get_block_type_uses_context хук-фильтрWP 6.5.0

Filters the registered uses context for a block type.

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

add_filter( 'get_block_type_uses_context', 'wp_kama_get_block_type_uses_context_filter', 10, 2 );

/**
 * Function for `get_block_type_uses_context` filter-hook.
 * 
 * @param string[]      $uses_context Array of registered uses context for a block type.
 * @param WP_Block_Type $block_type   The full block type object.
 *
 * @return string[]
 */
function wp_kama_get_block_type_uses_context_filter( $uses_context, $block_type ){
	// filter...
	return $uses_context;
}
$uses_context(string[])
Array of registered uses context for a block type.
$block_type(WP_Block_Type)
The full block type object.

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

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

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

WP_Block_Type::get_uses_context()
get_block_type_uses_context
wp-includes/class-wp-block-type.php 635
return apply_filters( 'get_block_type_uses_context', $this->uses_context, $this );

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

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