HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/themes/rey/template-parts/post/gallery.php
<?php
// Post Gallery

$gallery_ids = get_post_gallery( get_the_ID(), false );

if ( $gallery_ids ) :
	if( isset( $gallery_ids['ids'] ) ):
		$gallery_html = '';
		foreach(explode(',', $gallery_ids['ids']) as $i => $gitem):

			if( $i > ( apply_filters('rey/post/gallery_limit', 4) - 1 ) ) continue; // allow 3 only
			$gallery_html .= '<div class="splide__slide" >';
			$gallery_html .= wp_get_attachment_image( $gitem, rey__the_post_thumbnail_size(), false, ['class'=>"__img"] );
			$gallery_html .= '</div>';
		endforeach;

	if( $gallery_html ):

		rey_assets()->add_scripts(['splidejs', 'rey-splide']);
		rey_assets()->add_styles('rey-splide');

		?>
		<div class="rey-postMedia">
			<div class="splide" data-rey-splide='{"type":"slide","perPage":1, "animateHeight":true, "arrows": false, "pagination": false}'>
				<div class="splide__track" >
					<div class="splide__list" >
						<?php echo wp_kses_post($gallery_html); ?>
					</div>
				</div>
			</div>
			<?php rey__categoriesList(); ?>
		</div>
	<?php endif;
	endif;
	?>
<?php
endif; ?>