PluginProbe ʕ •ᴥ•ʔ
Gallery : FooGallery / 3.2.6
Gallery : FooGallery v3.2.6
3.3.2 3.3.3 3.3.0 3.1.31 3.1.32 3.1.34 3.1.36 3.2.0 3.2.6 trunk 1.10.3 2.0.24 2.1.34 2.2.44 2.3.3 2.4.32 3.0.6 3.1.11 3.1.12 3.1.13 3.1.20 3.1.25 3.1.26 3.1.26.1 3.1.26.2
foogallery / extensions / default-templates / image-viewer / gallery-image-viewer.php
foogallery / extensions / default-templates / image-viewer Last commit date
js 1 month ago class-image-viewer-gallery-template.php 1 month ago gallery-image-viewer.php 1 month ago
gallery-image-viewer.php
45 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * FooGallery Image Viewer gallery template
9 * This is the template that is run when a FooGallery shortcode is rendered to the frontend
10 */
11 //the current FooGallery that is currently being rendered to the frontend
12 global $current_foogallery;
13 //the current shortcode args
14 global $current_foogallery_arguments;
15
16 $text_prev_default = foogallery_get_setting( 'language_imageviewer_prev_text', __( 'Prev', 'foogallery' ) );
17 $text_prev = foogallery_gallery_template_setting( 'text-prev', $text_prev_default ) ;
18
19 $text_of_default = foogallery_get_setting( 'language_imageviewer_of_text', __( 'of', 'foogallery' ) );
20 $text_of = foogallery_gallery_template_setting( 'text-of', $text_of_default );
21
22 $text_next_default = foogallery_get_setting( 'language_imageviewer_next_text', __('Next', 'foogallery') );
23 $text_next = foogallery_gallery_template_setting( 'text-next', $text_next_default );
24
25 //get which lightbox we want to use
26 $lightbox = foogallery_gallery_template_setting_lightbox();
27 $alignment = foogallery_gallery_template_setting( 'alignment', 'fg-center' );
28 $link = foogallery_gallery_template_setting( 'thumbnail_link', 'image' );
29 $foogallery_imageviewer_classes = foogallery_build_class_attribute_safe( $current_foogallery, 'foogallery-link-' . $link, 'foogallery-lightbox-' . $lightbox, $alignment );
30 $foogallery_imageviewer_attributes = foogallery_build_container_attributes_safe( $current_foogallery, array( 'class' => $foogallery_imageviewer_classes ) );
31 ?><div <?php echo $foogallery_imageviewer_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
32 <div class="fiv-inner">
33 <div class="fiv-inner-container">
34 <?php foreach ( foogallery_current_gallery_attachments_for_rendering() as $attachment ) {
35 echo foogallery_attachment_html( $attachment ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
36 } ?>
37 </div>
38 <div class="fiv-ctrls">
39 <button type="button" class="fiv-prev" title="<?php echo esc_attr( $text_prev ); ?>"><span><?php echo esc_html( $text_prev ); ?></span></button>
40 <label class="fiv-count"><span class="fiv-count-current">1</span><?php echo esc_html( $text_of ); ?><span class="fiv-count-total"><?php echo esc_html( $current_foogallery->attachment_count() ); ?></span></label>
41 <button type="button" class="fiv-next" title="<?php echo esc_attr( $text_next ); ?>"><span><?php echo esc_html( $text_next ); ?></span></button>
42 </div>
43 </div>
44 </div>
45