gallery-default.php
25 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 | $lightbox = foogallery_gallery_template_setting_lightbox(); |
| 13 | $mobile_columns = foogallery_gallery_template_setting( 'mobile_columns', '' ); |
| 14 | $alignment = foogallery_gallery_template_setting( 'alignment', 'fg-center' ); |
| 15 | $layout = foogallery_gallery_template_setting( 'layout', '' ); |
| 16 | |
| 17 | $foogallery_default_classes = foogallery_build_class_attribute_safe( $current_foogallery, 'foogallery-lightbox-' . $lightbox, $alignment, $mobile_columns, $layout ); |
| 18 | $foogallery_default_attributes = foogallery_build_container_attributes_safe( $current_foogallery, array( 'class' => $foogallery_default_classes ) ); |
| 19 | |
| 20 | ?><div <?php echo $foogallery_default_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> |
| 21 | <?php foreach ( foogallery_current_gallery_attachments_for_rendering() as $attachment ) { |
| 22 | echo foogallery_attachment_html( $attachment ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 23 | } ?> |
| 24 | </div> |
| 25 |