gallery-carousel.php
29 lines
| 1 | <?php |
| 2 | /** |
| 3 | * FooGallery default responsive gallery template |
| 4 | */ |
| 5 | global $current_foogallery; |
| 6 | |
| 7 | $lightbox = foogallery_gallery_template_setting_lightbox(); |
| 8 | $inverted = foogallery_gallery_template_setting( 'inverted', '' ); |
| 9 | $show_nav_arrows = foogallery_gallery_template_setting( 'show_nav_arrows', '' ); |
| 10 | $show_pagination = foogallery_gallery_template_setting( 'show_pagination', '' ); |
| 11 | $show_progress = foogallery_gallery_template_setting( 'show_progress', '' ); |
| 12 | $foogallery_default_classes = foogallery_build_class_attribute_safe( $current_foogallery, 'foogallery-lightbox-' . $lightbox, $inverted, $show_nav_arrows, $show_pagination, $show_progress ); |
| 13 | $foogallery_default_attributes = foogallery_build_container_attributes_safe( $current_foogallery, array( 'class' => $foogallery_default_classes ) ); |
| 14 | $foogallery_active_class = 'fg-item-active'; |
| 15 | $args = foogallery_gallery_template_arguments(); |
| 16 | ?><div <?php echo $foogallery_default_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> |
| 17 | <button type="button" class="fg-carousel-prev"></button> |
| 18 | <div class="fg-carousel-inner"> |
| 19 | <div class="fg-carousel-center"></div> |
| 20 | <?php foreach ( foogallery_current_gallery_attachments_for_rendering() as $attachment ) { |
| 21 | $args['class'] = $foogallery_active_class; |
| 22 | echo foogallery_attachment_html( $attachment, $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 23 | $foogallery_active_class = ''; |
| 24 | } ?> |
| 25 | </div> |
| 26 | <div class="fg-carousel-bottom"></div> |
| 27 | <div class="fg-carousel-progress"></div> |
| 28 | <button type="button" class="fg-carousel-next"></button> |
| 29 | </div> |