Automattic\WooCommerce\Blocks\Domain\Services

Notices::add_kses_notice_allowed_tags()publicWC 1.0

Allow SVG icon in notices.

Метод класса: Notices{}

Хуков нет.

Возвращает

Массив.

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

$Notices = new Notices();
$Notices->add_kses_notice_allowed_tags( $allowed_tags );
$allowed_tags(массив) (обязательный)
Allowed tags.

Код Notices::add_kses_notice_allowed_tags() WC 9.6.0

public function add_kses_notice_allowed_tags( $allowed_tags ) {
	$svg_args = array(
		'svg'  => array(
			'aria-hidden' => true,
			'xmlns'       => true,
			'width'       => true,
			'height'      => true,
			'viewbox'     => true,
			'focusable'   => true,
		),
		'path' => array(
			'd' => true,
		),
	);
	return array_merge( $allowed_tags, $svg_args );
}