Current File : /home/mdkeenpw/www/wp-content/themes/globallogistics/skins/default/templates/content-portfolio.php
<?php
/**
 * The Portfolio template to display the content
 *
 * Used for index/archive/search.
 *
 * @package GLOBALLOGISTICS
 * @since GLOBALLOGISTICS 1.0
 */

$globallogistics_template_args = get_query_var( 'globallogistics_template_args' );
if ( is_array( $globallogistics_template_args ) ) {
	$globallogistics_columns    = empty( $globallogistics_template_args['columns'] ) ? 2 : max( 1, $globallogistics_template_args['columns'] );
	$globallogistics_blog_style = array( $globallogistics_template_args['type'], $globallogistics_columns );
    $globallogistics_columns_class = globallogistics_get_column_class( 1, $globallogistics_columns, ! empty( $globallogistics_template_args['columns_tablet']) ? $globallogistics_template_args['columns_tablet'] : '', ! empty($globallogistics_template_args['columns_mobile']) ? $globallogistics_template_args['columns_mobile'] : '' );
} else {
	$globallogistics_template_args = array();
	$globallogistics_blog_style = explode( '_', globallogistics_get_theme_option( 'blog_style' ) );
	$globallogistics_columns    = empty( $globallogistics_blog_style[1] ) ? 2 : max( 1, $globallogistics_blog_style[1] );
    $globallogistics_columns_class = globallogistics_get_column_class( 1, $globallogistics_columns );
}

$globallogistics_post_format = get_post_format();
$globallogistics_post_format = empty( $globallogistics_post_format ) ? 'standard' : str_replace( 'post-format-', '', $globallogistics_post_format );

?><div class="
<?php
if ( ! empty( $globallogistics_template_args['slider'] ) ) {
	echo ' slider-slide swiper-slide';
} else {
	echo ( globallogistics_is_blog_style_use_masonry( $globallogistics_blog_style[0] ) ? 'masonry_item masonry_item-1_' . esc_attr( $globallogistics_columns ) : esc_attr( $globallogistics_columns_class ));
}
?>
"><article id="post-<?php the_ID(); ?>" 
	<?php
	post_class(
		'post_item post_item_container post_format_' . esc_attr( $globallogistics_post_format )
		. ' post_layout_portfolio'
		. ' post_layout_portfolio_' . esc_attr( $globallogistics_columns )
		. ( 'portfolio' != $globallogistics_blog_style[0] ? ' ' . esc_attr( $globallogistics_blog_style[0] )  . '_' . esc_attr( $globallogistics_columns ) : '' )
	);
	globallogistics_add_blog_animation( $globallogistics_template_args );
	?>
>
<?php

	// Sticky label
	if ( is_sticky() && ! is_paged() ) {
		?>
		<span class="post_label label_sticky"></span>
		<?php
	}

	$globallogistics_hover   = ! empty( $globallogistics_template_args['hover'] ) && ! globallogistics_is_inherit( $globallogistics_template_args['hover'] )
								? $globallogistics_template_args['hover']
								: globallogistics_get_theme_option( 'image_hover' );

	if ( 'dots' == $globallogistics_hover ) {
		$globallogistics_post_link = empty( $globallogistics_template_args['no_links'] )
								? ( ! empty( $globallogistics_template_args['link'] )
									? $globallogistics_template_args['link']
									: get_permalink()
									)
								: '';
		$globallogistics_target    = ! empty( $globallogistics_post_link ) && false === strpos( $globallogistics_post_link, home_url() )
								? ' target="_blank" rel="nofollow"'
								: '';
	}
	
	// Meta parts
	$globallogistics_components = ! empty( $globallogistics_template_args['meta_parts'] )
							? ( is_array( $globallogistics_template_args['meta_parts'] )
								? $globallogistics_template_args['meta_parts']
								: explode( ',', $globallogistics_template_args['meta_parts'] )
								)
							: globallogistics_array_get_keys_by_value( globallogistics_get_theme_option( 'meta_parts' ) );

	// Featured image
	globallogistics_show_post_featured( apply_filters( 'globallogistics_filter_args_featured',
        array(
			'hover'         => $globallogistics_hover,
			'no_links'      => ! empty( $globallogistics_template_args['no_links'] ),
			'thumb_size'    => ! empty( $globallogistics_template_args['thumb_size'] )
								? $globallogistics_template_args['thumb_size']
								: globallogistics_get_thumb_size(
									globallogistics_is_blog_style_use_masonry( $globallogistics_blog_style[0] )
										? (	strpos( globallogistics_get_theme_option( 'body_style' ), 'full' ) !== false || $globallogistics_columns < 3
											? 'masonry-big'
											: 'masonry'
											)
										: (	strpos( globallogistics_get_theme_option( 'body_style' ), 'full' ) !== false || $globallogistics_columns < 3
											? 'square'
											: 'square'
											)
								),
			'thumb_bg' => globallogistics_is_blog_style_use_masonry( $globallogistics_blog_style[0] ) ? false : true,
			'show_no_image' => true,
			'meta_parts'    => $globallogistics_components,
			'class'         => 'dots' == $globallogistics_hover ? 'hover_with_info' : '',
			'post_info'     => 'dots' == $globallogistics_hover
										? '<div class="post_info"><h5 class="post_title">'
											. ( ! empty( $globallogistics_post_link )
												? '<a href="' . esc_url( $globallogistics_post_link ) . '"' . ( ! empty( $target ) ? $target : '' ) . '>'
												: ''
												)
												. esc_html( get_the_title() ) 
											. ( ! empty( $globallogistics_post_link )
												? '</a>'
												: ''
												)
											. '</h5></div>'
										: '',
            'thumb_ratio'   => 'info' == $globallogistics_hover ?  '100:102' : '',
        ),
        'content-portfolio',
        $globallogistics_template_args
    ) );
	?>
</article></div><?php
// Need opening PHP-tag above, because <article> is a inline-block element (used as column)!