Automattic\WooCommerce\Blocks\BlockTypes
FeaturedItem::get_image_size
Returns the image size slug for the featured item image.
Method of the class: FeaturedItem{}
No Hooks.
Returns
string.
Usage
// private - for code of main (parent) class only $result = $this->get_image_size( $attributes );
- $attributes(array) (required)
- Block attributes.
Default:empty array
FeaturedItem::get_image_size() FeaturedItem::get image size code WC 11.1.2
private function get_image_size( $attributes ) {
$image_size = 'large';
if ( 'none' !== $attributes['align'] || $attributes['height'] > 800 ) {
$image_size = 'full';
}
return $image_size;
}