Automattic\WooCommerce\Blocks\BlockTypes
FeaturedItem::hasFocalPoint
Returns whether the focal point is defined for the block.
Method of the class: FeaturedItem{}
No Hooks.
Returns
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() FeaturedItem::hasFocalPoint code WC 10.8.1
private function hasFocalPoint( $attributes ): bool {
return is_array( $attributes['focalPoint'] ) && 2 === count( $attributes['focalPoint'] );
}