woocommerce_kses_notice_allowed_tags хук-фильтрWC 3.9.0

Kses notice allowed tags.

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

add_filter( 'woocommerce_kses_notice_allowed_tags', 'wp_kama_woocommerce_kses_notice_allowed_tags_filter' );

/**
 * Function for `woocommerce_kses_notice_allowed_tags` filter-hook.
 * 
 * @param array[]|string $allowed_tags An array of allowed HTML elements and attributes, or a context name such as 'post'.
 *
 * @return array[]|string
 */
function wp_kama_woocommerce_kses_notice_allowed_tags_filter( $allowed_tags ){

	// filter...
	return $allowed_tags;
}
$allowed_tags(array[]|строка)
An array of allowed HTML elements and attributes, or a context name such as 'post'.

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

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

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

wc_kses_notice()
woocommerce_kses_notice_allowed_tags
woocommerce/includes/wc-notice-functions.php 289
return wp_kses( $message, apply_filters( 'woocommerce_kses_notice_allowed_tags', $allowed_tags ) );

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

woocommerce/src/Blocks/Domain/Services/Notices.php 45
add_filter( 'woocommerce_kses_notice_allowed_tags', [ $this, 'add_kses_notice_allowed_tags' ] );