Automattic\WooCommerce\Blocks\BlockTypes

FeaturedItem::hasFocalPoint()privateWC 1.0

Returns whether the focal point is defined for the block.

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

Хуков нет.

Возвращает

true|false.

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

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

Код FeaturedItem::hasFocalPoint() WC 8.7.0

private function hasFocalPoint( $attributes ): bool {
	return is_array( $attributes['focalPoint'] ) && 2 === count( $attributes['focalPoint'] );
}