Automattic\WooCommerce\Blocks\BlockTypes
ProductGalleryThumbnails::should_display_view_all()
Check if View All markup should be displayed.
Method of the class: ProductGalleryThumbnails{}
No Hooks.
Return
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->should_display_view_all( $thumbnails_count, $product_gallery_images, $number_of_thumbnails );
- $thumbnails_count(int) (required)
- Current count of processed thumbnails.
- $product_gallery_images(array) (required)
- Array of product gallery image HTML strings.
- $number_of_thumbnails(int) (required)
- Number of thumbnails configured to display.
ProductGalleryThumbnails::should_display_view_all() ProductGalleryThumbnails::should display view all code WC 9.8.2
protected function should_display_view_all( $thumbnails_count, $product_gallery_images, $number_of_thumbnails ) { return $thumbnails_count === $number_of_thumbnails && count( $product_gallery_images ) > $number_of_thumbnails; }