HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux sa-dev.otherchirps.net 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/themes/kalium/tpls/portfolio-loop-item-details.php
<?php
/**
 * Kalium WordPress Theme
 *
 * Laborator.co
 * www.laborator.co
 *
 * @deprecated 3.0 This template file will be removed or replaced with new one in templates/ folder.
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Direct access not allowed.
}


global $i, $portfolio_args;

// Item Class
$item_class = array( 'portfolio-item' );

// Item Details
$portfolio_item_id    = get_the_ID();
$portfolio_item_title = get_the_title();
$portfolio_item_href  = get_permalink();

$portfolio_item_type     = kalium_get_field( 'item_type' );
$portfolio_item_subtitle = kalium_get_field( 'sub_title' );

$portfolio_item_new_window = false;

$portfolio_item_terms  = kalium_unique_terms( get_the_terms( $portfolio_item_id, 'portfolio_category' ) );
$portfolio_terms_slugs = array();

// Featured Image Id
$post_thumbnail_id = get_post_thumbnail_id();

// Featred Video
$featured_video          = kalium_get_field( 'featured_video' );
$featured_video_autoplay = kalium_get_field( 'featured_video_autoplay' );
$featured_video_mute     = kalium_get_field( 'featured_video_mute' );
$featured_video_controls = kalium_get_field( 'featured_video_controls' );
$featured_video_loop     = kalium_get_field( 'featured_video_loop' );

// Video element
$post_featured_video_element = kalium_render_video_element( $featured_video, [
	'poster'     => $post_thumbnail_id,
	'autoplay'   => $featured_video_autoplay,
	'muted'      => $featured_video_autoplay ? true : $featured_video_mute,
	'controls'   => $featured_video_controls,
	'loop'       => $featured_video_loop,
	'posterplay' => ! $featured_video_autoplay && ! $featured_video_controls,
] );

// Custom Vars
$custom_hover_background_color   = kalium_get_field( 'custom_hover_background_color' );
$custom_hover_color_transparency = kalium_get_field( 'hover_color_transparency' );

// Dominant image color for hover layer
$layout_options = kalium_get_array_key( $portfolio_args['layouts'], kalium_conditional( 'type-1' === $portfolio_args['layout_type'], 'type_1', 'type_2' ) );

if ( 'dominant-color' === $layout_options['hover_style'] && $post_thumbnail_id && ( $dominant_image_color = kalium()->images->get_dominant_color( $post_thumbnail_id ) ) ) {
	$custom_hover_background_color = $dominant_image_color;
}

$hover_effect_style  = kalium_get_field( 'hover_effect_style' );
$hover_layer_options = kalium_get_field( 'hover_layer_options' );


// Portfolio Item Type Class
$item_class[] = 'portfolio-item-' . $portfolio_item_type;


// Create Term Slugs
if ( is_array( $portfolio_item_terms ) ) {
	foreach ( $portfolio_item_terms as $term ) {
		$portfolio_terms_slugs[] = $term->slug;
	}
}


// Item Effect
$reveal_effect = $portfolio_args['reveal_effect'];
$show_effect   = '';
$reveal_delay  = 0.00;
$delay_wait    = 0.15;

if ( false !== strpos( $reveal_effect, '-one' ) ) {
	$reveal_delay = $i % ( $portfolio_args['columns'] * 2 ) * $delay_wait;
}

if ( $reveal_delay ) {
	$reveal_delay = str_replace( ',', '.', "{$reveal_delay}" );
}

switch ( $reveal_effect ) {
	case 'fade':
	case 'fade-one':
		$show_effect = 'fadeIn';
		break;

	case 'slidenfade':
	case 'slidenfade-one':
		$show_effect = 'fadeInLab';
		break;

	case 'zoom':
	case 'zoom-one':
		$show_effect = 'zoomIn';
		break;
}

if ( $show_effect ) {
	$show_effect = "wow {$show_effect}";
}


// Custom Link
$item_linking          = kalium_get_field( 'item_linking' );
$item_launch_link_href = kalium_get_field( 'launch_link_href' );
$item_new_window       = kalium_get_field( 'new_window' );

if ( 'external' == $item_linking && ! empty( $item_launch_link_href ) && '#' != $item_launch_link_href ) {
	$portfolio_item_href       = $item_launch_link_href;
	$portfolio_item_new_window = $item_new_window;
}