Automattic\WooCommerce\Blocks\BlockTypes

ProductGalleryPager::get_dot_icon()privateWC 1.0

Generates an SVG dot icon with the specified opacity.

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

Хуков нет.

Возвращает

Строку. The SVG dot icon HTML.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_dot_icon( $is_active );
$is_active(true|false)
Whether the dot icon should be in active state.
По умолчанию: false

Код ProductGalleryPager::get_dot_icon() WC 9.5.1

private function get_dot_icon( $is_active = false ) {
	$initial_opacity = $is_active ? '1' : '0.2';
	return sprintf(
		'<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
			<circle cx="6" cy="6" r="6" fill="black" fill-opacity="%1$s" data-wc-bind--fill-opacity="state.pagerDotFillOpacity" />
		</svg>',
		$initial_opacity
	);
}