ClassesBigCommerceAssetsThemeImage Sizes

Image_Sizes

Class Image_Sizes

Registers custom image sizes for the BigCommerce theme, providing predefined sizes for product images, thumbnails, and category images. The version constant is incremented when any changes are made to the image sizes list.

  • Full name: \BigCommerce\Assets\Theme\Image_Sizes

Constants

ConstantVisibilityTypeValue
VERSIONpublicint2
STATE_METApublicstring’bigcommerce_sizing’
BC_THUMBpublicstring’bc-thumb’
BC_THUMB_LARGEpublicstring’bc-thumb-large’
BC_SMALLpublicstring’bc-small’
BC_MEDIUMpublicstring’bc-medium’
BC_EXTRA_MEDIUMpublicstring’bc-xmedium’
BC_LARGEpublicstring’bc-large’
BC_CATEGORY_IMAGEpublicstring’bc-category-image’

Methods

register_sizes

Registers custom image sizes with WordPress.

public register_sizes(): void

This method loops through the defined image sizes and registers each one using the add_image_size function. The sizes are registered when the theme is set up.



Automatically generated on 2025-01-21