| Linux webm007.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 Path : /home/e/g/l/eglisebaa/www/wp-content/themes/hallelujah/ |
| Current File : /home/e/g/l/eglisebaa/www/wp-content/themes/hallelujah/content-portfolio-gallery.php |
<?php
/**
* The Gallery template to display posts
*
* Used for index/archive/search.
*
* @package WordPress
* @subpackage HALLELUJAH
* @since HALLELUJAH 1.0
*/
$hallelujah_template_args = get_query_var( 'hallelujah_template_args' );
if ( is_array( $hallelujah_template_args ) ) {
$hallelujah_columns = empty( $hallelujah_template_args['columns'] ) ? 2 : max( 1, $hallelujah_template_args['columns'] );
$hallelujah_blog_style = array( $hallelujah_template_args['type'], $hallelujah_columns );
} else {
$hallelujah_blog_style = explode( '_', hallelujah_get_theme_option( 'blog_style' ) );
$hallelujah_columns = empty( $hallelujah_blog_style[1] ) ? 2 : max( 1, $hallelujah_blog_style[1] );
}
$hallelujah_post_format = get_post_format();
$hallelujah_post_format = empty( $hallelujah_post_format ) ? 'standard' : str_replace( 'post-format-', '', $hallelujah_post_format );
$hallelujah_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
?><div class="
<?php
if ( ! empty( $hallelujah_template_args['slider'] ) ) {
echo ' slider-slide swiper-slide';
} else {
echo 'masonry_item masonry_item-1_' . esc_attr( $hallelujah_columns );
}
?>
"><article id="post-<?php the_ID(); ?>"
<?php
post_class(
'post_item post_format_' . esc_attr( $hallelujah_post_format )
. ' post_layout_portfolio'
. ' post_layout_portfolio_' . esc_attr( $hallelujah_columns )
. ' post_layout_gallery'
. ' post_layout_gallery_' . esc_attr( $hallelujah_columns )
);
hallelujah_add_blog_animation( $hallelujah_template_args );
?>
data-size="
<?php
if ( ! empty( $hallelujah_image[1] ) && ! empty( $hallelujah_image[2] ) ) {
echo intval( $hallelujah_image[1] ) . 'x' . intval( $hallelujah_image[2] );}
?>
"
data-src="
<?php
if ( ! empty( $hallelujah_image[0] ) ) {
echo esc_url( $hallelujah_image[0] );}
?>
"
>
<?php
// Sticky label
if ( is_sticky() && ! is_paged() ) {
?>
<span class="post_label label_sticky"></span>
<?php
}
// Featured image
$hallelujah_image_hover = 'icon';
if ( in_array( $hallelujah_image_hover, array( 'icons', 'zoom' ) ) ) {
$hallelujah_image_hover = 'dots';
}
$hallelujah_components = hallelujah_array_get_keys_by_value( hallelujah_get_theme_option( 'meta_parts' ) );
hallelujah_show_post_featured(
array(
'hover' => $hallelujah_image_hover,
'no_links' => ! empty( $hallelujah_template_args['no_links'] ),
'thumb_size' => hallelujah_get_thumb_size( strpos( hallelujah_get_theme_option( 'body_style' ), 'full' ) !== false || $hallelujah_columns < 3 ? 'masonry-big' : 'masonry' ),
'thumb_only' => true,
'show_no_image' => true,
'post_info' => '<div class="post_details">'
. '<h2 class="post_title">'
. ( empty( $hallelujah_template_args['no_links'] )
? '<a href="' . esc_url( get_permalink() ) . '">' . esc_html( get_the_title() ) . '</a>'
: esc_html( get_the_title() )
)
. '</h2>'
. '<div class="post_description">'
. ( ! empty( $hallelujah_components )
? hallelujah_show_post_meta(
apply_filters(
'hallelujah_filter_post_meta_args', array(
'components' => $hallelujah_components,
'seo' => false,
'echo' => false,
), $hallelujah_blog_style[0], $hallelujah_columns
)
)
: ''
)
. ( empty( $hallelujah_template_args['hide_excerpt'] )
? '<div class="post_description_content">' . get_the_excerpt() . '</div>'
: ''
)
. ( empty( $hallelujah_template_args['no_links'] )
? '<a href="' . esc_url( get_permalink() ) . '" class="theme_button post_readmore"><span class="post_readmore_label">' . esc_html__( 'Learn more', 'hallelujah' ) . '</span></a>'
: ''
)
. '</div>'
. '</div>',
)
);
?>
</article></div><?php
// Need opening PHP-tag above, because <article> is a inline-block element (used as column)!