Automattic\WooCommerce\Blocks\BlockTypes

FeaturedItem::hasFocalPoint()privateWC 1.0

Returns whether the focal point is defined for the block.

Method of the class: FeaturedItem{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->hasFocalPoint( $attributes ): bool;
$attributes(array) (required)
Block attributes.
Default: empty array

FeaturedItem::hasFocalPoint() code WC 9.4.2

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