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