-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-gallery.php
126 lines (120 loc) · 6.76 KB
/
content-gallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
/* Checkbox Default Values */
$baxel_show_date = get_theme_mod( 'baxel_show_date_indexed', 1 );
$baxel_show_author = get_theme_mod( 'baxel_show_author_indexed', 1 );
$baxel_show_categories = get_theme_mod( 'baxel_show_categories_indexed', 1 );
if ( is_single() ) {
$baxel_show_date = get_theme_mod( 'baxel_show_date', 1 );
$baxel_show_author = get_theme_mod( 'baxel_show_author', 1 );
$baxel_show_categories = get_theme_mod( 'baxel_show_categories', 1 );
}
/* */
/* Radio Default Values */
$baxel_featured_image_gallery = get_theme_mod( 'baxel_featured_image_gallery', 'gal' );
$baxel_gallery_position = get_theme_mod( 'baxel_gallery_position', 'content' );
$baxel_layout_style = get_theme_mod( 'baxel_layout_style', '1col_sidebar' );
if ( is_archive() ) {
$baxel_layout_style = get_theme_mod( 'baxel_layout_style_archive', '1col_sidebar' );
}
/* */
/* Thumbnail Choice */
if ( $baxel_layout_style == '1col' || $baxel_layout_style == '1col_sidebar' ) {
$baxel_thumbnail_choice = 0;
} else if ( $baxel_layout_style == '1_2col_sidebar' ) {
global $baxel_thumbnail_situation;
$baxel_thumbnail_choice = $baxel_thumbnail_situation;
} else {
$baxel_thumbnail_choice = 1;
}
/* */
$baxel_min_post_height = get_theme_mod( 'baxel_min_post_height', 0 );
$meta_woi = get_post_meta( get_the_ID(), 'baxel-woi-meta-box-checkbox', true );
?>
<?php if ( !is_single() && baxel_apply_columns() ) { echo '<div class="' . baxel_apply_columns() . '">'; } ?>
<article <?php post_class( 'clearfix' ); if ( !is_single() && !baxel_check_style_z() && $baxel_min_post_height ) { echo 'style="min-height: ' . esc_attr( $baxel_min_post_height ) . 'px;"'; } ?>>
<?php if ( baxel_check_style_z() ) { ?>
<a class="post-styleZ clearfix" href="<?php esc_url( the_permalink() ); ?>">
<?php if ( has_post_thumbnail() ) { echo the_post_thumbnail( 'baxel-style-z-image', array( 'class' => 'fading' ) ); } ?>
<div class="post-styleZ-inner<?php if ( has_post_thumbnail() ) { echo '-with-t'; } ?>">
<div class="table-cell-middle">
<?php if ( $baxel_show_date ) { ?><div class="post-styleZ-date"><?php echo get_the_date(); ?></div><?php } ?>
<h2 class="post-styleZ-title"><?php the_title(); ?></h2>
</div>
</div>
</a>
<?php } else { ?>
<?php if ( has_shortcode( $post->post_content, 'gallery' ) || baxel_check_gutenberg_gallery() ) {
if ( is_single() ) {
if ( $baxel_gallery_position == 'iof' || $baxel_gallery_position == 'both' ) {
echo baxel_gallery_to_slider( 'the_content' );
} else { ?>
<?php if ( !$meta_woi ) { ?>
<div class="article-featured-image"><?php the_post_thumbnail(); ?></div>
<?php }
}
} else {
if ( $baxel_featured_image_gallery == 'gal' ) {
echo baxel_gallery_to_slider( 'the_content' );
} else if ( $baxel_featured_image_gallery == 'fea' ) { ?>
<div class="article-featured-image">
<a href="<?php esc_url( the_permalink() ); ?>">
<?php if ( $baxel_thumbnail_choice ) {
the_post_thumbnail( 'baxel-thumbnail-image' );
} else {
the_post_thumbnail();
} ?>
</a>
</div>
<?php }
}
} else {
if ( $baxel_featured_image_gallery == 'fea' ) {
if ( is_single() ) { ?>
<?php if ( !$meta_woi ) { ?>
<div class="article-featured-image"><?php the_post_thumbnail(); ?></div>
<?php }
} else { ?>
<div class="article-featured-image">
<a href="<?php esc_url( the_permalink() ); ?>">
<?php if ( $baxel_thumbnail_choice ) {
the_post_thumbnail( 'baxel-thumbnail-image' );
} else {
the_post_thumbnail();
} ?>
</a>
</div>
<?php }
}
} ?>
<div class="article-content-outer<?php echo baxel_apply_layout(); ?>">
<div class="article-content-inner">
<?php if ( is_sticky() && is_home() && !is_paged() ) { ?>
<div class="sticky-icon"><?php echo esc_attr( baxel_translation( '_Sticky' ) ); ?></div>
<?php } ?>
<?php if ( $baxel_show_date ) { ?>
<div class="article-date-outer"><?php if ( is_single() ) { ?><span class="article-date"><?php echo get_the_date(); ?></span><?php } else { ?><a class="article-date" href="<?php esc_url( the_permalink() ); ?>"><?php echo get_the_date(); ?></a><?php } ?></div>
<?php } ?>
<?php if ( is_single() ) { ?><h1 class="article-title"><?php the_title(); ?></h1><?php } else { ?><h2 class="article-title"><a href="<?php esc_url( the_permalink() ); ?>"><?php the_title(); ?></a></h2><?php } ?>
<?php if ( $baxel_show_author ) { ?>
<a class="article-author-outer" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php echo get_avatar( get_the_author_meta( 'ID' ), 30 ); ?>
<div class="article-author"><?php echo esc_attr( baxel_translation( '_By' ) ); ?> <?php the_author(); ?></div>
</a>
<?php } ?>
<?php if ( is_single() ) { ?>
<div class="article-pure-content clearfix"><?php echo baxel_format_get_the_content(); ?></div>
<?php } else { ?>
<?php echo baxel_append_excerpt(); ?>
<?php }
get_template_part( 'social-bar' );
get_template_part( 'pager-bar' );
if ( $baxel_show_categories ) {
if ( get_the_category() ) { get_template_part( 'category-bar' ); }
the_tags( '<div class="category-bar tag-only clearfix"><span class="categories-label">' . esc_attr( baxel_translation( '_Tag' ) ) . ':</span>', ', ', '</div>' );
}
?>
</div>
</div>
<?php } ?>
</article>
<?php if ( !is_single() && baxel_apply_columns() ) { echo '</div>'; } ?>