woocommerce_hooked_blocks_pattern_exclude_list
A list of pattern slugs to exclude from auto-insert (useful when there are patterns that have a very specific location for the block) Note: The patterns that are currently excluded are the ones that don't work well with the mini-cart block or customer-account block.
Использование
add_filter( 'woocommerce_hooked_blocks_pattern_exclude_list', 'wp_kama_woocommerce_hooked_blocks_pattern_exclude_list_filter' ); /** * Function for `woocommerce_hooked_blocks_pattern_exclude_list` filter-hook. * * @param $array_unique * * @return */ function wp_kama_woocommerce_hooked_blocks_pattern_exclude_list_filter( $array_unique ){ // filter... return $array_unique; }
- $array_unique
- -
Список изменений
С версии 8.5.0 | Введена. |
Где вызывается хук
woocommerce_hooked_blocks_pattern_exclude_list
woocommerce/src/Blocks/Utils/BlockHooksTrait.php 156-159
$pattern_exclude_list = apply_filters( 'woocommerce_hooked_blocks_pattern_exclude_list', array_unique( array_merge( isset( $this->hooked_block_excluded_patterns ) ? $this->hooked_block_excluded_patterns : array(), array( 'twentytwentytwo/header-centered-logo', 'twentytwentytwo/header-stacked' ) ) ) );