Automattic\WooCommerce\Blocks\BlockTypes
FeaturedItem::hasFocalPoint
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() FeaturedItem::hasFocalPoint WC 11.0.1
private function hasFocalPoint( $attributes ): bool {
return is_array( $attributes['focalPoint'] ) && 2 === count( $attributes['focalPoint'] );
}