Automattic\WooCommerce\Blocks\BlockTypes

FeaturedItem::get_image_size │ private │ WC 1.0

Returns the image size slug for the featured item image.

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

Хуков нет.

Возвращает

string.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_image_size( $attributes );
$attributes(массив) (обязательный)
Block attributes.
По умолчанию: empty array

Код FeaturedItem::get_image_size() WC 11.3.0

private function get_image_size( $attributes ) {
	$image_size = 'large';
	if ( 'none' !== $attributes['align'] || $attributes['height'] > 800 ) {
		$image_size = 'full';
	}

	return $image_size;
}