HEX
Server: Apache
System: Linux webd003.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: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/studiomilighetti/wp-content/themes/domik/template-parts/folio/list.php
<?php
/* banner-php */
$show_cat = true;

if(!isset($enable_gallery)){
    $enable_gallery = domik_get_option('folio_enable_gallery');
}elseif($enable_gallery == 'yes'){
    $enable_gallery = true;
}else{
    $enable_gallery = false;
}

$masonry_size = get_post_meta(get_the_ID(), '_cmb_masonry_size', true);
$folio_add_info = get_post_meta(get_the_ID(), '_cmb_folio_add_info', true);

$folio_popup_link = get_post_meta(get_the_ID(), '_cmb_folio_popup_link', true);
$popup_cls = 'image-popup';
if($folio_popup_link != ''){
    $url_args = parse_url($folio_popup_link);
    if($enable_gallery) {
        $popup_cls = 'folio-popup-gallery';
    }
    switch($url_args['host']) {
        case 'youtu.be':
        case 'www.youtube.com':
        case 'youtube.com':
        case 'vimeo.com':
        case 'www.vimeo.com':
        case 'soundcloud.com':
            if($enable_gallery) {
                $popup_cls = 'mfp-iframe folio-popup-gallery';
            }else {
                $popup_cls = 'popup-youtube';
            }
            break;
    }

}elseif($enable_gallery){
    $popup_cls = 'folio-popup-gallery';
    $folio_popup_link = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );
}else{
    $popup_cls = 'ajax';
    $folio_popup_link = get_permalink();
}


// if( $enable_gallery ){
//     $popup_cls = 'folio-popup-gallery';
//     $folio_popup_link = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );
// }else{
//     $popup_cls = 'ajax';
//     $folio_popup_link = get_permalink();
// }

$folio_external_link = get_post_meta( get_the_ID(), '_cmb_folio_external_link',true);
//$folio_popup_gallery = get_post_meta( get_the_ID(), '_cmb_folio_popup_gallery',true);

if($folio_external_link != ''){
    $folio_popup_link = $folio_external_link;
    $popup_cls = 'folio-external-link';
}

?>

<div <?php post_class('gallery-item gallery-item-'.$masonry_size);?>>
    <div class="grid-item-holder">
        <div class="box-item">
            <a href="<?php echo esc_url($folio_popup_link); ?>" class="<?php echo esc_attr($popup_cls);?>">
                <span class="overlay"></span> 
                <?php the_post_thumbnail('folio-size-'.$masonry_size);?>
            </a>
        </div>
        <div class="grid-item ">
            <h3><a href="<?php the_permalink();?>" class="ajax portfolio-link"><?php the_title();?></a></h3>
            <?php 
            $terms = get_the_terms(get_the_ID(), 'skill');
            if ( $terms && ! is_wp_error( $terms ) && $show_cat ){
            echo '<span class="folio-cats">';
                foreach( $terms as $key => $term){
                    if($key > 0){
                        esc_html_e(', ','domik' );
                    }
                    echo sprintf( '<a class="folio-cat-link ajax" href="%1$s">%2$s</a>',
                        esc_url( get_term_link( $term->slug, 'skill' ) ),
                        esc_html( $term->name )
                    );
                }
            echo '</span>';
            }
            ?>

            <?php if(!empty($folio_add_info)) echo wp_kses_post( $folio_add_info ) ;?>
        </div>
    </div>
</div>