Automattic\WooCommerce\Blocks\BlockTypes
ProductGalleryPager::render_pager()
Renders the pager for the product gallery.
Метод класса: ProductGalleryPager{}
Хуков нет.
Возвращает
Строку|null
. The rendered pager HTML, or null if the pager should not be displayed.
Использование
// private - только в коде основоного (родительского) класса $result = $this->render_pager( $product_gallery_images_ids, $pager_display_mode, $number_of_thumbnails );
- $product_gallery_images_ids(массив) (обязательный)
- An array of image IDs for the product gallery.
- $pager_display_mode(строка) (обязательный)
- The display mode for the pager.
- $number_of_thumbnails(int) (обязательный)
- The number of thumbnails to display in the pager.
Код ProductGalleryPager::render_pager() ProductGalleryPager::render pager WC 9.6.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 ); }