Automattic\WooCommerce\Blocks\BlockTypes

ProductGalleryPager::render_pager()privateWC 1.0

Renders the pager for the product gallery.

Method of the class: ProductGalleryPager{}

No Hooks.

Return

String|null. The rendered pager HTML, or null if the pager should not be displayed.

Usage

// private - for code of main (parent) class only
$result = $this->render_pager( $product_gallery_images_ids, $pager_display_mode, $number_of_thumbnails );
$product_gallery_images_ids(array) (required)
An array of image IDs for the product gallery.
$pager_display_mode(string) (required)
The display mode for the pager.
$number_of_thumbnails(int) (required)
The number of thumbnails to display in the pager.

ProductGalleryPager::render_pager() code WC 9.4.2

private function render_pager( $product_gallery_images_ids, $pager_display_mode, $number_of_thumbnails ) {
	if ( $number_of_thumbnails < 2 || 'off' === $pager_display_mode ) {
		return null;
	}

	return $this->render_pager_pages( $product_gallery_images_ids, $number_of_thumbnails, $pager_display_mode );
}